mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-07 02:15:24 +00:00
202 lines
11 KiB
HTML
202 lines
11 KiB
HTML
<div layout="column" layout-align="start stretch" ng-controller="managerStatusController as ctrl"
|
|
ng-if="mctrl.tab === 'status'" class="">
|
|
|
|
<div class="md-padding md-padding-top-16" ng-show="ctrl.load">
|
|
<react-component name="EuiProgress" props="{size: 'xs', color: 'primary'}" />
|
|
</div>
|
|
|
|
<!-- Headline -->
|
|
<div ng-show="!ctrl.load" layout="row" layout-padding class="wz-padding-bottom-0 wz-margin-top-16">
|
|
<div ng-show="ctrl.selectedNode" layout="column" layout-align="center" class="height-35 wz-select-input">
|
|
<select class="kuiSelect wz-border-none cursor-pointer max-height-35" id="categoryBox"
|
|
ng-model="ctrl.selectedNode" ng-change="ctrl.changeNode(ctrl.selectedNode)" aria-label="Select node">
|
|
<option ng-repeat="node in ctrl.nodes" value="{{node.name}}">{{node.name}}</option>
|
|
</select>
|
|
</div>
|
|
<div flex></div>
|
|
<div layout="column" class="height-40 wz-no-padding" ng-show="adminMode">
|
|
<button ng-if="mctrl.clusterInfo.status === 'enabled' && !mctrl.showConfirmRestart"
|
|
class="kuiButton kuiButton--secondary height-35" ng-disabled="mctrl.isRestarting"
|
|
ng-click="mctrl.showConfirmRestart = true"><i class="fa fa-refresh"
|
|
ng-class="mctrl.isRestarting ? 'fa-spin fa-spinner' : ''"></i>
|
|
Restart cluster
|
|
</button>
|
|
<button ng-if="mctrl.clusterInfo.status !== 'enabled' && !mctrl.showConfirmRestart"
|
|
class="kuiButton kuiButton--secondary height-35" ng-disabled="mctrl.isRestarting"
|
|
ng-click="mctrl.showConfirmRestart = true"><i class="fa fa-refresh"
|
|
ng-class="mctrl.isRestarting ? 'fa-spin fa-spinner' : ''"></i>
|
|
Restart manager
|
|
</button>
|
|
<div ng-show="mctrl.showConfirmRestart" class="confirmEmbedBubble confirmEmbedBubbleInline">
|
|
<div layout="row no-wrap">
|
|
<span ng-if="mctrl.clusterInfo.status === 'enabled'" class="wz-padding-top-10 wz-padding-left-8">The
|
|
cluster will be restarted </span>
|
|
<span ng-if="mctrl.clusterInfo.status !== 'enabled'" class="wz-padding-top-10 wz-padding-left-8">The
|
|
manager will be restarted </span>
|
|
</div>
|
|
<div layout="row">
|
|
<md-button class="cancelBtn btn-info" type="button" ng-click="mctrl.showConfirmRestart = false">
|
|
Cancel</md-button>
|
|
<md-button ng-if="mctrl.clusterInfo.status === 'enabled'" class="btn wz-button" type="button"
|
|
ng-click="mctrl.restartCluster();mctrl.showConfirmRestart = false"><i aria-hidden='true'
|
|
class='fa fa-fw fa-check'></i>
|
|
Confirm</md-button>
|
|
<md-button ng-if="mctrl.clusterInfo.status !== 'enabled'" class="btn wz-button" type="button"
|
|
ng-click="mctrl.restartManager();mctrl.showConfirmRestart = false"><i aria-hidden='true'
|
|
class='fa fa-fw fa-check'></i>
|
|
Confirm</md-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- End headline -->
|
|
|
|
<div layout="row" class="wz-margin-top-10 wz-margin-right-8 wz-margin-left-8"
|
|
ng-show="ctrl.clusterError && !ctrl.load">
|
|
<div flex class="euiCallOut euiCallOut--warning">
|
|
<div class="euiCallOutHeader">
|
|
<react-component name="EuiIcon" props="{type:'help',className:'euiCallOutHeader__title'}" />
|
|
<span class="euiCallOutHeader__title">{{ctrl.clusterError}}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Daemons status section -->
|
|
<div ng-show="!ctrl.load && !ctrl.clusterError">
|
|
<md-card flex class="wz-md-card">
|
|
<md-card-content class="daemons-card">
|
|
<div ng-repeat="daemon in ctrl.daemons" class="daemon-label">
|
|
<p ng-class="ctrl.getDaemonStatusClass(daemon.value)" class="round daemon-bullet"></p>
|
|
<p class="daemon-name">{{daemon.key}}</p>
|
|
</div>
|
|
</md-card-content>
|
|
</md-card>
|
|
</div>
|
|
<!-- End daemons status section -->
|
|
|
|
<div layout="row" layout-padding ng-if="!ctrl.load && !ctrl.clusterError">
|
|
<react-component flex name="AlertsStats" props="{
|
|
items: [
|
|
{
|
|
description: 'Total agents',
|
|
value: ctrl.agentsCountTotal,
|
|
color: 'primary'
|
|
},
|
|
{
|
|
description: 'Active',
|
|
value: ctrl.agentsCountActive,
|
|
color: 'secondary'
|
|
},
|
|
{
|
|
description: 'Disconnected',
|
|
value: ctrl.agentsCountDisconnected,
|
|
color: 'danger'
|
|
},
|
|
{
|
|
description: 'Never connected',
|
|
value: ctrl.agentsCountNeverConnected,
|
|
color: 'accent'
|
|
},
|
|
{
|
|
description: 'Agents coverage',
|
|
value: (ctrl.agentsCoverity | number:2) + '%',
|
|
color: 'accent'
|
|
}
|
|
]
|
|
}" />
|
|
</div>
|
|
|
|
<!-- End agents status section -->
|
|
|
|
<div layout="row" layout-align="start stretch" layout-wrap ng-if="!ctrl.load && !ctrl.clusterError">
|
|
<!-- Manager information section -->
|
|
<md-card flex class="wz-md-card">
|
|
<md-card-content>
|
|
<i class="fa fa-fw fa-server" aria-hidden="true"></i> <span ng-if="ctrl.selectedNode"
|
|
class="wz-headline-title">{{ctrl.selectedNode}}
|
|
information</span> <span ng-if="!ctrl.selectedNode" class="wz-headline-title">Manager
|
|
information</span>
|
|
<md-divider class="wz-margin-top-10"></md-divider>
|
|
<div layout="row" class="wz-padding-top-10">
|
|
<span flex="25">Version</span>
|
|
<span class="wz-text-right color-grey">{{ctrl.managerInfo.version ? ctrl.managerInfo.version :
|
|
'-'}}</span>
|
|
</div>
|
|
<div layout="row" class="wz-padding-top-10">
|
|
<span flex="25">Compilation date</span>
|
|
<span class="wz-text-right color-grey">{{ctrl.managerInfo.compilation_date ?
|
|
ctrl.managerInfo.compilation_date : '-'}}</span>
|
|
</div>
|
|
<div layout="row" class="wz-padding-top-10">
|
|
<span flex="25">Installation path</span>
|
|
<span
|
|
class="wz-text-right color-grey">{{ctrl.managerInfo.path ? ctrl.managerInfo.path : '-'}}</span>
|
|
</div>
|
|
<div layout="row" class="wz-padding-top-10">
|
|
<span flex="25">Installation type</span>
|
|
<span
|
|
class="wz-text-right color-grey">{{ctrl.managerInfo.type ? ctrl.managerInfo.type : '-'}}</span>
|
|
</div>
|
|
<div layout="row" class="wz-padding-top-10">
|
|
<span flex="25">Agents limit</span>
|
|
<span class="wz-text-right color-grey">{{ctrl.managerInfo.max_agents ? ctrl.managerInfo.max_agents
|
|
: '-'}}</span>
|
|
</div>
|
|
<div layout="row" class="wz-padding-top-10">
|
|
<span flex="25">OpenSSL Support</span>
|
|
<span class="wz-text-right color-grey">{{ctrl.managerInfo.openssl_support ?
|
|
ctrl.managerInfo.openssl_support
|
|
: '-'}}</span>
|
|
</div>
|
|
</md-card-content>
|
|
</md-card>
|
|
<!-- End manager information section -->
|
|
|
|
<!-- Last registered agent section -->
|
|
<md-card flex class="wz-md-card" ng-show="ctrl.agentInfo && ctrl.agentInfo.id !== '000'">
|
|
<md-card-content>
|
|
<i class="fa fa-fw fa-tv" aria-hidden="true"></i> <span class="wz-headline-title">Last registered
|
|
agent</span>
|
|
<md-divider class="wz-margin-top-10"></md-divider>
|
|
<div layout="row" class="wz-padding-top-10">
|
|
<span flex="25">Name</span>
|
|
<span class="wz-text-right color-grey">{{ctrl.agentInfo.name ? ctrl.agentInfo.name : '-'}}</span>
|
|
</div>
|
|
<div layout="row" class="wz-padding-top-10">
|
|
<span flex="25">ID</span>
|
|
<span class="wz-text-right color-grey">{{ctrl.agentInfo.id ? ctrl.agentInfo.id : '-'}}</span>
|
|
</div>
|
|
<div layout="row" class="wz-padding-top-10">
|
|
<span flex="25">Status</span>
|
|
<span
|
|
class="wz-text-right color-grey">{{ctrl.agentInfo.status ? ctrl.agentInfo.status : '-'}}</span>
|
|
</div>
|
|
<div layout="row" class="wz-padding-top-10">
|
|
<span flex="25">IP Address</span>
|
|
<span class="wz-text-right color-grey">{{ctrl.agentInfo.ip ? ctrl.agentInfo.ip : '-'}}</span>
|
|
</div>
|
|
<div layout="row" class="wz-padding-top-10">
|
|
<span flex="25">Date add</span>
|
|
<span
|
|
class="wz-text-right color-grey">{{ctrl.agentInfo.dateAdd ? ctrl.agentInfo.dateAdd : '-'}}</span>
|
|
</div>
|
|
<div layout="row" class="wz-padding-top-10">
|
|
<span flex="25">Version</span>
|
|
<span
|
|
class="wz-text-right color-grey">{{ctrl.agentInfo.version ? ctrl.agentInfo.version : '-'}}</span>
|
|
</div>
|
|
<div layout="row" class="wz-padding-top-10" ng-if="ctrl.agentInfo.id !== '000'">
|
|
<span flex="25">Last keep alive</span>
|
|
<span class="wz-text-right color-grey">{{ctrl.agentInfo.lastKeepAlive ?
|
|
ctrl.agentInfo.lastKeepAlive : '-'}}</span>
|
|
</div>
|
|
<div layout="row" class="wz-padding-top-10">
|
|
<span flex="25">Operating system</span>
|
|
<span class="wz-text-right color-grey">{{ctrl.agentInfo.os.name ? ctrl.agentInfo.os.name +
|
|
ctrl.agentInfo.os.version : ctrl.agentInfo.os.uname ? ctrl.agentInfo.os.uname : '-'}}</span>
|
|
</div>
|
|
</md-card-content>
|
|
</md-card>
|
|
<!-- End last registered agent section -->
|
|
</div>
|
|
</div> |