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
430bdd03
Commit
430bdd03
authored
Feb 28, 2013
by
Rashid Khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed loading of default.json
parent
7bd7e3b6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
js/controllers.js
+0
-1
panels/dashcontrol/module.js
+3
-2
No files found.
js/controllers.js
View file @
430bdd03
...
@@ -20,7 +20,6 @@ angular.module('kibana.controllers', [])
...
@@ -20,7 +20,6 @@ angular.module('kibana.controllers', [])
// Load dashboard by event
// Load dashboard by event
eventBus
.
register
(
$scope
,
'dashboard'
,
function
(
event
,
dashboard
){
eventBus
.
register
(
$scope
,
'dashboard'
,
function
(
event
,
dashboard
){
console
.
log
(
dashboard
)
$scope
.
dashboards
=
dashboard
;
$scope
.
dashboards
=
dashboard
;
_
.
defaults
(
$scope
.
dashboards
,
_d
)
_
.
defaults
(
$scope
.
dashboards
,
_d
)
})
})
...
...
panels/dashcontrol/module.js
View file @
430bdd03
...
@@ -48,6 +48,7 @@ angular.module('kibana.dashcontrol', [])
...
@@ -48,6 +48,7 @@ angular.module('kibana.dashcontrol', [])
)
{
)
{
var
dashboard
=
JSON
.
parse
(
localStorage
[
'dashboard'
]);
var
dashboard
=
JSON
.
parse
(
localStorage
[
'dashboard'
]);
_
.
defaults
(
dashboard
,
_dash
);
_
.
defaults
(
dashboard
,
_dash
);
$scope
.
dash_load
(
JSON
.
stringify
(
dashboard
))
// No? Ok, grab default.json, its all we have now
// No? Ok, grab default.json, its all we have now
}
else
{
}
else
{
$http
({
$http
({
...
@@ -56,12 +57,12 @@ angular.module('kibana.dashcontrol', [])
...
@@ -56,12 +57,12 @@ angular.module('kibana.dashcontrol', [])
}).
success
(
function
(
data
,
status
,
headers
,
config
)
{
}).
success
(
function
(
data
,
status
,
headers
,
config
)
{
var
dashboard
=
data
var
dashboard
=
data
_
.
defaults
(
dashboard
,
_dash
);
_
.
defaults
(
dashboard
,
_dash
);
$scope
.
dash_load
(
JSON
.
stringify
(
dashboard
))
}).
error
(
function
(
data
,
status
,
headers
,
config
)
{
}).
error
(
function
(
data
,
status
,
headers
,
config
)
{
$scope
.
alert
(
'Default dashboard missing!'
,
'Could not locate default.json'
,
'error'
)
$scope
.
alert
(
'Default dashboard missing!'
,
'Could not locate default.json'
,
'error'
)
});
});
}
}
// Load whatever we have
$scope
.
dash_load
(
dashboard
)
}
}
}
}
...
...
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