mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-06 09:55:18 +00:00
Add specific filter for monitoring
This commit is contained in:
parent
1574297297
commit
c3f0f83683
@ -62,6 +62,15 @@ const app = modules.get('apps/webinar_app', [])
|
||||
visualization.searchSource
|
||||
.query({ language: 'lucene', query: implicitFilter })
|
||||
.set('filter', discoverList.length > 1 ? discoverList[1] : {});
|
||||
} else {
|
||||
|
||||
// Get filter for cluster/manager regardless environment
|
||||
const monitoringFilter = discoverList[1].filter(item => item && item.meta && item.meta.key && ['cluster.name','manager.name'].includes(item.meta.key));
|
||||
|
||||
// Applying specific filter to Agents status
|
||||
if(Array.isArray(monitoringFilter) && monitoringFilter.length) {
|
||||
visualization.searchSource.filter(monitoringFilter[0]);
|
||||
}
|
||||
}
|
||||
|
||||
let params = {};
|
||||
@ -110,6 +119,15 @@ const app = modules.get('apps/webinar_app', [])
|
||||
visualization.searchSource
|
||||
.query({ language: 'lucene', query: implicitFilter })
|
||||
.set('filter', discoverList.length > 1 ? discoverList[1] : {});
|
||||
} else {
|
||||
|
||||
// Get filter for cluster/manager regardless environment
|
||||
const monitoringFilter = discoverList[1].filter(item => item && item.meta && item.meta.key && ['cluster.name','manager.name'].includes(item.meta.key));
|
||||
|
||||
// Applying specific filter to Agents status
|
||||
if(Array.isArray(monitoringFilter) && monitoringFilter.length) {
|
||||
visualization.searchSource.filter(monitoringFilter[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user