You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by su...@apache.org on 2019/02/14 10:12:31 UTC
[hadoop] branch trunk updated: YARN-7824. [UI2] Yarn Component
Instance page should include link to container logs. Contributed by Akhil
PB.
This is an automated email from the ASF dual-hosted git repository.
sunilg pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new dfe0f42 YARN-7824. [UI2] Yarn Component Instance page should include link to container logs. Contributed by Akhil PB.
dfe0f42 is described below
commit dfe0f42835b1d33baebbc011cfce25ddc96d82e5
Author: Sunil G <su...@apache.org>
AuthorDate: Thu Feb 14 15:42:19 2019 +0530
YARN-7824. [UI2] Yarn Component Instance page should include link to container logs. Contributed by Akhil PB.
---
.../webapp/app/controllers/yarn-component-instances/info.js | 13 +++++++++++++
.../src/main/webapp/app/models/yarn-component-instance.js | 7 +++++++
.../webapp/app/templates/yarn-component-instance/info.hbs | 4 ++++
3 files changed, 24 insertions(+)
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-component-instances/info.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-component-instances/info.js
index be4b4f3..16e0e03 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-component-instances/info.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-component-instances/info.js
@@ -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);
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-component-instance.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-component-instance.js
index 710a26d..1bce607 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-component-instance.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-component-instance.js
@@ -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}`;
})
});
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-component-instance/info.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-component-instance/info.hbs
index f915642..b83a743 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-component-instance/info.hbs
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-component-instance/info.hbs
@@ -66,6 +66,10 @@
<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>
</tr>
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org