Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frontend: update create-template time #421

Merged
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
6 changes: 3 additions & 3 deletions src/frontend/src/app/portal/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
</ng-container>
</div>
<p class="card-show-p">
<span *ngIf="clusters.length >= allowNumber" (click)="changeCard()">
<span *ngIf="!allowShowAll">{{'ACTION.FOLD' | translate}}</span>
<span *ngIf="allowShowAll">{{'ACTION.UNFOLD' | translate}}</span>
<span *ngIf="clusters.length >= allowNumber" (click)="changeCard()">
<span *ngIf="!allowShowAll">{{'ACTION.UNFOLD' | translate}}</span>
<span *ngIf="allowShowAll">{{'ACTION.FOLD' | translate}}</span>
<svg class="card-change-svg" width="12" height="12" xmlns="http://www.w3.org/2000/svg"
viewBox="0, 0, 20, 10" style="margin-left: 3px;transition: transform 250ms ease-in-out;">
<polyline points="3,2 10,10 17,2" style="fill: white;stroke: #377aec;stroke-width: 2;"></polyline>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.updateTime = new Date();
this.cronjobTplService.create(this.cronjobTpl, this.app.id).subscribe(
status => {
this.isSubmitOnGoing = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/frontend/src/app/shared/model/v1/configmaptpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export class ConfigMapTpl {
user: string;
metaData: string;
createTime: Date;
updateTime?: Date;
configMap: ConfigMap;
clusters: string[];
status: PublishStatus[];
Expand Down
1 change: 1 addition & 0 deletions src/frontend/src/app/shared/model/v1/cronjobtpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export class CronjobTpl {
user: string;
metaData: string;
createTime: Date;
updateTime?: Date;
cronjob: Cronjob;
clusters: string[];
status: CronjobStatus[];
Expand Down
1 change: 1 addition & 0 deletions src/frontend/src/app/shared/model/v1/deploymenttpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export class DeploymentTpl {
deleted: boolean;
user: string;
createTime: Date;
updateTime?: Date;
deployment: Deployment;

status: DeploymentStatus[];
Expand Down
1 change: 1 addition & 0 deletions src/frontend/src/app/shared/model/v1/secrettpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export class SecretTpl {
deleted: boolean;
user: string;
createTime: Date;
updateTime: Date;
secret: Secret;
status: PublishStatus[];
metaData: string;
Expand Down