mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
cloudstack UI - advanced search - implement advanced search on snapshot page.
This commit is contained in:
parent
92864aa023
commit
18a09c9664
@ -976,7 +976,7 @@
|
|||||||
pollAgainIfValueIsIn: {
|
pollAgainIfValueIsIn: {
|
||||||
'UploadNotStarted': 1
|
'UploadNotStarted': 1
|
||||||
},
|
},
|
||||||
pollAgainFn: function(context) { //???
|
pollAgainFn: function(context) {
|
||||||
var toClearInterval = false;
|
var toClearInterval = false;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: createURL("listVolumes&id=" + context.volumes[0].id),
|
url: createURL("listVolumes&id=" + context.volumes[0].id),
|
||||||
@ -1072,30 +1072,27 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
dataProvider: function(args) {
|
advSearchFields: {
|
||||||
var array1 = [];
|
name: { label: 'Name' },
|
||||||
if(args.filterBy != null) {
|
tagKey: { label: 'Tag Key' },
|
||||||
if(args.filterBy.search != null && args.filterBy.search.by != null && args.filterBy.search.value != null) {
|
tagValue: { label: 'Tag Value' }
|
||||||
switch(args.filterBy.search.by) {
|
},
|
||||||
case "name":
|
|
||||||
if(args.filterBy.search.value.length > 0)
|
dataProvider: function(args) {
|
||||||
array1.push("&keyword=" + args.filterBy.search.value);
|
var data = {};
|
||||||
break;
|
listViewDataProvider(args, data);
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var apiCmd = "listSnapshots&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("");
|
|
||||||
if(args.context != null) {
|
if(args.context != null) {
|
||||||
if("volumes" in args.context) {
|
if("volumes" in args.context) {
|
||||||
apiCmd += "&volumeid=" + args.context.volumes[0].id;
|
$.extend(data, {
|
||||||
|
volumeid: args.context.volumes[0].id
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: createURL(apiCmd),
|
url: createURL('listSnapshots'),
|
||||||
dataType: "json",
|
data: data,
|
||||||
async: true,
|
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
var items = json.listsnapshotsresponse.snapshot;
|
var items = json.listsnapshotsresponse.snapshot;
|
||||||
args.response.success({
|
args.response.success({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user