README
Control GUI
- Control GUI
Description
This is a prototype of Control GUI. It aims to replace current ECS HI and provide intuitive way of controlling the O2 data taking.
It communicates with Control agent over gRPC.
Requirements
nodejs>=14.16.0
Installation
git clone https://github.com/AliceO2Group/WebUi.gitcd WebUi/Controlnpm cicp config-default.js config.js- Modify
config.jsfile to set endpoint details (More information in section Configuration) - Start web app:
npm start - Open browser and navigate to http://localhost:8080
Configuration
O2Control gRPC
hostname- gRPC hostnameport- gRPC porttimeout- ms, gRPC deadline for service calls; Default value 30000 msmaxMessageLength- MB, gRPC message size limit; Default value 50 MBlabel- name of the gRPC service,package- name of the gRPC package
Apricot gRPC
hostname- gRPC hostnameport- gRPC porttimeout- ms, gRPC deadline for service calls; Default value 30000 msmaxMessageLength- MB, gRPC message size limit; Default value 50 MBlabel- name of the gRPC servicepackage- name of the gRPC package
Grafana
hostname- Grafana instance hostnameport- Grafana instance port
Consul
Use of a Consul instance is optional
hostname- Consul head node hostnameport- Consul head node portflpHardwarePath- Prefix for KV Store for the content about the FLPs machinesreadoutPath- Prefix for KV Store for readout's configurationreadoutCardPath- Prefix for KV Store for readout-card's configurationqcPath- Prefix for KV Store for quality-control's configurationkVPrefix- Name of the Consul cluster used by AliceO2
Kafka
Use of a Kafka instance is optional. It is being used for prompting and receiving notifications, see more in Kafka connector - Notification framework guide.
InfoLogger GUI
Use of InfoLogger GUI instance is optional. Configuration details about it are being used only for building URLs to help the user navigate the logs of its actions.
hostname- InfoLogger GUI hostnameport- InfoLogger GUI port
QualityControl GUI
Use of QualityControl GUI instance is optional. Configuration details about it are being used only for building URLs to help the user navigate the objects created within an environment.
hostname- QualityControl GUI hostnameport- QualityControl GUI port
Bookkeeping GUI
Use of Bookkeeping GUI instance is optional. Configuration details about it are being used only for building URLs to help the user navigate to the run details of their environments.
hostname- Bookkeeping GUI hostnameport- Bookkeeping GUI port
Utils
Use of utils field is optional. Here, a user can specify configuration fields for various uses of AliECS GUI:
refreshTask- specifies how often (ms) the pagetaskListshould refresh its content if the user has it opened; Default value is10000refreshEnvs- specifies how often (ms) the pageenvironmentsshould refresh its content if the user has it opened; Default value is10000
Features
GUI
- Lock interface - single user is allowed to execute commands, others act as spectators
- List, create, control and shutdown environments
- External resources access:
- gRPC
- Consul - used for KV Store
- Kafka-Node - used for prompting Browser Notifications to the user
- Grafana - used to display control environment plots
Enable/Disable CRU Links
- Navigate to the
Configurationpage by clicking on theLinkssub-menu from the left side-bar. Here, CRUs will be grouped by detectors and host - Select the hosts that should be updated by using either the check-box in front of the host name or the checkbox in front of the detector
- Update the User Logic or Links[0-12] state of the selected hosts accordingly
- Lock the interface via the top-left lock button
- By pressing the top-right grey
Savebutton, the updates will be saved directly in Consul for the selected hosts - By pressing the top-right blue
Save & Configurebutton:- the updates will be saved directly in Consul for the selected hosts;
- the CRUs of the selected hosts will be updated with the configuration previously saved in Consul.
It is important to understand that the Save & Configure action will also apply any other CRU changes that are present in Consul and NOT only the state of the links which are updatable via the Interface.
Clean Resources/Tasks
- Navigate to the
Taskspage by clicking on theTask listsub-menu from the left side-bar
Here, tasks will be grouped by host and each host has an in-line button to provide a download button for the logs of that machine
- Lock the interface via the top-left lock button
- Use the top-right orange text
Clean Resourcesbutton to request AliECS Core to run theo2-roc-cleanupworkflow - Use the top-right red text
Clean Tasksbutton to request AliECS Core to remove all tasks that do not belong to an environment
Roles
The GUI adapts its view depending on SSO roles configured in Application Portal (see more details in OpenID docs). Currently supported roles are:
- Guest - read-only access
- Detector - only standalone runs for given detector(s)
- Global - access to global runs and standalone runs for all detectors
- Admin - "Global" + admin actions such as "Force lock"
Integration with ControlWorkflows
List of fixed variables used by AliECS GUI for user logic
There is a set of variables which are fixed and used by the AliECS GUI. If there is a need for changing the name of these variables in the ControlWorkflows repository, then the AliECS GUI developers should be notified to update accordingly.
dcs_enabled
ddsched_enabled
dd_enabled
epn_enabled
minimal_dpl_enabled
odc_topology
odc_enabled
pdp_config_option
pdp_o2_data_processing_hash
pdp_o2_data_processing_path
pdp_topology_description_library_file
pdp_workflow_name
qc_config_uri
qcdd_enabled
readout_cfg_uri
trg_enabled
Dynamically built Workflow Panels
From version 1.28.0 onwards, the AliECS GUI allows the user to define custom workflow templates. These are defined in YAML in the ControlWorkflows repository.
Each variable belonging to a template will follow the definition present in the protofile and will be dynamically built and displayed by the AliECS GUI based on the conditions provided. e.g
"roc_ctp_emulator_enabled": {
"allowedValues": [],
"defaultValue": "11",
"type": 1,
"label": "ROC CTP emulator",
"description": "", // EDIT_BOX of type number with no priority on index'
"panel": "mainPanel"
},
"dcs_sor_parameters": {
"allowedValues": [],
"defaultValue": "Some Default Value",
"type": 0,
"label": "DCS SOR parameters",
"description": "", // EDIT_BOX with condition to be displayed only if component roc_ctp_emulator_enabled has a value higher or equal to 20
"panel": "dcsPanel",
"visibleIf": "$roc_ctp_emulator_enabled >= \"20\""
},
In the example above, the first variable is defined as an edit box of type 1 (number) while the second variable is defined as an edit box of type 0 (string) which will only be displayed if the value from the first field is greater than "20".
More examples can be seen in the test file
The visibleIf fields accepts the following 3 conditions that can be combined using logical operators:
===,!==,>,<,>=,<=(string comparison)includes(value)key.match(value)(TODO)
Continuous Integration Workflows
Control project makes use of two workflows.
control.yml
- Checks that tests of the project are running successfully on two virtual machines:
ubuntumacOS
- Make sure that the proposed changes are not reducing the current code-coverage percent
- Sends a code coverage report to CodeCov
release.yml
- Releases a new version of the project to the NPM Registry under the tag @aliceo2/control
- Builds a
tgzfile which contains an archive of the project. This can than be used for local repositories installations