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 SO management routes to new plugin #59734

Merged
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
db5af58
unexpose SavedObjectsManagement from legacy server
pgayvallet Mar 2, 2020
b0f12e8
migrate saved object management routes to new plugin
pgayvallet Mar 3, 2020
1f0e935
fix endpoint methods
pgayvallet Mar 4, 2020
53030ff
adapt code due to rebase
pgayvallet Mar 10, 2020
8e71b92
extract types
pgayvallet Mar 10, 2020
6eaff34
improve findAll params
pgayvallet Mar 10, 2020
dc9bad9
adapt existing api integration tests and migrate to TS
pgayvallet Mar 11, 2020
1518159
Merge remote-tracking branch 'upstream/master' into kbn-50308-so-mana…
pgayvallet Mar 11, 2020
bc352e9
update generated doc
pgayvallet Mar 11, 2020
3982289
add API integration tests for /scroll/count
pgayvallet Mar 11, 2020
f350b8c
add unit tests for plugin and routes
pgayvallet Mar 11, 2020
07bfe52
add injectMetaAttributes tests
pgayvallet Mar 11, 2020
5a9d9f1
extract relation type
pgayvallet Mar 11, 2020
fd70c8b
add find_relationships tests
pgayvallet Mar 11, 2020
b24b37f
add find_all tests
pgayvallet Mar 11, 2020
ebf3751
Merge remote-tracking branch 'upstream/master' into kbn-50308-so-mana…
pgayvallet Mar 11, 2020
5fc0ced
Merge remote-tracking branch 'upstream/master' into kbn-50308-so-mana…
pgayvallet Mar 16, 2020
23581cd
do not complete migrator$ to avoid unhandled promise rejection
pgayvallet Mar 16, 2020
9f5df69
fix data for search endpoint integration tests
pgayvallet Mar 16, 2020
b1ef936
remove falsy comment
pgayvallet Mar 16, 2020
cb35fdb
Merge remote-tracking branch 'upstream/master' into kbn-50308-so-mana…
pgayvallet Mar 18, 2020
dc4e2bd
rename plugin folder to match plugin id
pgayvallet Mar 18, 2020
703bc80
address review comments
pgayvallet Mar 18, 2020
4ac3e3f
update CODEOWNERS
pgayvallet Mar 18, 2020
cc9f846
Merge remote-tracking branch 'upstream/master' into kbn-50308-so-mana…
pgayvallet Mar 20, 2020
e770084
Merge remote-tracking branch 'upstream/master' into kbn-50308-so-mana…
pgayvallet Mar 20, 2020
c86ee15
Merge remote-tracking branch 'upstream/master' into kbn-50308-so-mana…
pgayvallet Mar 23, 2020
0a2cb33
Merge remote-tracking branch 'upstream/master' into kbn-50308-so-mana…
pgayvallet Mar 26, 2020
d9dc39e
Merge remote-tracking branch 'upstream/master' into kbn-50308-so-mana…
pgayvallet Mar 26, 2020
d2fe4b4
Merge remote-tracking branch 'upstream/master' into kbn-50308-so-mana…
pgayvallet Mar 26, 2020
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
2 changes: 0 additions & 2 deletions src/core/server/saved_objects/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ export * from './service';

export { SavedObjectsSchema } from './schema';

export { SavedObjectsManagement } from './management';

export * from './import';

export {
Expand Down
1 change: 1 addition & 0 deletions src/core/server/saved_objects/service/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export interface SavedObjectsLegacyService {
getScopedSavedObjectsClient: SavedObjectsClientProvider['getClient'];
SavedObjectsClient: typeof SavedObjectsClient;
types: string[];
importAndExportableTypes: string[];
schema: SavedObjectsSchema;
getSavedObjectsRepository(...rest: any[]): any;
importExport: {
Expand Down
2 changes: 2 additions & 0 deletions src/core/server/server.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2023,6 +2023,8 @@ export interface SavedObjectsLegacyService {
// (undocumented)
getScopedSavedObjectsClient: SavedObjectsClientProvider['getClient'];
// (undocumented)
importAndExportableTypes: string[];
// (undocumented)
importExport: {
objectLimit: number;
importSavedObjects(options: SavedObjectsImportOptions): Promise<SavedObjectsImportResponse>;
Expand Down
2 changes: 0 additions & 2 deletions src/legacy/core_plugins/kibana/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { promisify } from 'util';
import { migrations } from './migrations';
import { importApi } from './server/routes/api/import';
import { exportApi } from './server/routes/api/export';
import { managementApi } from './server/routes/api/management';
import mappings from './mappings.json';
import { getUiSettingDefaults } from './ui_setting_defaults';
import { registerCspCollector } from './server/lib/csp_usage_collector';
Expand Down Expand Up @@ -310,7 +309,6 @@ export default function(kibana) {
// routes
importApi(server);
exportApi(server);
managementApi(server);
registerCspCollector(usageCollection, server);
server.injectUiAppVars('kibana', () => injectVars(server));
},
Expand Down
6 changes: 1 addition & 5 deletions src/legacy/core_plugins/kibana/inject_vars.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@ export function injectVars(server) {
const serverConfig = server.config();

// Get types that are import and exportable, by default yes unless isImportableAndExportable is set to false
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this comment still relevant?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably not (and it was wrong, as the default value is actually false...). removed. The whole importAndExportableTypes injection is going to be removed in next stage anyway

const { types: allTypes } = server.savedObjects;
const savedObjectsManagement = server.getSavedObjectsManagement();
const importAndExportableTypes = allTypes.filter(type =>
savedObjectsManagement.isImportAndExportable(type)
);
const { importAndExportableTypes } = server.savedObjects;

return {
importAndExportableTypes,
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading