Skip to content

Commit 46d4ae8

Browse files
committed
[O2B-1502] minor changes, processed feedback
1 parent ea0880f commit 46d4ae8

3 files changed

Lines changed: 8 additions & 9 deletions

File tree

lib/public/components/Filters/LhcFillsFilter/stableBeamFilter.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@ import { radioButton } from '../../common/form/inputs/radioButton.js';
2424
*/
2525
export const toggleStableBeamOnlyFilter = (stableBeamFilterModel, radioButtonMode = false) => {
2626
const name = 'stableBeamsOnlyRadio';
27-
const label1 = 'OFF';
28-
const label2 = 'ON';
27+
const labelOff = 'OFF';
28+
const labelOn = 'ON';
2929
if (radioButtonMode) {
3030
return h('.form-group-header.flex-row.w-100', [
3131
radioButton({
32-
label: label1,
32+
label: labelOff,
3333
isChecked: !stableBeamFilterModel.isStableBeamsOnly(),
3434
action: () => stableBeamFilterModel.setStableBeamsOnly(false),
3535
name: name,
3636
}),
3737
radioButton({
38-
label: label2,
38+
label: labelOn,
3939
isChecked: stableBeamFilterModel.isStableBeamsOnly(),
4040
action: () => stableBeamFilterModel.setStableBeamsOnly(true),
4141
name: name,

lib/public/views/LhcFills/Overview/LhcFillsOverviewModel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* or submit itself to any jurisdiction.
1212
*/
1313

14+
import { buildUrl } from '/js/src/index.js';
1415
import { FilteringModel } from '../../../components/Filters/common/FilteringModel.js';
1516
import { StableBeamFilterModel } from '../../../components/Filters/LhcFillsFilter/StableBeamFilterModel.js';
1617
import { OverviewPageModel } from '../../../models/OverviewModel.js';
@@ -58,7 +59,7 @@ export class LhcFillsOverviewModel extends OverviewPageModel {
5859
* @inheritDoc
5960
*/
6061
getRootEndpoint() {
61-
return '/api/lhcFills';
62+
return buildUrl('/api/lhcFills', { filter: this.filteringModel.normalized });
6263
}
6364

6465
/**
@@ -67,7 +68,6 @@ export class LhcFillsOverviewModel extends OverviewPageModel {
6768
async getLoadParameters() {
6869
return {
6970
...await super.getLoadParameters(),
70-
...{ filter: this.filteringModel.normalized },
7171
};
7272
}
7373

test/public/lhcFills/overview.test.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,15 +266,14 @@ module.exports = () => {
266266
});
267267

268268
it('should successfully display filter elements', async () => {
269-
const filterSBExpect = { selector: '.w-30', value: 'Stable Beams Only' };
269+
const filterSBExpect = { selector: '.stableBeams-filter .w-30', value: 'Stable Beams Only' };
270270
await goToPage(page, 'lhc-fill-overview');
271271
// Open the filtering panel
272272
await openFilteringPanel(page);
273273
await expectInnerText(page, filterSBExpect.selector, filterSBExpect.value);
274274
});
275275

276-
277-
it('should successfully un-apply Stable Beam filter menu', async () => {
276+
it('should successfully un-apply Stable Beam filter menu', async () => {
278277
const filterButtonSBOnlySelector= '#stableBeamsOnlyRadioOFF';
279278
await goToPage(page, 'lhc-fill-overview');
280279
await waitForTableLength(page, 5);

0 commit comments

Comments
 (0)