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
72974719
Commit
72974719
authored
Jan 06, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remember last dashboard
parent
49b18e17
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
src/app/features/grafanaDatasource/partials/query.editor.html
+1
-1
src/app/partials/sidemenu.html
+0
-4
src/app/routes/backend/dashboard.js
+9
-1
No files found.
src/app/features/grafanaDatasource/partials/query.editor.html
View file @
72974719
...
...
@@ -6,7 +6,7 @@
<p>
This is just a test data source that generates random walk series. If this is your only data source
open the left side menu and
goto
data sources admin screen and add your data sources. You can change
open the left side menu and
navigate to the
data sources admin screen and add your data sources. You can change
data source using the button to the left of the
<strong>
Add query
</strong>
button.
</p>
</div>
...
...
src/app/partials/sidemenu.html
View file @
72974719
...
...
@@ -24,10 +24,6 @@
<i
class=
"icon-sitemap"
></i>
Data sources
</a>
<a
class=
"pro-sidemenu-link"
href=
"admin"
>
<i
class=
"icon-tasks"
></i>
Global options
</a>
<a
class=
"pro-sidemenu-link"
href=
"account"
>
<i
class=
"icon-user"
></i>
Account settings
...
...
src/app/routes/backend/dashboard.js
View file @
72974719
...
...
@@ -33,6 +33,9 @@ function (angular, store) {
});
});
// remember previous dashboard
var
prevDashPath
=
null
;
module
.
controller
(
'DashFromDBProvider'
,
function
(
$scope
,
$rootScope
,
datasourceSrv
,
$routeParams
,
alertSrv
,
$http
,
$location
)
{
...
...
@@ -41,8 +44,12 @@ function (angular, store) {
var
isTemp
=
window
.
location
.
href
.
indexOf
(
'dashboard/temp'
)
!==
-
1
;
if
(
!
$routeParams
.
id
)
{
var
savedRoute
=
store
.
get
(
'grafanaDashboardDefault'
);
// do we have a previous dash
if
(
prevDashPath
)
{
$location
.
path
(
prevDashPath
);
}
var
savedRoute
=
store
.
get
(
'grafanaDashboardDefault'
);
if
(
!
savedRoute
)
{
$http
.
get
(
"app/dashboards/default.json?"
+
new
Date
().
getTime
()).
then
(
function
(
result
)
{
var
dashboard
=
angular
.
fromJson
(
result
.
data
);
...
...
@@ -61,6 +68,7 @@ function (angular, store) {
db
.
getDashboard
(
$routeParams
.
id
,
isTemp
)
.
then
(
function
(
dashboard
)
{
prevDashPath
=
$location
.
path
();
$scope
.
initDashboard
(
dashboard
,
$scope
);
}).
then
(
null
,
function
(
err
)
{
$scope
.
appEvent
(
'alert-error'
,
[
'Load dashboard failed'
,
err
]);
...
...
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