Skip to content

Commit 0a1d1d6

Browse files
committed
support 6.6.1
1 parent f9de722 commit 0a1d1d6

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default function (kibana) {
3232
// Add server routes and initialize the plugin here
3333
const config = server.config();
3434
const client = new elasticsearch.Client({
35-
host: config.get('elasticsearch.url'),
35+
host: config.get('elasticsearch.hosts'),
3636
//log: 'trace'
3737
requestTimeout: 120000
3838
});

server/routes/serverRoute.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@ export default function (server, client) {
22
server.route({
33
path: '/api/indices_view/_stats',
44
method: 'GET',
5-
handler(req, reply) {
6-
client
5+
handler:async (_req)=>{
6+
const response = await client
77
.indices
88
.stats({
99
human: false,
1010
level: 'indices',
1111
metric: ['docs', 'store', 'get', 'search', 'query_cache']
12-
}, function (err, response) {
13-
reply(response);
1412
});
13+
return response;
1514
}
1615
});
1716
}

0 commit comments

Comments
 (0)