Skip to content

Commit

Permalink
[O2B-1204] Several improvements of the on-call template (#1481)
Browse files Browse the repository at this point in the history
* [O2B-1204] Several improvements of the on-call template

* Fix test

* Fix test
  • Loading branch information
martinboulais authored Apr 11, 2024
1 parent 0c6da29 commit 31e66a8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 8 deletions.
3 changes: 2 additions & 1 deletion lib/public/views/Logs/Create/templates/OnCallLogTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { detectorsProvider } from '../../../../services/detectors/detectorsProvi
*
* @type {string[]}
*/
const ALICE_SYSTEMS = ['FLP', 'ECS', 'EPN', 'DCS', 'OTHER'];
const ALICE_SYSTEMS = ['FLP', 'EPN', 'DCS', 'OTHER', 'CTP', 'PDP', 'QC', 'LHCIF', 'TPC HV', 'RP'];

const SHIFTER_TAGS = {
DCS: 'DCS Shifter',
Expand Down Expand Up @@ -106,6 +106,7 @@ export class OnCallLogTemplate extends Observable {
get detectorsAndSystems() {
return this._detectors$.getCurrent().apply({
Success: (detectors) => [
'ALL',
...detectors.map(({ name }) => name),
...ALICE_SYSTEMS,
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,27 @@ export const onCallLogCreationConfiguration = (creationModel, template) => {
h(PanelComponent, [
h(LabelPanelHeaderComponent, { required: true, for: 'lhcBeamMode' }, 'LHC Beam mode'),
h(
'input#lhcBeamMode.form-control',
{
value: template.formData.lhcBeamMode,
oninput: (e) => template.patchFormData({ lhcBeamMode: e.target.value }),
},
'select#lhcBeamMode.form-control',
{ onchange: (e) => template.patchFormData({ lhcBeamMode: e.target.value }) },
[
h('option', { disabled: true, selected: true }, '- None -'),
[
'NO BEAM',
'INJECTION PROBE BEAM',
'INJECTION PHYSICS BEAM',
'PREPARE RAMP',
'RAMP',
'FLAT TOP',
'SQUEEZE',
'STABLE BEAMS',
'DUMP',
'RAMP DOWN',
].map((lhcBeamMode) => h(
'option',
{ value: lhcBeamMode },
lhcBeamMode,
)),
],
),
]),
h(PanelComponent, { class: 'flex-column flex-grow' }, [
Expand Down
4 changes: 2 additions & 2 deletions test/public/logs/create.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -496,8 +496,8 @@ module.exports = () => {
const shifterPosition = 'ECS';
await page.select('#shifterPosition', shifterPosition);

const beamMode = 'Beam mode';
await fillInput(page, '#lhcBeamMode', beamMode);
const beamMode = 'INJECTION PHYSICS BEAM';
await page.select('#lhcBeamMode', beamMode);

const description = 'Description\nof the issue';
await pressElement(page, '#issue-description ~ .CodeMirror');
Expand Down

0 comments on commit 31e66a8

Please sign in to comment.