diff --git a/awx/ui/client/legacy-styles/lists.less b/awx/ui/client/legacy-styles/lists.less index 1a33812e6f..8361dc2fed 100644 --- a/awx/ui/client/legacy-styles/lists.less +++ b/awx/ui/client/legacy-styles/lists.less @@ -130,6 +130,7 @@ table, tbody { .List-header { display: flex; + height: 34px; } .List-title { @@ -231,3 +232,15 @@ table, tbody { background-color: @list-srch-btn-hov-bg; color: @list-srch-btn-icon; } + +.List-noItems { + display: flex; + align-items: center; + justify-content: center; + width: 100%; + height: 200px; + border-radius: 5px; + border: 1px solid @list-no-items-bord; + background-color: @list-no-items-bg; + color: @list-no-items-txt; +} diff --git a/awx/ui/client/src/helpers/search.js b/awx/ui/client/src/helpers/search.js index 1f736e4589..5f42d8d27a 100644 --- a/awx/ui/client/src/helpers/search.js +++ b/awx/ui/client/src/helpers/search.js @@ -3,7 +3,7 @@ * * All Rights Reserved *************************************************/ - + /** * @ngdoc function * @name helpers.function:search @@ -499,6 +499,14 @@ export default if (load) { scope[set] = []; //clear the list array to make sure 'Loading' is the only thing visible on the list } + + if(scope[iterator + 'SearchValue' + modifier] && scope[iterator + 'SearchValue' + modifier] != '') { + scope[iterator + '_active_search'] = true; + } + else { + scope[iterator + '_active_search'] = false; + } + scope.$emit('prepareSearch', iterator, page, load, calcOnly, deferWaitStop, spinner); }; diff --git a/awx/ui/client/src/inventory-scripts/inventory-scripts.list.js b/awx/ui/client/src/inventory-scripts/inventory-scripts.list.js index 2be8de8f86..98f2576054 100644 --- a/awx/ui/client/src/inventory-scripts/inventory-scripts.list.js +++ b/awx/ui/client/src/inventory-scripts/inventory-scripts.list.js @@ -47,6 +47,9 @@ export default function(){ }, fieldActions: { + + columnClass: 'col-md-2 col-sm-3 col-xs-3', + edit: { ngClick: "editCustomInv(inventory_script.id)", icon: 'fa-edit', diff --git a/awx/ui/client/src/lists/AllJobs.js b/awx/ui/client/src/lists/AllJobs.js index a673b569e6..518f1baf34 100644 --- a/awx/ui/client/src/lists/AllJobs.js +++ b/awx/ui/client/src/lists/AllJobs.js @@ -3,7 +3,7 @@ * * All Rights Reserved *************************************************/ - + export default angular.module('AllJobsDefinition', ['sanitizeFilter', 'capitalizeFilter']) @@ -85,6 +85,9 @@ export default actions: { }, fieldActions: { + + columnClass: 'col-lg-2 col-md-3 col-sm-4 col-xs-4', + submit: { icon: 'icon-rocket', mode: 'all', diff --git a/awx/ui/client/src/lists/Credentials.js b/awx/ui/client/src/lists/Credentials.js index e2ce931bb4..3b780e7e11 100644 --- a/awx/ui/client/src/lists/Credentials.js +++ b/awx/ui/client/src/lists/Credentials.js @@ -54,6 +54,9 @@ export default }, fieldActions: { + + columnClass: 'col-md-3 col-sm-3 col-xs-3', + edit: { ngClick: "editCredential(credential.id)", icon: 'fa-edit', diff --git a/awx/ui/client/src/lists/Inventories.js b/awx/ui/client/src/lists/Inventories.js index a9c6678fbc..25770b8a01 100644 --- a/awx/ui/client/src/lists/Inventories.js +++ b/awx/ui/client/src/lists/Inventories.js @@ -91,6 +91,9 @@ export default }, fieldActions: { + + columnClass: 'col-md-2 col-sm-4 col-xs-4', + edit: { label: 'Edit', ngClick: 'editInventory(inventory.id)', //'editInventoryProperties(inventory.id)', diff --git a/awx/ui/client/src/lists/JobTemplates.js b/awx/ui/client/src/lists/JobTemplates.js index 5b49911541..14f7d6c933 100644 --- a/awx/ui/client/src/lists/JobTemplates.js +++ b/awx/ui/client/src/lists/JobTemplates.js @@ -23,15 +23,15 @@ export default name: { key: true, label: 'Name', - // columnClass: 'col-lg-5 col-md-5 col-sm-9 col-xs-8' + columnClass: 'col-lg-4 col-md-5 col-sm-6 col-xs-6' }, description: { label: 'Description', - // columnClass: 'col-lg-4 col-md-3 hidden-sm hidden-xs' + columnClass: 'col-lg-3 col-md-3 hidden-sm hidden-xs' }, smart_status: { label: 'Status', - columnClass: 'List-tableCell col-lg-1 col-md-2 col-sm-2 col-xs-4', + columnClass: 'List-tableCell col-lg-3 col-md-2 col-sm-3 col-xs-3', searchable: false, nosort: true, ngInclude: "'/static/partials/job-template-smart-status.html'", @@ -52,6 +52,9 @@ export default }, fieldActions: { + + columnClass: 'col-lg-2 col-md-2 col-sm-3 col-xs-3', + submit: { label: 'Launch', mode: 'all', diff --git a/awx/ui/client/src/lists/Teams.js b/awx/ui/client/src/lists/Teams.js index 284af44993..5f12b07b53 100644 --- a/awx/ui/client/src/lists/Teams.js +++ b/awx/ui/client/src/lists/Teams.js @@ -52,6 +52,9 @@ export default }, fieldActions: { + + columnClass: 'col-lg-3 col-md-2 col-sm-3 col-xs-3', + edit: { label: 'Edit', ngClick: "editTeam(team.id)", diff --git a/awx/ui/client/src/lists/Users.js b/awx/ui/client/src/lists/Users.js index 922d0bf3d5..5d86704db4 100644 --- a/awx/ui/client/src/lists/Users.js +++ b/awx/ui/client/src/lists/Users.js @@ -49,6 +49,9 @@ export default }, fieldActions: { + + columnClass: 'col-md-3 col-sm-3 col-xs-3', + edit: { label: 'Edit', ngClick: "editUser(user.id)", diff --git a/awx/ui/client/src/shared/branding/colors.default.less b/awx/ui/client/src/shared/branding/colors.default.less index 1e5d560d29..191c622e5c 100644 --- a/awx/ui/client/src/shared/branding/colors.default.less +++ b/awx/ui/client/src/shared/branding/colors.default.less @@ -62,6 +62,9 @@ @list-srch-btn-icon: @default-icon; @list-srch-btn-bg: @default-bg; @list-srch-btn-hov-bg: @default-tertiary-bg; +@list-no-items-txt: @default-icon; +@list-no-items-bord: #F6F6F6; +@list-no-items-bg: @default-secondary-bg; // tooltups @tooltip-bg: @default-interface-txt; diff --git a/awx/ui/client/src/shared/list-generator/list-generator.factory.js b/awx/ui/client/src/shared/list-generator/list-generator.factory.js index 875e0d9e3e..08bc157bab 100644 --- a/awx/ui/client/src/shared/list-generator/list-generator.factory.js +++ b/awx/ui/client/src/shared/list-generator/list-generator.factory.js @@ -341,8 +341,12 @@ export default ['$location', '$compile', '$rootScope', 'SearchWidget', 'Paginate html += "
\n"; } + // Show the "no items" box when loading is done and the user isn't actively searching and there are no results + html += "
PLEASE ADD ITEMS TO THIS LIST
"; + if (options.showSearch=== undefined || options.showSearch === true) { - html += "
\n"; + // Only show the search bar if we are loading results or if we have at least 1 base result + html += "
0)\">\n"; if (options.searchSize) { html += SearchWidget({ iterator: list.iterator, @@ -373,6 +377,11 @@ export default ['$location', '$compile', '$rootScope', 'SearchWidget', 'Paginate }); } html += "
\n"; + + // Message for when a search returns no results. This should only get shown after a search is executed with no results. + html += "
\n"; + html += "
No records matched your search.
\n"; + html += "
\n"; } // Add a title and optionally a close button (used on Inventory->Groups) @@ -383,7 +392,7 @@ export default ['$location', '$compile', '$rootScope', 'SearchWidget', 'Paginate } // table header row - html += "
0)\""; html += (list.awCustomScroll) ? " aw-custom-scroll " : ""; html += ">\n"; @@ -520,11 +529,6 @@ export default ['$location', '$compile', '$rootScope', 'SearchWidget', 'Paginate } innerTable += "\n"; - // Message for when a collection is empty - innerTable += "\n"; - innerTable += "
No records matched your search.
\n"; - innerTable += "\n"; - // Message for loading innerTable += "\n"; innerTable += "
Loading...
\n";