Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
057c235
[O2B-1502] Filter model setup boilerplate code.
Houwie7000 Nov 26, 2025
a7a9eda
[O2B-1502] Add filter button on LHC-fills overview page.
Houwie7000 Nov 26, 2025
2648f1c
[O2B-1502] Added stable beams only to filter
Houwie7000 Nov 26, 2025
094e6c5
[O2B-1502] Filtering with Stable Beams Only works, radioButton elemen…
Houwie7000 Nov 26, 2025
da7ff37
[O2B-1502] Doc fixes
Houwie7000 Nov 26, 2025
ee72512
[O2B-1502] Increase timeout of detailsForSimulationPass test. Local m…
Houwie7000 Nov 26, 2025
96a04c0
[O2B-1502] Potential fix for test failure.
Houwie7000 Nov 28, 2025
6fa4034
Revert "[O2B-1502] Potential fix for test failure."
Houwie7000 Dec 1, 2025
17ea048
Merge branch 'main' into feature/O2B-1502/filtering-panel-lhc-fills-f…
graduta Dec 5, 2025
695622b
[O2B-1502] Processed feedback
Houwie7000 Dec 8, 2025
87bee89
[O2B-1502] Git failed to detect rename. Ran: git mv RadioButton.js ra…
Houwie7000 Dec 8, 2025
5a18d9e
[O2B-1502] Added test import
Houwie7000 Dec 8, 2025
4c530ef
Revert "[O2B-1502] Processed feedback"
Houwie7000 Dec 10, 2025
51b50d9
[O2B-1502] Cherry pick previous feedback changes
Houwie7000 Dec 10, 2025
c0c8559
[O2B-1502] Integrated stable beam only filter into filtermodel.
Houwie7000 Dec 10, 2025
9934e56
[O2B-1502] fixed stable beam default value
Houwie7000 Dec 10, 2025
f247a6f
[O2B-1502] Fixed logic and type
Houwie7000 Dec 11, 2025
9b67281
[O2B-1502] Don't set any defaults in the filter as it will conflict w…
Houwie7000 Dec 11, 2025
ea0880f
[O2B-1502] Code cleanup
Houwie7000 Dec 11, 2025
46d4ae8
[O2B-1502] minor changes, processed feedback
Houwie7000 Dec 15, 2025
91e350c
[O2B-1502] Removed duplicate function due to override
Houwie7000 Dec 15, 2025
e95c847
[O2B-1503] Added front end fill number filter
Houwie7000 Nov 27, 2025
5077fec
[O2B-1503] fillNumbers work, todo ranges
Houwie7000 Nov 28, 2025
9130c87
[O2B-1503] ranges accepted by fill numbers filter
Houwie7000 Nov 28, 2025
0d0986e
[O2B-1503] Added/fixed test lhc-fill overview
Houwie7000 Nov 28, 2025
804cd4c
[O2B-1503] doc change
Houwie7000 Nov 28, 2025
2f5932a
[O2B-1503] JSDoc enhancements. Extracted duplicate functions to utils…
Houwie7000 Dec 15, 2025
1e3f503
[O2B-1503] placeholder text changed
Houwie7000 Dec 15, 2025
de7d95b
[O2B-1505] Added beam duration filter to frontend
Houwie7000 Nov 28, 2025
cafcba1
[O2B-1505] added simple UI test
Houwie7000 Nov 28, 2025
4c28a84
[O2B-1505] Filter+DTO work
Houwie7000 Dec 1, 2025
a34340e
[O2B-1505] Beam duration filter works, TODO testing
Houwie7000 Dec 1, 2025
9921652
[O2B-1505] tests added/improv
Houwie7000 Dec 2, 2025
1c2fffb
[O2B-1505] Fixed tests
Houwie7000 Dec 2, 2025
d40bd5c
[O2B-1505] Cleanup, remove logs, docs
Houwie7000 Dec 2, 2025
d3c1ead
[O2B-1505] Fixed test
Houwie7000 Dec 8, 2025
fe5f6c7
[O2B-1505] Doc fixes
Houwie7000 Dec 8, 2025
7628bca
[O2B-1505] remove getStableBeamsOnly
Houwie7000 Dec 8, 2025
a533088
[O2B-1505] Fixed 00:00:00 bug, added test
Houwie7000 Dec 16, 2025
36bdd8d
[O2B-1506] Frontend run duration filter code
Houwie7000 Dec 2, 2025
b7fe810
[O2B-1506] Run duration filter tests + backend
Houwie7000 Dec 4, 2025
0751b57
[O2B-1506] Fixed GehAllLhcFillsUseCase run duration tests
Houwie7000 Dec 8, 2025
6f77e0c
[O2B-1506] Fixed 00:00:00 filter, added test to cover condition
Houwie7000 Dec 16, 2025
618daa1
[O2B-1508] Frontend Beams type filter working.
Houwie7000 Dec 8, 2025
8701246
[O2B-1508] Basic backend UseCase works
Houwie7000 Dec 8, 2025
e64d28f
[O2B-1508] Load possible beamstypes for the beam_type filter from the…
Houwie7000 Dec 10, 2025
19269b8
[O2B-1508] Beams types filter works with data from backend.
Houwie7000 Dec 11, 2025
18ea386
[O2B-1508] Handle beamtype 'null'. Added tests
Houwie7000 Dec 16, 2025
98e3701
[O2B-1509] Filtering by scheme name possible
Houwie7000 Dec 10, 2025
b239d29
[O2B-1509] Added tests, fixed existing tests
Houwie7000 Dec 10, 2025
690dbdb
[O2B-1509] Linting
Houwie7000 Dec 16, 2025
4a7fbdf
[O2B-1509] Undo bad test parameter
Houwie7000 Dec 16, 2025
8d5afe3
[O2B-1509] Undo wrongfully staged changes
Houwie7000 Dec 16, 2025
fd055ca
Merge branch 'main' into feature/O2B-1503/lhcfills-fill-numbers-filter
Houwie7000 Dec 17, 2025
6a47048
[O2B-1505] Processed feedback
Houwie7000 Dec 17, 2025
8e82b34
[O2B-1503] Processed feedback, added tests
Houwie7000 Dec 18, 2025
e5bbc05
[O2B-1503] Added test for splitStringToStringsTrimmed()
Houwie7000 Dec 18, 2025
668f90e
Merge branch 'feature/O2B-1503/lhcfills-fill-numbers-filter' into fea…
Houwie7000 Dec 18, 2025
a047600
Merge branch 'main' into feature/O2B-1505/lhcfills-beam-duration-filter
Houwie7000 Dec 18, 2025
7ce2103
Merge branch 'feature/O2B-1505/lhcfills-beam-duration-filter' into fe…
Houwie7000 Jan 5, 2026
f113473
[O2B-1505] Remove old code
Houwie7000 Jan 5, 2026
16246a0
Merge branch 'feature/O2B-1505/lhcfills-beam-duration-filter' into fe…
Houwie7000 Jan 5, 2026
d75c03e
[O2-1506] Process feedback from upstream
Houwie7000 Jan 5, 2026
bd1b836
[O2B-1505] Processed feedback, timeValidator JOI updated, debounce re…
Houwie7000 Jan 20, 2026
9e3bc30
Merge branch 'main' into feature/O2B-1505/lhcfills-beam-duration-filter
Houwie7000 Jan 20, 2026
3d2f665
Merge branch 'feature/O2B-1505/lhcfills-beam-duration-filter' into fe…
Houwie7000 Jan 20, 2026
a04fac2
[O2B-1506] Improvements from upstream integrated
Houwie7000 Jan 20, 2026
ff540af
[O2B-1505] Fixed validateTime error handling, removed unused code, TO…
Houwie7000 Jan 20, 2026
9e4e68c
[O2B-1505] processed feedback, empty id, code deduplication, bad doc
Houwie7000 Jan 21, 2026
0af9bdf
[O2B-1505] API + UI tests added
Houwie7000 Jan 21, 2026
45acea2
[O2B-1505] disable 00:00:00 conversion to null for DB
Houwie7000 Jan 21, 2026
fd057c2
Merge branch 'feature/O2B-1505/lhcfills-beam-duration-filter' into fe…
Houwie7000 Jan 21, 2026
4a4ed6d
[O2B-1505] typo removed
Houwie7000 Jan 21, 2026
ce6fb68
Merge branch 'feature/O2B-1505/lhcfills-beam-duration-filter' into fe…
Houwie7000 Jan 21, 2026
eca4ffa
[1506] WIP testing, usecase fixing
Houwie7000 Jan 21, 2026
133aa01
[O2B-1505] Removed outdated 00:00:00 usecase test
Houwie7000 Jan 21, 2026
191fd52
[O2B-1505] amountFilter -> durationFilter
Houwie7000 Jan 21, 2026
754f669
Merge branch 'feature/O2B-1505/lhcfills-beam-duration-filter' into fe…
Houwie7000 Jan 21, 2026
15e6a39
[1506] Changed the handling of >= 00:00:00 for the runDuration on lhc…
Houwie7000 Jan 21, 2026
78a2d12
Merge branch 'main' into feature/O2B-1506/lhcfills-run-duration-filter
Houwie7000 Jan 22, 2026
7b4f035
Merge branch 'feature/O2B-1506/lhcfills-run-duration-filter' into fea…
Houwie7000 Jan 22, 2026
1bdf8d0
[O2B-1506] fix outdated usecase test
Houwie7000 Jan 22, 2026
6a516b8
Merge branch 'feature/O2B-1506/lhcfills-run-duration-filter' into fea…
Houwie7000 Jan 22, 2026
2aec67f
[O2B-1508] Tests
Houwie7000 Jan 22, 2026
637ad11
[O2B-1506] Consolidated beam and run duration filter elements
Houwie7000 Jan 22, 2026
4e68523
[O2B-1506] Fixed > and < added tests
Houwie7000 Jan 22, 2026
8b726c6
Merge branch 'feature/O2B-1506/lhcfills-run-duration-filter' into fea…
Houwie7000 Jan 22, 2026
516bbbc
[O2B-1508] fixed test
Houwie7000 Jan 22, 2026
c6e6867
[O2B-1508] Linting, missing semicolon
Houwie7000 Jan 22, 2026
ff0b89e
Merge branch 'feature/O2B-1508/lhcfills-beam-types-filter' into featu…
Houwie7000 Jan 22, 2026
475c273
[O2B-1508] fixed api test
Houwie7000 Jan 22, 2026
30e7d5f
Merge branch 'feature/O2B-1508/lhcfills-beam-types-filter' into featu…
Houwie7000 Jan 22, 2026
da8ddd5
[O2B-1509] Added tests
Houwie7000 Jan 22, 2026
e301404
[O2B-1508] Refactor distinct beam types query in LhcFillRepository
isaachilly Jan 23, 2026
92c7f4f
[O2B-1508] Remove support for 'null' beamType filtering
isaachilly Jan 23, 2026
5737c58
[O2B-1509] Update 'schemename' to 'scheme name' in tests
isaachilly Jan 25, 2026
e000151
[O2B-1509] Update scheme name filter class and related tests
isaachilly Jan 25, 2026
8797eb6
[O2B-1508] Refactor and relocate beam types API and service logic to …
isaachilly Jan 27, 2026
17f361e
Merge branch 'main' into feature/O2B-1508/lhcfills-beam-types-filter
isaachilly Jan 27, 2026
cf3ebb0
[O2B-1508] Remove redundant change to operator
isaachilly Jan 28, 2026
38a9041
Merge branch 'main' into feature/O2B-1508/lhcfills-beam-types-filter
isaachilly Jan 28, 2026
8ff1398
[O2B-1508] Rename beamsType to beamType across codebase
isaachilly Jan 28, 2026
a0a8a98
[O2B-1508] Refactor BeamTypeFilterModel to use SelectionFilterModel
isaachilly Jan 28, 2026
466a839
Merge branch 'feature/O2B-1508/lhcfills-beam-types-filter' of github.…
isaachilly Jan 28, 2026
817164b
Merge branch 'main' into feature/O2B-1508/lhcfills-beam-types-filter
isaachilly Feb 5, 2026
1ec3173
[O2B-1508] Clean up beam type handling and unused code
isaachilly Feb 5, 2026
54dee2f
[O2B-1508] Improve beamType filter tests
isaachilly Feb 5, 2026
2050c41
[O2B-1508] HomePage had undetectable error in instantiating lhcfills …
isaachilly Feb 5, 2026
c037d16
Merge branch 'feature/O2B-1508/lhcfills-beam-types-filter' into featu…
isaachilly Feb 6, 2026
d631705
[O2B-1509] Use beamType naming, error in merge
isaachilly Feb 6, 2026
1c2c764
[O2B-1509] Fix merge import errors
isaachilly Feb 6, 2026
2c2ea4c
[O2B-1509] Merge fix again, renaming issues
isaachilly Feb 6, 2026
5e32d21
[O2B-1509] Remove redundant comments and blank lines
isaachilly Feb 6, 2026
f1f2c00
[O2B-1509] Limit schemeName to 64 chars in LhcFillsFilterDto
isaachilly Feb 9, 2026
3e42cff
Merge branch 'main' of github.com:AliceO2Group/Bookkeeping into featu…
graduta Feb 9, 2026
8797c74
Fix Lint
graduta Feb 9, 2026
11b2eec
Add missing new line
graduta Feb 9, 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
1 change: 1 addition & 0 deletions lib/domain/dtos/filters/LhcFillsFilterDto.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ exports.LhcFillsFilterDto = Joi.object({
}),
runDuration: validateTimeDuration,
beamDuration: validateTimeDuration,
schemeName: Joi.string().trim().max(64),
beamTypes: Joi.string()
.trim()
.custom(validateBeamTypes)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* @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 { rawTextFilter } from '../common/filters/rawTextFilter.js';

/**
* Component to filter LHC-fills by scheme name
*
* @param {RawTextFilterModel} filterModel the filter model
* @returns {Component} the text field
*/
export const schemeNameFilter = (filterModel) => rawTextFilter(
filterModel,
{ classes: ['w-100'], placeholder: 'e.g. Single_12b_8_1024_8_2018' },
);
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { toggleStableBeamOnlyFilter } from '../../../components/Filters/LhcFills
import { fillNumberFilter } from '../../../components/Filters/LhcFillsFilter/fillNumberFilter.js';
import { durationFilter } from '../../../components/Filters/LhcFillsFilter/durationFilter.js';
import { beamTypeFilter } from '../../../components/Filters/LhcFillsFilter/beamTypeFilter.js';
import { schemeNameFilter } from '../../../components/Filters/LhcFillsFilter/schemeNameFilter.js';

/**
* List of active columns for a lhc fills table
Expand Down Expand Up @@ -175,6 +176,7 @@ export const lhcFillsActiveColumns = {
visible: true,
size: 'w-10',
format: (value) => value ? value : '-',
filter: (lhcFillModel) => schemeNameFilter(lhcFillModel.filteringModel.get('schemeName')),
balloon: true,
},
runs: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export class LhcFillsOverviewModel extends OverviewPageModel {
runDuration: new TextComparisonFilterModel(),
hasStableBeams: new StableBeamFilterModel(),
beamTypes: new BeamTypeFilterModel(),
schemeName: new RawTextFilterModel(),
});

this._filteringModel.observe(() => this._applyFilters());
Expand Down
8 changes: 6 additions & 2 deletions lib/usecases/lhcFill/GetAllLhcFillsUseCase.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class GetAllLhcFillsUseCase {
let associatedStatisticsRequired = false;

if (filter) {
const { hasStableBeams, fillNumbers, beamDuration, runDuration, beamTypes } = filter;
const { hasStableBeams, fillNumbers, schemeName, beamDuration, runDuration, beamTypes } = filter;
if (hasStableBeams) {
// For now, if a stableBeamsStart is present, then a beam is stable
queryBuilder.where('stableBeamsStart').not().is(null);
Expand Down Expand Up @@ -81,7 +81,6 @@ class GetAllLhcFillsUseCase {
}
}

// Beam duration filter, limit and corresponding operator.
if (beamDuration?.limit !== undefined && beamDuration?.operator) {
queryBuilder.where('stableBeamsDuration').applyOperator(beamDuration.operator, beamDuration.limit);
}
Expand All @@ -90,6 +89,10 @@ class GetAllLhcFillsUseCase {
const beamTypesArray = beamTypes.split(',');
queryBuilder.where('beamType').oneOf(beamTypesArray);
}

if (schemeName) {
queryBuilder.where('filling_scheme_name').substring(schemeName);
}
}

const { count, rows } = await TransactionHelper.provide(async () => {
Expand Down Expand Up @@ -118,6 +121,7 @@ class GetAllLhcFillsUseCase {
rows[rowIndex].runs = [];
}
}

return {
count,
lhcFills: rows.map(lhcFillAdapter.toEntity),
Expand Down
22 changes: 22 additions & 0 deletions test/lib/usecases/lhcFill/GetAllLhcFillsUseCase.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,28 @@ module.exports = () => {
});
})

it('should only contain matching scheme name, one precise', async () => {
getAllLhcFillsDto.query = { filter: { hasStableBeams: true, schemeName: 'schemename' } };
const { lhcFills } = await new GetAllLhcFillsUseCase().execute(getAllLhcFillsDto);

expect(lhcFills).to.be.an('array').and.lengthOf(3)

lhcFills.forEach((lhcFill) => {
expect(lhcFill.fillingSchemeName).to.equal('schemename')
});
})

it('should only contain matching scheme name, one partial', async () => {
getAllLhcFillsDto.query = { filter: { schemeName: '25ns_2352b_2340_2004_2133' } };
const { lhcFills } = await new GetAllLhcFillsUseCase().execute(getAllLhcFillsDto);

expect(lhcFills).to.be.an('array').and.lengthOf(1)

lhcFills.forEach((lhcFill) => {
expect(lhcFill.fillingSchemeName).to.equal('25ns_2352b_2340_2004_2133_108bpi_24inj')
});
})

// Beam duration filter tests
it('should only contain specified stable beam durations, < 12:00:00', async () => {
getAllLhcFillsDto.query = { filter: { beamDuration: {limit: '43200', operator: '<'} } };
Expand Down
15 changes: 14 additions & 1 deletion test/public/lhcFills/overview.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ module.exports = () => {
const meanRunDurationExpect = { selector: 'tbody tr:nth-child(1) td:nth-child(6)', value: '01:40:00' };
const totalRunsDurationExpect = { selector: 'tbody tr:nth-child(1) td:nth-child(7)', value: '05:00:00' };
const efficiencyExpect = { selector: 'tbody tr:nth-child(1) td:nth-child(8)', value: '41.67%' };
const schemeNameExpect = { selector: '#row6-fillingSchemeName > div:nth-child(1) > div:nth-child(1)', value: 'Single_12b_8_1024_8_2018'};

await goToPage(page, 'lhc-fill-overview');

Expand All @@ -265,6 +266,7 @@ module.exports = () => {
await expectInnerText(page, meanRunDurationExpect.selector, meanRunDurationExpect.value);
await expectInnerText(page, totalRunsDurationExpect.selector, totalRunsDurationExpect.value);
await expectInnerText(page, efficiencyExpect.selector, efficiencyExpect.value);
await expectInnerText(page, schemeNameExpect.selector, schemeNameExpect.value);
});

it('should successfully display filter elements', async () => {
Expand All @@ -276,7 +278,7 @@ module.exports = () => {
const filterRunDurationPlaceholderExpect = {selector: '#run-duration-filter-operand', value: 'e.g 16:14:15 (HH:MM:SS)'};
const filterSBDurationOperatorExpect = { value: true };
const filterBeamTypeExpect = {selector: 'div.flex-row:nth-child(5) > div:nth-child(1)', value: 'Beam Type'}

const filterSchemeNamePlaceholderExpect = {selector: '.fillingSchemeName-filter input', value: 'e.g. Single_12b_8_1024_8_2018'}

await goToPage(page, 'lhc-fill-overview');
// Open the filtering panel
Expand All @@ -290,6 +292,7 @@ module.exports = () => {
await expectInnerText(page, filterRunDurationExpect.selector, filterRunDurationExpect.value);
await expectAttributeValue(page, filterRunDurationPlaceholderExpect.selector, 'placeholder', filterRunDurationPlaceholderExpect.value);
await expectInnerText(page, filterBeamTypeExpect.selector, filterBeamTypeExpect.value);
await expectAttributeValue(page, filterSchemeNamePlaceholderExpect.selector, 'placeholder', filterSchemeNamePlaceholderExpect.value);
});

it('should successfully un-apply Stable Beam filter menu', async () => {
Expand Down Expand Up @@ -350,4 +353,14 @@ module.exports = () => {
await pressElement(page, filterBeamTypePb_Pb);
await waitForTableLength(page, 2);
});

it('should successfully apply scheme name filter', async () => {
const filterSchemeNameInputField= '.fillingSchemeName-filter input';
await goToPage(page, 'lhc-fill-overview');
await waitForTableLength(page, 5);

await openFilteringPanel(page);
await fillInput(page, filterSchemeNameInputField, 'Single_12b_8_1024_8_2018', ['change']);
await waitForTableLength(page, 1);
});
};
Loading