mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-07 02:15:24 +00:00
Fix scan in progress "situation" on syscheck and rootcheck
This commit is contained in:
parent
40f8bde317
commit
da85dd9720
@ -90,6 +90,9 @@ function ($scope, $location, $rootScope, Notifier, appState, genericReq, apiReq,
|
||||
if ($scope.agent.rootcheck.end && $scope.agent.rootcheck.start) {
|
||||
let minutes = calculateMinutes($scope.agent.rootcheck.start, $scope.agent.rootcheck.end);
|
||||
$scope.agent.rootcheck.duration = window.Math.round(minutes);
|
||||
if($scope.agent.rootcheck.duration <= 0){
|
||||
$scope.agent.rootcheck.inProgress = true;
|
||||
}
|
||||
} else {
|
||||
if (!$scope.agent.rootcheck.end) {
|
||||
$scope.agent.rootcheck.end = 'Unknown';
|
||||
@ -105,6 +108,9 @@ function ($scope, $location, $rootScope, Notifier, appState, genericReq, apiReq,
|
||||
if ($scope.agent.syscheck.end && $scope.agent.syscheck.start) {
|
||||
let minutes = calculateMinutes($scope.agent.syscheck.start, $scope.agent.syscheck.end);
|
||||
$scope.agent.syscheck.duration = window.Math.round(minutes);
|
||||
if($scope.agent.syscheck.duration <= 0){
|
||||
$scope.agent.syscheck.inProgress = true;
|
||||
}
|
||||
} else {
|
||||
if (!$scope.agent.syscheck.end) {
|
||||
$scope.agent.syscheck.end = 'Unknown';
|
||||
|
@ -58,22 +58,24 @@
|
||||
</md-card>
|
||||
<md-card flex>
|
||||
<md-card-content class="agents-overview-top-metric-item">
|
||||
<div class="metric-value ng-binding agents-overview-size-14">{{agent.syscheck.end || 'Unknown'}}</div>
|
||||
<md-tooltip ng-if="agent.syscheck.start && agent.syscheck.end" md-direction="bottom">
|
||||
Start time: {{ agent.syscheck.start }} <br>
|
||||
End time: {{ agent.syscheck.end }} <br>
|
||||
Duration time: {{ agent.syscheck.duration }} minutes
|
||||
<div class="metric-value ng-binding agents-overview-size-14" ng-if="agent.syscheck.inProgress">Scan in progress</div>
|
||||
<div ng-if="!agent.syscheck.inProgress" class="metric-value ng-binding agents-overview-size-14">{{agent.syscheck.end || 'Unknown'}}</div>
|
||||
<md-tooltip ng-if="!agent.syscheck.inProgress && agent.syscheck.start && agent.syscheck.end" md-direction="bottom">
|
||||
Start time: {{ agent.syscheck.start || 'Unknown'}} <br>
|
||||
End time: {{ agent.syscheck.end || 'Unknown'}} <br>
|
||||
Duration time: {{ agent.syscheck.duration +' minutes' || 'Unknown'}}
|
||||
</md-tooltip>
|
||||
<div class="ng-binding">Last syscheck scan</div>
|
||||
</md-card-content>
|
||||
</md-card>
|
||||
<md-card flex>
|
||||
<md-card-content class="agents-overview-top-metric-item">
|
||||
<div class="metric-value ng-binding agents-overview-size-14">{{agent.rootcheck.end || 'Unknown'}}</div>
|
||||
<md-tooltip ng-if="agent.rootcheck.start && agent.rootcheck.end" md-direction="bottom">
|
||||
Start time: {{ agent.rootcheck.start }} <br>
|
||||
End time: {{ agent.rootcheck.end }} <br>
|
||||
Duration time: {{ agent.rootcheck.duration }} minutes
|
||||
<div class="metric-value ng-binding agents-overview-size-14" ng-if="agent.rootcheck.inProgress">Scan in progress</div>
|
||||
<div ng-if="!agent.rootcheck.inProgress" class="metric-value ng-binding agents-overview-size-14">{{agent.rootcheck.end || 'Unknown'}}</div>
|
||||
<md-tooltip ng-if="!agent.rootcheck.inProgress && agent.rootcheck.start && agent.rootcheck.end" md-direction="bottom">
|
||||
Start time: {{ agent.rootcheck.start || 'Unknown'}} <br>
|
||||
End time: {{ agent.rootcheck.end || 'Unknown'}} <br>
|
||||
Duration time: {{ agent.rootcheck.duration + ' minutes' || 'Unknown' }}
|
||||
</md-tooltip>
|
||||
<div class="ng-binding">Last rootcheck scan</div>
|
||||
</md-card-content>
|
||||
|
Loading…
Reference in New Issue
Block a user