Skip to content

Commit

Permalink
change: [M3-9074] - Remove properties tab from Gen2 buckets (linode#1…
Browse files Browse the repository at this point in the history
…1491)

* change: [M3-9074] - Remove properties tab from Gen2 buckets

* Added changeset: Temporarily remove Properties tab from Gen2 buckets

---------

Co-authored-by: Jaalah Ramos <jaalah.ramos@gmail.com>
  • Loading branch information
2 people authored and dmcintyr-akamai committed Jan 9, 2025
1 parent c308bb3 commit 795264e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 112 deletions.
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-11491-changed-1736357771250.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Changed
---

Temporarily remove Properties tab from Gen2 buckets ([#11491](https://github.com/linode/manager/pull/11491))
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import {
mockGetObjectStorageEndpoints,
mockGetBucketAccess,
} from 'support/intercepts/object-storage';
import { checkRateLimitsTable } from 'support/util/object-storage-gen2';
import { ui } from 'support/ui';
import {
accountFactory,
objectStorageBucketFactoryGen2,
Expand Down Expand Up @@ -143,96 +141,4 @@ describe('Object Storage Gen 2 bucket details tabs', () => {
});
});
});

describe('Properties tab', () => {
['E0', 'E1'].forEach((endpoint: ObjectStorageEndpointTypes) => {
/**
* Parameterized test for buckets with endpoint types of E0 and E1
* - Confirms the Properties tab is visible
* - Confirms there is no bucket rate limits table
*/
it(`confirms the Properties tab does not have a rate limits table for buckets with endpoint type ${endpoint}`, () => {
const { mockBucket, mockEndpoint } = createMocksBasedOnEndpointType(
endpoint
);
const { cluster, label } = mockBucket;

mockGetBucketsForRegion(mockRegion.id, [mockBucket]).as(
'getBucketsForRegion'
);
mockGetObjectStorageEndpoints([mockEndpoint]).as(
'getObjectStorageEndpoints'
);

cy.visitWithLogin(
`/object-storage/buckets/${cluster}/${label}/properties`
);
cy.wait([
'@getFeatureFlags',
'@getAccount',
'@getObjectStorageEndpoints',
'@getBucketsForRegion',
]);

cy.findByText('Bucket Rate Limits').should('be.visible');
// confirms helper text
cy.contains(
'This endpoint type supports up to 750 Requests Per Second (RPS). Understand bucket rate limits'
).should('be.visible');

// confirm bucket rate limit table should not exist
cy.get('[data-testid="bucket-rate-limit-table"]').should('not.exist');

// confirm 'Save' button is disabled (for now)
ui.button
.findByAttribute('label', 'Save')
.should('be.visible')
.should('be.disabled');
});
});

['E2', 'E3'].forEach((endpoint: ObjectStorageEndpointTypes) => {
/**
* Parameterized test for buckets with endpoint types of E2 and E3
* - Confirms the Properties tab is visible
* - Confirms bucket rates limit table exists
*/
it(`confirms the Properties tab and rate limits table for buckets with endpoint type ${endpoint}`, () => {
const { mockBucket, mockEndpoint } = createMocksBasedOnEndpointType(
endpoint
);
const { cluster, label } = mockBucket;

mockGetBucketsForRegion(mockRegion.id, [mockBucket]).as(
'getBucketsForRegion'
);
mockGetObjectStorageEndpoints([mockEndpoint]).as(
'getObjectStorageEndpoints'
);

cy.visitWithLogin(
`/object-storage/buckets/${cluster}/${label}/properties`
);
cy.wait([
'@getFeatureFlags',
'@getAccount',
'@getObjectStorageEndpoints',
'@getBucketsForRegion',
]);

cy.findByText('Bucket Rate Limits');
cy.contains(
'Specifies the maximum Requests Per Second (RPS) for a bucket. To increase it to High, open a support ticket. Understand bucket rate limits.'
).should('be.visible');
// Confirm bucket rate limits table exists with correct values
checkRateLimitsTable(endpoint);

// confirm 'Save' button is disabled (for now)
ui.button
.findByAttribute('label', 'Save')
.should('be.visible')
.should('be.disabled');
});
});
});
});
18 changes: 0 additions & 18 deletions packages/manager/src/features/ObjectStorage/BucketDetail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ const BucketSSL = React.lazy(() =>
default: module.BucketSSL,
}))
);
const BucketProperties = React.lazy(() =>
import('./BucketProperties').then((module) => ({
default: module.BucketProperties,
}))
);

interface MatchProps {
bucketName: string;
Expand Down Expand Up @@ -75,14 +70,6 @@ export const BucketDetailLanding = React.memo((props: Props) => {
routeName: `${props.match.url}/access`,
title: 'Access',
},
...(isObjectStorageGen2Enabled
? [
{
routeName: `${props.match.url}/properties`,
title: 'Properties',
},
]
: []),
...(!isGen2Endpoint
? [
{
Expand Down Expand Up @@ -136,11 +123,6 @@ export const BucketDetailLanding = React.memo((props: Props) => {
endpointType={endpoint_type}
/>
</SafeTabPanel>
{isObjectStorageGen2Enabled && bucket && (
<SafeTabPanel index={2}>
<BucketProperties bucket={bucket} />
</SafeTabPanel>
)}
<SafeTabPanel index={tabs.length - 1}>
<BucketSSL bucketName={bucketName} clusterId={clusterId} />
</SafeTabPanel>
Expand Down

0 comments on commit 795264e

Please sign in to comment.