Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ x-pack/packages/ml/url_state @elastic/ml-ui
packages/kbn-monaco @elastic/appex-sharedux
x-pack/plugins/monitoring_collection @elastic/infra-monitoring-ui
x-pack/plugins/monitoring @elastic/infra-monitoring-ui
src/plugins/navigation_embeddable @elastic/kibana-presentation
src/plugins/navigation @elastic/appex-sharedux
src/plugins/newsfeed @elastic/kibana-core
test/common/plugins/newsfeed @elastic/kibana-core
Expand Down
1 change: 1 addition & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"management": ["src/legacy/core_plugins/management", "src/plugins/management"],
"monaco": "packages/kbn-monaco/src",
"navigation": "src/plugins/navigation",
"navigationEmbeddable": "src/plugins/navigation_embeddable",
"newsfeed": "src/plugins/newsfeed",
"presentationUtil": "src/plugins/presentation_util",
"randomSampling": "x-pack/packages/kbn-random-sampling",
Expand Down
4 changes: 4 additions & 0 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,10 @@ management section itself.
It also provides a stateful version of it on the start contract.


|{kib-repo}blob/{branch}/src/plugins/navigation_embeddable/README.md[navigationEmbeddable]
|This plugin adds the Navigation Embeddable which allows authors to create hard links to navigate on click and bring all context from the source dashboard to the destination dashboard.


|{kib-repo}blob/{branch}/src/plugins/newsfeed/README.md[newsfeed]
|The newsfeed plugin adds a NewsfeedNavButton to the top navigation bar and renders the content in the flyout.
Content is fetched from the remote (https://feeds.elastic.co) once a day, with periodic checks if the content needs to be refreshed. All newsfeed content is hosted remotely.
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@
"@kbn/monaco": "link:packages/kbn-monaco",
"@kbn/monitoring-collection-plugin": "link:x-pack/plugins/monitoring_collection",
"@kbn/monitoring-plugin": "link:x-pack/plugins/monitoring",
"@kbn/navigation-embeddable-plugin": "link:src/plugins/navigation_embeddable",
"@kbn/navigation-plugin": "link:src/plugins/navigation",
"@kbn/newsfeed-plugin": "link:src/plugins/newsfeed",
"@kbn/newsfeed-test-plugin": "link:test/common/plugins/newsfeed",
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ pageLoadAssetSize:
ml: 82187
monitoring: 80000
navigation: 37269
navigationEmbeddable: 17892
newsfeed: 42228
observability: 95000
observabilityOnboarding: 19573
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/navigation_embeddable/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Navigation Embeddable

This plugin adds the Navigation Embeddable which allows authors to create hard links to navigate on click and bring all context from the source dashboard to the destination dashboard.
17 changes: 17 additions & 0 deletions src/plugins/navigation_embeddable/kibana.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"type": "plugin",
"id": "@kbn/navigation-embeddable-plugin",
"owner": "@elastic/kibana-presentation",
"description": "An embeddable for quickly navigating between dashboards.",
"plugin": {
"id": "navigationEmbeddable",
"server": false,
"browser": true,
"requiredPlugins": [
"embeddable"
],
"optionalPlugins": [],
"requiredBundles": [
]
}
}
20 changes: 20 additions & 0 deletions src/plugins/navigation_embeddable/public/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

export type { NavigationEmbeddableFactory } from './navigation_embeddable';
export {
NAVIGATION_EMBEDDABLE_TYPE,
NavigationEmbeddableFactoryDefinition,
NavigationEmbeddable,
} from './navigation_embeddable';

import { NavigationEmbeddablePlugin } from './plugin';

export function plugin() {
return new NavigationEmbeddablePlugin();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

export { NAVIGATION_EMBEDDABLE_TYPE, NavigationEmbeddable } from './navigation_embeddable';
export type { NavigationEmbeddableFactory } from './navigation_embeddable_factory';
export { NavigationEmbeddableFactoryDefinition } from './navigation_embeddable_factory';
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

import React from 'react';
import { EuiTitle } from '@elastic/eui';
import { Embeddable } from '@kbn/embeddable-plugin/public';
import type { EmbeddableInput, IContainer } from '@kbn/embeddable-plugin/public';

export const NAVIGATION_EMBEDDABLE_TYPE = 'navigation';

export class NavigationEmbeddable extends Embeddable {
public readonly type = NAVIGATION_EMBEDDABLE_TYPE;

constructor(initialInput: EmbeddableInput, parent?: IContainer) {
super(initialInput, {}, parent);
}

public render(el: HTMLElement) {
return (
<EuiTitle>
<h3>Call me Magellan, cuz I&apos;m a navigator!</h3>
</EuiTitle>
);
}

public reload() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

import { i18n } from '@kbn/i18n';
import type { EmbeddableInput, IContainer } from '@kbn/embeddable-plugin/public';
import { EmbeddableFactory, EmbeddableFactoryDefinition } from '@kbn/embeddable-plugin/public';
import { NavigationEmbeddable, NAVIGATION_EMBEDDABLE_TYPE } from './navigation_embeddable';

export type NavigationEmbeddableFactory = EmbeddableFactory;

export class NavigationEmbeddableFactoryDefinition implements EmbeddableFactoryDefinition {
public readonly type = NAVIGATION_EMBEDDABLE_TYPE;

public async isEditable() {
return true;
}

public async create(initialInput: EmbeddableInput, parent?: IContainer) {
return new NavigationEmbeddable(initialInput, parent);
}

public getDisplayName() {
return i18n.translate('navigationEmbeddable.navigationEmbeddableFactory.displayName', {
defaultMessage: 'Navigation',
});
}

public getIconType() {
return 'link';
}
}
39 changes: 39 additions & 0 deletions src/plugins/navigation_embeddable/public/plugin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

import { CoreSetup, CoreStart, Plugin } from '@kbn/core/public';
import { EmbeddableSetup, EmbeddableStart } from '@kbn/embeddable-plugin/public';
import { NAVIGATION_EMBEDDABLE_TYPE } from './navigation_embeddable';
import { NavigationEmbeddableFactoryDefinition } from './navigation_embeddable';

export interface SetupDependencies {
embeddable: EmbeddableSetup;
}

export interface StartDependencies {
embeddable: EmbeddableStart;
}

export class NavigationEmbeddablePlugin
implements Plugin<void, void, SetupDependencies, StartDependencies>
{
constructor() {}

public setup(core: CoreSetup<StartDependencies>, plugins: SetupDependencies) {
plugins.embeddable.registerEmbeddableFactory(
NAVIGATION_EMBEDDABLE_TYPE,
new NavigationEmbeddableFactoryDefinition()
);
}

public start(core: CoreStart, plugins: StartDependencies) {
return {};
}

public stop() {}
}
15 changes: 15 additions & 0 deletions src/plugins/navigation_embeddable/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
},
"include": ["public/**/*", "common/**/*", "server/**/*"],
"kbn_references": [
"@kbn/core",
"@kbn/embeddable-plugin",
"@kbn/i18n",
],
"exclude": [
"target/**/*",
]
}
2 changes: 2 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,8 @@
"@kbn/monitoring-collection-plugin/*": ["x-pack/plugins/monitoring_collection/*"],
"@kbn/monitoring-plugin": ["x-pack/plugins/monitoring"],
"@kbn/monitoring-plugin/*": ["x-pack/plugins/monitoring/*"],
"@kbn/navigation-embeddable-plugin": ["src/plugins/navigation_embeddable"],
"@kbn/navigation-embeddable-plugin/*": ["src/plugins/navigation_embeddable/*"],
"@kbn/navigation-plugin": ["src/plugins/navigation"],
"@kbn/navigation-plugin/*": ["src/plugins/navigation/*"],
"@kbn/newsfeed-plugin": ["src/plugins/newsfeed"],
Expand Down
14 changes: 9 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4634,6 +4634,10 @@
version "0.0.0"
uid ""

"@kbn/navigation-embeddable-plugin@link:src/plugins/navigation_embeddable":
version "0.0.0"
uid ""

"@kbn/navigation-plugin@link:src/plugins/navigation":
version "0.0.0"
uid ""
Expand Down Expand Up @@ -5025,7 +5029,7 @@
"@kbn/server-route-repository@link:packages/kbn-server-route-repository":
version "0.0.0"
uid ""

"@kbn/serverless-observability@link:x-pack/plugins/serverless_observability":
version "0.0.0"
uid ""
Expand All @@ -5034,19 +5038,19 @@
version "0.0.0"
uid ""

"@kbn/serverless-storybook-config@link:packages/serverless/storybook/config":
"@kbn/serverless-search@link:x-pack/plugins/serverless_search":
version "0.0.0"
uid ""

"@kbn/serverless-types@link:packages/serverless/types":
"@kbn/serverless-security@link:x-pack/plugins/serverless_security":
version "0.0.0"
uid ""

"@kbn/serverless-search@link:x-pack/plugins/serverless_search":
"@kbn/serverless-storybook-config@link:packages/serverless/storybook/config":
version "0.0.0"
uid ""

"@kbn/serverless-security@link:x-pack/plugins/serverless_security":
"@kbn/serverless-types@link:packages/serverless/types":
version "0.0.0"
uid ""

Expand Down