Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
fbafe80
Configure docker compose to wait for previous stages
Deaponn Jun 11, 2025
7eb645f
Implement frontend service for session management using sessionStorage
Deaponn Jun 11, 2025
84a988d
revert: configuring ESLint and Prettier - commit fbafe80
Deaponn Jun 12, 2025
b16b2ec
chore: fix conflicts
Deaponn Jul 3, 2025
98f843f
chore: change code to comply with eslint rules
Deaponn Jul 3, 2025
6d75667
revert: change package.json to not be modified in this PR
Deaponn Jul 3, 2025
f79ba10
feature: move proxy from /api to /control
Deaponn Jul 3, 2025
b70e2a2
cherry-pick: apply 9c9337c (chore: fix ESLint for test files)
Deaponn Jul 1, 2025
546b1db
feat: implement testing using TypeScript
Deaponn Aug 17, 2025
e560e86
style: fix formatting
Deaponn Aug 18, 2025
bbf3284
Merge branch 'dev' into feature/CNF/OGUI-1701/session-service
Deaponn Aug 18, 2025
f6f00f3
Merge branch 'dev' into feature/CNF/OGUI-1701/session-service
Deaponn Aug 24, 2025
e0444ed
Merge branch 'dev' into feature/CNF/OGUI-1701/session-service
Deaponn Aug 30, 2025
3b64325
build: fix package-lock.json
Deaponn Aug 30, 2025
a782a24
build: fix package.json and package-lock.json
Deaponn Sep 1, 2025
31c63e1
docs: add JSDoc comments
Deaponn Sep 1, 2025
0533da0
test: update tests and move them to correct directory
Deaponn Sep 1, 2025
fcb7809
style: fix formatting
Deaponn Sep 1, 2025
1f9310b
[release/cog/2.0.0] (#3033)
graduta Sep 3, 2025
d4ede35
[release/cog/2.0.1] (#3035)
graduta Sep 3, 2025
e3a3a9b
Bump puppeteer in /QualityControl in the dev-dependencies group (#3032)
dependabot[bot] Sep 4, 2025
4050150
Bump puppeteer in /InfoLogger in the dev-dependencies group (#3031)
dependabot[bot] Sep 4, 2025
670acdd
Bump @stylistic/eslint-plugin from 4.4.1 to 5.3.1 in /InfoLogger (#3030)
dependabot[bot] Sep 4, 2025
6f687da
Bump puppeteer in /Control in the dev-dependencies group (#3029)
dependabot[bot] Sep 4, 2025
fd699cd
Bump @stylistic/eslint-plugin from 4.4.1 to 5.3.1 in /Framework (#3028)
dependabot[bot] Sep 4, 2025
a702757
Bump actions/checkout from 4 to 5 (#3025)
dependabot[bot] Sep 4, 2025
af8b434
Bump google-protobuf from 3.21.0 to 4.0.0 in /Control (#3006)
dependabot[bot] Sep 4, 2025
6d3d6f2
Bump the dev-dependencies group across 1 directory with 2 updates (#3…
dependabot[bot] Sep 4, 2025
c53039e
[OGUI-1722] Runs mode backend: adapt for frontend support (#3022)
mariscalromeroalejandro Sep 5, 2025
a1378bb
[OGUI-1722] Integrate runs mode functionality (#3023)
mariscalromeroalejandro Sep 8, 2025
7f7e16c
[release/qcg/3.14.0] (#3042)
graduta Sep 8, 2025
57a20e3
[OGUI-1757] Update layouts controller to allow objects path (#3038)
Houwie7000 Sep 8, 2025
ffab90a
[OGUI-1758] object path filtering in repository layer (#3041)
Houwie7000 Sep 9, 2025
4645d4c
Bump puppeteer in /Control in the dev-dependencies group (#3044)
dependabot[bot] Sep 9, 2025
c766c3f
[OGUI-1762] Improve user messages when accessing runs mode (#3049)
mariscalromeroalejandro Sep 9, 2025
402d54a
[OGUI-1748] QC should be using logging that has facility set per proc…
graduta Sep 10, 2025
05cd429
Bump the dev-dependencies group in /InfoLogger with 4 updates (#3047)
dependabot[bot] Sep 10, 2025
59672d4
Bump the dev-dependencies group in /QualityControl with 4 updates (#3…
dependabot[bot] Sep 10, 2025
2584f20
Bump the dev-dependencies group in /Framework with 4 updates (#3046)
dependabot[bot] Sep 10, 2025
4ae5e9e
Bump vite from 6.3.5 to 6.3.6 in /Configuration/webapp (#3051)
dependabot[bot] Sep 10, 2025
d5179f2
[qcg] Refactor/remove unused refresh timer (#3053)
graduta Sep 10, 2025
b9b4e55
Bump puppeteer in /Control in the dev-dependencies group (#3055)
dependabot[bot] Sep 16, 2025
da65c39
Bump the dev-dependencies group in /QualityControl with 3 updates (#3…
dependabot[bot] Sep 16, 2025
41ecb5d
Bump the dev-dependencies group in /InfoLogger with 3 updates (#3056)
dependabot[bot] Sep 16, 2025
2373ddb
Bump the dev-dependencies group in /Framework with 3 updates (#3058)
dependabot[bot] Sep 16, 2025
52972c4
[OGUI-1769] Keep in-memory information from user's request (#3062)
graduta Sep 16, 2025
cf1ca02
[OGUI-1759] /layoutes endpoint now accepts filter query param (#3050)
Houwie7000 Sep 19, 2025
d31f1b9
[OGUI-1766] Run mode checkout (#3054)
mariscalromeroalejandro Sep 19, 2025
eb94270
[OGUI-1767] Runs mode object tree smart refresh + header refactor (#3…
mariscalromeroalejandro Sep 19, 2025
f98f593
Bump @stylistic/eslint-plugin from 5.3.1 to 5.4.0 in /Framework (#3074)
dependabot[bot] Sep 23, 2025
cd06cf9
Bump @stylistic/eslint-plugin from 5.3.1 to 5.4.0 in /InfoLogger (#3075)
dependabot[bot] Sep 23, 2025
ca0fc17
Bump the dev-dependencies group in /QualityControl with 4 updates (#3…
dependabot[bot] Sep 23, 2025
efd4b50
Bump @grpc/grpc-js from 1.13.0 to 1.14.0 in /Control in the grpc grou…
dependabot[bot] Sep 23, 2025
e913cd0
Bump puppeteer in /Control in the dev-dependencies group (#3069)
dependabot[bot] Sep 23, 2025
8cde06d
Bump the dev-dependencies group in /Framework with 4 updates (#3071)
dependabot[bot] Sep 23, 2025
42e1bb1
Bump the dev-dependencies group in /InfoLogger with 4 updates (#3073)
dependabot[bot] Sep 23, 2025
ecc05aa
[OGUI-1760] Update search UI for object path and add filters (#3065)
Houwie7000 Sep 24, 2025
1ce1eaf
[OGUI-329] Add Kafka from ECS Syncronizer in QCG (#3068)
graduta Sep 24, 2025
4640a50
[OGUI-1768] Run mode: smart refresh for object view(s) (#3067)
mariscalromeroalejandro Sep 24, 2025
d91800d
[OGUI-1722] Runs mode layout smart refresh (#3078)
mariscalromeroalejandro Sep 24, 2025
2002edd
Bump vite from 6.3.5 to 6.3.6 in /Tokenization/webapp (#3060)
dependabot[bot] Sep 24, 2025
6963145
[OGUI-329] Adapt frontend to kafka events (#3079)
mariscalromeroalejandro Sep 25, 2025
5f9926e
Patch release for COG to fix an issue with undefined users (#3081)
graduta Sep 25, 2025
78e5a74
[release/qcg/3.15.0] (#3082)
graduta Sep 25, 2025
8205ce7
[OGUI-1774] Bugfix: get object by ID properly if in object view from …
mariscalromeroalejandro Sep 26, 2025
cb2cb9a
[OGUI-1782] Bug in safari: error using filter property by an iterator…
mariscalromeroalejandro Oct 3, 2025
fab41bf
Bump nock in /Control in the dev-dependencies group (#3086)
dependabot[bot] Oct 3, 2025
085f04d
Bump winston from 3.17.0 to 3.18.0 in /Framework (#3090)
dependabot[bot] Oct 3, 2025
bb3d214
Bump eslint-plugin-jsdoc in /InfoLogger in the dev-dependencies group…
dependabot[bot] Oct 3, 2025
cb71471
Bump the dev-dependencies group across 1 directory with 3 updates (#3…
dependabot[bot] Oct 3, 2025
4a2715b
Bump the dev-dependencies group across 1 directory with 3 updates (#3…
dependabot[bot] Oct 3, 2025
cdad3bf
Bump actions/setup-node from 4 to 5 (#3092)
dependabot[bot] Oct 3, 2025
6709e9e
[OGUI-1761] Restrict Lock force ALL actions to admin users only (#3102)
graduta Oct 6, 2025
e74270a
Configure docker compose to wait for previous stages
Deaponn Jun 11, 2025
0f192ce
revert: configuring ESLint and Prettier - commit fbafe80
Deaponn Jun 12, 2025
8ef15fb
cherry-pick: apply 9c9337c (chore: fix ESLint for test files)
Deaponn Jul 1, 2025
3e81860
feat: implement testing using TypeScript
Deaponn Aug 17, 2025
a1fe94f
build: fix package.json and package-lock.json
Deaponn Sep 1, 2025
63e8534
test: update tests and move them to correct directory
Deaponn Sep 1, 2025
47a28ce
refactor: session service
Deaponn Oct 6, 2025
36b6981
Merge branch 'dev' into feature/CNF/OGUI-1701/session-service
Deaponn Oct 6, 2025
a8dd2f2
fix: invocation of undefined function
Deaponn Oct 7, 2025
22dc803
Merge branch 'feature/CNF/OGUI-1701/session-service' of github.com:Al…
Deaponn Oct 7, 2025
cb7fab4
Merge branch 'dev' into feature/CNF/OGUI-1701/session-service
Deaponn Oct 7, 2025
0322fd6
Merge branch 'dev' into feature/CNF/OGUI-1701/session-service
Deaponn Oct 31, 2025
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
4 changes: 4 additions & 0 deletions Configuration/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ services:
command: ["npm", "install", "--no-save", "--silent"]
webapp:
image: node:22-alpine
depends_on:
- install-webapp
working_dir: /var/workspace
volumes:
- ./webapp:/var/workspace
Expand All @@ -19,6 +21,8 @@ services:

reverse-proxy:
image: nginx:1.27
depends_on:
- webapp
volumes:
- ./docker/provisioning/nginx/conf.d/:/etc/nginx/conf.d/
ports:
Expand Down
4 changes: 4 additions & 0 deletions Configuration/docker/provisioning/nginx/conf.d/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ server {

client_max_body_size 32M;

location /control/ {
proxy_pass http://host.docker.internal:8081/;
}

location / {
proxy_pass http://webapp:5173;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import { useState, type FC, type MouseEvent } from 'react';
import { Box, IconButton, Menu, MenuItem, Avatar } from '@mui/material';
import { getSessionData } from '~/services/session';

interface UserSectionProps {
userName: string;
Expand All @@ -36,6 +37,15 @@ export const UserSection: FC<UserSectionProps> = ({ userName }) => {
setAnchorEl(null);
};

const displayProfileData = () => {
const getData = async () => {
const data = await getSessionData();
alert(JSON.stringify(data));
};

void getData();
};

return (
<Box sx={{ flexGrow: 0 }} className="user-section">
<IconButton sx={{ p: 0 }} onClick={handleClick}>
Expand All @@ -55,7 +65,7 @@ export const UserSection: FC<UserSectionProps> = ({ userName }) => {
onClose={handleClose}
className="user-section__menu"
>
<MenuItem onClick={handleClose}>Profile</MenuItem>
<MenuItem onClick={displayProfileData}>Profile</MenuItem>
<MenuItem onClick={handleClose}>My account</MenuItem>
<MenuItem onClick={handleClose}>Logout</MenuItem>
</Menu>
Expand Down
4 changes: 2 additions & 2 deletions Configuration/webapp/app/routes/runs/details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ import { RunLogs } from '~/components/runs/run-logs';
import { Spinner } from '~/ui/spinner';

const getRun = async (runNumber: number): Promise<Run> => {
const response = await fetch(`http://localhost:8080/api/runs/${runNumber}`);
const response = await fetch(`http://localhost:8080/control/api/runs/${runNumber}`);
if (!response.ok) {
throw data(`Failed to fetch run with run number ${runNumber}`, { status: response.status });
}
return response.json() as Promise<Run>;
};

const getLogs = async (runNumber: number): Promise<Log[]> => {
const response = await fetch(`http://localhost:8080/api/runs/${runNumber}/logs`);
const response = await fetch(`http://localhost:8080/control/api/runs/${runNumber}/logs`);
if (!response.ok) {
throw data(`Failed to fetch logs related to run with run number ${runNumber}`, {
status: response.status,
Expand Down
2 changes: 1 addition & 1 deletion Configuration/webapp/app/routes/runs/overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import type { Route } from './+types/overview';
import { Link } from 'react-router';

export const clientLoader = async (): Promise<Run[]> => {
const response = await fetch('http://localhost:8080/api/runs');
const response = await fetch('http://localhost:8080/control/api/runs');
if (!response.ok) {
throw new Error('An error occurred!');
}
Expand Down
50 changes: 50 additions & 0 deletions Configuration/webapp/app/services/session.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/**
* @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 sessionData: Record<string, string> = {};

/**
* Function for fetching session data from the Control server
*/
async function fetchSessionData() {
// only to get the data from server redirect
// (line 264, commit 3ba4600 of github.com/AliceO2Group/WebUi/blob/dev/Framework/Backend/http/server.js)
// this should be replaced with endpoint designed for authentication only
const response = await fetch('http://localhost:8080/control');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should not be using the host and port in the request as these can change depending on environment. The browser native method fetch is smart enough to figure those by itself.
It will work the same with:

const response = await fetch('control');

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes the following error occur while running tests:

1) `pageRoot` test-suite
       should load session data into memory:
     TypeError: Failed to parse URL from control
      at node:internal/deps/undici/undici:13510:13
      at async fetchSessionData (app/services/session.ts:24:20)
      at async getSessionData (app/services/session.ts:37:5)

const { searchParams } = new URL(response.url);
searchParams.forEach((value, key) => {
sessionData[key] = value;
});
}

/**
* Function for reading session data fetched from the Control server
* @returns {Record<string, string>} sessionData
*/
export async function getSessionData(): Promise<Record<string, string>> {
if (Object.keys(sessionData).length === 0) {
await fetchSessionData();
}
return sessionData;
}

/**
* Function for deleting session data fetched from the Control server
* Intended to logout the user
*/
export function deleteSessionData() {
for (const key in sessionData) {
delete sessionData[key];
}
}
3 changes: 2 additions & 1 deletion Configuration/webapp/app/ui/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import { NavLink } from 'react-router';
import type { NavLinkProps } from 'react-router';
import { getSessionData } from '~/services/session';

const StyledNavLink = ({ children, ...props }: NavLinkProps) => (
<NavLink {...props} className={({ isActive }) => `btn btn-tab ${isActive ? 'selected' : ''}`}>
Expand All @@ -28,7 +29,7 @@ export const Navbar = () => (
<StyledNavLink className={'btnStyledNav btn-tab'} to={'/runs'}>
Runs
</StyledNavLink>
<button onClick={() => alert(JSON.stringify(getSessionData()))}>Log session data</button>
</div>
<div></div>
</nav>
);
13 changes: 11 additions & 2 deletions Configuration/webapp/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ export default tseslint.config(
},
},
{
files: ['app/test/**/*.cjs', 'app/test/**/*.js'],
files: ['test/**'],
extends: [
pluginJs.configs.recommended,
mochaPlugin.configs.recommended,
Expand All @@ -293,7 +293,7 @@ export default tseslint.config(
mocha: mochaPlugin,
},
languageOptions: {
sourceType: 'script', // For .cjs and plain .js files
sourceType: 'module',
ecmaVersion: 'latest',
globals: {
...globals.node,
Expand All @@ -303,6 +303,15 @@ export default tseslint.config(
},
rules: {
'mocha/no-setup-in-describe': 'off',
'no-console': 'off',
'prefer-arrow-callback': 'off'
},
},
{
files: ['app/test/**'],
rules: {
'no-console': 'off',
'prefer-arrow-callback': 'off'
}
},
);
Loading