Skip to content

Commit

Permalink
Merge branch 'master' into alerting/view-in-app
Browse files Browse the repository at this point in the history
* master:
  [Step 1][App Arch] Saved object migrations from kibana plugin to new platform  (elastic#59044)
  adds new test (elastic#60064)
  [Uptime] Index Status API to Rest (elastic#59657)
  • Loading branch information
gmmorris committed Mar 16, 2020
2 parents 9877845 + 4be60e5 commit 5d3a7ef
Show file tree
Hide file tree
Showing 105 changed files with 3,541 additions and 3,245 deletions.
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

0 comments on commit 5d3a7ef

Please sign in to comment.