Skip to content

Commit d9c2563

Browse files
new: STORIF-234 - ACLP Service availability check added to the volume metrics tab. (#13321)
Description: ACLP Service availability check added to the volume metrics tab. Testing instructions: Run pnpm dev Navigate to /volumes/<volume> Observe "Metrics Tab" button, it should be hidden when ACLP service is unavailable.
1 parent 8f07909 commit d9c2563

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

packages/manager/src/features/ObjectStorage/BucketDetail/index.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,8 @@ export const BucketDetailLanding = React.memo(() => {
4949

5050
const { aclpServices, objectStorageContextualMetrics } = useFlags();
5151
const { isObjectStorageGen2Enabled } = useIsObjectStorageGen2Enabled();
52-
const { isError: aclpServiceError } = useCloudPulseServiceByServiceType(
53-
'objectstorage',
54-
true
55-
);
52+
const { isError: aclpServiceError, isLoading: aclServiceLoading } =
53+
useCloudPulseServiceByServiceType('objectstorage', true);
5654

5755
const {
5856
data: bucketsData,
@@ -94,7 +92,7 @@ export const BucketDetailLanding = React.memo(() => {
9492
},
9593
]);
9694

97-
if (isPending || isLoading) {
95+
if (isPending || isLoading || aclServiceLoading) {
9896
return <CircleProgress />;
9997
}
10098

packages/manager/src/features/Volumes/VolumeDetails/VolumeDetails.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { Tabs } from 'src/components/Tabs/Tabs';
99
import { TanStackTabLinkList } from 'src/components/Tabs/TanStackTabLinkList';
1010
import { useFlags } from 'src/hooks/useFlags';
1111
import { useTabs } from 'src/hooks/useTabs';
12+
import { useCloudPulseServiceByServiceType } from 'src/queries/cloudpulse/services';
1213

1314
import { VolumeDrawers } from '../VolumeDrawers/VolumeDrawers';
1415
import { VolumeDetailsHeader } from './VolumeDetailsHeader';
@@ -18,6 +19,9 @@ export const VolumeDetails = () => {
1819

1920
const { volumeSummaryPage, aclpServices, blockStorageContextualMetrics } =
2021
useFlags();
22+
const { isError: aclpServiceError, isLoading: aclServiceLoading } =
23+
useCloudPulseServiceByServiceType('blockstorage', true);
24+
2125
const { volumeId } = useParams({ from: '/volumes/$volumeId' });
2226
const { data: volume, isLoading, error } = useVolumeQuery(volumeId);
2327
const { tabs, handleTabChange, tabIndex } = useTabs([
@@ -29,8 +33,9 @@ export const VolumeDetails = () => {
2933
to: '/volumes/$volumeId/metrics',
3034
title: 'Metrics',
3135
hide:
32-
!aclpServices?.blockstorage?.metrics?.enabled ||
33-
!blockStorageContextualMetrics,
36+
aclpServiceError ||
37+
!blockStorageContextualMetrics ||
38+
!aclpServices?.blockstorage?.metrics?.enabled,
3439
chip: aclpServices?.blockstorage?.metrics?.beta ? <BetaChip /> : null,
3540
},
3641
]);
@@ -39,7 +44,7 @@ export const VolumeDetails = () => {
3944
return <ErrorState errorText={error?.[0].reason ?? 'Not found'} />;
4045
}
4146

42-
if (isLoading || !volume) {
47+
if (isLoading || aclServiceLoading || !volume) {
4348
return <CircleProgress />;
4449
}
4550

0 commit comments

Comments
 (0)