Skip to content

Commit a97cd09

Browse files
committed
[O2B-1523] Remove GAQ summary from overiew
Eliminated GAQ summary fetching and display from RunsPerDataPass and adjusted tests.
1 parent ac09487 commit a97cd09

File tree

3 files changed

+3
-50
lines changed

3 files changed

+3
-50
lines changed

lib/public/views/Runs/RunPerDataPass/RunsPerDataPassOverviewModel.js

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ export class RunsPerDataPassOverviewModel extends FixedPdpBeamTypeRunsOverviewMo
5555
this.registerDetectorsForQcFlagsDataExport(this._detectors$);
5656
this.registerObervablesQcSummaryDependesOn([this._detectors$]);
5757

58-
this._gaqSummary$ = new ObservableData(RemoteData.notAsked());
59-
this._gaqSummary$.bubbleTo(this);
60-
6158
this._markAsSkimmableRequestResult$ = new ObservableData(RemoteData.notAsked());
6259
this._markAsSkimmableRequestResult$.bubbleTo(this);
6360

@@ -119,7 +116,6 @@ export class RunsPerDataPassOverviewModel extends FixedPdpBeamTypeRunsOverviewMo
119116
return;
120117
}
121118

122-
this._fetchGaqSummary();
123119
await this._fetchDataPass().then(() =>
124120
this._dataPass$.getCurrent().match({
125121
Success: ({ skimmingStage, pdpBeamTypes }) => {
@@ -325,23 +321,6 @@ export class RunsPerDataPassOverviewModel extends FixedPdpBeamTypeRunsOverviewMo
325321
}
326322
}
327323

328-
/**
329-
* Fetch GAQ summary for given data pass
330-
* @return {Promise<void>} resolves once data are fetched
331-
*/
332-
async _fetchGaqSummary() {
333-
this._gaqSummary$.setCurrent(RemoteData.loading());
334-
try {
335-
const { data: gaqSummary } = await getRemoteData(buildUrl('/api/qcFlags/summary/gaq', {
336-
dataPassId: this._dataPassId,
337-
mcReproducibleAsNotBad: this._mcReproducibleAsNotBad,
338-
}));
339-
this._gaqSummary$.setCurrent(RemoteData.success(gaqSummary));
340-
} catch (error) {
341-
this._gaqSummary$.setCurrent(RemoteData.failure(error));
342-
}
343-
}
344-
345324
/**
346325
* Fetch skimmable runs for given data pass
347326
* @return {Promise<void>} resolves once data are fetched

lib/public/views/Runs/RunPerDataPass/RunsPerDataPassOverviewPage.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import { runNumbersFilter } from '../../../components/Filters/RunsFilter/runNumb
2525
import { qcSummaryLegendTooltip } from '../../../components/qcFlags/qcSummaryLegendTooltip.js';
2626
import { isRunNotSubjectToQc } from '../../../components/qcFlags/isRunNotSubjectToQc.js';
2727
import { frontLink } from '../../../components/common/navigation/frontLink.js';
28-
import { getQcSummaryDisplay } from '../ActiveColumns/getQcSummaryDisplay.js';
2928
import errorAlert from '../../../components/common/errorAlert.js';
3029
import { switchInput } from '../../../components/common/form/switchInput.js';
3130
import { PdpBeamType } from '../../../domain/enums/PdpBeamType.js';
@@ -103,7 +102,6 @@ export const RunsPerDataPassOverviewPage = ({
103102
detectors: remoteDetectors,
104103
dataPass: remoteDataPass,
105104
qcSummary: remoteQcSummary,
106-
gaqSummary: remoteGaqSummary,
107105
displayOptions,
108106
dataPassId,
109107
sortModel,
@@ -120,10 +118,10 @@ export const RunsPerDataPassOverviewPage = ({
120118

121119
return h(
122120
'.intermediate-flex-column',
123-
mergeRemoteData([remoteDataPass, remoteRuns, remoteDetectors, remoteQcSummary, remoteGaqSummary]).match({
121+
mergeRemoteData([remoteDataPass, remoteRuns, remoteDetectors, remoteQcSummary]).match({
124122
NotAsked: () => null,
125123
Failure: (errors) => errorAlert(errors),
126-
Success: ([dataPass, runs, detectors, qcSummary, gaqSummary]) => {
124+
Success: ([dataPass, runs, detectors, qcSummary]) => {
127125
const activeColumns = {
128126
...runsActiveColumns,
129127
...getInelasticInteractionRateColumns(pdpBeamTypes),
@@ -162,12 +160,7 @@ export const RunsPerDataPassOverviewPage = ({
162160
),
163161
visible: true,
164162
format: (_, { runNumber }) => {
165-
const runGaqSummary = gaqSummary[runNumber];
166-
167-
const gaqDisplay = runGaqSummary?.undefinedQualityPeriodsCount === 0
168-
? getQcSummaryDisplay(runGaqSummary)
169-
: h('button.btn.btn-primary.w-100', 'GAQ');
170-
163+
const gaqDisplay = h('button.btn.btn-primary.w-100', 'GAQ');
171164
return frontLink(gaqDisplay, 'gaq-flags', { dataPassId, runNumber });
172165
},
173166
filter: ({ filteringModel }) => numericalComparisonFilter(

test/public/runs/runsPerDataPass.overview.test.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,6 @@ module.exports = () => {
147147

148148
await expectInnerText(page, '#row106-globalAggregatedQuality', 'GAQ');
149149

150-
await expectInnerText(page, '#row107-globalAggregatedQuality', '76');
151-
expect(await getPopoverInnerText(await page.waitForSelector('#row107-globalAggregatedQuality .popover-trigger')))
152-
.to.be.equal('Missing 3 verifications');
153150
});
154151

155152
it('should ignore QC flags created by services in QC summaries of AOT and MUON ', async () => {
@@ -471,23 +468,7 @@ module.exports = () => {
471468
});
472469
}
473470

474-
it('should successfully apply gaqNotBadFraction filters', async () => {
475-
await navigateToRunsPerDataPass(page, 2, 1, 3);
476-
477-
await pressElement(page, '#openFilterToggle', true);
478-
479-
await page.waitForSelector('#gaqNotBadFraction-operator');
480-
await page.select('#gaqNotBadFraction-operator', '<=');
481-
await fillInput(page, '#gaqNotBadFraction-operand', '80', ['change']);
482-
await expectColumnValues(page, 'runNumber', ['107']);
483-
484-
await pressElement(page, '#mcReproducibleAsNotBadToggle input', true);
485-
await expectColumnValues(page, 'runNumber', []);
486471

487-
await pressElement(page, '#openFilterToggle', true);
488-
await pressElement(page, '#reset-filters', true);
489-
await expectColumnValues(page, 'runNumber', ['108', '107', '106']);
490-
});
491472

492473
it('should successfully apply detectors notBadFraction filters', async () => {
493474
await page.waitForSelector('#detectorsQc-for-1-notBadFraction-operator');

0 commit comments

Comments
 (0)