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
d446887e
Commit
d446887e
authored
Dec 08, 2013
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed issue with loading spinner
parent
fb084a24
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
src/app/panels/graphite/module.js
+8
-9
No files found.
src/app/panels/graphite/module.js
View file @
d446887e
...
@@ -300,6 +300,7 @@ function (angular, app, $, _, kbn, moment, timeSeries, graphiteSrv) {
...
@@ -300,6 +300,7 @@ function (angular, app, $, _, kbn, moment, timeSeries, graphiteSrv) {
}
}
$scope
.
panelMeta
.
loading
=
false
;
$scope
.
panelMeta
.
loading
=
false
;
$scope
.
$apply
();
// Tell the histogram directive to render.
// Tell the histogram directive to render.
$scope
.
$emit
(
'render'
);
$scope
.
$emit
(
'render'
);
...
@@ -317,6 +318,7 @@ function (angular, app, $, _, kbn, moment, timeSeries, graphiteSrv) {
...
@@ -317,6 +318,7 @@ function (angular, app, $, _, kbn, moment, timeSeries, graphiteSrv) {
}
}
console
.
log
(
'Data from graphite:'
,
results
);
console
.
log
(
'Data from graphite:'
,
results
);
console
.
log
(
'nr datapoints from graphite: %d'
,
results
[
0
].
datapoints
.
length
);
var
tsOpts
=
{
var
tsOpts
=
{
interval
:
interval
,
interval
:
interval
,
...
@@ -325,8 +327,6 @@ function (angular, app, $, _, kbn, moment, timeSeries, graphiteSrv) {
...
@@ -325,8 +327,6 @@ function (angular, app, $, _, kbn, moment, timeSeries, graphiteSrv) {
fill_style
:
'connect'
fill_style
:
'connect'
};
};
var
hits
=
0
;
_
.
each
(
results
,
function
(
targetData
)
{
_
.
each
(
results
,
function
(
targetData
)
{
var
time_series
=
new
timeSeries
.
ZeroFilled
(
tsOpts
);
var
time_series
=
new
timeSeries
.
ZeroFilled
(
tsOpts
);
...
@@ -334,11 +334,8 @@ function (angular, app, $, _, kbn, moment, timeSeries, graphiteSrv) {
...
@@ -334,11 +334,8 @@ function (angular, app, $, _, kbn, moment, timeSeries, graphiteSrv) {
if
(
valueArray
[
0
])
{
if
(
valueArray
[
0
])
{
time_series
.
addValue
(
valueArray
[
1
]
*
1000
,
valueArray
[
0
]);
time_series
.
addValue
(
valueArray
[
1
]
*
1000
,
valueArray
[
0
]);
}
}
hits
+=
+
1
;
});
});
//console.log('graphite timeseries: ', time_series);
$scope
.
data
.
push
({
$scope
.
data
.
push
({
info
:
{
info
:
{
alias
:
targetData
.
target
,
alias
:
targetData
.
target
,
...
@@ -346,12 +343,10 @@ function (angular, app, $, _, kbn, moment, timeSeries, graphiteSrv) {
...
@@ -346,12 +343,10 @@ function (angular, app, $, _, kbn, moment, timeSeries, graphiteSrv) {
enable
:
true
enable
:
true
},
},
time_series
:
time_series
,
time_series
:
time_series
,
hits
:
hits
hits
:
0
});
});
});
});
$scope
.
hits
=
hits
;
requestion
(
'ok'
);
requestion
(
'ok'
);
};
};
};
};
...
@@ -572,11 +567,15 @@ function (angular, app, $, _, kbn, moment, timeSeries, graphiteSrv) {
...
@@ -572,11 +567,15 @@ function (angular, app, $, _, kbn, moment, timeSeries, graphiteSrv) {
scope
.
data
[
i
].
data
=
_d
;
scope
.
data
[
i
].
data
=
_d
;
}
}
//console.log('Sent to plot', scope.data);
var
totalDataPoints
=
_
.
reduce
(
scope
.
data
,
function
(
num
,
series
)
{
return
series
.
data
.
length
+
num
;
},
0
);
console
.
log
(
'Datapoints[0] count:'
,
scope
.
data
[
0
].
data
.
length
);
console
.
log
(
'Datapoints.Total count:'
,
totalDataPoints
);
scope
.
plot
=
$
.
plot
(
elem
,
scope
.
data
,
options
);
scope
.
plot
=
$
.
plot
(
elem
,
scope
.
data
,
options
);
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
);
// Nothing to do here
// Nothing to do here
}
}
}
}
...
...
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