diff --git a/public/controllers/agent/agents-preview.js b/public/controllers/agent/agents-preview.js index 21e2a5164..a6d344b62 100644 --- a/public/controllers/agent/agents-preview.js +++ b/public/controllers/agent/agents-preview.js @@ -156,12 +156,16 @@ export class AgentsPreviewController { this.searchBarModel = { status: ['Active', 'Disconnected', 'Never connected'], group: unique.groups, - node_name: unique.nodes, version: unique.versions, 'os.platform': unique.osPlatforms.map(x => x.platform), 'os.version': unique.osPlatforms.map(x => x.version), 'os.name': unique.osPlatforms.map(x => x.name) }; + + if(clusterInfo.status === 'enabled' && unique.nodes) { + this.searchBarModel.node_name = unique.nodes; + } + this.searchBarModel['os.name'] = Array.from( new Set(this.searchBarModel['os.name']) );