mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-07 18:28:55 +00:00
4e637cc5e8
Requesting info from API /cluster/node Agents panels and visualization filter for Agent ID instead Agent Name. Visualization filters are now set globally in Controllers. Setting tab now request Cluster info: manager, node and name. Alerts count now use cluster filters and agent id. Top/last counts now use cluster filters and agent id.
28 lines
705 B
JavaScript
28 lines
705 B
JavaScript
// Require config
|
|
var app = require('ui/modules').get('app/wazuh', []);
|
|
|
|
app.controller('PCIController', function ($scope, DataFactory, errlog, appState, genericReq) {
|
|
|
|
var tabs = [];
|
|
genericReq.request('GET', '/api/wazuh-api/pci/all').then(function (data) {
|
|
angular.forEach(data, function(value, key) {
|
|
tabs.push({"title": key, "content": value});
|
|
});
|
|
|
|
});
|
|
|
|
$scope.tabs = tabs;
|
|
$scope.selectedIndex = 0;
|
|
|
|
$scope.addTab = function (title, view) {
|
|
view = view || title + " Content View";
|
|
tabs.push({ title: title, content: view, disabled: false});
|
|
};
|
|
|
|
$scope.removeTab = function (tab) {
|
|
var index = tabs.indexOf(tab);
|
|
tabs.splice(index, 1);
|
|
};
|
|
|
|
});
|