Skip to content

Commit a49edb0

Browse files
authored
feat(ObjectSummary): remove Acl (ydb-platform#2664)
1 parent 932917b commit a49edb0

File tree

9 files changed

+0
-139
lines changed

9 files changed

+0
-139
lines changed

src/containers/Tenant/Acl/Acl.tsx

Lines changed: 0 additions & 32 deletions
This file was deleted.

src/containers/Tenant/Acl/i18n/en.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/containers/Tenant/Acl/i18n/index.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/containers/Tenant/ObjectSummary/ObjectSummary.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import {
3333
formatSecondsToHours,
3434
} from '../../../utils/dataFormatters/dataFormatters';
3535
import {useTypedDispatch, useTypedSelector} from '../../../utils/hooks';
36-
import {Acl} from '../Acl/Acl';
3736
import {EntityTitle} from '../EntityTitle/EntityTitle';
3837
import {SchemaViewer} from '../Schema/SchemaViewer/SchemaViewer';
3938
import {useCurrentSchema} from '../TenantContext';
@@ -366,9 +365,6 @@ export function ObjectSummary({
366365

367366
const renderTabContent = () => {
368367
switch (summaryTab) {
369-
case TENANT_SUMMARY_TABS_IDS.acl: {
370-
return <Acl />;
371-
}
372368
case TENANT_SUMMARY_TABS_IDS.schema: {
373369
return <SchemaViewer type={type} path={path} tenantName={tenantName} />;
374370
}

src/containers/Tenant/TenantPages.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ export const TENANT_INFO_TABS = [
3333
id: TENANT_SUMMARY_TABS_IDS.overview,
3434
title: 'Overview',
3535
},
36-
{
37-
id: TENANT_SUMMARY_TABS_IDS.acl,
38-
title: 'ACL',
39-
},
4036
];
4137

4238
export const TENANT_SCHEMA_TAB = [

src/store/reducers/tenant/constants.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ export const TENANT_DIAGNOSTICS_TABS_IDS = {
3434

3535
export const TENANT_SUMMARY_TABS_IDS = {
3636
overview: 'overview',
37-
acl: 'acl',
3837
schema: 'schema',
3938
} as const;
4039

tests/suites/tenant/diagnostics/tabs/access.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ test.describe('Diagnostics Access tab', async () => {
7272
database: '/local',
7373
tenantPage: 'diagnostics',
7474
diagnosticsTab: 'access',
75-
summaryTab: 'acl',
7675
};
7776
const tenantPage = new TenantPage(page);
7877
await tenantPage.goto(pageQueryParams);
@@ -91,7 +90,6 @@ test.describe('Diagnostics Access tab', async () => {
9190
database: '/local',
9291
tenantPage: 'diagnostics',
9392
diagnosticsTab: 'access',
94-
summaryTab: 'acl',
9593
};
9694
const tenantPage = new TenantPage(page);
9795
await tenantPage.goto(pageQueryParams);

tests/suites/tenant/summary/ObjectSummary.ts

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import type {RowTableAction} from './types';
88

99
export enum ObjectSummaryTab {
1010
Overview = 'Overview',
11-
ACL = 'ACL',
1211
Schema = 'Schema',
1312
}
1413
export class ObjectSummary {
@@ -113,37 +112,6 @@ export class ObjectSummary {
113112
await this.createDirectoryModal.waitFor({state: 'hidden', timeout: VISIBILITY_TIMEOUT});
114113
}
115114

116-
async waitForAclVisible() {
117-
// In the new UI, the ACL tab shows a redirect message instead of the actual ACL content
118-
const redirectMessage = this.page.locator('text=Section was moved to Diagnostics');
119-
await redirectMessage.waitFor({state: 'visible', timeout: VISIBILITY_TIMEOUT});
120-
return true;
121-
}
122-
123-
async getRedirectMessage(): Promise<string | null> {
124-
const redirectMessage = this.page.locator('text=Section was moved to Diagnostics');
125-
if (await redirectMessage.isVisible()) {
126-
return redirectMessage.textContent();
127-
}
128-
return null;
129-
}
130-
131-
async hasOpenInDiagnosticsButton(): Promise<boolean> {
132-
try {
133-
const diagnosticsButton = this.page.getByRole('button', {name: 'Open in Diagnostics'});
134-
await diagnosticsButton.waitFor({state: 'visible', timeout: VISIBILITY_TIMEOUT});
135-
return true;
136-
} catch (error) {
137-
console.error('Open in Diagnostics button not visible:', error);
138-
return false;
139-
}
140-
}
141-
142-
async clickOpenInDiagnosticsButton(): Promise<void> {
143-
const diagnosticsButton = this.page.getByRole('button', {name: 'Open in Diagnostics'});
144-
await diagnosticsButton.click();
145-
}
146-
147115
async isTreeVisible() {
148116
await this.tree.waitFor({state: 'visible', timeout: VISIBILITY_TIMEOUT});
149117
return true;

tests/suites/tenant/summary/objectSummary.test.ts

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -269,57 +269,4 @@ test.describe('Object Summary', async () => {
269269
await objectSummary.expandSummary();
270270
await expect(objectSummary.isSummaryCollapsed()).resolves.toBe(false);
271271
});
272-
273-
test('ACL tab shows redirect message and link to Diagnostics', async ({page}) => {
274-
// Define the URL parameters
275-
const pageQueryParams = {
276-
schema: '/local',
277-
database: '/local',
278-
summaryTab: 'acl',
279-
tenantPage: 'query',
280-
};
281-
282-
// Navigate to the page
283-
const tenantPage = new TenantPage(page);
284-
await tenantPage.goto(pageQueryParams);
285-
286-
// Get the ObjectSummary instance
287-
const objectSummary = new ObjectSummary(page);
288-
289-
// Verify the ACL tab is selected
290-
await objectSummary.clickTab(ObjectSummaryTab.ACL);
291-
292-
// Wait for the ACL content to be visible
293-
await objectSummary.waitForAclVisible();
294-
295-
// Check for the redirect message
296-
const redirectMessage = await objectSummary.getRedirectMessage();
297-
expect(redirectMessage).toContain('Section was moved to Diagnostics');
298-
299-
// Check for the "Open in Diagnostics" button
300-
const hasButton = await objectSummary.hasOpenInDiagnosticsButton();
301-
expect(hasButton).toBe(true);
302-
303-
// Click the button and verify the URL
304-
await objectSummary.clickOpenInDiagnosticsButton();
305-
306-
// Verify the URL contains the expected parameters
307-
const expectedUrlParams = new URLSearchParams({
308-
tenantPage: 'diagnostics',
309-
diagnosticsTab: 'access',
310-
summaryTab: 'acl',
311-
schema: '/local',
312-
database: '/local',
313-
});
314-
315-
// Get the current URL and parse its parameters
316-
const currentUrl = page.url();
317-
const currentUrlObj = new URL(currentUrl);
318-
const currentParams = currentUrlObj.searchParams;
319-
320-
// Verify each expected parameter is in the URL
321-
for (const [key, value] of expectedUrlParams.entries()) {
322-
expect(currentParams.get(key)).toBe(value);
323-
}
324-
});
325272
});

0 commit comments

Comments
 (0)