YARN-7824. [UI2] Yarn Component Instance page should include link to container logs. Contributed by Akhil PB.
This commit is contained in:
parent
fd026863b1
commit
dfe0f42835
@ -61,6 +61,19 @@ export default Ember.Controller.extend({
|
||||
id: 'startedDate',
|
||||
headerTitle: 'Started Time',
|
||||
contentPath: 'startedDate'
|
||||
}, {
|
||||
id: 'logsLink',
|
||||
headerTitle: 'Logs',
|
||||
contentPath: 'logsLink',
|
||||
cellComponentName: 'em-table-html-cell',
|
||||
getCellContent: function(row) {
|
||||
var containerLogUrl = row.get('containerLogURL');
|
||||
if (containerLogUrl) {
|
||||
return `<a href="${containerLogUrl}&service=${serviceName}">Link</a>`;
|
||||
} else {
|
||||
return 'N/A';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return ColumnDef.make(cols);
|
||||
|
@ -58,5 +58,12 @@ export default DS.Model.extend({
|
||||
var url = protocol + "//" + node + ":" + port +
|
||||
"/terminal/terminal.template?container=" + containerId;
|
||||
return url;
|
||||
}),
|
||||
|
||||
containerLogURL: Ember.computed('containerId', function() {
|
||||
const containerId = this.get('containerId');
|
||||
const attemptId = Converter.containerIdToAttemptId(containerId);
|
||||
const appId = Converter.attemptIdToAppId(attemptId);
|
||||
return `#/yarn-app/${appId}/logs?attempt=${attemptId}&containerid=${containerId}`;
|
||||
})
|
||||
});
|
||||
|
@ -65,6 +65,10 @@
|
||||
<td>Exit Status Code</td>
|
||||
<td>{{check-availability model.container.exitStatusCode}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Logs</td>
|
||||
<td><a href="{{model.container.containerLogURL}}&service={{service}}">Link</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Terminal</td>
|
||||
<td><a href="{{model.container.termLink}}&user.name={{model.userInfo.requestedUser}}" target="_blank">Link</a></td>
|
||||
|
Loading…
Reference in New Issue
Block a user