Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Show 12h default on datepicker for alertscenter
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasponce committed Oct 19, 2015
1 parent 838a83b commit f316e8e
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,13 @@ module HawkularMetrics {
private $location:ng.ILocationService) {
$scope.ac = this;

this.alertsTimeOffset = $routeParams.timeOffset || 3600000 * 12;
if ($routeParams.timeOffset === undefined) {
$routeParams.timeOffset = 3600000 * 12;
$scope.hkParams.timeOffset = $routeParams.timeOffset;
}

this.alertsTimeOffset = $routeParams.timeOffset;

// If the end time is not specified in URL use current time as end time
this.alertsTimeEnd = $routeParams.endTime ? $routeParams.endTime : Date.now();
this.alertsTimeStart = this.alertsTimeEnd - this.alertsTimeOffset;
Expand Down

0 comments on commit f316e8e

Please sign in to comment.