Skip to content

Commit

Permalink
fix #6582: add max-range button to raydata (#6616)
Browse files Browse the repository at this point in the history
  • Loading branch information
rorour authored Dec 22, 2023
1 parent a6afbac commit 3f387b6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sirepo/package_data/static/js/raydata.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ SIREPO.app.directive('presetTimePicker', function() {
template: `
<button type="button" class="btn btn-info btn-xs" data-ng-click="setSearchTimeLastHour()">Last Hour</button>
<button type="button" class="btn btn-info btn-xs" data-ng-click="setSearchTimeLastDay()">Last Day</button>
<button type="button" class="btn btn-info btn-xs" data-ng-click="setSearchTimeMaxRange()">All Time</button>
`,
controller: function(appState, timeService, $scope) {
$scope.setDefaultStartStopTime = () => {
Expand All @@ -370,6 +371,11 @@ SIREPO.app.directive('presetTimePicker', function() {
$scope.model.searchStopTime = timeService.roundUnixTimeToMinutes(timeService.unixTimeNow());
};

$scope.setSearchTimeMaxRange = () => {
$scope.model.searchStartTime = timeService.roundUnixTimeToMinutes(60);
$scope.model.searchStopTime = timeService.roundUnixTimeToMinutes(timeService.unixTimeNow());
};

$scope.setDefaultStartStopTime();
}
};
Expand Down

0 comments on commit 3f387b6

Please sign in to comment.