Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

[Rest-server] Add job retry history #1425

Merged
merged 6 commits into from
Sep 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/webportal/src/app/job/job-view/job-detail-table.component.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,17 @@
<td><a href="virtual-clusters.html?vcName=<%= vcName %>"><%= vcName %></a></td>
<td><%= convertTime(false, jobStatus.createdTime) %></td>
<td><%= convertTime(true, jobStatus.createdTime, jobStatus.completedTime) %></td>
<td><%= jobStatus.retries %></td>
<td>
<% if (jobStatus.retries === 0) { %>
<%= jobStatus.retries %>
<% } else { %>
<a name='jobRetryLink'
onclick="setJobRetryLink('<%= jobName %>','<%= jobStatus.retries %>')"
href='javascript:void(0);'>
<%= jobStatus.retries %>
</a>
<% } %>
</td>
<td><%= convertState(hjss) %></td>
<td>
<% if (hjss === 'Waiting' || hjss === 'Running') { %>
Expand Down Expand Up @@ -74,7 +84,7 @@
<% } %>
</div>
</div>

<hr class="divider">

<table class="table table-condensed">
Expand Down
10 changes: 10 additions & 0 deletions src/webportal/src/app/job/job-view/job-view.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,14 @@ const stopJob = (jobName) => {
}
};

const setJobRetryLink = (jobName, retryCount) => {
const jobSessionTemplate = JSON.stringify({'iCreate': 1, 'iStart': 0, 'iEnd': retryCount + 1, 'iLength': 20,
'aaSorting': [[0, 'desc', 1]], 'oSearch': {'bCaseInsensitive': true, 'sSearch': jobName, 'bRegex': false, 'bSmart': true},
'abVisCols': []});
sessionStorage.setItem('apps', jobSessionTemplate);
window.open(webportalConfig.yarnWebPortalUri);
};

const loadJobDetail = (jobName) => {
loading.showLoading();
configInfo = null;
Expand Down Expand Up @@ -412,6 +420,8 @@ window.stopJob = stopJob;
window.loadJobDetail = loadJobDetail;
window.showConfigInfo = showConfigInfo;
window.showSshInfo = showSshInfo;
window.setJobRetryLink = setJobRetryLink;


const resizeContentWrapper = () => {
$('#content-wrapper').css({'height': $(window).height() + 'px'});
Expand Down