mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-5551: Pass search 'name' field to listConfigurations UI
Passes search bar value (by 'name') for the settings in the following sections' detail views: -Account -Primary storage -Cluster -Zone
This commit is contained in:
parent
9947e688c4
commit
932758e2ef
|
|
@ -851,15 +851,10 @@
|
|||
dataProvider: function(args) {
|
||||
$.ajax({
|
||||
url: createURL('listConfigurations&accountid=' + args.context.accounts[0].id),
|
||||
data: {
|
||||
page: args.page,
|
||||
pageSize: pageSize,
|
||||
listAll: true
|
||||
},
|
||||
data: listViewDataProvider(args, {}, { searchBy: 'name' }),
|
||||
success: function(json) {
|
||||
args.response.success({
|
||||
data: json.listconfigurationsresponse.configuration
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1120,7 +1120,7 @@ cloudStack.converters = {
|
|||
|
||||
//data parameter passed to API call in listView
|
||||
|
||||
function listViewDataProvider(args, data) {
|
||||
function listViewDataProvider(args, data, options) {
|
||||
//search
|
||||
if (args.filterBy != null) {
|
||||
if (args.filterBy.advSearch != null && typeof(args.filterBy.advSearch) == "object") { //advanced search
|
||||
|
|
@ -1141,9 +1141,13 @@ function listViewDataProvider(args, data) {
|
|||
switch (args.filterBy.search.by) {
|
||||
case "name":
|
||||
if (args.filterBy.search.value.length > 0) {
|
||||
$.extend(data, {
|
||||
keyword: args.filterBy.search.value
|
||||
});
|
||||
if (options && options.searchBy) {
|
||||
data[options.searchBy] = args.filterBy.search.value;
|
||||
} else {
|
||||
$.extend(data, {
|
||||
keyword: args.filterBy.search.value
|
||||
});
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -1156,6 +1160,8 @@ function listViewDataProvider(args, data) {
|
|||
page: args.page,
|
||||
pagesize: pageSize
|
||||
});
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
//used by infrastructure page and network page
|
||||
|
|
|
|||
|
|
@ -7556,11 +7556,7 @@
|
|||
dataProvider: function(args) {
|
||||
$.ajax({
|
||||
url: createURL('listConfigurations&zoneid=' + args.context.physicalResources[0].id),
|
||||
data: {
|
||||
page: args.page,
|
||||
pageSize: pageSize,
|
||||
listAll: true
|
||||
},
|
||||
data: listViewDataProvider(args, {}, { searchBy: 'name' }),
|
||||
success: function(json) {
|
||||
args.response.success({
|
||||
data: json.listconfigurationsresponse.configuration
|
||||
|
|
@ -13275,11 +13271,7 @@
|
|||
dataProvider: function(args) {
|
||||
$.ajax({
|
||||
url: createURL('listConfigurations&clusterid=' + args.context.clusters[0].id),
|
||||
data: {
|
||||
page: args.page,
|
||||
pageSize: pageSize,
|
||||
listAll: true
|
||||
},
|
||||
data: listViewDataProvider(args, {}, { searchBy: 'name' }),
|
||||
success: function(json) {
|
||||
args.response.success({
|
||||
data: json.listconfigurationsresponse.configuration
|
||||
|
|
@ -15493,11 +15485,7 @@
|
|||
|
||||
$.ajax({
|
||||
url: createURL('listConfigurations&storageid=' + args.context.primarystorages[0].id),
|
||||
data: {
|
||||
page: args.page,
|
||||
pageSize: pageSize,
|
||||
listAll: true
|
||||
},
|
||||
data: listViewDataProvider(args, {}, { searchBy: 'name' }),
|
||||
success: function(json) {
|
||||
args.response.success({
|
||||
data: json.listconfigurationsresponse.configuration
|
||||
|
|
|
|||
Loading…
Reference in New Issue