mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-07 10:18:57 +00:00
Sort daemons (logs)
This commit is contained in:
parent
fac3b55e29
commit
6cf26d9dd6
@ -56,8 +56,9 @@ app.controller('managerLogController', function ($scope, apiReq, errorHandler, c
|
||||
|
||||
const initialize = async () => {
|
||||
try{
|
||||
const data = await apiReq.request('GET', '/manager/logs/summary', {});
|
||||
$scope.summary = data.data.data;
|
||||
const data = await apiReq.request('GET', '/manager/logs/summary', {});
|
||||
const daemons = data.data.data;
|
||||
$scope.daemons = Object.keys(daemons).map(item => { return { title: item } })
|
||||
if(!$scope.$$phase) $scope.$digest();
|
||||
return;
|
||||
} catch (error) {
|
||||
|
@ -23,7 +23,7 @@
|
||||
<select flex class="kuiSelect wz-border-none cursor-pointer" ng-disabled="realtime" id="categoryBox" ng-model="category" ng-change="filter({name:'category',value:category})"
|
||||
aria-label="Logs category">
|
||||
<option value="all">All daemons</option>
|
||||
<option ng-repeat="(key, value) in summary" value="{{key}}">{{key}}</option>
|
||||
<option ng-repeat="daemon in daemons | orderObjectBy: 'title'" value="{{daemon.title}}">{{daemon.title}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<!-- End daemon selector -->
|
||||
|
Loading…
Reference in New Issue
Block a user