Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions app/config/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
* or submit itself to any jurisdiction.
*/

const { roles, flags: flagsTypes, detectors, pageNames, filterTypes, filterInput } = require('./rct-data');
const { roles, flags: flagsTypes, detectors, pageNames, filterTypes, filterInputTypes, fieldNames } = require('./rct-data');

module.exports = { // Properties that will be provided to frontend in the public folder
filterTypes: filterTypes,
filterInput: filterInput,
filterInputTypes: filterInputTypes,

roles,
flagsTypes,
Expand Down Expand Up @@ -56,6 +56,7 @@ module.exports = { // Properties that will be provided to frontend in the public
},

pageNames: pageNames,
fieldNames: fieldNames,

operationsNames: {
flag_insert: 'flags_insert',
Expand Down
24 changes: 24 additions & 0 deletions app/config/rct-data/fieldNames.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* @license
* Copyright 2019-2020 CERN and copyright holders of ALICE O2.
* See http://alice-o2.web.cern.ch/copyright for details of the copyright holders.
* All rights not expressly granted are reserved.
*
* This software is distributed under the terms of the GNU General Public
* License v3 (GPL Version 3), copied verbatim in the file "COPYING".
*
* In applying this license CERN does not waive the privileges and immunities
* granted to it by virtue of its status as an Intergovernmental Organization
* or submit itself to any jurisdiction.
*/
const { viewTypes } = require('./viewTypes.js');
const { periodFieldNames, runFieldNames, dataPassFieldNames, mcFieldNames } = require('./viewFieldNames');

const fieldNames = {};

fieldNames[viewTypes.periods] = periodFieldNames;
fieldNames[viewTypes.runs] = runFieldNames;
fieldNames[viewTypes.dataPasses] = dataPassFieldNames;
fieldNames[viewTypes.mc] = mcFieldNames;

module.exports = fieldNames;
7 changes: 4 additions & 3 deletions app/config/rct-data/filterTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ const filterTypes = {
between: 'between',
};

const filterInput = {
const filterInputTypes = {
number: 'number',
string: 'string',
text: 'text',
date: 'date',
};

module.exports = { filterTypes, filterInput };
module.exports = { filterTypes, filterInputTypes };
9 changes: 7 additions & 2 deletions app/config/rct-data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
*/

const pageNames = require('./pageNames.js');
const { filterTypes, filterInput } = require('./filterTypes.js');
const { viewTypes, pagesViewGroups } = require('./viewTypes.js');
const fieldNames = require('./fieldNames.js');
const { filterTypes, filterInputTypes } = require('./filterTypes.js');
const detectors = require('./detectors.js').sort();
const flags = require('./flags.json');
const roles = require('./roles.js');
Expand All @@ -23,8 +25,11 @@ const healthcheckQueries = require('./healthcheckQueries.js');

module.exports = {
pageNames,
viewTypes,
pagesViewGroups,
fieldNames,
filterTypes,
filterInput,
filterInputTypes,
detectors,
roles,
flags,
Expand Down
51 changes: 51 additions & 0 deletions app/config/rct-data/viewFieldNames/dataPassFieldNames.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/**
* @license
* Copyright 2019-2020 CERN and copyright holders of ALICE O2.
* See http://alice-o2.web.cern.ch/copyright for details of the copyright holders.
* All rights not expressly granted are reserved.
*
* This software is distributed under the terms of the GNU General Public
* License v3 (GPL Version 3), copied verbatim in the file "COPYING".
*
* In applying this license CERN does not waive the privileges and immunities
* granted to it by virtue of its status as an Intergovernmental Organization
* or submit itself to any jurisdiction.
*/
const { filterInputTypes } = require('../filterTypes.js');

const dataPassFieldNames = {
name: {
fieldName: 'Name',
filterInput: filterInputTypes.text,
},
description: {
fieldName: 'Name',
filterInput: filterInputTypes.text,
},
passType: {
fieldName: 'Type',
filterInput: filterInputTypes.text,
},
jira: {
fieldName: 'Jira',
filterInput: filterInputTypes.text,
},
ml: {
fieldName: 'ML',
filterInput: filterInputTypes.text,
},
number_of_events: {
fieldName: 'Events',
filterInput: filterInputTypes.number,
},
software_version: {
fieldName: 'Software version',
filterInput: filterInputTypes.text,
},
size: {
fieldName: 'Size',
filterInput: filterInputTypes.number,
},
};

module.exports = dataPassFieldNames;
25 changes: 25 additions & 0 deletions app/config/rct-data/viewFieldNames/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* @license
* Copyright 2019-2020 CERN and copyright holders of ALICE O2.
* See http://alice-o2.web.cern.ch/copyright for details of the copyright holders.
* All rights not expressly granted are reserved.
*
* This software is distributed under the terms of the GNU General Public
* License v3 (GPL Version 3), copied verbatim in the file "COPYING".
*
* In applying this license CERN does not waive the privileges and immunities
* granted to it by virtue of its status as an Intergovernmental Organization
* or submit itself to any jurisdiction.
*/

const periodFieldNames = require('./periodFieldNames.js');
const runFieldNames = require('./runFieldNames.js');
const dataPassFieldNames = require('./dataPassFieldNames.js');
const mcFieldNames = require('./mcFieldNames.js');

module.exports = {
periodFieldNames,
runFieldNames,
dataPassFieldNames,
mcFieldNames,
};
43 changes: 43 additions & 0 deletions app/config/rct-data/viewFieldNames/mcFieldNames.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/**
* @license
* Copyright 2019-2020 CERN and copyright holders of ALICE O2.
* See http://alice-o2.web.cern.ch/copyright for details of the copyright holders.
* All rights not expressly granted are reserved.
*
* This software is distributed under the terms of the GNU General Public
* License v3 (GPL Version 3), copied verbatim in the file "COPYING".
*
* In applying this license CERN does not waive the privileges and immunities
* granted to it by virtue of its status as an Intergovernmental Organization
* or submit itself to any jurisdiction.
*/
const { filterInputTypes } = require('../filterTypes.js');

const mcFieldNames = {
name: {
fieldName: 'Name',
filterInput: filterInputTypes.text,
},
description: {
fieldName: 'Description',
filterInput: filterInputTypes.text,
},
jira: {
fieldName: 'Jira',
filterInput: filterInputTypes.text,
},
ml: {
fieldName: 'ML',
filterInput: filterInputTypes.text,
},
pwg: {
fieldName: 'PWG',
filterInput: filterInputTypes.text,
},
number_of_events: {
fieldName: 'Events',
filterInput: filterInputTypes.number,
},
};

module.exports = mcFieldNames;
35 changes: 35 additions & 0 deletions app/config/rct-data/viewFieldNames/periodFieldNames.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**
* @license
* Copyright 2019-2020 CERN and copyright holders of ALICE O2.
* See http://alice-o2.web.cern.ch/copyright for details of the copyright holders.
* All rights not expressly granted are reserved.
*
* This software is distributed under the terms of the GNU General Public
* License v3 (GPL Version 3), copied verbatim in the file "COPYING".
*
* In applying this license CERN does not waive the privileges and immunities
* granted to it by virtue of its status as an Intergovernmental Organization
* or submit itself to any jurisdiction.
*/
const { filterInputTypes } = require('../filterTypes.js');

const periodFieldNames = {
name: {
fieldName: 'Name',
filterInput: filterInputTypes.text,
},
year: {
fieldName: 'Year',
filterInput: filterInputTypes.number,
},
beam: {
fieldName: 'Beam',
filterInput: filterInputTypes.text,
},
energy: {
fieldName: 'Mean energy [GeV]',
filterInput: filterInputTypes.number,
},
};

module.exports = periodFieldNames;
79 changes: 79 additions & 0 deletions app/config/rct-data/viewFieldNames/runFieldNames.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/**
* @license
* Copyright 2019-2020 CERN and copyright holders of ALICE O2.
* See http://alice-o2.web.cern.ch/copyright for details of the copyright holders.
* All rights not expressly granted are reserved.
*
* This software is distributed under the terms of the GNU General Public
* License v3 (GPL Version 3), copied verbatim in the file "COPYING".
*
* In applying this license CERN does not waive the privileges and immunities
* granted to it by virtue of its status as an Intergovernmental Organization
* or submit itself to any jurisdiction.
*/
const { filterInputTypes } = require('../filterTypes.js');

const runFieldNames = {
name: {
fieldName: 'Name',
filterInput: filterInputTypes.text,
},
run_number: {
fieldName: 'Run',
filterInput: filterInputTypes.number,
},
time_start: {
fieldName: 'Start time',
filterInput: filterInputTypes.date,
},
time_end: {
fieldName: 'End time',
filterInput: filterInputTypes.date,
},
time_trg_start: {
fieldName: 'Trigger start',
filterInput: filterInputTypes.date,
},
time_trg_end: {
fieldName: 'Trigger end',
filterInput: filterInputTypes.date,
},
center_of_mass_energy: {
fieldName: 'Center of mass energy',
filterInput: filterInputTypes.number,
},
ir: {
fieldName: 'IR [Hz]',
filterInput: filterInputTypes.number,
},
filling_scheme: {
fieldName: 'Filling scheme',
filterInput: filterInputTypes.text,
},
triggers_conf: {
fieldName: 'Triggers configuration',
filterInput: filterInputTypes.text,
},
fill_number: {
fieldName: 'Fill number',
filterInput: filterInputTypes.number,
},
run_type: {
fieldName: 'Run type',
filterInput: filterInputTypes.text,
},
mu: {
fieldName: '\u03BC',
filterInput: filterInputTypes.number,
},
l3_current: {
fieldName: 'L3 current [A]',
filterInput: filterInputTypes.number,
},
dipole_current: {
fieldName: 'Dipole current [A]',
filterInput: filterInputTypes.number,
},
};

module.exports = runFieldNames;
32 changes: 32 additions & 0 deletions app/config/rct-data/viewTypes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/**
* @license
* Copyright 2019-2020 CERN and copyright holders of ALICE O2.
* See http://alice-o2.web.cern.ch/copyright for details of the copyright holders.
* All rights not expressly granted are reserved.
*
* This software is distributed under the terms of the GNU General Public
* License v3 (GPL Version 3), copied verbatim in the file "COPYING".
*
* In applying this license CERN does not waive the privileges and immunities
* granted to it by virtue of its status as an Intergovernmental Organization
* or submit itself to any jurisdiction.
*/
const pageNames = require('./pageNames.js');

const viewTypes = {
periods: 'periods',
runs: 'runs',
dataPasses: 'dataPasses',
mc: 'mc',
flags: 'flags',
};

const pagesViewGroups = {
periods: [pageNames.periods],
runs: [pageNames.runsPerDataPass, pageNames.runsPerPeriod],
dataPasses: [pageNames.anchoredPerMC, pageNames.dataPasses],
mc: [pageNames.mc, pageNames.anchoragePerDatapass],
flags: [pageNames.flags],
};

module.exports = { viewTypes, pagesViewGroups };
2 changes: 1 addition & 1 deletion app/public/components/table/pager.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/

import viewButton from '../common/viewButton.js';
import { replaceUrlParams } from '../../utils/utils.js';
import { replaceUrlParams } from '../../utils/url/urlUtils.js';
import { h, iconChevronBottom } from '/js/src/index.js';
import itemsCounter from '../../views/userView/data/table/items-counter.js';
import { RCT } from '../../config.js';
Expand Down
2 changes: 1 addition & 1 deletion app/public/model/data/FetchedDataManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import { RemoteData, Loader } from '/js/src/index.js';

import FetchedData from './FetchedData.js';
import { replaceUrlParams } from '../../../utils/utils.js';
import { replaceUrlParams } from '../../utils/url/urlUtils.js';
import { RCT } from '../../../config.js';
const { dataReqParams } = RCT;
const { pageNames } = RCT;
Expand Down
Loading