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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion x-pack/.i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"xpack.transform": "legacy/plugins/transform",
"xpack.upgradeAssistant": "legacy/plugins/upgrade_assistant",
"xpack.uptime": "legacy/plugins/uptime",
"xpack.watcher": "legacy/plugins/watcher"
"xpack.watcher": "plugins/watcher"
},
"translations": [
"plugins/translations/translations/zh-CN.json",
Expand Down
1 change: 0 additions & 1 deletion x-pack/dev-tools/jest/create_jest_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export function createJestConfig({ kibanaDirectory, xPackKibanaDirectory }) {
'uiExports/(.*)': fileMockPath,
'^src/core/(.*)': `${kibanaDirectory}/src/core/$1`,
'^src/legacy/(.*)': `${kibanaDirectory}/src/legacy/$1`,
'^plugins/watcher/np_ready/application/models/(.*)': `${xPackKibanaDirectory}/legacy/plugins/watcher/public/np_ready/application/models/$1`,
'^plugins/([^/.]*)(.*)': `${kibanaDirectory}/src/legacy/core_plugins/$1/public$2`,
'^plugins/xpack_main/(.*);': `${xPackKibanaDirectory}/legacy/plugins/xpack_main/public/$1`,
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': fileMockPath,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import React, { Component } from 'react';
import { FormattedMessage } from '@kbn/i18n/react';
import { LicenseDashboard, UploadLicense } from './sections';
import { Switch, Route } from 'react-router-dom';
import { APP_PERMISSION } from '../../../common/constants';
import { APP_PERMISSION, BASE_PATH } from '../../../common/constants';
import { EuiPageBody, EuiEmptyPrompt, EuiText, EuiLoadingSpinner, EuiCallOut } from '@elastic/eui';

export class App extends Component {
Expand Down Expand Up @@ -88,10 +88,8 @@ export class App extends Component {
return (
<EuiPageBody>
<Switch>
<Route path={`/upload_license`} component={UploadLicense} />

{/* Match all */}
<Route component={LicenseDashboard} />
<Route path={`${BASE_PATH}upload_license`} component={UploadLicense} />
<Route path={BASE_PATH} component={LicenseDashboard} />
</Switch>
</EuiPageBody>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const boot = (deps: AppDependencies) => {
render(
<I18nContext>
<Provider store={store}>
<HashRouter basename={BASE_PATH}>
<HashRouter>
<App />
</HashRouter>
</Provider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import React from 'react';

import React, { useEffect } from 'react';
import { LicenseStatus } from './license_status';
import { RevertToBasic } from './revert_to_basic';
import { StartTrial } from './start_trial';
Expand All @@ -14,7 +13,10 @@ import { RequestTrialExtension } from './request_trial_extension';
import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui';

export const LicenseDashboard = ({ setBreadcrumb } = { setBreadcrumb: () => {} }) => {
setBreadcrumb('dashboard');
useEffect(() => {
setBreadcrumb('dashboard');
});

return (
<div>
<LicenseStatus />
Expand Down
19 changes: 19 additions & 0 deletions x-pack/legacy/plugins/watcher/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { resolve } from 'path';

const pluginDefinition = {
id: 'watcher',
configPrefix: 'xpack.watcher',
publicDir: resolve(__dirname, 'public'),
require: ['kibana'],
uiExports: {
styleSheetPaths: resolve(__dirname, 'public/index.scss'),
},
init(server: any) {},
};

export const watcher = (kibana: any) => new kibana.Plugin(pluginDefinition);
32 changes: 0 additions & 32 deletions x-pack/legacy/plugins/watcher/plugin_definition.ts

This file was deleted.

147 changes: 0 additions & 147 deletions x-pack/legacy/plugins/watcher/public/legacy.ts

This file was deleted.

28 changes: 0 additions & 28 deletions x-pack/legacy/plugins/watcher/public/manage_angular_lifecycle.ts

This file was deleted.

This file was deleted.

Loading