mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 15:21:13 +03:00
fix blank search filters on /#/portal & extend search/filter module to accept config line searchSize
. Resolves #1527
This commit is contained in:
parent
6150addc2e
commit
83e976037c
@ -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: {
|
||||
|
@ -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',
|
||||
|
@ -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({
|
||||
@ -54,6 +53,7 @@ export function PortalModeJobsController($scope, $state, $rootScope, GetBasePath
|
||||
};
|
||||
|
||||
init();
|
||||
console.log($scope)
|
||||
}
|
||||
|
||||
PortalModeJobsController.$inject = ['$scope', '$state', '$rootScope', 'GetBasePath', 'generateList', 'PortalJobsList', 'SearchInit',
|
||||
|
@ -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) {
|
||||
|
@ -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()"
|
||||
|
Loading…
Reference in New Issue
Block a user