2019-03-13 16:56:54 +00:00
|
|
|
<div layout="column" class="mozilla-table-size-85" ng-controller="managerLogController as ctrl" ng-if="!ctrl.loading && mctrl.tab == 'logs'">
|
2018-07-02 12:54:33 +00:00
|
|
|
|
2019-03-13 16:56:54 +00:00
|
|
|
<!-- 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>
|
2018-03-08 11:59:39 +00:00
|
|
|
</div>
|
2019-03-13 16:56:54 +00:00
|
|
|
<!-- End headline -->
|
|
|
|
|
|
|
|
<!-- Filters and Realtime button section -->
|
|
|
|
<div ng-show="!ctrl.loading" layout="row" layout-align="start center" class="md-padding-h">
|
|
|
|
<!-- 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 wz-margin-right-15">
|
|
|
|
<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>
|
|
|
|
|
|
|
|
<div flex="20" layout="column" layout-align="center" class="height-40">
|
|
|
|
<wz-kbn-switch switch-model="ctrl.sortFilter" switch-change="ctrl.sort()" switch-text="Descending sort">
|
|
|
|
</wz-kbn-switch>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- End Level selector -->
|
|
|
|
|
|
|
|
<!-- White space between filters and Realtime button -->
|
|
|
|
<span flex></span>
|
|
|
|
|
|
|
|
<md-button ng-if="!ctrl.realtime" class="wz-button 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 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>
|
2018-03-08 11:59:39 +00:00
|
|
|
</div>
|
2019-03-13 16:56:54 +00:00
|
|
|
<!-- End Filters and Realtime button section -->
|
|
|
|
|
|
|
|
<div layout="row" flex class="md-padding-h wz-margin-top-10" 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>
|
2019-03-11 15:35:32 +00:00
|
|
|
</div>
|
2019-03-13 16:56:54 +00:00
|
|
|
|
|
|
|
<!-- Logs section -->
|
|
|
|
<div layout="row" layout-padding ng-if="ctrl.logsPath" ng-hide="true">
|
|
|
|
<wz-table path="ctrl.logsPath" keys="[]" implicit-sort="'timestamp'"></wz-table>
|
2018-10-23 17:49:12 +00:00
|
|
|
</div>
|
2019-03-13 16:56:54 +00:00
|
|
|
<div ng-show="XMLContent">
|
|
|
|
<div layout="row" layout-padding class="wz-padding-bottom-0">
|
|
|
|
<wz-config-viewer flex xmlcontent="XMLContent" hide-header="true" />
|
|
|
|
</div>
|
|
|
|
<md-card flex class="wz-md-card _md flex md-margin-h">
|
|
|
|
<md-card-actions layout="row" layout-align="end center" class="wz-card-actions layout-align-end-center wz-no-margin layout-row height-25">
|
|
|
|
<a class="small" id="btnDownload" ng-click="ctrl.downloadCsv()">Formatted <i aria-hidden="true" class="fa fa-fw fa-download"></i></a>
|
|
|
|
</md-card-actions>
|
|
|
|
</md-card>
|
2019-03-11 15:35:32 +00:00
|
|
|
</div>
|
2019-03-13 16:56:54 +00:00
|
|
|
<!-- End Logs section -->
|
|
|
|
|
|
|
|
<div layout="row" class="md-padding-h" ng-show="XMLContent === ''">
|
|
|
|
<div flex class="euiCallOut euiCallOut--warning wz-margin-top-17">
|
|
|
|
<div class="euiCallOutHeader">
|
|
|
|
<svg class="euiIcon euiIcon--medium euiCallOutHeader__icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
|
|
|
|
xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
|
|
|
|
<defs>
|
|
|
|
<path id="help-a" d="M13.6 12.186l-1.357-1.358c-.025-.025-.058-.034-.084-.056.53-.794.84-1.746.84-2.773a4.977 4.977 0 0 0-.84-2.772c.026-.02.059-.03.084-.056L13.6 3.813a6.96 6.96 0 0 1 0 8.373zM8 15A6.956 6.956 0 0 1 3.814 13.6l1.358-1.358c.025-.025.034-.057.055-.084C6.02 12.688 6.974 13 8 13a4.978 4.978 0 0 0 2.773-.84c.02.026.03.058.056.083l1.357 1.358A6.956 6.956 0 0 1 8 15zm-5.601-2.813a6.963 6.963 0 0 1 0-8.373l1.359 1.358c.024.025.057.035.084.056A4.97 4.97 0 0 0 3 8c0 1.027.31 1.98.842 2.773-.027.022-.06.031-.084.056l-1.36 1.358zm5.6-.187A4 4 0 1 1 8 4a4 4 0 0 1 0 8zM8 1c1.573 0 3.019.525 4.187 1.4l-1.357 1.358c-.025.025-.035.057-.056.084A4.979 4.979 0 0 0 8 3a4.979 4.979 0 0 0-2.773.842c-.021-.027-.03-.059-.055-.084L3.814 2.4A6.957 6.957 0 0 1 8 1zm0-1a8.001 8.001 0 1 0 .003 16.002A8.001 8.001 0 0 0 8 0z"></path>
|
|
|
|
</defs>
|
|
|
|
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#help-a" fill-rule="evenodd"></use>
|
|
|
|
</svg>
|
|
|
|
<span class="euiCallOutHeader__title">No results match your search criteria</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|