YARN-7824. [UI2] Yarn Component Instance page should include link to container logs. Contributed by Akhil PB.
(cherry picked from commit a060e8cb51
)
This commit is contained in:
parent
511ffb5f70
commit
2576aea729
|
@ -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);
|
||||
|
|
|
@ -47,5 +47,12 @@ export default DS.Model.extend({
|
|||
return Converter.timeStampToDate(timestamp);
|
||||
}
|
||||
return 'N/A';
|
||||
}),
|
||||
|
||||
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}`;
|
||||
})
|
||||
});
|
||||
|
|
|
@ -61,6 +61,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>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue