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

[Watcher] Move out of legacy #54752

Merged
merged 21 commits into from
Jan 23, 2020
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
dddb82e
Moved out of legacy folder
jloleysens Jan 14, 2020
f90ea19
First iteration of watcher plugin that renders
jloleysens Jan 14, 2020
1e630f3
Move create Timebuckets to plugin root
jloleysens Jan 15, 2020
5e29541
Re-enable Component integration tests
jloleysens Jan 15, 2020
00d6821
Minor fix for data deserializer in api.ts
jloleysens Jan 15, 2020
d2d1899
Slight logic refactor, more defensive plugin startup
jloleysens Jan 15, 2020
8b1c2b0
Re-add legacy folder for SCSS pipeline
jloleysens Jan 15, 2020
bcb2859
Remove duplicate style sheet
jloleysens Jan 15, 2020
1d7f301
Fix type issue with TimeBuckets export
jloleysens Jan 16, 2020
21c25ef
Update license management routing logic (issued warning for using bas…
jloleysens Jan 16, 2020
da4f3d2
More defensive plugin registration
jloleysens Jan 16, 2020
0c8f3ea
Fix i18n issues and restore registration of feature on home view
jloleysens Jan 17, 2020
19ddfb8
Merge branch 'master' of github.com:elastic/kibana into np/watcher/ou…
jloleysens Jan 17, 2020
84720a7
Remove watcher license error check copy
jloleysens Jan 20, 2020
e47beee
Merge branch 'master' into np/watcher/out-of-legacy
elasticmachine Jan 20, 2020
ea6fbbe
Restore license error message in watcher
jloleysens Jan 20, 2020
b680298
Fix mock context value
jloleysens Jan 20, 2020
94296d3
Merge branch 'master' into np/watcher/out-of-legacy
elasticmachine Jan 22, 2020
7f14e02
Merge branch 'master' of github.com:elastic/kibana into np/watcher/ou…
jloleysens Jan 22, 2020
98fc0f8
Merge branch 'master' of github.com:elastic/kibana into np/watcher/ou…
jloleysens Jan 22, 2020
923c2d5
Merge branch 'master' into np/watcher/out-of-legacy
elasticmachine Jan 23, 2020
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 .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,4 @@
/x-pack/legacy/plugins/rollup/ @elastic/es-ui
/x-pack/legacy/plugins/searchprofiler/ @elastic/es-ui
/x-pack/legacy/plugins/snapshot_restore/ @elastic/es-ui
/x-pack/legacy/plugins/watcher/ @elastic/es-ui
/x-pack/plugins/watcher/ @elastic/es-ui
2 changes: 1 addition & 1 deletion x-pack/.i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,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 @@ -20,7 +20,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`,
'^legacy/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