You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by sr...@apache.org on 2016/02/17 08:19:47 UTC
tez git commit: TEZ-3101. Tez UI: Task attempt log link doesn't have
the correct protocol. (sree)
Repository: tez
Updated Branches:
refs/heads/master e24bf4486 -> fec46aa96
TEZ-3101. Tez UI: Task attempt log link doesn't have the correct protocol. (sree)
Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/fec46aa9
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/fec46aa9
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/fec46aa9
Branch: refs/heads/master
Commit: fec46aa960d8a9ba8e82af528380cb2931aa16e6
Parents: e24bf44
Author: Sreenath Somarajapuram <sr...@apache.org>
Authored: Wed Feb 17 12:48:54 2016 +0530
Committer: Sreenath Somarajapuram <sr...@apache.org>
Committed: Wed Feb 17 12:48:54 2016 +0530
----------------------------------------------------------------------
CHANGES.txt | 1 +
tez-ui/src/main/webapp/app/scripts/configs.js | 8 ++++++
.../src/main/webapp/app/scripts/helpers/misc.js | 27 ++++++++++++--------
.../components/basic-table/logs-cell.hbs | 2 +-
4 files changed, 26 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tez/blob/fec46aa9/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 8bd6f73..e2f77f6 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -26,6 +26,7 @@ ALL CHANGES:
TEZ-2937. Can Processor.close() be called after closing inputs and outputs?
TEZ-3037. History URL should be set regardless of which history logging service is enabled.
TEZ-3032. DAG start time getting logged using system time instead of recorded time in startTime field.
+ TEZ-3101. Tez UI: Task attempt log link doesn't have the correct protocol.
Release 0.8.2: 2016-01-19
http://git-wip-us.apache.org/repos/asf/tez/blob/fec46aa9/tez-ui/src/main/webapp/app/scripts/configs.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/configs.js b/tez-ui/src/main/webapp/app/scripts/configs.js
index b4dafc7..49046a5 100644
--- a/tez-ui/src/main/webapp/app/scripts/configs.js
+++ b/tez-ui/src/main/webapp/app/scripts/configs.js
@@ -43,6 +43,14 @@ App.setConfigs({
* For configuration see http://momentjs.com/timezone/docs/
*/
//timezone: "UTC",
+
+ /*
+ * yarnProtocol:
+ * If specified, this protocol would be used to construct node manager log links.
+ * Possible values: http, https
+ * Default value: If not specified, protocol of RMWebUrl will be used
+ */
+ //yarnProtocol: "<value>",
},
/*
http://git-wip-us.apache.org/repos/asf/tez/blob/fec46aa9/tez-ui/src/main/webapp/app/scripts/helpers/misc.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/helpers/misc.js b/tez-ui/src/main/webapp/app/scripts/helpers/misc.js
index 8e19686..6f091ee 100644
--- a/tez-ui/src/main/webapp/app/scripts/helpers/misc.js
+++ b/tez-ui/src/main/webapp/app/scripts/helpers/misc.js
@@ -638,7 +638,7 @@ App.Helpers.misc = {
* @param queryParams {Object} Params to be added
* @return modified path
*/
- modifyUrl: function (url, path, queryParams) {
+ modifyUrl: function (url, path, queryParams, protocol) {
var urlParts = url.split('?'),
params = {};
@@ -666,7 +666,13 @@ App.Helpers.misc = {
urlParts[0] += path || '';
- return urlParts[1] ? '%@?%@'.fmt(urlParts[0], urlParts[1]) : urlParts[0];
+ url = urlParts[1] ? '%@?%@'.fmt(urlParts[0], urlParts[1]) : urlParts[0];
+
+ if(url.indexOf("://") === -1 && protocol) {
+ url = "%@://%@".fmt(protocol, url);
+ }
+
+ return url;
},
constructLogLinks: function (attempt, yarnAppState, amUser) {
@@ -675,18 +681,20 @@ App.Helpers.misc = {
logLinks = {},
params = amUser ? {
"user.name": amUser
- } : {};
+ } : {},
+ RMWebUrl = App.env.RMWebUrl || "",
+ currentProtocol = location.protocol,
+ protocol = App.env.yarnProtocol ||
+ RMWebUrl.substr(0, RMWebUrl.indexOf("://")) ||
+ currentProtocol.substr(0, currentProtocol.length - 1);
if(attempt) {
- link = attempt.get('inProgressLog') || attempt.get('completedLog');
+ link = attempt.get('inProgressLog');
if(link) {
if(!link.match("/syslog_")) {
path = "/syslog_" + attempt.get('id');
- if(amUser) {
- path += "/" + amUser;
- }
}
- logLinks.viewUrl = App.Helpers.misc.modifyUrl(link, path, params);
+ logLinks.viewUrl = App.Helpers.misc.modifyUrl(link, path, params, protocol);
}
link = attempt.get('completedLog');
@@ -695,9 +703,6 @@ App.Helpers.misc = {
if(!link.match("/syslog_")) {
path = "/syslog_" + attempt.get('id');
- if(amUser) {
- path += "/" + amUser;
- }
}
logLinks.downloadUrl = App.Helpers.misc.modifyUrl(link, path, params);
http://git-wip-us.apache.org/repos/asf/tez/blob/fec46aa9/tez-ui/src/main/webapp/app/templates/components/basic-table/logs-cell.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/components/basic-table/logs-cell.hbs b/tez-ui/src/main/webapp/app/templates/components/basic-table/logs-cell.hbs
index 4745d78..c46cc13 100644
--- a/tez-ui/src/main/webapp/app/templates/components/basic-table/logs-cell.hbs
+++ b/tez-ui/src/main/webapp/app/templates/components/basic-table/logs-cell.hbs
@@ -20,7 +20,7 @@
<i class="waiting"></i>
{{else}}
{{#if view.cellContent.viewUrl}}
- <a target="_blank" href="//{{unbound view.cellContent.viewUrl}}">View</a>
+ <a target="_blank" href="{{unbound view.cellContent.viewUrl}}">View</a>
{{/if}}
{{#if view.cellContent.downloadUrl}}