From 46e5e078b6c8a00c1537b298b3bb0b49cde96c6f Mon Sep 17 00:00:00 2001 From: chris Houseknecht Date: Wed, 15 Jan 2014 02:14:29 -0500 Subject: [PATCH] AC-910 Fixed project status icons. AC-915 Fixed permission form. --- awx/ui/static/js/forms/Permissions.js | 17 +++++++++-------- awx/ui/static/js/helpers/Permissions.js | 6 +++--- awx/ui/static/js/lists/Projects.js | 2 +- awx/ui/static/less/ansible-ui.less | 14 ++++++++------ 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/awx/ui/static/js/forms/Permissions.js b/awx/ui/static/js/forms/Permissions.js index 93eeeb3181..cacdd1eb21 100644 --- a/awx/ui/static/js/forms/Permissions.js +++ b/awx/ui/static/js/forms/Permissions.js @@ -30,9 +30,12 @@ angular.module('PermissionFormDefinition', []) fields: { category: { - label: 'Permission Type', - type: 'radio', - options: [{ label: 'Inventory', value: 'Inventory' }, { label: 'Deployment', value: 'Deploy'}], + label: '* Permission Type', + type: 'radio_group', + options: [ + { label: 'Inventory', value: 'Inventory', selected: true }, + { label: 'Deployment', value: 'Deploy'} + ], ngChange: 'selectCategory()' }, name: { @@ -74,17 +77,15 @@ angular.module('PermissionFormDefinition', []) awRequiredWhen: {variable: "inventoryrequired", init: "true" } }, permission_type: { - label: 'Permission', - type: 'radio', + label: '* Permission', + type: 'radio_group', options: [ - {label: 'Admin', value: 'admin', ngShow: "category == 'Inventory'" }, {label: 'Read', value: 'read', ngShow: "category == 'Inventory'" }, {label: 'Write', value: 'write', ngShow: "category == 'Inventory'" }, + {label: 'Admin', value: 'admin', ngShow: "category == 'Inventory'" }, {label: 'Run', value: 'run', ngShow: "category == 'Deploy'" }, {label: 'Check', value: 'check', ngShow: "category == 'Deploy'" } ], - addRequired: true, - editRequired: true, helpCollapse: [{ hdr: 'Permission', ngBind: 'permissionTypeHelp' }] } }, diff --git a/awx/ui/static/js/helpers/Permissions.js b/awx/ui/static/js/helpers/Permissions.js index 2a5de84e83..8a8329d83b 100644 --- a/awx/ui/static/js/helpers/Permissions.js +++ b/awx/ui/static/js/helpers/Permissions.js @@ -18,12 +18,12 @@ angular.module('PermissionsHelper', []) scope.projectrequired = false; scope.permissionTypeHelp = "
\n" + - "
Admin
\n" + - "
Allow the user or team full access to the inventory. This includes reading, writing, deletion of the inventory and inventory sync operations.
\n" + "
Read
\n" + "
Only allow the user or team to view the inventory.
\n" + "
Write
\n" + "
Allow the user or team to modify hosts and groups contained in the inventory, add new hosts and groups, and perform inventory sync operations.\n" + + "
Admin
\n" + + "
Allow the user or team full access to the inventory. This includes reading, writing, deletion of the inventory and inventory sync operations.
\n" + "
\n"; } else { @@ -40,7 +40,7 @@ angular.module('PermissionsHelper', []) } if (reset) { - scope.permission_type = null; + scope.permission_type = (scope.category == 'Inventory') ? 'read' : 'run'; //default to the first option } } diff --git a/awx/ui/static/js/lists/Projects.js b/awx/ui/static/js/lists/Projects.js index 8039a0d5f4..937a4c4028 100644 --- a/awx/ui/static/js/lists/Projects.js +++ b/awx/ui/static/js/lists/Projects.js @@ -41,7 +41,7 @@ angular.module('ProjectsListDefinition', []) ngClick: 'showSCMStatus(\{\{ project.id \}\})', awToolTip: 'View details of last SCM Update', dataPlacement: 'top', - badgeIcon: "\{\{ 'icon-failures-' + project.badge \}\}", + badgeIcon: "\{\{ 'fa icon-failures-' + project.badge \}\}", badgePlacement: 'left', searchType: 'select', searchOptions: [], // will be set by Options call to projects resource diff --git a/awx/ui/static/less/ansible-ui.less b/awx/ui/static/less/ansible-ui.less index 1aedddaa98..6c166bf2e9 100644 --- a/awx/ui/static/less/ansible-ui.less +++ b/awx/ui/static/less/ansible-ui.less @@ -217,12 +217,14 @@ hr { } .collapsible-help { - dl { - margin-left: 15px; - } - dt { - margin-top: 15px; - } + margin-top: 20px; + margin-bottom: 20px; + dl { + margin-left: 15px; + } + dt { + margin-top: 15px; + } } th.actions-column,