Enable changing 'Ended' date filter in Vitrage alarm history view

Change-Id: Ie657c5553c474733a9650597e789e5aceab22ba8
story: 2005273
task: 30123
This commit is contained in:
NoorYameen 2019-03-21 08:49:23 +02:00 committed by Noor Yameen
parent e4c213503c
commit a4f61cb325
2 changed files with 11 additions and 7 deletions

View File

@ -69,10 +69,14 @@
};
alarmList.getHistoryData = function (nextPrev) {
alarmList.getHistoryData = function (nextPrev, updateDate) {
if (nextPrev === 'next' && !alarmList.nextEnabled) {
return;
}
if(updateDate=='update'){
alarmList.toDateTime = new Date();
alarmList.toDateTime.setMilliseconds(0);
}
var url = $location.absUrl();
var config = {

View File

@ -7,18 +7,18 @@
<label class="btn btn-primary"
ng-model="alarmList.radioModel"
uib-btn-radio="'activeAlarms'"
ng-click="alarmList.getHistoryData('')">Active
ng-click="alarmList.getHistoryData('', '')">Active
Alarms</label>
<label class="btn btn-primary"
ng-model="alarmList.radioModel"
ng-click="alarmList.getHistoryData('')"
ng-click="alarmList.getHistoryData('', 'update')"
uib-btn-radio="'historyAlarms'">Alarm History</label>
</div>
<div ng-hide="alarmList.radioModel === 'historyAlarms'" class="themable-checkbox refreshBtn" >
<input type="checkbox" ng-model="alarmList.checkboxAutoRefresh" id="themable-checkbox" ng-change="alarmList.autoRefreshChanged()">
<label for="themable-checkbox" >Auto Refresh</label>
</div>
<input type="checkbox" ng-model="alarmList.checkboxAutoRefresh" id="themable-checkbox" ng-change="alarmList.autoRefreshChanged()">
<label for="themable-checkbox" >Auto Refresh</label>
</div>
<div ng-show="alarmList.radioModel === 'historyAlarms'" style="display: inline;">
<label>Started</label>
@ -29,7 +29,7 @@
<input type="datetime-local" ng-model="alarmList.toDateTime"/>
<button class="btn btn-primary"
ng-click="alarmList.getHistoryData()">
ng-click="alarmList.getHistoryData('', '')">
Fetch Alarms
</button>
</div>