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
617d18e5
Commit
617d18e5
authored
May 19, 2016
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(panel): active tab is now placed in querystring aswell
parent
2b06ceda
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
public/app/features/panel/panel_ctrl.ts
+11
-3
public/app/features/panel/panel_directive.ts
+1
-1
No files found.
public/app/features/panel/panel_ctrl.ts
View file @
617d18e5
...
...
@@ -91,16 +91,24 @@ export class PanelCtrl {
this
.
editModeInitiated
=
true
;
this
.
events
.
emit
(
'init-edit-mode'
,
null
);
var
route
=
this
.
$injector
.
get
(
'$route
'
);
if
(
route
.
current
.
p
arams
.
editorTab
)
{
var
route
Params
=
this
.
$injector
.
get
(
'$routeParams
'
);
if
(
route
P
arams
.
editorTab
)
{
this
.
editorTabs
.
forEach
((
tab
,
i
)
=>
{
if
(
tab
.
title
===
route
.
current
.
p
arams
.
editorTab
)
{
if
(
tab
.
title
===
route
P
arams
.
editorTab
)
{
this
.
editorTabIndex
=
i
;
}
});
}
}
changeTab
(
newIndex
)
{
this
.
editorTabIndex
=
newIndex
;
var
route
=
this
.
$injector
.
get
(
'$route'
);
route
.
current
.
params
.
editorTab
=
this
.
editorTabs
[
newIndex
].
title
;
route
.
updateParams
();
}
addEditorTab
(
title
,
directiveFn
,
index
?)
{
var
editorTab
=
{
title
,
directiveFn
};
...
...
public/app/features/panel/panel_directive.ts
View file @
617d18e5
...
...
@@ -36,7 +36,7 @@ var panelTemplate = `
<ul class="gf-tabs">
<li class="gf-tabs-item" ng-repeat="tab in ::ctrl.editorTabs">
<a class="gf-tabs-link" ng-click="ctrl.
editorTabIndex = $index
" ng-class="{active: ctrl.editorTabIndex === $index}">
<a class="gf-tabs-link" ng-click="ctrl.
changeTab($index)
" ng-class="{active: ctrl.editorTabIndex === $index}">
{{::tab.title}}
</a>
</li>
...
...
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