From fbe1d64ed21f21d4308b72d81fd49f636f1dd7c2 Mon Sep 17 00:00:00 2001 From: Ken Hoes Date: Thu, 5 May 2016 11:09:49 -0400 Subject: [PATCH] Projects UI audit work --- awx/ui/client/legacy-styles/ansible-ui.less | 12 ++++++++++-- awx/ui/client/legacy-styles/forms.less | 9 ++++----- awx/ui/client/legacy-styles/lists.less | 2 +- .../access/addPermissions/addPermissions.block.less | 4 +++- awx/ui/client/src/controllers/Projects.js | 2 +- .../src/dashboard/hosts/dashboard-hosts.form.js | 2 +- awx/ui/client/src/forms/Groups.js | 8 ++++---- awx/ui/client/src/forms/Hosts.js | 4 ++-- awx/ui/client/src/forms/Inventories.js | 2 +- awx/ui/client/src/forms/JobTemplates.js | 2 +- awx/ui/client/src/forms/Projects.js | 2 +- awx/ui/client/src/helpers/JobSubmission.js | 2 +- awx/ui/client/src/scheduler/schedulertime.block.less | 1 - 13 files changed, 30 insertions(+), 22 deletions(-) diff --git a/awx/ui/client/legacy-styles/ansible-ui.less b/awx/ui/client/legacy-styles/ansible-ui.less index b52236ba6a..221d36f043 100644 --- a/awx/ui/client/legacy-styles/ansible-ui.less +++ b/awx/ui/client/legacy-styles/ansible-ui.less @@ -410,11 +410,20 @@ textarea.allowresize { .popover-title { padding-top: 5px; padding-bottom: 5px; + background-color: @default-interface-txt; + color: @default-bg; + font-weight: 600; + border-bottom: none; } .popover { z-index: 2000; min-width: 200px; max-width: 325px; + background-color: @default-interface-txt; + color: @default-bg; //white + } + .popover.right>.arrow:after { + border-right-color: @default-interface-txt; } .popover pre { white-space: pre-wrap; @@ -568,7 +577,7 @@ dd { .help-link:hover, .ui-widget-content a.help-link:hover { - color: @black; + color: @default-icon; text-decoration: none; } @@ -2042,7 +2051,6 @@ tr td button i { box-shadow: none !important; } - .error { opacity: 1; transition: opacity 0.2s; diff --git a/awx/ui/client/legacy-styles/forms.less b/awx/ui/client/legacy-styles/forms.less index f298483741..c4e27dd427 100644 --- a/awx/ui/client/legacy-styles/forms.less +++ b/awx/ui/client/legacy-styles/forms.less @@ -162,13 +162,12 @@ .Form-subForm { width: 100%; border-left: 5px solid @default-border; - margin-left: -20px; padding-left: 15px; margin-bottom: 15px; - - .Form-formGroup { - float: left; - } + display: flex; + flex-wrap: wrap; + flex-direction: row; + justify-content: space-between; } .Form-subForm--title { diff --git a/awx/ui/client/legacy-styles/lists.less b/awx/ui/client/legacy-styles/lists.less index 93e5c62656..f308d1fd04 100644 --- a/awx/ui/client/legacy-styles/lists.less +++ b/awx/ui/client/legacy-styles/lists.less @@ -75,7 +75,7 @@ table, tbody { } .List-tableCell { - padding-left: 15px; + padding-left: 20px; padding-right: 15px; border-top:0px!important; } diff --git a/awx/ui/client/src/access/addPermissions/addPermissions.block.less b/awx/ui/client/src/access/addPermissions/addPermissions.block.less index 7dd95a32d3..8aae7351d6 100644 --- a/awx/ui/client/src/access/addPermissions/addPermissions.block.less +++ b/awx/ui/client/src/access/addPermissions/addPermissions.block.less @@ -90,8 +90,10 @@ font-weight: bold; border-radius: 50%; background-color: @default-list-header-bg; - padding: 2px 8px; + padding: 1px 8px; margin-right: 10px; + width: 23px; + height: 23px; } .AddPermissions-separator { diff --git a/awx/ui/client/src/controllers/Projects.js b/awx/ui/client/src/controllers/Projects.js index c7ca0d1ab4..033328f838 100644 --- a/awx/ui/client/src/controllers/Projects.js +++ b/awx/ui/client/src/controllers/Projects.js @@ -479,7 +479,7 @@ export function ProjectsAdd(Refresh, $scope, $rootScope, $compile, $location, $l url: $scope.current_url }); - $state.go("^"); + $state.go('projects.edit', {id: data.id}, {reload: true}); }) .error(function (data, status) { Wait('stop'); diff --git a/awx/ui/client/src/dashboard/hosts/dashboard-hosts.form.js b/awx/ui/client/src/dashboard/hosts/dashboard-hosts.form.js index 2ae47e1046..99e5ab7683 100644 --- a/awx/ui/client/src/dashboard/hosts/dashboard-hosts.form.js +++ b/awx/ui/client/src/dashboard/hosts/dashboard-hosts.form.js @@ -57,7 +57,7 @@ export default function(){ default: '---', awPopOver: "

Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.

" + "JSON:
\n" + - "
{
\"somevar\": \"somevalue\",
\"password\": \"magic\"
}
\n" + + "
{
 \"somevar\": \"somevalue\",
 \"password\": \"magic\"
}
\n" + "YAML:
\n" + "
---
somevar: somevalue
password: magic
\n" + '

View JSON examples at www.json.org

' + diff --git a/awx/ui/client/src/forms/Groups.js b/awx/ui/client/src/forms/Groups.js index 3b8940de66..a2a88ae6d8 100644 --- a/awx/ui/client/src/forms/Groups.js +++ b/awx/ui/client/src/forms/Groups.js @@ -49,7 +49,7 @@ export default "

Enter variables using either JSON or YAML syntax. Use the " + "radio button to toggle between the two.

" + "JSON:
\n" + - "
{
\"somevar\": \"somevalue\",
\"password\": \"magic\"
}
\n" + + "
{
  \"somevar\": \"somevalue\",
 \"password\": \"magic\"
}
\n" + "YAML:
\n" + "
---
somevar: somevalue
password: magic
\n" + '

View JSON examples at www.json.org

' + @@ -171,7 +171,7 @@ export default dataPlacement: 'right', awPopOver: "

Provide key/value pairs using either YAML or JSON.

" + "JSON:
\n" + - "
{
\"somevar\": \"somevalue\",
\"password\": \"magic\"
}
\n" + + "
{
 \"somevar\": \"somevalue\",
 \"password\": \"magic\"
}
\n" + "YAML:
\n" + "
---
somevar: somevalue
password: magic
\n", dataContainer: 'body' @@ -193,7 +193,7 @@ export default "view ec2.ini in the Ansible github repo.

" + "

Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.

" + "JSON:
\n" + - "
{
\"somevar\": \"somevalue\",
\"password\": \"magic\"
}
\n" + + "
{
 \"somevar\": \"somevalue\",
 \"password\": \"magic\"
}
\n" + "YAML:
\n" + "
---
somevar: somevalue
password: magic
\n" + '

View JSON examples at www.json.org

' + @@ -219,7 +219,7 @@ export default "view vmware.ini in the Ansible github repo.

" + "

Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.

" + "JSON:
\n" + - "
{
\"somevar\": \"somevalue\",
\"password\": \"magic\"
}
\n" + + "
{
 \"somevar\": \"somevalue\",
 \"password\": \"magic\"
}
\n" + "YAML:
\n" + "
---
somevar: somevalue
password: magic
\n" + '

View JSON examples at www.json.org

' + diff --git a/awx/ui/client/src/forms/Hosts.js b/awx/ui/client/src/forms/Hosts.js index 0efc38c4b6..c7a63c5a1f 100644 --- a/awx/ui/client/src/forms/Hosts.js +++ b/awx/ui/client/src/forms/Hosts.js @@ -64,7 +64,7 @@ export default "default": "---", awPopOver: "

Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.

" + "JSON:
\n" + - "
{
\"somevar\": \"somevalue\",
\"password\": \"magic\"
}
\n" + + "
{
 \"somevar\": \"somevalue\",
 \"password\": \"magic\"
}
\n" + "YAML:
\n" + "
---
somevar: somevalue
password: magic
\n" + '

View JSON examples at www.json.org

' + @@ -87,7 +87,7 @@ export default }, cancel: { ngClick: 'formCancel()', - ngDisabled: true + ngDisabled: true } }, diff --git a/awx/ui/client/src/forms/Inventories.js b/awx/ui/client/src/forms/Inventories.js index 20ee5db148..e1ee63a3d3 100644 --- a/awx/ui/client/src/forms/Inventories.js +++ b/awx/ui/client/src/forms/Inventories.js @@ -55,7 +55,7 @@ export default "default": "---", awPopOver: "

Enter inventory variables using either JSON or YAML syntax. Use the radio button to toggle between the two.

" + "JSON:
\n" + - "
{
\"somevar\": \"somevalue\",
\"password\": \"magic\"
}
\n" + + "
{
 \"somevar\": \"somevalue\",
 \"password\": \"magic\"
}
\n" + "YAML:
\n" + "
---
somevar: somevalue
password: magic
\n" + '

View JSON examples at www.json.org

' + diff --git a/awx/ui/client/src/forms/JobTemplates.js b/awx/ui/client/src/forms/JobTemplates.js index 9185d73e90..fd3afd5b52 100644 --- a/awx/ui/client/src/forms/JobTemplates.js +++ b/awx/ui/client/src/forms/JobTemplates.js @@ -248,7 +248,7 @@ export default awPopOver: "

Pass extra command line variables to the playbook. This is the -e or --extra-vars command line parameter " + "for ansible-playbook. Provide key/value pairs using either YAML or JSON.

" + "JSON:
\n" + - "
{
\"somevar\": \"somevalue\",
\"password\": \"magic\"
}
\n" + + "
{
 \"somevar\": \"somevalue\",
 \"password\": \"magic\"
}
\n" + "YAML:
\n" + "
---
somevar: somevalue
password: magic
\n", dataTitle: 'Extra Variables', diff --git a/awx/ui/client/src/forms/Projects.js b/awx/ui/client/src/forms/Projects.js index cf75609b1a..c6f814f253 100644 --- a/awx/ui/client/src/forms/Projects.js +++ b/awx/ui/client/src/forms/Projects.js @@ -206,7 +206,7 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition']) type: 'number', integer: true, min: 0, - ngShow: "scm_update_on_launch", + ngShow: "scm_update_on_launch && projectSelected", spinner: true, "default": '0', addRequired: false, diff --git a/awx/ui/client/src/helpers/JobSubmission.js b/awx/ui/client/src/helpers/JobSubmission.js index 82dd577869..f185231c40 100644 --- a/awx/ui/client/src/helpers/JobSubmission.js +++ b/awx/ui/client/src/helpers/JobSubmission.js @@ -496,7 +496,7 @@ function($compile, Rest, GetBasePath, TextareaResize,CreateDialog, GenerateForm, "

Extra variables are passed as command line variables to the playbook run. It is equivalent to the -e or --extra-vars " + "command line parameter for ansible-playbook. Provide key/value pairs using either YAML or JSON.

" + "JSON:
\n" + - "
{
\"somevar\": \"somevalue\",
\"password\": \"magic\"
}
\n" + + "
{
 \"somevar\": \"somevalue\",
 \"password\": \"magic\"
}
\n" + "YAML:
\n" + "
---
somevar: somevalue
password: magic
\n"; diff --git a/awx/ui/client/src/scheduler/schedulertime.block.less b/awx/ui/client/src/scheduler/schedulertime.block.less index a40c018249..1557d37a74 100644 --- a/awx/ui/client/src/scheduler/schedulertime.block.less +++ b/awx/ui/client/src/scheduler/schedulertime.block.less @@ -10,7 +10,6 @@ span.ui-spinner.ui-widget.ui-widget-content.ui-corner-all { flex: 1; - width: 100%; } .SchedulerTime-separator {