mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-08 10:43:51 +00:00
111 lines
4.6 KiB
HTML
111 lines
4.6 KiB
HTML
<div ng-cloak flex layout="column" layout-padding class="mozilla-table-size-85" ng-controller="managerLogController" ng-if="!loading && submenuNavItem == 'logs'">
|
|
|
|
<!-- Loading ring -->
|
|
<div class='uil-ring-css' ng-show="loading">
|
|
<div></div>
|
|
</div>
|
|
|
|
<!-- Filters and Realtime button section -->
|
|
<div ng-show="!loading" layout="row" layout-align="start center">
|
|
<!-- Daemon selector -->
|
|
<div flex="20" layout="column" class="height-40 wz-margin-right-15 wz-select-input">
|
|
<select flex class="kuiSelect wz-border-none cursor-pointer" ng-disabled="realtime" id="categoryBox" ng-model="category" ng-change="category == 'all' ? logs.removeFilter('category', true) : logs.addFilter('category', category)"
|
|
aria-label="Logs category">
|
|
<option value="all">All daemons</option>
|
|
<option ng-repeat="(key, value) in summary" value="{{key}}">{{key}}</option>
|
|
</select>
|
|
</div>
|
|
<!-- End daemon selector -->
|
|
|
|
<!-- Level selector -->
|
|
<div flex="20" layout="column" class="height-40 wz-select-input">
|
|
<select flex class="kuiSelect wz-border-none cursor-pointer" ng-disabled="realtime" id="levelBox" ng-model="type_log" ng-change="type_log == 'all' ? logs.removeFilter('type_log', true) : logs.addFilter('type_log', 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>
|
|
</select>
|
|
</div>
|
|
<!-- End Level selector -->
|
|
|
|
<!-- White space between filters and Realtime button -->
|
|
<span flex></span>
|
|
|
|
<md-button ng-if="!realtime" class="wazuh-button md-raised md-primary" ng-click="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="realtime" class="wazuh-button md-raised md-primary" ng-click="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 -->
|
|
|
|
<!-- Logs table section -->
|
|
<div ng-show="!loading" flex layout="column">
|
|
|
|
<!-- Searchbar section -->
|
|
<wz-search-bar isdisabled="realtime" data="logs" term="searchTerm" placetext="'Search logs...'"></wz-search-bar>
|
|
<!-- End Searchbar section -->
|
|
|
|
<!-- Realtime disabled section -->
|
|
<wz-table-header
|
|
layout="row"
|
|
data="logs"
|
|
keys="[
|
|
{name:'Timestamp',sortValue:'timestamp',size:15},
|
|
{name:'Tag',sortValue:'tag',size:25},
|
|
{name:'Level',sortValue:'level',size:10},
|
|
{name:'Description'}
|
|
]"
|
|
ng-if="!realtime">
|
|
</wz-table-header>
|
|
<wz-table
|
|
layout="column"
|
|
flex
|
|
data="logs"
|
|
keys="[{col:'timestamp',size:15,truncatable:'true'},{col:'tag',size:25,truncatable:'true'},{col:'level',size:10,truncatable:'true'},{col:'description',truncatable:'false'}]"
|
|
ng-if="!realtime"
|
|
class="no-lateral-padding"
|
|
nopointer="true"
|
|
noheight="true">
|
|
</wz-table>
|
|
<!-- End Realtime disabled section -->
|
|
|
|
<!-- Realtime enabled section -->
|
|
<wz-table-header
|
|
layout="row"
|
|
data="realLogs"
|
|
keys="[
|
|
{name:'Timestamp',size:15},
|
|
{name:'Tag',size:25},
|
|
{name:'Level',size:10},
|
|
{name:'Description'}
|
|
]"
|
|
ng-if="realtime">
|
|
</wz-table-header>
|
|
<wz-table
|
|
layout="column"
|
|
flex
|
|
data="realLogs"
|
|
keys="[{col:'timestamp',size:15,truncatable:'true'},{col:'tag',size:25,truncatable:'true'},{col:'level',size:10,truncatable:'true'},{col:'description',truncatable:'false'}]"
|
|
ng-if="realtime"
|
|
class="no-lateral-padding",
|
|
noscroll="true"
|
|
nopointer="true"
|
|
noheight="true">
|
|
</wz-table>
|
|
<!-- End Realtime enabled section -->
|
|
|
|
<!-- CSV Download button section -->
|
|
<div layout="row" class="wz-margin-top-10">
|
|
<span flex></span>
|
|
<a class="small" id="btnDownload" ng-click="downloadCsv()">Formatted <i aria-hidden="true" class="fa fa-fw fa-download"></i></a>
|
|
</div>
|
|
<!-- End CSV Download button section -->
|
|
</div>
|
|
<!-- End Logs table section -->
|
|
</div>
|