From cb49ba519d1964d42809f23aa809947c1c66118a Mon Sep 17 00:00:00 2001 From: Abhi Date: Thu, 13 Jun 2024 18:20:34 +0530 Subject: [PATCH] fix(release): remove releaseplan strategy --- .../ReleasePlanAdmissionListHeader.tsx | 9 ++------- .../ReleasePlanAdmission/ReleasePlanAdmissionListRow.tsx | 7 ++----- .../__tests__/ReleasePlanAdmissionListRow.spec.tsx | 3 +-- src/components/ReleaseService/ReleaseService.tsx | 4 ---- 4 files changed, 5 insertions(+), 18 deletions(-) diff --git a/src/components/ReleaseService/ReleasePlanAdmission/ReleasePlanAdmissionListHeader.tsx b/src/components/ReleaseService/ReleasePlanAdmission/ReleasePlanAdmissionListHeader.tsx index 2145ccc75..887fd4c60 100644 --- a/src/components/ReleaseService/ReleasePlanAdmission/ReleasePlanAdmissionListHeader.tsx +++ b/src/components/ReleaseService/ReleasePlanAdmission/ReleasePlanAdmissionListHeader.tsx @@ -1,9 +1,8 @@ export const releasesPlanAdmissionTableColumnClasses = { name: 'pf-m-width-20 wrap-column', - application: 'pf-m-width-20', + application: 'pf-m-width-30', source: 'pf-m-width-20', - releaseStrategy: 'pf-m-width-20', - autoRelease: 'pf-m-width-10', + autoRelease: 'pf-m-width-20', kebab: 'pf-c-table__action', }; @@ -21,10 +20,6 @@ const ReleasePlanAdmissionListHeader = () => { title: 'Source Workspace', props: { className: releasesPlanAdmissionTableColumnClasses.source }, }, - { - title: 'Release Strategy', - props: { className: releasesPlanAdmissionTableColumnClasses.releaseStrategy }, - }, { title: 'Auto release', props: { className: releasesPlanAdmissionTableColumnClasses.autoRelease }, diff --git a/src/components/ReleaseService/ReleasePlanAdmission/ReleasePlanAdmissionListRow.tsx b/src/components/ReleaseService/ReleasePlanAdmission/ReleasePlanAdmissionListRow.tsx index b885009a4..4dbbeb335 100644 --- a/src/components/ReleaseService/ReleasePlanAdmission/ReleasePlanAdmissionListRow.tsx +++ b/src/components/ReleaseService/ReleasePlanAdmission/ReleasePlanAdmissionListRow.tsx @@ -16,13 +16,10 @@ const ReleasePlanAdmissionListRow: React.FC< {obj.metadata.name} - {obj.spec.application} + {obj.spec.application ?? '-'} - {obj.spec.origin} - - - {obj.spec.releaseStrategy} + {obj.spec.origin ?? '-'} {capitalize(obj.metadata.labels?.['release.appstudio.openshift.io/auto-release'] ?? '-')} diff --git a/src/components/ReleaseService/ReleasePlanAdmission/__tests__/ReleasePlanAdmissionListRow.spec.tsx b/src/components/ReleaseService/ReleasePlanAdmission/__tests__/ReleasePlanAdmissionListRow.spec.tsx index cd5f11713..0781afa24 100644 --- a/src/components/ReleaseService/ReleasePlanAdmission/__tests__/ReleasePlanAdmissionListRow.spec.tsx +++ b/src/components/ReleaseService/ReleasePlanAdmission/__tests__/ReleasePlanAdmissionListRow.spec.tsx @@ -16,7 +16,6 @@ describe('ReleasePlanAdmissionListRow', () => { expect(cells[0].innerHTML).toBe(mockReleasePlanAdmission.metadata.name); expect(cells[1].innerHTML).toBe('my-app-1'); expect(cells[2].innerHTML).toBe('sbudhwar-1-tenant'); - expect(cells[3].innerHTML).toBe('test-rs'); - expect(cells[4].innerHTML).toBe('True'); + expect(cells[3].innerHTML).toBe('True'); }); }); diff --git a/src/components/ReleaseService/ReleaseService.tsx b/src/components/ReleaseService/ReleaseService.tsx index bb6f8f54a..c1904614f 100644 --- a/src/components/ReleaseService/ReleaseService.tsx +++ b/src/components/ReleaseService/ReleaseService.tsx @@ -5,7 +5,6 @@ import { useLocalStorage } from '../../hooks/useLocalStorage'; import { useWorkspaceInfo } from '../../utils/workspace-context-utils'; import ReleasePlanListView from './ReleasePlan/ReleasePlanListView'; import ReleasePlanAdmissionListView from './ReleasePlanAdmission/ReleasePlanAdmissionListView'; -import ReleaseStrategyListView from './ReleaseStrategy/ReleaseStrategyListView'; const RELEASE_SERVICE_TAB_KEY = 'release-service-tab-key'; @@ -51,9 +50,6 @@ export const ReleaseService: React.FC> = () => > - - - ); };