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
60abe756
Commit
60abe756
authored
Jul 06, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v3.1.x'
parents
89c3880a
d74eb8c1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
public/app/core/components/sidemenu/sidemenu.html
+1
-1
public/app/core/components/sidemenu/sidemenu.ts
+3
-1
public/app/core/controllers/login_ctrl.js
+6
-1
No files found.
public/app/core/components/sidemenu/sidemenu.html
View file @
60abe756
...
...
@@ -45,7 +45,7 @@
</li>
<li
ng-show=
"::!ctrl.isSignedIn"
>
<a
href=
"login"
class=
"sidemenu-item"
target=
"_self
"
>
<a
href=
"{{ctrl.loginUrl}}"
class=
"sidemenu-item
"
>
<span
class=
"icon-circle sidemenu-icon"
><i
class=
"fa fa-fw fa-sign-in"
></i></span>
<span
class=
"sidemenu-item-text"
>
Sign in
</span>
</a>
...
...
public/app/core/components/sidemenu/sidemenu.ts
View file @
60abe756
...
...
@@ -12,6 +12,7 @@ export class SideMenuCtrl {
mainLinks
:
any
;
orgMenu
:
any
;
appSubUrl
:
string
;
loginUrl
:
string
;
/** @ngInject */
constructor
(
private
$scope
,
private
$location
,
private
contextSrv
,
private
backendSrv
,
private
$element
)
{
...
...
@@ -22,13 +23,14 @@ export class SideMenuCtrl {
this
.
mainLinks
=
config
.
bootData
.
mainNavLinks
;
this
.
openUserDropdown
();
this
.
loginUrl
=
'/login?redirect='
+
encodeURIComponent
(
this
.
$location
.
path
());
this
.
$scope
.
$on
(
'$routeChangeSuccess'
,
()
=>
{
if
(
!
this
.
contextSrv
.
pinned
)
{
this
.
contextSrv
.
sidemenu
=
false
;
}
this
.
loginUrl
=
'/login?redirect='
+
encodeURIComponent
(
this
.
$location
.
path
());
});
}
getUrl
(
url
)
{
...
...
public/app/core/controllers/login_ctrl.js
View file @
60abe756
...
...
@@ -70,7 +70,12 @@ function (angular, coreModule, config) {
}
backendSrv
.
post
(
'/login'
,
$scope
.
formModel
).
then
(
function
(
result
)
{
if
(
result
.
redirectUrl
)
{
var
params
=
$location
.
search
();
if
(
params
.
redirect
&&
params
.
redirect
[
0
]
===
'/'
)
{
window
.
location
.
href
=
config
.
appSubUrl
+
params
.
redirect
;
}
else
if
(
result
.
redirectUrl
)
{
window
.
location
.
href
=
result
.
redirectUrl
;
}
else
{
window
.
location
.
href
=
config
.
appSubUrl
+
'/'
;
...
...
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