[46/50] [abbrv] hadoop git commit: YARN-6631. Refactor loader.js in new Yarn UI. Contributed by Akhil P B.
YARN-6631. Refactor loader.js in new Yarn UI. Contributed by Akhil P B. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/16357413 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/16357413 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/16357413 Branch: refs/heads/YARN-3368_branch2 Commit: 16357413908c8f04a9ebe384fadc502800bc514b Parents: 6232c3a Author: Sunil GAuthored: Thu Aug 10 11:53:26 2017 +0530 Committer: Varun Saxena Committed: Wed Oct 18 02:06:49 2017 +0530 -- .../src/main/webapp/app/initializers/loader.js | 42 +--- 1 file changed, 19 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/16357413/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js index aa8fb07..55f6e1b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js @@ -20,25 +20,27 @@ import Ember from 'ember'; -function getTimeLineURL() { - return '/conf?name=yarn.timeline-service.webapp.address'; +function getTimeLineURL(rmhost) { + var url = window.location.protocol + '//' + +(ENV.hosts.localBaseAddress? ENV.hosts.localBaseAddress + '/' : '') + rmhost; + + url += '/conf?name=yarn.timeline-service.webapp.address'; + Ember.Logger.log("Get Timeline Address URL: " + url); + return url; } function updateConfigs(application) { var hostname = window.location.hostname; - var rmhost = hostname + -(window.location.port ? ':' + window.location.port: ''); - - Ember.Logger.log("RM Address:" + rmhost); + var rmhost = hostname + (window.location.port ? ':' + window.location.port: ''); if(!ENV.hosts.rmWebAddress) { -ENV = { - hosts: { - rmWebAddress: rmhost, -}, -}; +ENV.hosts.rmWebAddress = rmhost; + } else { +rmhost = ENV.hosts.rmWebAddress; } + Ember.Logger.log("RM Address: " + rmhost); + if(!ENV.hosts.timelineWebAddress) { var timelinehost = ""; $.ajax({ @@ -46,7 +48,7 @@ function updateConfigs(application) { dataType: 'json', async: true, context: this, - url: getTimeLineURL(), + url: getTimeLineURL(rmhost), success: function(data) { timelinehost = data.property.value; ENV.hosts.timelineWebAddress = timelinehost; @@ -54,24 +56,18 @@ function updateConfigs(application) { var address = timelinehost.split(":")[0]; var port = timelinehost.split(":")[1]; -Ember.Logger.log("Timeline Address from RM:" + address + ":" + port); +Ember.Logger.log("Timeline Address from RM: " + timelinehost); if(address === "0.0.0.0" || address === "localhost") { var updatedAddress = hostname + ":" + port; - - /* Timeline v2 is not supporting CORS, so make as default*/ - ENV = { - hosts: { -rmWebAddress: rmhost, -timelineWebAddress: updatedAddress, - }, - }; - Ember.Logger.log("Timeline Updated Address:" + updatedAddress); + ENV.hosts.timelineWebAddress = updatedAddress; + Ember.Logger.log("Timeline Updated Address: " + updatedAddress); } application.advanceReadiness(); - }, + } }); } else { +Ember.Logger.log("Timeline Address: " + ENV.hosts.timelineWebAddress); application.advanceReadiness(); } } - To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org
[43/50] [abbrv] hadoop git commit: YARN-6631. Refactor loader.js in new Yarn UI. Contributed by Akhil P B.
YARN-6631. Refactor loader.js in new Yarn UI. Contributed by Akhil P B. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/874d223e Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/874d223e Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/874d223e Branch: refs/heads/YARN-5355_branch2 Commit: 874d223e2d3a5ca7feafb276a50a1f082fafc348 Parents: 931ea0c Author: Sunil GAuthored: Thu Aug 10 11:53:26 2017 +0530 Committer: vrushali Committed: Tue Oct 17 11:40:01 2017 -0700 -- .../src/main/webapp/app/initializers/loader.js | 42 +--- 1 file changed, 19 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/874d223e/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js index aa8fb07..55f6e1b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js @@ -20,25 +20,27 @@ import Ember from 'ember'; -function getTimeLineURL() { - return '/conf?name=yarn.timeline-service.webapp.address'; +function getTimeLineURL(rmhost) { + var url = window.location.protocol + '//' + +(ENV.hosts.localBaseAddress? ENV.hosts.localBaseAddress + '/' : '') + rmhost; + + url += '/conf?name=yarn.timeline-service.webapp.address'; + Ember.Logger.log("Get Timeline Address URL: " + url); + return url; } function updateConfigs(application) { var hostname = window.location.hostname; - var rmhost = hostname + -(window.location.port ? ':' + window.location.port: ''); - - Ember.Logger.log("RM Address:" + rmhost); + var rmhost = hostname + (window.location.port ? ':' + window.location.port: ''); if(!ENV.hosts.rmWebAddress) { -ENV = { - hosts: { - rmWebAddress: rmhost, -}, -}; +ENV.hosts.rmWebAddress = rmhost; + } else { +rmhost = ENV.hosts.rmWebAddress; } + Ember.Logger.log("RM Address: " + rmhost); + if(!ENV.hosts.timelineWebAddress) { var timelinehost = ""; $.ajax({ @@ -46,7 +48,7 @@ function updateConfigs(application) { dataType: 'json', async: true, context: this, - url: getTimeLineURL(), + url: getTimeLineURL(rmhost), success: function(data) { timelinehost = data.property.value; ENV.hosts.timelineWebAddress = timelinehost; @@ -54,24 +56,18 @@ function updateConfigs(application) { var address = timelinehost.split(":")[0]; var port = timelinehost.split(":")[1]; -Ember.Logger.log("Timeline Address from RM:" + address + ":" + port); +Ember.Logger.log("Timeline Address from RM: " + timelinehost); if(address === "0.0.0.0" || address === "localhost") { var updatedAddress = hostname + ":" + port; - - /* Timeline v2 is not supporting CORS, so make as default*/ - ENV = { - hosts: { -rmWebAddress: rmhost, -timelineWebAddress: updatedAddress, - }, - }; - Ember.Logger.log("Timeline Updated Address:" + updatedAddress); + ENV.hosts.timelineWebAddress = updatedAddress; + Ember.Logger.log("Timeline Updated Address: " + updatedAddress); } application.advanceReadiness(); - }, + } }); } else { +Ember.Logger.log("Timeline Address: " + ENV.hosts.timelineWebAddress); application.advanceReadiness(); } } - To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org
[06/50] [abbrv] hadoop git commit: YARN-6631. Refactor loader.js in new Yarn UI. Contributed by Akhil P B.
YARN-6631. Refactor loader.js in new Yarn UI. Contributed by Akhil P B. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/8d953c23 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/8d953c23 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/8d953c23 Branch: refs/heads/YARN-1011 Commit: 8d953c2359c5b12cf5b1f3c14be3ff5bb74242d0 Parents: ac7d060 Author: Sunil GAuthored: Thu Aug 10 11:53:26 2017 +0530 Committer: Sunil G Committed: Thu Aug 10 11:53:26 2017 +0530 -- .../src/main/webapp/app/initializers/loader.js | 42 +--- 1 file changed, 19 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d953c23/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js index aa8fb07..55f6e1b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js @@ -20,25 +20,27 @@ import Ember from 'ember'; -function getTimeLineURL() { - return '/conf?name=yarn.timeline-service.webapp.address'; +function getTimeLineURL(rmhost) { + var url = window.location.protocol + '//' + +(ENV.hosts.localBaseAddress? ENV.hosts.localBaseAddress + '/' : '') + rmhost; + + url += '/conf?name=yarn.timeline-service.webapp.address'; + Ember.Logger.log("Get Timeline Address URL: " + url); + return url; } function updateConfigs(application) { var hostname = window.location.hostname; - var rmhost = hostname + -(window.location.port ? ':' + window.location.port: ''); - - Ember.Logger.log("RM Address:" + rmhost); + var rmhost = hostname + (window.location.port ? ':' + window.location.port: ''); if(!ENV.hosts.rmWebAddress) { -ENV = { - hosts: { - rmWebAddress: rmhost, -}, -}; +ENV.hosts.rmWebAddress = rmhost; + } else { +rmhost = ENV.hosts.rmWebAddress; } + Ember.Logger.log("RM Address: " + rmhost); + if(!ENV.hosts.timelineWebAddress) { var timelinehost = ""; $.ajax({ @@ -46,7 +48,7 @@ function updateConfigs(application) { dataType: 'json', async: true, context: this, - url: getTimeLineURL(), + url: getTimeLineURL(rmhost), success: function(data) { timelinehost = data.property.value; ENV.hosts.timelineWebAddress = timelinehost; @@ -54,24 +56,18 @@ function updateConfigs(application) { var address = timelinehost.split(":")[0]; var port = timelinehost.split(":")[1]; -Ember.Logger.log("Timeline Address from RM:" + address + ":" + port); +Ember.Logger.log("Timeline Address from RM: " + timelinehost); if(address === "0.0.0.0" || address === "localhost") { var updatedAddress = hostname + ":" + port; - - /* Timeline v2 is not supporting CORS, so make as default*/ - ENV = { - hosts: { -rmWebAddress: rmhost, -timelineWebAddress: updatedAddress, - }, - }; - Ember.Logger.log("Timeline Updated Address:" + updatedAddress); + ENV.hosts.timelineWebAddress = updatedAddress; + Ember.Logger.log("Timeline Updated Address: " + updatedAddress); } application.advanceReadiness(); - }, + } }); } else { +Ember.Logger.log("Timeline Address: " + ENV.hosts.timelineWebAddress); application.advanceReadiness(); } } - To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org
[09/50] [abbrv] hadoop git commit: YARN-6631. Refactor loader.js in new Yarn UI. Contributed by Akhil P B.
YARN-6631. Refactor loader.js in new Yarn UI. Contributed by Akhil P B. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/8d953c23 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/8d953c23 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/8d953c23 Branch: refs/heads/YARN-6592 Commit: 8d953c2359c5b12cf5b1f3c14be3ff5bb74242d0 Parents: ac7d060 Author: Sunil GAuthored: Thu Aug 10 11:53:26 2017 +0530 Committer: Sunil G Committed: Thu Aug 10 11:53:26 2017 +0530 -- .../src/main/webapp/app/initializers/loader.js | 42 +--- 1 file changed, 19 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d953c23/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js index aa8fb07..55f6e1b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js @@ -20,25 +20,27 @@ import Ember from 'ember'; -function getTimeLineURL() { - return '/conf?name=yarn.timeline-service.webapp.address'; +function getTimeLineURL(rmhost) { + var url = window.location.protocol + '//' + +(ENV.hosts.localBaseAddress? ENV.hosts.localBaseAddress + '/' : '') + rmhost; + + url += '/conf?name=yarn.timeline-service.webapp.address'; + Ember.Logger.log("Get Timeline Address URL: " + url); + return url; } function updateConfigs(application) { var hostname = window.location.hostname; - var rmhost = hostname + -(window.location.port ? ':' + window.location.port: ''); - - Ember.Logger.log("RM Address:" + rmhost); + var rmhost = hostname + (window.location.port ? ':' + window.location.port: ''); if(!ENV.hosts.rmWebAddress) { -ENV = { - hosts: { - rmWebAddress: rmhost, -}, -}; +ENV.hosts.rmWebAddress = rmhost; + } else { +rmhost = ENV.hosts.rmWebAddress; } + Ember.Logger.log("RM Address: " + rmhost); + if(!ENV.hosts.timelineWebAddress) { var timelinehost = ""; $.ajax({ @@ -46,7 +48,7 @@ function updateConfigs(application) { dataType: 'json', async: true, context: this, - url: getTimeLineURL(), + url: getTimeLineURL(rmhost), success: function(data) { timelinehost = data.property.value; ENV.hosts.timelineWebAddress = timelinehost; @@ -54,24 +56,18 @@ function updateConfigs(application) { var address = timelinehost.split(":")[0]; var port = timelinehost.split(":")[1]; -Ember.Logger.log("Timeline Address from RM:" + address + ":" + port); +Ember.Logger.log("Timeline Address from RM: " + timelinehost); if(address === "0.0.0.0" || address === "localhost") { var updatedAddress = hostname + ":" + port; - - /* Timeline v2 is not supporting CORS, so make as default*/ - ENV = { - hosts: { -rmWebAddress: rmhost, -timelineWebAddress: updatedAddress, - }, - }; - Ember.Logger.log("Timeline Updated Address:" + updatedAddress); + ENV.hosts.timelineWebAddress = updatedAddress; + Ember.Logger.log("Timeline Updated Address: " + updatedAddress); } application.advanceReadiness(); - }, + } }); } else { +Ember.Logger.log("Timeline Address: " + ENV.hosts.timelineWebAddress); application.advanceReadiness(); } } - To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org
[05/26] hadoop git commit: YARN-6631. Refactor loader.js in new Yarn UI. Contributed by Akhil P B.
YARN-6631. Refactor loader.js in new Yarn UI. Contributed by Akhil P B. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/8d953c23 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/8d953c23 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/8d953c23 Branch: refs/heads/HADOOP-13345 Commit: 8d953c2359c5b12cf5b1f3c14be3ff5bb74242d0 Parents: ac7d060 Author: Sunil GAuthored: Thu Aug 10 11:53:26 2017 +0530 Committer: Sunil G Committed: Thu Aug 10 11:53:26 2017 +0530 -- .../src/main/webapp/app/initializers/loader.js | 42 +--- 1 file changed, 19 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d953c23/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js index aa8fb07..55f6e1b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js @@ -20,25 +20,27 @@ import Ember from 'ember'; -function getTimeLineURL() { - return '/conf?name=yarn.timeline-service.webapp.address'; +function getTimeLineURL(rmhost) { + var url = window.location.protocol + '//' + +(ENV.hosts.localBaseAddress? ENV.hosts.localBaseAddress + '/' : '') + rmhost; + + url += '/conf?name=yarn.timeline-service.webapp.address'; + Ember.Logger.log("Get Timeline Address URL: " + url); + return url; } function updateConfigs(application) { var hostname = window.location.hostname; - var rmhost = hostname + -(window.location.port ? ':' + window.location.port: ''); - - Ember.Logger.log("RM Address:" + rmhost); + var rmhost = hostname + (window.location.port ? ':' + window.location.port: ''); if(!ENV.hosts.rmWebAddress) { -ENV = { - hosts: { - rmWebAddress: rmhost, -}, -}; +ENV.hosts.rmWebAddress = rmhost; + } else { +rmhost = ENV.hosts.rmWebAddress; } + Ember.Logger.log("RM Address: " + rmhost); + if(!ENV.hosts.timelineWebAddress) { var timelinehost = ""; $.ajax({ @@ -46,7 +48,7 @@ function updateConfigs(application) { dataType: 'json', async: true, context: this, - url: getTimeLineURL(), + url: getTimeLineURL(rmhost), success: function(data) { timelinehost = data.property.value; ENV.hosts.timelineWebAddress = timelinehost; @@ -54,24 +56,18 @@ function updateConfigs(application) { var address = timelinehost.split(":")[0]; var port = timelinehost.split(":")[1]; -Ember.Logger.log("Timeline Address from RM:" + address + ":" + port); +Ember.Logger.log("Timeline Address from RM: " + timelinehost); if(address === "0.0.0.0" || address === "localhost") { var updatedAddress = hostname + ":" + port; - - /* Timeline v2 is not supporting CORS, so make as default*/ - ENV = { - hosts: { -rmWebAddress: rmhost, -timelineWebAddress: updatedAddress, - }, - }; - Ember.Logger.log("Timeline Updated Address:" + updatedAddress); + ENV.hosts.timelineWebAddress = updatedAddress; + Ember.Logger.log("Timeline Updated Address: " + updatedAddress); } application.advanceReadiness(); - }, + } }); } else { +Ember.Logger.log("Timeline Address: " + ENV.hosts.timelineWebAddress); application.advanceReadiness(); } } - To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org
[13/50] [abbrv] hadoop git commit: YARN-6631. Refactor loader.js in new Yarn UI. Contributed by Akhil P B.
YARN-6631. Refactor loader.js in new Yarn UI. Contributed by Akhil P B. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/8d953c23 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/8d953c23 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/8d953c23 Branch: refs/heads/HDFS-10467 Commit: 8d953c2359c5b12cf5b1f3c14be3ff5bb74242d0 Parents: ac7d060 Author: Sunil GAuthored: Thu Aug 10 11:53:26 2017 +0530 Committer: Sunil G Committed: Thu Aug 10 11:53:26 2017 +0530 -- .../src/main/webapp/app/initializers/loader.js | 42 +--- 1 file changed, 19 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d953c23/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js index aa8fb07..55f6e1b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js @@ -20,25 +20,27 @@ import Ember from 'ember'; -function getTimeLineURL() { - return '/conf?name=yarn.timeline-service.webapp.address'; +function getTimeLineURL(rmhost) { + var url = window.location.protocol + '//' + +(ENV.hosts.localBaseAddress? ENV.hosts.localBaseAddress + '/' : '') + rmhost; + + url += '/conf?name=yarn.timeline-service.webapp.address'; + Ember.Logger.log("Get Timeline Address URL: " + url); + return url; } function updateConfigs(application) { var hostname = window.location.hostname; - var rmhost = hostname + -(window.location.port ? ':' + window.location.port: ''); - - Ember.Logger.log("RM Address:" + rmhost); + var rmhost = hostname + (window.location.port ? ':' + window.location.port: ''); if(!ENV.hosts.rmWebAddress) { -ENV = { - hosts: { - rmWebAddress: rmhost, -}, -}; +ENV.hosts.rmWebAddress = rmhost; + } else { +rmhost = ENV.hosts.rmWebAddress; } + Ember.Logger.log("RM Address: " + rmhost); + if(!ENV.hosts.timelineWebAddress) { var timelinehost = ""; $.ajax({ @@ -46,7 +48,7 @@ function updateConfigs(application) { dataType: 'json', async: true, context: this, - url: getTimeLineURL(), + url: getTimeLineURL(rmhost), success: function(data) { timelinehost = data.property.value; ENV.hosts.timelineWebAddress = timelinehost; @@ -54,24 +56,18 @@ function updateConfigs(application) { var address = timelinehost.split(":")[0]; var port = timelinehost.split(":")[1]; -Ember.Logger.log("Timeline Address from RM:" + address + ":" + port); +Ember.Logger.log("Timeline Address from RM: " + timelinehost); if(address === "0.0.0.0" || address === "localhost") { var updatedAddress = hostname + ":" + port; - - /* Timeline v2 is not supporting CORS, so make as default*/ - ENV = { - hosts: { -rmWebAddress: rmhost, -timelineWebAddress: updatedAddress, - }, - }; - Ember.Logger.log("Timeline Updated Address:" + updatedAddress); + ENV.hosts.timelineWebAddress = updatedAddress; + Ember.Logger.log("Timeline Updated Address: " + updatedAddress); } application.advanceReadiness(); - }, + } }); } else { +Ember.Logger.log("Timeline Address: " + ENV.hosts.timelineWebAddress); application.advanceReadiness(); } } - To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org
[40/50] [abbrv] hadoop git commit: YARN-6631. Refactor loader.js in new Yarn UI. Contributed by Akhil P B.
YARN-6631. Refactor loader.js in new Yarn UI. Contributed by Akhil P B. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/8d953c23 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/8d953c23 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/8d953c23 Branch: refs/heads/YARN-5881 Commit: 8d953c2359c5b12cf5b1f3c14be3ff5bb74242d0 Parents: ac7d060 Author: Sunil GAuthored: Thu Aug 10 11:53:26 2017 +0530 Committer: Sunil G Committed: Thu Aug 10 11:53:26 2017 +0530 -- .../src/main/webapp/app/initializers/loader.js | 42 +--- 1 file changed, 19 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d953c23/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js index aa8fb07..55f6e1b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js @@ -20,25 +20,27 @@ import Ember from 'ember'; -function getTimeLineURL() { - return '/conf?name=yarn.timeline-service.webapp.address'; +function getTimeLineURL(rmhost) { + var url = window.location.protocol + '//' + +(ENV.hosts.localBaseAddress? ENV.hosts.localBaseAddress + '/' : '') + rmhost; + + url += '/conf?name=yarn.timeline-service.webapp.address'; + Ember.Logger.log("Get Timeline Address URL: " + url); + return url; } function updateConfigs(application) { var hostname = window.location.hostname; - var rmhost = hostname + -(window.location.port ? ':' + window.location.port: ''); - - Ember.Logger.log("RM Address:" + rmhost); + var rmhost = hostname + (window.location.port ? ':' + window.location.port: ''); if(!ENV.hosts.rmWebAddress) { -ENV = { - hosts: { - rmWebAddress: rmhost, -}, -}; +ENV.hosts.rmWebAddress = rmhost; + } else { +rmhost = ENV.hosts.rmWebAddress; } + Ember.Logger.log("RM Address: " + rmhost); + if(!ENV.hosts.timelineWebAddress) { var timelinehost = ""; $.ajax({ @@ -46,7 +48,7 @@ function updateConfigs(application) { dataType: 'json', async: true, context: this, - url: getTimeLineURL(), + url: getTimeLineURL(rmhost), success: function(data) { timelinehost = data.property.value; ENV.hosts.timelineWebAddress = timelinehost; @@ -54,24 +56,18 @@ function updateConfigs(application) { var address = timelinehost.split(":")[0]; var port = timelinehost.split(":")[1]; -Ember.Logger.log("Timeline Address from RM:" + address + ":" + port); +Ember.Logger.log("Timeline Address from RM: " + timelinehost); if(address === "0.0.0.0" || address === "localhost") { var updatedAddress = hostname + ":" + port; - - /* Timeline v2 is not supporting CORS, so make as default*/ - ENV = { - hosts: { -rmWebAddress: rmhost, -timelineWebAddress: updatedAddress, - }, - }; - Ember.Logger.log("Timeline Updated Address:" + updatedAddress); + ENV.hosts.timelineWebAddress = updatedAddress; + Ember.Logger.log("Timeline Updated Address: " + updatedAddress); } application.advanceReadiness(); - }, + } }); } else { +Ember.Logger.log("Timeline Address: " + ENV.hosts.timelineWebAddress); application.advanceReadiness(); } } - To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org
hadoop git commit: YARN-6631. Refactor loader.js in new Yarn UI. Contributed by Akhil P B.
Repository: hadoop Updated Branches: refs/heads/trunk ac7d0604b -> 8d953c235 YARN-6631. Refactor loader.js in new Yarn UI. Contributed by Akhil P B. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/8d953c23 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/8d953c23 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/8d953c23 Branch: refs/heads/trunk Commit: 8d953c2359c5b12cf5b1f3c14be3ff5bb74242d0 Parents: ac7d060 Author: Sunil GAuthored: Thu Aug 10 11:53:26 2017 +0530 Committer: Sunil G Committed: Thu Aug 10 11:53:26 2017 +0530 -- .../src/main/webapp/app/initializers/loader.js | 42 +--- 1 file changed, 19 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/8d953c23/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js index aa8fb07..55f6e1b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js @@ -20,25 +20,27 @@ import Ember from 'ember'; -function getTimeLineURL() { - return '/conf?name=yarn.timeline-service.webapp.address'; +function getTimeLineURL(rmhost) { + var url = window.location.protocol + '//' + +(ENV.hosts.localBaseAddress? ENV.hosts.localBaseAddress + '/' : '') + rmhost; + + url += '/conf?name=yarn.timeline-service.webapp.address'; + Ember.Logger.log("Get Timeline Address URL: " + url); + return url; } function updateConfigs(application) { var hostname = window.location.hostname; - var rmhost = hostname + -(window.location.port ? ':' + window.location.port: ''); - - Ember.Logger.log("RM Address:" + rmhost); + var rmhost = hostname + (window.location.port ? ':' + window.location.port: ''); if(!ENV.hosts.rmWebAddress) { -ENV = { - hosts: { - rmWebAddress: rmhost, -}, -}; +ENV.hosts.rmWebAddress = rmhost; + } else { +rmhost = ENV.hosts.rmWebAddress; } + Ember.Logger.log("RM Address: " + rmhost); + if(!ENV.hosts.timelineWebAddress) { var timelinehost = ""; $.ajax({ @@ -46,7 +48,7 @@ function updateConfigs(application) { dataType: 'json', async: true, context: this, - url: getTimeLineURL(), + url: getTimeLineURL(rmhost), success: function(data) { timelinehost = data.property.value; ENV.hosts.timelineWebAddress = timelinehost; @@ -54,24 +56,18 @@ function updateConfigs(application) { var address = timelinehost.split(":")[0]; var port = timelinehost.split(":")[1]; -Ember.Logger.log("Timeline Address from RM:" + address + ":" + port); +Ember.Logger.log("Timeline Address from RM: " + timelinehost); if(address === "0.0.0.0" || address === "localhost") { var updatedAddress = hostname + ":" + port; - - /* Timeline v2 is not supporting CORS, so make as default*/ - ENV = { - hosts: { -rmWebAddress: rmhost, -timelineWebAddress: updatedAddress, - }, - }; - Ember.Logger.log("Timeline Updated Address:" + updatedAddress); + ENV.hosts.timelineWebAddress = updatedAddress; + Ember.Logger.log("Timeline Updated Address: " + updatedAddress); } application.advanceReadiness(); - }, + } }); } else { +Ember.Logger.log("Timeline Address: " + ENV.hosts.timelineWebAddress); application.advanceReadiness(); } } - To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org