From dc64b7001880c394e12859f094e3200db4442587 Mon Sep 17 00:00:00 2001 From: BennieMeng Date: Fri, 31 May 2019 18:18:14 +0800 Subject: [PATCH 1/4] frontend: update create-template time --- src/frontend/lib | 2 +- .../create-edit-autoscaletpl.component.ts | 1 + .../create-edit-configmaptpl.component.ts | 1 + .../create-edit-cronjobtpl/create-edit-cronjobtpl.component.ts | 1 + .../create-edit-daemonsettpl.component.ts | 1 + .../create-edit-deploymenttpl.component.ts | 1 + .../create-edit-ingresstpl/create-edit-ingresstpl.component.ts | 1 + .../create-edit-persistentvolumeclaimtpl.component.ts | 1 + .../create-edit-secrettpl/create-edit-secrettpl.component.ts | 1 + .../create-edit-statefulsettpl.component.ts | 1 + src/frontend/src/app/shared/model/v1/configmaptpl.ts | 1 + src/frontend/src/app/shared/model/v1/cronjobtpl.ts | 1 + src/frontend/src/app/shared/model/v1/deploymenttpl.ts | 1 + src/frontend/src/app/shared/model/v1/secrettpl.ts | 1 + 14 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/frontend/lib b/src/frontend/lib index 177a320be..f7622a117 160000 --- a/src/frontend/lib +++ b/src/frontend/lib @@ -1 +1 @@ -Subproject commit 177a320befdefa89eeffabfb48634f32c1ee8549 +Subproject commit f7622a1176257e39b1725d094c54424eb107d305 diff --git a/src/frontend/src/app/portal/autoscale/create-edit-autoscaletpl/create-edit-autoscaletpl.component.ts b/src/frontend/src/app/portal/autoscale/create-edit-autoscaletpl/create-edit-autoscaletpl.component.ts index da07044cd..91fb50444 100644 --- a/src/frontend/src/app/portal/autoscale/create-edit-autoscaletpl/create-edit-autoscaletpl.component.ts +++ b/src/frontend/src/app/portal/autoscale/create-edit-autoscaletpl/create-edit-autoscaletpl.component.ts @@ -119,6 +119,7 @@ export class CreateEditAutoscaletplComponent extends CreateEditResourceTemplate this.template.id = undefined; this.template.name = this.resource.name; + this.template.createTime = this.template.updateTime = new Date(); this.templateService.create(this.template, this.app.id).subscribe( status => { this.isSubmitOnGoing = false; diff --git a/src/frontend/src/app/portal/configmap/create-edit-configmaptpl/create-edit-configmaptpl.component.ts b/src/frontend/src/app/portal/configmap/create-edit-configmaptpl/create-edit-configmaptpl.component.ts index 1f5915904..91d0ef78e 100644 --- a/src/frontend/src/app/portal/configmap/create-edit-configmaptpl/create-edit-configmaptpl.component.ts +++ b/src/frontend/src/app/portal/configmap/create-edit-configmaptpl/create-edit-configmaptpl.component.ts @@ -223,6 +223,7 @@ export class CreateEditConfigMapTplComponent implements OnInit, AfterViewInit, O const kubeConfigMap = this.getKubeConfigMapByForm(); this.configMapTpl.template = JSON.stringify(kubeConfigMap); this.configMapTpl.id = undefined; + this.configMapTpl.createTime = this.configMapTpl.updateTime = new Date(); this.configMapTplService.create(this.configMapTpl, this.app.id).subscribe( status => { this.isSubmitOnGoing = false; diff --git a/src/frontend/src/app/portal/cronjob/create-edit-cronjobtpl/create-edit-cronjobtpl.component.ts b/src/frontend/src/app/portal/cronjob/create-edit-cronjobtpl/create-edit-cronjobtpl.component.ts index 92c5947ff..712eab019 100644 --- a/src/frontend/src/app/portal/cronjob/create-edit-cronjobtpl/create-edit-cronjobtpl.component.ts +++ b/src/frontend/src/app/portal/cronjob/create-edit-cronjobtpl/create-edit-cronjobtpl.component.ts @@ -360,6 +360,7 @@ export class CreateEditCronjobTplComponent extends ContainerTpl implements OnIni this.cronjobTpl.id = undefined; this.cronjobTpl.name = this.cronjob.name; + this.cronjobTpl.createTime = this.cronjobTpl.upateTime = new Date(); this.cronjobTplService.create(this.cronjobTpl, this.app.id).subscribe( status => { this.isSubmitOnGoing = false; diff --git a/src/frontend/src/app/portal/daemonset/create-edit-daemonsettpl/create-edit-daemonsettpl.component.ts b/src/frontend/src/app/portal/daemonset/create-edit-daemonsettpl/create-edit-daemonsettpl.component.ts index 2cf1e0bcd..700661f92 100644 --- a/src/frontend/src/app/portal/daemonset/create-edit-daemonsettpl/create-edit-daemonsettpl.component.ts +++ b/src/frontend/src/app/portal/daemonset/create-edit-daemonsettpl/create-edit-daemonsettpl.component.ts @@ -382,6 +382,7 @@ export class CreateEditDaemonSetTplComponent extends ContainerTpl implements OnI this.daemonSetTpl.template = JSON.stringify(newDaemonSet); this.daemonSetTpl.id = undefined; this.daemonSetTpl.name = this.daemonSet.name; + this.daemonSetTpl.createTime = this.daemonSetTpl.updateTime = new Date(); this.daemonSetTplService.create(this.daemonSetTpl, this.app.id).subscribe( status => { this.isSubmitOnGoing = false; diff --git a/src/frontend/src/app/portal/deployment/create-edit-deploymenttpl/create-edit-deploymenttpl.component.ts b/src/frontend/src/app/portal/deployment/create-edit-deploymenttpl/create-edit-deploymenttpl.component.ts index 34e9a74a3..17ca9993a 100644 --- a/src/frontend/src/app/portal/deployment/create-edit-deploymenttpl/create-edit-deploymenttpl.component.ts +++ b/src/frontend/src/app/portal/deployment/create-edit-deploymenttpl/create-edit-deploymenttpl.component.ts @@ -476,6 +476,7 @@ export class CreateEditDeploymentTplComponent extends ContainerTpl implements On this.deploymentTpl.template = JSON.stringify(newState); this.deploymentTpl.id = undefined; this.deploymentTpl.name = this.deployment.name; + this.deploymentTpl.createTime = this.deploymentTpl.updateTime = new Date(); this.deploymentTplService.create(this.deploymentTpl, this.app.id).subscribe( status => { this.isSubmitOnGoing = false; diff --git a/src/frontend/src/app/portal/ingress/create-edit-ingresstpl/create-edit-ingresstpl.component.ts b/src/frontend/src/app/portal/ingress/create-edit-ingresstpl/create-edit-ingresstpl.component.ts index 216b6368d..719f0f425 100644 --- a/src/frontend/src/app/portal/ingress/create-edit-ingresstpl/create-edit-ingresstpl.component.ts +++ b/src/frontend/src/app/portal/ingress/create-edit-ingresstpl/create-edit-ingresstpl.component.ts @@ -143,6 +143,7 @@ export class CreateEditIngressTplComponent extends CreateEditResourceTemplate im this.template.id = undefined; this.template.name = this.resource.name; + this.template.createTime = this.template.updateTime = new Date(); this.templateService.create(this.template, this.app.id).subscribe( status => { this.isSubmitOnGoing = false; diff --git a/src/frontend/src/app/portal/persistentvolumeclaim/create-edit-persistentvolumeclaimtpl/create-edit-persistentvolumeclaimtpl.component.ts b/src/frontend/src/app/portal/persistentvolumeclaim/create-edit-persistentvolumeclaimtpl/create-edit-persistentvolumeclaimtpl.component.ts index 82e85abd8..0d1b39446 100644 --- a/src/frontend/src/app/portal/persistentvolumeclaim/create-edit-persistentvolumeclaimtpl/create-edit-persistentvolumeclaimtpl.component.ts +++ b/src/frontend/src/app/portal/persistentvolumeclaim/create-edit-persistentvolumeclaimtpl/create-edit-persistentvolumeclaimtpl.component.ts @@ -225,6 +225,7 @@ export class CreateEditPersistentVolumeClaimTplComponent implements OnInit, Afte const kubePvc = this.getKubePvcByForm(); this.pvcTpl.template = JSON.stringify(kubePvc); this.pvcTpl.id = undefined; + this.pvcTpl.createTime = this.pvcTpl.updateTime = new Date(); this.pvcTplService.create(this.pvcTpl, this.app.id).subscribe( status => { this.isSubmitOnGoing = false; diff --git a/src/frontend/src/app/portal/secret/create-edit-secrettpl/create-edit-secrettpl.component.ts b/src/frontend/src/app/portal/secret/create-edit-secrettpl/create-edit-secrettpl.component.ts index 76804ace9..f3d7e734b 100644 --- a/src/frontend/src/app/portal/secret/create-edit-secrettpl/create-edit-secrettpl.component.ts +++ b/src/frontend/src/app/portal/secret/create-edit-secrettpl/create-edit-secrettpl.component.ts @@ -226,6 +226,7 @@ export class CreateEditSecretTplComponent implements OnInit, AfterViewInit, OnDe const kubeSecret = this.getKubeSecretByForm(); this.secretTpl.template = JSON.stringify(kubeSecret); this.secretTpl.id = undefined; + this.secretTpl.createTime = this.secretTpl.updateTime = new Date(); this.secretTplService.create(this.secretTpl, this.app.id).subscribe( status => { this.isSubmitOnGoing = false; diff --git a/src/frontend/src/app/portal/statefulset/create-edit-statefulsettpl/create-edit-statefulsettpl.component.ts b/src/frontend/src/app/portal/statefulset/create-edit-statefulsettpl/create-edit-statefulsettpl.component.ts index 4817452a5..360126152 100644 --- a/src/frontend/src/app/portal/statefulset/create-edit-statefulsettpl/create-edit-statefulsettpl.component.ts +++ b/src/frontend/src/app/portal/statefulset/create-edit-statefulsettpl/create-edit-statefulsettpl.component.ts @@ -378,6 +378,7 @@ export class CreateEditStatefulsettplComponent extends ContainerTpl implements O this.statefulsetTpl.template = JSON.stringify(newState); this.statefulsetTpl.id = undefined; this.statefulsetTpl.name = this.statefulset.name; + this.statefulsetTpl.createTime = this.statefulsetTpl.updateTime = new Date(); this.statefulsetTplService.create(this.statefulsetTpl, this.app.id).subscribe( status => { this.isSubmitOnGoing = false; diff --git a/src/frontend/src/app/shared/model/v1/configmaptpl.ts b/src/frontend/src/app/shared/model/v1/configmaptpl.ts index fe2d823b4..8d5da3683 100644 --- a/src/frontend/src/app/shared/model/v1/configmaptpl.ts +++ b/src/frontend/src/app/shared/model/v1/configmaptpl.ts @@ -11,6 +11,7 @@ export class ConfigMapTpl { user: string; metaData: string; createTime: Date; + updateTime?: Date; configMap: ConfigMap; clusters: string[]; status: PublishStatus[]; diff --git a/src/frontend/src/app/shared/model/v1/cronjobtpl.ts b/src/frontend/src/app/shared/model/v1/cronjobtpl.ts index 07792b415..c6e5ffb7c 100644 --- a/src/frontend/src/app/shared/model/v1/cronjobtpl.ts +++ b/src/frontend/src/app/shared/model/v1/cronjobtpl.ts @@ -13,6 +13,7 @@ export class CronjobTpl { user: string; metaData: string; createTime: Date; + upateTime?: Date; cronjob: Cronjob; clusters: string[]; status: CronjobStatus[]; diff --git a/src/frontend/src/app/shared/model/v1/deploymenttpl.ts b/src/frontend/src/app/shared/model/v1/deploymenttpl.ts index 8ec79fd0d..3caca5448 100644 --- a/src/frontend/src/app/shared/model/v1/deploymenttpl.ts +++ b/src/frontend/src/app/shared/model/v1/deploymenttpl.ts @@ -11,6 +11,7 @@ export class DeploymentTpl { deleted: boolean; user: string; createTime: Date; + updateTime?: Date; deployment: Deployment; status: DeploymentStatus[]; diff --git a/src/frontend/src/app/shared/model/v1/secrettpl.ts b/src/frontend/src/app/shared/model/v1/secrettpl.ts index 9b01550f0..f6ca6638c 100644 --- a/src/frontend/src/app/shared/model/v1/secrettpl.ts +++ b/src/frontend/src/app/shared/model/v1/secrettpl.ts @@ -10,6 +10,7 @@ export class SecretTpl { deleted: boolean; user: string; createTime: Date; + updateTime: Date; secret: Secret; status: PublishStatus[]; metaData: string; From e878b2ac31f730e516c8abfbd0695b74dd3b1258 Mon Sep 17 00:00:00 2001 From: BennieMeng Date: Fri, 31 May 2019 18:21:09 +0800 Subject: [PATCH 2/4] typo --- .../create-edit-cronjobtpl/create-edit-cronjobtpl.component.ts | 2 +- src/frontend/src/app/shared/model/v1/cronjobtpl.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/app/portal/cronjob/create-edit-cronjobtpl/create-edit-cronjobtpl.component.ts b/src/frontend/src/app/portal/cronjob/create-edit-cronjobtpl/create-edit-cronjobtpl.component.ts index 712eab019..f828d5cdb 100644 --- a/src/frontend/src/app/portal/cronjob/create-edit-cronjobtpl/create-edit-cronjobtpl.component.ts +++ b/src/frontend/src/app/portal/cronjob/create-edit-cronjobtpl/create-edit-cronjobtpl.component.ts @@ -360,7 +360,7 @@ export class CreateEditCronjobTplComponent extends ContainerTpl implements OnIni this.cronjobTpl.id = undefined; this.cronjobTpl.name = this.cronjob.name; - this.cronjobTpl.createTime = this.cronjobTpl.upateTime = new Date(); + this.cronjobTpl.createTime = this.cronjobTpl.updateTime = new Date(); this.cronjobTplService.create(this.cronjobTpl, this.app.id).subscribe( status => { this.isSubmitOnGoing = false; diff --git a/src/frontend/src/app/shared/model/v1/cronjobtpl.ts b/src/frontend/src/app/shared/model/v1/cronjobtpl.ts index c6e5ffb7c..ef06d8970 100644 --- a/src/frontend/src/app/shared/model/v1/cronjobtpl.ts +++ b/src/frontend/src/app/shared/model/v1/cronjobtpl.ts @@ -13,7 +13,7 @@ export class CronjobTpl { user: string; metaData: string; createTime: Date; - upateTime?: Date; + updateTime?: Date; cronjob: Cronjob; clusters: string[]; status: CronjobStatus[]; From 1549b8be9f350a8348b2091f41bf78fa0e795110 Mon Sep 17 00:00:00 2001 From: BennieMeng Date: Fri, 31 May 2019 18:27:31 +0800 Subject: [PATCH 3/4] frontend: change app fold text --- src/frontend/src/app/portal/app/app.component.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/frontend/src/app/portal/app/app.component.html b/src/frontend/src/app/portal/app/app.component.html index 2b057ac4d..336f4e158 100644 --- a/src/frontend/src/app/portal/app/app.component.html +++ b/src/frontend/src/app/portal/app/app.component.html @@ -33,9 +33,10 @@

- - {{'ACTION.FOLD' | translate}} - {{'ACTION.UNFOLD' | translate}} + + + {{'ACTION.UNFOLD' | translate}} + {{'ACTION.FOLD' | translate}} From 996933c19d4bdce1380cc3603fa5448bb824a8c4 Mon Sep 17 00:00:00 2001 From: BennieMeng Date: Fri, 31 May 2019 18:29:07 +0800 Subject: [PATCH 4/4] recove command --- src/frontend/src/app/portal/app/app.component.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/frontend/src/app/portal/app/app.component.html b/src/frontend/src/app/portal/app/app.component.html index 336f4e158..1b7f2e0a6 100644 --- a/src/frontend/src/app/portal/app/app.component.html +++ b/src/frontend/src/app/portal/app/app.component.html @@ -33,8 +33,7 @@

- - + {{'ACTION.UNFOLD' | translate}} {{'ACTION.FOLD' | translate}}