mgr/dashboard: show config option description via cd-helper

Fixes: https://tracker.ceph.com/issues/37406
Signed-off-by: Tatjana Dehler <tdehler@suse.com>
This commit is contained in:
Tatjana Dehler 2018-11-28 12:31:16 +01:00
parent c7b82c3999
commit 984164d37a
3 changed files with 10 additions and 3 deletions

View File

@ -51,6 +51,7 @@
osdRecvSpeedForm.showError(attr.name, formDir)}">
<label class="control-label col-sm-6"
[for]="attr.name">{{ attr.text }}
<cd-helper *ngIf="attr.desc">{{ attr.desc }}</cd-helper>
<span class="required" *ngIf="osdRecvSpeedForm.getValue('customizePriority')"></span>
</label>
<div class="col-sm-6">

View File

@ -57,6 +57,12 @@ export class OsdRecvSpeedModalComponent implements OnInit {
attr.name,
new FormControl(null, { validators: [Validators.required] })
);
this.configService.get(attr.name).subscribe((data: any) => {
if (data.desc !== '') {
attr['desc'] = data.desc;
}
});
});
}

View File

@ -865,7 +865,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">app/ceph/cluster/osd/osd-recv-speed-modal/osd-recv-speed-modal.component.html</context>
<context context-type="linenumber">77</context>
<context context-type="linenumber">78</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">app/ceph/cluster/osd/osd-reweight-modal/osd-reweight-modal.component.html</context>
@ -913,7 +913,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">app/ceph/cluster/osd/osd-recv-speed-modal/osd-recv-speed-modal.component.html</context>
<context context-type="linenumber">73</context>
<context context-type="linenumber">74</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">app/ceph/cluster/osd/osd-scrub-modal/osd-scrub-modal.component.html</context>
@ -941,7 +941,7 @@
<source>This field is required!</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ceph/cluster/osd/osd-recv-speed-modal/osd-recv-speed-modal.component.html</context>
<context context-type="linenumber">65</context>
<context context-type="linenumber">66</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form.component.html</context>