mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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
440662c938
commit
65b9f29941
@ -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) {
|
if (keyword != null) {
|
||||||
c.addCriteria(Criteria.KEYWORD, keyword);
|
c.addCriteria(Criteria.KEYWORD, keyword);
|
||||||
|
|||||||
@ -85,7 +85,13 @@ public class ListDomainsCmd extends BaseCmd {
|
|||||||
startIndex = Long.valueOf(pageSizeNum * (pageNum-1));
|
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) {
|
if (keyword != null) {
|
||||||
c.addCriteria(Criteria.KEYWORD, keyword);
|
c.addCriteria(Criteria.KEYWORD, keyword);
|
||||||
|
|||||||
@ -66,7 +66,11 @@ function showDomainsTab() {
|
|||||||
|
|
||||||
function drawTree(id, level, container) {
|
function drawTree(id, level, container) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
<<<<<<< HEAD
|
||||||
data: createURL("command=listDomainChildren&id="+id+"&response=json"),
|
data: createURL("command=listDomainChildren&id="+id+"&response=json"),
|
||||||
|
=======
|
||||||
|
data: "command=listDomainChildren&id="+id+"&response=json&pageSize=-1",
|
||||||
|
>>>>>>> e8446f8... Issue #: 5975
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
async: false,
|
async: false,
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
@ -321,7 +325,11 @@ function showDomainsTab() {
|
|||||||
rightPanelSearchResult.show();
|
rightPanelSearchResult.show();
|
||||||
var keyword = searchInput.val();
|
var keyword = searchInput.val();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
<<<<<<< HEAD
|
||||||
data: createURL("command=listDomains&keyword="+keyword+"&response=json"+maxPageSize),
|
data: createURL("command=listDomains&keyword="+keyword+"&response=json"+maxPageSize),
|
||||||
|
=======
|
||||||
|
data: "command=listDomains&keyword="+keyword+"&response=json&pageSize=-1", //pageSize=-1 will return all items (no limitation)
|
||||||
|
>>>>>>> e8446f8... Issue #: 5975
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
async: false,
|
async: false,
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
@ -350,7 +358,11 @@ function showDomainsTab() {
|
|||||||
function drawRootNode(rootDomainId) {
|
function drawRootNode(rootDomainId) {
|
||||||
treeContentBox.empty();
|
treeContentBox.empty();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
<<<<<<< HEAD
|
||||||
data: createURL("command=listDomains&id="+rootDomainId+"&response=json"),
|
data: createURL("command=listDomains&id="+rootDomainId+"&response=json"),
|
||||||
|
=======
|
||||||
|
data: "command=listDomains&id="+rootDomainId+"&response=json&pageSize=-1", //pageSize=-1 will return all items (no limitation)
|
||||||
|
>>>>>>> e8446f8... Issue #: 5975
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
async: false,
|
async: false,
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user