From a23f8fb21e4a5497e619b6d4513c3950607b018c Mon Sep 17 00:00:00 2001 From: Marliana Lara Date: Mon, 24 Jul 2017 16:14:02 -0400 Subject: [PATCH] UX Hit List: Inventories, Empty Lists, Lookup Buttons --- awx/ui/client/legacy-styles/ansible-ui.less | 1 - awx/ui/client/legacy-styles/forms.less | 1 - awx/ui/client/legacy-styles/jobs.less | 4 ++++ awx/ui/client/src/inventories-hosts/hosts/host.form.js | 5 ----- .../inventories/inventories.block.less | 9 +++++++++ .../related/completed-jobs/completed-jobs.list.js | 2 +- .../related/nested-hosts/group-nested-hosts.form.js | 5 ----- .../src/inventories-hosts/inventory-hosts.block.less | 10 ++++++++++ .../client/src/organizations/organizations.block.less | 5 +++++ awx/ui/client/src/shared/form-generator.js | 8 -------- 10 files changed, 29 insertions(+), 21 deletions(-) create mode 100644 awx/ui/client/src/inventories-hosts/inventory-hosts.block.less create mode 100644 awx/ui/client/src/organizations/organizations.block.less diff --git a/awx/ui/client/legacy-styles/ansible-ui.less b/awx/ui/client/legacy-styles/ansible-ui.less index 2af0228646..2f750ffef5 100644 --- a/awx/ui/client/legacy-styles/ansible-ui.less +++ b/awx/ui/client/legacy-styles/ansible-ui.less @@ -728,7 +728,6 @@ dd { } .error { - margin-top: 5px; font-size: 12px; line-height: normal; color: @red; diff --git a/awx/ui/client/legacy-styles/forms.less b/awx/ui/client/legacy-styles/forms.less index 87d376779d..befb8d760a 100644 --- a/awx/ui/client/legacy-styles/forms.less +++ b/awx/ui/client/legacy-styles/forms.less @@ -464,7 +464,6 @@ .Form-lookupButton:hover { cursor: pointer; background-color: @field-lookup-btn-hov-bg; - border: 1px solid @field-border; color: @default-interface-txt; } diff --git a/awx/ui/client/legacy-styles/jobs.less b/awx/ui/client/legacy-styles/jobs.less index 86e14926e1..7f7c805eaa 100644 --- a/awx/ui/client/legacy-styles/jobs.less +++ b/awx/ui/client/legacy-styles/jobs.less @@ -59,6 +59,10 @@ background-color: @white; } + .List-noItems { + margin-top: 0; + } + } @media (min-width: 1201px) { diff --git a/awx/ui/client/src/inventories-hosts/hosts/host.form.js b/awx/ui/client/src/inventories-hosts/hosts/host.form.js index 3fbf7aeb86..d64145be5d 100644 --- a/awx/ui/client/src/inventories-hosts/hosts/host.form.js +++ b/awx/ui/client/src/inventories-hosts/hosts/host.form.js @@ -79,11 +79,6 @@ function(i18n) { dataTitle: i18n._('Host Variables'), dataPlacement: 'right', dataContainer: 'body' - }, - inventory: { - type: 'hidden', - includeOnEdit: true, - includeOnAdd: true } }, diff --git a/awx/ui/client/src/inventories-hosts/inventories/inventories.block.less b/awx/ui/client/src/inventories-hosts/inventories/inventories.block.less index 91727c2e7d..0121cae5a9 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/inventories.block.less +++ b/awx/ui/client/src/inventories-hosts/inventories/inventories.block.less @@ -1,3 +1,12 @@ .Inventories-hostStatus { margin-left: 5px; } +#inventories-panel { + .completed_jobsList.List-well { + margin: 0; + + .List-noItems { + margin: 0; + } + } +} \ No newline at end of file diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/completed-jobs/completed-jobs.list.js b/awx/ui/client/src/inventories-hosts/inventories/related/completed-jobs/completed-jobs.list.js index f8c90fa6f9..c0987adc2b 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/completed-jobs/completed-jobs.list.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/completed-jobs/completed-jobs.list.js @@ -19,7 +19,7 @@ export default ['i18n', function(i18n) { editTitle: i18n._('COMPLETED JOBS'), index: false, hover: true, - well: false, + well: true, emptyListText: i18n._('No completed jobs'), fields: { diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-hosts/group-nested-hosts.form.js b/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-hosts/group-nested-hosts.form.js index ebec902f5a..df84c40e33 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-hosts/group-nested-hosts.form.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-hosts/group-nested-hosts.form.js @@ -79,11 +79,6 @@ function(i18n) { dataTitle: i18n._('Host Variables'), dataPlacement: 'right', dataContainer: 'body' - }, - inventory: { - type: 'hidden', - includeOnEdit: true, - includeOnAdd: true } }, diff --git a/awx/ui/client/src/inventories-hosts/inventory-hosts.block.less b/awx/ui/client/src/inventories-hosts/inventory-hosts.block.less new file mode 100644 index 0000000000..e4663663fb --- /dev/null +++ b/awx/ui/client/src/inventories-hosts/inventory-hosts.block.less @@ -0,0 +1,10 @@ +#hosts-panel { + .List-noItems { + margin-top: 0px; + } + .groupsList { + .List-noItems { + margin-top: 52px; + } + } +} \ No newline at end of file diff --git a/awx/ui/client/src/organizations/organizations.block.less b/awx/ui/client/src/organizations/organizations.block.less new file mode 100644 index 0000000000..9075f485ca --- /dev/null +++ b/awx/ui/client/src/organizations/organizations.block.less @@ -0,0 +1,5 @@ +#organizations { + .List-noItems { + margin-top: 20px; + } +} \ No newline at end of file diff --git a/awx/ui/client/src/shared/form-generator.js b/awx/ui/client/src/shared/form-generator.js index 91e704d401..fd4f16c45f 100644 --- a/awx/ui/client/src/shared/form-generator.js +++ b/awx/ui/client/src/shared/form-generator.js @@ -740,18 +740,10 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat html += "\n"; } - if (field.type === 'hidden') { - if ((options.mode === 'edit' && field.includeOnEdit) || - (options.mode === 'add' && field.includeOnAdd)) { - html += ""; - } - } - if ((!field.readonly) || (field.readonly && options.mode === 'edit')) { if((field.excludeMode === undefined || field.excludeMode !== options.mode) && field.type !== 'alertblock' && field.type !== 'workflow-chart') { - html += "