Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into kbn-50308-so-mana…
Browse files Browse the repository at this point in the history
…gement-lib-to-ts
  • Loading branch information
pgayvallet committed Mar 26, 2020
2 parents 371813a + a7508b8 commit c618664
Show file tree
Hide file tree
Showing 112 changed files with 3,005 additions and 1,385 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
/src/legacy/server/saved_objects/ @elastic/kibana-platform
/src/legacy/server/status/ @elastic/kibana-platform
/src/plugins/status_page/ @elastic/kibana-platform
/src/plugins/saved_objects_management/ @elastic/kibana-platform
/src/dev/run_check_published_api_changes.ts @elastic/kibana-platform

# Security
Expand Down
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 @@ -2028,6 +2028,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 @@ -259,7 +258,6 @@ export default function(kibana) {
// routes
importApi(server);
exportApi(server);
managementApi(server);
registerCspCollector(usageCollection, server);
server.injectUiAppVars('kibana', () => injectVars(server));
},
Expand Down
7 changes: 1 addition & 6 deletions src/legacy/core_plugins/kibana/inject_vars.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,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
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

0 comments on commit c618664

Please sign in to comment.