|
1 | | -<div class="clr-row" style="padding-left: 5%"> |
2 | | - <div class="clr-row flex-items-xs-between flex-items-xs-top" style="padding-left: 15px; padding-right: 15px;"> |
3 | | - <h3 class="header-title">{{'HPA.CREATE_TEMPLATE' | translate}}</h3> |
4 | | - </div> |
5 | | - <form #ngForm="ngForm" style="padding-right: 30px;width: 100%"> |
6 | | - <section class="form-block wrap"> |
7 | | - <label class="label-level1">{{'TEMPLATE.RELEASE_MESSAGE' | translate}}</label> |
8 | | - <div class="form-group form-group-padding"> |
9 | | - <label class="clr-col-md-3 form-group-label-override required">{{'TEMPLATE.RELEASE_EXPLAIN' | translate}}</label> |
10 | | - <textarea name="description" |
11 | | - [(ngModel)]="template.description" |
12 | | - required |
13 | | - rows="3" |
14 | | - style="width: 700px;"> |
15 | | - </textarea> |
16 | | - </div> |
17 | | - </section> |
18 | | - <section class="form-block wrap" style="overflow:hidden"> |
19 | | - <div style="float: left;width: 60%"> |
20 | | - <label class="label-level1">{{'TEMPLATE.RESOURCE_CONFIG' | translate}}</label> |
21 | | - <div class="form-group form-group-padding" > |
22 | | - <label class="clr-col-md-4 form-group-label-override required">{{'TEMPLATE.TYPE' | translate}}</label> |
23 | | - <label aria-haspopup="true" role="tooltip" class="tooltip tooltip-validation tooltip-md tooltip-bottom-left"> |
24 | | - <input readonly type="text" |
25 | | - [ngModelOptions]="{standalone: true}" |
26 | | - [(ngModel)]="kubeResource.spec.scaleTargetRef.kind"> |
27 | | - </label> |
28 | | - </div> |
29 | | - <div class="form-group form-group-padding" > |
30 | | - <label class="clr-col-md-4 form-group-label-override required">{{'TEMPLATE.NAME' | translate}}</label> |
31 | | - <label aria-haspopup="true" role="tooltip" class="tooltip tooltip-validation tooltip-md tooltip-bottom-left"> |
32 | | - <wayne-select inputable name="deploy_name" [(ngModel)]="kubeResource.spec.scaleTargetRef.name" |
33 | | - searchable |
34 | | - [placeholder]="'PLACEHOLDER.CHOOSE' | translate"> |
35 | | - <wayne-option *ngFor="let deploy of deploys" [value]="deploy.name">{{deploy.name}}</wayne-option> |
36 | | - </wayne-select> |
37 | | - </label> |
| 1 | +<wayne-box> |
| 2 | + <div class="clr-row" style="padding-left: 5%"> |
| 3 | + <div class="clr-row flex-items-xs-between flex-items-xs-top" style="padding-left: 15px; padding-right: 15px;"> |
| 4 | + <h3 class="header-title">{{'HPA.CREATE_TEMPLATE' | translate}}</h3> |
| 5 | + </div> |
| 6 | + <form #ngForm="ngForm" style="padding-right: 30px;width: 100%"> |
| 7 | + <section class="form-block wrap"> |
| 8 | + <label class="label-level1">{{'TEMPLATE.RELEASE_MESSAGE' | translate}}</label> |
| 9 | + <div class="form-group form-group-padding"> |
| 10 | + <label class="clr-col-md-3 form-group-label-override required">{{'TEMPLATE.RELEASE_EXPLAIN' | translate}}</label> |
| 11 | + <textarea name="description" |
| 12 | + [(ngModel)]="template.description" |
| 13 | + required |
| 14 | + rows="3" |
| 15 | + style="width: 700px;"> |
| 16 | + </textarea> |
38 | 17 | </div> |
39 | | - |
40 | | - <label class="label-level1">{{'TEMPLATE.SCHEDULING_CONFIG' | translate}}</label> |
| 18 | + </section> |
| 19 | + <section class="form-block wrap" style="overflow:hidden"> |
| 20 | + <div style="float: left;width: 60%"> |
| 21 | + <label class="label-level1">{{'TEMPLATE.RESOURCE_CONFIG' | translate}}</label> |
| 22 | + <div class="form-group form-group-padding" > |
| 23 | + <label class="clr-col-md-4 form-group-label-override required">{{'TEMPLATE.TYPE' | translate}}</label> |
| 24 | + <label aria-haspopup="true" role="tooltip" class="tooltip tooltip-validation tooltip-md tooltip-bottom-left"> |
| 25 | + <input readonly type="text" |
| 26 | + [ngModelOptions]="{standalone: true}" |
| 27 | + [(ngModel)]="kubeResource.spec.scaleTargetRef.kind"> |
| 28 | + </label> |
| 29 | + </div> |
| 30 | + <div class="form-group form-group-padding" > |
| 31 | + <label class="clr-col-md-4 form-group-label-override required">{{'TEMPLATE.NAME' | translate}}</label> |
| 32 | + <label aria-haspopup="true" role="tooltip" class="tooltip tooltip-validation tooltip-md tooltip-bottom-left"> |
| 33 | + <wayne-select inputable name="deploy_name" [(ngModel)]="kubeResource.spec.scaleTargetRef.name" |
| 34 | + searchable |
| 35 | + [placeholder]="'PLACEHOLDER.CHOOSE' | translate"> |
| 36 | + <wayne-option *ngFor="let deploy of deploys" [value]="deploy.name">{{deploy.name}}</wayne-option> |
| 37 | + </wayne-select> |
| 38 | + </label> |
| 39 | + </div> |
| 40 | + |
| 41 | + <label class="label-level1">{{'TEMPLATE.SCHEDULING_CONFIG' | translate}}</label> |
| 42 | + <div class="form-group form-group-padding" > |
| 43 | + <label class="clr-col-md-4 form-group-label-override required">{{'TEMPLATE.MIN_REPLICAS' | translate}}</label> |
| 44 | + <label aria-haspopup="true" role="tooltip" class="tooltip tooltip-validation tooltip-md tooltip-bottom-left"> |
| 45 | + <input type="number" |
| 46 | + [ngModelOptions]="{standalone: true}" |
| 47 | + [(ngModel)]="kubeResource.spec.minReplicas"> |
| 48 | + </label> |
| 49 | + </div> |
41 | 50 | <div class="form-group form-group-padding" > |
42 | | - <label class="clr-col-md-4 form-group-label-override required">{{'TEMPLATE.MIN_REPLICAS' | translate}}</label> |
| 51 | + <label class="clr-col-md-4 form-group-label-override required">{{'TEMPLATE.MAX_REPLICAS' | translate}}</label> |
43 | 52 | <label aria-haspopup="true" role="tooltip" class="tooltip tooltip-validation tooltip-md tooltip-bottom-left"> |
44 | 53 | <input type="number" |
45 | 54 | [ngModelOptions]="{standalone: true}" |
46 | | - [(ngModel)]="kubeResource.spec.minReplicas"> |
| 55 | + [(ngModel)]="kubeResource.spec.maxReplicas"> |
47 | 56 | </label> |
48 | 57 | </div> |
49 | | - <div class="form-group form-group-padding" > |
50 | | - <label class="clr-col-md-4 form-group-label-override required">{{'TEMPLATE.MAX_REPLICAS' | translate}}</label> |
51 | | - <label aria-haspopup="true" role="tooltip" class="tooltip tooltip-validation tooltip-md tooltip-bottom-left"> |
52 | | - <input type="number" |
53 | | - [ngModelOptions]="{standalone: true}" |
54 | | - [(ngModel)]="kubeResource.spec.maxReplicas"> |
55 | | - </label> |
56 | | - </div> |
57 | | - <div class="form-group form-group-padding" > |
58 | | - <label class="clr-col-md-4 form-group-label-override required">{{'TEMPLATE.CPU_THRESHOLD' | translate}}</label> |
59 | | - <label aria-haspopup="true" role="tooltip" class="tooltip tooltip-validation tooltip-md tooltip-bottom-left"> |
60 | | - <input type="number" |
61 | | - [ngModelOptions]="{standalone: true}" |
62 | | - [(ngModel)]="kubeResource.spec.targetCPUUtilizationPercentage"> |
63 | | - </label> |
| 58 | + <div class="form-group form-group-padding" > |
| 59 | + <label class="clr-col-md-4 form-group-label-override required">{{'TEMPLATE.CPU_THRESHOLD' | translate}}</label> |
| 60 | + <label aria-haspopup="true" role="tooltip" class="tooltip tooltip-validation tooltip-md tooltip-bottom-left"> |
| 61 | + <input type="number" |
| 62 | + [ngModelOptions]="{standalone: true}" |
| 63 | + [(ngModel)]="kubeResource.spec.targetCPUUtilizationPercentage"> |
| 64 | + </label> |
| 65 | + </div> |
| 66 | + |
| 67 | + |
64 | 68 | </div> |
65 | | - |
66 | | - |
| 69 | + </section> |
| 70 | + <div class="clr-wizard-footer-buttons" style="padding-top: 30px"> |
| 71 | + <button type="button" class="btn btn-outline" (click)="onCancel()">{{ 'BUTTON.CANCEL' | translate}}</button> |
| 72 | + <button type="button" class="btn btn-primary" (click)="onOpenModal()">{{'BUTTON.ADVANCED_CONFIG' | translate}}</button> |
| 73 | + <button type="button" class="btn btn-primary" [disabled]="!isValid" (click)="onSubmit()">{{ 'BUTTON.SUBMIT' | translate}}</button> |
67 | 74 | </div> |
68 | | - </section> |
69 | | - <div class="clr-wizard-footer-buttons" style="padding-top: 30px"> |
70 | | - <button type="button" class="btn btn-outline" (click)="onCancel()">{{ 'BUTTON.CANCEL' | translate}}</button> |
71 | | - <button type="button" class="btn btn-primary" (click)="onOpenModal()">{{'BUTTON.ADVANCED_CONFIG' | translate}}</button> |
72 | | - <button type="button" class="btn btn-primary" [disabled]="!isValid" (click)="onSubmit()">{{ 'BUTTON.SUBMIT' | translate}}</button> |
73 | | - </div> |
74 | | - </form> |
75 | | -</div> |
| 75 | + </form> |
| 76 | + </div> |
| 77 | +</wayne-box> |
76 | 78 | <wayne-ace-editor (outputObj)="saveResourceTemplate($event)"></wayne-ace-editor> |
0 commit comments