diff --git a/lib/public/views/QcFlags/ActiveColumns/qcFlagsActiveColumns.js b/lib/public/views/QcFlags/ActiveColumns/qcFlagsActiveColumns.js index 6dfca4ea61..ba3adc83d4 100644 --- a/lib/public/views/QcFlags/ActiveColumns/qcFlagsActiveColumns.js +++ b/lib/public/views/QcFlags/ActiveColumns/qcFlagsActiveColumns.js @@ -11,11 +11,8 @@ * or submit itself to any jurisdiction. */ -import { iconWarning } from '/js/src/index.js'; -import { tooltip } from '../../../components/common/popover/tooltip.js'; import { formatTimestamp } from '../../../utilities/formatting/formatTimestamp.js'; import { qcFlagTypeColoredBadge } from '../common/qcFlagTypeColoredBadge.js'; -import { formatFloat } from '../../../utilities/formatting/formatFloat.js'; /** * Active columns configuration for QC flags table @@ -43,16 +40,6 @@ export const qcFlagsActiveColumns = { : 'Whole run coverage', }, - effectivePart: { - name: 'eff. part (%)', - visible: true, - format: (effectivePart) => effectivePart > 0 - ? formatFloat( - 100 * effectivePart, - { precision: 1 }, - ) - : tooltip(iconWarning(), 'Flag is discarded'), - }, comment: { name: 'Comment', visible: true, diff --git a/lib/public/views/Runs/ActiveColumns/runDetectorsAsyncQcActiveColumns.js b/lib/public/views/Runs/ActiveColumns/runDetectorsAsyncQcActiveColumns.js index 42d077376f..f908412155 100644 --- a/lib/public/views/Runs/ActiveColumns/runDetectorsAsyncQcActiveColumns.js +++ b/lib/public/views/Runs/ActiveColumns/runDetectorsAsyncQcActiveColumns.js @@ -12,44 +12,6 @@ */ import { h } from '/js/src/index.js'; import { frontLink } from '../../../components/common/navigation/frontLink.js'; -import { formatFloat } from '../../../utilities/formatting/formatFloat.js'; - -/** - * Render QC summary for given run and detector - * @param {number} runNumber run numbrt - * @param {number} dplDetectorId id of the detector - * @param {QcSummary} qcSummary QC summary - * @return {Component} component - */ -const runDetectorAsyncQualityDisplay = (runNumber, dplDetectorId, qcSummary) => { - if (!qcSummary?.[runNumber]?.[dplDetectorId]) { - return h('.btn.white.bg-primary', 'QC'); - } - - const { - badEffectiveRunCoverage = null, - explicitlyNotBadEffectiveRunCoverage = null, - missingVerificationsCount = 0, - } = qcSummary[runNumber][dplDetectorId]; - - const notBadPercentageFormat = h('', [ - formatFloat((1 - badEffectiveRunCoverage) * 100, { precision: 0 }), - missingVerificationsCount ? h('sub', `!${missingVerificationsCount}`) : null, - ]); - if (!badEffectiveRunCoverage) { - if (explicitlyNotBadEffectiveRunCoverage === 1) { - return h('.bg-success.black.btn', notBadPercentageFormat); - } else { - return h('.bg-gray.black.btn', notBadPercentageFormat); - } - } else { - if (badEffectiveRunCoverage === 1) { - return h('.bg-danger.black.btn', notBadPercentageFormat); - } else { - return h('.bg-warning.black.btn', notBadPercentageFormat); - } - } -}; /** * Factory for detectors related active columns configuration @@ -60,7 +22,7 @@ const runDetectorAsyncQualityDisplay = (runNumber, dplDetectorId, qcSummary) => * @param {number} [options.simulationPassId] if provided a cell become link to QC flag page for given simulation pass * @return {object} active columns configuration */ -export const createRunDetectorsAsyncQcActiveColumns = (dplDetectors, { profiles, dataPassId, simulationPassId, qcSummary } = {}) => +export const createRunDetectorsAsyncQcActiveColumns = (dplDetectors, { profiles, dataPassId, simulationPassId } = {}) => Object.fromEntries(dplDetectors?.map(({ name: detectorName, id: dplDetectorId }) => [ detectorName, { name: detectorName.toUpperCase(), @@ -74,8 +36,7 @@ export const createRunDetectorsAsyncQcActiveColumns = (dplDetectors, { profiles, if (!detectorWasActiveDuringRun) { return null; } - - const detectorQualityDisplay = runDetectorAsyncQualityDisplay(run.runNumber, dplDetectorId, qcSummary); + const detectorQualityDisplay = h('.btn.white.bg-primary', 'QC'); if (dataPassId) { return frontLink( diff --git a/lib/public/views/Runs/RunPerDataPass/RunsPerDataPassOverviewModel.js b/lib/public/views/Runs/RunPerDataPass/RunsPerDataPassOverviewModel.js index ddd0881edc..f2e18b389c 100644 --- a/lib/public/views/Runs/RunPerDataPass/RunsPerDataPassOverviewModel.js +++ b/lib/public/views/Runs/RunPerDataPass/RunsPerDataPassOverviewModel.js @@ -16,7 +16,6 @@ import { RunsOverviewModel } from '../Overview/RunsOverviewModel.js'; import { ObservableData } from '../../../utilities/ObservableData.js'; import { getRemoteDataSlice } from '../../../utilities/fetch/getRemoteDataSlice.js'; import { dplDetectorsProvider } from '../../../services/detectors/dplDetectorsProvider.js'; -import { getRemoteData } from '../../../utilities/fetch/getRemoteData.js'; /** * Runs Per Data Pass overview model @@ -32,8 +31,6 @@ export class RunsPerDataPassOverviewModel extends RunsOverviewModel { this._detectors$.bubbleTo(this); this._dataPass = new ObservableData(RemoteData.notAsked()); this._dataPass.bubbleTo(this); - this._qcSummary$ = new ObservableData(RemoteData.NotAsked()); - this._qcSummary$.bubbleTo(this); } /** @@ -50,20 +47,6 @@ export class RunsPerDataPassOverviewModel extends RunsOverviewModel { } } - /** - * Fetch QC summaries for given data pass - * @return {Promise} promise - */ - async _fetchQcSummary() { - this._qcSummary$.setCurrent(RemoteData.loading()); - try { - const { data: qcSummary } = await getRemoteData(buildUrl('/api/qcFlags/perDataPass/summary', { dataPassId: this._dataPassId })); - this._qcSummary$.setCurrent(RemoteData.success(qcSummary)); - } catch (error) { - this._qcSummary$.setCurrent(RemoteData.failure(error)); - } - } - // eslint-disable-next-line valid-jsdoc /** * @inheritdoc @@ -73,7 +56,6 @@ export class RunsPerDataPassOverviewModel extends RunsOverviewModel { return; } this._fetchDataPass(); - this._fetchQcSummary(); super.load(); } @@ -110,12 +92,4 @@ export class RunsPerDataPassOverviewModel extends RunsOverviewModel { get detectors() { return this._detectors$.getCurrent(); } - - /** - * QC summary getter - * @return {RemoteData} qcsummary - */ - get qcSummary() { - return this._qcSummary$.getCurrent(); - } } diff --git a/lib/public/views/Runs/RunPerDataPass/RunsPerDataPassOverviewPage.js b/lib/public/views/Runs/RunPerDataPass/RunsPerDataPassOverviewPage.js index 23f27f1710..1ac5b1a30d 100644 --- a/lib/public/views/Runs/RunPerDataPass/RunsPerDataPassOverviewPage.js +++ b/lib/public/views/Runs/RunPerDataPass/RunsPerDataPassOverviewPage.js @@ -40,12 +40,7 @@ export const RunsPerDataPassOverviewPage = ({ runs: { perDataPassOverviewModel } PAGE_USED_HEIGHT, )); - const { - items: remoteRuns, - detectors: remoteDetectors, - dataPass: remoteDataPass, - qcSummary: remoteQcSummary, - } = perDataPassOverviewModel; + const { items: remoteRuns, detectors: remoteDetectors, dataPass: remoteDataPass } = perDataPassOverviewModel; const activeColumns = { ...runsActiveColumns, @@ -70,10 +65,6 @@ export const RunsPerDataPassOverviewPage = ({ runs: { perDataPassOverviewModel } Success: (dataPass) => dataPass.id, Other: () => null, }), - qcSummary: remoteQcSummary.match({ - Success: (qcSummary) => qcSummary, - Other: () => null, - }), }), }; diff --git a/lib/public/views/Runs/RunsPerSimulationPass/RunsPerSimulationPassOverviewModel.js b/lib/public/views/Runs/RunsPerSimulationPass/RunsPerSimulationPassOverviewModel.js index 7f2d2fec35..0954808b4e 100644 --- a/lib/public/views/Runs/RunsPerSimulationPass/RunsPerSimulationPassOverviewModel.js +++ b/lib/public/views/Runs/RunsPerSimulationPass/RunsPerSimulationPassOverviewModel.js @@ -31,8 +31,6 @@ export class RunsPerSimulationPassOverviewModel extends RunsOverviewModel { this._detectors$.bubbleTo(this); this._simulationPass$ = new ObservableData(RemoteData.notAsked()); this._simulationPass$.bubbleTo(this); - this._qcSummary$ = new ObservableData(RemoteData.NotAsked()); - this._qcSummary$.bubbleTo(this); } /** @@ -49,29 +47,11 @@ export class RunsPerSimulationPassOverviewModel extends RunsOverviewModel { } } - /** - * Fetch QC summaries for given data pass - * @return {Promise} promise - */ - async _fetchQcSummary() { - this._qcSummary$.setCurrent(RemoteData.loading()); - try { - const { data: qcSummary } = await getRemoteData(buildUrl( - '/api/qcFlags/perSimulationPass/summary', - { simulationPassId: this._simulationPassId }, - )); - this._qcSummary$.setCurrent(RemoteData.success(qcSummary)); - } catch (error) { - this._qcSummary$.setCurrent(RemoteData.failure(error)); - } - } - // eslint-disable-next-line valid-jsdoc /** * @inheritdoc */ async load() { - this._fetchQcSummary(); this._fetchSimulationPass(); super.load(); } @@ -113,12 +93,4 @@ export class RunsPerSimulationPassOverviewModel extends RunsOverviewModel { get detectors() { return this._detectors$.getCurrent(); } - - /** - * QC summary getter - * @return {RemoteData} qcsummary - */ - get qcSummary() { - return this._qcSummary$.getCurrent(); - } } diff --git a/lib/public/views/Runs/RunsPerSimulationPass/RunsPerSimulationPassOverviewPage.js b/lib/public/views/Runs/RunsPerSimulationPass/RunsPerSimulationPassOverviewPage.js index 9a9e3a1b39..a11032c810 100644 --- a/lib/public/views/Runs/RunsPerSimulationPass/RunsPerSimulationPassOverviewPage.js +++ b/lib/public/views/Runs/RunsPerSimulationPass/RunsPerSimulationPassOverviewPage.js @@ -41,12 +41,7 @@ export const RunsPerSimulationPassOverviewPage = ({ PAGE_USED_HEIGHT, )); - const { - items: remoteRuns, - detectors: remoteDetectors, - simulationPass: remoteSimulationPass, - qcSummary: remoteQcSummary, - } = runsPerSimulationPassOverviewModel; + const { items: remoteRuns, detectors: remoteDetectors, simulationPass: remoteSimulationPass } = runsPerSimulationPassOverviewModel; const activeColumns = { ...runsActiveColumns, @@ -71,10 +66,6 @@ export const RunsPerSimulationPassOverviewPage = ({ Success: (simulationPass) => simulationPass.id, Other: () => null, }), - qcSummary: remoteQcSummary.match({ - Success: (qcSummary) => qcSummary, - Other: () => null, - }), }), };