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

[App Arch] Saved object migrations from kibana plugin to new platform #59044

Merged
merged 22 commits into from
Mar 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
869907e
[App Arch] Saved object migrations from kibana plugin to new platform
alexwizp Mar 2, 2020
3e56323
Merge branch 'master' into 55946-1
elasticmachine Mar 3, 2020
1b5014a
search type -> data plugin
alexwizp Mar 3, 2020
50675dd
remove migrations folder
alexwizp Mar 3, 2020
9724bd0
Merge branch 'master' into 55946-1
elasticmachine Mar 4, 2020
8aa9938
visualization type -> visualizations plugin
alexwizp Mar 5, 2020
7d7d8bb
Merge remote-tracking branch 'upstream/master' into 55946-1
alexwizp Mar 5, 2020
a93e411
Merge branch 'master' into 55946-1
elasticmachine Mar 5, 2020
f6cda9f
Merge branch 'master' into 55946-1
elasticmachine Mar 8, 2020
686d1a4
Merge branch 'master' into 55946-1
elasticmachine Mar 9, 2020
9f421f2
Merge remote-tracking branch 'upstream/master' into 55946-1
alexwizp Mar 9, 2020
ccc7c5c
src/legacy/core_plugins/data/mappings-> np
alexwizp Mar 9, 2020
f7f73b6
Merge remote-tracking branch 'upstream/master' into 55946-1
alexwizp Mar 10, 2020
2fa7cff
savedObjectsManagement -> management section
alexwizp Mar 10, 2020
a646fd0
Merge remote-tracking branch 'upstream/master' into 55946-1
alexwizp Mar 10, 2020
fd7849a
Merge branch 'master' into 55946-1
elasticmachine Mar 11, 2020
edc8e46
Merge remote-tracking branch 'upstream/master' into 55946-1
alexwizp Mar 11, 2020
d486f66
Merge branch 'master' into 55946-1
elasticmachine Mar 11, 2020
ff3e192
Merge branch 'master' into 55946-1
elasticmachine Mar 11, 2020
a2b8ac3
Merge remote-tracking branch 'upstream/master' into 55946-1
alexwizp Mar 16, 2020
b02e9fe
move code into save_objects folder
alexwizp Mar 16, 2020
5c4a309
Merge remote-tracking branch 'upstream/master' into 55946-1
alexwizp Mar 16, 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: 1 addition & 1 deletion src/core/server/saved_objects/serialization/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export interface SavedObjectsRawDocSource {
* scenario out of the box.
*/
interface SavedObjectDoc {
attributes: unknown;
attributes: any;
id?: string; // NOTE: SavedObjectDoc is used for uncreated objects where `id` is optional
type: string;
namespace?: string;
Expand Down
19 changes: 0 additions & 19 deletions src/legacy/core_plugins/data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

import { resolve } from 'path';
import { Legacy } from '../../../../kibana';
import { mappings } from './mappings';
import { SavedQuery } from '../../../plugins/data/public';

// eslint-disable-next-line import/no-default-export
export default function DataPlugin(kibana: any) {
Expand All @@ -36,23 +34,6 @@ export default function DataPlugin(kibana: any) {
init: (server: Legacy.Server) => ({}),
uiExports: {
injectDefaultVars: () => ({}),
mappings,
savedObjectsManagement: {
query: {
icon: 'search',
defaultSearchField: 'title',
isImportableAndExportable: true,
getTitle(obj: SavedQuery) {
return obj.attributes.title;
},
getInAppUrl(obj: SavedQuery) {
return {
path: `/app/kibana#/discover?_a=(savedQuery:'${encodeURIComponent(obj.id)}')`,
uiCapabilitiesPath: 'discover.show',
};
},
},
},
},
};

Expand Down
51 changes: 0 additions & 51 deletions src/legacy/core_plugins/kibana/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,57 +126,6 @@ export default function(kibana) {
],

savedObjectsManagement: {
'index-pattern': {
icon: 'indexPatternApp',
defaultSearchField: 'title',
isImportableAndExportable: true,
getTitle(obj) {
return obj.attributes.title;
},
getEditUrl(obj) {
return `/management/kibana/index_patterns/${encodeURIComponent(obj.id)}`;
},
getInAppUrl(obj) {
return {
path: `/app/kibana#/management/kibana/index_patterns/${encodeURIComponent(obj.id)}`,
uiCapabilitiesPath: 'management.kibana.index_patterns',
};
},
},
visualization: {
icon: 'visualizeApp',
defaultSearchField: 'title',
isImportableAndExportable: true,
getTitle(obj) {
return obj.attributes.title;
},
getEditUrl(obj) {
return `/management/kibana/objects/savedVisualizations/${encodeURIComponent(obj.id)}`;
},
getInAppUrl(obj) {
return {
path: `/app/kibana#/visualize/edit/${encodeURIComponent(obj.id)}`,
uiCapabilitiesPath: 'visualize.show',
};
},
},
search: {
icon: 'discoverApp',
defaultSearchField: 'title',
isImportableAndExportable: true,
getTitle(obj) {
return obj.attributes.title;
},
getEditUrl(obj) {
return `/management/kibana/objects/savedSearches/${encodeURIComponent(obj.id)}`;
},
getInAppUrl(obj) {
return {
path: `/app/kibana#/discover/${encodeURIComponent(obj.id)}`,
uiCapabilitiesPath: 'discover.show',
};
},
},
dashboard: {
icon: 'dashboardApp',
defaultSearchField: 'title',
Expand Down
89 changes: 0 additions & 89 deletions src/legacy/core_plugins/kibana/mappings.json
Original file line number Diff line number Diff line change
@@ -1,93 +1,4 @@
{
"index-pattern": {
"properties": {
"fieldFormatMap": {
"type": "text"
},
"fields": {
"type": "text"
},
"intervalName": {
"type": "keyword"
},
"notExpandable": {
"type": "boolean"
},
"sourceFilters": {
"type": "text"
},
"timeFieldName": {
"type": "keyword"
},
"title": {
"type": "text"
},
"type": {
"type": "keyword"
},
"typeMeta": {
"type": "keyword"
}
}
},
"visualization": {
"properties": {
"description": {
"type": "text"
},
"kibanaSavedObjectMeta": {
"properties": {
"searchSourceJSON": {
"type": "text"
}
}
},
"savedSearchRefName": {
"type": "keyword"
},
"title": {
"type": "text"
},
"uiStateJSON": {
"type": "text"
},
"version": {
"type": "integer"
},
"visState": {
"type": "text"
}
}
},
"search": {
"properties": {
"columns": {
"type": "keyword"
},
"description": {
"type": "text"
},
"hits": {
"type": "integer"
},
"kibanaSavedObjectMeta": {
"properties": {
"searchSourceJSON": {
"type": "text"
}
}
},
"sort": {
"type": "keyword"
},
"title": {
"type": "text"
},
"version": {
"type": "integer"
}
}
},
"dashboard": {
"properties": {
"description": {
Expand Down
Loading