summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-reweight-modal/osd-reweight-modal.component.html
diff options
context:
space:
mode:
Diffstat (limited to 'src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-reweight-modal/osd-reweight-modal.component.html')
-rw-r--r--src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-reweight-modal/osd-reweight-modal.component.html38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-reweight-modal/osd-reweight-modal.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-reweight-modal/osd-reweight-modal.component.html
new file mode 100644
index 000000000..e5aa22311
--- /dev/null
+++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-reweight-modal/osd-reweight-modal.component.html
@@ -0,0 +1,38 @@
+<cd-modal [modalRef]="activeModal">
+ <ng-container class="modal-title"
+ i18n>Reweight OSD: {{ osdId }}</ng-container>
+
+ <ng-container class="modal-content">
+ <form [formGroup]="reweightForm">
+ <div class="modal-body">
+ <div class="row">
+ <label for="weight"
+ class="cd-col-form-label">Weight</label>
+ <div class="cd-col-form-input">
+ <input id="weight"
+ class="form-control"
+ type="number"
+ step="0.1"
+ formControlName="weight"
+ min="0"
+ max="1"
+ [value]="currentWeight">
+ <span class="invalid-feedback"
+ *ngIf="weight.errors">
+ <span *ngIf="weight.errors?.required"
+ i18n>This field is required.</span>
+ <span *ngIf="weight.errors?.max || weight.errors?.min"
+ i18n>The value needs to be between 0 and 1.</span>
+ </span>
+ </div>
+ </div>
+ </div>
+
+ <div class="modal-footer">
+ <cd-form-button-panel (submitActionEvent)="reweight()"
+ [form]="reweightForm"
+ [submitText]="actionLabels.REWEIGHT"></cd-form-button-panel>
+ </div>
+ </form>
+ </ng-container>
+</cd-modal>