Skip to content

Commit 5eb8b9d

Browse files
committed
Merge branch 'main' into xsalonx/O2B-1240/display-only-physical-productions
2 parents e9d2073 + ab8a338 commit 5eb8b9d

6 files changed

Lines changed: 23 additions & 12 deletions

File tree

lib/database/adapters/RunAdapter.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,9 @@ class RunAdapter {
273273
entityObject.inelasticInteractionRateAtMid = inelasticInteractionRateAtMid;
274274
entityObject.inelasticInteractionRateAtEnd = inelasticInteractionRateAtEnd;
275275
if (lhcFill && inelasticInteractionRateAvg !== null) {
276-
const numberOfCollidingLhcBunchCrossings = extractNumberOfCollidingLhcBunchCrossings(lhcFill.fillingSchemeName);
277-
entityObject.muInelasticInteractionRate = numberOfCollidingLhcBunchCrossings
278-
? inelasticInteractionRateAvg / (numberOfCollidingLhcBunchCrossings * PhysicalConstant.LHC_REVOLUTION_FREQUENCY_HZ)
276+
const collidingBunchesCount = lhcFill.collidingBunchesCount ?? extractNumberOfCollidingLhcBunchCrossings(lhcFill.fillingSchemeName);
277+
entityObject.muInelasticInteractionRate = collidingBunchesCount
278+
? inelasticInteractionRateAvg / (collidingBunchesCount * PhysicalConstant.LHC_REVOLUTION_FREQUENCY_HZ)
279279
: null;
280280
} else {
281281
entityObject.muInelasticInteractionRate = null;

lib/database/seeders/20220503120937-lhc-fills.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ module.exports = {
6868
stable_beams_end: '2019-08-08 23:00:00',
6969
stable_beams_duration: 60 * 60 * 12,
7070
filling_scheme_name: 'Single_12b_8_1024_8_2018',
71-
colliding_bunches_count: 2345,
71+
colliding_bunches_count: 1024,
7272
delivered_luminosity: 420,
7373
created_at: new Date('2019-08-09 21:00:00'),
7474
updated_at: new Date('2019-08-09 21:00:00'),

lib/public/components/common/table/table.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ const parseColumnsConfiguration = (columns, currentProfile) => {
9292
* @property {boolean} verticallScrollEnabled if true, enable vertical (table internal) scroll in case of overflow,
9393
* whole page vertical scroll otherwise. Note that for this option to work,
9494
* all predecesors of the node returned by this function must have display property column-flex and height: 100%
95+
* @property {boolean} singleWrapper have effect only when some scroll is enabled.
96+
* If true all divs wrapping table element are merged to single on.
9597
*/
9698

9799
/**
@@ -134,6 +136,7 @@ export const table = (
134136
horizontalScrollEnabled = false,
135137
freezeFirstColumn = false,
136138
verticalScrollEnabled = false,
139+
singleWrapper = false,
137140
} = tableConfiguration || {};
138141
const { idKey, displayedColumns } = parseColumnsConfiguration(columns, currentProfile);
139142

@@ -147,12 +150,14 @@ export const table = (
147150
}
148151

149152
const scrollEnabled = horizontalScrollEnabled || verticalScrollEnabled;
150-
const wrapperClassesExpression = scrollEnabled ? '.sticky-table-wrapper.scroll-auto' : '';
151-
152153
const optionalTableClassesExpression = freezeFirstColumn && horizontalScrollEnabled ? '.freeze-first-column' : '';
153154

154-
const wrappedTableNode = h(
155-
wrapperClassesExpression,
155+
const firstLevelWrapperClasses =
156+
(verticalScrollEnabled ? '.sticky-table-wrapper' : '') +
157+
(singleWrapper && scrollEnabled ? '.scroll-auto' : '');
158+
159+
let wrappedTableNode = h(
160+
firstLevelWrapperClasses,
156161
h(
157162
`table.table.table-hover.shadow-level1${optionalTableClassesExpression}`,
158163
{
@@ -168,6 +173,11 @@ export const table = (
168173
],
169174
),
170175
);
176+
177+
if (scrollEnabled && !singleWrapper) {
178+
wrappedTableNode = h('.scroll-auto', wrappedTableNode);
179+
}
180+
171181
return scrollEnabled && !verticalScrollEnabled
172182
? h('', wrappedTableNode) // Disable y-scroll
173183
: wrappedTableNode;

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ export const RunsPerLhcPeriodOverviewPage = ({ runs: { perLhcPeriodOverviewModel
9898
{
9999
profile: 'runsPerLhcPeriod',
100100
...displayOptions,
101+
singleWrapper: true,
101102
},
102103
{ sort: sortModel },
103104
);
@@ -130,7 +131,7 @@ export const RunsPerLhcPeriodOverviewPage = ({ runs: { perLhcPeriodOverviewModel
130131
)),
131132
},
132133
{
133-
panelClass: ['p2', 'scroll-auto'],
134+
panelClass: ['scroll-auto'],
134135
},
135136
),
136137
paginationComponent(perLhcPeriodOverviewModel.pagination),

test/public/lhcFills/detail.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ module.exports = () => {
4545

4646
await expectInnerText(page, '#lhc-fill-beamType', 'Beam type:\nPROTON-PROTON');
4747
await expectInnerText(page, '#lhc-fill-fillingSchemeName', 'Scheme name:\nSingle_12b_8_1024_8_2018');
48-
await expectInnerText(page, '#lhc-fill-collidingBunchesCount', 'Colliding bunches:\n2,345');
48+
await expectInnerText(page, '#lhc-fill-collidingBunchesCount', 'Colliding bunches:\n1,024');
4949
await expectInnerText(page, '#lhc-fill-deliveredLuminosity', 'Delivered lumi:\n420 nb-1');
5050
});
5151

test/public/runs/detail.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@ module.exports = () => {
282282

283283
it('should successfully show luminosity information of PbPb run', async () => {
284284
await goToRunDetails(page, 54);
285-
await expectInnerText(page, '#luminosity div:nth-child(2) div:nth-child(1) div:nth-child(2)', '98,110.716\nµb\n-1');
286-
await expectInnerText(page, '#luminosity div:nth-child(2) div:nth-child(2) div:nth-child(2)', '0.031');
285+
await expectInnerText(page, '#luminosity div:nth-child(2) div:nth-child(1) div:nth-child(2)', '100,130.863\nµb\n-1');
286+
await expectInnerText(page, '#luminosity div:nth-child(2) div:nth-child(2) div:nth-child(2)', '0.072');
287287
await expectInnerText(page, '#luminosity div:nth-child(2) div:nth-child(3) div:nth-child(2)', '78,600 µb');
288288
await expectInnerText(page, '#luminosity div:nth-child(2) div:nth-child(4) div:nth-child(2)', '1');
289289
await expectInnerText(page, '#luminosity div:nth-child(2) div:nth-child(5) div:nth-child(2)', '0.757');

0 commit comments

Comments
 (0)