Skip to content

Commit

Permalink
[Logs UI] Add link from the sample web logs to the Logs UI (#42635) (#…
Browse files Browse the repository at this point in the history
…45760)

* [Logs UI] Add link from the sample web logs to the Logs UI

* Add i18n
  • Loading branch information
Kerry350 authored Sep 16, 2019
1 parent 51b7e47 commit 7401921
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions x-pack/legacy/plugins/infra/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ import { i18n } from '@kbn/i18n';
import JoiNamespace from 'joi';
import { resolve } from 'path';

import { getConfigSchema, initServerWithKibana, KbnServer } from './server/kibana.index';
import { getConfigSchema, initServerWithKibana } from './server/kibana.index';
import { savedObjectMappings } from './server/saved_objects';

const APP_ID = 'infra';
const logsSampleDataLinkLabel = i18n.translate('xpack.infra.sampleDataLinkLabel', {
defaultMessage: 'Logs',
});

export function infra(kibana: any) {
return new kibana.Plugin({
Expand Down Expand Up @@ -67,8 +70,15 @@ export function infra(kibana: any) {
config(Joi: typeof JoiNamespace) {
return getConfigSchema(Joi);
},
init(server: KbnServer) {
init(server: any) {
initServerWithKibana(server);
server.addAppLinksToSampleDataset('logs', [
{
path: `/app/${APP_ID}#/logs`,
label: logsSampleDataLinkLabel,
icon: 'loggingApp',
},
]);
},
});
}

0 comments on commit 7401921

Please sign in to comment.