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
26c115f2
Commit
26c115f2
authored
Jan 04, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more efficient closing of full edit/view mode
parent
fcb6b333
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
26 deletions
+19
-26
src/app/panels/graphite/module.js
+19
-26
src/css/bootstrap.light.min.css
+0
-0
No files found.
src/app/panels/graphite/module.js
View file @
26c115f2
...
...
@@ -259,29 +259,19 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
return
$scope
.
panel
.
auto_int
&&
interval
===
$scope
.
panel
.
interval
?
interval
+
" (auto)"
:
interval
;
};
/**
* The time range effecting the panel
* @return {[type]} [description]
*/
$scope
.
get_time_range
=
function
()
{
var
range
=
$scope
.
range
=
filterSrv
.
timeRange
();
return
range
;
};
$scope
.
get_interval
=
function
()
{
var
interval
=
$scope
.
panel
.
interval
;
var
range
;
$scope
.
updateTimeRange
=
function
()
{
$scope
.
range
=
filterSrv
.
timeRange
();
$scope
.
interval
=
$scope
.
panel
.
interval
;
if
(
$scope
.
panel
.
auto_int
)
{
range
=
$scope
.
get_time_range
();
if
(
range
)
{
interval
=
kbn
.
secondsToHms
(
kbn
.
calculate_interval
(
range
.
from
,
range
.
to
,
$scope
.
panel
.
resolution
,
0
)
/
1000
if
(
$scope
.
range
)
{
$scope
.
interval
=
kbn
.
secondsToHms
(
kbn
.
calculate_interval
(
$scope
.
range
,
$scope
.
range
,
$scope
.
panel
.
resolution
,
0
)
/
1000
);
}
}
$scope
.
panel
.
interval
=
interval
||
'10m'
;
return
$scope
.
panel
.
interval
;
$scope
.
panel
.
interval
=
$scope
.
interval
||
'10m'
;
$scope
.
interval
=
$scope
.
panel
.
interval
;
};
$scope
.
colors
=
[
...
...
@@ -308,11 +298,10 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
$scope
.
panelMeta
.
loading
=
true
;
var
range
=
$scope
.
get_time_range
();
var
interval
=
$scope
.
get_interval
(
range
);
$scope
.
updateTimeRange
();
var
graphiteQuery
=
{
range
:
range
,
range
:
$scope
.
range
,
targets
:
$scope
.
panel
.
targets
,
maxDataPoints
:
$scope
.
panel
.
span
*
50
};
...
...
@@ -320,7 +309,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
return
graphiteSrv
.
query
(
graphiteQuery
)
.
then
(
function
(
results
)
{
$scope
.
panelMeta
.
loading
=
false
;
var
data
=
$scope
.
receiveGraphiteData
(
results
,
range
,
interval
);
var
data
=
$scope
.
receiveGraphiteData
(
results
);
$scope
.
$emit
(
'render'
,
data
);
})
.
then
(
null
,
function
(
err
)
{
...
...
@@ -328,7 +317,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
});
};
$scope
.
receiveGraphiteData
=
function
(
results
,
range
,
interval
)
{
$scope
.
receiveGraphiteData
=
function
(
results
)
{
results
=
results
.
data
;
$scope
.
legend
=
[];
var
data
=
[];
...
...
@@ -338,9 +327,9 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
}
var
tsOpts
=
{
interval
:
interval
,
start_date
:
range
&&
range
.
from
,
end_date
:
range
&&
range
.
to
,
interval
:
$scope
.
interval
,
start_date
:
$scope
.
range
&&
$scope
.
range
.
from
,
end_date
:
$scope
.
range
&&
$scope
.
range
.
to
,
fill_style
:
'no'
};
...
...
@@ -383,6 +372,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
$scope
.
enterFullscreenMode
=
function
(
options
)
{
var
oldHeight
=
$scope
.
row
.
height
;
var
docHeight
=
$
(
window
).
height
();
var
oldTimeRange
=
$scope
.
range
;
$scope
.
row
.
height
=
options
.
edit
?
200
:
Math
.
floor
(
docHeight
*
0.7
);
$scope
.
editMode
=
options
.
edit
;
...
...
@@ -396,7 +386,10 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
closeEditMode
();
$timeout
(
function
()
{
$scope
.
$emit
(
'render'
);
if
(
oldTimeRange
!==
$scope
.
range
)
{
$scope
.
dashboard
.
refresh
();
}
});
});
}
...
...
src/css/bootstrap.light.min.css
View file @
26c115f2
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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