From e72d2d717924757d250fb8775c19d05a9df421ba Mon Sep 17 00:00:00 2001 From: stroomdev66 Date: Mon, 21 Oct 2024 15:21:56 +0100 Subject: [PATCH] *#4546 Remove redundant dashboard tab options --- .../dashboard/client/main/TabManager.java | 8 +++++-- .../20241021_142140_309__4546.md | 24 +++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 unreleased_changes/20241021_142140_309__4546.md diff --git a/stroom-core-client/src/main/java/stroom/dashboard/client/main/TabManager.java b/stroom-core-client/src/main/java/stroom/dashboard/client/main/TabManager.java index 92d43921659..db3cfd15912 100644 --- a/stroom-core-client/src/main/java/stroom/dashboard/client/main/TabManager.java +++ b/stroom-core-client/src/main/java/stroom/dashboard/client/main/TabManager.java @@ -181,11 +181,15 @@ private List updateMenuItems(final TabLayoutConfig tabLayoutConfig, // Create duplicate menus. menuItems.add(createDuplicateMenu(tabLayoutConfig, tabConfig)); - menuItems.add(createDuplicateTabPanelMenu(tabLayoutConfig)); + if (tabLayoutConfig.getAllTabCount() > 1) { + menuItems.add(createDuplicateTabPanelMenu(tabLayoutConfig)); + } // Create remove menus. menuItems.add(createRemoveMenu(tabLayoutConfig, tabConfig)); - menuItems.add(createRemoveTabPanel(tabLayoutConfig)); + if (tabLayoutConfig.getAllTabCount() > 1) { + menuItems.add(createRemoveTabPanel(tabLayoutConfig)); + } return menuItems; } diff --git a/unreleased_changes/20241021_142140_309__4546.md b/unreleased_changes/20241021_142140_309__4546.md new file mode 100644 index 00000000000..340ff04686f --- /dev/null +++ b/unreleased_changes/20241021_142140_309__4546.md @@ -0,0 +1,24 @@ +* Issue **#4546** : Remove redundant dashboard tab options. + + +```sh +# ******************************************************************************** +# Issue title: Remove the `Remove All` and `Duplicate All` dashboard tab options where the user has a single tab +# Issue link: https://github.com/gchq/stroom/issues/4546 +# ******************************************************************************** + +# ONLY the top line will be included as a change entry in the CHANGELOG. +# The entry should be in GitHub flavour markdown and should be written on a SINGLE +# line with no hard breaks. You can have multiple change files for a single GitHub issue. +# The entry should be written in the imperative mood, i.e. 'Fix nasty bug' rather than +# 'Fixed nasty bug'. +# +# Examples of acceptable entries are: +# +# +# * Issue **123** : Fix bug with an associated GitHub issue in this repository +# +# * Issue **namespace/other-repo#456** : Fix bug with an associated GitHub issue in another repository +# +# * Fix bug with no associated GitHub issue. +```