You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by ab...@apache.org on 2026/03/31 12:05:30 UTC

(ozone) branch master updated: HDDS-14727. Improve volume/bucket selection in File Size Distribution (#9865)

This is an automated email from the ASF dual-hosted git repository.

abhishekpal pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new dfede3a7b2a HDDS-14727. Improve volume/bucket selection in File Size Distribution (#9865)
dfede3a7b2a is described below

commit dfede3a7b2aa433c63b76fdfd80f343e9783de3b
Author: Arun Sarin <ar...@gmail.com>
AuthorDate: Tue Mar 31 17:35:23 2026 +0530

    HDDS-14727. Improve volume/bucket selection in File Size Distribution (#9865)
---
 .../src/v2/components/plots/insightsFilePlot.tsx     |  4 ++++
 .../src/v2/components/select/multiSelect.tsx         | 20 ++------------------
 .../src/v2/constants/select.constants.tsx            |  3 +--
 .../src/v2/pages/insights/insights.tsx               |  1 +
 4 files changed, 8 insertions(+), 20 deletions(-)

diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/components/plots/insightsFilePlot.tsx b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/components/plots/insightsFilePlot.tsx
index a472839b1ae..4758ca8d6cd 100644
--- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/components/plots/insightsFilePlot.tsx
+++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/components/plots/insightsFilePlot.tsx
@@ -235,6 +235,8 @@ const FileSizeDistribution: React.FC<FileSizeDistributionProps> = ({
         onTagClose={() => { }}
         fixedColumn=''
         columnLength={volumeOptions.length}
+        showSearch={true}
+        showSelectAll={true}
         style={{
           control: (baseStyles, state) => ({
             ...baseStyles,
@@ -251,6 +253,8 @@ const FileSizeDistribution: React.FC<FileSizeDistributionProps> = ({
         fixedColumn=''
         columnLength={bucketOptions.length}
         isDisabled={!isBucketSelectionEnabled}
+        showSearch={true}
+        showSelectAll={true}
         style={{
           control: (baseStyles, state) => ({
             ...baseStyles,
diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/components/select/multiSelect.tsx b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/components/select/multiSelect.tsx
index c3a517519de..5942e8a3361 100644
--- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/components/select/multiSelect.tsx
+++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/components/select/multiSelect.tsx
@@ -28,14 +28,11 @@ import {
 } from 'react-select';
 
 import { selectStyles } from "@/v2/constants/select.constants";
-import MultiSelectMenuList from './multiSelectMenuList';
+import MultiSelectMenuList, { MultiSelectInput, Option } from './multiSelectMenuList';
 
+export type { Option };
 
 // ------------- Types -------------- //
-export type Option = {
-  label: string;
-  value: string;
-}
 
 interface MultiSelectProps extends ReactSelectProps<Option, true> {
   options: Option[];
@@ -74,19 +71,6 @@ const OptionComponent: React.FC<OptionProps<Option, true>> = (props) => {
   );
 };
 
-// Defined at module level so the reference is stable — no useMemo required.
-// Suppresses react-select's blur-driven menu close while the user interacts
-// with the search box inside the menu.
-// searchInteracting ref is passed through react-select's selectProps.
-const MultiSelectInput = ({ onBlur, ...inputProps }: any) => {
-  const { searchInteracting } = inputProps.selectProps ?? {};
-  const handleBlur = (e: React.FocusEvent<HTMLElement>) => {
-    if (searchInteracting?.current) return;
-    if (onBlur) onBlur(e);
-  };
-  return <input {...inputProps} onBlur={handleBlur} />;
-};
-
 // ------------- Component -------------- //
 
 const MultiSelect: React.FC<MultiSelectProps> = ({
diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/constants/select.constants.tsx b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/constants/select.constants.tsx
index 6b434ac8e87..225fa5a2ef9 100644
--- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/constants/select.constants.tsx
+++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/constants/select.constants.tsx
@@ -48,8 +48,7 @@ export const selectStyles: StylesConfig<Option, true> = {
     padding: 0
   }),
   menu: (baseStyles) => ({
-    ...baseStyles,
-    height: 100
+    ...baseStyles
   }),
   placeholder: (baseStyles) => ({
     ...baseStyles,
diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/pages/insights/insights.tsx b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/pages/insights/insights.tsx
index 930f0a4a979..ebbcd592458 100644
--- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/pages/insights/insights.tsx
+++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/pages/insights/insights.tsx
@@ -90,6 +90,7 @@ const Insights: React.FC<{}> = () => {
           (map: Map<string, Set<string>>, current: FileCountResponse) => {
             const volume = current.volume;
             const bucket = current.bucket;
+            if (!volume || !bucket) return map;
             if (map.has(volume)) {
               const buckets = Array.from(map.get(volume)!);
               map.set(volume, new Set<string>([...buckets, bucket]));


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ozone.apache.org
For additional commands, e-mail: commits-help@ozone.apache.org