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
Show all changes
44 commits
Select commit Hold shift + click to select a range
32cb73a
detector list
Ehevi Aug 10, 2023
931b1e1
Remove unnecessary divs
Ehevi Aug 10, 2023
68079d6
Remove right padding from filter chip
Ehevi Aug 10, 2023
553cfb1
Fix rebase error
Ehevi Aug 10, 2023
42e0e31
Css cleanup :broom:
Ehevi Aug 10, 2023
fbd8877
Paddings cleanup :broom:
Ehevi Aug 10, 2023
9848158
Paddings cleanup :broom:
Ehevi Aug 10, 2023
7998219
On click apply
Ehevi Aug 10, 2023
efd1a61
Checkboxes cleanup :broom:
Ehevi Aug 10, 2023
696e47d
Cleanup :broom:
Ehevi Aug 10, 2023
7aa1359
Toggle switch
Ehevi Aug 10, 2023
a632a95
Cleanup :broom:
Ehevi Aug 10, 2023
c23f4c8
Cleanup :broom:
Ehevi Aug 10, 2023
0b01a2a
Pass marked field values
Ehevi Aug 10, 2023
fa73eb3
Apply detector settings for detector headers
Ehevi Aug 10, 2023
fe28a31
Use pageNames
Ehevi Aug 10, 2023
194dc1b
Runs per period panel
Ehevi Aug 10, 2023
cf111c7
Remove views from tests and coverage
Ehevi Aug 10, 2023
f709bc4
Update toggle switch colors
Ehevi Aug 10, 2023
fd0d609
Fix circle radius
Ehevi Aug 10, 2023
7e89252
Use parent router
Ehevi Aug 10, 2023
9df052d
Remove unnecessary line
Ehevi Aug 10, 2023
4dabda0
Address review comments
Ehevi Aug 10, 2023
04f0792
Address review comments
Ehevi Aug 10, 2023
aa40fc0
Use boolean expression instead of ternary operator
Ehevi Aug 10, 2023
e6b8818
Address review comments
Ehevi Aug 10, 2023
db036c3
Docs update
Ehevi Aug 11, 2023
fa1b657
Add tests
Ehevi Aug 11, 2023
e20a886
Address review comments
Ehevi Aug 11, 2023
41d3d5e
Remove unnecessary filtering
Ehevi Aug 11, 2023
0884d0e
Address review comments
Ehevi Aug 11, 2023
3fbdf8f
Address review comments
Ehevi Aug 11, 2023
0ce171a
Remove quality change option from runs per period view
Ehevi Aug 11, 2023
da42485
Prevent quality change from runs per period view
Ehevi Aug 11, 2023
4e21a56
Quickfix
Ehevi Aug 11, 2023
9a3f06d
Quickfix
Ehevi Aug 11, 2023
f482e46
Row display style
Ehevi Aug 11, 2023
b31ae5d
Tests
Ehevi Aug 11, 2023
8de06dc
Apply eslint rules
Ehevi Aug 11, 2023
1b9d88c
Remove unnecessary arrays from row components
Ehevi Aug 11, 2023
daa3827
[ORCT-46] Multiselect improvement (#162)
Ehevi Aug 11, 2023
329f2c7
Css cleanup
Ehevi Aug 11, 2023
f1ca55f
Remove unnecessary array
Ehevi Aug 11, 2023
98aca50
Merge master
Ehevi Aug 14, 2023
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
6 changes: 3 additions & 3 deletions app/public/components/about/about.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ import { h } from '/js/src/index.js';
export default function about() {
const title = h('h3.text-primary', 'About');

return h('.p-1em', [
h('.flex.p-bottom-1em.justify-center.items-center',
return h('.p-1rem', [
h('.flex.p-bottom-1rem.justify-center.items-center',
h('.settings-40-primary'),
h('.p-left-1em',
h('.p-left-1rem',
title)),

h('.flex-wrap.justify-between.items-center',
Expand Down
63 changes: 63 additions & 0 deletions app/public/components/buttons/dataActionButtons.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/**
* @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.
*/

import { h, iconDataTransferDownload, iconReload } from '/js/src/index.js';
import downloadCSV from '../../utils/csvExport.js';
import copyLinkButton from './copyLinkButton.js';

export const dataActions = {
hide: 'Hide',
reload: 'Reload',
downloadCSV: 'Download CSV',
copyLink: 'Copy link',
showFilteringPanel: 'Filter',
};

export default function dataActionButtons(model, applicableDataActions) {
return h('.btn-group',
applicableDataActions[dataActions.reload]
? h('button.btn.btn-secondary.icon-only-button', {
onclick: () => {
model.fetchedData.reqForData(true);
model.notify();
},
}, iconReload())
: '',

applicableDataActions[dataActions.downloadCSV]
? h('button.btn.btn-secondary.icon-only-button', {
onclick: () => {
downloadCSV(model);
},
}, iconDataTransferDownload())
: '',

applicableDataActions[dataActions.copyLink]
? copyLinkButton(model.router.getUrl().toString())
: '',

applicableDataActions[dataActions.hide]
? h('button.btn.icon-only-button', {
className: model.hideCurrentPageMarkedRows ? 'btn-primary' : 'btn-secondary',
onclick: () => model.changeMarkedRowsVisibility(),
}, model.hideCurrentPageMarkedRows ? h('.hide-20-off-white.abs-center') : h('.hide-20-primary.abs-center'))
: '',

applicableDataActions[dataActions.showFilteringPanel]
? h('button.btn.icon-only-button', {
className: model.showFilteringPanel ? 'btn-primary' : 'btn-secondary',
onclick: () => model.changeSearchFieldsVisibility(),
}, model.showFilteringPanel ? h('.slider-20-off-white.abs-center') : h('.slider-20-primary.abs-center'))
: '');
}
2 changes: 1 addition & 1 deletion app/public/components/detectors/detectorIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function detectorIcon(navigation, item, index, detectorName, time
document.getElementById(runBasedQcModalId).style.display = 'none';
}, item, index, detectorName, runDetectorId, timeBased)))
: '',
h('button.btn.no-border-bottom.pointer.run-quality.good', {
h('button.btn.pointer.run-quality.good', {
id: runDetectorId,
onclick: () => {
if (qualityChangePossible) {
Expand Down
10 changes: 8 additions & 2 deletions app/public/model/DataAccessModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ export default class DataAccessModel extends Observable {
this.serviceUnavailable = new ServiceUnavailable(parent);
this.fetchedData = new FetchedDataManager(this.router, this);

this.searchFieldsVisible = false;
this.showFilteringPanel = false;
this.sortingRowVisible = false;
this.hideCurrentPageMarkedRows = false;

this.loader = new Loader();

Expand All @@ -60,7 +61,7 @@ export default class DataAccessModel extends Observable {
}

changeSearchFieldsVisibility() {
this.searchFieldsVisible = !this.searchFieldsVisible;
this.showFilteringPanel = !this.showFilteringPanel;
this.notify();
}

Expand All @@ -69,6 +70,11 @@ export default class DataAccessModel extends Observable {
this.notify();
}

changeMarkedRowsVisibility() {
this.hideCurrentPageMarkedRows = !this.hideCurrentPageMarkedRows;
this.fetchedData.changeRecordsVisibility(this.getCurrentData());
}

async logout() {
const logoutEndpoint = '/api/logout/';
const { result, status, ok } = this.loader.post(logoutEndpoint);
Expand Down
2 changes: 2 additions & 0 deletions app/public/model/data/FetchedDataManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export default class FetchedDataManager {
this.router = router;
this.loader = new Loader();

this.hideMarkedRecords = false;

for (const n in pageNames) {
if (Object.prototype.hasOwnProperty.call(pageNames, n)) {
this[n] = {};
Expand Down
32 changes: 20 additions & 12 deletions app/public/styles/custom.less
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
align-items: center;
}

.no-border-bottom {
border-bottom: 0px !important;
}

.no-text-decoration {
text-decoration: none !important;
}
Expand All @@ -48,8 +44,20 @@
visibility: hidden !important;
}

.clear-both {
clear: both !important;
.transparent {
background-color: transparent !important;
color: inherit;
border: none !important;
}

.scale-2-5 {
scale: 1.875;
}

/* Display */

.flex {
display: flex !important;
}

.transparent {
Expand Down Expand Up @@ -82,20 +90,20 @@

/* Paddings */

.p-1em {
padding: 1em !important;
.p-1rem {
padding: 1rem !important;
}

.p-left-1em {
padding-left: 1em !important;
.p-left-1rem {
padding-left: 1rem !important;
}

.p-right-15 {
padding-right: 15px !important;
}

.p-bottom-1em {
padding-bottom: 1em !important;
.p-bottom-1rem {
padding-bottom: 1rem !important;
}

.p-bottom-0 {
Expand Down
9 changes: 9 additions & 0 deletions app/public/styles/images/icons/20/off-white/hide.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions app/public/styles/images/icons/20/primary/hide.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions app/public/styles/images/icons/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,16 @@
background-image: url('/styles/images/icons/20/primary/forward.svg');
}

.hide-20-off-white {
.icon-20;
background-image: url('/styles/images/icons/20/off-white/hide.svg');
}

.hide-20-primary {
.icon-20;
background-image: url('/styles/images/icons/20/primary/hide.svg');
}

.icon-placeholder-20-primary {
.icon-20;
background-image: url('/styles/images/icons/20/primary/icon-placeholder.svg');
Expand Down
40 changes: 13 additions & 27 deletions app/public/views/flags/overview/flagsContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,22 @@
* or submit itself to any jurisdiction.
*/

import { h, iconDataTransferDownload, iconReload } from '/js/src/index.js';
import { h } from '/js/src/index.js';
import filter from '../../userView/data/table/filtering/filter.js';
import downloadCSV from '../../../../utils/csvExport.js';
import flagsVisualization from '../../../components/flags/flagsVisualization.js';
import flagsTable from './flagsTable.js';
import flagBreadCrumbs from '../../../../components/flags/flagBreadcrumbs.js';
import { noRunNumbers } from '../../../../utils/defaults.js';
import noSubPageSelected from '../../userView/data/table/noSubPageSelected.js';
import copyLinkButton from '../../../components/buttons/copyLinkButton.js';
import dataActionButtons, { dataActions } from '../../../components/buttons/dataActionButtons.js';

const applicableDataActions = {
[dataActions.hide]: false,
[dataActions.reload]: true,
[dataActions.downloadCSV]: true,
[dataActions.copyLink]: true,
[dataActions.showFilteringPanel]: false,
};

export default function flagsContent(model, runs, detectors, flags) {
const urlParams = model.router.getUrl().searchParams;
Expand All @@ -33,35 +40,14 @@ export default function flagsContent(model, runs, detectors, flags) {
const flagsData = flags.getFlags(runNumber, detectorName);
const runData = runs.getRun(dataPassName, runNumber);

const functionalities = (model) => h('.btn-group',
h('button.btn.btn-secondary.icon-only-button', {
onclick: () => {
model.fetchedData.reqForData(true);
model.notify();
},
}, iconReload()),

h('button.btn.btn-secondary.icon-only-button', {
onclick: () => {
downloadCSV(model);
},
}, iconDataTransferDownload()),

copyLinkButton(model.router.getUrl().toString()),

h('button.btn.icon-only-button', {
className: model.searchFieldsVisible ? 'btn-primary' : 'btn-secondary',
onclick: () => model.changeSearchFieldsVisibility(),
}, model.searchFieldsVisible ? h('.slider-20-off-white.abs-center') : h('.slider-20-primary.abs-center')));

return runNumber > noRunNumbers && runData
? h('.p-1em', [
? h('.p-1rem', [
h('.flex-wrap.justify-between.items-center',
h('.flex-wrap.justify-between.items-center',
flagBreadCrumbs(model, dataPassName, runNumber, detectorName)),

functionalities(model)),
model.searchFieldsVisible ? filter(model) : '',
dataActionButtons(model, applicableDataActions)),
model.showFilteringPanel ? filter(model) : '',

flagsVisualization(runData, flagsData),
flagsTable(model, flagsData),
Expand Down
13 changes: 6 additions & 7 deletions app/public/views/flags/overview/flagsTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@ export default function flagsTable(model, flagsData) {
h('table', {
id: 'flags-data-table',
className: 'flags-table',
}, [
flagsTableHeader(model),
},
flagsTableHeader(model),

h('tbody', { id: 'table-body-flagsData' },
flagsData.map((item) => flagsTableRow(
PN.flags, item, cellsSpecials,
))),
])))
h('tbody', { id: 'table-body-flagsData' },
flagsData.map((item) => flagsTableRow(
PN.flags, item, cellsSpecials,
))))))
: '';
}
Loading