feat: [AH-979]: Add Registry column in global artifact list table (#3585)

* feat: [AH-979]: fix failing unit tests
* feat: [AH-979]: Add Registry column in global artifact list table
main
Shivanand Sonnad 2025-03-24 07:54:21 +00:00 committed by Harness
parent 91c4ccf3b7
commit 154bf4c4b1
3 changed files with 10 additions and 4 deletions

View File

@ -22,6 +22,7 @@ import {
useGetAllRegistriesQuery as _useGetAllRegistriesQuery
} from '@harnessio/react-har-service-client'
import ArTestWrapper from '@ar/utils/testUtils/ArTestWrapper'
import { testMultiSelectChange } from '@ar/utils/testUtils/utils'
import repositoryFactory from '@ar/frameworks/RepositoryStep/RepositoryFactory'
import { DockerRepositoryType } from '@ar/pages/repository-details/DockerRepository/DockerRepositoryType'
import { HelmRepositoryType } from '@ar/pages/repository-details/HelmRepository/HelmRepositoryType'
@ -136,9 +137,7 @@ describe('Test Artifact List Page', () => {
})
const registriesSelect = getByTestId('regitry-select')
await userEvent.click(registriesSelect)
const registryIdOption = getByText('repo1')
await userEvent.click(registryIdOption)
await testMultiSelectChange(registriesSelect, 'repo1', '')
expect(useGetAllHarnessArtifactsQuery).toHaveBeenLastCalledWith({
space_ref: 'undefined/+',

View File

@ -34,7 +34,7 @@
div[class*='TableV2--cells'],
div[class*='TableV2--header'] {
display: grid !important;
grid-template-columns: minmax(var(--har-table-name-column-min-width), 1fr) 10rem 10rem 15rem 15rem 15rem;
grid-template-columns: minmax(var(--har-table-name-column-min-width), 1fr) 12rem 10rem 8rem 12rem 12rem 8rem;
}
}

View File

@ -30,6 +30,7 @@ import {
ArtifactNameCell,
LatestArtifactCell
} from './ArtifactListTableCell'
import { RepositoryNameCell } from '../RegistryArtifactListTable/RegistryArtifactListTableCell'
import css from './ArtifactListTable.module.scss'
export interface ArtifactListColumnActions {
@ -78,6 +79,12 @@ export default function ArtifactListTable(props: ArtifactListTableProps): JSX.El
Cell: ArtifactNameCell,
serverSortProps: getServerSortProps('name')
},
{
Header: getString('artifactList.table.columns.repository'),
accessor: 'registryIdentifier',
Cell: RepositoryNameCell,
serverSortProps: getServerSortProps('registryIdentifier')
},
{
Header: getString('artifactList.table.columns.pullCommand'),
accessor: 'pullCommand',