@aliceo2/qc
v3.9.1
Published
O2 Quality Control Web User Interface
Downloads
416
Readme
QCG is a web graphical user interface for O2 Quality Control.
Installation
- Install
nodeJS
>=16.x
- CC7:
yum install https://rpm.nodesource.com/pub_16.x/el/8/x86_64/nodejs-16.9.1-1nodesource.x86_64.rpm
- Mac:
brew install node@16 ; echo 'export PATH="/usr/local/opt/node@16/bin:$PATH"' >> $HOME/.bash_profile
- Other: https://nodejs.org/en/download/package-manager
- Clone the
WebUi
repository
git clone https://github.com/AliceO2Group/WebUi.git
- Install QCG
cd WebUi/QualityControl
npm ci
- Copy configuration file and update according to your needs (see next section):
cp config-default.js config.js
Local Configuration
In order to customize QCG, you can edit the following configuration file: WebUi/QualityControl/config.js
HTTP
Attribute to define the http
endpoint of the application.
Edit the http
section to define a custom:
hostname
port
CCDB
Attribute to define the Computer Centre DataBase (CCDB)
endpoint.
Edit the ccdb
section to define a custom:
protocol = 'http'
- protocol to use when querying CCDB via HTTP API.hostname = 'localhost'
- hostname of the CCDB instanceport = '8080'
- port for accessing CCDB API[prefix = '']
- prefix to use for filtering on pathName[cachePrefix = 'qc']
- prefix to use for building the cache of object paths from CCDB[cacheRefreshRate = 120 * 1000]
- interval on which the paths of objects from CCDB should be refreshed
QC
Attribute to define if QCG is to be started as part of a QC integrated environment.
enabled = false
Run QCG locally
(Optional) Online Mode - If you need Online Mode read this section
Run QCG server
npm start
Open a browser and navigate to http://localhost:8080.
Ensure that your browser is supported.
Enable HTTPS
- Follow these steps to request a new CERN Grid Host Certificate
- Set up file paths to the generated key and certificate in the
http
section ofconfig.js
file. - Provide your hostname in the
hostname
filed ofhttp
section ofconfig.js
file.
Features
Canvas Options via MetaData
QCG
is using CCDB as storage service. When storing an object, the user can also store information on how an object should be plotted via the metadata
field in CCDB. QualityControl documentation on how this can be achieved can be found here
drawOptions
: semi-colon separated drawing options; e.g.lcolz;colz
displayHints
: semi-colon separated hints; e.g.AP;APB
Display a QC non-standard ROOT object in QCG
QCG
is able to display non-standard ROOT objects with the help of QC. More information can be found here
Online Mode
QCG is offering an optional Online Mode
which allows the user to view only QC Objects that are being generated live. This will only see objects if an instance of QualityControl is running and making use of the ServiceDiscovery class.
For this, QCG is using Service Discovery capabilities of Consul.
Once Consul
is installed and running, update the config.js
file of QCG
with information regarding on what host and port Consul agent is now running.
Moreover, a refresh rate interval can be set to limit the user number of requests. If no refreshRate
is provided, defaults as shown below will be used:
e.g.
consul: {
hostname: 'localhost',
port: 8500,
refreshRate: {
min: 10,
max: 120
}
}
Online mode will use an optional prefix for its queries specified in ccdb.prefix. This is to ensure the same results are provided in both Offline & Online mode.
As this functionality is optional, there will be no impact on QCG if a configuration for Consul
is not provided. A simple warning message as below will be shown to the user that the configuration is missing
2020-02-28T10:19:26.110Z warn: [QualityControlModel] Consul Service: No Configuration Found
Export a layout as JSON
In order to facilitate the transition from one environment (e.g. TST) to another (e.g. PROD) while at the same time updating it, an export feature is provided.
- Open the layout that you wish to export
- Click on the top right second (from left to right) button which on hover shall display:
Export layout skeleton as JSON file
- Following that, QCG will automatically generate a JSON file and store it in your default download location.
Import a layout from JSON
Once a layout is exported and modified as needed or created from scratch, one can import it into QCG as such:
- On the left sidebar, click on the small button (icon represented as cloud with arrow up) which is in line with
MY LAYOUTS
label. - A pop-up will open which will allow you to paste your JSON structure.
- The pop-up will validate that the pasted value is a valid JSON.
- Click on
Import
button.- If successful, a new page will be opened with your imported layout in edit mode
- If there is an issue, a red line with an error message will be displayed above the Import button
- Click
Save
Layout from the top right corner button.
AutoTransitioning Tabs within Layouts
To easily follow the progress of a RUN, layouts can automatically transition through the displayed tabs every few seconds. To configure:
- Open desired layout
- Click on the
pencil icon
button to start editing the layout - On the left sidebar, configure the field
Tab Auto-Change(sec): 0 (OFF), 10-600 (ON)
with the desired numerical value - Save
Continuous Integration Workflows
QualityControl project makes use of two workflows.
qc.yml
- Checks that tests of the project are running successfully on two virtual machines:
ubuntu
macOS
- 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/qc
- Builds a
tgz
file which contains an archive of the project. This can than be used for local repositories installations