operatorfabric-core icon indicating copy to clipboard operation
operatorfabric-core copied to clipboard

Get the list of tags for monitoring processus from a business data file

Open freddidierRTE opened this issue 1 year ago • 0 comments

Currently, the list of tags for the process monitoring screen is defined in the web-ui.json file. This feature request proposes to load this list from a business data file instead.

Existing web-ui.json structure:

"tags": {
  "list": [
    {
      "label": "Label for tag 1",
      "value": "tag1"
    },
    {
      "label": "Label for tag 2",
      "value": "tag2"
    }
  ]
}

Proposed change: Retrieve the list of tags from a JSON file using the business data feature (https://opfab.github.io/documentation/current/reference_doc/#business_data).

In web-ui.json, introduce a new field processMonitoring.BusinessDataFileForTags that specifies the name of the file containing the tags. The file should follow this structure:

[
  {
    "label": "Label for tag 1",
    "value": "tag1"
  },
  {
    "label": "Label for tag 2",
    "value": "tag2"
  }
]

Additionally, the existing processMonitoring field in web-ui.json, which contains an array of column definitions, needs to be modified. The array of column definitions should be nested within a new field named columnDefinitions under processMonitoring.

To summarize, the tasks to be completed are:

  • Implement the new structure with columnDefinitions.
  • Document the structure modification in processMonitoring in the migration guide.
  • Implement and test the feature to load tags from the business data file defined in processMonitoring. The implementation should be done in ui/main/src/app/business/view/processmonitoring/processmonitoring.view.ts.
  • Provide an example file in src/test/resources/businessData.
  • Update the documentation to reflect these changes.

Please note that no Cypress tests are required for this feature.

freddidierRTE avatar Mar 28 '24 10:03 freddidierRTE