Skip to content

Commit

Permalink
Removed page num in link, fix paging, adjust indention
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuol committed Jan 27, 2016
1 parent d7e679e commit 1d3343f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Expand Up @@ -42,7 +42,6 @@ function formatDate(date) {
}

function getParameterByName(name, searchString) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(searchString);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
Expand Down Expand Up @@ -118,6 +117,7 @@ $(document).ready(function() {
{name: 'seventh'},
{name: 'eighth'},
],
"displayLength": 20,
};

var rowGroupConf = {
Expand Down
Expand Up @@ -43,7 +43,7 @@ private[history] class HistoryPage(parent: HistoryServer) extends WebUIPage("")
</ul>
{
if (allAppsSize > 0) {
<div id="history-summary"></div>
<div id="history-summary" class="span12"></div>
} else if (requestedIncomplete) {
<h4>No incomplete applications found!</h4>
} else {
Expand All @@ -57,7 +57,7 @@ private[history] class HistoryPage(parent: HistoryServer) extends WebUIPage("")
}
}

<a href={makePageLink(1, !requestedIncomplete)}>
<a href={makePageLink(!requestedIncomplete)}>
{
if (requestedIncomplete) {
"Back to completed applications"
Expand All @@ -73,10 +73,7 @@ private[history] class HistoryPage(parent: HistoryServer) extends WebUIPage("")
UIUtils.basicSparkPage(content, "History Server")
}

private def makePageLink(linkPage: Int, showIncomplete: Boolean): String = {
UIUtils.prependBaseUri("/?" + Array(
"page=" + linkPage,
"showIncomplete=" + showIncomplete
).mkString("&"))
private def makePageLink(showIncomplete: Boolean): String = {
UIUtils.prependBaseUri("/?" + "showIncomplete=" + showIncomplete)
}
}

0 comments on commit 1d3343f

Please sign in to comment.