Hide legends

This commit is contained in:
Pedro S 2016-12-13 10:32:27 -08:00
parent 8ac454b8e5
commit bb15320322
6 changed files with 158 additions and 170 deletions

View File

@ -66,13 +66,13 @@ app.controller('generalController', function ($scope, $q, DataFactory, $mdToast,
$scope.search = agent.name;
}
};
$scope.openDashboard = function (dashboard, filter) {
$scope.state.setDashboardsState(dashboard, filter);
$window.location.href = '#/dashboards/';
}
$scope.openDiscover = function (template, filter) {
$scope.state.setDiscoverState(template, filter);
$window.location.href = '#/discover/';
@ -82,8 +82,8 @@ app.controller('generalController', function ($scope, $q, DataFactory, $mdToast,
}
$scope.resetDashboards = function () {
$scope.state.unsetDashboardsState();
}
}
$scope.restartAgent = function () {
var path = '/agents/' + $scope._agent.id + '/restart';
@ -93,34 +93,34 @@ app.controller('generalController', function ($scope, $q, DataFactory, $mdToast,
var alert = data.message;
else
var alert = data.data;
$mdToast.show({
template: '<md-toast>' + alert + '</md-toast>',
position: 'bottom left',
hideDelay: 2000,
});
}, printError);
};
var load = function () {
DataFactory.initialize('get', '/agents', {}, 256, 0)
.then(function (data) {
objectsArray['/agents'] = data;
// tmp
/*
/*
DataFactory.get(objectsArray['/agents'])
.then(function (data) {
$scope.submenuNavItem = 'overview';
$scope._agent = data.data.items[14];
$scope.search = data.data.items[14].name;
$scope._agent = data.data.items[0];
$scope.search = data.data.items[0].name;
$scope.load = false;
}, function (data) {
printError(data);
//defered.reject();
});
*/
/*
// tmp
DataFactory.get(data).then(function (data) {
DataFactory.filters.register(objectsArray['/agents'], 'search', 'string');
@ -160,7 +160,7 @@ app.controller('stateController', function ($scope, appState, $route) {
$scope.resetDashboards = function () {
$scope.state.unsetDashboardsState();
}
$scope.setRulesTab = function(tab) {
$scope.submenuNavItem2 = tab;
};
@ -173,7 +173,7 @@ app.controller('stateLocationController', function ($scope, appState, $window) {
$scope.openDashboard = function (dashboard, filter) {
$scope.state.setDashboardsState(dashboard, filter);
$window.location.href = '#/dashboards/';
}
$scope.openDiscover = function (template, filter) {
$scope.state.setDiscoverState(template, filter);
@ -189,7 +189,7 @@ app.controller('stateLocationController', function ($scope, appState, $window) {
$scope.changeTabView = function (view) {
console.log("En tab View");
$scope.tabView = view;
}
}
});
});

View File

@ -41,26 +41,26 @@ var app = require('ui/modules').get('app/wazuh', [])
require('ui/modules').get('app/wazuh', []).controller('VisController', function ($scope, $route, timefilter, AppState, appState, $location, kbnUrl, $timeout, courier, Private, Promise, savedVisualizations, SavedVis, getAppState, $rootScope) {
if(typeof $rootScope.visCounter === "undefined")
$rootScope.visCounter = 0;
// Set filters
$scope.filter = {};
$scope.defaultManagerName = appState.getDefaultManager().name;
$scope.filter.raw = $scope.visFilter + " AND host: " + $scope.defaultManagerName;
$scope.filter.current = $scope.filter.raw;
// Initialize Visualization
$scope.newVis = new SavedVis({ 'type': $scope.visType, 'indexPattern': $scope.visIndexPattern });
// Initialize and decode params
var visDecoded = rison.decode($scope.visA);
var visState = {};
$scope.newVis.init().then(function () {
// Render visualization
$rootScope.visCounter++;
@ -69,63 +69,71 @@ require('ui/modules').get('app/wazuh', []).controller('VisController', function
console.log("Error: Could not load visualization: "+visDecoded.vis.title);
}
);
function renderVisualization() {
$scope.loadBeforeShow = false;
// Set default time
if($route.current.params._g == "()"){
timefilter.time.from = "now-24h";
timefilter.time.to = "now";
}
// Initialize time
$scope.timefilter = timefilter;
// Get App State
// Get App State
const $state = getAppState();
//let $state = new AppState();
// Initialize queryFilter and searchSource
$scope.queryFilter = Private(FilterBarQueryFilterProvider);
$scope.queryFilter = Private(FilterBarQueryFilterProvider);
$scope.searchSource = $scope.newVis.searchSource;
courier.setRootSearchSource($scope.searchSource);
const brushEvent = Private(UtilsBrushEventProvider);
const filterBarClickHandler = Private(FilterBarFilterBarClickHandlerProvider);
$timeout(
function() {
function() {
// Bind visualization, index pattern and state
$scope.vis = $scope.newVis.vis;
$scope.indexPattern = $scope.vis.indexPattern;
$scope.state = $state;
$scope.state = $state;
// Build visualization
visState.aggs = visDecoded.vis.aggs;
visState.title = visDecoded.vis.title;
visState.params = visDecoded.vis.params;
//console.log(visDecoded.vis.title);
visState.listeners = {brush: brushEvent, click: filterBarClickHandler($state)};
// Set Vis states
$scope.uiState = $state.makeStateful('uiState');
// Hide legend if needed
if(typeof visDecoded.uiState.vis !== "undefined" && typeof visDecoded.uiState.vis.legendOpen !== "undefined" && !visDecoded.uiState.vis.legendOpen)
$scope.uiState.set('vis.legendOpen', false);
else {
$scope.uiState.set('vis.legendOpen', true);
}
$scope.vis.setUiState($scope.uiState);
$scope.vis.setState(visState);
$rootScope.visCounter--;
$scope.loadBeforeShow = true;
}, 0);
// Fetch visualization
$scope.fetch = function ()
$scope.fetch = function ()
{
//$state.save();
if($scope.visIndexPattern == "wazuh-alerts-*"){
@ -138,20 +146,20 @@ require('ui/modules').get('app/wazuh', []).controller('VisController', function
}
};
// Listeners
// Listen for timefilter changes
$scope.$listen(timefilter, 'fetch', function () {
$scope.fetch();
$scope.fetch();
});
// Listen for filter changes
$scope.$listen($scope.queryFilter, 'update', function () {
$scope.fetch();
});
// Listen for query changes
var updateQueryWatch = $rootScope.$on('updateQuery', function (event, query) {
if(query !== "undefined"){
@ -159,19 +167,19 @@ require('ui/modules').get('app/wazuh', []).controller('VisController', function
$scope.fetch();
}
});
// Listen for visualization queue prepared
var fetchVisualizationWatch = $rootScope.$on('fetchVisualization', function (event) {
$scope.fetch();
});
// Listen for destroy
});
// Listen for destroy
$scope.$on('$destroy', function () {
$scope.newVis.destroy();
});
$scope.$on('$destroy', updateQueryWatch);
$scope.$on('$destroy', fetchVisualizationWatch);
};
});

View File

@ -1,5 +1,5 @@
body{
min-width:1024px;
min-width:1024px;
width:100%;
}
@ -7,11 +7,13 @@ body{
md-input-container > md-select {
background: #3caed2;
border-radius: 3px;
color: white;
color: white;
padding: 3px;
}
.md-headline{
font-size: 22px !important;
span.md-headline {
color: #555;
font-size: 20px;
}
.md-headline-small{
font-size: 18px;
@ -156,10 +158,10 @@ md-list-item.active._md-button-wrap.ng-scope._md.md-clickable{
text-align: center;
font-size: 14px;
text-align: center;
margin-top: 11px !important;
margin-top: 11px !important;
color: white;
text-transform: uppercase;
}
.statusBox.large {
min-width: 120px !important;
@ -293,12 +295,12 @@ md-nav-bar {
md-select-menu:not(._md-overflow) md-content {
padding-top: 0px !important;
padding-bottom: 0px !important;
padding-top: 0px !important;
padding-bottom: 0px !important;
}
.ruleset_rules_row_active {
background-color: #c2e4ef;
padding-bottom: 0px;
padding-bottom: 0px;
}
.ruleset_rules_row_active a{
@ -313,7 +315,7 @@ md-select-menu:not(._md-overflow) md-content {
md-list-item.ruleset_rules_row_active {
background-color: #3caed2;
color: white;
padding-bottom: 0px;
padding-bottom: 0px;
}
button:hover, button:focus, button.focus{
@ -333,7 +335,7 @@ md-content{
background-color: #e4e8eb;
}
md-card{
box-shadow: none !important;
box-shadow: none !important;
}
.horizontal-menu-right .buttonMenu{
@ -386,18 +388,18 @@ md-list{
md-list.even{
background-color: #fafafa;
}
}
md-list.odd{
background-color: white;
}
}
md-input-container.md-whiteframe-z1.flex.md-input-has-value{
box-shadow: none;
box-shadow: none;
background-color: #3caed2;
}
md-progress-linear.md-default-theme ._md-bar, md-progress-linear ._md-bar {
background-color: #3caed2;
@ -414,7 +416,7 @@ md-progress-linear.md-default-theme ._md-bar, md-progress-linear ._md-bar {
md-select-menu.md-default-theme md-content, md-select-menu md-content {
background: #3caed2 !important;
color: white !important;
color: white !important;
}
md-select-menu.md-default-theme md-content md-option, md-select-menu md-content md-option{
@ -432,14 +434,14 @@ md-select.md-default-theme:not([disabled]):focus ._md-select-value, md-select:no
}
input#searchBox {
box-shadow: none;
box-shadow: none;
}
md-autocomplete-wrap.md-whiteframe-z1.layout-row {
box-shadow: none;
box-shadow: none;
}
#agentsAutocomplete{
}
md-input-container.md-whiteframe-z1.flex-20.md-input-has-value {
background: #3caed2;
@ -453,7 +455,7 @@ button._md-no-style.md-button.md-ink-ripple {
background: none;
}
.horizontal-menu-right .md-whiteframe-1dp, .horizontal-menu-right .md-whiteframe-z1 {
box-shadow: none !important;
box-shadow: none !important;
}
md-input-container.md-whiteframe-z1.flex-20 {
@ -489,7 +491,7 @@ select.ng-invalid.ng-touched {
md-input-container.md-default-theme.md-input-invalid label, md-input-container.md-input-invalid label {
color: rgba(0,0,0,0.38);
font-size: 16px;
font-size: 16px;
}
md-input-container.md-default-theme label.md-required:after, md-input-container label.md-required:after{
color: #3caed2 !important;
@ -513,13 +515,13 @@ md-autocomplete input::-moz-placeholder { /* Firefox 19+ */
font-weight: normal;
}
md-autocomplete input:-ms-input-placeholder {
md-autocomplete input:-ms-input-placeholder {
color:#5a5a5a;
font-weight: normal;
}
.h1, h1 {
font-size: 24px !important;
font-size: 24px !important;
}
md-chips.md-default-theme .md-chips, md-chips .md-chips {
box-shadow: none;
@ -569,7 +571,7 @@ md-content._md.layout-row {
.kibanaVisualizationValue .table>tbody>tr>td {
border: none;
padding: 0px;
padding: 0px;
}
.kibanaVisualizationValue .numeric-value {
display: none;
@ -579,12 +581,12 @@ md-content._md.layout-row {
}
.kibanaVisualizationValue .table {
margin-bottom: 0px;
margin-bottom: 0px;
}
.kibanaVisualizationValue .cell-hover {
color: rgba(0,0,0,0.87);
font-size: 19pt;
font-size: 19pt;
}
.kibanaVisualizationValue .agg-table-paginated .cell-hover:hover {
@ -594,7 +596,7 @@ md-content._md.layout-row {
display: none;
}
.kibanaVisualizationValue .h4, .kibanaVisualizationValue .h5, .kibanaVisualizationValue .h6, .kibanaVisualizationValue h4, .kibanaVisualizationValue h5, .kibanaVisualizationValue h6 {
margin: 0px;
margin: 0px;
}
.kibanaVisualizationValue .table .table-condensed td:nth-child(2) {
display: none
@ -656,4 +658,4 @@ md-content._md.layout-row {
}
visualize .vis-container {
overflow: hidden;
}
}

View File

@ -2,6 +2,36 @@
<kbn-searchbar></kbn-searchbar>
<div flex ng-controller="fimController" layout="column">
<md-progress-linear class="md-accent" md-mode="indeterminate" ng-show="load"></md-progress-linear>
<md-content layout="row">
<md-card flex="50">
<md-card-title>
<md-card-title-text>
<span class="md-headline">Users</span>
</md-card-title-text>
</md-card-title>
<md-card-content>
<kbn-vis vis-height="100px" vis-type="pie" vis-index-pattern="wazuh-alerts-*"
vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'3',params:(field:syscheck.uname_after,order:desc,orderBy:'1',size:5),schema:segment,type:terms)),listeners:(),params:(addLegend:!t,addTooltip:!t,isDonut:!t,shareYAxis:!t),title:'FIM%20Top%2015%20new%20users2',type:pie))"
vis-filter="rule.groups: syscheck AND {{'agent.name:'+_agent.name}}">
</kbn-vis>
</md-card-content>
</md-card>
<md-card flex="50">
<md-card-title>
<md-card-title-text>
<span class="md-headline">Groups</span>
</md-card-title-text>
</md-card-title>
<md-card-content>
<kbn-vis vis-height="100px" vis-type="pie" vis-index-pattern="wazuh-alerts-*"
vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'3',params:(field:syscheck.gname_after,order:desc,orderBy:'1',size:5),schema:segment,type:terms)),listeners:(),params:(addLegend:!t,addTooltip:!t,isDonut:!t,shareYAxis:!t),title:'FIM%20Top%2015%20new%20users',type:pie))"
vis-filter="rule.groups: syscheck AND {{'agent.name:'+_agent.name}}">
</kbn-vis>
</md-card-content>
</md-card>
</md-content>
<md-content layout="row">
<md-card flex>
<md-card-title>
@ -16,35 +46,7 @@
</md-card>
</md-content>
<md-content layout="row">
<md-card flex="20">
<md-card-title>
<md-card-title-text>
<span class="md-headline">Users</span>
</md-card-title-text>
</md-card-title>
<md-card-content>
<kbn-vis vis-height="100px" vis-type="pie" vis-index-pattern="wazuh-alerts-*"
vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'3',params:(field:syscheck.uname_after,order:desc,orderBy:'1',size:5),schema:segment,type:terms)),listeners:(),params:(addLegend:!t,addTooltip:!t,isDonut:!t,shareYAxis:!t),title:'FIM%20Top%2015%20new%20users2',type:pie))"
vis-filter="rule.groups: syscheck AND {{'agent.name:'+_agent.name}}">
</kbn-vis>
</md-card-content>
</md-card>
<md-card flex="20">
<md-card-title>
<md-card-title-text>
<span class="md-headline">Groups</span>
</md-card-title-text>
</md-card-title>
<md-card-content>
<kbn-vis vis-height="100px" vis-type="pie" vis-index-pattern="wazuh-alerts-*"
vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'3',params:(field:syscheck.gname_after,order:desc,orderBy:'1',size:5),schema:segment,type:terms)),listeners:(),params:(addLegend:!t,addTooltip:!t,isDonut:!t,shareYAxis:!t),title:'FIM%20Top%2015%20new%20users',type:pie))"
vis-filter="rule.groups: syscheck AND {{'agent.name:'+_agent.name}}">
</kbn-vis>
</md-card-content>
</md-card>
<md-card flex="20">
<md-card flex="33">
<md-card-title>
<md-card-title-text>
<span class="md-headline">Files added</span>
@ -56,8 +58,8 @@
</kbn-vis>
</md-card-content>
</md-card>
<md-card flex="20">
<md-card flex="33">
<md-card-title>
<md-card-title-text>
<span class="md-headline">Files modified</span>
@ -69,45 +71,21 @@
</kbn-vis>
</md-card-content>
</md-card>
<md-card flex="20">
<md-card-title>
<md-card-title-text>
<span class="md-headline">Files deleted</span>
</md-card-title-text>
</md-card-title>
<md-card-content>
<kbn-vis vis-height="100px" vis-type="pie" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(field:syscheck.path,order:desc,orderBy:'1',size:5),schema:segment,type:terms)),listeners:(),params:(addLegend:!t,addTooltip:!t,isDonut:!f,shareYAxis:!t),title:'New%20Visualization',type:pie))"
vis-filter='rule.id: 553 AND agent.name: {{_agent.name}} NOT location: syscheck-registry'>
</kbn-vis>
</md-card-content>
</md-card>
<md-card flex="33">
<md-card-title>
<md-card-title-text>
<span class="md-headline">Files deleted</span>
</md-card-title-text>
</md-card-title>
<md-card-content>
<kbn-vis vis-height="100px" vis-type="pie" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(field:syscheck.path,order:desc,orderBy:'1',size:5),schema:segment,type:terms)),listeners:(),params:(addLegend:!t,addTooltip:!t,isDonut:!f,shareYAxis:!t),title:'New%20Visualization',type:pie))"
vis-filter='rule.id: 553 AND agent.name: {{_agent.name}} NOT location: syscheck-registry'>
</kbn-vis>
</md-card-content>
</md-card>
</md-content>
<div layout="row" layout-align="space-between stretch" ng-show="false">
<md-input-container layout="row" class="sideNavBox" flex="40">
<label for="searchBox">Search</label>
<input type="text" id="searchBox" ng-model="$parent._fileSearch" ng-change="fileSearchFilter($parent._fileSearch)" flex>
</md-input-container>
<div flex="40"></div>
<md-content flex="40" class="subNavLine" layout="row" layout-align="end center" ng-show="isWindows">
<md-button ng-click="changeType()" class="md-primary" ng-class="!$parent.showFilesRegistry ? 'button-disabled' : 'button-active'">
Files
</md-button>
<md-button ng-click="changeType()" class="md-primary" ng-class="$parent.showFilesRegistry ? 'button-disabled' : 'button-active'">
Registry keys
</md-button>
</md-content>
<md-input-container style="margin-top: 12px;" flex="20">
<md-select id="eventBox" ng-model="$parent._fimEvent" ng-change="fileEventFilter($parent._fimEvent)" aria-label="Filter by event">
<md-option value="all">Filter events</md-option>
<md-option value="added">Added</md-option>
<md-option value="modified">Modified</md-option>
<md-option value="readded">Re-added</md-option>
<md-option value="deleted">Deleted</md-option>
</md-select>
</md-input-container>
</div>
<div layout="row" layout-align="space-between stretch">
<md-card flex="100">
<md-card-title>
@ -118,11 +96,11 @@
<kbn-vis vis-height="600px" vis-type="table" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(vis:(params:(sort:(columnIndex:!n,direction:!n)))),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(customLabel:Agent,field:agent.name,order:desc,orderBy:'1',size:100),schema:bucket,type:terms),(enabled:!t,id:'4',params:(customLabel:File,field:syscheck.path,order:desc,orderBy:'1',size:500),schema:bucket,type:terms),(enabled:!t,id:'5',params:(customLabel:Event,field:syscheck.event,order:desc,orderBy:'1',size:10),schema:bucket,type:terms),(enabled:!t,id:'6',params:(customLabel:Description,field:rule.description,order:desc,orderBy:'1',size:10),schema:bucket,type:terms)),listeners:(),params:(perPage:10,showMeticsAtAllLevels:!f,showPartialRows:!f,showTotal:!f,sort:(columnIndex:!n,direction:!n),totalFunc:sum),title:'New%20Visualization',type:table))"
vis-filter="rule.groups: syscheck AND {{'agent.name:'+_agent.name}}">
</kbn-vis>
</md-card>
</div>
</div>
</div>
</md-content>

View File

@ -34,14 +34,14 @@
</md-card-title-text>
</md-card-title>
<md-card-content>
<kbn-vis vis-height="130px" vis-type="histogram" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(field:rule.pci_dss,order:desc,orderBy:'1',size:5),schema:segment,type:terms)),listeners:(),params:(addLegend:!t,addTooltip:!t,isDonut:!t,shareYAxis:!t),title:'Top',type:pie))"
<kbn-vis vis-height="130px" vis-type="histogram" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(vis:(legendOpen:!f)),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(field:rule.pci_dss,order:desc,orderBy:'1',size:5),schema:segment,type:terms)),listeners:(),params:(addLegend:!t,addTooltip:!t,isDonut:!t,shareYAxis:!t),title:'Top',type:pie))"
vis-filter="{{_agent.name ? 'agent.name:'+_agent.name : '*'}}">
</kbn-vis>
</md-card-content>
</md-card>
</md-content>
<md-card>
<md-card-title>
<md-card-title-text>
@ -58,7 +58,7 @@
<md-content layout="row">
<md-card flex="40">
<md-card-content>
<div layout="column" flex>
<div layout="column" flex>
<p><b style="margin-right: 5px;">Hostname:</b> {{_agent.name ? _agent.name : '-'}}</p>
<p ng-if="_agent.ip"><b style="margin-right: 5px;">IP address:</b> {{_agent.ip ? _agent.ip : '-'}}</p>
<p><b style="margin-right: 5px;">Agent version:</b> {{agentInfo.version ? agentInfo.version : '-'}}</p>
@ -76,14 +76,14 @@
</md-card-title-text>
</md-card-title>
<md-card-content>
<kbn-vis vis-height="200px" vis-type="line" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(vis:(legendOpen:!f)),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(customInterval:'1h',extended_bounds:(),field:'@timestamp',interval:h,min_doc_count:1),schema:segment,type:date_histogram),(enabled:!t,id:'3',params:(field:rule.level,order:desc,orderBy:'1',size:10),schema:group,type:terms)),listeners:(),params:(addLegend:!t,addTimeMarker:!f,addTooltip:!t,defaultYExtents:!f,drawLinesBetweenPoints:!t,interpolate:linear,radiusRatio:9,scale:linear,setYExtents:!f,shareYAxis:!t,showCircles:!t,smoothLines:!f,times:!(),yAxis:()),title:'Alert level evolution',type:line))"
<kbn-vis vis-height="200px" vis-type="line" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(customInterval:'1h',extended_bounds:(),field:'@timestamp',interval:h,min_doc_count:1),schema:segment,type:date_histogram),(enabled:!t,id:'3',params:(field:rule.level,order:desc,orderBy:'1',size:10),schema:group,type:terms)),listeners:(),params:(addLegend:!t,addTimeMarker:!f,addTooltip:!t,defaultYExtents:!f,drawLinesBetweenPoints:!t,interpolate:linear,radiusRatio:9,scale:linear,setYExtents:!f,shareYAxis:!t,showCircles:!t,smoothLines:!f,times:!(),yAxis:()),title:'Alert level evolution',type:line))"
vis-filter="{{_agent.name ? 'agent.name:'+_agent.name : '*'}}">
</kbn-vis>
</md-card-content>
</md-card>
</md-content>
<md-content layout="row">
<md-card flex>
<md-card-title>
@ -102,4 +102,4 @@
</div>
</md-content>
</md-content>

View File

@ -42,7 +42,7 @@
<md-card flex="100">
<md-card-content>
<span class="md-headline">Events</span>
<kbn-vis vis-height="120px" vis-type="histogram" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(vis:(legendOpen:!f)),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(customInterval:'2h',extended_bounds:(),field:'@timestamp',interval:'auto',min_doc_count:1),schema:segment,type:date_histogram)),listeners:(),params:(addLegend:!t,addTimeMarker:!f,addTooltip:!t,defaultYExtents:!f,mode:stacked,scale:linear,setYExtents:!f,shareYAxis:!t,times:!(),yAxis:()),title:'Events',type:histogram))"
<kbn-vis vis-height="120px" vis-type="histogram" vis-index-pattern="wazuh-alerts-*" vis-a="(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(vis:(legendOpen:!f)),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(customInterval:'2h',extended_bounds:(),field:'@timestamp',interval:'auto',min_doc_count:1),schema:segment,type:date_histogram)),listeners:(),params:(addLegend:!f,addTimeMarker:!f,addTooltip:!t,defaultYExtents:!f,mode:stacked,scale:linear,setYExtents:!f,shareYAxis:!t,times:!(),yAxis:()),title:'Events',type:histogram))"
vis-filter="*"
>
</kbn-vis>