summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/framework/src/views/login.tsx
diff options
context:
space:
mode:
authorMichael Dürre <michael.duerre@highstreet-technologies.com>2022-09-08 09:45:06 +0200
committerMichael Dürre <michael.duerre@highstreet-technologies.com>2022-09-08 09:46:47 +0200
commita2b6dd34d73bf432846dc59c6f57dd59a03aff9b (patch)
tree35658e382769bc7575f87d0e9580d6ee98230eb2 /sdnr/wt/odlux/framework/src/views/login.tsx
parent6f9c3d2cea04a2af7a73d8df1de87d584b277552 (diff)
update odlux sources
update basic odlux functionality for kohn Issue-ID: CCSDK-3765 Signed-off-by: Michael Dürre <michael.duerre@highstreet-technologies.com> Change-Id: I3723c9c2f35b9012ba537920b294a54bb556cbc6 Signed-off-by: Michael Dürre <michael.duerre@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/odlux/framework/src/views/login.tsx')
-rw-r--r--sdnr/wt/odlux/framework/src/views/login.tsx28
1 files changed, 24 insertions, 4 deletions
diff --git a/sdnr/wt/odlux/framework/src/views/login.tsx b/sdnr/wt/odlux/framework/src/views/login.tsx
index 8eb7a6c0f..e037edf82 100644
--- a/sdnr/wt/odlux/framework/src/views/login.tsx
+++ b/sdnr/wt/odlux/framework/src/views/login.tsx
@@ -119,6 +119,7 @@ interface ILoginState {
password: string;
scope: string;
message: string;
+ isServerReady: boolean;
providers: {
id: string;
title: string;
@@ -141,6 +142,7 @@ class LoginComponent extends React.Component<LoginProps, ILoginState> {
scope: 'sdn',
message: '',
providers: null,
+ isServerReady: false
};
}
@@ -148,6 +150,13 @@ class LoginComponent extends React.Component<LoginProps, ILoginState> {
if (this.props.authentication === "oauth" && (this.props.externalLoginProviders == null || this.props.externalLoginProviders.length === 0)){
this.props.updateExternalProviders();
}
+
+ authenticationService.getServerReadyState().then(result =>{
+ this.setState({isServerReady: result});
+ })
+
+
+
}
private setExternalProviderAnchor = (el: HTMLElement | null) => {
@@ -262,10 +271,21 @@ class LoginComponent extends React.Component<LoginProps, ILoginState> {
this.props.history.replace(returnTo && returnTo[1] || "/");
}
else {
- this.setState({
- message: "Could not log in. Please check your credentials or ask your administrator for assistence.",
- password: ""
- })
+
+ if(!this.state.isServerReady){
+ const ready = await authenticationService.getServerReadyState();
+ if(ready){
+ this.setState({isServerReady: true});
+ }else{
+ this.setState({message: "Login is currently not possible. Please re-try in a few minutes. If the problem persits, ask your administrator for assistence."});
+ }
+
+ }else{
+ this.setState({
+ message: "Could not log in. Please check your credentials or ask your administrator for assistence.",
+ password: ""
+ })
+ }
}
}
}