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

Migrate Management views to Kibana Platform plugin #53880

Merged
merged 9 commits into from
Jan 21, 2020
  •  
  •  
  •  
19 changes: 0 additions & 19 deletions src/core/public/saved_objects/saved_objects_client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -448,23 +448,4 @@ describe('SavedObjectsClient', () => {
`);
});
});

it('maintains backwards compatibility by transforming http.fetch errors to be compatible with kfetch errors', () => {
const err = {
response: { ok: false, redirected: false, status: 409, statusText: 'Conflict' },
body: 'response body',
};
http.fetch.mockRejectedValue(err);
return expect(savedObjectsClient.get(doc.type, doc.id)).rejects.toMatchInlineSnapshot(`
Object {
"body": "response body",
"res": Object {
"ok": false,
"redirected": false,
"status": 409,
"statusText": "Conflict",
},
}
`);
});
});
6 changes: 1 addition & 5 deletions src/core/public/saved_objects/saved_objects_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,11 +465,7 @@ export class SavedObjectsClient {
* uses `{response: {status: number}}`.
*/
private savedObjectsFetch(path: string, { method, query, body }: HttpFetchOptions) {
return this.http.fetch(path, { method, query, body }).catch(err => {
const kfetchError = Object.assign(err, { res: err.response });
delete kfetchError.response;
return Promise.reject(kfetchError);
});
return this.http.fetch(path, { method, query, body });
Copy link
Member Author

@azasypkin azasypkin Jan 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: discussed with @rudolf that's no longer necessary since BWC is maintained within HttpFetchError itself now.

}
}

Expand Down
7 changes: 6 additions & 1 deletion src/plugins/management/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ export function plugin(initializerContext: PluginInitializerContext) {
return new ManagementPlugin();
}

export { ManagementSetup, ManagementStart, RegisterManagementApp } from './types';
export {
ManagementSetup,
ManagementStart,
RegisterManagementApp,
RegisterManagementAppArgs,
} from './types';
export { ManagementApp } from './management_app';
export { ManagementSection } from './management_section';
export { ManagementSidebarNav } from './components'; // for use in legacy management apps
28 changes: 0 additions & 28 deletions x-pack/legacy/plugins/security/common/model.ts

This file was deleted.

2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/security/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import { Legacy } from 'kibana';
import { AuthenticatedUser } from './common/model';
import { AuthenticatedUser } from '../../../plugins/security/public';

/**
* Public interface of the security plugin.
Expand Down
3 changes: 0 additions & 3 deletions x-pack/legacy/plugins/security/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ export const security = kibana =>
},

uiExports: {
chromeNavControls: [],
managementSections: ['plugins/security/views/management'],
styleSheetPaths: resolve(__dirname, 'public/index.scss'),
apps: [
{
Expand Down Expand Up @@ -76,7 +74,6 @@ export const security = kibana =>
'plugins/security/hacks/on_unauthorized_response',
'plugins/security/hacks/register_account_management_app',
],
home: ['plugins/security/register_feature'],
injectDefaultVars: server => {
const securityPlugin = server.newPlatform.setup.plugins.security;
if (!securityPlugin) {
Expand Down
16 changes: 0 additions & 16 deletions x-pack/legacy/plugins/security/public/documentation_links.js

This file was deleted.

3 changes: 0 additions & 3 deletions x-pack/legacy/plugins/security/public/images/logout.svg

This file was deleted.

3 changes: 0 additions & 3 deletions x-pack/legacy/plugins/security/public/images/person.svg

This file was deleted.

3 changes: 3 additions & 0 deletions x-pack/legacy/plugins/security/public/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ $secFormWidth: 460px;
// Public views
@import './views/index';

// Styles of Kibana Platform plugin
@import '../../../../plugins/security/public/index';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: looks like it's the only way to import style from platform plugin right now.


49 changes: 0 additions & 49 deletions x-pack/legacy/plugins/security/public/lib/__tests__/util.js

This file was deleted.

56 changes: 0 additions & 56 deletions x-pack/legacy/plugins/security/public/lib/api.ts

This file was deleted.

47 changes: 0 additions & 47 deletions x-pack/legacy/plugins/security/public/lib/api_keys_api.ts

This file was deleted.

58 changes: 0 additions & 58 deletions x-pack/legacy/plugins/security/public/lib/role_utils.ts

This file was deleted.

25 changes: 0 additions & 25 deletions x-pack/legacy/plugins/security/public/lib/roles_api.ts

This file was deleted.

Loading