diff --git a/frontend/providers/devbox/app/[lang]/(platform)/template/updateTemplate/EditTemplateModal.tsx b/frontend/providers/devbox/app/[lang]/(platform)/template/updateTemplate/EditTemplateModal.tsx index 6962c918989..3bec744dcd0 100644 --- a/frontend/providers/devbox/app/[lang]/(platform)/template/updateTemplate/EditTemplateModal.tsx +++ b/frontend/providers/devbox/app/[lang]/(platform)/template/updateTemplate/EditTemplateModal.tsx @@ -69,8 +69,8 @@ const EditTemplateModal: FC = ({ name: string; config: string; image: string; - createAt: Date; - updateAt: Date; + createdAt: Date; + updatedAt: Date; }) => JSX.Element }[] = [ { @@ -93,14 +93,14 @@ const EditTemplateModal: FC = ({ dataIndex: 'createAt', key: 'createAt', render: (item) => { - return {dayjs().format('YYYY-MM-DD hh:mm')} + return {dayjs(item.createdAt).format('YYYY-MM-DD HH:mm')} } }, { title: t('update_time'), - dataIndex: 'createAt', - key: 'createAt', + dataIndex: 'updateAt', + key: 'updateAt', render: (item) => { - return {dayjs().format('YYYY-MM-DD hh:mm')} + return {dayjs(item.updatedAt).format('YYYY-MM-DD HH:mm')} } }, { @@ -133,16 +133,6 @@ const EditTemplateModal: FC = ({ ) } ] - // const mock = [ - // { - // "uid": "741bc275-107a-43a7-ac01-2d26a0f64297", - // "name": "v1", - // "config": "{\"appPorts\":[{\"name\":\"devbox-app-port\",\"port\":8080,\"protocol\":\"TCP\",\"targetPort\":0}],\"ports\":[{\"containerPort\":22,\"name\":\"devbox-ssh-port\",\"protocol\":\"TCP\"}],\"releaseArgs\":[\"/home/devbox/project/entrypoint.sh\"],\"releaseCommand\":[\"/bin/bash\",\"-c\"],\"user\":\"devbox\",\"workingDir\":\"/home/devbox/project\"}", - // "image": "sealos.hub:5000/vfwsepe/devbox4:v1", - // "createdAt": "2024-12-13T08:29:26.171Z", - // "updatedAt": "2024-12-13T08:29:26.171Z" - // }, - // ] const templateList = templateRepositoryQuery.data?.templateList || [] return (<> diff --git a/frontend/providers/devbox/prisma/migrations/20250103095011_region_update/migration.sql b/frontend/providers/devbox/prisma/migrations/20250103095011_region_update/migration.sql index 21335040965..159fc4c5d1c 100644 --- a/frontend/providers/devbox/prisma/migrations/20250103095011_region_update/migration.sql +++ b/frontend/providers/devbox/prisma/migrations/20250103095011_region_update/migration.sql @@ -2,9 +2,6 @@ -- DropIndex DROP INDEX "TemplateRepository_isDeleted_name_key"; --- DropIndex -DROP INDEX "TemplateRepository_isDeleted_name_key"; - -- add regionUid column ALTER TABLE "TemplateRepository" ADD COLUMN "regionUid" STRING NOT NULL default '00000000-0000-0000-0000-000000000000';