1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 15:21:13 +03:00

Merge pull request #1538 from leigh-johnson/PortalModeSearch

Fix blank search filters on /#/portal & extend search/filter with config lines for sizing
This commit is contained in:
Leigh 2016-04-14 14:14:41 -04:00
commit 2621ea196d
5 changed files with 8 additions and 23 deletions

View File

@ -11,14 +11,12 @@ export default
name: 'job_templates',
iterator: 'job_template',
// selectTitle: 'Add Job Template',
editTitle: 'Job Templates',
listTitle: 'Job Templates',
// selectInstructions: "Click on a row to select it, and click Finished when done. Use the <i class=\"icon-plus\"></i> " +
// "button to create a new job template.",
index: false,
hover: true,
well: true,
searchSize: 'col-lg-8 col-md-8 col-sm-12 col-xs-12',
fields: {
name: {

View File

@ -16,6 +16,7 @@ export default
hover: true,
well: true,
listTitle: 'Jobs',
searchSize: 'col-lg-8 col-md-8 col-sm-12 col-xs-12',
fields: {
status: {
@ -27,23 +28,9 @@ export default
searchable: true,
nosort: true,
searchType: 'select',
searchOptions: [
{ name: "Success", value: "successful" },
{ name: "Error", value: "error" },
{ name: "Failed", value: "failed" },
{ name: "Canceled", value: "canceled" }
]
searchOptions: [],
searchLabel: 'Status'
},
/*
id: {
label: 'ID',
key: true,
noLink: true, //undocumented: 'key' above will automatically made the fields a link, but 'noLink' will override this setting
desc: true,
searchType: 'int',
columnClass: 'col-xs-2 List-staticColumnAdjacent',
},
*/
name: {
key: true,
label: 'Name',

View File

@ -21,7 +21,6 @@ export function PortalModeJobsController($scope, $state, $rootScope, GetBasePath
id: 'portal-jobs',
mode: 'edit',
scope: $scope,
searchSize: 'col-md-10 col-xs-12'
});
SearchInit({

View File

@ -2,7 +2,8 @@ export default ['$scope', 'Refresh', 'tagSearchService',
function($scope, Refresh, tagSearchService) {
// JSONify passed field elements that can be searched
$scope.list = JSON.parse($scope.list);
// Access config lines from list spec
$scope.listConfig = $scope.$parent.list;
// Grab options for the left-dropdown of the searchbar
tagSearchService.getSearchTypes($scope.list, $scope.endpoint)
.then(function(searchTypes) {

View File

@ -1,5 +1,5 @@
<div class="TagSearch row">
<div class="col-lg-4 col-md-8 col-sm-12 col-xs-12">
<div ng-class="listConfig.searchSize || 'col-lg-4 col-md-8 col-sm-12 col-xs-12'">
<div class="TagSearch-bar">
<div class="TagSearch-typeDropdown"
ng-click="toggleTypeDropdown()"