mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-07 02:15:24 +00:00
New visualize botton in discover capabilities. Minor fix in agents filter.
This commit is contained in:
parent
a6dcb635a4
commit
ce7336a3ea
@ -93,32 +93,25 @@ var app = require('ui/modules').get('app/wazuh', [])
|
||||
|
||||
|
||||
require('ui/modules').get('app/wazuh', []).controller('discoverW', function($scope, config, courier, $route, $window, Notifier,
|
||||
AppState, timefilter, Promise, Private, kbnUrl, $location, savedSearches, appState, $rootScope, getAppState) {
|
||||
$scope.$watch(function () {
|
||||
console.log($('a.kuiButton.kuiButton--primary.kuiButton--small.kuiButton--fullWidth.kuiVerticalRhythmSmall').length);
|
||||
return $('a.kuiButton.kuiButton--primary.kuiButton--small.kuiButton--fullWidth.kuiVerticalRhythmSmall').length;
|
||||
}, function() {
|
||||
document.querySelectorAll('.kuiButton.kuiButton--primary.kuiButton--small.kuiButton--fullWidth.kuiVerticalRhythmSmall').forEach(function(elem){
|
||||
//elem.attr('ng-href') = elem.attr('ng-href').replace('/wazuh#', '/kibana#');
|
||||
console.log(elem.getAttribute("ng-href").value);
|
||||
});
|
||||
});
|
||||
|
||||
AppState, timefilter, Promise, Private, kbnUrl, $timeout, $location, savedSearches, appState, $rootScope, getAppState) {
|
||||
|
||||
const FieldList = Private(IndexPatternsFieldListProvider);
|
||||
$scope.cluster_info = appState.getClusterInfo();
|
||||
$scope.cluster_filter = "cluster.name: " + $scope.cluster_info.cluster;
|
||||
|
||||
if($rootScope.page == "agents" && $location.path() != "/discover/"){
|
||||
$scope.agent_info = $rootScope.agent;
|
||||
|
||||
$scope.agent_filter = "agent.id: " + $route.current.params.id;
|
||||
$scope.global_filter = $scope.cluster_filter + " AND " + $scope.agent_filter;
|
||||
$scope.stateQuery = $scope.global_filter;
|
||||
|
||||
}else
|
||||
$scope.global_filter = $scope.cluster_filter;
|
||||
|
||||
if(!angular.isUndefined($scope.disFilter))
|
||||
$scope.global_filter = $scope.disFilter + " AND " + $scope.global_filter;
|
||||
|
||||
$scope.stateQuery = $scope.global_filter;
|
||||
|
||||
$scope.chrome = {};
|
||||
$scope.removeColumn = function removeColumn(columnName) {
|
||||
@ -870,7 +863,6 @@ $scope.selectedIndexPattern = $scope.indexPatternList.find(
|
||||
grouped: false
|
||||
}),
|
||||
);
|
||||
console.log($scope);
|
||||
_.each(field.details.buckets, function (bucket) {
|
||||
bucket.display = field.format.convert(bucket.value);
|
||||
});
|
||||
|
@ -21,6 +21,11 @@ var settingsWizard = function ($location, testConnection, appState, $q, genericR
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
var goToVisualize = function ($location, $window) {
|
||||
$location.search('id', null);
|
||||
$window.location.href=$location.absUrl().replace('/wazuh#', '/kibana#');
|
||||
}
|
||||
|
||||
//Routes
|
||||
routes.enable();
|
||||
routes
|
||||
@ -66,6 +71,13 @@ routes
|
||||
.when('/test/', {
|
||||
template: require('plugins/wazuh/templates/test.html')
|
||||
})
|
||||
.when('/visualize/create?', {
|
||||
redirectTo: function() {
|
||||
},
|
||||
resolve: {
|
||||
"check": goToVisualize
|
||||
}
|
||||
})
|
||||
.when('/', {
|
||||
redirectTo: '/overview/',
|
||||
})
|
||||
|
@ -80,7 +80,7 @@
|
||||
</md-content>
|
||||
|
||||
<!-- View: Discover -->
|
||||
<md-content style="background-color: white" flex layout="column" layout-align="start space-around" ng-show="tabView == 'discover' && agentInfo.name" >
|
||||
<md-content style="background-color: white" flex layout="column" layout-align="start space-around" ng-if="tabView == 'discover' && agentInfo.name" >
|
||||
<kbn-disfull table-height="1000px;" dis-a="(columns:!(_source),filters:!(),index:'wazuh-alerts-*',interval:auto,query:(query_string:(analyze_wildcard:!t,query:'*')),sort:!('@timestamp',desc))"
|
||||
infinite-scroll="true">
|
||||
</kbn-disfull>
|
||||
|
Loading…
Reference in New Issue
Block a user