Adjusting integrations - ruleset

This commit is contained in:
havidarou 2017-11-17 15:22:01 -05:00
parent c650e9698c
commit 40732ce4c0
10 changed files with 210 additions and 220 deletions

View File

@ -57,6 +57,19 @@ function ($scope, $q, $routeParams, $route, $location, $rootScope, appState, gen
} }
}; };
// Listen for changes
var updateSearchSource = $scope.$on('updateVis', function (event, query, filters) {
$scope.checkAlerts()
.then((data) => {
$scope.results = data;
$scope.loading = false;
})
.catch(() => {
$scope.results = false;
$scope.loading = false;
});
});
$scope.hideRing = (items) => { $scope.hideRing = (items) => {
return $(".vis-container").length >= items; return $(".vis-container").length >= items;
}; };

View File

@ -13,7 +13,6 @@
} }
.joinCardsRow { .joinCardsRow {
background-color: white;
margin: 8px; margin: 8px;
margin-bottom: 5px; margin-bottom: 5px;
margin-top: 10px; margin-top: 10px;

View File

@ -1,115 +1,104 @@
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <md-content ng-if="tab == 'preview'" ng-show="!loading" flex ng-controller="agentsPreviewController" class="agentsPreview" style="height: 90%;" layout="column" layout-align="start space-around">
<div layout="row" layout-align="space-between stretch">
<md-card flex class="cardHover" layout="column" style="margin-left: 0px;" ng-click="applyAgent(lastAgent)">
<md-card-content style="text-align: center;" ng-click="applyAgent(lastAgent)">
<div class="metric-value ng-binding" style="font-size: 16pt;">{{lastAgent.name}}</div>
<div class="ng-binding">Last registered agent</div>
</md-card-content>
</md-card>
<div ng-if="tab == 'preview'"> <md-card flex layout="column" class="cardHover">
<md-content flex class="agentsPreview" ng-controller="agentsPreviewController" layout="column" style="height: 100%;" class="md-padding" layout-align="start space-around"> <md-card-content style="text-align: center;" ng-click="applyAgent(mostActiveAgent)">
<div class='uil-ring-css' ng-show='loading'><div></div></div> <div class="metric-value ng-binding" style="font-size: 16pt;">{{mostActiveAgent.name}}</div>
<div ng-show="!loading" style="padding: 0;"> <div class="ng-binding">Higher activity</div>
<md-progress-linear class="md-accent" md-mode="indeterminate" ng-show="loading"></md-progress-linear> </md-card-content>
<div flex layout="column" layout-align="space-between stretch"> </md-card>
<div layout="row" layout-align="space-between stretch">
<md-card flex class="cardHover" layout="column" style="margin-left: 0px;" ng-click="applyAgent(lastAgent)">
<md-card-content style="text-align: center;" ng-click="applyAgent(lastAgent)">
<div class="metric-value ng-binding" style="font-size: 16pt;">{{lastAgent.name}}</div>
<div class="ng-binding">Last registered agent</div>
</md-card-content>
</md-card>
<md-card flex layout="column" class="cardHover"> <md-card flex="10" layout="column">
<md-card-content style="text-align: center;" ng-click="applyAgent(mostActiveAgent)"> <md-card-content style="text-align: center;">
<div class="metric-value ng-binding" style="font-size: 16pt;">{{mostActiveAgent.name}}</div> <div class="metric-value ng-binding" style="font-size: 16pt;">{{agentsCountActive}}</div>
<div class="ng-binding">Higher activity</div> <div class="ng-binding">Active</div>
</md-card-content> </md-card-content>
</md-card> </md-card>
<md-card flex="10" layout="column"> <md-card flex="10" layout="column">
<md-card-content style="text-align: center;"> <md-card-content style="text-align: center;">
<div class="metric-value ng-binding" style="font-size: 16pt;">{{agentsCountActive}}</div> <div class="metric-value ng-binding" style="font-size: 16pt;">{{agentsCountDisconnected}}</div>
<div class="ng-binding">Active</div> <div class="ng-binding">Disconnected</div>
</md-card-content> </md-card-content>
</md-card> </md-card>
<md-card flex="10" layout="column"> <md-card flex="10" layout="column">
<md-card-content style="text-align: center;"> <md-card-content style="text-align: center;">
<div class="metric-value ng-binding" style="font-size: 16pt;">{{agentsCountDisconnected}}</div> <div class="metric-value ng-binding" style="font-size: 16pt;">{{agentsCountNeverConnected}}</div>
<div class="ng-binding">Disconnected</div> <div class="ng-binding">Never connected</div>
</md-card-content> </md-card-content>
</md-card> </md-card>
<md-card flex="10" layout="column"> <md-card flex="10" layout="column" style="margin-right: 0px;">
<md-card-content style="text-align: center;"> <md-card-content style="text-align: center;">
<div class="metric-value ng-binding" style="font-size: 16pt;">{{agentsCountNeverConnected}}</div> <div class="metric-value ng-binding" style="font-size: 16pt;">{{(agentsCoverity | number:2)}}%</div>
<div class="ng-binding">Never connected</div> <div class="ng-binding">Agents coverage</div>
</md-card-content> </md-card-content>
</md-card> </md-card>
</div>
<md-card flex="10" layout="column" style="margin-right: 0px;"> <div layout="row" layout-align="start stretch">
<md-card-content style="text-align: center;"> <div layout="row" class="sideNavBox" flex="60">
<div class="metric-value ng-binding" style="font-size: 16pt;">{{(agentsCoverity | number:2)}}%</div> <input placeholder="Filter agents" type="text" id="searchBox" ng-model="searchTerm" ng-change="agents.addFilter('search', searchTerm)" class="input-filter-box" flex>
<div class="ng-binding">Agents coverage</div>
</md-card-content>
</md-card>
</div>
<div layout="row" layout-align="start stretch">
<div layout="row" class="sideNavBox" flex="60">
<input placeholder="Filter agents" type="text" id="searchBox" ng-model="searchTerm" ng-change="agents.addFilter('search', searchTerm)" class="input-filter-box" flex>
</div>
<div layout="row" class="sideNavBox" flex="20">
<md-input-container flex class="md-whiteframe-z1 md-input-margin">
<md-select id="eventBox" ng-model="status" ng-change="agents.addFilter('status', status)" aria-label="Filter by status">
<md-option value="all">All states</md-option>
<md-option value="active">Active</md-option>
<md-option value="disconnected">Disconnected</md-option>
<md-option value="Never Connected">Never connected</md-option>
</md-select>
</md-input-container>
</div>
<div layout="row" class="sideNavBox" flex="20">
<md-input-container flex class="md-whiteframe-z1">
<md-select id="eventBox" ng-model="osPlatform" ng-change="agents.addFilter('os.platform', osPlatform)" aria-label="Filter by operative system">
<md-option value="all">All OS platforms</md-option>
<md-option ng-repeat='platform in osPlatforms' value="{{platform.platform}}">
{{platform.name}}
</md-option>
</md-select>
</md-input-container>
</div>
</div>
<md-toolbar layout="row">
<div class="md-toolbar-tools">
<span flex="5" ng-click="agents.sort('id')">ID
<i class="fa" ng-class="agents.sortValue === 'id' ? (agents.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="25" ng-click="agents.sort('name')">Name
<i class="fa" ng-class="agents.sortValue === 'name' ? (agents.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="10" ng-click="agents.sort('ip')">IP
<i class="fa" ng-class="agents.sortValue === 'ip' ? (agents.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="15" ng-click="agents.sort('status')">Status
<i class="fa" ng-class="agents.sortValue === 'status' ? (agents.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="15" ng-click="agents.sort('os.platform')">OS platform
<i class="fa" ng-class="agents.sortValue === 'os' ? (agents.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="15" ng-click="agents.sort('os.version')">OS version
<i class="fa" ng-class="agents.sortValue === 'os' ? (agents.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="15" ng-click="agents.sort('version')">Agent version
<i class="fa" ng-class="agents.sortValue === 'version' ? (agents.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
</div>
</md-toolbar>
<div flex style="overflow: auto; height:400px;" layout-fill when-scrolled="agents.nextPage('')">
<md-list ng-repeat='agent in agents.items | orderBy : agents.sortValue : agents.sortDir' class="agents-preview-table">
<md-list-item ng-click="applyAgent(agent)" class="list-no-hover md-subhead">
<span flex="5">{{agent.id || 'Unknown'}}</span>
<span flex="25">{{agent.name || 'Unknown'}}</span>
<span flex="10">{{agent.ip || 'Unknown'}}</span>
<span flex="15">{{agent.status || 'Unknown'}}</span>
<span flex="15">{{agent.os.platform || 'Unknown'}}</span>
<span flex="15">{{agent.os.version || 'Unknown'}}</span>
<span flex="15">{{agent.version || 'Unknown'}}</span>
</md-list-item>
</md-list>
</div> </div>
<md-divider></md-divider> <div layout="row" class="sideNavBox" flex="20">
</div> <md-input-container flex class="md-whiteframe-z1 md-input-margin">
<md-select id="eventBox" ng-model="status" ng-change="agents.addFilter('status', status)" aria-label="Filter by status">
<md-option value="all">All states</md-option>
<md-option value="active">Active</md-option>
<md-option value="disconnected">Disconnected</md-option>
<md-option value="Never Connected">Never connected</md-option>
</md-select>
</md-input-container>
</div> </div>
<md-content><md-progress-linear class="md-accent" md-mode="indeterminate" ng-show="agents.busy && !agents.end"></md-progress-linear></md-content> <div layout="row" class="sideNavBox" flex="20">
</md-content> <md-input-container flex class="md-whiteframe-z1">
</div> <md-select id="eventBox" ng-model="osPlatform" ng-change="agents.addFilter('os.platform', osPlatform)" aria-label="Filter by operative system">
<md-option value="all">All OS platforms</md-option>
<md-option ng-repeat='platform in osPlatforms' value="{{platform.platform}}">
{{platform.name}}
</md-option>
</md-select>
</md-input-container>
</div>
</div>
<md-toolbar layout="row">
<div class="md-toolbar-tools">
<span flex="5" ng-click="agents.sort('id')">ID
<i class="fa" ng-class="agents.sortValue === 'id' ? (agents.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="25" ng-click="agents.sort('name')">Name
<i class="fa" ng-class="agents.sortValue === 'name' ? (agents.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="10" ng-click="agents.sort('ip')">IP
<i class="fa" ng-class="agents.sortValue === 'ip' ? (agents.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="15" ng-click="agents.sort('status')">Status
<i class="fa" ng-class="agents.sortValue === 'status' ? (agents.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="15" ng-click="agents.sort('os.platform')">OS platform
<i class="fa" ng-class="agents.sortValue === 'os' ? (agents.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="15" ng-click="agents.sort('os.version')">OS version
<i class="fa" ng-class="agents.sortValue === 'os' ? (agents.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="15" ng-click="agents.sort('version')">Agent version
<i class="fa" ng-class="agents.sortValue === 'version' ? (agents.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
</div>
</md-toolbar>
<div flex style="overflow: auto; height:400px;" layout-fill when-scrolled="agents.nextPage('')">
<md-list ng-repeat='agent in agents.items | orderBy : agents.sortValue : agents.sortDir' class="agents-preview-table">
<md-list-item ng-click="applyAgent(agent)" class="list-no-hover md-subhead">
<span flex="5">{{agent.id || 'Unknown'}}</span>
<span flex="25">{{agent.name || 'Unknown'}}</span>
<span flex="10">{{agent.ip || 'Unknown'}}</span>
<span flex="15">{{agent.status || 'Unknown'}}</span>
<span flex="15">{{agent.os.platform || 'Unknown'}}</span>
<span flex="15">{{agent.os.version || 'Unknown'}}</span>
<span flex="15">{{agent.version || 'Unknown'}}</span>
</md-list-item>
</md-list>
</div>
<md-divider></md-divider>
<md-content><md-progress-linear class="md-accent" md-mode="indeterminate" ng-show="agents.busy && !agents.end"></md-progress-linear></md-content>
</md-content>

View File

@ -6,7 +6,7 @@
<md-progress-linear class="md-accent" md-mode="indeterminate" ng-show="loading"></md-progress-linear> <md-progress-linear class="md-accent" md-mode="indeterminate" ng-show="loading"></md-progress-linear>
<div flex layout="row" style="height: 100%; {{(tabView != 'discover') ? 'background-color: #e4e4e4' : ''}}" > <div flex layout="row" style="height: 100%; {{(tabView != 'discover') ? 'background-color: #e4e4e4' : ''}}" >
<md-content flex id="content" style="height: 100%;"> <md-content flex id="content">
<md-content layout="row" layout-align="space-between start" style="background-color: #f7f7f7"> <md-content layout="row" layout-align="space-between start" style="background-color: #f7f7f7">
<md-toolbar style="height: 50px;"> <md-toolbar style="height: 50px;">
<div class="md-toolbar-tools" layout="row" layout-align="space-between center"> <div class="md-toolbar-tools" layout="row" layout-align="space-between center">

View File

@ -1,4 +1,4 @@
<div flex ng-cloak layout="row" ng-controller="groupsPreviewController" layout-align="space-around" style="background-color: #e3e3e3;" <div flex ng-cloak layout="row" ng-controller="groupsPreviewController" layout-fill style="background-color: #e3e3e3;"
ng-if="groupsMenu == 'preview'"> ng-if="groupsMenu == 'preview'">
<div flex="25" layout="column" style="margin:10px;"> <div flex="25" layout="column" style="margin:10px;">

View File

@ -2,6 +2,6 @@ include ./manager.head
include ./manager-status.html include ./manager-status.html
include ./manager-configuration.html include ./manager-configuration.html
include ./manager-osseclog.html include ./manager-osseclog.html
include ./groups.jade
include ./ruleset.jade include ./ruleset.jade
include ./groups.jade
include ./footer.foot include ./footer.foot

View File

@ -1,95 +1,95 @@
<md-content layout="column" style="height: 100%;" flex layout-padding ng-if="!loading && globalsubmenuNavItem2 == 'decoders'" ng-controller="decodersController" layout-align="start space-around" class="app-container wazuh-column"> <md-content layout="column" style="height: 100%;" id="rulesContainer" flex layout-padding ng-if="!loading && globalsubmenuNavItem2 == 'decoders'" ng-controller="decodersController" layout-align="start space-around" class="app-container wazuh-column">
<div class='uil-ring-css' ng-show="loading"><div></div></div> <div class='uil-ring-css' ng-show="loading"><div></div></div>
<div ng-if="!loading" layout="row" layout-align="center start" style="padding: 0px; height: 250px; min-height: 250px; ">
<md-card flex style="margin: 0; height: 220px;" class="wazuh-row"> <div ng-show="!loading" layout="row" layout-align="center start" style="padding: 0px;">
<md-card-title><md-card-title-text> <md-card flex style="margin: 0; height: 220px;" class="wazuh-column">
<span class="md-headline-small">Top 24h - Decoder name</span> <md-card-content class="wazuh-column">
</md-card-title-text></md-card-title> <span class="md-headline-small">Top 24h - Decoder name</span>
<md-card-content class="wazuh-row">
<kbn-vis vis-id="'Wazuh-App-Manager-Ruleset-Decoders-Top-24h-Decoder-name'" id="Wazuh-App-Manager-Ruleset-Decoders-Top-24h-Decoder-name"></kbn-vis> <kbn-vis vis-id="'Wazuh-App-Manager-Ruleset-Decoders-Top-24h-Decoder-name'" id="Wazuh-App-Manager-Ruleset-Decoders-Top-24h-Decoder-name"></kbn-vis>
</md-card-content> </md-card-content>
</md-card> </md-card>
</div> </div>
<div ng-show="!loading" style="padding: 0"> <div ng-show="!loading" flex style="padding: 0">
<div id="content" layout="row" layout-align="start start" style="padding-left: 0px; padding-right: 0px; min-height: 53px; height: 53px;padding-top: 5px; padding-bottom: 0px; "> <div id="content" layout="row" layout-align="start start" style="padding-left: 0px; padding-right: 0px; min-height: 53px; height: 53px;padding-top: 5px; padding-bottom: 0px; ">
<span layout="row" style="padding-left: 0px;margin-top: 6px;margin-right: 5px; " flex layout-align="space-between center"> <span layout="row" style="padding-left: 0px;margin-top: 6px;margin-right: 5px; " flex layout-align="space-between center">
<md-autocomplete flex md-select-on-match="true" md-no-cache="true" md-selected-item="filter" md-selected-item-change="decoders.addFilter(filter.type, filter.name)" md-search-text="searchTerm" md-items="decoder in autoComplete | filter : searchTerm" md-item-text="decoder.name" md-min-length="0" md-no-asterisk="false" md-menu-class="autocomplete-custom-agents-bar" md-search-text-change="analizeDecoders(searchTerm)" placeholder="Search file"> <md-autocomplete flex md-select-on-match="true" md-no-cache="true" md-selected-item="filter" md-selected-item-change="decoders.addFilter(filter.type, filter.name)" md-search-text="searchTerm" md-items="decoder in autoComplete | filter : searchTerm" md-item-text="decoder.name" md-min-length="0" md-no-asterisk="false" md-menu-class="autocomplete-custom-agents-bar" md-search-text-change="analizeDecoders(searchTerm)" placeholder="Search file">
<md-item-template> <md-item-template>
<span class="item-title"> <span class="item-title">
<span><strong md-highlight-text="search" md-highlight-flags="i"> {{decoder.name}} </strong></span> <span><strong md-highlight-text="search" md-highlight-flags="i"> {{decoder.name}} </strong></span>
</span> </span>
<span class="item-metadata"> <span class="item-metadata">
<span class="item-metastat"> {{decoder.type}} </span> <span class="item-metastat"> {{decoder.type}} </span>
</span> </span>
</md-item-template> </md-item-template>
<md-not-found> No results matching "{{searchTerm}}" were found. </md-not-found> <md-not-found> No results matching "{{searchTerm}}" were found. </md-not-found>
</md-autocomplete> </md-autocomplete>
</span> </span>
<md-button style="padding: 2px;" flex="10" ng-class="(globalsubmenuNavItem2 == 'rules') ? 'button-active' : 'button-disabled'" ng-class="button-disabled" ng-click="setRulesTab('rules')" class="md-primary"> <md-button style="padding: 2px;" flex="10" ng-class="(globalsubmenuNavItem2 == 'rules') ? 'button-active' : 'button-disabled'" ng-class="button-disabled" ng-click="setRulesTab('rules')" class="md-primary">
Rules Rules
</md-button> </md-button>
<md-button style="padding: 2px;" flex="10" ng-class="(globalsubmenuNavItem2 == 'decoders') ? 'button-active' : 'button-disabled'" ng-class="button-disabled" ng-click="setRulesTab('decoders')" class="md-primary"> <md-button style="padding: 2px;" flex="10" ng-class="(globalsubmenuNavItem2 == 'decoders') ? 'button-active' : 'button-disabled'" ng-class="button-disabled" ng-click="setRulesTab('decoders')" class="md-primary">
Decoders Decoders
</md-button> </md-button>
<md-input-container flex="20" style="margin-top: 6px;margin-bottom: 0;border-radius: 3px;margin-left: 10px;" class="md-whiteframe-z1"> <md-input-container flex="20" style="margin-top: 6px;margin-bottom: 0;border-radius: 3px;margin-left: 10px;" class="md-whiteframe-z1">
<md-select ng-model="typeFilter" ng-change="applyFilter(typeFilter)" aria-label="Filter by type"> <md-select ng-model="typeFilter" ng-change="applyFilter(typeFilter)" aria-label="Filter by type">
<md-option value="all">All</md-option> <md-option value="all">All</md-option>
<md-option value="parents">Parents only</md-option> <md-option value="parents">Parents only</md-option>
</md-select> </md-select>
</md-input-container> </md-input-container>
</div> </div>
<md-chips style="background-color: #f7f7f7; margin-top: 16px; " readonly="true" ng-show="decoders.hasFilter('search') || decoders.hasFilter('file')"> <md-chips style="background-color: #f7f7f7; margin-top: 16px; " readonly="true" ng-show="decoders.hasFilter('search') || decoders.hasFilter('file')">
<md-chip ng-click="decoders.removeFilter('search', true)" ng-if="decoders.hasFilter('search')"> <md-chip ng-click="decoders.removeFilter('search', true)" ng-if="decoders.hasFilter('search')">
<span class="bold">Search: {{filter.name}} <i class="fa fa-times" aria-hidden="true"></i></span> <span class="bold">Search: {{filter.name}} <i class="fa fa-times" aria-hidden="true"></i></span>
</md-chip> </md-chip>
<md-chip ng-click="decoders.removeFilter('file', true)" ng-if="decoders.hasFilter('file');"> <md-chip ng-click="decoders.removeFilter('file', true)" ng-if="decoders.hasFilter('file');">
<span class="bold">File: {{filter.name}} <i class="fa fa-times" aria-hidden="true"></i></span> <span class="bold">File: {{filter.name}} <i class="fa fa-times" aria-hidden="true"></i></span>
</md-chip> </md-chip>
</md-chips> </md-chips>
<md-toolbar layout="row" class="md-toolbar-tools" style=" margin-top: 13px; min-height: 38px;height: 38px; padding: 8px; padding-top: 10px; "> <md-toolbar layout="row" class="md-toolbar-tools" style=" margin-top: 13px; min-height: 38px;height: 38px; padding: 8px; padding-top: 10px; ">
<span flex="20" ng-click="decoders.sort('name')">Name <i class="fa" ng-class="decoders.sortValue === 'name' ? (decoders.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span> <span flex="20" ng-click="decoders.sort('name')">Name <i class="fa" ng-class="decoders.sortValue === 'name' ? (decoders.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
<span flex="20">Program name</span> <span flex="20">Program name</span>
<span flex="40">Fields</span> <span flex="40">Fields</span>
<span flex="20" ng-click="decoders.sort('file')">File <i class="fa" ng-class="decoders.sortValue === 'file' ? (decoders.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span> <span flex="20" ng-click="decoders.sort('file')">File <i class="fa" ng-class="decoders.sortValue === 'file' ? (decoders.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i></span>
</md-toolbar> </md-toolbar>
<div flex style="overflow: auto; height:400px;" layout-fill when-scrolled="decoders.nextPage('')">
<div flex style="overflow: auto; height:400px;" when-scrolled="decoders.nextPage('')">
<md-list class="agents-preview-table" ng-class-odd="'odd'" ng-class-even="'even'" ng-repeat='decoder in decoders.items | orderBy : decoders.sortValue : decoders.sortDir' ng-class="showDetails[decoder.name] ? 'ruleset_rules_row_active' : ''"> <md-list class="agents-preview-table" ng-class-odd="'odd'" ng-class-even="'even'" ng-repeat='decoder in decoders.items | orderBy : decoders.sortValue : decoders.sortDir' ng-class="showDetails[decoder.name] ? 'ruleset_rules_row_active' : ''">
<md-list-item class="rules-item-list" ng-click="showDetails[decoder.name] = ! showDetails[decoder.name]" ng-class="showDetails[decoder.name] ? 'ruleset_rules_row_active' : ''"> <md-list-item class="rules-item-list" ng-click="showDetails[decoder.name] = ! showDetails[decoder.name]" ng-class="showDetails[decoder.name] ? 'ruleset_rules_row_active' : ''">
<span flex="20">{{decoder.name}}</span> <span flex="20">{{decoder.name}}</span>
<span flex="20">{{decoder.details["program_name"]}}</span> <span flex="20">{{decoder.details["program_name"]}}</span>
<span flex="40">{{ decoder.details["order"] | limitTo: 80 }}{{decoder.details["order"].length > 80 ? '...' : ''}}</span> <span flex="40">{{ decoder.details["order"] | limitTo: 80 }}{{decoder.details["order"].length > 80 ? '...' : ''}}</span>
<md-button md-no-ink class="invisibleButton" flex="20" ng-if="$parent.typeFilter == 'all'" ng-click="decodersApplyFilter({type: 'file', value: decoder.file}); $event.stopPropagation();">{{decoder.file}}</md-button> <md-button md-no-ink class="invisibleButton" flex="20" ng-if="$parent.typeFilter == 'all'" ng-click="decodersApplyFilter({type: 'file', value: decoder.file}); $event.stopPropagation();">{{decoder.file}}</md-button>
<span flex="20" ng-if="$parent.typeFilter != 'all'">{{decoder.file}}</span> <span flex="20" ng-if="$parent.typeFilter != 'all'">{{decoder.file}}</span>
</md-list-item> </md-list-item>
<md-list ng-show="showDetails[decoder.name]" ng-class="showDetails[decoder.name] ? 'ruleset_rules_row_active' : ''"> <md-list ng-show="showDetails[decoder.name]" ng-class="showDetails[decoder.name] ? 'ruleset_rules_row_active' : ''">
<md-list-item> <md-list-item>
<span style="font-weight: bold" flex="15">Full path</span> <span style="font-weight: bold" flex="15">Full path</span>
<span flex="35">{{decoder.path}}</span> <span flex="35">{{decoder.path}}</span>
</md-list-item> </md-list-item>
<md-list-item> <md-list-item>
<span style="font-weight: bold" flex="15">Position</span> <span style="font-weight: bold" flex="15">Position</span>
<span flex="35">{{decoder.position}}</span> <span flex="35">{{decoder.position}}</span>
</md-list-item> </md-list-item>
<md-list-item ng-if="decoder.details.parent"> <md-list-item ng-if="decoder.details.parent">
<span style="font-weight: bold" flex="15">Parent</span> <span style="font-weight: bold" flex="15">Parent</span>
<span flex="35">{{decoder.details.parent}}</span> <span flex="35">{{decoder.details.parent}}</span>
</md-list-item> </md-list-item>
<md-list-item ng-repeat="(detailk, detailv) in decoder.details" ng-if="detailk != 'parent'"> <md-list-item ng-repeat="(detailk, detailv) in decoder.details" ng-if="detailk != 'parent'">
<span style="font-weight: bold" flex="15">{{detailk}}</span> <span style="font-weight: bold" flex="15">{{detailk}}</span>
<span ng-if="(detailk !== 'regex') && (detailk !== 'order')" flex="35">{{detailv}}</span> <span ng-if="(detailk !== 'regex') && (detailk !== 'order')" flex="35">{{detailv}}</span>
<span ng-if="(detailk === 'regex')" ng-bind-html="colorRegex(detailv)" flex="35">{{colorRegex(detailv)}}</span> <span ng-if="(detailk === 'regex')" ng-bind-html="colorRegex(detailv)" flex="35">{{colorRegex(detailv)}}</span>
<span ng-if="(detailk === 'order')" ng-bind-html="colorOrder(detailv)" flex="35">{{colorOrder(detailv)}}</span> <span ng-if="(detailk === 'order')" ng-bind-html="colorOrder(detailv)" flex="35">{{colorOrder(detailv)}}</span>
</md-list-item> </md-list-item>
</md-list> </md-list>
</md-list> </md-list>
</div> </div>
<md-divider></md-divider> <md-divider></md-divider>
</div> </div>
<md-content><md-progress-linear class="md-accent" md-mode="indeterminate" ng-show="decoders.busy"></md-progress-linear></md-content> <md-content><md-progress-linear class="md-accent" md-mode="indeterminate" ng-show="decoders.busy"></md-progress-linear></md-content>
</md-content> </md-content>

View File

@ -1,39 +1,31 @@
<md-content style="height: 100%;" id="rulesContainer" layout="column" flex layout-padding ng-if="!loading && globalRuleSet == 'ruleset' && globalsubmenuNavItem2 == 'rules'" <md-content style="height: 100%;" id="rulesContainer" layout="column" flex layout-padding ng-if="!loading && globalRuleSet == 'ruleset' && globalsubmenuNavItem2 == 'rules'"
ng-controller="rulesController" layout-align="start space-around" class="app-container wazuh-column"> ng-controller="rulesController" layout-align="start space-around" class="app-container wazuh-column">
<div class='uil-ring-css' ng-show="loading"><div></div></div>
<div class='uil-ring-css' ng-show="loading">
<div></div>
</div>
<!--<div ng-if="!loading" layout="row" layout-align="center stretch">--> <!--<div ng-if="!loading" layout="row" layout-align="center stretch">-->
<div layout="row" layout-align="center stretch" style="height: 180px;" class="wazuh-row"> <div ng-show="!loading" layout="row" layout-align="center stretch" style="height: 180px;" class="wazuh-row">
<md-card flex class="wazuh-column">
<md-card flex="50" class="wazuh-row"> <md-card-content class="wazuh-column">
<md-card-content class="wazuh-row">
<span class="md-headline-small">Top 24h - Rule ID</span> <span class="md-headline-small">Top 24h - Rule ID</span>
<kbn-vis vis-id="'Wazuh-App-Manager-Ruleset-Rules-Top-24h-Rule-ID'" id="Wazuh-App-Manager-Ruleset-Rules-Top-24h-Rule-ID"></kbn-vis> <kbn-vis vis-id="'Wazuh-App-Manager-Ruleset-Rules-Top-24h-Rule-ID'" id="Wazuh-App-Manager-Ruleset-Rules-Top-24h-Rule-ID"></kbn-vis>
</md-card-content> </md-card-content>
</md-card> </md-card>
<md-card flex class="wazuh-column">
<md-card flex="50" class="wazuh-row"> <md-card-content class="wazuh-column">
<md-card-content class="wazuh-row">
<span class="md-headline-small">Top 24h - Groups</span> <span class="md-headline-small">Top 24h - Groups</span>
<kbn-vis vis-id="'Wazuh-App-Manager-Ruleset-Rules-Top-24h-Groups'" id="Wazuh-App-Manager-Ruleset-Rules-Top-24h-Groups"></kbn-vis> <kbn-vis vis-id="'Wazuh-App-Manager-Ruleset-Rules-Top-24h-Groups'" id="Wazuh-App-Manager-Ruleset-Rules-Top-24h-Groups"></kbn-vis>
</md-card-content> </md-card-content>
</md-card> </md-card>
</div> <md-card flex class="wazuh-column">
<div layout="row" layout-align="center stretch" class="wazuh-row" style="height: 180px;"> <md-card-content class="wazuh-column">
<md-card flex="50" class="wazuh-row">
<md-card-content>
<span class="md-headline-small">Top 24h - PCI DSS requirements</span> <span class="md-headline-small">Top 24h - PCI DSS requirements</span>
<kbn-vis vis-id="'Wazuh-App-Manager-Ruleset-Rules-Top-24h-PCI-DSS-requirements'" id="Wazuh-App-Manager-Ruleset-Rules-Top-24h-PCI-DSS-requirements"></kbn-vis> <kbn-vis vis-id="'Wazuh-App-Manager-Ruleset-Rules-Top-24h-PCI-DSS-requirements'" id="Wazuh-App-Manager-Ruleset-Rules-Top-24h-PCI-DSS-requirements"></kbn-vis>
</md-card-content> </md-card-content>
</md-card> </md-card>
<md-card flex class="wazuh-column">
<md-card flex="50" class="wazuh-row"> <md-card-content class="wazuh-column">
<md-card-content class="wazuh-row">
<span class="md-headline-small">Top 24h - Level</span> <span class="md-headline-small">Top 24h - Level</span>
<kbn-vis vis-id="'Wazuh-App-Manager-Ruleset-Rules-Top-24h-Level'" id="Wazuh-App-Manager-Ruleset-Rules-Top-24h-Level"></kbn-vis> <kbn-vis vis-id="'Wazuh-App-Manager-Ruleset-Rules-Top-24h-Level'" id="Wazuh-App-Manager-Ruleset-Rules-Top-24h-Level"></kbn-vis>
</md-card-content> </md-card-content>
@ -114,8 +106,8 @@
<i class="fa" ng-class="rules.sortValue === 'level' ? (rules.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i> <i class="fa" ng-class="rules.sortValue === 'level' ? (rules.sortDir ? 'fa-sort-asc' : 'fa-sort-desc') : 'fa-sort'" aria-hidden="true"></i>
</span> </span>
</md-toolbar> </md-toolbar>
<div flex style="overflow: auto; height:400px;" layout-fill when-scrolled="rules.nextPage('')">
<div flex style="overflow: auto; height:400px;" layout-fill when-scrolled="rules.nextPage('')">
<md-list ng-repeat='rule in rules.items | orderBy : rules.sortValue : rules.sortDir' ng-class-odd="'odd'" ng-class-even="'even'" <md-list ng-repeat='rule in rules.items | orderBy : rules.sortValue : rules.sortDir' ng-class-odd="'odd'" ng-class-even="'even'"
class="agents-preview-table" ng-class="showDetails[rule.id] ? 'ruleset_rules_row_active' : ''"> class="agents-preview-table" ng-class="showDetails[rule.id] ? 'ruleset_rules_row_active' : ''">
<md-list-item class="rules-item-list" ng-click="showDetails[rule.id] = !showDetails[rule.id]" ng-class="showDetails[rule.id] ? 'ruleset_rules_row_active' : ''"> <md-list-item class="rules-item-list" ng-click="showDetails[rule.id] = !showDetails[rule.id]" ng-class="showDetails[rule.id] ? 'ruleset_rules_row_active' : ''">

View File

@ -1,5 +1,2 @@
<div flex layout="column" ng-if="globalRuleSet == 'ruleset'" style="height: 100%"> <div flex layout="column" ng-if="globalRuleSet == 'ruleset'" style="height: 100%">
<div style="display: none;">
<kbn-searchbar></kbn-searchbar>
</div>
<md-progress-linear class="md-accent" md-mode="indeterminate" ng-show="load"></md-progress-linear> <md-progress-linear class="md-accent" md-mode="indeterminate" ng-show="load"></md-progress-linear>

View File

@ -834,7 +834,7 @@
"_source": { "_source": {
"title": "Wazuh App Overview Audit Alerts over time", "title": "Wazuh App Overview Audit Alerts over time",
"visState": "{\"params\": {\"scale\": \"linear\", \"yAxis\": {}, \"smoothLines\": true, \"setYExtents\": false, \"legendPosition\": \"right\", \"addTimeMarker\": false, \"interpolate\": \"linear\", \"addLegend\": true, \"shareYAxis\": true, \"mode\": \"overlap\", \"defaultYExtents\": false, \"times\": [], \"addTooltip\": true}, \"listeners\": {}, \"type\": \"area\", \"aggs\": [{\"type\": \"count\", \"enabled\": true, \"id\": \"1\", \"params\": {}, \"schema\": \"metric\"}, {\"type\": \"date_histogram\", \"enabled\": true, \"id\": \"2\", \"params\": {\"customInterval\": \"2h\", \"field\": \"@timestamp\", \"interval\": \"auto\", \"extended_bounds\": {}, \"min_doc_count\": 1}, \"schema\": \"segment\"}, {\"type\": \"terms\", \"enabled\": true, \"id\": \"3\", \"params\": {\"orderBy\": \"1\", \"field\": \"rule.description\", \"order\": \"desc\", \"size\": 10}, \"schema\": \"group\"}], \"title\": \"Audit: Alerts over time\"}", "visState": "{\"params\": {\"scale\": \"linear\", \"yAxis\": {}, \"smoothLines\": true, \"setYExtents\": false, \"legendPosition\": \"right\", \"addTimeMarker\": false, \"interpolate\": \"linear\", \"addLegend\": true, \"shareYAxis\": true, \"mode\": \"overlap\", \"defaultYExtents\": false, \"times\": [], \"addTooltip\": true}, \"listeners\": {}, \"type\": \"area\", \"aggs\": [{\"type\": \"count\", \"enabled\": true, \"id\": \"1\", \"params\": {}, \"schema\": \"metric\"}, {\"type\": \"date_histogram\", \"enabled\": true, \"id\": \"2\", \"params\": {\"customInterval\": \"2h\", \"field\": \"@timestamp\", \"interval\": \"auto\", \"extended_bounds\": {}, \"min_doc_count\": 1}, \"schema\": \"segment\"}, {\"type\": \"terms\", \"enabled\": true, \"id\": \"3\", \"params\": {\"orderBy\": \"1\", \"field\": \"rule.description\", \"order\": \"desc\", \"size\": 10}, \"schema\": \"group\"}], \"title\": \"Audit: Alerts over time\"}",
"uiStateJSON": "{\"vis\":{\"legendOpen\":false}}", "uiStateJSON": "{}",
"description": "", "description": "",
"version": 1, "version": 1,
"kibanaSavedObjectMeta": { "kibanaSavedObjectMeta": {