UI: minor improvements.

This commit is contained in:
Igor Kulikov 2017-07-24 13:52:29 +03:00
parent c3e62a7b16
commit e9730fec99
2 changed files with 4 additions and 2 deletions

View File

@ -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);
} }
} }

View File

@ -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 () {