MINOR: Change sidbar data-quality menu (#14789)

* Change sidbar data-quality menu

* minor changes

* localization keys added

* minor fix

* fix unit test

* removed unused routes
This commit is contained in:
Ashish Gupta 2024-01-19 22:13:26 +05:30 committed by GitHub
parent edbc97362f
commit 0415a908d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 72 additions and 38 deletions

View File

@ -66,12 +66,12 @@ export const NAVBAR_DETAILS = {
url: `${BASE_URL}/explore/tables`,
},
quality: {
testid: `[data-testid="data-quality"]`,
subMenu: '[data-testid="app-bar-item-data-contract"]',
testid: `[data-testid="observability"]`,
subMenu: '[data-testid="app-bar-item-data-quality"]',
url: `${BASE_URL}/data-quality`,
},
incidentManager: {
testid: `[data-testid="data-quality"]`,
testid: `[data-testid="observability"]`,
subMenu: '[data-testid="app-bar-item-incident-manager"]',
url: `${BASE_URL}/incident-manager`,
},

View File

@ -149,7 +149,7 @@ describe('Incident Manager', () => {
it('Assign incident to user', () => {
cy.sidebarHover();
cy.get("[data-testid='data-quality'").click();
cy.get("[data-testid='observability'").click();
cy.sidebarClick('app-bar-item-incident-manager');
cy.get(`[data-testid="test-case-${NEW_TABLE_TEST_CASE.name}"]`).should(
'be.visible'
@ -188,7 +188,7 @@ describe('Incident Manager', () => {
);
interceptURL('GET', '/api/v1/feed?entityLink=*&type=Task', 'getTaskFeed');
cy.sidebarHover();
cy.get("[data-testid='data-quality'").click();
cy.get("[data-testid='observability'").click();
cy.sidebarClick('app-bar-item-incident-manager');
cy.get(`[data-testid="test-case-${NEW_TABLE_TEST_CASE.name}"]`).click();
verifyResponseStatusCode('@getTestCase', 200);
@ -227,7 +227,7 @@ describe('Incident Manager', () => {
);
interceptURL('GET', '/api/v1/feed?entityLink=*&type=Task', 'getTaskFeed');
cy.sidebarHover();
cy.get("[data-testid='data-quality'").click();
cy.get("[data-testid='observability'").click();
cy.sidebarClick('app-bar-item-incident-manager');
cy.get(`[data-testid="test-case-${NEW_TABLE_TEST_CASE.name}"]`).click();
verifyResponseStatusCode('@getTestCase', 200);
@ -339,7 +339,7 @@ describe('Incident Manager', () => {
'getIncidentList'
);
cy.sidebarHover();
cy.get("[data-testid='data-quality'").click();
cy.get("[data-testid='observability'").click();
cy.sidebarClick('app-bar-item-incident-manager');
verifyResponseStatusCode('@getIncidentList', 200);

View File

@ -25,12 +25,12 @@ describe('Collect end point should work properly', () => {
},
dataQuality: {
name: 'Quality',
mainMenuId: `[data-testid="data-quality"]`,
subMenu: `[data-testid="app-bar-item-data-contract"]`,
mainMenuId: `[data-testid="observability"]`,
subMenu: `[data-testid="app-bar-item-data-quality"]`,
},
incidentManager: {
name: 'Incident Manager',
mainMenuId: `[data-testid="data-quality"]`,
mainMenuId: `[data-testid="observability"]`,
subMenu: `[data-testid="app-bar-item-incident-manager"]`,
},
insight: {

View File

@ -106,9 +106,9 @@ const visitTestSuiteDetailsPage = (testSuiteName) => {
cy.sidebarHover();
cy.get('[data-testid="data-quality"]').click();
cy.get('[data-testid="observability"]').click();
cy.sidebarClick('app-bar-item-data-contract');
cy.sidebarClick('app-bar-item-data-quality');
cy.sidebarHoverOutside();
@ -535,9 +535,9 @@ describe('Data Quality and Profiler should work properly', () => {
cy.sidebarHover();
cy.get('[data-testid="data-quality"]').click();
cy.get('[data-testid="observability"]').click();
cy.sidebarClick('app-bar-item-data-contract');
cy.sidebarClick('app-bar-item-data-quality');
cy.sidebarHoverOutside();
@ -802,9 +802,9 @@ describe('Data Quality and Profiler should work properly', () => {
cy.sidebarHover();
cy.get('[data-testid="data-quality"]').click();
cy.get('[data-testid="observability"]').click();
cy.sidebarClick('app-bar-item-data-contract');
cy.sidebarClick('app-bar-item-data-quality');
cy.sidebarHoverOutside();

View File

@ -0,0 +1,18 @@
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1206_12800)">
<path d="M21.8438 22.5438H19.7844V20.4844C19.7844 20.0684 19.4472 19.7312 19.0312 19.7312H18.3781V12C18.3781 8.48306 15.5169 5.62187 12 5.62187C8.48306 5.62187 5.62187 8.48306 5.62187 12V19.7312H4.96875C4.55282 19.7312 4.21563 20.0684 4.21563 20.4844V22.5438H2.15625C1.74032 22.5438 1.40312 22.8809 1.40312 23.2969C1.40312 23.7128 1.74032 24.05 2.15625 24.05H21.8438C22.2597 24.05 22.5969 23.7128 22.5969 23.2969C22.5969 22.8809 22.2597 22.5438 21.8438 22.5438ZM7.12813 12C7.12813 9.31369 9.31369 7.12812 12 7.12812C14.6863 7.12812 16.8719 9.31369 16.8719 12V19.7312H7.12813V12ZM18.2781 21.2375V22.5438H5.72188V21.2375H18.2781Z" fill="currentColor" stroke="black" stroke-width="0.1"/>
<path d="M12 16.9219C12.3883 16.9219 12.7031 16.6071 12.7031 16.2188C12.7031 15.8304 12.3883 15.5156 12 15.5156C11.6117 15.5156 11.2969 15.8304 11.2969 16.2188C11.2969 16.6071 11.6117 16.9219 12 16.9219Z" fill="currentColor" fill-opacity="0.4"/>
<path d="M12 9.89062C11.6117 9.89062 11.2969 10.2054 11.2969 10.5938V13.4062C11.2969 13.7946 11.6117 14.1094 12 14.1094C12.3883 14.1094 12.7031 13.7946 12.7031 13.4062V10.5938C12.7031 10.2054 12.3883 9.89062 12 9.89062Z" fill="currentColor" fill-opacity="0.4"/>
<path d="M2.85938 12C2.85938 11.6117 2.54456 11.2969 2.15625 11.2969H0.703125C0.314812 11.2969 0 11.6117 0 12C0 12.3883 0.314812 12.7031 0.703125 12.7031H2.15625C2.54456 12.7031 2.85938 12.3883 2.85938 12Z" fill="currentColor" fill-opacity="0.4"/>
<path d="M23.2969 11.2969H21.8438C21.4554 11.2969 21.1406 11.6117 21.1406 12C21.1406 12.3883 21.4554 12.7031 21.8438 12.7031H23.2969C23.6852 12.7031 24 12.3883 24 12C24 11.6117 23.6852 11.2969 23.2969 11.2969Z" fill="currentColor" fill-opacity="0.4"/>
<path d="M12 2.85938C12.3883 2.85938 12.7031 2.54456 12.7031 2.15625V0.703125C12.7031 0.314812 12.3883 0 12 0C11.6117 0 11.2969 0.314812 11.2969 0.703125V2.15625C11.2969 2.54456 11.6117 2.85938 12 2.85938Z" fill="currentColor" fill-opacity="0.4"/>
<path d="M4.5421 5.53646C4.81665 5.81105 5.26187 5.8111 5.53646 5.53646C5.81105 5.26187 5.81105 4.8167 5.53646 4.5421L4.5421 3.54774C4.26755 3.27315 3.82234 3.27315 3.54774 3.54774C3.27315 3.82234 3.27315 4.26751 3.54774 4.5421L4.5421 5.53646Z" fill="currentColor" fill-opacity="0.4"/>
<path d="M19.4581 5.53646L20.4525 4.5421C20.7271 4.26751 20.7271 3.82234 20.4525 3.54774C20.1779 3.27315 19.7327 3.27315 19.4581 3.54774L18.4638 4.5421C18.1892 4.8167 18.1892 5.26187 18.4638 5.53646C18.7383 5.81105 19.1835 5.8111 19.4581 5.53646Z" fill="currentColor" fill-opacity="0.4"/>
</g>
<defs>
<clipPath id="clip0_1206_12800">
<rect width="24" height="24" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -0,0 +1,13 @@
<svg viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.4844 12.6562C11.8078 12.6562 12.0703 12.3937 12.0703 12.0703C12.0703 11.7453 11.805 11.4844 11.4844 11.4844C11.161 11.4844 10.8984 11.7469 10.8984 12.0703C10.8984 12.394 11.161 12.6562 11.4844 12.6562Z" fill="currentColor" fill-opacity="0.4" stroke="currentColor" stroke-opacity="0.4" stroke-width="0.2"/>
<path d="M15.0859 4.45312C15.0859 4.50062 15.0475 4.53906 15 4.53906C14.9525 4.53906 14.9141 4.50062 14.9141 4.45312V0.585938C14.9141 0.538441 14.9525 0.5 15 0.5C15.0475 0.5 15.0859 0.538441 15.0859 0.585938V4.45312Z" fill="currentColor" fill-opacity="0.4" stroke="currentColor"/>
<path d="M14.4141 25.5469V29.4141C14.4141 29.7377 14.6764 30 15 30C15.3236 30 15.5859 29.7377 15.5859 29.4141V25.5469C15.5859 25.2232 15.3236 24.9609 15 24.9609C14.6764 24.9609 14.4141 25.2232 14.4141 25.5469Z" fill="currentColor" fill-opacity="0.4"/>
<path d="M5.95563 7.95703C6.18451 8.18591 6.5553 8.18591 6.78441 7.95703C7.01306 7.72838 7.01306 7.35736 6.78441 7.12848L4.29807 4.64236C4.06941 4.41348 3.69839 4.41348 3.46951 4.64236C3.24063 4.87125 3.24063 5.24226 3.46951 5.47092L5.95563 7.95703Z" fill="currentColor" fill-opacity="0.4"/>
<path d="M23.2156 22.6285C22.9867 22.8574 22.9867 23.2284 23.2156 23.4573L25.7017 25.9434C25.9304 26.1721 26.3014 26.1723 26.5303 25.9434C26.7592 25.7145 26.7592 25.3435 26.5303 25.1146L24.0442 22.6285C23.8153 22.3999 23.4445 22.3999 23.2156 22.6285Z" fill="currentColor" fill-opacity="0.4"/>
<path d="M24.0442 7.95703L26.5303 5.47092C26.7592 5.24226 26.7592 4.87125 26.5303 4.64236C26.3014 4.41348 25.9306 4.41348 25.7017 4.64236L23.2156 7.12848C22.9867 7.35736 22.9867 7.72838 23.2156 7.95703C23.4445 8.18591 23.8153 8.18591 24.0442 7.95703Z" fill="currentColor" fill-opacity="0.4"/>
<path d="M5.95563 22.6287L3.46951 25.1148C3.24063 25.3435 3.24063 25.7145 3.46951 25.9434C3.69839 26.1722 4.06918 26.1722 4.29807 25.9434L6.78441 23.4572C7.01306 23.2284 7.01306 22.8573 6.78441 22.6287C6.55553 22.3998 6.18451 22.3998 5.95563 22.6287Z" fill="currentColor" fill-opacity="0.4"/>
<path d="M5.26377 19.2561C8.31728 21.8383 11.6841 23.2031 14.9999 23.2031C18.316 23.2031 21.6826 21.8383 24.7361 19.2561C27.024 17.3213 28.3227 15.4076 28.3767 15.3271C28.5097 15.1293 28.5097 14.8707 28.3767 14.6729C28.3227 14.5926 27.024 12.6787 24.7361 10.7439C21.6826 8.1617 18.316 6.79688 14.9999 6.79688C11.6841 6.79688 8.31728 8.1617 5.26377 10.7439C2.97609 12.6787 1.67742 14.5924 1.62317 14.6729C1.49019 14.8707 1.49019 15.1293 1.62317 15.3271C1.67742 15.4076 2.97609 17.3213 5.26377 19.2561ZM6.02045 11.6389C8.00028 9.9646 11.1653 7.96875 14.9999 7.96875C18.823 7.96875 21.9797 9.95316 23.9547 11.6178C25.586 12.9929 26.7061 14.385 27.168 15.0005C26.7098 15.6116 25.602 16.989 23.9794 18.3611C21.9996 20.0354 18.8346 22.0312 14.9999 22.0312C11.1769 22.0312 8.02019 20.0468 6.0454 18.3822C4.41393 17.0071 3.29355 15.6148 2.83213 14.9998C3.29012 14.3884 4.39791 13.011 6.02045 11.6389Z" fill="currentColor" stroke="black" stroke-width="0.2"/>
<path d="M15 20.2734C17.9258 20.2734 20.2734 17.8988 20.2734 15C20.2734 12.0923 17.9077 9.72656 15 9.72656C14.3843 9.72656 13.716 9.8394 13.1126 10.0745C12.811 10.1917 12.6615 10.5313 12.7787 10.833C12.889 11.1168 13.1971 11.2971 13.594 11.1459C14.0403 10.9788 14.5402 10.8984 15 10.8984C17.2616 10.8984 19.1016 12.7384 19.1016 15C19.1016 17.2549 17.2733 19.1016 15 19.1016C12.7384 19.1016 10.8984 17.2616 10.8984 15C10.8984 14.7265 10.9227 14.5161 10.9662 14.252C11.0264 13.9341 10.8174 13.6295 10.4995 13.5688C10.1825 13.5088 9.87488 13.7187 9.81422 14.0364C9.75426 14.3546 9.72656 14.6906 9.72656 15C9.72656 17.9077 12.0923 20.2734 15 20.2734Z" fill="currentColor" stroke="black" stroke-width="0.2"/>
<path d="M17.3438 15C17.3438 13.7077 16.2923 12.6562 15 12.6562C13.7077 12.6562 12.6562 13.7077 12.6562 15C12.6562 16.2923 13.7077 17.3438 15 17.3438C16.2923 17.3438 17.3438 16.2923 17.3438 15ZM13.8281 15C13.8281 14.3539 14.3539 13.8281 15 13.8281C15.6461 13.8281 16.1719 14.3539 16.1719 15C16.1719 15.6461 15.6461 16.1719 15 16.1719C14.3539 16.1719 13.8281 15.6461 13.8281 15Z" fill="currentColor" fill-opacity="0.4" stroke="currentColor" stroke-opacity="0.4" stroke-width="0.2"/>
</svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -1,4 +0,0 @@
<svg viewBox="0 0 31 31" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M24.2344 11.3928C24.2344 13.2053 23.6969 14.8678 22.7719 16.2553C22.0941 17.2663 21.2124 18.1243 20.1835 18.7744C19.1545 19.4245 18.001 19.8523 16.7969 20.0303C16.3719 20.1053 15.9344 20.1428 15.4844 20.1428C15.0344 20.1428 14.5969 20.1053 14.1719 20.0303C12.9679 19.8523 11.8144 19.4245 10.7854 18.7744C9.75643 18.1243 8.87474 17.2663 8.19693 16.2553C7.23732 14.8157 6.72818 13.1229 6.73443 11.3928C6.73443 6.55532 10.6469 2.64282 15.4844 2.64282C20.3219 2.64282 24.2344 6.55532 24.2344 11.3928Z" stroke="currentColor" stroke-opacity="0.4" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M27.0465 23.2278L24.984 23.7153C24.5215 23.8278 24.159 24.1778 24.059 24.6403L23.6215 26.4778C23.5678 26.7034 23.4525 26.9096 23.2883 27.0733C23.1242 27.2371 22.9178 27.352 22.6921 27.4052C22.4664 27.4583 22.2304 27.4477 22.0104 27.3745C21.7905 27.3012 21.5952 27.1682 21.4465 26.9903L15.484 20.1403L9.52146 27.0028C9.37274 27.1807 9.17747 27.3137 8.9575 27.3869C8.73752 27.4602 8.50151 27.4709 8.27583 27.4177C8.05016 27.3645 7.84372 27.2496 7.6796 27.0858C7.51547 26.9221 7.40013 26.7159 7.34646 26.4903L6.90896 24.6528C6.85579 24.428 6.7411 24.2224 6.57774 24.059C6.41438 23.8957 6.20879 23.781 5.98396 23.7278L3.92146 23.2403C3.70537 23.1885 3.50693 23.0802 3.34646 22.9265C3.18598 22.7728 3.06925 22.5792 3.0082 22.3655C2.94715 22.1519 2.94399 21.9258 2.99904 21.7105C3.05408 21.4953 3.16535 21.2985 3.32146 21.1403L8.19646 16.2653C8.87433 17.2762 9.75603 18.1342 10.785 18.7843C11.8139 19.4344 12.9674 19.8622 14.1715 20.0403C14.5965 20.1153 15.034 20.1528 15.484 20.1528C15.934 20.1528 16.3715 20.1153 16.7965 20.0403C19.284 19.6778 21.4215 18.2653 22.7715 16.2653L27.6465 21.1403C28.334 21.8153 27.9965 23.0028 27.0465 23.2278ZM16.209 7.61782L16.9465 9.09282C17.0465 9.29282 17.309 9.49282 17.5465 9.53032L18.884 9.75532C19.734 9.89282 19.934 10.5178 19.3215 11.1303L18.284 12.1678C18.109 12.3428 18.009 12.6803 18.0715 12.9303L18.3715 14.2178C18.609 15.2303 18.0715 15.6303 17.1715 15.0928L15.9215 14.3553C15.7945 14.2876 15.6528 14.2522 15.509 14.2522C15.3651 14.2522 15.2234 14.2876 15.0965 14.3553L13.8465 15.0928C12.9465 15.6178 12.409 15.2303 12.6465 14.2178L12.9465 12.9303C12.9965 12.6928 12.909 12.3428 12.734 12.1678L11.6965 11.1303C11.084 10.5178 11.284 9.90532 12.134 9.75532L13.4715 9.53032C13.6965 9.49282 13.959 9.29282 14.059 9.09282L14.7965 7.61782C15.159 6.81782 15.809 6.81782 16.209 7.61782Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -23,14 +23,12 @@ describe('LeftSidebar', () => {
</BrowserRouter>
);
const exploreLink = screen.getByTestId('app-bar-item-explore');
const qualityLink = screen.getByTestId('data-quality');
const insightLink = screen.getByTestId('app-bar-item-data-insight');
const settingsLink = screen.getByTestId('app-bar-item-settings');
expect(exploreLink).toBeInTheDocument();
expect(qualityLink).toBeInTheDocument();
expect(insightLink).toBeInTheDocument();
expect(settingsLink).toBeInTheDocument();
expect(screen.getByTestId('image')).toBeInTheDocument();
expect(screen.getByTestId('app-bar-item-explore')).toBeInTheDocument();
expect(screen.getByTestId('observability')).toBeInTheDocument();
expect(screen.getByTestId('app-bar-item-domain')).toBeInTheDocument();
expect(screen.getByTestId('governance')).toBeInTheDocument();
expect(screen.getByTestId('app-bar-item-settings')).toBeInTheDocument();
expect(screen.getByTestId('app-bar-item-logout')).toBeInTheDocument();
});
});

View File

@ -16,10 +16,11 @@ import { ReactComponent as GovernIcon } from '../assets/svg/bank.svg';
import { ReactComponent as ClassificationIcon } from '../assets/svg/classification.svg';
import { ReactComponent as ExploreIcon } from '../assets/svg/globalsearch.svg';
import { ReactComponent as GlossaryIcon } from '../assets/svg/glossary.svg';
import { ReactComponent as DataContractIcon } from '../assets/svg/ic-data-contract.svg';
import { ReactComponent as AlertIcon } from '../assets/svg/ic-alert.svg';
import { ReactComponent as DataQualityIcon } from '../assets/svg/ic-data-contract.svg';
import { ReactComponent as DomainsIcon } from '../assets/svg/ic-domain.svg';
import { ReactComponent as IncidentMangerIcon } from '../assets/svg/ic-incident-manager.svg';
import { ReactComponent as QualityIcon } from '../assets/svg/ic-quality-v1.svg';
import { ReactComponent as ObservabilityIcon } from '../assets/svg/ic-observability.svg';
import { ReactComponent as SettingsIcon } from '../assets/svg/ic-settings-v1.svg';
import { ReactComponent as InsightsIcon } from '../assets/svg/lampcharge.svg';
import { ReactComponent as LogoutIcon } from '../assets/svg/logout.svg';
@ -36,17 +37,17 @@ export const SIDEBAR_LIST = [
dataTestId: 'app-bar-item-explore',
},
{
key: 'data-quality',
label: i18next.t('label.quality'),
icon: QualityIcon,
dataTestId: 'data-quality',
key: ROUTES.OBSERVABILITY,
label: i18next.t('label.observability'),
icon: ObservabilityIcon,
dataTestId: 'observability',
children: [
{
key: ROUTES.DATA_QUALITY,
label: i18next.t('label.data-contract-plural'),
label: i18next.t('label.data-quality'),
redirect_url: ROUTES.DATA_QUALITY,
icon: DataContractIcon,
dataTestId: 'app-bar-item-data-contract',
icon: DataQualityIcon,
dataTestId: 'app-bar-item-data-quality',
},
{
key: ROUTES.INCIDENT_MANAGER,
@ -56,6 +57,12 @@ export const SIDEBAR_LIST = [
dataTestId: 'app-bar-item-incident-manager',
isBeta: true,
},
{
key: ROUTES.OBSERVABILITY,
label: i18next.t('label.alert-plural'),
icon: AlertIcon,
dataTestId: 'app-bar-item-observability-alert',
},
],
},
{

View File

@ -320,6 +320,8 @@ export const ROUTES = {
CUSTOMIZE_PAGE: `/customize-page/:fqn/:pageFqn`,
ADD_CUSTOM_METRIC: `/add-custom-metric/${PLACEHOLDER_DASHBOARD_TYPE}/${PLACEHOLDER_ROUTE_FQN}`,
OBSERVABILITY: '/observability',
};
export const SOCKET_EVENTS = {