UI: minor improvements.
This commit is contained in:
parent
c3e62a7b16
commit
e9730fec99
@ -221,10 +221,10 @@ function AlarmService($http, $q, $interval, $filter, $timeout, utils, types) {
|
|||||||
} else if (alarmsQuery.startTime) {
|
} else if (alarmsQuery.startTime) {
|
||||||
pageLink = {
|
pageLink = {
|
||||||
limit: 100,
|
limit: 100,
|
||||||
startTime: alarmsQuery.startTime
|
startTime: Math.round(alarmsQuery.startTime)
|
||||||
}
|
}
|
||||||
if (alarmsQuery.endTime) {
|
if (alarmsQuery.endTime) {
|
||||||
pageLink.endTime = alarmsQuery.endTime;
|
pageLink.endTime = Math.round(alarmsQuery.endTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -73,6 +73,7 @@ export default function WidgetController($scope, $state, $timeout, $window, $ele
|
|||||||
decimals: angular.isDefined(widget.config.decimals) ? widget.config.decimals : 2,
|
decimals: angular.isDefined(widget.config.decimals) ? widget.config.decimals : 2,
|
||||||
subscriptions: {},
|
subscriptions: {},
|
||||||
defaultSubscription: null,
|
defaultSubscription: null,
|
||||||
|
dashboardTimewindow: dashboardTimewindow,
|
||||||
timewindowFunctions: {
|
timewindowFunctions: {
|
||||||
onUpdateTimewindow: function(startTimeMs, endTimeMs) {
|
onUpdateTimewindow: function(startTimeMs, endTimeMs) {
|
||||||
if (widgetContext.defaultSubscription) {
|
if (widgetContext.defaultSubscription) {
|
||||||
@ -646,6 +647,7 @@ export default function WidgetController($scope, $state, $timeout, $window, $ele
|
|||||||
|
|
||||||
$scope.$on('dashboardTimewindowChanged', function (event, newDashboardTimewindow) {
|
$scope.$on('dashboardTimewindowChanged', function (event, newDashboardTimewindow) {
|
||||||
vm.dashboardTimewindow = newDashboardTimewindow;
|
vm.dashboardTimewindow = newDashboardTimewindow;
|
||||||
|
widgetContext.dashboardTimewindow = newDashboardTimewindow;
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.$on("$destroy", function () {
|
$scope.$on("$destroy", function () {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user