Skip to content

Commit

Permalink
[ui] do not assume es plugin is always there
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed Nov 15, 2016
1 parent 7ad237c commit 5ac383d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,13 @@ export default async (kbnServer, server, config) => {
}

async function renderApp(app) {
const isElasticsearchPluginRed = server.plugins.elasticsearch.status.state === 'red';
const payload = await getPayload.call(this, app);
if (!isElasticsearchPluginRed) {

const esStatus = kbnServer.status.getForPluginId('elasticsearch');
if (esStatus && esStatus.state !== 'red') {
payload.uiSettings.user = await server.uiSettings().getUserProvided();
}

return viewAppWithPayload.call(this, app, payload);
}

Expand Down

0 comments on commit 5ac383d

Please sign in to comment.