Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
017eab8d
Commit
017eab8d
authored
Jan 28, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Login: only enabled oauth options are now shown on login page
parent
7e26d7a4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
src/app/components/settings.js
+1
-6
src/app/controllers/loginCtrl.js
+4
-0
src/app/partials/login.html
+2
-2
No files found.
src/app/components/settings.js
View file @
017eab8d
...
@@ -34,12 +34,7 @@ function (_, crypto) {
...
@@ -34,12 +34,7 @@ function (_, crypto) {
}
}
};
};
// This initializes a new hash on purpose, to avoid adding parameters to
var
settings
=
_
.
extend
(
options
,
defaults
);
// config.js without providing sane defaults
var
settings
=
{};
_
.
each
(
defaults
,
function
(
value
,
key
)
{
settings
[
key
]
=
typeof
options
[
key
]
!==
'undefined'
?
options
[
key
]
:
defaults
[
key
];
});
var
parseBasicAuth
=
function
(
datasource
)
{
var
parseBasicAuth
=
function
(
datasource
)
{
var
passwordEnd
=
datasource
.
url
.
indexOf
(
'@'
);
var
passwordEnd
=
datasource
.
url
.
indexOf
(
'@'
);
...
...
src/app/controllers/loginCtrl.js
View file @
017eab8d
...
@@ -16,6 +16,10 @@ function (angular, config) {
...
@@ -16,6 +16,10 @@ function (angular, config) {
};
};
$scope
.
grafana
.
sidemenu
=
false
;
$scope
.
grafana
.
sidemenu
=
false
;
$scope
.
googleAuthEnabled
=
config
.
googleAuthEnabled
;
$scope
.
githubAuthEnabled
=
config
.
githubAuthEnabled
;
$scope
.
loginMode
=
true
;
$scope
.
loginMode
=
true
;
$scope
.
submitBtnClass
=
'btn-inverse'
;
$scope
.
submitBtnClass
=
'btn-inverse'
;
$scope
.
submitBtnText
=
'Log in'
;
$scope
.
submitBtnText
=
'Log in'
;
...
...
src/app/partials/login.html
View file @
017eab8d
...
@@ -80,11 +80,11 @@
...
@@ -80,11 +80,11 @@
<div
class=
"clearfix"
></div>
<div
class=
"clearfix"
></div>
<div
class=
"login-oauth text-center"
>
<div
class=
"login-oauth text-center"
>
<a
class=
"btn btn-google"
href=
"login/google"
target=
"_self"
>
<a
class=
"btn btn-google"
href=
"login/google"
target=
"_self"
ng-if=
"googleAuthEnabled"
>
<i
class=
"fa fa-google"
></i>
<i
class=
"fa fa-google"
></i>
with Google
with Google
</a>
</a>
<a
class=
"btn btn-github"
href=
"login/github"
target=
"_self"
>
<a
class=
"btn btn-github"
href=
"login/github"
target=
"_self"
ng-if=
"githubAuthEnabled"
>
<i
class=
"fa fa-github"
></i>
<i
class=
"fa fa-github"
></i>
with Github
with Github
</a>
</a>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment