Fix layout of dialogs for Angularized users panel

The text inputs on creation dialog for Angularized users panel
is too wide. The dialogs should be rearranged with proper size of
each property.
This patch fixes layout of dialogs for user action dialogs.
Also, add release notes for Angularized users panel.

Change-Id: I68254b50fa3db4e8bb115e8e5e467d166badcb6a
Partial-Implements: blueprint ng-users
This commit is contained in:
Shu Muto 2018-01-19 14:40:40 +09:00
parent 0cf4937d91
commit 535ecad926
3 changed files with 72 additions and 28 deletions

View File

@ -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};
});

View File

@ -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);
});
});
})();

View File

@ -0,0 +1,19 @@
---
features:
- |
[`blueprint ng-users <https://blueprints.launchpad.net/horizon/+spec/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 <https://bugs.launchpad.net/horizon/1744271>`_].
issues:
- |
[`bug/1733271 <https://bugs.launchpad.net/horizon/1744271>`_] 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.