mirror of https://github.com/harness/drone.git
fix: [AH-518]: fix issue with registry and package type select on UI (#2830)
* fix: [AH-518]: show detailed error message coming from api response * fix: [AH-518]: fix incorrect placeholder and handle loading senario for digest selector * fix: [AH-518]: fix issue with registry and package type select on UIpull/3576/head
parent
21bdad8ece
commit
c3221fb0ff
|
@ -30,7 +30,8 @@ export default function PackageTypeSelector(props: PackageTypeSelectorProps): JS
|
|||
const { getString } = useStrings()
|
||||
return (
|
||||
<MultiSelectDropdownList
|
||||
buttonTestId="package-manager-select"
|
||||
width={180}
|
||||
buttonTestId="package-type-select"
|
||||
items={RepositoryTypes.filter(each => !each.disabled).map(each => ({ ...each, label: getString(each.label) }))}
|
||||
value={value}
|
||||
onSelect={onChange}
|
||||
|
|
|
@ -54,8 +54,8 @@ export default function RepositorySelector(props: RepositorySelectorProps): JSX.
|
|||
|
||||
return (
|
||||
<DropDown
|
||||
minWidth={120}
|
||||
buttonTestId="pipeline-select"
|
||||
width={180}
|
||||
buttonTestId="regitry-select"
|
||||
onChange={option => {
|
||||
props.onChange(option.value as string)
|
||||
}}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
import React, { useState } from 'react'
|
||||
import { defaultTo } from 'lodash-es'
|
||||
import { Button, ButtonVariation, Container, Text, useToaster } from '@harnessio/uicore'
|
||||
import { Button, ButtonVariation, Container, getErrorInfoFromErrorObject, Text, useToaster } from '@harnessio/uicore'
|
||||
import { FontVariation } from '@harnessio/design-system'
|
||||
import type { ClientSetupStep } from '@harnessio/react-har-service-client'
|
||||
|
||||
|
@ -43,7 +43,7 @@ export default function GenerateTokenStep({ stepIndex, step }: GenerateTokenStep
|
|||
})
|
||||
.catch(err => {
|
||||
clear()
|
||||
showError(err?.message || getString('repositoryDetails.clientSetup.failedToGenerateToken'))
|
||||
showError(getErrorInfoFromErrorObject(err) || getString('repositoryDetails.clientSetup.failedToGenerateToken'))
|
||||
})
|
||||
}
|
||||
return (
|
||||
|
|
|
@ -89,7 +89,7 @@ export default function ArchitectureSelector(props: ArchitectureSelectorProps):
|
|||
usePortal={true}
|
||||
addClearBtn={false}
|
||||
itemDisabled={item => !item.value}
|
||||
placeholder={getString('artifactList.table.allRepositories')}
|
||||
placeholder={loading ? getString('loading') : getString('versionDetails.selectDigestPlaceholder')}
|
||||
isLabel
|
||||
getCustomLabel={option => (
|
||||
<HeaderTitle tag="span" className={css.primaryColor}>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
page: Version Details Page
|
||||
selectDigestPlaceholder: All Digest
|
||||
tabs:
|
||||
overview: Overview
|
||||
artifactDetails: Artifact Details
|
||||
|
|
|
@ -16,6 +16,7 @@ tabNotFound: Tab not found
|
|||
search: Search
|
||||
copied: Copied
|
||||
download: download
|
||||
loading: Loading...
|
||||
dateLabel: Date
|
||||
timeLabel: Time
|
||||
harnessAI: Harness AI
|
||||
|
|
|
@ -189,6 +189,7 @@ export interface StringsMap {
|
|||
'versionDetails.overview.generalInformation.url': string
|
||||
'versionDetails.overview.generalInformation.version': string
|
||||
'versionDetails.page': string
|
||||
'versionDetails.selectDigestPlaceholder': string
|
||||
'versionDetails.tabs.artifactDetails': string
|
||||
'versionDetails.tabs.code': string
|
||||
'versionDetails.tabs.deployments': string
|
||||
|
@ -247,6 +248,7 @@ export interface StringsMap {
|
|||
harnessAI: string
|
||||
id: string
|
||||
lastUpdated: string
|
||||
loading: string
|
||||
modifiedAt: string
|
||||
moduleName: string
|
||||
na: string
|
||||
|
|
Loading…
Reference in New Issue