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
0bf37b8c
Commit
0bf37b8c
authored
Oct 24, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #981 from swoop-inc/mb_value_update_bug
When get_data fails the legend should be cleared
parents
0e5dbf38
5cec9361
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
src/app/panels/graph/module.js
+1
-0
src/test/specs/graph-ctrl-specs.js
+14
-0
No files found.
src/app/panels/graph/module.js
View file @
0bf37b8c
...
...
@@ -203,6 +203,7 @@ function (angular, app, $, _, kbn, moment, TimeSeries) {
$scope
.
panelMeta
.
loading
=
false
;
$scope
.
panelMeta
.
error
=
err
.
message
||
"Timeseries data request error"
;
$scope
.
inspector
.
error
=
err
;
$scope
.
legend
=
[];
$scope
.
render
([]);
});
};
...
...
src/test/specs/graph-ctrl-specs.js
View file @
0bf37b8c
...
...
@@ -36,6 +36,20 @@ define([
var
data
=
ctx
.
scope
.
render
.
getCall
(
0
).
args
[
0
];
expect
(
data
.
length
).
to
.
be
(
2
);
});
describe
(
'get_data failure following success'
,
function
()
{
beforeEach
(
function
()
{
ctx
.
datasource
.
query
=
sinon
.
stub
().
returns
(
ctx
.
$q
.
reject
(
'Datasource Error'
));
ctx
.
scope
.
get_data
();
ctx
.
scope
.
$digest
();
});
it
(
'should clear the legend data'
,
function
()
{
expect
(
ctx
.
scope
.
legend
).
to
.
eql
([]);
});
});
});
});
...
...
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