]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
Merge pull request #30208 from ricardoasmarques/support-iscsi-controls-types
authorRicardo Marques <14297426+ricardoasmarques@users.noreply.github.com>
Thu, 26 Sep 2019 13:45:58 +0000 (14:45 +0100)
committerGitHub <noreply@github.com>
Thu, 26 Sep 2019 13:45:58 +0000 (14:45 +0100)
mgr/dashboard: Controls UI inputs based on "type"

Reviewed-by: Tiago Melo <tmelo@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
1  2 
src/pybind/mgr/dashboard/controllers/iscsi.py
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-details/iscsi-target-details.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-form/iscsi-target-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/iscsi.service.ts

index a3a9c2dd2534aec398161e02e73bf4770be534d7,b9442ccd13256a1bb3f8463d750972259ec0dfbe..5b17c8b9ff866e7214c05d0ce8483c53b98e6e1c
@@@ -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) => {