Skip to content

Commit b3baf82

Browse files
author
GuustMetz
committed
implment header table loading separation for runsperSimulationPassOverviewpAGE
1 parent 6369c8d commit b3baf82

3 files changed

Lines changed: 64 additions & 56 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ export const RunsPerDataPassOverviewPage = ({
234234
h(
235235
'.flex-row.g1.items-center',
236236
h('.flex-row.items-center.g1', [
237-
breadcrumbs([commonTitle, h('h2#breadcrumb-data-pass-name', dataPass?.name)]),
237+
breadcrumbs([commonTitle, h('h2#breadcrumb-data-pass-name', dataPass?.name ?? spinner({ size: 1, absolute: false }))]),
238238
h('#skimmableControl', dataPass && skimmableControl(
239239
dataPass,
240240
() => {

lib/public/views/Runs/RunPerPeriod/RunsPerLhcPeriodOverviewPage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export const RunsPerLhcPeriodOverviewPage = ({ runs: { perLhcPeriodOverviewModel
109109
h('.flex-row.justify-between.items-center.g2', [
110110
filtersPanelPopover(perLhcPeriodOverviewModel, activeColumns, { profile: 'runsPerLhcPeriod' }),
111111
h('.pl2#runOverviewFilter', runNumbersFilter(perLhcPeriodOverviewModel.filteringModel.get('runNumbers'))),
112-
h('h2', `Good, physics runs of ${lhcPeriodName}`),
112+
h('h2', ['Good physics runs of ', lhcPeriodName ?? spinner({ size: 1, absolute: false })]),
113113
mcReproducibleAsNotBadToggle(
114114
mcReproducibleAsNotBad,
115115
() => perLhcPeriodOverviewModel.setMcReproducibleAsNotBad(!mcReproducibleAsNotBad),

lib/public/views/Runs/RunsPerSimulationPass/RunsPerSimulationPassOverviewPage.js

Lines changed: 62 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -71,56 +71,64 @@ export const RunsPerSimulationPassOverviewPage = ({
7171

7272
const commonTitle = h('h2', 'Runs per MC');
7373

74-
return h(
75-
'.intermediate-flex-column',
76-
mergeRemoteData([remoteSimulationPass, remoteRuns, remoteDetectors, remoteQcSummary]).match({
77-
NotAsked: () => null,
78-
Failure: (errors) => errorAlert(errors),
79-
Success: ([simulationPass, runs, detectors, qcSummary]) => {
80-
const activeColumns = {
81-
...runsActiveColumns,
82-
...getInelasticInteractionRateColumns(pdpBeamTypes),
83-
...createRunDetectorsAsyncQcActiveColumns(
84-
perSimulationPassOverviewModel.runDetectorsSelectionModel,
85-
detectors,
86-
remoteDplDetectorsUserHasAccessTo,
87-
{ simulationPass },
88-
{
89-
profile: 'runsPerSimulationPass',
90-
qcSummary,
91-
},
92-
),
93-
};
74+
const fullPageData = mergeRemoteData([remoteRuns, remoteSimulationPass, remoteDetectors, remoteQcSummary]);
75+
const simulationPass = remoteSimulationPass.match({ Other: () => null, Success: (data) => data });
76+
const detectors = remoteDetectors.match({ Other: () => null, Success: (data) => data });
77+
const qcSummary = remoteQcSummary.match({ Other: () => null, Success: (data) => data });
9478

95-
return [
96-
h('.flex-row.justify-between.items-center.g2', [
97-
filtersPanelPopover(perSimulationPassOverviewModel, activeColumns, { profile: 'runsPerSimulationPass' }),
98-
h('.pl2#runOverviewFilter', runNumbersFilter(perSimulationPassOverviewModel.filteringModel.get('runNumbers'))),
99-
h(
100-
'.flex-row.g1.items-center',
101-
breadcrumbs([commonTitle, h('h2#breadcrumb-simulation-pass-name', simulationPass.name)]),
102-
),
103-
mcReproducibleAsNotBadToggle(
104-
mcReproducibleAsNotBad,
105-
() => perSimulationPassOverviewModel.setMcReproducibleAsNotBad(!mcReproducibleAsNotBad),
106-
),
107-
h('.mlauto', qcSummaryLegendTooltip()),
108-
exportTriggerAndModal(perSimulationPassOverviewModel.exportModel, modalModel, { autoMarginLeft: false }),
109-
frontLink(
110-
h(
111-
'button.btn.btn-primary.w-100.h2}#set-qc-flags-trigger',
112-
{
113-
disabled: perSimulationPassOverviewModel.runDetectorsSelectionModel.selectedQueryString.length < 1,
114-
},
115-
'Set QC Flags',
116-
),
117-
'qc-flag-creation-for-simulation-pass',
118-
{
119-
runNumberDetectorsMap: perSimulationPassOverviewModel.runDetectorsSelectionModel.selectedQueryString,
120-
simulationPassId,
121-
},
122-
),
123-
]),
79+
const activeColumns = {
80+
...runsActiveColumns,
81+
...getInelasticInteractionRateColumns(pdpBeamTypes),
82+
...detectors && qcSummary && createRunDetectorsAsyncQcActiveColumns(
83+
perSimulationPassOverviewModel.runDetectorsSelectionModel,
84+
detectors,
85+
remoteDplDetectorsUserHasAccessTo,
86+
{ simulationPass },
87+
{
88+
profile: 'runsPerSimulationPass',
89+
qcSummary,
90+
},
91+
),
92+
};
93+
94+
return [
95+
h('.flex-row.justify-between.items-center.g2', [
96+
filtersPanelPopover(perSimulationPassOverviewModel, activeColumns, { profile: 'runsPerSimulationPass' }),
97+
h('.pl2#runOverviewFilter', runNumbersFilter(perSimulationPassOverviewModel.filteringModel.get('runNumbers'))),
98+
h(
99+
'.flex-row.g1.items-center',
100+
breadcrumbs([
101+
commonTitle,
102+
h('h2#breadcrumb-simulation-pass-name', simulationPass?.name ?? spinner({ size: 1, absolute: false })),
103+
]),
104+
),
105+
mcReproducibleAsNotBadToggle(
106+
mcReproducibleAsNotBad,
107+
() => perSimulationPassOverviewModel.setMcReproducibleAsNotBad(!mcReproducibleAsNotBad),
108+
),
109+
h('.mlauto', qcSummaryLegendTooltip()),
110+
exportTriggerAndModal(perSimulationPassOverviewModel.exportModel, modalModel, { autoMarginLeft: false }),
111+
frontLink(
112+
h(
113+
'button.btn.btn-primary.w-100.h2}#set-qc-flags-trigger',
114+
{
115+
disabled: perSimulationPassOverviewModel.runDetectorsSelectionModel.selectedQueryString.length < 1,
116+
},
117+
'Set QC Flags',
118+
),
119+
'qc-flag-creation-for-simulation-pass',
120+
{
121+
runNumberDetectorsMap: perSimulationPassOverviewModel.runDetectorsSelectionModel.selectedQueryString,
122+
simulationPassId,
123+
},
124+
),
125+
]),
126+
h(
127+
'.intermediate-flex-column',
128+
fullPageData.match({
129+
NotAsked: () => null,
130+
Failure: (errors) => errorAlert(errors),
131+
Success: ([runs]) => [
124132
table(
125133
runs,
126134
activeColumns,
@@ -132,9 +140,9 @@ export const RunsPerSimulationPassOverviewPage = ({
132140
{ sort: sortModel },
133141
),
134142
paginationComponent(perSimulationPassOverviewModel.pagination),
135-
];
136-
},
137-
Loading: () => spinner(),
138-
}),
139-
);
143+
],
144+
Loading: () => spinner(),
145+
}),
146+
),
147+
];
140148
};

0 commit comments

Comments
 (0)