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 be4b4f3738..16e0e03c3e 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 `Link`; + } 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 710a26de9c..1bce60761b 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 f91564277a..b83a743505 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 @@ -65,6 +65,10 @@