mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Navigation: Fix navigation when new password is chosen (#20747)
This commit is contained in:
parent
71792d698b
commit
b3816a2727
@ -1,38 +1,42 @@
|
||||
import React from 'react';
|
||||
import config from 'app/core/config';
|
||||
|
||||
const loginServices: () => LoginServices = () => ({
|
||||
saml: {
|
||||
enabled: config.samlEnabled,
|
||||
name: 'SAML',
|
||||
className: 'github',
|
||||
icon: 'key',
|
||||
},
|
||||
google: {
|
||||
enabled: config.oauth.google,
|
||||
name: 'Google',
|
||||
},
|
||||
github: {
|
||||
enabled: config.oauth.github,
|
||||
name: 'GitHub',
|
||||
},
|
||||
gitlab: {
|
||||
enabled: config.oauth.gitlab,
|
||||
name: 'GitLab',
|
||||
},
|
||||
grafanacom: {
|
||||
enabled: config.oauth.grafana_com,
|
||||
name: 'Grafana.com',
|
||||
hrefName: 'grafana_com',
|
||||
icon: 'grafana_com',
|
||||
},
|
||||
oauth: {
|
||||
enabled: config.oauth.generic_oauth,
|
||||
name: config.oauth.generic_oauth ? config.oauth.generic_oauth.name : 'OAuth',
|
||||
icon: 'sign-in',
|
||||
hrefName: 'generic_oauth',
|
||||
},
|
||||
});
|
||||
const loginServices: () => LoginServices = () => {
|
||||
const oauthEnabled = !!config.oauth;
|
||||
|
||||
return {
|
||||
saml: {
|
||||
enabled: config.samlEnabled,
|
||||
name: 'SAML',
|
||||
className: 'github',
|
||||
icon: 'key',
|
||||
},
|
||||
google: {
|
||||
enabled: oauthEnabled && config.oauth.google,
|
||||
name: 'Google',
|
||||
},
|
||||
github: {
|
||||
enabled: oauthEnabled && config.oauth.github,
|
||||
name: 'GitHub',
|
||||
},
|
||||
gitlab: {
|
||||
enabled: oauthEnabled && config.oauth.gitlab,
|
||||
name: 'GitLab',
|
||||
},
|
||||
grafanacom: {
|
||||
enabled: oauthEnabled && config.oauth.grafana_com,
|
||||
name: 'Grafana.com',
|
||||
hrefName: 'grafana_com',
|
||||
icon: 'grafana_com',
|
||||
},
|
||||
oauth: {
|
||||
enabled: oauthEnabled && config.oauth.generic_oauth,
|
||||
name: oauthEnabled && config.oauth.generic_oauth ? config.oauth.generic_oauth.name : 'OAuth',
|
||||
icon: 'sign-in',
|
||||
hrefName: 'generic_oauth',
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export interface LoginService {
|
||||
enabled: boolean;
|
||||
|
@ -10,7 +10,7 @@
|
||||
<div ng-if="disableLoginForm">
|
||||
You cannot reset password when login form is disabled.
|
||||
</div>
|
||||
<form name="sendResetForm" class="login-form gf-form-group" ng-show="mode === 'send'" ng-hide="ldapEnabled || authProxyEnabled || disableLoginForm">
|
||||
<form name="sendResetForm" class="login-form gf-form-group" ng-show="mode === 'send'" ng-hide="ldapEnabled || authProxyEnabled || disableLoginForm || mode === 'reset'">
|
||||
<div class="gf-form">
|
||||
<span class="gf-form-label width-7">User</span>
|
||||
<input type="text" name="username" class="gf-form-input max-width-14" required ng-model='formModel.userOrEmail' placeholder="email or username">
|
||||
|
Loading…
Reference in New Issue
Block a user