From: Ricardo Marques <14297426+ricardoasmarques@users.noreply.github.com> Date: Thu, 26 Sep 2019 13:45:58 +0000 (+0100) Subject: Merge pull request #30208 from ricardoasmarques/support-iscsi-controls-types X-Git-Tag: v15.1.0~1420 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=14763dfb51b158071cda6ac7a72d758f1faab8ce;p=ceph-ci.git Merge pull request #30208 from ricardoasmarques/support-iscsi-controls-types mgr/dashboard: Controls UI inputs based on "type" Reviewed-by: Tiago Melo Reviewed-by: Volker Theile --- 14763dfb51b158071cda6ac7a72d758f1faab8ce diff --cc src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-details/iscsi-target-details.component.ts index a3a9c2dd253,b9442ccd132..5b17c8b9ff8 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-details/iscsi-target-details.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-details/iscsi-target-details.component.ts @@@ -260,19 -266,9 +273,19 @@@ export class IscsiTargetDetailsComponen return { displayName: key, default: value, - current: tempData[key] || value + current: !_.isUndefined(tempData[key]) ? this.format(tempData[key]) : value }; }); + // Target level authentication was introduced in ceph-iscsi config v11 + if (this.cephIscsiConfigVersion > 10) { + ['user', 'password', 'mutual_user', 'mutual_password'].forEach((key) => { + this.data.push({ + displayName: key, + default: null, + current: tempData[key] + }); + }); + } } else if (e.node.id.toString().startsWith('disk_')) { this.columns[2].isHidden = false; this.data = _.map(this.settings.disk_default_controls[tempData.backstore], (value, key) => {