mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-07 10:18:57 +00:00
82 lines
4.4 KiB
HTML
82 lines
4.4 KiB
HTML
<div layout="column" class="mozilla-table-size-85" ng-controller="managerLogController as ctrl" ng-if="!ctrl.loading && mctrl.tab == 'logs'">
|
|
|
|
<!-- Headline -->
|
|
<div ng-show="!ctrl.loading" layout="column" layout-padding>
|
|
<span class="font-size-18"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Logs</span>
|
|
<span class="md-subheader">Review the logs of all Wazuh manager daemons</span>
|
|
</div>
|
|
<!-- End headline -->
|
|
|
|
<!-- Filters and Realtime button section -->
|
|
<div ng-show="!ctrl.loading" layout="row" layout-align="start center" class="md-padding">
|
|
<!-- Daemon selector -->
|
|
<div flex="20" layout="column" layout-align="center" class="height-40 wz-margin-right-15 wz-select-input">
|
|
<select flex class="kuiSelect wz-border-none cursor-pointer max-height-35" ng-disabled="ctrl.realtime || !ctrl.daemons.length" id="categoryBox" ng-model="ctrl.category" ng-change="ctrl.filter({name:'category',value:ctrl.category})"
|
|
aria-label="Logs category">
|
|
<option value="all">All daemons</option>
|
|
<option ng-repeat="daemon in ctrl.daemons | orderObjectBy: 'title'" value="{{daemon.title}}">{{daemon.title}}</option>
|
|
</select>
|
|
</div>
|
|
<!-- End daemon selector -->
|
|
|
|
<!-- Level selector -->
|
|
<div flex="20" layout="column" layout-align="center" class="height-40 wz-select-input wz-margin-right-15">
|
|
<select flex class="kuiSelect wz-border-none cursor-pointer max-height-35" ng-disabled="ctrl.realtime" id="levelBox" ng-model="ctrl.type_log" ng-change="ctrl.filter({name:'type_log',value:ctrl.type_log})"
|
|
aria-label="Logs level">
|
|
<option value="all">All log levels</option>
|
|
<option value="info">Info</option>
|
|
<option value="error">Error</option>
|
|
<option value="warning">Warning</option>
|
|
<option value="critical">Critical</option>
|
|
<option value="debug">Debug</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div flex="20" layout="column" ng-show="ctrl.nodeList" layout-align="center" class="height-40 wz-select-input">
|
|
<select flex class="kuiSelect wz-border-none cursor-pointer max-height-35" ng-disabled="ctrl.realtime" id="categoryBox" ng-model="ctrl.selectedNode" ng-change="ctrl.changeNode(ctrl.selectedNode)"
|
|
aria-label="Logs category">
|
|
<option ng-repeat="node in ctrl.nodeList" value="{{node}}">{{node}}</option>
|
|
</select>
|
|
</div>
|
|
<!-- End Level selector -->
|
|
|
|
<!-- White space between filters and Realtime button -->
|
|
<span flex></span>
|
|
|
|
<md-button ng-if="!ctrl.realtime" class="wz-button md-raised md-primary no-margin-right" ng-click="ctrl.playRealtime()" aria-label="Play realtime button">
|
|
<i class="fa fa-play fa-fw" aria-hidden="true"></i>
|
|
Play realtime
|
|
</md-button>
|
|
<md-button ng-if="ctrl.realtime" class="wz-button md-raised md-primary no-margin-right" ng-click="ctrl.stopRealtime()" aria-label="Stop realtime button">
|
|
<i class="fa fa-stop fa-fw" aria-hidden="true"></i>
|
|
Stop realtime
|
|
</md-button>
|
|
</div>
|
|
<!-- End Filters and Realtime button section -->
|
|
|
|
<div layout="row" flex class="md-padding" ng-if="ctrl.logsPath">
|
|
<input placeholder="Filter logs..." ng-model="ctrl.custom_search" type="text" class="kuiLocalSearchInput ng-empty ng-pristine ng-scope ng-touched ng-valid"
|
|
aria-invalid="false" wz-enter="ctrl.search(ctrl.custom_search)">
|
|
<button type="submit" aria-label="Search" class="kuiLocalSearchButton height-40" ng-click="ctrl.search(ctrl.custom_search)">
|
|
<span class="fa fa-search" aria-hidden="true"></span>
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Logs table section -->
|
|
<div layout="row" layout-padding ng-if="ctrl.logsPath">
|
|
<wz-table
|
|
flex
|
|
extra-limit="true"
|
|
path="ctrl.logsPath"
|
|
keys="['timestamp',{value:'tag',size:2},'level',{value:'description',size:4,nosortable:true}]"
|
|
row-sizes="[12,10,7]">
|
|
</wz-table>
|
|
</div>
|
|
<!-- End Logs table section -->
|
|
|
|
<div layout="row" layout-padding>
|
|
<span flex></span>
|
|
<a class="small" id="btnDownload" ng-click="ctrl.downloadCsv()">Formatted <i aria-hidden="true" class="fa fa-fw fa-download"></i></a>
|
|
</div>
|
|
</div>
|