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
37c43199
Commit
37c43199
authored
Jul 21, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for annotations hover tooltip and timestamp when timezone set to utc, Fixes #611, #394
parent
f22fcc2e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
17 deletions
+11
-17
src/app/panels/graph/module.js
+0
-1
src/app/services/annotationsSrv.js
+7
-0
src/app/services/dashboard/dashboardModel.js
+1
-1
src/app/services/graphite/graphiteDatasource.js
+3
-3
src/config.sample.js
+0
-12
No files found.
src/app/panels/graph/module.js
View file @
37c43199
...
...
@@ -272,7 +272,6 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
format
:
$scope
.
panel
.
renderer
===
'png'
?
'png'
:
'json'
,
maxDataPoints
:
$scope
.
resolution
,
datasource
:
$scope
.
panel
.
datasource
,
timezone
:
$scope
.
dashboard
.
timezone
};
$scope
.
annotationsPromise
=
annotationsSrv
.
getAnnotations
(
$scope
.
filter
,
$scope
.
rangeUnparsed
,
$scope
.
dashboard
);
...
...
src/app/services/annotationsSrv.js
View file @
37c43199
...
...
@@ -11,6 +11,7 @@ define([
var
promiseCached
;
var
annotationPanel
;
var
list
=
[];
var
timezone
;
this
.
init
=
function
()
{
$rootScope
.
$on
(
'refresh'
,
this
.
clearCache
);
...
...
@@ -31,6 +32,7 @@ define([
return
promiseCached
;
}
var
timezone
=
dashboard
,
timezone
;
var
annotations
=
_
.
where
(
annotationPanel
.
annotations
,
{
enable
:
true
});
var
promises
=
_
.
map
(
annotations
,
function
(
annotation
)
{
...
...
@@ -65,7 +67,12 @@ define([
tooltip
+=
(
options
.
tags
||
''
)
+
'<br/>'
;
}
if
(
timezone
===
'browser'
)
{
tooltip
+=
'<i>'
+
moment
(
options
.
time
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
+
'</i><br/>'
;
}
else
{
tooltip
+=
'<i>'
+
moment
.
utc
(
options
.
time
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
+
'</i><br/>'
;
}
if
(
options
.
text
)
{
tooltip
+=
options
.
text
.
replace
(
/
\n
/g
,
'<br/>'
);
...
...
src/app/services/dashboard/dashboardModel.js
View file @
37c43199
...
...
@@ -20,7 +20,7 @@ function (angular, $, kbn, _) {
this
.
title
=
data
.
title
;
this
.
tags
=
data
.
tags
||
[];
this
.
style
=
data
.
style
||
"dark"
;
this
.
timezone
=
data
.
browser
||
'browser'
;
this
.
timezone
=
data
.
timezone
||
'browser'
;
this
.
editable
=
data
.
editble
||
true
;
this
.
rows
=
data
.
rows
||
[];
this
.
pulldowns
=
data
.
pulldowns
||
[];
...
...
src/app/services/graphite/graphiteDatasource.js
View file @
37c43199
...
...
@@ -27,8 +27,8 @@ function (angular, _, $, config, kbn, moment) {
GraphiteDatasource
.
prototype
.
query
=
function
(
filterSrv
,
options
)
{
try
{
var
graphOptions
=
{
from
:
this
.
translateTime
(
options
.
range
.
from
,
options
.
timezone
,
'round-down'
),
until
:
this
.
translateTime
(
options
.
range
.
to
,
options
.
timezone
,
'round-up'
),
from
:
this
.
translateTime
(
options
.
range
.
from
,
'round-down'
),
until
:
this
.
translateTime
(
options
.
range
.
to
,
'round-up'
),
targets
:
options
.
targets
,
format
:
options
.
format
,
maxDataPoints
:
options
.
maxDataPoints
,
...
...
@@ -125,7 +125,7 @@ function (angular, _, $, config, kbn, moment) {
}
};
GraphiteDatasource
.
prototype
.
translateTime
=
function
(
date
,
timezone
,
rounding
)
{
GraphiteDatasource
.
prototype
.
translateTime
=
function
(
date
,
rounding
)
{
if
(
_
.
isString
(
date
))
{
if
(
date
===
'now'
)
{
return
'now'
;
...
...
src/config.sample.js
View file @
37c43199
...
...
@@ -35,18 +35,6 @@ function (Settings) {
// Elasticsearch index for storing dashboards
grafana_index
:
"grafana-dash"
,
// timezoneOFfset:
// If you experiance problems with zoom, it is probably caused by timezone diff between
// your browser and the graphite-web application. timezoneOffset setting can be used to have Grafana
// translate absolute time ranges to the graphite-web timezone.
// Example:
// If TIME_ZONE in graphite-web config file local_settings.py is set to America/New_York, then set
// timezoneOffset to "-0500" (for UTC - 5 hours)
// Example:
// If TIME_ZONE is set to UTC, set this to "0000"
//
timezoneOffset
:
null
,
// set to false to disable unsaved changes warning
unsaved_changes_warning
:
true
,
...
...
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