Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport #748 for 3.9.3 #759

Merged
merged 4 commits into from
Jun 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,6 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}
/* 30px is the magic margin used to hide the element's real scrollbars */
/* See overflow: hidden in .CodeMirror */
margin-bottom: -30px; margin-right: -30px;
padding-bottom: 30px;
height: 100%;
outline: none; /* Prevent dragging from highlighting the element */
position: relative;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,10 @@ define(['../../module'], function(app) {
typeof this.agent[0].data.data === 'object'
) {
this.scope.agent = this.agent[0].data.data

this.scope.agentOS =
this.scope.agent &&
this.scope.agent.os &&
this.scope.agent.os.name &&
this.scope.agent.os.codename &&
this.scope.agent.os.version
? `${this.scope.agent.os.name || '-'} ${this.scope.agent.os
.codename || '-'} ${this.scope.agent.os.version || '-'}`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,19 @@
<div class="euiText euiText--small euiStat__description">
<p class="agentField">Last keep alive</p>
</div>
<p class="euiText--small euiStat__description">{{offsetTimestamp('', agent.lastKeepAlive) || '-'}}</p>
<p ng-if="agent.status !== 'Never connected'" class="euiText--small euiStat__description">{{offsetTimestamp('', agent.lastKeepAlive) || '-'}}</p>
<p ng-if="agent.status === 'Never connected'" class="euiText--small euiStat__description">-</p>
</div>
</div>
<div class="euiFlexItem euiFlexItem">
<div class="euiStat euiStat--leftAligned">
<div class="euiText euiText--small euiStat__description">
<p class="agentField">Last syscheck scan</p>
</div>
<p class="euiText--small euiStat__description" ng-if="syscheck.inProgress">Scan
<p ng-if="agent.status === 'Never connected'" class="euiText--small euiStat__description">-</p>
<p class="euiText--small euiStat__description" ng-if="syscheck.inProgress && agent.status !== 'Never connected'">Scan
in progress</p>
<p class="euiText--small euiStat__description" ng-if="!syscheck.inProgress">
<p class="euiText--small euiStat__description" ng-if="!syscheck.inProgress && agent.status !== 'Never connected'">
{{offsetTimestamp('', syscheck.end) || '-'}}
<md-tooltip ng-if="!syscheck.inProgress && syscheck.start && syscheck.end"
md-direction="bottom" class="wz-tooltip">
Expand All @@ -125,9 +127,10 @@
<div class="euiText euiText--small euiStat__description">
<p class="agentField">Last rootcheck scan</p>
</div>
<p class="euiText--small euiStat__description" ng-if="rootcheck.inProgress">Scan
<p ng-if="agent.status === 'Never connected'" class="euiText--small euiStat__description">-</p>
<p class="euiText--small euiStat__description" ng-if="rootcheck.inProgress && agent.status !== 'Never connected'">Scan
in progress</p>
<p class="euiText--small euiStat__description" ng-if="!rootcheck.inProgress">{{offsetTimestamp('', rootcheck.end)
<p class="euiText--small euiStat__description" ng-if="!rootcheck.inProgress && agent.status !== 'Never connected'">{{offsetTimestamp('', rootcheck.end)
|| '-'}}
<md-tooltip ng-if="!rootcheck.inProgress && rootcheck.start && rootcheck.end"
md-direction="bottom" class="wz-tooltip">
Expand All @@ -145,7 +148,7 @@
</div>
<!-- End headline -->

<div layout="row" layout-padding class="wz-margin-top--15">
<div ng-if="agent.status !== 'Never connected'" layout="row" layout-padding class="wz-margin-top--15">
<md-card flex class="wz-md-card wz-padding-top-0 wz-padding-bottom-0">
<md-card-content>

Expand Down
6 changes: 5 additions & 1 deletion SplunkAppForWazuh/appserver/static/js/run/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ define(['./module'], function (module) {
toPrimaryState(state)
} else {
$rootScope.$broadcast('loading', { status: false })
if (state != 'settings.api')
if (state != 'settings.api'){
$rootScope.$broadcast('stateChanged', 'settings')
}
if (typeof err === 'string' && err.startsWith('Unexpected Wazuh version.')) {
$notificationService.showErrorToast(err)
}
$state.go('settings.api')
}
}
Expand Down