-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Main into this branch (contains subtask 2) (#1314)
* Release 0.75.0 (#1305) * [O2B-1092] add migration file (#1313) * add migration file * add model, fix outputsize type * add typedef * rename * [O2B-883]: Add bold continuous/dashed line for detector quality in overview (#1293) * Overview of runs now show quality by using a line under them in green(continous) /red(dotted) * [O2B-1096] Fix run-overview to run-details navigation link (#1311) * fix issue in which all run parameters were passed to the URL when navigating from run-overview to run-details * [O2B-1097] Display environments IDs in white in envs-overview page (#1312) * [O2B-1095] Fix log's attachment token passed parameter (#1306) * Bump umzug from 3.4.0 to 3.5.0 (#1309) Bumps [umzug](https://github.com/sequelize/umzug) from 3.4.0 to 3.5.0. - [Release notes](https://github.com/sequelize/umzug/releases) - [Changelog](https://github.com/sequelize/umzug/blob/main/CHANGELOG.md) - [Commits](sequelize/umzug@v3.4.0...v3.5.0) --- updated-dependencies: - dependency-name: umzug dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump the dev-dependencies group with 2 updates (#1310) Bumps the dev-dependencies group with 2 updates: [eslint](https://github.com/eslint/eslint) and [puppeteer](https://github.com/puppeteer/puppeteer). Updates `eslint` from 8.55.0 to 8.56.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](eslint/eslint@v8.55.0...v8.56.0) Updates `puppeteer` from 21.5.2 to 21.6.1 - [Release notes](https://github.com/puppeteer/puppeteer/releases) - [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json) - [Commits](puppeteer/puppeteer@puppeteer-v21.5.2...puppeteer-v21.6.1) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev-dependencies - dependency-name: puppeteer dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev-dependencies ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: George Raduta <[email protected]> * [O2B-926] Added switch button to overview for PHYSICS filter (#1303) Co-authored-by: Menno Konijn <[email protected]> Co-authored-by: George Raduta <[email protected]> * [O2B-1085] update proto files and grpc run controller with new user struct (#1304) --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Martin Boulais <[email protected]> Co-authored-by: xsalonx <[email protected]> Co-authored-by: mennokonijn <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: George Raduta <[email protected]> Co-authored-by: Menno Konijn <[email protected]>
- Loading branch information
1 parent
c6efae4
commit b4a63a9
Showing
21 changed files
with
337 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
lib/database/migrations/20231211080706-create-data-passes.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
'use strict'; | ||
|
||
/** @type {import('sequelize-cli').Migration} */ | ||
module.exports = { | ||
up: async (queryInterface, Sequelize) => queryInterface.sequelize.transaction(async (transaction) => { | ||
await queryInterface.createTable('data_passes', { | ||
id: { | ||
type: Sequelize.INTEGER, | ||
allowNull: false, | ||
primaryKey: true, | ||
autoIncrement: true, | ||
}, | ||
name: { | ||
type: Sequelize.STRING, | ||
allowNull: false, | ||
}, | ||
description: { | ||
type: Sequelize.TEXT, | ||
}, | ||
output_size: { | ||
type: Sequelize.BIGINT, | ||
}, | ||
reconstructed_events_count: { | ||
type: Sequelize.INTEGER, | ||
}, | ||
last_run_number: { | ||
type: Sequelize.INTEGER, | ||
}, | ||
lhc_period_id: { | ||
type: Sequelize.INTEGER, | ||
references: { | ||
model: 'lhc_periods', | ||
key: 'id', | ||
}, | ||
}, | ||
created_at: { | ||
allowNull: false, | ||
type: Sequelize.DATE, | ||
defaultValue: Sequelize.literal('CURRENT_TIMESTAMP'), | ||
}, | ||
updated_at: { | ||
allowNull: false, | ||
type: Sequelize.DATE, | ||
defaultValue: Sequelize.literal('CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'), | ||
}, | ||
}, { transaction }); | ||
}), | ||
|
||
down: async (queryInterface) => queryInterface.sequelize.transaction(async (transaction) => { | ||
await queryInterface.dropTable('data_passes', { transaction }); | ||
}), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** | ||
* @license | ||
* Copyright CERN and copyright holders of ALICE O2. This software is | ||
* distributed under the terms of the GNU General Public License v3 (GPL | ||
* Version 3), copied verbatim in the file "COPYING". | ||
* | ||
* See http://alice-o2.web.cern.ch/license for full licensing information. | ||
* | ||
* In applying this license CERN does not waive the privileges and immunities | ||
* granted to it by virtue of its status as an Intergovernmental Organization | ||
* or submit itself to any jurisdiction. | ||
*/ | ||
|
||
const Sequelize = require('sequelize'); | ||
|
||
module.exports = (sequelize) => { | ||
const DataPass = sequelize.define( | ||
'DataPass', | ||
{ | ||
id: { | ||
type: Sequelize.INTEGER, | ||
allowNull: false, | ||
primaryKey: true, | ||
autoIncrement: true, | ||
}, | ||
name: { | ||
type: Sequelize.STRING, | ||
allowNull: false, | ||
}, | ||
description: { | ||
type: Sequelize.TEXT, | ||
}, | ||
outputSize: { | ||
type: Sequelize.BIGINT, | ||
}, | ||
reconstructedEventsCount: { | ||
type: Sequelize.INTEGER, | ||
}, | ||
lastRunNumber: { | ||
type: Sequelize.INTEGER, | ||
}, | ||
}, | ||
{ tableName: 'data_passes' }, | ||
); | ||
|
||
DataPass.associate = (models) => { | ||
DataPass.belongsTo(models.LhcPeriod, { foreignKey: 'lhcPeriodId', as: 'lhcPeriod' }); | ||
}; | ||
|
||
return DataPass; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* @license | ||
* Copyright CERN and copyright holders of ALICE O2. This software is | ||
* distributed under the terms of the GNU General Public License v3 (GPL | ||
* Version 3), copied verbatim in the file "COPYING". | ||
* | ||
* See http://alice-o2.web.cern.ch/license for full licensing information. | ||
* | ||
* In applying this license CERN does not waive the privileges and immunities | ||
* granted to it by virtue of its status as an Intergovernmental Organization | ||
* or submit itself to any jurisdiction. | ||
*/ | ||
|
||
/** | ||
* @typedef SequelizeDataPass | ||
* | ||
* @property {number} id | ||
* @property {string} name | ||
* @property {string} description | ||
* @property {number} outputSize | ||
* @property {number} reconstructedEventsCount | ||
* @property {number} lastRunNumber | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* @license | ||
* Copyright CERN and copyright holders of ALICE O2. This software is | ||
* distributed under the terms of the GNU General Public License v3 (GPL | ||
* Version 3), copied verbatim in the file "COPYING". | ||
* | ||
* See http://alice-o2.web.cern.ch/license for full licensing information. | ||
* | ||
* In applying this license CERN does not waive the privileges and immunities | ||
* granted to it by virtue of its status as an Intergovernmental Organization | ||
* or submit itself to any jurisdiction. | ||
*/ | ||
|
||
import { RunDefinition } from '../../../domain/enums/RunDefinition.js'; | ||
import { switchInput } from '../../../components/common/form/switchInput.js'; | ||
|
||
/** | ||
* Builds a button which will toggle the physics filter | ||
* @param {OverviewModel} runsOverviewModel the model of the runs overview | ||
* @returns {vnode} with button | ||
*/ | ||
export const showPhysicsButton = (runsOverviewModel) => { | ||
const isPhysicsActive = runsOverviewModel.isDefinitionInFilter(RunDefinition.Physics); | ||
const onChange = isPhysicsActive ? | ||
() => runsOverviewModel.removeDefinitionFilter(RunDefinition.Physics) | ||
: | ||
() => runsOverviewModel.addDefinitionFilter(RunDefinition.Physics); | ||
return switchInput(isPhysicsActive, onChange, { labelAfter: 'PHYSICS' }); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** | ||
* @license | ||
* Copyright CERN and copyright holders of ALICE O2. This software is | ||
* distributed under the terms of the GNU General Public License v3 (GPL | ||
* Version 3), copied verbatim in the file "COPYING". | ||
* | ||
* See http://alice-o2.web.cern.ch/license for full licensing information. | ||
* | ||
* In applying this license CERN does not waive the privileges and immunities | ||
* granted to it by virtue of its status as an Intergovernmental Organization | ||
* or submit itself to any jurisdiction. | ||
*/ | ||
|
||
import { h } from '/js/src/index.js'; | ||
import { RunDetectorQualities } from '../../../domain/enums/RunDetectorQualities.js'; | ||
|
||
/** | ||
* Format a list of detectors inline and underline them based on their quality | ||
* | ||
* @param {RunDetectorQuality[]} detectorsQualities The run detector quality per detector | ||
* @param {number} nDetectors The number of run detectors | ||
* @return {Component} the formatted run detectors inline | ||
*/ | ||
export const formatRunDetectorsInline = (detectorsQualities, nDetectors) => { | ||
if (detectorsQualities?.length <= 0) { | ||
return '-'; | ||
} | ||
|
||
return [ | ||
h('.badge.bg-gray-light.mh2.nDetectors-badge', nDetectors), | ||
detectorsQualities.flatMap((detector, index) => { | ||
const detectorClass = detectorStyleClass(detector); | ||
|
||
return [ | ||
h(`span.${detectorClass}`, detector.name), | ||
h('span', index < detectorsQualities.length - 1 ? ',' : ''), | ||
]; | ||
}), | ||
]; | ||
}; | ||
|
||
/** | ||
* Gets the class for the style of the detector | ||
* | ||
* @param {RunDetectorQuality} detectorsQuality The detector with its quality | ||
* @return {string} The class of the detecor | ||
*/ | ||
const detectorStyleClass = (detectorsQuality) => detectorsQuality.quality === RunDetectorQualities.GOOD ? 'b-underline-good' : 'b-underline-bad'; |
Oops, something went wrong.