Extensions: Moved the "Extensions" menu item so the "More..." is displayed last in the panel menu. (#68372)

Moved the extensions before the more option.
pull/68438/head
Marcus Andersson 2 years ago committed by GitHub
parent 18aba61cbd
commit 58aa098ed7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 20
      public/app/features/dashboard/utils/getPanelMenu.ts

@ -269,16 +269,6 @@ export function getPanelMenu(
});
}
if (subMenu.length) {
menu.push({
type: 'submenu',
text: t('panel.header-menu.more', `More...`),
iconClassName: 'cube',
subMenu,
onClick: onMore,
});
}
const { extensions } = getPluginExtensions({
extensionPointId: PluginExtensionPoints.DashboardPanelMenu,
context: createExtensionContext(panel, dashboard),
@ -306,6 +296,16 @@ export function getPanelMenu(
});
}
if (subMenu.length) {
menu.push({
type: 'submenu',
text: t('panel.header-menu.more', `More...`),
iconClassName: 'cube',
subMenu,
onClick: onMore,
});
}
if (dashboard.canEditPanel(panel) && !panel.isEditing && !panel.isViewing) {
menu.push({ type: 'divider', text: '' });

Loading…
Cancel
Save