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
29f6283e
Commit
29f6283e
authored
Nov 21, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into external-plugins
parents
4a69de1f
396f53d2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
+6
-1
pkg/models/dashboards.go
+5
-0
public/app/plugins/datasource/elasticsearch/specs/elastic_response_specs.ts
+1
-1
No files found.
pkg/models/dashboards.go
View file @
29f6283e
...
@@ -43,6 +43,8 @@ func NewDashboard(title string) *Dashboard {
...
@@ -43,6 +43,8 @@ func NewDashboard(title string) *Dashboard {
dash
.
Data
=
make
(
map
[
string
]
interface
{})
dash
.
Data
=
make
(
map
[
string
]
interface
{})
dash
.
Data
[
"title"
]
=
title
dash
.
Data
[
"title"
]
=
title
dash
.
Title
=
title
dash
.
Title
=
title
dash
.
Created
=
time
.
Now
()
dash
.
Updated
=
time
.
Now
()
dash
.
UpdateSlug
()
dash
.
UpdateSlug
()
return
dash
return
dash
}
}
...
@@ -73,9 +75,12 @@ func NewDashboardFromJson(data map[string]interface{}) *Dashboard {
...
@@ -73,9 +75,12 @@ func NewDashboardFromJson(data map[string]interface{}) *Dashboard {
if
dash
.
Data
[
"version"
]
!=
nil
{
if
dash
.
Data
[
"version"
]
!=
nil
{
dash
.
Version
=
int
(
dash
.
Data
[
"version"
]
.
(
float64
))
dash
.
Version
=
int
(
dash
.
Data
[
"version"
]
.
(
float64
))
dash
.
Updated
=
time
.
Now
()
}
}
}
else
{
}
else
{
dash
.
Data
[
"version"
]
=
0
dash
.
Data
[
"version"
]
=
0
dash
.
Created
=
time
.
Now
()
dash
.
Updated
=
time
.
Now
()
}
}
return
dash
return
dash
...
...
public/app/plugins/datasource/elasticsearch/specs/elastic_response_specs.ts
View file @
29f6283e
...
@@ -443,7 +443,7 @@ describe('ElasticResponse', function() {
...
@@ -443,7 +443,7 @@ describe('ElasticResponse', function() {
result
=
new
ElasticResponse
(
targets
,
response
).
getTimeSeries
();
result
=
new
ElasticResponse
(
targets
,
response
).
getTimeSeries
();
});
});
it
.
only
(
'should return table'
,
function
()
{
it
(
'should return table'
,
function
()
{
expect
(
result
.
data
.
length
).
to
.
be
(
1
);
expect
(
result
.
data
.
length
).
to
.
be
(
1
);
expect
(
result
.
data
[
0
].
type
).
to
.
be
(
'docs'
);
expect
(
result
.
data
[
0
].
type
).
to
.
be
(
'docs'
);
expect
(
result
.
data
[
0
].
datapoints
.
length
).
to
.
be
(
2
);
expect
(
result
.
data
[
0
].
datapoints
.
length
).
to
.
be
(
2
);
...
...
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