diff --git a/src/plugins/vis_augmenter/public/view_events_flyout/actions/view_events_option_action.tsx b/src/plugins/vis_augmenter/public/view_events_flyout/actions/view_events_option_action.tsx index 975f6ac0cc4c..bb8774306d47 100644 --- a/src/plugins/vis_augmenter/public/view_events_flyout/actions/view_events_option_action.tsx +++ b/src/plugins/vis_augmenter/public/view_events_flyout/actions/view_events_option_action.tsx @@ -5,8 +5,7 @@ import { i18n } from '@osd/i18n'; import { EuiIconType } from '@elastic/eui/src/components/icon/icon'; -import { get } from 'lodash'; -import { CoreStart } from 'opensearch-dashboards/public'; +import { get, isEmpty } from 'lodash'; import { VisualizeEmbeddable } from '../../../../visualizations/public'; import { EmbeddableContext } from '../../../../embeddable/public'; import { Action, IncompatibleActionError } from '../../../../ui_actions/public'; @@ -24,7 +23,7 @@ export class ViewEventsOptionAction implements Action { constructor() {} public getIconType(): EuiIconType { - return 'apmTrace'; + return 'inspect'; } public getDisplayName() { @@ -35,7 +34,11 @@ export class ViewEventsOptionAction implements Action { public async isCompatible({ embeddable }: EmbeddableContext) { const vis = (embeddable as VisualizeEmbeddable).vis; - return vis !== undefined && isEligibleForVisLayers(vis); + return ( + vis !== undefined && + isEligibleForVisLayers(vis) && + !isEmpty((embeddable as VisualizeEmbeddable).visLayers) + ); } public async execute({ embeddable }: EmbeddableContext) { diff --git a/src/plugins/vis_augmenter/public/view_events_flyout/components/event_vis_item.tsx b/src/plugins/vis_augmenter/public/view_events_flyout/components/event_vis_item.tsx index a1ee965bb20f..cc00610c4a33 100644 --- a/src/plugins/vis_augmenter/public/view_events_flyout/components/event_vis_item.tsx +++ b/src/plugins/vis_augmenter/public/view_events_flyout/components/event_vis_item.tsx @@ -32,7 +32,9 @@ export function EventVisItem(props: Props) { > - {name} + + {name} + diff --git a/src/plugins/vis_augmenter/public/view_events_flyout/components/styles.scss b/src/plugins/vis_augmenter/public/view_events_flyout/components/styles.scss index 6eaf9bba01b5..03b78fc477f1 100644 --- a/src/plugins/vis_augmenter/public/view_events_flyout/components/styles.scss +++ b/src/plugins/vis_augmenter/public/view_events_flyout/components/styles.scss @@ -1,4 +1,4 @@ -$vis-description-width: 150px; +$vis-description-width: 200px; $event-vis-height: 55px; $timeline-panel-height: 100px; $content-padding-top: 110px; // Padding needed within view events flyout content to sit comfortably below flyout header @@ -22,6 +22,7 @@ $base-vis-min-height: 25vh; // Visualizations require the container to have a va &__visDescription { min-width: $vis-description-width; max-width: $vis-description-width; + word-break: break-word; } &__content { diff --git a/src/plugins/vis_augmenter/server/capabilities_provider.ts b/src/plugins/vis_augmenter/server/capabilities_provider.ts index f9c899d3a0de..db7bfc2b5393 100644 --- a/src/plugins/vis_augmenter/server/capabilities_provider.ts +++ b/src/plugins/vis_augmenter/server/capabilities_provider.ts @@ -5,7 +5,7 @@ export const capabilitiesProvider = () => ({ visAugmenter: { - show: true, + show: false, delete: true, save: true, saveQuery: true, diff --git a/src/plugins/vis_augmenter/server/saved_objects/augment_vis.ts b/src/plugins/vis_augmenter/server/saved_objects/augment_vis.ts index 1202e6168f77..52188d52998a 100644 --- a/src/plugins/vis_augmenter/server/saved_objects/augment_vis.ts +++ b/src/plugins/vis_augmenter/server/saved_objects/augment_vis.ts @@ -12,7 +12,7 @@ export const augmentVisSavedObjectType: SavedObjectsType = { management: { importableAndExportable: true, getTitle(obj) { - return obj.attributes.title; + return `augment-vis-${obj?.attributes?.originPlugin}`; }, getEditUrl(obj) { return `/management/opensearch-dashboards/objects/savedAugmentVis/${encodeURIComponent(