From fb3aa968f7f97696ecc9084a616ee121f658f656 Mon Sep 17 00:00:00 2001 From: chouseknecht Date: Mon, 16 Sep 2013 11:54:19 -0400 Subject: [PATCH] AC-456 Moved project status badge to Update Status column. --- awx/ui/static/js/lists/Inventories.js | 1 + awx/ui/static/js/lists/Jobs.js | 1 + awx/ui/static/js/lists/Projects.js | 20 +++++++++---------- .../static/lib/ansible/generator-helpers.js | 3 ++- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/awx/ui/static/js/lists/Inventories.js b/awx/ui/static/js/lists/Inventories.js index f55812f71c..fa2308b632 100644 --- a/awx/ui/static/js/lists/Inventories.js +++ b/awx/ui/static/js/lists/Inventories.js @@ -55,6 +55,7 @@ angular.module('InventoriesListDefinition', []) dropdown: { type: 'DropDown', label: 'Jobs', + icon: 'icon-zoom-in', 'class': 'btn-xs', options: [ { ngClick: 'viewJobs(\{\{ inventory.id \}\})', label: 'All Jobs' }, diff --git a/awx/ui/static/js/lists/Jobs.js b/awx/ui/static/js/lists/Jobs.js index 8b6e913a49..9a284b51e4 100644 --- a/awx/ui/static/js/lists/Jobs.js +++ b/awx/ui/static/js/lists/Jobs.js @@ -97,6 +97,7 @@ angular.module('JobsListDefinition', []) dropdown: { type: 'DropDown', label: 'View', + icon: 'icon-zoom-in', 'class': 'btn-xs', options: [ { ngClick: "viewSummary(\{{ job.id \}\}, '\{\{ job.summary_fields.job_template.name \}\}')", label: 'Host Summary', diff --git a/awx/ui/static/js/lists/Projects.js b/awx/ui/static/js/lists/Projects.js index ca634abdb0..aa3d8e9771 100644 --- a/awx/ui/static/js/lists/Projects.js +++ b/awx/ui/static/js/lists/Projects.js @@ -23,25 +23,23 @@ angular.module('ProjectsListDefinition', []) name: { key: true, label: 'Name', - badgeIcon: "\{\{ 'icon-failures-' + project.badge \}\}", - badgePlacement: 'left', - badgeToolTip: "Indicates the project\'s health based on its status", - badgeTipPlacement: 'bottom' }, description: { label: 'Description', columnClass: 'hidden-sm hidden-xs', excludeModal: true }, - last_updated: { - label: 'Last Updated', - type: 'date' - }, status: { label: 'Update Status', ngClick: 'showSCMStatus(\{\{ project.id \}\})', awToolTip: 'View details of last SCM Update', - dataPlacement: 'bottom' + dataPlacement: 'bottom', + badgeIcon: "\{\{ 'icon-failures-' + project.badge \}\}", + badgePlacement: 'left' + }, + last_updated: { + label: 'Last Updated', + type: 'date' } }, @@ -88,7 +86,7 @@ angular.module('ProjectsListDefinition', []) ngClick: "editProject(\{\{ project.id \}\})", icon: 'icon-edit', "class": 'btn-xs btn-default', - awToolTip: 'View/edit project' + awToolTip: 'View/edit project properties' }, scm_update: { label: 'Update', @@ -102,7 +100,7 @@ angular.module('ProjectsListDefinition', []) ngClick: "deleteProject(\{\{ project.id \}\},'\{\{ project.name \}\}')", icon: 'icon-trash', "class": 'btn-xs btn-danger', - awToolTip: 'Delete project' + awToolTip: 'Permanently remove project from the database' } } }); diff --git a/awx/ui/static/lib/ansible/generator-helpers.js b/awx/ui/static/lib/ansible/generator-helpers.js index 9540dca5eb..7c45fac914 100644 --- a/awx/ui/static/lib/ansible/generator-helpers.js +++ b/awx/ui/static/lib/ansible/generator-helpers.js @@ -119,7 +119,7 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers']) if (params.type) { field = list[params.type][fld]; } - else { + else { field = list['fields'][fld]; } @@ -130,6 +130,7 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers']) html += "class=\"btn btn-default"; html += (field['class']) ? " " + field['class'] : " btn-xs"; html += " dropdown-toggle\" data-toggle=\"dropdown\">"; + html += (field.icon) ? Icon(field.icon) : ""; html += field.label; html += " \n"; html += "