mirror of https://github.com/apache/cloudstack.git
Issue #: 5975
(1) API-side: make listDomains, ListDomainChildren return all items (2) UI-side: make domains page show all domains by specifying pageSize=-1
This commit is contained in:
parent
649ff9c641
commit
e8446f88b2
|
|
@ -89,7 +89,13 @@ public class ListDomainChildrenCmd extends BaseCmd {
|
|||
}
|
||||
}
|
||||
|
||||
Criteria c = new Criteria("id", Boolean.TRUE, startIndex, Long.valueOf(pageSizeNum));
|
||||
//temporary solution at API level. We need a permanent solution for all "listXXXXXXX & pageSize = -1" in the future.
|
||||
Criteria c;
|
||||
if(pageSizeNum != -1)
|
||||
c = new Criteria("id", Boolean.TRUE, startIndex, Long.valueOf(pageSizeNum));
|
||||
else
|
||||
c = new Criteria("id", Boolean.TRUE, null, null);
|
||||
|
||||
|
||||
if (keyword != null) {
|
||||
c.addCriteria(Criteria.KEYWORD, keyword);
|
||||
|
|
|
|||
|
|
@ -85,7 +85,13 @@ public class ListDomainsCmd extends BaseCmd {
|
|||
startIndex = Long.valueOf(pageSizeNum * (pageNum-1));
|
||||
}
|
||||
}
|
||||
Criteria c = new Criteria("id", Boolean.TRUE, startIndex, Long.valueOf(pageSizeNum));
|
||||
|
||||
//temporary solution at API level. We need a permanent solution for all "listXXXXXXX & pageSize = -1" in the future.
|
||||
Criteria c;
|
||||
if(pageSizeNum != -1)
|
||||
c = new Criteria("id", Boolean.TRUE, startIndex, Long.valueOf(pageSizeNum));
|
||||
else
|
||||
c = new Criteria("id", Boolean.TRUE, null, null);
|
||||
|
||||
if (keyword != null) {
|
||||
c.addCriteria(Criteria.KEYWORD, keyword);
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ function showDomainsTab() {
|
|||
|
||||
function drawTree(id, level, container) {
|
||||
$.ajax({
|
||||
data: "command=listDomainChildren&id="+id+"&response=json",
|
||||
data: "command=listDomainChildren&id="+id+"&response=json&pageSize=-1",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
|
|
@ -320,7 +320,7 @@ function showDomainsTab() {
|
|||
rightPanelSearchResult.show();
|
||||
var keyword = searchInput.val();
|
||||
$.ajax({
|
||||
data: "command=listDomains&keyword="+keyword+"&response=json",
|
||||
data: "command=listDomains&keyword="+keyword+"&response=json&pageSize=-1", //pageSize=-1 will return all items (no limitation)
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
|
|
@ -349,7 +349,7 @@ function showDomainsTab() {
|
|||
function drawRootNode(rootDomainId) {
|
||||
treeContentBox.empty();
|
||||
$.ajax({
|
||||
data: "command=listDomains&id="+rootDomainId+"&response=json",
|
||||
data: "command=listDomains&id="+rootDomainId+"&response=json&pageSize=-1", //pageSize=-1 will return all items (no limitation)
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue