Skip to content

Commit

Permalink
Migrate home app (elastic#58030) (elastic#59273)
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 authored Mar 4, 2020
1 parent 46dcea5 commit db4a61b
Show file tree
Hide file tree
Showing 98 changed files with 592 additions and 823 deletions.
2 changes: 1 addition & 1 deletion src/legacy/core_plugins/kibana/public/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ module.exports = {
{
basePath: path.resolve(__dirname, '../../../../../'),
zones: topLevelRestricedZones.concat(
buildRestrictedPaths(['visualize', 'discover', 'dashboard', 'devTools', 'home'])
buildRestrictedPaths(['visualize', 'discover', 'dashboard', 'devTools'])
),
},
],
Expand Down
1 change: 0 additions & 1 deletion src/legacy/core_plugins/kibana/public/home/_index.scss

This file was deleted.

This file was deleted.

105 changes: 0 additions & 105 deletions src/legacy/core_plugins/kibana/public/home/plugin.ts

This file was deleted.

6 changes: 3 additions & 3 deletions src/legacy/core_plugins/kibana/public/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
// Discover styles
@import 'discover/index';

// Home styles
@import './home/index';

// Visualize styles
@import './visualize/index';
// Has to come after visualize because of some
// bad cascading in the Editor layout
@import 'src/legacy/ui/public/vis/index';

// Home styles
@import '../../../../plugins/home/public/application/index';

// Management styles
@import './management/index';

Expand Down
1 change: 0 additions & 1 deletion src/legacy/core_plugins/kibana/public/kibana.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import 'uiExports/shareContextMenuExtensions';
import 'uiExports/interpreter';

import 'ui/autoload/all';
import './home';
import './discover/legacy';
import './visualize/legacy';
import './dashboard/legacy';
Expand Down
1 change: 0 additions & 1 deletion src/legacy/core_plugins/kibana_react/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export default function DataPlugin(kibana: any) {
const config: Legacy.PluginSpecOptions = {
id: 'kibana_react',
require: [],
publicDir: resolve(__dirname, 'public'),
config: (Joi: any) => {
return Joi.object({
enabled: Joi.boolean().default(true),
Expand Down
8 changes: 1 addition & 7 deletions src/legacy/core_plugins/kibana_react/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,4 @@
* under the License.
*/

// TODO these are imports from the old plugin world.
// Once the new platform is ready, they can get removed
// and handled by the platform itself in the setup method
// of the ExpressionExectorService

/** @public types */
export { Markdown, MarkdownSimple } from './markdown';
export { Markdown, MarkdownSimple } from '../../../../plugins/kibana_react/public';
15 changes: 3 additions & 12 deletions src/legacy/ui/public/new_platform/new_platform.karma_mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ export const npSetup = {
config: {
disableWelcomeScreen: false,
},
tutorials: {
setVariable: sinon.fake(),
},
},
charts: {
theme: {
Expand Down Expand Up @@ -381,18 +384,6 @@ export const npStart = {
getTriggerActions: sinon.fake(),
getTriggerCompatibleActions: sinon.fake(),
},
home: {
featureCatalogue: {
get: sinon.fake(),
register: sinon.fake(),
},
environment: {
get: sinon.fake(),
},
config: {
disableWelcomeScreen: false,
},
},
navigation: {
ui: {
TopNavMenu: mockComponent,
Expand Down
3 changes: 1 addition & 2 deletions src/legacy/ui/public/new_platform/new_platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import {
import { ChartsPluginSetup, ChartsPluginStart } from '../../../../plugins/charts/public';
import { DevToolsSetup, DevToolsStart } from '../../../../plugins/dev_tools/public';
import { KibanaLegacySetup, KibanaLegacyStart } from '../../../../plugins/kibana_legacy/public';
import { HomePublicPluginSetup, HomePublicPluginStart } from '../../../../plugins/home/public';
import { HomePublicPluginSetup } from '../../../../plugins/home/public';
import { SharePluginSetup, SharePluginStart } from '../../../../plugins/share/public';
import {
AdvancedSettingsSetup,
Expand Down Expand Up @@ -79,7 +79,6 @@ export interface PluginsStart {
data: ReturnType<DataPlugin['start']>;
embeddable: IEmbeddableStart;
expressions: ReturnType<ExpressionsPlugin['start']>;
home: HomePublicPluginStart;
inspector: InspectorStart;
uiActions: UiActionsStart;
navigation: NavigationPublicPluginStart;
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/ui/public/url/redirect_when_missing.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import React from 'react';
import { i18n } from '@kbn/i18n';
import { MarkdownSimple } from '../../../core_plugins/kibana_react/public/markdown';
import { MarkdownSimple } from '../../../../plugins/kibana_react/public';
import { toastNotifications } from 'ui/notify';
import { SavedObjectNotFound } from '../../../../plugins/kibana_utils/public';
import { uiModules } from '../modules';
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/home/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"version": "kibana",
"server": true,
"ui": true,
"optionalPlugins": ["usage_collection"]
"requiredPlugins": ["data", "kibanaLegacy"],
"optionalPlugins": ["usage_collection", "telemetry"]
}
1 change: 1 addition & 0 deletions src/plugins/home/public/application/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import 'components/index';
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import { render, unmountComponentAtNode } from 'react-dom';
import { i18n } from '@kbn/i18n';
// @ts-ignore
import { HomeApp } from './components/home_app';
import { getServices } from '../kibana_services';
import { getServices } from './kibana_services';

export const renderApp = async (element: HTMLElement) => {
const homeTitle = i18n.translate('kbn.home.breadcrumbs.homeTitle', { defaultMessage: 'Home' });
const homeTitle = i18n.translate('home.breadcrumbs.homeTitle', { defaultMessage: 'Home' });
const { featureCatalogue, chrome } = getServices();

// all the directories could be get in "start" phase of plugin after all of the legacy plugins will be moved to a NP
Expand Down
Loading

0 comments on commit db4a61b

Please sign in to comment.