1 <cd-loading-panel *
ngIf=
"loading && !error"
2 i18n
>Loading configuration...
</cd-loading-panel>
3 <cd-error-panel *
ngIf=
"loading && error"
4 i18n
>The configuration could not be loaded.
</cd-error-panel>
6 <div class=
"col-sm-12 col-lg-6"
7 *
ngIf=
"!loading && !error">
8 <form name=
"mgrModuleForm"
9 class=
"form-horizontal"
11 [formGroup]=
"mgrModuleForm"
13 <div class=
"panel panel-default">
14 <div class=
"panel-heading">
15 <h3 class=
"panel-title" i18n
>Edit Manager module
</h3>
17 <div class=
"panel-body">
18 <div class=
"form-group"
19 [ngClass]=
"{'has-error': mgrModuleForm.showError(moduleOption.value.name, frm)}"
20 *
ngFor=
"let moduleOption of moduleOptions | keyvalue">
23 <label class=
"control-label col-sm-3"
24 for=
"{{ moduleOption.value.name }}">
25 {{ moduleOption.value.name }}
26 <cd-helper *
ngIf=
"moduleOption.value.long_desc || moduleOption.value.desc">
27 {{ moduleOption.value.long_desc || moduleOption.value.desc | upperFirst }}
31 <!-- Field control -->
34 *
ngIf=
"moduleOption.value.type === 'bool'">
35 <div class=
"checkbox checkbox-primary">
36 <input id=
"{{ moduleOption.value.name }}"
38 formControlName=
"{{ moduleOption.value.name }}">
39 <label for=
"{{ moduleOption.value.name }}"></label>
43 <!-- addr|str|uuid -->
45 *
ngIf=
"['addr', 'str', 'uuid'].includes(moduleOption.value.type)">
46 <input id=
"{{ moduleOption.value.name }}"
49 formControlName=
"{{ moduleOption.value.name }}"
50 *
ngIf=
"moduleOption.value.enum_allowed.length === 0">
51 <select id=
"{{ moduleOption.value.name }}"
53 formControlName=
"{{ moduleOption.value.name }}"
54 *
ngIf=
"moduleOption.value.enum_allowed.length > 0">
55 <option *
ngFor=
"let value of moduleOption.value.enum_allowed"
60 <span class=
"help-block"
61 *
ngIf=
"mgrModuleForm.showError(moduleOption.value.name, frm, 'invalidUuid')"
62 i18n
>The entered value is not a valid UUID, e.g.:
67dcac9f-
2c03-
4d6c-b7bd-
1210b3a259a8
</span>
63 <span class=
"help-block"
64 *
ngIf=
"mgrModuleForm.showError(moduleOption.value.name, frm, 'pattern')"
65 i18n
>The entered value needs to be a valid IP address.
</span>
68 <!-- uint|int|size|secs -->
70 *
ngIf=
"['uint', 'int', 'size', 'secs'].includes(moduleOption.value.type)">
71 <input id=
"{{ moduleOption.value.name }}"
74 formControlName=
"{{ moduleOption.value.name }}"
75 min=
"{{ moduleOption.value.min }}"
76 max=
"{{ moduleOption.value.max }}">
77 <span class=
"help-block"
78 *
ngIf=
"mgrModuleForm.showError(moduleOption.value.name, frm, 'required')"
79 i18n
>This field is required.
</span>
80 <span class=
"help-block"
81 *
ngIf=
"mgrModuleForm.showError(moduleOption.value.name, frm, 'max')"
82 i18n
>The entered value is too high! It must be lower or equal to {{ moduleOption.value.max }}.
</span>
83 <span class=
"help-block"
84 *
ngIf=
"mgrModuleForm.showError(moduleOption.value.name, frm, 'min')"
85 i18n
>The entered value is too low! It must be greater or equal to {{ moduleOption.value.min }}.
</span>
86 <span class=
"help-block"
87 *
ngIf=
"mgrModuleForm.showError(moduleOption.value.name, frm, 'pattern')"
88 i18n
>The entered value needs to be a number.
</span>
93 *
ngIf=
"moduleOption.value.type === 'float'">
94 <input id=
"{{ moduleOption.value.name }}"
97 formControlName=
"{{ moduleOption.value.name }}">
98 <span class=
"help-block"
99 *
ngIf=
"mgrModuleForm.showError(moduleOption.value.name, frm, 'required')"
100 i18n
>This field is required.
</span>
101 <span class=
"help-block"
102 *
ngIf=
"mgrModuleForm.showError(moduleOption.value.name, frm, 'pattern')"
103 i18n
>The entered value needs to be a number or decimal.
</span>
108 <div class=
"panel-footer">
109 <div class=
"button-group text-right">
110 <cd-submit-button type=
"button"
111 (submitAction)=
"onSubmit()"
112 [form]=
"mgrModuleForm">
113 <ng-container i18n
>Update
</ng-container>
115 <button type=
"button"
116 class=
"btn btn-sm btn-default"
117 routerLink=
"/mgr-modules"