Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion public/action/ad_dashboard_action.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { isReferenceOrValueEmbeddable } from '../../../../src/plugins/embeddable
import { EuiIconType } from '@elastic/eui/src/components/icon/icon';
import { VisualizeEmbeddable } from '../../../../src/plugins/visualizations/public';
import { isEligibleForVisLayers } from '../../../../src/plugins/vis_augmenter/public';
import { getUISettings } from '../services';

export const ACTION_AD = 'ad';

Expand Down Expand Up @@ -62,9 +63,10 @@ export const createADAction = ({
const vis = (embeddable as VisualizeEmbeddable).vis;
return Boolean(
embeddable.parent &&
embeddable.getInput()?.viewMode === 'view' &&
isDashboard(embeddable.parent) &&
vis !== undefined &&
isEligibleForVisLayers(vis)
isEligibleForVisLayers(vis, getUISettings())
);
},
execute: async ({ embeddable }: ActionContext) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,13 @@ function AssociatedDetectors({ embeddable, closeFlyout, setMode }) {
};
return (
<div className="associated-detectors">
<EuiFlyout style={{ maxWidth: '740px' }} ownFocus size="m" paddingSize="m" onClose={closeFlyout}>
<EuiFlyout
style={{ maxWidth: '740px' }}
ownFocus
size="m"
paddingSize="m"
onClose={closeFlyout}
>
<EuiFlyoutHeader hasBorder>
<EuiTitle>
<h2 id="associated-detectors__title">
Expand Down
6 changes: 1 addition & 5 deletions public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,7 @@ export class AnomalyDetectionOpenSearchDashboardsPlugin
},
});

// // set embeddable plugin for feature anywhere create flyout
// setEmbeddable(embeddable);

// // set vis argumenter loader for feature anywhere associated flyout
// setSavedFeatureAnywhereLoader(visAugmenter.savedAugmentVisLoader);
setUISettings(core.uiSettings);

// Set the HTTP client so it can be pulled into expression fns to make
// direct server-side calls
Expand Down