Skip to content

Commit 3cf6c1b

Browse files
author
GuustMetz
committed
feat: replace ddflp's filter component with the common radioButton componnent
1 parent 4790d30 commit 3cf6c1b

2 files changed

Lines changed: 2 additions & 32 deletions

File tree

lib/public/views/Runs/ActiveColumns/runsActiveColumns.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ export const runsActiveColumns = {
535535
classes: 'w-2 f6 w-wrapped',
536536
format: (boolean) => boolean ? 'On' : 'Off',
537537
exportFormat: (boolean) => boolean ? 'On' : 'Off',
538-
filter: dcsFilter,
538+
filter: ({ filteringModel }) => radioButtonFilter(filteringModel.get('dcs'), 'dcs'),
539539
},
540540
triggerValue: {
541541
name: 'TRG',

lib/public/views/Runs/Overview/RunsOverviewModel.js

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export class RunsOverviewModel extends OverviewPageModel {
9292
inelasticInteractionRateAtMid: new NumericalComparisonFilterModel(),
9393
inelasticInteractionRateAtEnd: new NumericalComparisonFilterModel(),
9494
ddflp: new RadioButtonFilterModel([{ label: 'ANY' }, { label: 'ON', value: true }, { label: 'OFF', value: false }]),
95+
dcs: new RadioButtonFilterModel([{ label: 'ANY' }, { label: 'ON', value: true }, { label: 'OFF', value: false }]),
9596
});
9697

9798
this._filteringModel.observe(() => this._applyFilters(true));
@@ -196,33 +197,6 @@ export class RunsOverviewModel extends OverviewPageModel {
196197
this._applyFilters();
197198
}
198199

199-
/**
200-
* Returns the boolean of dcs
201-
* @return {Boolean} if dcs is on
202-
*/
203-
getDcsFilterOperation() {
204-
return this.dcsFilter;
205-
}
206-
207-
/**
208-
* Sets the boolean of the filter if no new inputs were detected for 200 milliseconds
209-
* @param {boolean} operation if the dcs is on
210-
* @return {undefined}
211-
*/
212-
setDcsFilterOperation(operation) {
213-
this.dcsFilter = operation;
214-
this._applyFilters();
215-
}
216-
217-
/**
218-
* Unchecks the dcs checkbox and fetches all the runs.
219-
* @return {undefined}
220-
*/
221-
removeDcs() {
222-
this.dcsFilter = '';
223-
this._applyFilters();
224-
}
225-
226200
/**
227201
* Returns the boolean of epn
228202
* @return {Boolean} if epn is on
@@ -262,10 +236,6 @@ export class RunsOverviewModel extends OverviewPageModel {
262236
...this._triggerValuesFilters.size !== 0 && {
263237
'filter[triggerValues]': Array.from(this._triggerValuesFilters).join(),
264238
},
265-
'filter[ddflp]': this._filteringModel.get('ddflp').normalized,
266-
...(this.dcsFilter === true || this.dcsFilter === false) && {
267-
'filter[dcs]': this.dcsFilter,
268-
},
269239
...(this.epnFilter === true || this.epnFilter === false) && {
270240
'filter[epn]': this.epnFilter,
271241
},

0 commit comments

Comments
 (0)