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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
27 deletions
+20
-27
src/app/panels/graphite/module.js
+20
-27
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) {
...
@@ -259,29 +259,19 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
return
$scope
.
panel
.
auto_int
&&
interval
===
$scope
.
panel
.
interval
?
interval
+
" (auto)"
:
interval
;
return
$scope
.
panel
.
auto_int
&&
interval
===
$scope
.
panel
.
interval
?
interval
+
" (auto)"
:
interval
;
};
};
/**
$scope
.
updateTimeRange
=
function
()
{
* The time range effecting the panel
$scope
.
range
=
filterSrv
.
timeRange
();
* @return {[type]} [description]
$scope
.
interval
=
$scope
.
panel
.
interval
;
*/
$scope
.
get_time_range
=
function
()
{
var
range
=
$scope
.
range
=
filterSrv
.
timeRange
();
return
range
;
};
$scope
.
get_interval
=
function
()
{
var
interval
=
$scope
.
panel
.
interval
;
var
range
;
if
(
$scope
.
panel
.
auto_int
)
{
if
(
$scope
.
panel
.
auto_int
)
{
range
=
$scope
.
get_time_range
();
if
(
$scope
.
range
)
{
if
(
range
)
{
$scope
.
interval
=
kbn
.
secondsToHms
(
interval
=
kbn
.
secondsToHms
(
kbn
.
calculate_interval
(
$scope
.
range
,
$scope
.
range
,
$scope
.
panel
.
resolution
,
0
)
/
1000
kbn
.
calculate_interval
(
range
.
from
,
range
.
to
,
$scope
.
panel
.
resolution
,
0
)
/
1000
);
);
}
}
}
}
$scope
.
panel
.
interval
=
interval
||
'10m'
;
$scope
.
panel
.
interval
=
$scope
.
interval
||
'10m'
;
return
$scope
.
panel
.
interval
;
$scope
.
interval
=
$scope
.
panel
.
interval
;
};
};
$scope
.
colors
=
[
$scope
.
colors
=
[
...
@@ -308,11 +298,10 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
...
@@ -308,11 +298,10 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
$scope
.
panelMeta
.
loading
=
true
;
$scope
.
panelMeta
.
loading
=
true
;
var
range
=
$scope
.
get_time_range
();
$scope
.
updateTimeRange
();
var
interval
=
$scope
.
get_interval
(
range
);
var
graphiteQuery
=
{
var
graphiteQuery
=
{
range
:
range
,
range
:
$scope
.
range
,
targets
:
$scope
.
panel
.
targets
,
targets
:
$scope
.
panel
.
targets
,
maxDataPoints
:
$scope
.
panel
.
span
*
50
maxDataPoints
:
$scope
.
panel
.
span
*
50
};
};
...
@@ -320,7 +309,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
...
@@ -320,7 +309,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
return
graphiteSrv
.
query
(
graphiteQuery
)
return
graphiteSrv
.
query
(
graphiteQuery
)
.
then
(
function
(
results
)
{
.
then
(
function
(
results
)
{
$scope
.
panelMeta
.
loading
=
false
;
$scope
.
panelMeta
.
loading
=
false
;
var
data
=
$scope
.
receiveGraphiteData
(
results
,
range
,
interval
);
var
data
=
$scope
.
receiveGraphiteData
(
results
);
$scope
.
$emit
(
'render'
,
data
);
$scope
.
$emit
(
'render'
,
data
);
})
})
.
then
(
null
,
function
(
err
)
{
.
then
(
null
,
function
(
err
)
{
...
@@ -328,7 +317,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
...
@@ -328,7 +317,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
});
});
};
};
$scope
.
receiveGraphiteData
=
function
(
results
,
range
,
interval
)
{
$scope
.
receiveGraphiteData
=
function
(
results
)
{
results
=
results
.
data
;
results
=
results
.
data
;
$scope
.
legend
=
[];
$scope
.
legend
=
[];
var
data
=
[];
var
data
=
[];
...
@@ -338,9 +327,9 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
...
@@ -338,9 +327,9 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
}
}
var
tsOpts
=
{
var
tsOpts
=
{
interval
:
interval
,
interval
:
$scope
.
interval
,
start_date
:
range
&&
range
.
from
,
start_date
:
$scope
.
range
&&
$scope
.
range
.
from
,
end_date
:
range
&&
range
.
to
,
end_date
:
$scope
.
range
&&
$scope
.
range
.
to
,
fill_style
:
'no'
fill_style
:
'no'
};
};
...
@@ -383,6 +372,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
...
@@ -383,6 +372,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
$scope
.
enterFullscreenMode
=
function
(
options
)
{
$scope
.
enterFullscreenMode
=
function
(
options
)
{
var
oldHeight
=
$scope
.
row
.
height
;
var
oldHeight
=
$scope
.
row
.
height
;
var
docHeight
=
$
(
window
).
height
();
var
docHeight
=
$
(
window
).
height
();
var
oldTimeRange
=
$scope
.
range
;
$scope
.
row
.
height
=
options
.
edit
?
200
:
Math
.
floor
(
docHeight
*
0.7
);
$scope
.
row
.
height
=
options
.
edit
?
200
:
Math
.
floor
(
docHeight
*
0.7
);
$scope
.
editMode
=
options
.
edit
;
$scope
.
editMode
=
options
.
edit
;
...
@@ -396,7 +386,10 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
...
@@ -396,7 +386,10 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
closeEditMode
();
closeEditMode
();
$timeout
(
function
()
{
$timeout
(
function
()
{
$scope
.
dashboard
.
refresh
();
$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