diff --git a/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/actions/workflow/workflow.service.js b/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/actions/workflow/workflow.service.js index cd98d6dd4d..19f3df1ef9 100644 --- a/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/actions/workflow/workflow.service.js +++ b/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/actions/workflow/workflow.service.js @@ -113,13 +113,14 @@ { type: 'template', templateUrl: basePath + "actions/workflow/info." + action + ".help.html" - }, + } + ] + }, + { + type: 'section', + htmlClass: 'col-sm-4', + items: [ { key: 'domain_name' }, - { key: 'domain_id' }, - { - key: 'name', - readonly: action === 'password' - }, { key: 'email', condition: action === 'password' @@ -128,31 +129,54 @@ key: 'password', type: 'password', condition: action === 'update' - }, - { - key: 'confirm', - type: 'password-confirm', - title: 'Confirm Password', - match: 'model.password', - condition: action === 'update' - }, - { - key: 'admin_password', - type: 'password', - condition: !(action === 'password' && adminPassword) - }, + } + ] + }, + { + type: 'section', + htmlClass: 'col-sm-4', + items: [ + { key: 'domain_id' }, { key: 'project', type: 'select', titleMap: [], condition: action === 'password' }, + { + key: 'confirm', + type: 'password-confirm', + title: gettext('Confirm Password'), + match: 'model.password', + condition: action === 'update' + } + ] + }, + { + type: 'section', + htmlClass: 'col-sm-4', + items: [ + { + key: 'name', + readonly: action === 'password' + }, { key: 'role', type: 'select', titleMap: [], condition: action === 'update' || action === 'password' }, + { + key: 'admin_password', + type: 'password', + condition: !(action === 'password' && adminPassword) + } + ] + }, + { + type: 'section', + htmlClass: 'col-sm-12', + items: [ { key: 'description', condition: action === 'password' @@ -172,13 +196,14 @@ var config = { schema: schema, form: form, - model: model + model: model, + size: 'md' }; keystone.getVersion().then(function (response) { var apiVersion = response.data.version; - var domainName = config.form[0].items[0].items[1]; - var domainId = config.form[0].items[0].items[2]; + var domainName = config.form[0].items[1].items[0]; + var domainId = config.form[0].items[2].items[0]; if (apiVersion !== "3") { domainName.condition = true; domainId.condition = true; @@ -191,13 +216,13 @@ return response.data; }); keystone.getProjects().then(function (response) { - var projectField = config.form[0].items[0].items[8]; + var projectField = config.form[0].items[2].items[1]; projectField.titleMap = response.data.items.map(function each(item) { return {value: item.id, name: item.name}; }); }); keystone.getRoles().then(function (response) { - var roleField = config.form[0].items[0].items[9]; + var roleField = config.form[0].items[3].items[1]; roleField.titleMap = response.data.items.map(function each(item) { return {value: item.id, name: item.name}; }); diff --git a/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/actions/workflow/workflow.spec.js b/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/actions/workflow/workflow.spec.js index 55b2b3655c..8ef37df542 100644 --- a/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/actions/workflow/workflow.spec.js +++ b/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/actions/workflow/workflow.spec.js @@ -56,16 +56,16 @@ it('should create workflow config for creation using Keystone V3', function() { var config = testInitWorkflow('3'); - expect(config.form[0].items[0].items[1].condition).not.toBeDefined(); - expect(config.form[0].items[0].items[2].condition).not.toBeDefined(); + expect(config.form[0].items[1].items[0].condition).not.toBeDefined(); + expect(config.form[0].items[2].items[0].condition).not.toBeDefined(); }); it('should create workflow config and the config does not show domain info ' + 'when use Keystone V2', function() { var config = testInitWorkflow('2'); - expect(config.form[0].items[0].items[1].condition).toBe(true); - expect(config.form[0].items[0].items[2].condition).toBe(true); + expect(config.form[0].items[1].items[0].condition).toBe(true); + expect(config.form[0].items[2].items[0].condition).toBe(true); }); }); })(); diff --git a/releasenotes/notes/bp-ng-users-01212620d644289f.yaml b/releasenotes/notes/bp-ng-users-01212620d644289f.yaml new file mode 100644 index 0000000000..cbf9f131b7 --- /dev/null +++ b/releasenotes/notes/bp-ng-users-01212620d644289f.yaml @@ -0,0 +1,19 @@ +--- +features: + - | + [`blueprint ng-users `_] + AngularJS-based Users panel is added. The features in the legacy + panel are almost implemented. The Users panel now may be configured + to use either the legacy or AngularJS-based codes. + The ANGULAR_FEATURES setting now allows for a `users_panel`. + If set to True, then the AngularJS-Based Users panel will be used, + while the Django version will be used if set to False. + Default value for users_panel is False, due to lack of extensional + buttons, i.e. for showing password and adding project, see also + [`bug/1733271 `_]. +issues: + - | + [`bug/1733271 `_] Users panel + has Angularized, but buttons showing passwords is not implemented, i.e. + for Password, Confirm Password and Admin password. Also, button adding + project for selection of Primary Project is not implemented.