1111 * or submit itself to any jurisdiction.
1212 */
1313import { FilteringModel } from '../../../components/Filters/common/FilteringModel.js' ;
14+ import { SelectionFilterModel } from '../../../components/Filters/common/filters/SelectionFilterModel.js' ;
1415import { TextTokensFilterModel } from '../../../components/Filters/common/filters/TextTokensFilterModel.js' ;
16+ import { NON_PHYSICS_PRODUCTIONS_NAMES_WORDS , NonPhysicsProductionsNamesWords } from '../../../domain/enums/NonPhysicsProductionsNamesWords.js' ;
1517import { OverviewPageModel } from '../../../models/OverviewModel.js' ;
1618import { buildUrl } from '/js/src/index.js' ;
1719
@@ -26,6 +28,9 @@ export class DataPassesPerLhcPeriodOverviewModel extends OverviewPageModel {
2628 super ( ) ;
2729 this . _filteringModel = new FilteringModel ( {
2830 names : new TextTokensFilterModel ( ) ,
31+ nonPhysics : new SelectionFilterModel ( {
32+ availableOptions : NON_PHYSICS_PRODUCTIONS_NAMES_WORDS . map ( ( word ) => ( { label : word . toUpperCase ( ) , value : word } ) ) ,
33+ } ) ,
2934 } ) ;
3035
3136 this . _filteringModel . visualChange$ . bubbleTo ( this ) ;
@@ -47,10 +52,13 @@ export class DataPassesPerLhcPeriodOverviewModel extends OverviewPageModel {
4752 * @inheritdoc
4853 */
4954 getRootEndpoint ( ) {
55+ const nonPhysicsSelectionModel = this . _filteringModel . get ( 'nonPhysics' ) . selectionModel ;
5056 const params = {
5157 filter : {
5258 lhcPeriodIds : [ this . _lhcPeriodId ] ,
5359 names : this . _filteringModel . get ( 'names' ) . normalized ,
60+ includeTest : nonPhysicsSelectionModel . selected . includes ( NonPhysicsProductionsNamesWords . TEST ) ,
61+ includeDebug : nonPhysicsSelectionModel . selected . includes ( NonPhysicsProductionsNamesWords . DEBUG ) ,
5462 } ,
5563 } ;
5664
0 commit comments