1 <div class="col-sm-12 col-md-12 col-lg-6">
2 <form name="configForm"
4 [formGroup]="configForm"
7 <div class="card-header">
8 <ng-container i18>Edit</ng-container> {{ configForm.getValue('name') }}
11 <div class="card-body">
13 <div class="form-group row">
15 class="col-form-label col-sm-3">Name</label>
16 <div class="col-sm-9">
17 <input class="form-control"
20 formControlName="name"
26 <div class="form-group row"
27 *ngIf="configForm.getValue('desc')">
29 class="col-form-label col-sm-3">Description</label>
30 <div class="col-sm-9">
31 <textarea class="form-control resize-vertical"
33 formControlName="desc"
39 <!-- Long description -->
40 <div class="form-group row"
41 *ngIf="configForm.getValue('long_desc')">
43 class="col-form-label col-sm-3">Long description</label>
44 <div class="col-sm-9">
45 <textarea class="form-control resize-vertical"
47 formControlName="long_desc"
54 <div class="form-group row"
55 *ngIf="configForm.getValue('default') !== ''">
57 class="col-form-label col-sm-3">Default</label>
58 <div class="col-sm-9">
59 <input class="form-control"
62 formControlName="default"
67 <!-- Daemon default -->
68 <div class="form-group row"
69 *ngIf="configForm.getValue('daemon_default') !== ''">
71 class="col-form-label col-sm-3">Daemon default</label>
72 <div class="col-sm-9">
73 <input class="form-control"
76 formControlName="daemon_default"
82 <div class="form-group row"
83 *ngIf="configForm.getValue('services').length > 0">
85 class="col-form-label col-sm-3">Services</label>
86 <div class="col-sm-9">
87 <span *ngFor="let service of configForm.getValue('services')"
88 class="form-component-badge">
89 <span class="badge badge-dark">{{ service }}</span>
95 <div formGroupName="values">
97 class="cd-header">Values</h2>
98 <ng-container *ngFor="let section of availSections">
99 <div class="form-group row"
100 *ngIf="type === 'bool'">
101 <div class="offset-sm-3 col-sm-9">
102 <div class="custom-control custom-checkbox">
103 <input type="checkbox"
104 class="custom-control-input"
106 [formControlName]="section">
107 <label class="custom-control-label"
108 [for]="section">{{ section }}
114 <div class="form-group row"
115 *ngIf="type !== 'bool'">
116 <label class="col-form-label col-sm-3"
117 [for]="section">{{ section }}
119 <div class="col-sm-9">
120 <input class="form-control"
123 [placeholder]="humanReadableType"
124 [formControlName]="section"
125 [step]="getStep(type, this.configForm.getValue(section))">
126 <span class="invalid-feedback"
127 *ngIf="configForm.showError(section, formDir, 'pattern')">
128 {{ patternHelpText }}
130 <span class="invalid-feedback"
131 *ngIf="configForm.showError(section, formDir, 'invalidUuid')">
132 {{ patternHelpText }}
134 <span class="invalid-feedback"
135 *ngIf="configForm.showError(section, formDir, 'max')"
136 i18n>The entered value is too high! It must not be greater than {{ maxValue }}.</span>
137 <span class="invalid-feedback"
138 *ngIf="configForm.showError(section, formDir, 'min')"
139 i18n>The entered value is too low! It must not be lower than {{ minValue }}.</span>
146 <div class="card-footer">
147 <div class="button-group text-right">
148 <cd-submit-button [form]="formDir"
149 (submitAction)="submit()">
150 <span i18n>Save</span>
152 <cd-back-button></cd-back-button>