Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,14 @@ export class RunsPerLhcPeriodOverviewModel extends FixedPdpBeamTypeRunsOverviewM
this._lhcPeriodId = null;
this._lhcPeriodStatistics$ = new ObservableData(RemoteData.notAsked());

this._syncDetectors$ = this._setDetectorsObservable(
this._detectors$ = this._setDetectorsObservable(
[rctDetectorsProvider.qc$, this._lhcPeriodStatistics$],
([detectors, lhcPeriodStatistics]) => {
const filteredDetectors = filterOutLegacyDetectorsForNewerPeriods(detectors, lhcPeriodStatistics.lhcPeriod.name);

return filteredDetectors.filter(({ type }) => [DetectorType.PHYSICAL, DetectorType.MUON_GLO].includes(type));
},
);
this._detectors$ = this._syncDetectors$;
this._lhcPeriodStatistics$.bubbleTo(this);
}

Expand Down Expand Up @@ -74,8 +73,8 @@ export class RunsPerLhcPeriodOverviewModel extends FixedPdpBeamTypeRunsOverviewM
Other: () => null,
});

this.registerDetectorsForQcFlagsDataExport(this._syncDetectors$);
this.registerObservablesQcSummaryDependsOn(this._syncDetectors$);
this.registerDetectorsForQcFlagsDataExport(this._detectors$);
this.registerObservablesQcSummaryDependsOn(this._detectors$);

super.load();
}
Expand All @@ -95,20 +94,11 @@ export class RunsPerLhcPeriodOverviewModel extends FixedPdpBeamTypeRunsOverviewM
return this._lhcPeriodStatistics$.getCurrent();
}

/**
* Get all detectors for synchronous QC flags
*
* @return {RemoteData<Detector[]>} detectors
*/
get syncDetectors() {
return this._syncDetectors$.getCurrent();
}

/**
* @inheritdoc
*/
get detectors() {
return this._syncDetectors$.getCurrent();
return this._detectors$.getCurrent();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const RunsPerLhcPeriodOverviewPage = ({ runs: { perLhcPeriodOverviewModel
const {
items: remoteRuns,
lhcPeriodStatistics: remoteLhcPeriodStatistics,
syncDetectors: remoteSyncDetectors,
detectors: remoteDetectors,
displayOptions,
sortModel,
mcReproducibleAsNotBad,
Expand Down Expand Up @@ -115,10 +115,10 @@ export const RunsPerLhcPeriodOverviewPage = ({ runs: { perLhcPeriodOverviewModel
Failure: (errors) => errorAlert(errors),
Loading: () => spinner(),
Success: () => [
mergeRemoteData([remoteSyncDetectors, remoteQcSummary]).match({
Success: ([syncDetectors, synchronousQcSummary]) => getTableWithGivenDetectorsColumns(
mergeRemoteData([remoteDetectors, remoteQcSummary]).match({
Success: ([detectors, synchronousQcSummary]) => getTableWithGivenDetectorsColumns(
activeColumns,
runDetectorsQualitiesAndSyncQcActiveColumns(syncDetectors, {
runDetectorsQualitiesAndSyncQcActiveColumns(detectors, {
profiles: 'runsPerLhcPeriod',
qcSummary: synchronousQcSummary,
}),
Expand Down
Loading