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
26ea0bc3
Commit
26ea0bc3
authored
May 18, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(export): work on export
parent
6632f883
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
4 deletions
+15
-4
public/app/features/dashboard/dashboardSrv.js
+1
-0
public/app/features/dashboard/export/exporter.ts
+3
-1
public/app/features/dashboard/import/import.html
+1
-1
public/app/features/dashboard/import/import.ts
+4
-0
public/app/features/dashboard/partials/settings.html
+6
-2
No files found.
public/app/features/dashboard/dashboardSrv.js
View file @
26ea0bc3
...
...
@@ -22,6 +22,7 @@ function (angular, $, _, moment) {
this
.
id
=
data
.
id
||
null
;
this
.
title
=
data
.
title
||
'No Title'
;
this
.
description
=
data
.
description
;
this
.
tags
=
data
.
tags
||
[];
this
.
style
=
data
.
style
||
"dark"
;
this
.
timezone
=
data
.
timezone
||
''
;
...
...
public/app/features/dashboard/export/exporter.ts
View file @
26ea0bc3
...
...
@@ -26,9 +26,11 @@ export class DashboardExporter {
_
.
each
(
row
.
panels
,
(
panel
)
=>
{
if
(
panel
.
datasource
!==
undefined
)
{
promises
.
push
(
this
.
datasourceSrv
.
get
(
panel
.
datasource
).
then
(
ds
=>
{
var
refName
=
'DS_'
+
ds
.
name
.
toUpperCase
();
var
refName
=
'DS_'
+
ds
.
name
.
replace
(
' '
,
'_'
).
toUpperCase
();
datasources
[
panel
.
datasource
]
=
{
name
:
refName
,
label
:
ds
.
name
,
description
:
''
,
type
:
'datasource'
,
pluginId
:
ds
.
meta
.
id
,
pluginName
:
ds
.
meta
.
name
,
...
...
public/app/features/dashboard/import/import.html
View file @
26ea0bc3
...
...
@@ -62,7 +62,7 @@
<div
ng-repeat=
"input in ctrl.inputs"
>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label width-15"
>
{{input.
name
}}
</label>
<label
class=
"gf-form-label width-15"
>
{{input.
label
}}
</label>
<div
class=
"gf-form-select-wrapper"
style=
"width: 100%"
>
<select
class=
"gf-form-input"
ng-model=
"input.value"
ng-options=
"v.value as v.text for v in input.options"
ng-change=
"ctrl.inputValueChanged()"
></select>
</div>
...
...
public/app/features/dashboard/import/import.ts
View file @
26ea0bc3
...
...
@@ -31,6 +31,8 @@ export class DashImportCtrl {
for
(
let
input
of
this
.
dash
.
__inputs
)
{
var
inputModel
=
{
name
:
input
.
name
,
label
:
input
.
label
,
description
:
input
.
description
,
type
:
input
.
type
,
pluginId
:
input
.
pluginId
,
options
:
[]
...
...
@@ -55,6 +57,8 @@ export class DashImportCtrl {
if
(
sources
.
length
===
0
)
{
inputModel
.
error
=
"No data sources of type "
+
input
.
pluginName
+
" found"
;
}
else
if
(
inputModel
.
description
)
{
inputModel
.
info
=
inputModel
.
description
;
}
else
{
inputModel
.
info
=
"Select a "
+
input
.
pluginName
+
" data source"
;
}
...
...
public/app/features/dashboard/partials/settings.html
View file @
26ea0bc3
...
...
@@ -23,9 +23,13 @@
<h5
class=
"section-heading"
>
Details
</h5>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label width-7"
>
Title
</label>
<input
type=
"text"
class=
"gf-form-input width-
25
"
ng-model=
'dashboard.title'
></input>
<input
type=
"text"
class=
"gf-form-input width-
30
"
ng-model=
'dashboard.title'
></input>
</div>
<div
class=
"gf-form"
>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label width-7"
>
Description
</label>
<input
type=
"text"
class=
"gf-form-input width-30"
ng-model=
'dashboard.description'
></input>
</div>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label width-7"
>
Tags
<info-popover
mode=
"right-normal"
>
Press enter to a add tag
</info-popover>
...
...
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