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

[SearchProfiler] SearchProfiler to NP #48795

Merged
merged 42 commits into from
Oct 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
c73355c
Added the following components:
jloleysens Oct 17, 2019
4cea13b
First iteration of ProfileTree component (needs render test)
jloleysens Oct 19, 2019
6ecf7c4
Remove space
jloleysens Oct 19, 2019
e1da3ca
ProfileTree render test
jloleysens Oct 21, 2019
0cae751
Add profile tree test to git index
jloleysens Oct 21, 2019
6365349
First iteration of editor component with render test
jloleysens Oct 21, 2019
1ff73b2
First iteration of nearly functional public
jloleysens Oct 21, 2019
2d01b15
Fix highlight_details_flyout render test
jloleysens Oct 22, 2019
21d9a4e
Move NP directory to public and fix import issue created by directly …
jloleysens Oct 22, 2019
1ef208a
Rendering and looking more normal
jloleysens Oct 22, 2019
71df9e7
Fix type issues and fix a11y for ace editor
jloleysens Oct 23, 2019
b571359
Added ability to do profile requests again and render into UI (stylin…
jloleysens Oct 23, 2019
6a25db7
Fix props in editor test
jloleysens Oct 24, 2019
f7ee889
Added empty tree placeholder component (with test), moved styling aro…
jloleysens Oct 24, 2019
56a0bf6
Fix path
jloleysens Oct 24, 2019
14a4600
Lots of style updates and added util for determining visible children…
jloleysens Oct 24, 2019
2eeddec
Re-add missing badge and make it slightly wider (otherwise 100.00% cu…
jloleysens Oct 24, 2019
6e5ae2e
Delete legacy public!
jloleysens Oct 24, 2019
b6216cc
SCSS refactor + fix for re-rendering editor
jloleysens Oct 25, 2019
17e2c86
UI and server updates after license checks
jloleysens Oct 25, 2019
f8a9118
[skip ci] Add server np_ready code
jloleysens Oct 25, 2019
04cb52e
Merge branch 'master' into np-migration/searchprofiler
elasticmachine Oct 25, 2019
0fca8eb
fix i18n
jloleysens Oct 28, 2019
3194ccb
Re-enable error annotations
jloleysens Oct 28, 2019
bd6a570
Minor UX improvements (focus editor after failed request and no tabin…
jloleysens Oct 28, 2019
da73aeb
Removed xpackMain from ServerShim
jloleysens Oct 28, 2019
2033814
Added placeholder component for loading state and implemented useReducer
jloleysens Oct 28, 2019
c684d51
Refactor actions
jloleysens Oct 28, 2019
30ab382
Changes after PR feedback:
jloleysens Oct 29, 2019
39ad09b
Removed .type from backend and cleanup translations
jloleysens Oct 29, 2019
fc622c1
Disable responsive UI layout for now
jloleysens Oct 29, 2019
dc2c1d4
Remove buggy error annotation code
jloleysens Oct 29, 2019
f566e4d
- Refactored percentage badge to own component
jloleysens Oct 30, 2019
3f6b2b1
Merge branch 'master' into np-migration/searchprofiler
elasticmachine Oct 30, 2019
7b55769
Update missing i18n and fix use ace ui keyboard hook
jloleysens Oct 30, 2019
da11aa0
Update useEffect dependencies array for editor component
jloleysens Oct 30, 2019
3c09351
Merge branch 'master' into np-migration/searchprofiler
elasticmachine Oct 30, 2019
10b0425
Merge branch 'master' into np-migration/searchprofiler
elasticmachine Oct 31, 2019
55d8446
Merge branch 'master' into np-migration/searchprofiler
elasticmachine Oct 31, 2019
9966381
Use absolute path to dev tools app (to fix CI)
jloleysens Oct 31, 2019
d40c7a1
Remove file extensions
jloleysens Oct 31, 2019
d830911
Re-add missing data-test-subj
jloleysens Oct 31, 2019
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
56 changes: 0 additions & 56 deletions x-pack/legacy/plugins/searchprofiler/index.js

This file was deleted.

65 changes: 65 additions & 0 deletions x-pack/legacy/plugins/searchprofiler/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*
* 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';
import Boom from 'boom';

import { CoreSetup } from 'src/core/server';
import { Server } from 'src/legacy/server/kbn_server';
import { LegacySetup } from './server/np_ready/types';
import { plugin } from './server/np_ready';

export const searchprofiler = (kibana: any) => {
const publicSrc = resolve(__dirname, 'public');

return new kibana.Plugin({
require: ['elasticsearch', 'xpack_main'],
id: 'searchprofiler',
configPrefix: 'xpack.searchprofiler',
publicDir: publicSrc,

uiExports: {
// NP Ready
devTools: [`${publicSrc}/legacy`],
styleSheetPaths: `${publicSrc}/np_ready/application/index.scss`,
// Legacy
hacks: ['plugins/searchprofiler/register'],
home: ['plugins/searchprofiler/register_feature'],
},
init(server: Server) {
const serverPlugin = plugin();
const thisPlugin = this;

const commonRouteConfig = {
pre: [
function forbidApiAccess() {
const licenseCheckResults = server.plugins.xpack_main.info
.feature(thisPlugin.id)
.getLicenseCheckResults();
if (licenseCheckResults.showAppLink && licenseCheckResults.enableAppLink) {
return null;
} else {
throw Boom.forbidden(licenseCheckResults.message);
}
},
],
};

const legacySetup: LegacySetup = {
route: (args: Parameters<typeof server.route>[0]) => server.route(args),
plugins: {
__LEGACY: {
thisPlugin,
xpackMain: server.plugins.xpack_main,
elasticsearch: server.plugins.elasticsearch,
commonRouteConfig,
},
},
};
serverPlugin.setup({} as CoreSetup, legacySetup);
},
});
};
193 changes: 0 additions & 193 deletions x-pack/legacy/plugins/searchprofiler/public/app.js

This file was deleted.

This file was deleted.

Loading