Skip to content

Commit

Permalink
Migrate Management views to Kibana Platform plugin (#53880)
Browse files Browse the repository at this point in the history
  • Loading branch information
azasypkin authored Jan 21, 2020
1 parent 27c8a4b commit 9d3d3cd
Show file tree
Hide file tree
Showing 333 changed files with 4,797 additions and 4,496 deletions.
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 });
}
}

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';

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

0 comments on commit 9d3d3cd

Please sign in to comment.