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

[errors][dev tools] implement k7Breadcrumbs #26598

Merged
merged 5 commits into from
Dec 4, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/legacy/core_plugins/console/public/console.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ require('./src/directives/sense_welcome');

uiRoutes.when('/dev_tools/console', {
controller: 'SenseController',
template
template,
});
9 changes: 9 additions & 0 deletions src/legacy/core_plugins/kibana/public/dev_tools/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ uiRoutes
}
});

uiRoutes.defaults(/^\/dev_tools(\/|$)/, {
k7Breadcrumbs: () => [
{
text: 'Dev Tools',
href: '#/dev_tools'
}
]
});

FeatureCatalogueRegistryProvider.register(() => {
return {
id: 'console',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
<div class="app-container error-multi-allow-explicit-index">
<h3>
<h3 class="kuiVerticalRhythm">
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you remove these the old classes? I've got a PR for styling these errors.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 thanks!

<i aria-hidden="true" class="fa fa-warning text-danger"></i> Oh no!
</h3>
<p>

<p class="kuiVerticalRhythm">
It looks like your Elasticsearch cluster has the <code>rest.action.multi.allow_explicit_index</code> setting set to <code>false</code>, which prevents Kibana from making search requests. We use this ability to send a single request to Elasticsearch that searches multiple indexes so that when there are many panels on a dashboard they will load quickly and uniformly.
</p>

<p>
<p class="kuiVerticalRhythm">
Unfortunately, until this issue is fixed you won't be able to use certain apps in Kibana, like Discover, Visualize and Dashboard.
</p>

<h3>Ok, how do I fix this?</h3>
<ol>
<h3 class="kuiVerticalRhythm">
Ok, how do I fix this?
</h3>

<ol class="kuiVerticalRhythm">
<li>Remove <code>rest.action.multi.allow_explicit_index: false</code> from your Elasticsearch config file.</li>
<li>Restart Elasticsearch.</li>
<li>Use the browser's back button to return to what you were doing.</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ import './error_allow_explicit_index.less';
import template from './error_allow_explicit_index.html';

uiRoutes
.when('/error/multi.allow_explicit_index', { template });
.when('/error/multi.allow_explicit_index', {
template,
k7Breadcrumbs: () => [{ text: 'Error' }],
});

export function ErrorAllowExplicitIndexProvider(Private, Promise) {
const kbnUrl = Private(KbnUrlProvider);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ import './error_auto_create_index.less';
import template from './error_auto_create_index.html';

uiRoutes
.when('/error/action.auto_create_index', { template });
.when('/error/action.auto_create_index', {
template,
k7Breadcrumbs: () => [{ text: 'Error' }],
});

export function isAutoCreateIndexError(error) {
return (
Expand Down
22 changes: 14 additions & 8 deletions src/ui/public/error_url_overflow/error_url_overflow.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
<div class="app-container error-url-overflow-app">
<h3>
<h3 class="kuiVerticalRhythm">
<i aria-hidden="true" class="fa fa-warning text-danger"></i> Woah there!
</h3>
<p>

<p class="kuiVerticalRhythm">
That's a big URL you have there. I have some unfortunate news: Your browser doesn't play nice with Kibana's bacon-double-cheese-burger-with-extra-fries sized URL. To keep you from running into problems Kibana limits URLs in your browser to {{controller.limit}} characters for your safety.
</p>

<h3>Ok, how do I fix this?</h3>
<p>This usually only happens with big, complex dashboards, so you have some options:</p>
<ol>
<h3 class="kuiVerticalRhythm">
Ok, how do I fix this?
</h3>

<p class="kuiVerticalRhythm">
This usually only happens with big, complex dashboards, so you have some options:
</p>

<ol class="kuiVerticalRhythm">
<li>Enable the <code>state:storeInSessionStorage</code> option in the <a href="#/management/kibana/settings">advanced settings</a>. This will prevent the URLs from getting long, but makes them a bit less portable.</li>
<li>Remove some stuff from your dashboard. This will reduce the length of the URL and keep IE in a good place.</li>
<li>Don't use IE. Every other supported browser we know of doesn't have this limit.</li>
</ol>
<br>
<br>
<p><small>Foot note: Party size candy bars are tiny. Party size sub sandwiches are massive. Really makes you think.</small></p>

<p class="kuiVerticalRhythm"><small>Foot note: Party size candy bars are tiny. Party size sub sandwiches are massive. Really makes you think.</small></p>
</div>
1 change: 1 addition & 0 deletions src/ui/public/error_url_overflow/error_url_overflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export * from './url_overflow_service';
uiRoutes
.when('/error/url-overflow', {
template,
k7Breadcrumbs: () => [{ text: 'Error' }],
controllerAs: 'controller',
controller: class OverflowController {
constructor(Private, config, $scope) {
Expand Down