Make it clear log stream panels shouldn't be used (#187548)

As discussed, I looked into making it clearer how to handle the log
stream embeddable panel on dashboards.

It's not possible to show an info icon or a badge without bigger
changes, but there is already a tooltip which can be used for the same
purpose:

<img width="321" alt="Screenshot 2024-07-04 at 11 30 27"
src="60de35b5-559f-4670-b2b9-e074a3cb73c8">

<img width="422" alt="Screenshot 2024-07-04 at 11 31 31"
src="3ba2f87c-dc33-4a6b-bf81-2e561e6b7cec">

I added the "deprecated" to the title instead.

There is code to show a "deprecated" badge, but it only works for
visualization types, not for actions (which is how log stream is
integrated here). Actions currently don't have a notion of deprecation.
It would be possible to add that, but it doesn't seem worth it to
slightly change how the "deprecated" text is rendered.
This commit is contained in:
Joe Reuter 2024-07-08 17:11:27 +02:00 committed by GitHub
parent 6590457792
commit bac808a690
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View file

@ -34,7 +34,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.dashboard.clickNewDashboard();
await PageObjects.dashboard.switchToEditMode();
await dashboardAddPanel.clickEditorMenuButton();
await dashboardAddPanel.clickAddNewPanelFromUIActionLink('Log stream');
await dashboardAddPanel.clickAddNewPanelFromUIActionLink('Log stream (deprecated)');
await dashboardAddPanel.expectEditorMenuClosed();
});

View file

@ -405,11 +405,12 @@ export class Plugin implements InfraClientPluginClass {
order: 30,
getDisplayName: () =>
i18n.translate('xpack.infra.logStreamEmbeddable.displayName', {
defaultMessage: 'Log stream',
defaultMessage: 'Log stream (deprecated)',
}),
getDisplayNameTooltip: () =>
i18n.translate('xpack.infra.logStreamEmbeddable.description', {
defaultMessage: 'Add a table of live streaming logs.',
defaultMessage:
'Add a table of live streaming logs. For a more efficient experience, we recommend using the Discover Page to create a saved search instead of using Log stream.',
}),
getIconType: () => 'logsApp',
isCompatible: async ({ embeddable }) => {