Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ const DeploymentViewList = (props: DeploymentViewListProps) => {
const { t } = useTranslation('images')

const columnWidths = ['w-12', 'w-4/12', 'w-2/12', 'w-2/12', 'w-4/12', 'w-28']
const headers = ['', 'containerName', 'common:registry', 'imageTag', 'common:createdAt', 'common:actions']
const headers = [
'',
...['containerName', 'common:registry', 'imageTag', 'common:createdAt', 'common:actions'].map(it => t(it)),
'',
]
const defaultHeaderClass = 'uppercase text-bright text-sm font-semibold bg-medium-eased px-2 py-3 h-11'
const headerClasses = [
clsx('rounded-tl-lg pl-6', defaultHeaderClass),
Expand Down Expand Up @@ -71,7 +75,7 @@ const DeploymentViewList = (props: DeploymentViewListProps) => {
return (
<DyoCard className="relative mt-4">
<DyoList
headers={[...headers.map(h => t(h)), '']}
headers={headers}
headerClassName={headerClasses}
columnWidths={columnWidths}
itemClassName={itemClasses}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const EditDeploymentCard = (props: EditDeploymentCardProps) => {
...transformedValues,
}

const res = await sendForm('PUT', deploymentApiUrl(deployment.id), body)
const res = await sendForm('PATCH', deploymentApiUrl(deployment.id), body)

setSubmitting(false)

Expand Down
2 changes: 1 addition & 1 deletion web/crux-ui/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export const formikFieldValueConverter =
(field, value, shouldValidate) =>
formik.setFieldValue(field, converter(value), shouldValidate)

export const sendForm = async <Dto>(method: 'POST' | 'PUT', url: string, body?: Dto): Promise<Response> =>
export const sendForm = async <Dto>(method: 'POST' | 'PUT' | 'PATCH', url: string, body?: Dto): Promise<Response> =>
await fetch(url, {
method,
headers: body
Expand Down