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
87 commits
Select commit Hold shift + click to select a range
8216274
New api periods
Ehevi Aug 14, 2023
073fef1
Apply eslint rules :sparkles:
Ehevi Aug 15, 2023
f2b237b
Use message panels
Ehevi Aug 15, 2023
c3df896
Messages
Ehevi Aug 15, 2023
2a9f8eb
Add dataAccess
Ehevi Aug 15, 2023
00965ae
Move userPreferences up in model hierarchy
Ehevi Aug 15, 2023
f917829
Eslint :sparkles:
Ehevi Aug 15, 2023
116ce04
Cleanup :broom:
Ehevi Aug 15, 2023
7beba23
Cleanup :broom:
Ehevi Aug 15, 2023
cce4554
Display periods from the new API
Ehevi Aug 15, 2023
b3c38e5
Run energies
Ehevi Aug 15, 2023
b2ca901
Periods css update
Ehevi Aug 15, 2023
31cd33b
Update user preferences access
Ehevi Aug 15, 2023
ebcb8a4
Enable data selection
Ehevi Aug 15, 2023
544140f
Add column filtering options
Ehevi Aug 15, 2023
a571ef6
Add pagination
Ehevi Aug 15, 2023
81cd499
Add year field
Ehevi Aug 16, 2023
01b4528
Improve display of the distinct energies
Ehevi Aug 16, 2023
091377a
Rename pager to obsolete pager
Ehevi Aug 16, 2023
5e0fc39
Remove the old period field name config
Ehevi Aug 16, 2023
dc18122
Mark previous items couter as obsolete
Ehevi Aug 16, 2023
b3060f9
Use the new items counter in the periods view
Ehevi Aug 16, 2023
c879e25
Docs cleanup :broom:
Ehevi Aug 16, 2023
5b565e3
Rename column display options
Ehevi Aug 16, 2023
4b90f21
Rename css class
Ehevi Aug 16, 2023
9ee617a
Rename column display options select
Ehevi Aug 16, 2023
7f66310
Cleanup :broom:
Ehevi Aug 16, 2023
e27b345
Use the tableManager row
Ehevi Aug 16, 2023
ae26171
Fix setting rows on page
Ehevi Aug 16, 2023
4311b94
Cleanup :broom:
Ehevi Aug 16, 2023
46e3168
Fix pagination
Ehevi Aug 16, 2023
628e3f0
Cleanup :broom:
Ehevi Aug 16, 2023
7beb922
ItemsCounter cleanup :broom:
Ehevi Aug 16, 2023
ad51576
SetRowsOnSite cleanup :broom:
Ehevi Aug 16, 2023
ab7af4e
Cleanup :broom:
Ehevi Aug 16, 2023
5cf1469
Cleanup :broom:
Ehevi Aug 16, 2023
21acc3d
Remove unused delay function
Ehevi Aug 16, 2023
96b1cef
Rename header columns
Ehevi Aug 16, 2023
7745401
Cleanup :broom:
Ehevi Aug 16, 2023
574d884
Cleanup :broom:
Ehevi Aug 16, 2023
6060f57
Quickfix
Ehevi Aug 18, 2023
6b67ef7
[ORCT-157] Mark obsolete data requests as @deprecated (#176)
Ehevi Aug 23, 2023
e936501
Add items counter test
Ehevi Aug 24, 2023
efea3d5
Rename files
Ehevi Aug 18, 2023
e3c3103
Prepare periods export modal
Ehevi Aug 18, 2023
b3b12ab
Enable user to select csv or json export
Ehevi Aug 22, 2023
bf04c25
Cleanup :broom:
Ehevi Aug 23, 2023
5b47e18
Mark obsolete csv download as deprecated
Ehevi Aug 23, 2023
f8becf7
Pass userPreferences directly to modals
Ehevi Aug 23, 2023
4ab63c8
Cleanup :broom:
Ehevi Aug 23, 2023
384dc79
Cleanup :broom:
Ehevi Aug 23, 2023
606f3c7
Remove dependencies
Ehevi Aug 23, 2023
d54b1db
Fix preparedData in obsoleteCsvExport
Ehevi Aug 23, 2023
1e4b1c9
Cleanup :broom:
Ehevi Aug 23, 2023
0fbf57a
Use the model name as downloaded filename for exports
Ehevi Aug 23, 2023
acda977
Add capitalization tests
Ehevi Aug 23, 2023
d2d7cd8
Add readable file size test
Ehevi Aug 23, 2023
9104a20
Cleanup :broom:
Ehevi Aug 23, 2023
fdf8618
Cleanup :broom:
Ehevi Aug 24, 2023
7ea3ace
Tests cleanup :broom:
Ehevi Aug 24, 2023
66529b0
Enum content types
Ehevi Aug 24, 2023
ca85ace
Add CSV data preparation test
Ehevi Aug 24, 2023
809176a
Remove console logs
Ehevi Aug 24, 2023
4fdc9b5
Fix dataExport modal rendering condition
Ehevi Aug 24, 2023
8c4d9d7
Address review comments
Ehevi Aug 24, 2023
e3e30a7
Address review comments
Ehevi Aug 24, 2023
f4aa38e
Remove capitalizeFirstLetter function
Ehevi Aug 24, 2023
6950d88
Newlines
Ehevi Aug 24, 2023
489c1d6
Pagename tests
Ehevi Aug 24, 2023
ac25f2f
Cleanup :broom:
Ehevi Aug 24, 2023
85bb90a
Sort cleanup
Ehevi Aug 24, 2023
c2e7267
Address review comments
Ehevi Aug 24, 2023
ad73985
Address review comments
Ehevi Aug 24, 2023
4277845
Move pageTitle to separate component
Ehevi Aug 25, 2023
4a06657
Chai export cleanup :broom:
Ehevi Aug 25, 2023
d25936a
Tests cleanup :broom:
Ehevi Aug 25, 2023
9c58165
Tests cleanup :broom:
Ehevi Aug 25, 2023
9cee950
Cleanup :broom:
Ehevi Aug 25, 2023
64d92db
Puppeteer sandbox
Ehevi Aug 24, 2023
a629bcc
less dependencies
xsalonx Aug 24, 2023
f9deb0a
docker node image to alpine due to puppeteer related reason
xsalonx Aug 25, 2023
73994a2
Page load test
Ehevi Aug 25, 2023
dce1bac
Build url test
Ehevi Aug 25, 2023
3480826
Cleanup :broom:
Ehevi Aug 25, 2023
35ccea8
Check page title
Ehevi Aug 25, 2023
88598ac
Cleanup :broom:
Ehevi Aug 28, 2023
de7df4b
Merge branch 'master' into test/ORCT-164/puppeteer-setup
Ehevi Aug 28, 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
2 changes: 1 addition & 1 deletion app/public/components/table/title.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ import { RCT } from '../../config.js';
import { pageTitle } from '../common/pageTitle.js';

export default function title(page) {
return h('h3.p-right-15.text-primary', pageTitle(page, RCT.pageNames));
return h('h3.p-right-15.text-primary#page-title', pageTitle(page, RCT.pageNames));
}
127 changes: 127 additions & 0 deletions app/public/utils/url/buildUrl.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
/**
* @license
* Copyright CERN and copyright holders of ALICE O2. This software is
* distributed under the terms of the GNU General Public License v3 (GPL
* Version 3), copied verbatim in the file "COPYING".
*
* See http://alice-o2.web.cern.ch/license for full licensing information.
*
* 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.
*/

/**
* @typedef {string|number|null|boolean} QueryParameterValue
*/

/**
* Build a URL from a base URL (that may already have query parameters) and a list of query parameters
*
* @param {string} baseURL the base URL to which parameters should be added
* @param {object} parameters the query parameters
* @return {string} URL the built URL
*/
exports.buildUrl = (baseURL, parameters) => {
if (!parameters) {
parameters = {};
}
const [url, existingParameters] = baseURL.split('?');

/**
* Build a parameter object or array from a parameters keys path
*
* For example, a parameter `key1[key2][]=value` translates to keys path ['key1', 'key2', ''] and will lead to {key1: {key2: [value]}}
*
* @param {object|array} parentParameter the parameter's object or array up to the current key
* @param {array} nestedKeys the keys path to build from the current point
* @param {string} value the value of the parameter represented by the key path
* @param {string|null} absoluteCurrentKey the full key currently building, used to display useful error message
* @return {void}
*/
const buildParameterFromNestedKeys = (parentParameter, nestedKeys, value, absoluteCurrentKey) => {
const currentKey = nestedKeys.shift();
const absoluteParentKey = absoluteCurrentKey;
absoluteCurrentKey = absoluteCurrentKey ? `${absoluteCurrentKey}[${currentKey}]` : currentKey;

if (currentKey === '') {
// Parameter must be an array and the value is a new item in that array
if (!Array.isArray(parentParameter)) {
throw new Error(`Existing parameter at key <${absoluteParentKey}> is an array`);
}

parentParameter.push(value);
} else if (currentKey) {
// Parameter must be an object and the value is a property in that array
if (Array.isArray(parentParameter) || typeof parentParameter !== 'object' || parentParameter === null) {
throw new Error(`Existing parameter at key <${absoluteParentKey}> expects nested values`);
}

if (nestedKeys.length > 0) {
// We still have nested keys to fill
if (!(currentKey in parentParameter)) {
parentParameter[currentKey] = nestedKeys[0] === '' ? [] : {};
}
buildParameterFromNestedKeys(parentParameter[currentKey], nestedKeys, value, absoluteCurrentKey);
} else {
if (Array.isArray(parentParameter[currentKey])) {
throw new Error(`Existing parameter at key <${currentKey}> is not an array`);
} else if (typeof parentParameter[currentKey] === 'object' && parentParameter[currentKey] !== null) {
throw new Error(`Existing parameter at key <${currentKey}> is not nested`);
}
parentParameter[currentKey] = value;
}
}
};

if (existingParameters) {
for (const formattedParameter of existingParameters.split('&')) {
const [key, value] = formattedParameter.split('=');
const [firstKey, ...dirtyKeys] = key.split('[');
const nestedKeys = [firstKey, ...dirtyKeys.map((key) => key.slice(0, -1))];

buildParameterFromNestedKeys(parameters, nestedKeys, value, null);
}
}

const serializedQueryParameters = [];

if (Object.keys(parameters).length === 0) {
return url;
}

/**
* Stringify a query parameter to be used in a URL and push it in the serialized query parameters list
*
* @param {string} key the parameter's key
* @param {QueryParameterValue} value the parameter's value
* @return {void}
*/
const formatAndPushQueryParameter = (key, value) => {
if (value === undefined) {
return;
}

if (Array.isArray(value)) {
for (const subValue of value) {
formatAndPushQueryParameter(`${key}[]`, subValue);
}
return;
}

if (typeof value === 'object' && value !== null) {
for (const [subKey, subValue] of Object.entries(value)) {
formatAndPushQueryParameter(`${key}[${subKey}]`, subValue);
}
return;
}

serializedQueryParameters.push(`${key}=${value}`);
};

for (const [key, parameter] of Object.entries(parameters)) {
formatAndPushQueryParameter(key, parameter);
}

return `${url}?${serializedQueryParameters.join('&')}`;
};
27 changes: 21 additions & 6 deletions docker/application.dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
FROM node:18.16.0-buster as base
FROM node:18-alpine3.17 as base
WORKDIR /opt/RunConditionTable

RUN apt update -y && apt install -y \
netcat \
bash
RUN apk add --no-cache \
bash=5.2.15-r0 \
netcat-openbsd


# Installs Git and packages required for Puppeteer
# https://pkgs.alpinelinux.org/packages
RUN apk add --no-cache \
chromium=112.0.5615.165-r0 \
freetype=2.12.1-r0 \
freetype-dev=2.12.1-r0 \
git=2.38.5-r0 \
harfbuzz=5.3.1-r1 \
ca-certificates=20230506-r0 \
ttf-freefont=20120503-r3

# Tell Puppeteer to skip installing Chrome. We'll be using the installed package.
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser

COPY ./package*.json ./
RUN npm --silent ci


FROM base as dev
RUN apt update -y && apt install -y \
postgresql-client
RUN apk add postgresql-client

FROM base as test
Loading