-
Notifications
You must be signed in to change notification settings - Fork 14
[OGUI-1701] Implement session-service #2928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
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 7eb645f
Implement frontend service for session management using sessionStorage
Deaponn 84a988d
revert: configuring ESLint and Prettier - commit fbafe80
Deaponn b16b2ec
chore: fix conflicts
Deaponn 98f843f
chore: change code to comply with eslint rules
Deaponn 6d75667
revert: change package.json to not be modified in this PR
Deaponn f79ba10
feature: move proxy from /api to /control
Deaponn b70e2a2
cherry-pick: apply 9c9337c (chore: fix ESLint for test files)
Deaponn 546b1db
feat: implement testing using TypeScript
Deaponn e560e86
style: fix formatting
Deaponn bbf3284
Merge branch 'dev' into feature/CNF/OGUI-1701/session-service
Deaponn f6f00f3
Merge branch 'dev' into feature/CNF/OGUI-1701/session-service
Deaponn e0444ed
Merge branch 'dev' into feature/CNF/OGUI-1701/session-service
Deaponn 3b64325
build: fix package-lock.json
Deaponn a782a24
build: fix package.json and package-lock.json
Deaponn 31c63e1
docs: add JSDoc comments
Deaponn 0533da0
test: update tests and move them to correct directory
Deaponn fcb7809
style: fix formatting
Deaponn 1f9310b
[release/cog/2.0.0] (#3033)
graduta d4ede35
[release/cog/2.0.1] (#3035)
graduta e3a3a9b
Bump puppeteer in /QualityControl in the dev-dependencies group (#3032)
dependabot[bot] 4050150
Bump puppeteer in /InfoLogger in the dev-dependencies group (#3031)
dependabot[bot] 670acdd
Bump @stylistic/eslint-plugin from 4.4.1 to 5.3.1 in /InfoLogger (#3030)
dependabot[bot] 6f687da
Bump puppeteer in /Control in the dev-dependencies group (#3029)
dependabot[bot] fd699cd
Bump @stylistic/eslint-plugin from 4.4.1 to 5.3.1 in /Framework (#3028)
dependabot[bot] a702757
Bump actions/checkout from 4 to 5 (#3025)
dependabot[bot] af8b434
Bump google-protobuf from 3.21.0 to 4.0.0 in /Control (#3006)
dependabot[bot] 6d3d6f2
Bump the dev-dependencies group across 1 directory with 2 updates (#3…
dependabot[bot] c53039e
[OGUI-1722] Runs mode backend: adapt for frontend support (#3022)
mariscalromeroalejandro a1378bb
[OGUI-1722] Integrate runs mode functionality (#3023)
mariscalromeroalejandro 7f7e16c
[release/qcg/3.14.0] (#3042)
graduta 57a20e3
[OGUI-1757] Update layouts controller to allow objects path (#3038)
Houwie7000 ffab90a
[OGUI-1758] object path filtering in repository layer (#3041)
Houwie7000 4645d4c
Bump puppeteer in /Control in the dev-dependencies group (#3044)
dependabot[bot] c766c3f
[OGUI-1762] Improve user messages when accessing runs mode (#3049)
mariscalromeroalejandro 402d54a
[OGUI-1748] QC should be using logging that has facility set per proc…
graduta 05cd429
Bump the dev-dependencies group in /InfoLogger with 4 updates (#3047)
dependabot[bot] 59672d4
Bump the dev-dependencies group in /QualityControl with 4 updates (#3…
dependabot[bot] 2584f20
Bump the dev-dependencies group in /Framework with 4 updates (#3046)
dependabot[bot] 4ae5e9e
Bump vite from 6.3.5 to 6.3.6 in /Configuration/webapp (#3051)
dependabot[bot] d5179f2
[qcg] Refactor/remove unused refresh timer (#3053)
graduta b9b4e55
Bump puppeteer in /Control in the dev-dependencies group (#3055)
dependabot[bot] da65c39
Bump the dev-dependencies group in /QualityControl with 3 updates (#3…
dependabot[bot] 41ecb5d
Bump the dev-dependencies group in /InfoLogger with 3 updates (#3056)
dependabot[bot] 2373ddb
Bump the dev-dependencies group in /Framework with 3 updates (#3058)
dependabot[bot] 52972c4
[OGUI-1769] Keep in-memory information from user's request (#3062)
graduta cf1ca02
[OGUI-1759] /layoutes endpoint now accepts filter query param (#3050)
Houwie7000 d31f1b9
[OGUI-1766] Run mode checkout (#3054)
mariscalromeroalejandro eb94270
[OGUI-1767] Runs mode object tree smart refresh + header refactor (#3…
mariscalromeroalejandro f98f593
Bump @stylistic/eslint-plugin from 5.3.1 to 5.4.0 in /Framework (#3074)
dependabot[bot] cd06cf9
Bump @stylistic/eslint-plugin from 5.3.1 to 5.4.0 in /InfoLogger (#3075)
dependabot[bot] ca0fc17
Bump the dev-dependencies group in /QualityControl with 4 updates (#3…
dependabot[bot] efd4b50
Bump @grpc/grpc-js from 1.13.0 to 1.14.0 in /Control in the grpc grou…
dependabot[bot] e913cd0
Bump puppeteer in /Control in the dev-dependencies group (#3069)
dependabot[bot] 8cde06d
Bump the dev-dependencies group in /Framework with 4 updates (#3071)
dependabot[bot] 42e1bb1
Bump the dev-dependencies group in /InfoLogger with 4 updates (#3073)
dependabot[bot] ecc05aa
[OGUI-1760] Update search UI for object path and add filters (#3065)
Houwie7000 1ce1eaf
[OGUI-329] Add Kafka from ECS Syncronizer in QCG (#3068)
graduta 4640a50
[OGUI-1768] Run mode: smart refresh for object view(s) (#3067)
mariscalromeroalejandro d91800d
[OGUI-1722] Runs mode layout smart refresh (#3078)
mariscalromeroalejandro 2002edd
Bump vite from 6.3.5 to 6.3.6 in /Tokenization/webapp (#3060)
dependabot[bot] 6963145
[OGUI-329] Adapt frontend to kafka events (#3079)
mariscalromeroalejandro 5f9926e
Patch release for COG to fix an issue with undefined users (#3081)
graduta 78e5a74
[release/qcg/3.15.0] (#3082)
graduta 8205ce7
[OGUI-1774] Bugfix: get object by ID properly if in object view from …
mariscalromeroalejandro cb2cb9a
[OGUI-1782] Bug in safari: error using filter property by an iterator…
mariscalromeroalejandro fab41bf
Bump nock in /Control in the dev-dependencies group (#3086)
dependabot[bot] 085f04d
Bump winston from 3.17.0 to 3.18.0 in /Framework (#3090)
dependabot[bot] bb3d214
Bump eslint-plugin-jsdoc in /InfoLogger in the dev-dependencies group…
dependabot[bot] cb71471
Bump the dev-dependencies group across 1 directory with 3 updates (#3…
dependabot[bot] 4a2715b
Bump the dev-dependencies group across 1 directory with 3 updates (#3…
dependabot[bot] cdad3bf
Bump actions/setup-node from 4 to 5 (#3092)
dependabot[bot] 6709e9e
[OGUI-1761] Restrict Lock force ALL actions to admin users only (#3102)
graduta e74270a
Configure docker compose to wait for previous stages
Deaponn 0f192ce
revert: configuring ESLint and Prettier - commit fbafe80
Deaponn 8ef15fb
cherry-pick: apply 9c9337c (chore: fix ESLint for test files)
Deaponn 3e81860
feat: implement testing using TypeScript
Deaponn a1fe94f
build: fix package.json and package-lock.json
Deaponn 63e8534
test: update tests and move them to correct directory
Deaponn 47a28ce
refactor: session service
Deaponn 36b6981
Merge branch 'dev' into feature/CNF/OGUI-1701/session-service
Deaponn a8dd2f2
fix: invocation of undefined function
Deaponn 22dc803
Merge branch 'feature/CNF/OGUI-1701/session-service' of github.com:Al…
Deaponn cb7fab4
Merge branch 'dev' into feature/CNF/OGUI-1701/session-service
Deaponn 0322fd6
Merge branch 'dev' into feature/CNF/OGUI-1701/session-service
Deaponn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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'); | ||
| 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]; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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
hostandportin the request as these can change depending on environment. The browser native methodfetchis smart enough to figure those by itself.It will work the same with:
There was a problem hiding this comment.
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: