@alauda-fe/network 1.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/alauda-fe-network.mjs +5 -0
- package/esm2022/index.mjs +19 -0
- package/esm2022/lib/components/certificate-status/component.mjs +37 -0
- package/esm2022/lib/components/fixed-ip/component.mjs +503 -0
- package/esm2022/lib/components/loadbalancer-spec-form/component.mjs +251 -0
- package/esm2022/lib/components/service-annotations-form/annotations.component.mjs +681 -0
- package/esm2022/lib/components/service-annotations-form-item/annotations.component.mjs +106 -0
- package/esm2022/lib/components/service-form/component.mjs +307 -0
- package/esm2022/lib/components/service-form/fieldset/component.mjs +407 -0
- package/esm2022/lib/directives/subnet-validator.directive.mjs +111 -0
- package/esm2022/lib/services/alb-api.service.mjs +48 -0
- package/esm2022/lib/services/certificate-api.service.mjs +111 -0
- package/esm2022/lib/services/network-util.service.mjs +116 -0
- package/esm2022/lib/types/alb-exports.mjs +14 -0
- package/esm2022/lib/types/k8s-exports.mjs +13 -0
- package/esm2022/lib/types/resource-definition.mjs +16 -0
- package/esm2022/lib/utils/alb-exports.mjs +108 -0
- package/esm2022/lib/utils/alb-internals.mjs +2 -0
- package/esm2022/lib/utils/cidr-exports.mjs +359 -0
- package/esm2022/lib/utils/cluster-exports.mjs +18 -0
- package/esm2022/lib/utils/service-exports.mjs +58 -0
- package/esm2022/lib/utils/service-internals.mjs +7 -0
- package/esm2022/lib/utils/subnet-exports.mjs +18 -0
- package/index.d.ts +18 -0
- package/lib/components/certificate-status/component.d.ts +17 -0
- package/lib/components/fixed-ip/component.d.ts +67 -0
- package/lib/components/loadbalancer-spec-form/component.d.ts +34 -0
- package/lib/components/service-annotations-form/annotations.component.d.ts +74 -0
- package/lib/components/service-annotations-form-item/annotations.component.d.ts +14 -0
- package/lib/components/service-form/component.d.ts +56 -0
- package/lib/components/service-form/fieldset/component.d.ts +46 -0
- package/lib/directives/subnet-validator.directive.d.ts +34 -0
- package/lib/services/alb-api.service.d.ts +16 -0
- package/lib/services/certificate-api.service.d.ts +38 -0
- package/lib/services/network-util.service.d.ts +21 -0
- package/lib/types/alb-exports.d.ts +29 -0
- package/lib/types/k8s-exports.d.ts +130 -0
- package/lib/types/resource-definition.d.ts +25 -0
- package/lib/utils/alb-exports.d.ts +16 -0
- package/lib/utils/alb-internals.d.ts +10 -0
- package/lib/utils/cidr-exports.d.ts +85 -0
- package/lib/utils/cluster-exports.d.ts +14 -0
- package/lib/utils/service-exports.d.ts +18 -0
- package/lib/utils/service-internals.d.ts +2 -0
- package/lib/utils/subnet-exports.d.ts +20 -0
- package/package.json +31 -0
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { FormModule, IconModule, InputModule, RadioModule, SelectModule, TooltipModule, } from '@alauda/ui';
|
|
2
|
+
import { CoerceNumberDirective, CoreModule, ErrorsMapperModule, TranslateModule, POSITIVE_INT_PATTERN, } from '@alauda-fe/common';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
5
|
+
import { ReactiveFormsModule, Validators } from '@angular/forms';
|
|
6
|
+
import { BaseResourceFormGroupComponent } from 'ng-resource-form-util';
|
|
7
|
+
import { SpecModel } from '../../types/alb-exports';
|
|
8
|
+
import { RESOURCE_LIMIT_MAPPER } from '../../utils/alb-exports';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
import * as i1 from "@angular/common";
|
|
11
|
+
import * as i2 from "@angular/forms";
|
|
12
|
+
import * as i3 from "@alauda/ui";
|
|
13
|
+
import * as i4 from "@alauda-fe/common";
|
|
14
|
+
function LoadBalancerSpecFormComponent_aui_radio_button_6_Template(rf, ctx) { if (rf & 1) {
|
|
15
|
+
i0.ɵɵelementStart(0, "aui-radio-button", 22)(1, "div", 23)(2, "div");
|
|
16
|
+
i0.ɵɵtext(3);
|
|
17
|
+
i0.ɵɵpipe(4, "translate");
|
|
18
|
+
i0.ɵɵelementStart(5, "div", 24);
|
|
19
|
+
i0.ɵɵtext(6);
|
|
20
|
+
i0.ɵɵpipe(7, "translate");
|
|
21
|
+
i0.ɵɵelementEnd()()()();
|
|
22
|
+
} if (rf & 2) {
|
|
23
|
+
const specModel_r11 = ctx.$implicit;
|
|
24
|
+
i0.ɵɵproperty("value", specModel_r11.model);
|
|
25
|
+
i0.ɵɵadvance(3);
|
|
26
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 3, specModel_r11.model + "_scale"), " ");
|
|
27
|
+
i0.ɵɵadvance(3);
|
|
28
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(7, 5, specModel_r11.tip), " ");
|
|
29
|
+
} }
|
|
30
|
+
function LoadBalancerSpecFormComponent_ng_template_8_Template(rf, ctx) { if (rf & 1) {
|
|
31
|
+
i0.ɵɵelementStart(0, "ul", 25)(1, "li");
|
|
32
|
+
i0.ɵɵtext(2);
|
|
33
|
+
i0.ɵɵpipe(3, "translate");
|
|
34
|
+
i0.ɵɵelementEnd();
|
|
35
|
+
i0.ɵɵelementStart(4, "li");
|
|
36
|
+
i0.ɵɵtext(5);
|
|
37
|
+
i0.ɵɵpipe(6, "translate");
|
|
38
|
+
i0.ɵɵelementEnd();
|
|
39
|
+
i0.ɵɵelementStart(7, "li");
|
|
40
|
+
i0.ɵɵtext(8);
|
|
41
|
+
i0.ɵɵpipe(9, "translate");
|
|
42
|
+
i0.ɵɵelementEnd();
|
|
43
|
+
i0.ɵɵelementStart(10, "li");
|
|
44
|
+
i0.ɵɵtext(11);
|
|
45
|
+
i0.ɵɵpipe(12, "translate");
|
|
46
|
+
i0.ɵɵelementEnd()();
|
|
47
|
+
} if (rf & 2) {
|
|
48
|
+
i0.ɵɵadvance(2);
|
|
49
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 4, "alb_spec_model_tips_small"));
|
|
50
|
+
i0.ɵɵadvance(3);
|
|
51
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 6, "alb_spec_model_tips_medium"));
|
|
52
|
+
i0.ɵɵadvance(3);
|
|
53
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 8, "alb_spec_model_tips_large"));
|
|
54
|
+
i0.ɵɵadvance(3);
|
|
55
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(12, 10, "alb_spec_model_tips_custom"));
|
|
56
|
+
} }
|
|
57
|
+
function LoadBalancerSpecFormComponent_aui_select_21_Template(rf, ctx) { if (rf & 1) {
|
|
58
|
+
i0.ɵɵelementStart(0, "aui-select", 26)(1, "aui-option", 27);
|
|
59
|
+
i0.ɵɵtext(2, "m");
|
|
60
|
+
i0.ɵɵelementEnd();
|
|
61
|
+
i0.ɵɵelementStart(3, "aui-option", 28);
|
|
62
|
+
i0.ɵɵpipe(4, "translate");
|
|
63
|
+
i0.ɵɵtext(5);
|
|
64
|
+
i0.ɵɵpipe(6, "translate");
|
|
65
|
+
i0.ɵɵelementEnd()();
|
|
66
|
+
} if (rf & 2) {
|
|
67
|
+
i0.ɵɵadvance(3);
|
|
68
|
+
i0.ɵɵproperty("label", i0.ɵɵpipeBind1(4, 2, "core"));
|
|
69
|
+
i0.ɵɵadvance(2);
|
|
70
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 4, "core"), " ");
|
|
71
|
+
} }
|
|
72
|
+
function LoadBalancerSpecFormComponent_ng_template_22_span_0_Template(rf, ctx) { if (rf & 1) {
|
|
73
|
+
i0.ɵɵelementStart(0, "span", 30);
|
|
74
|
+
i0.ɵɵtext(1);
|
|
75
|
+
i0.ɵɵpipe(2, "translate");
|
|
76
|
+
i0.ɵɵelementEnd();
|
|
77
|
+
} if (rf & 2) {
|
|
78
|
+
const cpuUnit_r13 = ctx.ngIf;
|
|
79
|
+
i0.ɵɵadvance(1);
|
|
80
|
+
i0.ɵɵtextInterpolate1(" ", cpuUnit_r13 === "core" ? i0.ɵɵpipeBind1(2, 1, "core") : cpuUnit_r13, " ");
|
|
81
|
+
} }
|
|
82
|
+
function LoadBalancerSpecFormComponent_ng_template_22_Template(rf, ctx) { if (rf & 1) {
|
|
83
|
+
i0.ɵɵtemplate(0, LoadBalancerSpecFormComponent_ng_template_22_span_0_Template, 3, 3, "span", 29);
|
|
84
|
+
} if (rf & 2) {
|
|
85
|
+
const ctx_r5 = i0.ɵɵnextContext();
|
|
86
|
+
i0.ɵɵproperty("ngIf", ctx_r5.form.get("resourceLimit.cpu.unit").value);
|
|
87
|
+
} }
|
|
88
|
+
function LoadBalancerSpecFormComponent_aui_select_33_Template(rf, ctx) { if (rf & 1) {
|
|
89
|
+
i0.ɵɵelementStart(0, "aui-select", 31)(1, "aui-option", 32);
|
|
90
|
+
i0.ɵɵtext(2, "Mi");
|
|
91
|
+
i0.ɵɵelementEnd();
|
|
92
|
+
i0.ɵɵelementStart(3, "aui-option", 33);
|
|
93
|
+
i0.ɵɵtext(4, "Gi");
|
|
94
|
+
i0.ɵɵelementEnd()();
|
|
95
|
+
} }
|
|
96
|
+
function LoadBalancerSpecFormComponent_ng_template_34_Template(rf, ctx) { if (rf & 1) {
|
|
97
|
+
i0.ɵɵelementStart(0, "span", 30);
|
|
98
|
+
i0.ɵɵtext(1);
|
|
99
|
+
i0.ɵɵelementEnd();
|
|
100
|
+
} if (rf & 2) {
|
|
101
|
+
const ctx_r9 = i0.ɵɵnextContext();
|
|
102
|
+
i0.ɵɵadvance(1);
|
|
103
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r9.form.get("resourceLimit.memory.unit").value, " ");
|
|
104
|
+
} }
|
|
105
|
+
const _c0 = function (a0) { return { pattern: a0 }; };
|
|
106
|
+
const SPEC_MODEL_TIPS = [
|
|
107
|
+
{
|
|
108
|
+
model: SpecModel.SMALL,
|
|
109
|
+
tip: 'alb_spec_small_tips',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
model: SpecModel.MEDIUM,
|
|
113
|
+
tip: 'alb_spec_medium_tips',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
model: SpecModel.LARGE,
|
|
117
|
+
tip: 'alb_spec_large_tips',
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
model: SpecModel.CUSTOMIZE,
|
|
121
|
+
tip: 'suitable_for_professional_users',
|
|
122
|
+
},
|
|
123
|
+
];
|
|
124
|
+
export class LoadBalancerSpecFormComponent extends BaseResourceFormGroupComponent {
|
|
125
|
+
constructor() {
|
|
126
|
+
super(...arguments);
|
|
127
|
+
this.SpecModel = SpecModel;
|
|
128
|
+
this.SPEC_MODEL_TIPS = SPEC_MODEL_TIPS;
|
|
129
|
+
this.POSITIVE_INT_PATTERN = POSITIVE_INT_PATTERN;
|
|
130
|
+
}
|
|
131
|
+
createForm() {
|
|
132
|
+
const { cpu, memory } = RESOURCE_LIMIT_MAPPER[SpecModel.SMALL];
|
|
133
|
+
const resourceLimitForm = this.fb.group({
|
|
134
|
+
cpu: this.fb.group({
|
|
135
|
+
value: this.fb.control(cpu.value, [Validators.required]),
|
|
136
|
+
unit: this.fb.control(cpu.unit),
|
|
137
|
+
}),
|
|
138
|
+
memory: this.fb.group({
|
|
139
|
+
value: this.fb.control(memory.value, [Validators.required]),
|
|
140
|
+
unit: this.fb.control(memory.unit),
|
|
141
|
+
}),
|
|
142
|
+
});
|
|
143
|
+
if (this.resourceModel?.specModel !== SpecModel.CUSTOMIZE) {
|
|
144
|
+
resourceLimitForm.disable();
|
|
145
|
+
}
|
|
146
|
+
return this.fb.group({
|
|
147
|
+
specModel: this.fb.control(SpecModel.SMALL),
|
|
148
|
+
resourceLimit: resourceLimitForm,
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
getDefaultFormModel() {
|
|
152
|
+
return {
|
|
153
|
+
specModel: SpecModel.SMALL,
|
|
154
|
+
resourceLimit: RESOURCE_LIMIT_MAPPER[SpecModel.SMALL],
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
onSpecModelChange(specModel) {
|
|
158
|
+
const resourceLimit = RESOURCE_LIMIT_MAPPER[specModel];
|
|
159
|
+
const resourceLimitForm = this.form.get('resourceLimit');
|
|
160
|
+
if (!resourceLimit) {
|
|
161
|
+
resourceLimitForm.enable();
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
resourceLimitForm.patchValue(resourceLimit, { emitEvent: false });
|
|
165
|
+
resourceLimitForm.disable();
|
|
166
|
+
}
|
|
167
|
+
static { this.ɵfac = /*@__PURE__*/ function () { let ɵLoadBalancerSpecFormComponent_BaseFactory; return function LoadBalancerSpecFormComponent_Factory(t) { return (ɵLoadBalancerSpecFormComponent_BaseFactory || (ɵLoadBalancerSpecFormComponent_BaseFactory = i0.ɵɵgetInheritedFactory(LoadBalancerSpecFormComponent)))(t || LoadBalancerSpecFormComponent); }; }(); }
|
|
168
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LoadBalancerSpecFormComponent, selectors: [["acl-alb-spec-form"]], standalone: true, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature], decls: 38, vars: 30, consts: [[3, "formGroup"], [1, "spec-model"], ["auiFormItemLabel", ""], ["auiFormItemControl", "", "formControlName", "specModel", "required", "", 3, "ngModelChange"], [3, "value", 4, "ngFor", "ngForOf"], ["auiFormItemAddon", "", "icon", "question_circle", 1, "icon--help", 3, "auiTooltip"], ["specModelTips", ""], ["width", "large"], ["formGroupName", "resourceLimit", 1, "d-flex", "flex-1", "aui-form-item__control"], [1, "flex-1"], ["auiFormItemControl", "", "formGroupName", "cpu"], ["auiInputAddonBefore", ""], ["aui-input", "", "formControlName", "value", "aclCoerceNumber", "", 3, "pattern", "aclErrorsMapper", "aclErrorsMapperOutlet"], ["class", "vm-spec-form__cpu-unit", "auiInputAddonAfter", "", "formControlName", "unit", 4, "ngIf", "ngIfElse"], ["cUnit", ""], ["auiFormItemError", ""], ["cpuError", ""], [1, "flex-1", "ml-8"], ["auiFormItemControl", "", "formGroupName", "memory"], ["auiInputAddonAfter", "", "formControlName", "unit", 4, "ngIf", "ngIfElse"], ["mUnit", ""], ["memoryError", ""], [3, "value"], [1, "spec-model__label"], [1, "text-help"], [1, "d-list"], ["auiInputAddonAfter", "", "formControlName", "unit", 1, "vm-spec-form__cpu-unit"], ["value", "m"], ["value", "core", 3, "label"], ["auiInputAddonAfter", "", 4, "ngIf"], ["auiInputAddonAfter", ""], ["auiInputAddonAfter", "", "formControlName", "unit"], ["value", "Mi"], ["value", "Gi"]], template: function LoadBalancerSpecFormComponent_Template(rf, ctx) { if (rf & 1) {
|
|
169
|
+
i0.ɵɵelementContainerStart(0, 0);
|
|
170
|
+
i0.ɵɵelementStart(1, "aui-form-item", 1)(2, "label", 2);
|
|
171
|
+
i0.ɵɵtext(3);
|
|
172
|
+
i0.ɵɵpipe(4, "translate");
|
|
173
|
+
i0.ɵɵelementEnd();
|
|
174
|
+
i0.ɵɵelementStart(5, "aui-radio-group", 3);
|
|
175
|
+
i0.ɵɵlistener("ngModelChange", function LoadBalancerSpecFormComponent_Template_aui_radio_group_ngModelChange_5_listener($event) { return ctx.onSpecModelChange($event); });
|
|
176
|
+
i0.ɵɵtemplate(6, LoadBalancerSpecFormComponent_aui_radio_button_6_Template, 8, 7, "aui-radio-button", 4);
|
|
177
|
+
i0.ɵɵelementEnd();
|
|
178
|
+
i0.ɵɵelement(7, "aui-icon", 5);
|
|
179
|
+
i0.ɵɵtemplate(8, LoadBalancerSpecFormComponent_ng_template_8_Template, 13, 12, "ng-template", null, 6, i0.ɵɵtemplateRefExtractor);
|
|
180
|
+
i0.ɵɵelementEnd();
|
|
181
|
+
i0.ɵɵelementStart(10, "aui-form-item", 7)(11, "label", 2);
|
|
182
|
+
i0.ɵɵtext(12);
|
|
183
|
+
i0.ɵɵpipe(13, "translate");
|
|
184
|
+
i0.ɵɵelementEnd();
|
|
185
|
+
i0.ɵɵelementStart(14, "div", 8)(15, "aui-form-item", 9)(16, "aui-input-group", 10)(17, "span", 11);
|
|
186
|
+
i0.ɵɵtext(18, "CPU");
|
|
187
|
+
i0.ɵɵelementEnd();
|
|
188
|
+
i0.ɵɵelement(19, "input", 12);
|
|
189
|
+
i0.ɵɵpipe(20, "translate");
|
|
190
|
+
i0.ɵɵtemplate(21, LoadBalancerSpecFormComponent_aui_select_21_Template, 7, 6, "aui-select", 13);
|
|
191
|
+
i0.ɵɵtemplate(22, LoadBalancerSpecFormComponent_ng_template_22_Template, 1, 1, "ng-template", null, 14, i0.ɵɵtemplateRefExtractor);
|
|
192
|
+
i0.ɵɵelementEnd();
|
|
193
|
+
i0.ɵɵelement(24, "div", 15, 16);
|
|
194
|
+
i0.ɵɵelementEnd();
|
|
195
|
+
i0.ɵɵelementStart(26, "aui-form-item", 17)(27, "aui-input-group", 18)(28, "span", 11);
|
|
196
|
+
i0.ɵɵtext(29);
|
|
197
|
+
i0.ɵɵpipe(30, "translate");
|
|
198
|
+
i0.ɵɵelementEnd();
|
|
199
|
+
i0.ɵɵelement(31, "input", 12);
|
|
200
|
+
i0.ɵɵpipe(32, "translate");
|
|
201
|
+
i0.ɵɵtemplate(33, LoadBalancerSpecFormComponent_aui_select_33_Template, 5, 0, "aui-select", 19);
|
|
202
|
+
i0.ɵɵtemplate(34, LoadBalancerSpecFormComponent_ng_template_34_Template, 2, 1, "ng-template", null, 20, i0.ɵɵtemplateRefExtractor);
|
|
203
|
+
i0.ɵɵelementEnd();
|
|
204
|
+
i0.ɵɵelement(36, "div", 15, 21);
|
|
205
|
+
i0.ɵɵelementEnd()()();
|
|
206
|
+
i0.ɵɵelementContainerEnd();
|
|
207
|
+
} if (rf & 2) {
|
|
208
|
+
const _r1 = i0.ɵɵreference(9);
|
|
209
|
+
const _r4 = i0.ɵɵreference(23);
|
|
210
|
+
const _r6 = i0.ɵɵreference(25);
|
|
211
|
+
const _r8 = i0.ɵɵreference(35);
|
|
212
|
+
const _r10 = i0.ɵɵreference(37);
|
|
213
|
+
i0.ɵɵproperty("formGroup", ctx.form);
|
|
214
|
+
i0.ɵɵadvance(3);
|
|
215
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 16, "specification"));
|
|
216
|
+
i0.ɵɵadvance(3);
|
|
217
|
+
i0.ɵɵproperty("ngForOf", ctx.SPEC_MODEL_TIPS);
|
|
218
|
+
i0.ɵɵadvance(1);
|
|
219
|
+
i0.ɵɵproperty("auiTooltip", _r1);
|
|
220
|
+
i0.ɵɵadvance(5);
|
|
221
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(13, 18, "resource_limit"));
|
|
222
|
+
i0.ɵɵadvance(7);
|
|
223
|
+
i0.ɵɵproperty("pattern", ctx.POSITIVE_INT_PATTERN.pattern)("aclErrorsMapper", i0.ɵɵpureFunction1(26, _c0, i0.ɵɵpipeBind1(20, 20, ctx.POSITIVE_INT_PATTERN.tip)))("aclErrorsMapperOutlet", _r6);
|
|
224
|
+
i0.ɵɵadvance(2);
|
|
225
|
+
i0.ɵɵproperty("ngIf", ctx.form.get("specModel").value === ctx.SpecModel.CUSTOMIZE)("ngIfElse", _r4);
|
|
226
|
+
i0.ɵɵadvance(8);
|
|
227
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(30, 22, "memory"));
|
|
228
|
+
i0.ɵɵadvance(2);
|
|
229
|
+
i0.ɵɵproperty("pattern", ctx.POSITIVE_INT_PATTERN.pattern)("aclErrorsMapper", i0.ɵɵpureFunction1(28, _c0, i0.ɵɵpipeBind1(32, 24, ctx.POSITIVE_INT_PATTERN.tip)))("aclErrorsMapperOutlet", _r10);
|
|
230
|
+
i0.ɵɵadvance(2);
|
|
231
|
+
i0.ɵɵproperty("ngIf", ctx.form.get("specModel").value === ctx.SpecModel.CUSTOMIZE)("ngIfElse", _r8);
|
|
232
|
+
} }, dependencies: [CommonModule, i1.NgForOf, i1.NgIf, ReactiveFormsModule, i2.DefaultValueAccessor, i2.NgControlStatus, i2.NgControlStatusGroup, i2.RequiredValidator, i2.PatternValidator, i2.FormGroupDirective, i2.FormControlName, i2.FormGroupName, FormModule, i3.FormItemComponent, i3.FormItemAddonDirective, i3.FormItemErrorDirective, i3.FormItemLabelDirective, i3.FormItemControlDirective, IconModule, i3.IconComponent, InputModule, i3.InputComponent, i3.InputGroupComponent, i3.InputAddonBeforeDirective, i3.InputAddonAfterDirective, RadioModule, i3.RadioGroupComponent, i3.RadioButtonComponent, SelectModule, i3.SelectComponent, i3.OptionComponent, TooltipModule, i3.TooltipDirective, TranslateModule, i4.TranslatePipe, ErrorsMapperModule, i4.ErrorsMapperDirective, CoreModule, i4.E2eAttributeBindingDirective, i4.ValidatorsDirective, CoerceNumberDirective], styles: ["aui-form-item[_ngcontent-%COMP%] aui-form-item[_ngcontent-%COMP%] .aui-form-item{margin-bottom:0}.spec-model[_ngcontent-%COMP%] .aui-form-item__label-wrapper{height:64px}.spec-model[_ngcontent-%COMP%] .aui-form-item__label-wrapper.hasLabel:after{align-self:center}.spec-model[_ngcontent-%COMP%] .aui-form-item__addon-wrapper{align-self:center}.spec-model[_ngcontent-%COMP%] .aui-radio-button__label{height:64px;min-width:132px;padding:0}.spec-model[_ngcontent-%COMP%] .aui-radio-button__label>span{flex:1;height:100%}.spec-model[_ngcontent-%COMP%] .aui-radio-button__label .text-help{margin-top:2px;font-size:12px}.spec-model__label[_ngcontent-%COMP%]{display:flex;text-align:center;justify-content:center;align-items:center;height:100%;padding:0 15px}[_nghost-%COMP%] .aui-form-item__label-wrapper:empty{display:none}[_nghost-%COMP%] .aui-input-group__input-wrapper:focus-within+.aui-input-group__addon .aui-select__input, [_nghost-%COMP%] .aui-input-group__input-wrapper:hover+.aui-input-group__addon .aui-select__input{border-left-color:rgb(var(--aui-color-primary))}[_nghost-%COMP%] aui-input-group.ng-invalid .aui-input-group__input-wrapper+.aui-input-group__addon .aui-select__input{border-left-color:rgb(var(--aui-color-red))}[_nghost-%COMP%] .aui-input-group__addon--after aui-select{margin-left:-8px;margin-right:-8px;width:56px} html[lang=en] .vm-spec-form__cpu-unit{width:72px}"], changeDetection: 0 }); }
|
|
233
|
+
}
|
|
234
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LoadBalancerSpecFormComponent, [{
|
|
235
|
+
type: Component,
|
|
236
|
+
args: [{ selector: 'acl-alb-spec-form', standalone: true, imports: [
|
|
237
|
+
CommonModule,
|
|
238
|
+
ReactiveFormsModule,
|
|
239
|
+
FormModule,
|
|
240
|
+
IconModule,
|
|
241
|
+
InputModule,
|
|
242
|
+
RadioModule,
|
|
243
|
+
SelectModule,
|
|
244
|
+
TooltipModule,
|
|
245
|
+
TranslateModule,
|
|
246
|
+
ErrorsMapperModule,
|
|
247
|
+
CoreModule,
|
|
248
|
+
CoerceNumberDirective,
|
|
249
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [formGroup]=\"form\">\n <aui-form-item class=\"spec-model\">\n <label auiFormItemLabel>{{ 'specification' | translate }}</label>\n <aui-radio-group\n auiFormItemControl\n formControlName=\"specModel\"\n (ngModelChange)=\"onSpecModelChange($event)\"\n required\n >\n <aui-radio-button\n *ngFor=\"let specModel of SPEC_MODEL_TIPS\"\n [value]=\"specModel.model\"\n >\n <div class=\"spec-model__label\">\n <div>\n {{ specModel.model + '_scale' | translate }}\n <div class=\"text-help\">\n {{ specModel.tip | translate }}\n </div>\n </div>\n </div>\n </aui-radio-button>\n </aui-radio-group>\n <aui-icon\n auiFormItemAddon\n [auiTooltip]=\"specModelTips\"\n icon=\"question_circle\"\n class=\"icon--help\"\n ></aui-icon>\n <ng-template #specModelTips>\n <ul class=\"d-list\">\n <li>{{ 'alb_spec_model_tips_small' | translate }}</li>\n <li>{{ 'alb_spec_model_tips_medium' | translate }}</li>\n <li>{{ 'alb_spec_model_tips_large' | translate }}</li>\n <li>{{ 'alb_spec_model_tips_custom' | translate }}</li>\n </ul>\n </ng-template>\n </aui-form-item>\n <aui-form-item width=\"large\">\n <label auiFormItemLabel>{{ 'resource_limit' | translate }}</label>\n <div\n formGroupName=\"resourceLimit\"\n class=\"d-flex flex-1 aui-form-item__control\"\n >\n <aui-form-item class=\"flex-1\">\n <aui-input-group\n auiFormItemControl\n formGroupName=\"cpu\"\n >\n <span auiInputAddonBefore>CPU</span>\n <input\n aui-input\n formControlName=\"value\"\n aclCoerceNumber\n [pattern]=\"POSITIVE_INT_PATTERN.pattern\"\n [aclErrorsMapper]=\"{\n pattern: POSITIVE_INT_PATTERN.tip | translate\n }\"\n [aclErrorsMapperOutlet]=\"cpuError\"\n />\n <aui-select\n *ngIf=\"\n form.get('specModel').value === SpecModel.CUSTOMIZE;\n else cUnit\n \"\n class=\"vm-spec-form__cpu-unit\"\n auiInputAddonAfter\n formControlName=\"unit\"\n >\n <aui-option value=\"m\">m</aui-option>\n <aui-option\n value=\"core\"\n [label]=\"'core' | translate\"\n >\n {{ 'core' | translate }}\n </aui-option>\n </aui-select>\n <ng-template #cUnit>\n <span\n *ngIf=\"form.get('resourceLimit.cpu.unit').value as cpuUnit\"\n auiInputAddonAfter\n >\n {{ cpuUnit === 'core' ? ('core' | translate) : cpuUnit }}\n </span>\n </ng-template>\n </aui-input-group>\n <div\n auiFormItemError\n #cpuError\n ></div>\n </aui-form-item>\n <aui-form-item class=\"flex-1 ml-8\">\n <aui-input-group\n auiFormItemControl\n formGroupName=\"memory\"\n >\n <span auiInputAddonBefore>{{ 'memory' | translate }}</span>\n <input\n aui-input\n formControlName=\"value\"\n aclCoerceNumber\n [pattern]=\"POSITIVE_INT_PATTERN.pattern\"\n [aclErrorsMapper]=\"{\n pattern: POSITIVE_INT_PATTERN.tip | translate\n }\"\n [aclErrorsMapperOutlet]=\"memoryError\"\n />\n <aui-select\n *ngIf=\"\n form.get('specModel').value === SpecModel.CUSTOMIZE;\n else mUnit\n \"\n auiInputAddonAfter\n formControlName=\"unit\"\n >\n <aui-option value=\"Mi\">Mi</aui-option>\n <aui-option value=\"Gi\">Gi</aui-option>\n </aui-select>\n <ng-template #mUnit>\n <span auiInputAddonAfter>\n {{ form.get('resourceLimit.memory.unit').value }}\n </span>\n </ng-template>\n </aui-input-group>\n <div\n auiFormItemError\n #memoryError\n ></div>\n </aui-form-item>\n </div>\n </aui-form-item>\n</ng-container>\n", styles: ["aui-form-item aui-form-item ::ng-deep .aui-form-item{margin-bottom:0}.spec-model ::ng-deep .aui-form-item__label-wrapper{height:64px}.spec-model ::ng-deep .aui-form-item__label-wrapper.hasLabel:after{align-self:center}.spec-model ::ng-deep .aui-form-item__addon-wrapper{align-self:center}.spec-model ::ng-deep .aui-radio-button__label{height:64px;min-width:132px;padding:0}.spec-model ::ng-deep .aui-radio-button__label>span{flex:1;height:100%}.spec-model ::ng-deep .aui-radio-button__label .text-help{margin-top:2px;font-size:12px}.spec-model__label{display:flex;text-align:center;justify-content:center;align-items:center;height:100%;padding:0 15px}:host ::ng-deep .aui-form-item__label-wrapper:empty{display:none}:host ::ng-deep .aui-input-group__input-wrapper:focus-within+.aui-input-group__addon .aui-select__input,:host ::ng-deep .aui-input-group__input-wrapper:hover+.aui-input-group__addon .aui-select__input{border-left-color:rgb(var(--aui-color-primary))}:host ::ng-deep aui-input-group.ng-invalid .aui-input-group__input-wrapper+.aui-input-group__addon .aui-select__input{border-left-color:rgb(var(--aui-color-red))}:host ::ng-deep .aui-input-group__addon--after aui-select{margin-left:-8px;margin-right:-8px;width:56px}::ng-deep html[lang=en] .vm-spec-form__cpu-unit{width:72px}\n"] }]
|
|
250
|
+
}], null, null); })();
|
|
251
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbW9kdWxlcy9uZXR3b3JrL3NyYy9saWIvY29tcG9uZW50cy9sb2FkYmFsYW5jZXItc3BlYy1mb3JtL2NvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL21vZHVsZXMvbm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AgICAgPHNwYW4gYXVpSW5wdXRBZGRvbkJlZm9yZT5DUFU8L3NwYW4+XG4gICAgICAgICAgPGlucHV0XG4gICAgICAgICAgICBhdWktaW5wdXRcbiAgICAgICAgICAgIGZvcm1Db250cm9sTmFtZT1cInZhbHVlXCJcbiAgICAgICAgICAgIGFjbENvZXJjZU51bWJlclxuICAgICAgICAgICAgW3BhdHRlcm5dPVwiUE9TSVRJVkVfSU5UX1BBVFRFUk4ucGF0dGVyblwiXG4gICAgICAgICAgICBbYWNsRXJyb3JzTWFwcGVyXT1cIntcbiAgICAgICAgICAgICAgcGF0dGVybjogUE9TSVRJVkVfSU5UX1BBVFRFUk4udGlwIHwgdHJhbnNsYXRlXG4gICAgICAgICAgICB9XCJcbiAgICAgICAgICAgIFthY2xFcnJvcnNNYXBwZXJPdXRsZXRdPVwiY3B1RXJyb3JcIlxuICAgICAgICAgIC8+XG4gICAgICAgICAgPGF1aS1zZWxlY3RcbiAgICAgICAgICAgICpuZ0lmPVwiXG4gICAgICAgICAgICAgIGZvcm0uZ2V0KCdzcGVjTW9kZWwnKS52YWx1ZSA9PT0gU3BlY01vZGVsLkNVU1RPTUlaRTtcbiAgICAgICAgICAgICAgZWxzZSBjVW5pdFxuICAgICAgICAgICAgXCJcbiAgICAgICAgICAgIGNsYXNzPVwidm0tc3BlYy1mb3JtX19jcHUtdW5pdFwiXG4gICAgICAgICAgICBhdWlJbnB1dEFkZG9uQWZ0ZXJcbiAgICAgICAgICAgIGZvcm1Db250cm9sTmFtZT1cInVuaXRcIlxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxhdWktb3B0aW9uIHZhbHVlPVwibVwiPm08L2F1aS1vcHRpb24+XG4gICAgICAgICAgICA8YXVpLW9wdGlvblxuICAgICAgICAgICAgICB2YWx1ZT1cImNvcmVcIlxuICAgICAgICAgICAgICBbbGFiZWxdPVwiJ2NvcmUnIHwgdHJhbnNsYXRlXCJcbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAge3sgJ2NvcmUnIHwgdHJhbnNsYXRlIH19XG4gICAgICAgICAgICA8L2F1aS1vcHRpb24+XG4gICAgICAgICAgPC9hdWktc2VsZWN0PlxuICAgICAgICAgIDxuZy10ZW1wbGF0ZSAjY1VuaXQ+XG4gICAgICAgICAgICA8c3BhblxuICAgICAgICAgICAgICAqbmdJZj1cImZvcm0uZ2V0KCdyZXNvdXJjZUxpbWl0LmNwdS51bml0JykudmFsdWUgYXMgY3B1VW5pdFwiXG4gICAgICAgICAgICAgIGF1aUlucHV0QWRkb25BZnRlclxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICB7eyBjcHVVbml0ID09PSAnY29yZScgPyAoJ2NvcmUnIHwgdHJhbnNsYXRlKSA6IGNwdVVuaXQgfX1cbiAgICAgICAgICAgIDwvc3Bhbj5cbiAgICAgICAgICA8L25nLXRlbXBsYXRlPlxuICAgICAgICA8L2F1aS1pbnB1dC1ncm91cD5cbiAgICAgICAgPGRpdlxuICAgICAgICAgIGF1aUZvcm1JdGVtRXJyb3JcbiAgICAgICAgICAjY3B1RXJyb3JcbiAgICAgICAgPjwvZGl2PlxuICAgICAgPC9hdWktZm9ybS1pdGVtPlxuICAgICAgPGF1aS1mb3JtLWl0ZW0gY2xhc3M9XCJmbGV4LTEgbWwtOFwiPlxuICAgICAgICA8YXVpLWlucHV0LWdyb3VwXG4gICAgICAgICAgYXVpRm9ybUl0ZW1Db250cm9sXG4gICAgICAgICAgZm9ybUdyb3VwTmFtZT1cIm1lbW9yeVwiXG4gICAgICAgID5cbiAgICAgICAgICA8c3BhbiBhdWlJbnB1dEFkZG9uQmVmb3JlPnt7ICdtZW1vcnknIHwgdHJhbnNsYXRlIH19PC9zcGFuPlxuICAgICAgICAgIDxpbnB1dFxuICAgICAgICAgICAgYXVpLWlucHV0XG4gICAgICAgICAgICBmb3JtQ29udHJvbE5hbWU9XCJ2YWx1ZVwiXG4gICAgICAgICAgICBhY2xDb2VyY2VOdW1iZXJcbiAgICAgICAgICAgIFtwYXR0ZXJuXT1cIlBPU0lUSVZFX0lOVF9QQVRURVJOLnBhdHRlcm5cIlxuICAgICAgICAgICAgW2FjbEVycm9yc01hcHBlcl09XCJ7XG4gICAgICAgICAgICAgIHBhdHRlcm46IFBPU0lUSVZFX0lOVF9QQVRURVJOLnRpcCB8IHRyYW5zbGF0ZVxuICAgICAgICAgICAgfVwiXG4gICAgICAgICAgICBbYWNsRXJyb3JzTWFwcGVyT3V0bGV0XT1cIm1lbW9yeUVycm9yXCJcbiAgICAgICAgICAvPlxuICAgICAgICAgIDxhdWktc2VsZWN0XG4gICAgICAgICAgICAqbmdJZj1cIlxuICAgICAgICAgICAgICBmb3JtLmdldCgnc3BlY01vZGVsJykudmFsdWUgPT09IFNwZWNNb2RlbC5DVVNUT01JWkU7XG4gICAgICAgICAgICAgIGVsc2UgbVVuaXRcbiAgICAgICAgICAgIFwiXG4gICAgICAgICAgICBhdWlJbnB1dEFkZG9uQWZ0ZXJcbiAgICAgICAgICAgIGZvcm1Db250cm9sTmFtZT1cInVuaXRcIlxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxhdWktb3B0aW9uIHZhbHVlPVwiTWlcIj5NaTwvYXVpLW9wdGlvbj5cbiAgICAgICAgICAgIDxhdWktb3B0aW9uIHZhbHVlPVwiR2lcIj5HaTwvYXVpLW9wdGlvbj5cbiAgICAgICAgICA8L2F1aS1zZWxlY3Q+XG4gICAgICAgICAgPG5nLXRlbXBsYXRlICNtVW5pdD5cbiAgICAgICAgICAgIDxzcGFuIGF1aUlucHV0QWRkb25BZnRlcj5cbiAgICAgICAgICAgICAge3sgZm9ybS5nZXQoJ3Jlc291cmNlTGltaXQubWVtb3J5LnVuaXQnKS52YWx1ZSB9fVxuICAgICAgICAgICAgPC9zcGFuPlxuICAgICAgICAgIDwvbmctdGVtcGxhdGU+XG4gICAgICAgIDwvYXVpLWlucHV0LWdyb3VwPlxuICAgICAgICA8ZGl2XG4gICAgICAgICAgYXVpRm9ybUl0ZW1FcnJvclxuICAgICAgICAgICNtZW1vcnlFcnJvclxuICAgICAgICA+PC9kaXY+XG4gICAgICA8L2F1aS1mb3JtLWl0ZW0+XG4gICAgPC9kaXY+XG4gIDwvYXVpLWZvcm0taXRlbT5cbjwvbmctY29udGFpbmVyPlxuIl19
|