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:
@@ -113,13 +113,14 @@
|
|||||||
{
|
{
|
||||||
type: 'template',
|
type: 'template',
|
||||||
templateUrl: basePath + "actions/workflow/info." + action + ".help.html"
|
templateUrl: basePath + "actions/workflow/info." + action + ".help.html"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{ key: 'domain_name' },
|
|
||||||
{ key: 'domain_id' },
|
|
||||||
{
|
{
|
||||||
key: 'name',
|
type: 'section',
|
||||||
readonly: action === 'password'
|
htmlClass: 'col-sm-4',
|
||||||
},
|
items: [
|
||||||
|
{ key: 'domain_name' },
|
||||||
{
|
{
|
||||||
key: 'email',
|
key: 'email',
|
||||||
condition: action === 'password'
|
condition: action === 'password'
|
||||||
@@ -128,31 +129,54 @@
|
|||||||
key: 'password',
|
key: 'password',
|
||||||
type: 'password',
|
type: 'password',
|
||||||
condition: action === 'update'
|
condition: action === 'update'
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'confirm',
|
type: 'section',
|
||||||
type: 'password-confirm',
|
htmlClass: 'col-sm-4',
|
||||||
title: 'Confirm Password',
|
items: [
|
||||||
match: 'model.password',
|
{ key: 'domain_id' },
|
||||||
condition: action === 'update'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'admin_password',
|
|
||||||
type: 'password',
|
|
||||||
condition: !(action === 'password' && adminPassword)
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
key: 'project',
|
key: 'project',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
titleMap: [],
|
titleMap: [],
|
||||||
condition: action === 'password'
|
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',
|
key: 'role',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
titleMap: [],
|
titleMap: [],
|
||||||
condition: action === 'update' || action === 'password'
|
condition: action === 'update' || action === 'password'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: 'admin_password',
|
||||||
|
type: 'password',
|
||||||
|
condition: !(action === 'password' && adminPassword)
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'section',
|
||||||
|
htmlClass: 'col-sm-12',
|
||||||
|
items: [
|
||||||
{
|
{
|
||||||
key: 'description',
|
key: 'description',
|
||||||
condition: action === 'password'
|
condition: action === 'password'
|
||||||
@@ -172,13 +196,14 @@
|
|||||||
var config = {
|
var config = {
|
||||||
schema: schema,
|
schema: schema,
|
||||||
form: form,
|
form: form,
|
||||||
model: model
|
model: model,
|
||||||
|
size: 'md'
|
||||||
};
|
};
|
||||||
|
|
||||||
keystone.getVersion().then(function (response) {
|
keystone.getVersion().then(function (response) {
|
||||||
var apiVersion = response.data.version;
|
var apiVersion = response.data.version;
|
||||||
var domainName = config.form[0].items[0].items[1];
|
var domainName = config.form[0].items[1].items[0];
|
||||||
var domainId = config.form[0].items[0].items[2];
|
var domainId = config.form[0].items[2].items[0];
|
||||||
if (apiVersion !== "3") {
|
if (apiVersion !== "3") {
|
||||||
domainName.condition = true;
|
domainName.condition = true;
|
||||||
domainId.condition = true;
|
domainId.condition = true;
|
||||||
@@ -191,13 +216,13 @@
|
|||||||
return response.data;
|
return response.data;
|
||||||
});
|
});
|
||||||
keystone.getProjects().then(function (response) {
|
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) {
|
projectField.titleMap = response.data.items.map(function each(item) {
|
||||||
return {value: item.id, name: item.name};
|
return {value: item.id, name: item.name};
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
keystone.getRoles().then(function (response) {
|
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) {
|
roleField.titleMap = response.data.items.map(function each(item) {
|
||||||
return {value: item.id, name: item.name};
|
return {value: item.id, name: item.name};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -56,16 +56,16 @@
|
|||||||
it('should create workflow config for creation using Keystone V3', function() {
|
it('should create workflow config for creation using Keystone V3', function() {
|
||||||
var config = testInitWorkflow('3');
|
var config = testInitWorkflow('3');
|
||||||
|
|
||||||
expect(config.form[0].items[0].items[1].condition).not.toBeDefined();
|
expect(config.form[0].items[1].items[0].condition).not.toBeDefined();
|
||||||
expect(config.form[0].items[0].items[2].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 ' +
|
it('should create workflow config and the config does not show domain info ' +
|
||||||
'when use Keystone V2', function() {
|
'when use Keystone V2', function() {
|
||||||
var config = testInitWorkflow('2');
|
var config = testInitWorkflow('2');
|
||||||
|
|
||||||
expect(config.form[0].items[0].items[1].condition).toBe(true);
|
expect(config.form[0].items[1].items[0].condition).toBe(true);
|
||||||
expect(config.form[0].items[0].items[2].condition).toBe(true);
|
expect(config.form[0].items[2].items[0].condition).toBe(true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|||||||
19
releasenotes/notes/bp-ng-users-01212620d644289f.yaml
Normal file
19
releasenotes/notes/bp-ng-users-01212620d644289f.yaml
Normal 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.
|
||||||
Reference in New Issue
Block a user