-
Notifications
You must be signed in to change notification settings - Fork 22
[O2B-1240] Display only physical productions by default and adds filtering for 'test' and 'debug' productions display #1940
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
xsalonx
merged 29 commits into
main
from
xsalonx/O2B-1240/display-only-physical-productions
Jul 30, 2025
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
362514d
add logic on backend
xsalonx 822a88d
wip
xsalonx 38b082d
wip
xsalonx 58ae973
add filter
xsalonx c59a327
user enum
xsalonx e06a941
refactor WIP
xsalonx f583422
w
xsalonx 08c6c54
fix sorting
xsalonx 68824c8
cleanup
xsalonx 44bbe8f
api test
xsalonx bba5117
api test
xsalonx bc1ced5
ui test
xsalonx e9d2073
fix
xsalonx 5eb8b9d
Merge branch 'main' into xsalonx/O2B-1240/display-only-physical-produ…
xsalonx fae76be
fix counting
xsalonx 26f87fe
fix test
xsalonx 7cc7024
refactor test
xsalonx 8261abe
use getter
xsalonx 1e0009c
raw
xsalonx 753f38b
refactor
xsalonx 994e9f0
refactor
xsalonx bacc257
cleanup
xsalonx 3b2999d
cleanup
xsalonx ec9684a
cleanup
xsalonx 0e66a57
docs
xsalonx 299010e
fix tesT
xsalonx bd428ce
Merge branch 'main' into xsalonx/O2B-1240/display-only-physical-produ…
xsalonx 73888ba
fixeD
xsalonx bbb4f67
Merge branch 'main' into xsalonx/O2B-1240/display-only-physical-produ…
xsalonx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,22 @@ | ||
| /** | ||
| * @license | ||
| * Copyright 2019-2020 CERN and copyright holders of ALICE O2. | ||
| * See http://alice-o2.web.cern.ch/copyright for details of the copyright holders. | ||
| * All rights not expressly granted are reserved. | ||
| * | ||
| * This software is distributed under the terms of the GNU General Public | ||
| * License v3 (GPL Version 3), copied verbatim in the file "COPYING". | ||
| * | ||
| * 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 NonPhysicsProductionsNamesWords = Object.freeze({ | ||
| TEST: 'test', | ||
| DEBUG: 'debug', | ||
| }); | ||
|
|
||
| module.exports.NonPhysicsProductionsNamesWords = NonPhysicsProductionsNamesWords; | ||
|
|
||
| module.exports.NON_PHYSICS_PRODUCTIONS_NAMES_WORDS = Object.values(NonPhysicsProductionsNamesWords); |
This file contains hidden or 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 hidden or 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 hidden or 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
20 changes: 20 additions & 0 deletions
20
lib/public/domain/enums/NonPhysicsProductionsNamesWords.js
This file contains hidden or 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,20 @@ | ||
| /** | ||
| * @license | ||
| * Copyright 2019-2020 CERN and copyright holders of ALICE O2. | ||
| * See http://alice-o2.web.cern.ch/copyright for details of the copyright holders. | ||
| * All rights not expressly granted are reserved. | ||
| * | ||
| * This software is distributed under the terms of the GNU General Public | ||
| * License v3 (GPL Version 3), copied verbatim in the file "COPYING". | ||
| * | ||
| * 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. | ||
| */ | ||
|
|
||
| export const NonPhysicsProductionsNamesWords = Object.freeze({ | ||
| TEST: 'test', | ||
| DEBUG: 'debug', | ||
| }); | ||
|
|
||
| export const NON_PHYSICS_PRODUCTIONS_NAMES_WORDS = Object.values(NonPhysicsProductionsNamesWords); |
This file contains hidden or 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,42 @@ | ||
| /** | ||
| * @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. | ||
| */ | ||
|
|
||
| /** | ||
| * Expand query-like formatted keys of a object { a[b][c]: x } to { a: { b: { c: x } } } | ||
| * | ||
| * @param {object} obj a object | ||
| * @return {object} obj | ||
| */ | ||
| export function expandQueryLikeNestedKey(obj) { | ||
| const result = {}; | ||
|
|
||
| for (const nestedKey in obj) { | ||
| const value = obj[nestedKey]; | ||
| const subKeys = nestedKey.split(/[[\]]/).filter(Boolean); | ||
|
|
||
| let currentNestedObj = result; | ||
| for (let i = 0; i < subKeys.length; i++) { | ||
| const key = subKeys[i]; | ||
| if (i === subKeys.length - 1) { | ||
| currentNestedObj[key] = value; | ||
| } else { | ||
| if (!(key in currentNestedObj)) { | ||
| currentNestedObj[key] = {}; | ||
| } | ||
| currentNestedObj = currentNestedObj[key]; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| return result; | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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,69 @@ | ||
| /** | ||
| * @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 { FilteringModel } from '../../components/Filters/common/FilteringModel.js'; | ||
| import { SelectionFilterModel } from '../../components/Filters/common/filters/SelectionFilterModel.js'; | ||
| import { TextTokensFilterModel } from '../../components/Filters/common/filters/TextTokensFilterModel.js'; | ||
| import { NON_PHYSICS_PRODUCTIONS_NAMES_WORDS } from '../../domain/enums/NonPhysicsProductionsNamesWords.js'; | ||
| import { OverviewPageModel } from '../../models/OverviewModel.js'; | ||
|
|
||
| /** | ||
| * Data Passes overview model | ||
| */ | ||
| export class DataPassesOverviewModel extends OverviewPageModel { | ||
| /** | ||
| * Constructor | ||
| */ | ||
| constructor() { | ||
| super(); | ||
| this._filteringModel = new FilteringModel({ | ||
| names: new TextTokensFilterModel(), | ||
| 'include[byName]': new SelectionFilterModel({ | ||
| availableOptions: NON_PHYSICS_PRODUCTIONS_NAMES_WORDS.map((word) => ({ label: word.toUpperCase(), value: word })), | ||
| }), | ||
| }); | ||
|
|
||
| this._filteringModel.visualChange$.bubbleTo(this); | ||
| this._filteringModel.observe(() => { | ||
| this._pagination.currentPage = 1; | ||
| this.load(); | ||
| }); | ||
| } | ||
|
|
||
| /** | ||
| * Return filter params of base model | ||
| * | ||
| * @return {object} filter | ||
| */ | ||
| getFilterParams() { | ||
|
graduta marked this conversation as resolved.
|
||
| return this._filteringModel.normalized; | ||
| } | ||
|
|
||
| /** | ||
| * Reset this model to its default | ||
| * | ||
| * @returns {void} | ||
| */ | ||
| reset() { | ||
| this._filteringModel.reset(); | ||
| super.reset(); | ||
| } | ||
|
|
||
| /** | ||
| * Return the filtering model | ||
| * | ||
| * @return {FilteringModel} the filtering model | ||
| */ | ||
| get filteringModel() { | ||
| return this._filteringModel; | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.