mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Time is now sent in utc when time correction is set to utc #143
This commit is contained in:
parent
a54f05e287
commit
ef69d692ef
@ -7,5 +7,6 @@ define([
|
|||||||
'./datasourceSrv',
|
'./datasourceSrv',
|
||||||
'./keyboardManager',
|
'./keyboardManager',
|
||||||
'./annotationsSrv',
|
'./annotationsSrv',
|
||||||
|
'./graphite/graphiteDatasource',
|
||||||
],
|
],
|
||||||
function () {});
|
function () {});
|
@ -1,15 +1,15 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'underscore',
|
'underscore',
|
||||||
'config',
|
'config'
|
||||||
'./graphite/graphiteDatasource'
|
|
||||||
],
|
],
|
||||||
function (angular, _, config, GraphiteDatasource) {
|
function (angular, _, config) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var module = angular.module('kibana.services');
|
var module = angular.module('kibana.services');
|
||||||
|
|
||||||
module.service('datasourceSrv', function($q, filterSrv, $http) {
|
module.service('datasourceSrv', function($q, filterSrv, $http, GraphiteDatasource) {
|
||||||
|
|
||||||
var defaultDatasource = _.findWhere(_.values(config.datasources), { default: true } );
|
var defaultDatasource = _.findWhere(_.values(config.datasources), { default: true } );
|
||||||
|
|
||||||
this.default = new GraphiteDatasource(defaultDatasource, $q, filterSrv, $http);
|
this.default = new GraphiteDatasource(defaultDatasource, $q, filterSrv, $http);
|
||||||
|
@ -9,6 +9,10 @@ define([
|
|||||||
function (angular, _, $, config, kbn, moment) {
|
function (angular, _, $, config, kbn, moment) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
var module = angular.module('kibana.services');
|
||||||
|
|
||||||
|
module.factory('GraphiteDatasource', function(dashboard, $q, filterSrv, $http) {
|
||||||
|
|
||||||
function GraphiteDatasource(datasource, $q, filterSrv, $http) {
|
function GraphiteDatasource(datasource, $q, filterSrv, $http) {
|
||||||
this.url = datasource.url;
|
this.url = datasource.url;
|
||||||
this.type = 'graphite';
|
this.type = 'graphite';
|
||||||
@ -80,7 +84,11 @@ function (angular, _, $, config, kbn, moment) {
|
|||||||
date = kbn.parseDate(date);
|
date = kbn.parseDate(date);
|
||||||
}
|
}
|
||||||
|
|
||||||
date = moment.utc(date).local();
|
date = moment.utc(date);
|
||||||
|
|
||||||
|
if (dashboard.current.timezone === 'browser') {
|
||||||
|
date = date.local();
|
||||||
|
}
|
||||||
|
|
||||||
if (config.timezoneOffset) {
|
if (config.timezoneOffset) {
|
||||||
date = date.zone(config.timezoneOffset);
|
date = date.zone(config.timezoneOffset);
|
||||||
@ -164,3 +172,5 @@ function (angular, _, $, config, kbn, moment) {
|
|||||||
return GraphiteDatasource;
|
return GraphiteDatasource;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
2
src/css/bootstrap.dark.min.css
vendored
2
src/css/bootstrap.dark.min.css
vendored
File diff suppressed because one or more lines are too long
2
src/css/bootstrap.light.min.css
vendored
2
src/css/bootstrap.light.min.css
vendored
File diff suppressed because one or more lines are too long
@ -156,13 +156,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.histogram-legend-dot {
|
|
||||||
display:inline-block;
|
|
||||||
height:10px;
|
|
||||||
width:10px;
|
|
||||||
border-radius:5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.histogram-legend-item {
|
.histogram-legend-item {
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user