Skip to content

Commit

Permalink
Modify ListCert to replace VLV with paged search
Browse files Browse the repository at this point in the history
  • Loading branch information
fmarco76 committed Jan 11, 2024
1 parent cdbf0bc commit c22b9bf
Show file tree
Hide file tree
Showing 6 changed files with 131 additions and 279 deletions.
10 changes: 0 additions & 10 deletions base/ca/shared/webapps/ca/ee/ca/queryBySerial.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,6 @@
form.queryCertFilter.value = "(|(certStatus=VALID)(certStatus=REVOKED))";
}

if (form.serialFrom.value == "") {
form.querySentinelDown.value = "0";
} else {
form.querySentinelDown.value = form.serialFrom.value;
form.querySentinelUp.value = form.serialFrom.value;
form.direction.value = "down";
}

form.op.value = "listCerts";
form.submit();
}
Expand Down Expand Up @@ -180,8 +172,6 @@
<td ALIGN=RIGHT BGCOLOR="#E5E5E5">
<input TYPE="button" VALUE="Find" width="72" onClick="doSubmit(this.form);">&nbsp;&nbsp;
<font size=-1 face="PrimaSans BT, Verdana, sans-serif">first</font>&nbsp;
<INPUT TYPE="hidden" NAME="querySentinelDown" VALUE="">
<INPUT TYPE="hidden" NAME="querySentinelUp" VALUE="">
<INPUT TYPE="hidden" NAME="direction" VALUE="begin">
<INPUT TYPE="TEXT" NAME="maxCount" SIZE=10 MAXLENGTH=99 VALUE="20">
<font size=-1 face="PrimaSans BT, Verdana, sans-serif">records</font>&nbsp;&nbsp;&nbsp;
Expand Down
14 changes: 4 additions & 10 deletions base/ca/shared/webapps/ca/ee/ca/queryCert.template
Original file line number Diff line number Diff line change
Expand Up @@ -421,18 +421,12 @@ function doNext(element)
form.direction.value= "down";

if (element.name == "begin") {
form.querySentinelDown.value = 0;
form.direction.value = "begin";
} else if (element.name == "end") {
form.querySentinelDown.value = result.header.totalRecordCount - result.header.maxCount+1;
form.direction.value = "end";
} else if (element.name == "down") {
form.querySentinelDown.value = result.header.querySentinelDown;
form.querySentinelUp.value = result.header.querySentinelUp;
form.direction.value = "down";
} else if (element.name == "up") {
form.querySentinelUp.value = result.header.querySentinelUp;
form.querySentinelDown.value = result.header.querySentinelDown;
form.direction.value = "up";
}

Expand Down Expand Up @@ -464,14 +458,14 @@ function displayNextForm()
nextForm.appendChild(renderHiddenElement("queryFilterHash"));
}

var disabledDown = ((result.header.querySentinelDown == null) ||
(result.fixed.maxCount+1 >= result.header.currentRecordCount));
var disabledUp = (result.header.querySentinelUp != null && result.header.querySentinelUp <= 1);
var disabledUp = ((result.header.previousStart == null) ||
(result.header.previousStart <= 0));
var disabledDown = (result.header.previousCount + result.header.previousStart >= result.header.totalRecordCount);

nextForm.appendChild(renderNextButtonElement("begin", "|<<"));
nextForm.appendChild(renderNextButtonElement("up", "<", disabledUp));

for (let element of ["totalRecordCount", "queryCertFilter", "skipRevoked", "skipNonValid", "querySentinelDown", "querySentinelUp", "serialTo", "direction"]) {
for (let element of ["totalRecordCount", "queryCertFilter", "skipRevoked", "skipNonValid", "previousCount", "previousStart", "direction", "serialFrom", "serialTo"]) {
nextForm.appendChild(renderHiddenElement(element, result.header[element]));
}

Expand Down
Loading

0 comments on commit c22b9bf

Please sign in to comment.