Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
30d7b39
rename te bad filter to be a generic component
Mar 10, 2026
bdba964
feat: replace qcFlagType bad filter with radioButtonFilterModel
Mar 10, 2026
4790d30
feat: replace ddflp's filter component with the common radiButton com…
Mar 10, 2026
3cf6c1b
feat: replace ddflp's filter component with the common radioButton co…
Mar 10, 2026
17a4ce8
feat: replace epn's filter component with the common radioButton comp…
Mar 10, 2026
1cd5603
feat: replace triggerValue's filter component with the standard selec…
Mar 10, 2026
4cea58d
chore: remove unused components
Mar 11, 2026
cf342ea
Merge branch 'improv/O2B-1547/Migrate-LhcPeriodOverviewModel-to-use-F…
Mar 12, 2026
aded3af
rename triggerValue checkboxes to include the triggerValue name
Apr 2, 2026
fa199de
feat: create ToggleFilterModel
Apr 9, 2026
47c0105
revamp the stableBeamFilter to be more general for toggles
Apr 9, 2026
0c3f701
rename stableBeamFilter to toggleFilter
Apr 9, 2026
1333c45
feat: turn mcReproducibleNotAsBad into a toggleFilter
Apr 15, 2026
1365033
chore: remove mcreprodicebleAsNotBadToggle.js
Apr 15, 2026
39d282a
add optional ID to togglefilter.js
Apr 15, 2026
306d3d0
feat: create gaqFilterModel
Apr 15, 2026
7d7f6c9
feat: replace 'gaq[notBadFraction]' with a gaqFilterModel
Apr 15, 2026
accd756
feat: create MultiCompositionFilterModel
Apr 15, 2026
d7d6177
improve MultiCompositionFiltermodel
Apr 15, 2026
6df07ff
change tests to be compatible with the mc filter now being clearable
Apr 15, 2026
95773bd
feat: flatten the detectorsQc[id][NotBadFraction] to detectorsQcNotBa…
Apr 16, 2026
2ca9a26
test: update api tests for the new flat detectorsQcNotBadFraction name
Apr 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/domain/dtos/filters/RunFilterDto.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ exports.RunFilterDto = Joi.object({
mcReproducibleAsNotBad: Joi.boolean().optional(),
}),

detectorsQc: Joi.object()
detectorsQcNotBadFraction: Joi.object()
.pattern(
Joi.string().regex(/^_\d+$/), // Detector id with '_' prefix
Joi.object({ notBadFraction: FloatComparisonDto }),
FloatComparisonDto,
)
.keys({
mcReproducibleAsNotBad: Joi.boolean().optional(),
Expand Down

This file was deleted.

This file was deleted.

79 changes: 79 additions & 0 deletions lib/public/components/Filters/RunsFilter/GaqFilterModel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/**
* @license
* Copyright CERN and copyright holders of ALICE Trg. 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-Trg.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 { FilterModel } from '../common/FilterModel.js';
import { NumericalComparisonFilterModel } from '../common/filters/NumericalComparisonFilterModel.js';

/**
* Time-range filter model
*/
export class GaqFilterModel extends FilterModel {
/**
* Constructor
* @param {ToggleFilterModel} mcReproducibleAsNotBad model that determines if a 'not bad' status was reproduceable for a Monte Carlo.
* This param is required as many other filters models need to make use of the same ToggleFilterModel instance
*/
constructor(mcReproducibleAsNotBad) {
super();

this._notBadFraction = new NumericalComparisonFilterModel({ scale: 0.01, integer: false });
this._addSubmodel(this._notBadFraction);
this._mcReproducibleAsNotBad = mcReproducibleAsNotBad;
this._addSubmodel(this._mcReproducibleAsNotBad);
}

/**
* @inheritDoc
*/
reset() {
this._notBadFraction.reset();
}

/**
* @inheritDoc
*/
get isEmpty() {
return this._notBadFraction.isEmpty;
}

/**
* @inheritDoc
*/
get normalized() {
const normalized = { notBadFraction: this._notBadFraction.normalized };

if (!this.isEmpty) {
normalized.mcReproducibleAsNotBad = this._mcReproducibleAsNotBad.isToggled();
}

return normalized;
}

/**
* Return the underlying notBadFraction model
*
* @return {NumericalComparisonFilterModel} the filter model
*/
get notBadFraction() {
return this._notBadFraction;
}

/**
* Return the underlying mcReproducibleAsNotBad model
*
* @return {ToggleFilterModel} the filter model
*/
get mcReproducibleAsNotBad() {
return this._mcReproducibleAsNotBad;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
/**
* @license
* Copyright CERN and copyright holders of ALICE Trg. 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-Trg.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 { FilterModel } from '../common/FilterModel.js';

/**
* Time-range filter model
*/
export class MultiCompositionFilterModel extends FilterModel {
/**
* Constructor
* @param {Object<string|number, FilterModel|SelectionModel>} filters the filters that will make up the composite filter
*/
constructor(filters = {}) {
super();

/**
* @type {Object<string|number, FilterModel|SelectionModel>}
*/
this._filters = {};

Object.entries(filters).forEach(([key, filter]) => this.putFilter(key, filter));
}

/**
* Return a subfilter by key
*
* @param {string} key the key of the subfilter
* @return {FilterModel} the subfilter
*/
putFilter(key, filterModel) {
if (key in this._filters) {
return;
}

this._filters[key] = filterModel;
this._addSubmodel(filterModel);
}

/**
* Add new subfilter
*
* @param {string} key key of the subfilter
* @param {FilterModel} filter the the subfilter
*/
getFilter(key) {
if (!(key in this._filters)) {
throw new Error(`No filter found with key ${key}`);
}

return this._filters[key];
}

/**
* @inheritDoc
*/
reset() {
Object.values(this._filters).forEach((filter) => filter.reset());
}

/**
* @inheritDoc
*/
get isEmpty() {
return Object.values(this._filters).every((filter) => filter.isEmpty);
}

/**
* @inheritDoc
*/
get normalized() {
const normalized = {};

for (const [id, detector] of Object.entries(this._filters)) {
if (!detector.isEmpty) {
normalized[id] = detector.normalized;
}
}

return normalized;
}
}
50 changes: 0 additions & 50 deletions lib/public/components/Filters/RunsFilter/dcs.js

This file was deleted.

Loading
Loading