-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
slurm-web: add patch for racksdb bearer token bug
For reference: rackslab/Slurm-web#471
- Loading branch information
Showing
4 changed files
with
70 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -9,6 +9,6 @@ derivatives: | |
main: 4.1.0 | ||
slurmweb-3: 3.2.0 | ||
rpm: | ||
release: 1 | ||
release: 2 | ||
deb: | ||
release: 1 | ||
release: 2 |
This file contains 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 |
---|---|---|
|
@@ -8,7 +8,7 @@ Author: Rémi Palancher <[email protected]> | |
|
||
|
||
diff --git a/slurmweb/apps/gateway.py b/slurmweb/apps/gateway.py | ||
index eacf17d..a11331e 100644 | ||
index f7abbf1..6f90eaf 100644 | ||
--- a/slurmweb/apps/gateway.py | ||
+++ b/slurmweb/apps/gateway.py | ||
@@ -5,6 +5,7 @@ | ||
|
This file contains 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,20 @@ | ||
Description: Send bearer token in headers of RacksDB diagram request, | ||
as required with RFL >= 1.3.0. | ||
Last-Update: 2025-02-10 | ||
Author: Rémi Palancher <[email protected]> | ||
Forwarded: https://github.com/rackslab/Slurm-web/issues/471 | ||
|
||
|
||
diff --git a/frontend/src/composables/GatewayAPI.ts b/frontend/src/composables/GatewayAPI.ts | ||
index 2135797..e837dad 100644 | ||
--- a/frontend/src/composables/GatewayAPI.ts | ||
+++ b/frontend/src/composables/GatewayAPI.ts | ||
@@ -532,7 +532,7 @@ export function useGatewayAPI() { | ||
dimensions: { width: width, height: height }, | ||
infrastructure: { equipment_labels: false, ghost_unselected: true } | ||
}, | ||
- false, | ||
+ true, | ||
'arraybuffer' | ||
) | ||
// parse multipart response with Response.formData() |
This file contains 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,47 @@ | ||
Description: Send bearer token in headers of RacksDB diagram request, | ||
as required with RFL >= 1.3.0. | ||
Last-Update: 2025-02-10 | ||
Author: Rémi Palancher <[email protected]> | ||
Forwarded: https://github.com/rackslab/Slurm-web/issues/471 | ||
|
||
|
||
diff --git a/frontend/src/composables/GatewayAPI.ts b/frontend/src/composables/GatewayAPI.ts | ||
index f4780e8..8ed0d2a 100644 | ||
--- a/frontend/src/composables/GatewayAPI.ts | ||
+++ b/frontend/src/composables/GatewayAPI.ts | ||
@@ -456,7 +456,7 @@ export function useGatewayAPI() { | ||
|
||
async function login(idents: loginIdents): Promise<GatewayLoginResponse> { | ||
try { | ||
- return (await restAPI.post('/login', idents)) as GatewayLoginResponse | ||
+ return (await restAPI.post('/login', idents, false)) as GatewayLoginResponse | ||
} catch (error: any) { | ||
/* Translate 401 APIServerError into AuthenticationError */ | ||
if (error instanceof APIServerError && error.status == 401) { | ||
@@ -468,7 +468,7 @@ export function useGatewayAPI() { | ||
|
||
async function anonymousLogin(): Promise<GatewayAnonymousLoginResponse> { | ||
try { | ||
- return (await restAPI.get('/anonymous')) as GatewayAnonymousLoginResponse | ||
+ return (await restAPI.get('/anonymous', false)) as GatewayAnonymousLoginResponse | ||
} catch (error: any) { | ||
/* Translate 401 APIServerError into AuthenticationError */ | ||
if (error instanceof APIServerError && error.status == 401) { | ||
@@ -479,7 +479,7 @@ export function useGatewayAPI() { | ||
} | ||
|
||
async function message_login(): Promise<string> { | ||
- return await restAPI.get<string>(`/messages/login`) | ||
+ return await restAPI.get<string>('/messages/login', false) | ||
} | ||
|
||
async function clusters(): Promise<Array<ClusterDescription>> { | ||
@@ -567,7 +567,7 @@ export function useGatewayAPI() { | ||
dimensions: { width: width, height: height }, | ||
infrastructure: { equipment_labels: false, ghost_unselected: true } | ||
}, | ||
- false, | ||
+ true, | ||
'arraybuffer' | ||
) | ||
// parse multipart response with Response.formData() |