README
Quality Control GUI (QCG)
QCG is a web graphical user interface for O2 Quality Control.
- Installation
- Local configuration
- Run QCG locally
- Public API
- Enable HTTPS
- Display a non-standard ROOT object in QCG
- Online Mode
Installation
- Install
nodeJS>=14.16.0
- CC7:
yum install https://rpm.nodesource.com/pub_14.x/el/7/x86_64/nodejs-14.16.1-1nodesource.x86_64.rpm - Mac:
brew install node@14 ; echo 'export PATH="/usr/local/opt/node@14/bin:$PATH"' >> $HOME/.bash_profile - Other: https://nodejs.org/en/download/package-manager
- Clone the
WebUirepository
git clone https://github.com/AliceO2Group/WebUi.git
- Install QCG
cd WebUi/QualityControl
npm install
- Copy configuration file and update according to your needs (see next section):
cp config-default.js config.js
Troubleshooting
Q: When doing npm install I have an error error: no template named 'remove_cv_t' in namespace 'std'; did you mean 'remove_cv'? or such.
A: Make sure you are using nodeJS 14 and not nodeJS 16.
Local Configuration
In order to customise the 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:
hostnameportprefix- a prefix as string which will be used when querying objects from CCDB to request only objects containing the aforementioned string
CCDB
Attribute to define the Computer Centre DataBase (CCDB) endpoint.
Edit the ccdb section to define a custom:
hostnameportplotUrl- URL with the location from which ROOT Files should be downloaded from e.g.
http://localhost:8083. If a different host is used (compared tohttpdefined one), one should disable the CSP settings of the browser
- URL with the location from which ROOT Files should be downloaded from e.g.
prefix- (optional) prefix to use for filtering on pathName
Listing Connector
Specify the connector that should be used for retrieving QC objects. Default value for listingConnector is ccdb.
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](http://lo calhost: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
httpsection ofconfig.jsfile. - Provide your hostname in the
hostnamefiled ofhttpsection ofconfig.jsfile.
Display a 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
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:
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/qc
- Builds a
tgzfile which contains an archive of the project. This can than be used for local repositories installations