|
976 | 976 | pollAgainIfValueIsIn: { |
977 | 977 | 'UploadNotStarted': 1 |
978 | 978 | }, |
979 | | - pollAgainFn: function(context) { //??? |
| 979 | + pollAgainFn: function(context) { |
980 | 980 | var toClearInterval = false; |
981 | 981 | $.ajax({ |
982 | 982 | url: createURL("listVolumes&id=" + context.volumes[0].id), |
|
1072 | 1072 | } |
1073 | 1073 | }, |
1074 | 1074 |
|
1075 | | - dataProvider: function(args) { |
1076 | | - var array1 = []; |
1077 | | - if(args.filterBy != null) { |
1078 | | - if(args.filterBy.search != null && args.filterBy.search.by != null && args.filterBy.search.value != null) { |
1079 | | - switch(args.filterBy.search.by) { |
1080 | | - case "name": |
1081 | | - if(args.filterBy.search.value.length > 0) |
1082 | | - array1.push("&keyword=" + args.filterBy.search.value); |
1083 | | - break; |
1084 | | - } |
1085 | | - } |
1086 | | - } |
1087 | | - |
1088 | | - var apiCmd = "listSnapshots&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join(""); |
| 1075 | + advSearchFields: { |
| 1076 | + name: { label: 'Name' }, |
| 1077 | + tagKey: { label: 'Tag Key' }, |
| 1078 | + tagValue: { label: 'Tag Value' } |
| 1079 | + }, |
| 1080 | + |
| 1081 | + dataProvider: function(args) { |
| 1082 | + var data = {}; |
| 1083 | + listViewDataProvider(args, data); |
| 1084 | + |
1089 | 1085 | if(args.context != null) { |
1090 | 1086 | if("volumes" in args.context) { |
1091 | | - apiCmd += "&volumeid=" + args.context.volumes[0].id; |
| 1087 | + $.extend(data, { |
| 1088 | + volumeid: args.context.volumes[0].id |
| 1089 | + }); |
1092 | 1090 | } |
1093 | 1091 | } |
1094 | 1092 |
|
1095 | 1093 | $.ajax({ |
1096 | | - url: createURL(apiCmd), |
1097 | | - dataType: "json", |
1098 | | - async: true, |
| 1094 | + url: createURL('listSnapshots'), |
| 1095 | + data: data, |
1099 | 1096 | success: function(json) { |
1100 | 1097 | var items = json.listsnapshotsresponse.snapshot; |
1101 | 1098 | args.response.success({ |
|
0 commit comments