mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
Removing the lens feature, using visualize instead (#48041)
* Removing the lens feature, using visualize instead * Updating /api/features test because lens isn't a feature anymore * Updating capability from lens to visualize in test * Fixing api integration test
This commit is contained in:
parent
549b0792af
commit
21841f6ff8
7 changed files with 7 additions and 36 deletions
|
@ -54,33 +54,6 @@ export const lens: LegacyPluginInitializer = kibana => {
|
|||
init(server: Server) {
|
||||
const kbnServer = (server as unknown) as KbnServer;
|
||||
|
||||
server.plugins.xpack_main.registerFeature({
|
||||
id: PLUGIN_ID,
|
||||
name: NOT_INTERNATIONALIZED_PRODUCT_NAME,
|
||||
app: [PLUGIN_ID, 'kibana'],
|
||||
catalogue: [PLUGIN_ID],
|
||||
privileges: {
|
||||
all: {
|
||||
api: [PLUGIN_ID],
|
||||
catalogue: [PLUGIN_ID],
|
||||
savedObject: {
|
||||
all: ['search'],
|
||||
read: ['index-pattern'],
|
||||
},
|
||||
ui: ['save', 'show', 'saveQuery'],
|
||||
},
|
||||
read: {
|
||||
api: [PLUGIN_ID],
|
||||
catalogue: [PLUGIN_ID],
|
||||
savedObject: {
|
||||
all: [],
|
||||
read: ['index-pattern'],
|
||||
},
|
||||
ui: ['show'],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
// Set up with the new platform plugin lifecycle API.
|
||||
const plugin = lensServerPlugin();
|
||||
plugin.setup(kbnServer.newPlatform.setup.core, {
|
||||
|
|
|
@ -88,7 +88,7 @@ describe('Lens App', () => {
|
|||
...core.application,
|
||||
capabilities: {
|
||||
...core.application.capabilities,
|
||||
lens: { save: true, saveQuery: true, show: true },
|
||||
visualize: { save: true, saveQuery: true, show: true },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -302,7 +302,7 @@ describe('Lens App', () => {
|
|||
...args.core.application,
|
||||
capabilities: {
|
||||
...args.core.application.capabilities,
|
||||
lens: { save: false, saveQuery: false, show: true },
|
||||
visualize: { save: false, saveQuery: false, show: true },
|
||||
},
|
||||
};
|
||||
args.editorFrame = frame;
|
||||
|
@ -520,7 +520,7 @@ describe('Lens App', () => {
|
|||
...args.core.application,
|
||||
capabilities: {
|
||||
...args.core.application.capabilities,
|
||||
lens: { save: false, saveQuery: false, show: true },
|
||||
visualize: { save: false, saveQuery: false, show: true },
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -153,7 +153,7 @@ export function App({
|
|||
// Can save if the frame has told us what it has, and there is either:
|
||||
// a) No saved doc
|
||||
// b) A saved doc that differs from the frame state
|
||||
const isSaveable = state.isDirty && (core.application.capabilities.lens.save as boolean);
|
||||
const isSaveable = state.isDirty && (core.application.capabilities.visualize.save as boolean);
|
||||
|
||||
const onError = useCallback(
|
||||
(e: { message: string }) =>
|
||||
|
@ -229,7 +229,7 @@ export function App({
|
|||
showDatePicker={true}
|
||||
showQueryBar={true}
|
||||
showFilterBar={true}
|
||||
showSaveQuery={core.application.capabilities.lens.saveQuery as boolean}
|
||||
showSaveQuery={core.application.capabilities.visualize.saveQuery as boolean}
|
||||
savedQuery={state.savedQuery}
|
||||
onSaved={savedQuery => {
|
||||
setState(s => ({ ...s, savedQuery }));
|
||||
|
|
|
@ -48,7 +48,7 @@ export class EmbeddableFactory extends AbstractEmbeddableFactory {
|
|||
}
|
||||
|
||||
public isEditable() {
|
||||
return capabilities.get().lens.save as boolean;
|
||||
return capabilities.get().visualize.save as boolean;
|
||||
}
|
||||
|
||||
canCreateNew() {
|
||||
|
|
|
@ -46,7 +46,7 @@ export const buildOSSFeatures = ({ savedObjectTypes, includeTimelion }: BuildOSS
|
|||
}),
|
||||
icon: 'visualizeApp',
|
||||
navLinkId: 'kibana:visualize',
|
||||
app: ['kibana'],
|
||||
app: ['kibana', 'lens'],
|
||||
catalogue: ['visualize'],
|
||||
privileges: {
|
||||
all: {
|
||||
|
|
|
@ -112,7 +112,6 @@ export default function({ getService }: FtrProviderContext) {
|
|||
'canvas',
|
||||
'code',
|
||||
'infrastructure',
|
||||
'lens',
|
||||
'logs',
|
||||
'maps',
|
||||
'uptime',
|
||||
|
|
|
@ -38,7 +38,6 @@ export default function({ getService }: FtrProviderContext) {
|
|||
apm: ['all', 'read'],
|
||||
siem: ['all', 'read'],
|
||||
code: ['all', 'read'],
|
||||
lens: ['all', 'read'],
|
||||
},
|
||||
global: ['all', 'read'],
|
||||
space: ['all', 'read'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue