Mise à jour configuration et accès TrizRis dans OHIF
Build and Deploy Docs / build-and-deploy-docs (push) Canceled after 0s
Build and Deploy Docs / build-and-deploy-docs (push) Canceled after 0s
This commit is contained in:
1 parent
32b664fc1d
commit
753501679f
3 files changed
+6
-5
No files matched your search
@@ -30,7 +30,7 @@ window.config = {
|
|||||||
|
|
||||||
showStudyList: true,
|
showStudyList: true,
|
||||||
|
|
||||||
maxNumberOfWebWorkers: 3,
|
maxNumberOfWebWorkers: 1,
|
||||||
|
|
||||||
showWarningMessageForCrossOrigin: true,
|
showWarningMessageForCrossOrigin: true,
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export default function TrizRisProtectedRoute({ children }: Props) {
|
|||||||
|
|
||||||
console.log('### VERIFICATION ACCES TRIZRIS ###', result);
|
console.log('### VERIFICATION ACCES TRIZRIS ###', result);
|
||||||
|
|
||||||
setAuthorized(result);
|
setAuthorized(result !== null && result.authorized === true);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('### ERREUR VERIFICATION ACCES TRIZRIS ###', error);
|
console.error('### ERREUR VERIFICATION ACCES TRIZRIS ###', error);
|
||||||
|
|
||||||
@@ -45,8 +45,7 @@ export default function TrizRisProtectedRoute({ children }: Props) {
|
|||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// Pendant la vérification :
|
// Vérification en cours
|
||||||
// on n'affiche PAS encore le viewer.
|
|
||||||
if (checking) {
|
if (checking) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
@@ -59,6 +58,7 @@ export default function TrizRisProtectedRoute({ children }: Props) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Accès refusé
|
||||||
if (!authorized) {
|
if (!authorized) {
|
||||||
return (
|
return (
|
||||||
<Navigate
|
<Navigate
|
||||||
@@ -68,5 +68,6 @@ export default function TrizRisProtectedRoute({ children }: Props) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Accès autorisé : afficher OHIF
|
||||||
return <>{children}</>;
|
return <>{children}</>;
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
const sharedConfig = require('../../config/trizris.shared');
|
import sharedConfig from '../../../app/config/trizris.shared';
|
||||||
|
|
||||||
export const TrizRisConfig = {
|
export const TrizRisConfig = {
|
||||||
apiBaseUrl: `${sharedConfig.TRIZRIS_BASE_URL}/api`,
|
apiBaseUrl: `${sharedConfig.TRIZRIS_BASE_URL}/api`,
|
||||||
|
|||||||
Reference in new issue
Block a user