Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't turn Kibana plugin red if Kibana index is not yet ready #7428

Merged
merged 8 commits into from
Jun 10, 2016
8 changes: 6 additions & 2 deletions src/ui/settings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ export default function setupSettings(kbnServer, server, config) {
}

function userSettingsNotFound(kibanaVersion) {
const message = 'Could not find user-provided settings for this version of Kibana (' + kibanaVersion + ')';
server.plugins.kibana.status.red(message);
let message;
if (server.plugins.elasticsearch.status.state === 'green') {
server.plugins.kibana.status.red('Could not find user-provided settings for this version of Kibana (' + kibanaVersion + ')');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change the message into a template string? Also the message variable is unused.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally. And good catch on the unused message variable — I'm surprised the linter didn't catch that. Fixing both things.

} else {
server.log(['warning', 'settings'], 'User-provided settings were requested before the Kibana index was ready');
}
return {};
}

Expand Down