singlestat: render time of last point based on dashboard timezone (#11425)

* singlestat: render time of last point based on dashboard timezone

* changelog: add note for #10338
This commit is contained in:
Marcus Efraimsson
2018-05-08 15:59:29 +02:00
committed by Torkel Ödegaard
parent e52aceeaba
commit ef0b7bda6f
6 changed files with 127 additions and 19 deletions

View File

@@ -23,6 +23,7 @@ export function ControllerTestContext() {
};
},
};
this.isUtc = false;
this.providePhase = function(mocks) {
return angularMocks.module(function($provide) {
@@ -46,6 +47,10 @@ export function ControllerTestContext() {
self.$q = $q;
self.panel = new PanelModel({ type: 'test' });
self.dashboard = { meta: {} };
self.isUtc = false;
self.dashboard.isTimezoneUtc = function() {
return self.isUtc;
};
$rootScope.appEvent = sinon.spy();
$rootScope.onAppEvent = sinon.spy();
@@ -93,6 +98,10 @@ export function ControllerTestContext() {
});
});
};
this.setIsUtc = function(isUtc = false) {
self.isUtc = isUtc;
};
}
export function ServiceTestContext() {