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
382f7066
Commit
382f7066
authored
Apr 06, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed importing dashboards from graphite web issue
parent
08c19692
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
public/app/features/dashboard/graphiteImportCtrl.js
+10
-8
public/app/features/dashboard/partials/graphiteImport.html
+1
-1
No files found.
public/app/features/dashboard/graphiteImportCtrl.js
View file @
382f7066
...
...
@@ -10,25 +10,27 @@ function (angular, app, _, kbn) {
var
module
=
angular
.
module
(
'grafana.controllers'
);
module
.
controller
(
'GraphiteImportCtrl'
,
function
(
$scope
,
datasourceSrv
,
dashboardSrv
,
$location
)
{
$scope
.
options
=
{};
$scope
.
init
=
function
()
{
$scope
.
datasources
=
[];
_
.
each
(
datasourceSrv
.
getAll
(),
function
(
ds
)
{
if
(
ds
.
type
===
'graphite'
)
{
$scope
.
sourceName
=
ds
.
name
;
$scope
.
options
.
sourceName
=
ds
.
name
;
$scope
.
datasources
.
push
(
ds
.
name
);
}
});
};
$scope
.
listAll
=
function
()
{
$scope
.
datasource
=
datasourceSrv
.
get
(
$scope
.
sourceName
);
$scope
.
datasource
.
listDashboards
(
''
).
then
(
function
(
results
)
{
$scope
.
dashboards
=
results
;
},
function
(
err
)
{
var
message
=
err
.
message
||
err
.
statusText
||
'Error'
;
$scope
.
appEvent
(
'alert-error'
,
[
'Failed to load dashboard list from graphite'
,
message
]);
datasourceSrv
.
get
(
$scope
.
options
.
sourceName
).
then
(
function
(
datasource
)
{
$scope
.
datasource
=
datasource
;
$scope
.
datasource
.
listDashboards
(
''
).
then
(
function
(
results
)
{
$scope
.
dashboards
=
results
;
},
function
(
err
)
{
var
message
=
err
.
message
||
err
.
statusText
||
'Error'
;
$scope
.
appEvent
(
'alert-error'
,
[
'Failed to load dashboard list from graphite'
,
message
]);
});
});
};
...
...
public/app/features/dashboard/partials/graphiteImport.html
View file @
382f7066
...
...
@@ -9,7 +9,7 @@
<strong>
Data source
</strong>
</li>
<li>
<select
type=
"text"
ng-model=
"sourceName"
class=
"input-medium tight-form-input"
ng-options=
"f for f in datasources"
>
<select
type=
"text"
ng-model=
"
options.
sourceName"
class=
"input-medium tight-form-input"
ng-options=
"f for f in datasources"
>
</select>
</li>
<li
style=
"float: right"
>
...
...
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