Skip to content

Commit

Permalink
[OGUI-1410] Add first calibration page with components for displaying…
Browse files Browse the repository at this point in the history
… latest info (#2181)

* builds the initial version of the calibration page which displays the latest calibrationRuns for each detector and runType as per the configuration stored in the KV runtime store.
* unifies the usage of `bookkeeping` from configuration file and removes duplicated one
* bumps `web-ui` to make use of the `formatTimeDuration`
  • Loading branch information
graduta authored Oct 27, 2023
1 parent d6aa554 commit 1fc960c
Show file tree
Hide file tree
Showing 20 changed files with 474 additions and 123 deletions.
8 changes: 2 additions & 6 deletions Control/config-default.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ module.exports = {
},
bookkeeping: {
url: 'http://localhost:4000',
token: 'some-token'
token: 'some-token',
refreshRate: 10000,
},
consul: {
ui: 'localhost:8500',
Expand All @@ -52,11 +53,6 @@ module.exports = {
qcGui: {
url: 'qcg.cern.ch'
},
bookkeepingGui: {
url: 'ali-bookkeeping.cern.ch',
token: 'token',
refreshRate: 10000,
},
utils: {
refreshTask: 10000, // how often should task list page should refresh its content
},
Expand Down
8 changes: 4 additions & 4 deletions Control/lib/config/publicConfigProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function getConsulConfig(config) {
const conf = config.consul;
conf.protocol = conf?.protocol || 'http';
conf.flpHardwarePath = conf?.flpHardwarePath || 'o2/hardware/flps';
conf.detHardwarePath = conf?.detHardwarePath ||'o2/hardware/detectors',
conf.detHardwarePath = conf?.detHardwarePath || 'o2/hardware/detectors',
conf.readoutCardPath = conf?.readoutCardPath || 'o2/components/readoutcard';
conf.qcPath = conf?.qcPath || 'o2/components/qc';
conf.readoutPath = conf?.readoutPath || 'o2/components/readout';
Expand Down Expand Up @@ -126,9 +126,9 @@ function _getQcgURL(config) {
* @param {JSON} config - server configuration
* @returns {string}
*/
function _getBookkeepingURL(config) {
const bkp = config?.bookkeepingGui;
return (bkp?.url) ? `${bkp.url}` : '';
function _getBookkeepingURL(config = {}) {
const {bookkeeping = {}} = config;
return bookkeeping.url ? new URL(bookkeeping.url) : null
}

module.exports = {
Expand Down
5 changes: 5 additions & 0 deletions Control/lib/services/Run.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ class RunService {
*/
this._calibrationRunsPerDetector = {};

/**
* @type {Object<String, Array<RunSummary>>}
*/
this._calibrationRunsPerDetector = {};

this._logger = new Log(`${process.env.npm_config_log_label ?? 'cog'}/run-service`);
}

Expand Down
Loading

0 comments on commit 1fc960c

Please sign in to comment.