You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sr...@apache.org on 2014/02/11 23:53:10 UTC
git commit: AMBARI-4618. Proxy API path has changed from
/api/v1/proxy to /proxy (srimanth)
Updated Branches:
refs/heads/trunk 636abc265 -> f303a4657
AMBARI-4618. Proxy API path has changed from /api/v1/proxy to /proxy (srimanth)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f303a465
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f303a465
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f303a465
Branch: refs/heads/trunk
Commit: f303a4657bb766ded93775a54558d2478118abcf
Parents: 636abc2
Author: Srimanth Gunturi <sg...@hortonworks.com>
Authored: Tue Feb 11 14:45:34 2014 -0800
Committer: Srimanth Gunturi <sg...@hortonworks.com>
Committed: Tue Feb 11 14:50:36 2014 -0800
----------------------------------------------------------------------
ambari-web/app/controllers/main/jobs_controller.js | 2 +-
ambari-web/app/utils/ajax.js | 12 ++++++++----
ambari-web/app/utils/jobs.js | 2 +-
3 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/f303a465/ambari-web/app/controllers/main/jobs_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/jobs_controller.js b/ambari-web/app/controllers/main/jobs_controller.js
index f6debd4..00980c7 100644
--- a/ambari-web/app/controllers/main/jobs_controller.js
+++ b/ambari-web/app/controllers/main/jobs_controller.js
@@ -62,7 +62,7 @@ App.MainJobsController = Em.ArrayController.extend({
if (yarnService != null) {
this.set('loading', true);
var historyServerHostName = yarnService.get('resourceManagerNode.hostName')
- var hiveQueriesUrl = App.testMode ? "/data/jobs/hive-queries.json" : App.apiPrefix + "/proxy?url=http://" + historyServerHostName
+ var hiveQueriesUrl = App.testMode ? "/data/jobs/hive-queries.json" : "/proxy?url=http://" + historyServerHostName
+ ":8188/ws/v1/apptimeline/HIVE_QUERY_ID?fields=events,primaryfilters";
if (jobsLimit > 0) {
hiveQueriesUrl += ("?limit=" + jobsLimit);
http://git-wip-us.apache.org/repos/asf/ambari/blob/f303a465/ambari-web/app/utils/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax.js b/ambari-web/app/utils/ajax.js
index 88401af..9148796 100644
--- a/ambari-web/app/utils/ajax.js
+++ b/ambari-web/app/utils/ajax.js
@@ -1606,15 +1606,18 @@ var urls = {
'jobs.tezDag.NametoID': {
'real': '/proxy?url=http://{historyServerHostName}:8188/ws/v1/apptimeline/TEZ_DAG_ID?primaryFilter=dagName:{tezDagName}',
- 'mock': '/data/jobs/tezDag-name-to-id.json'
+ 'mock': '/data/jobs/tezDag-name-to-id.json',
+ 'apiPrefix': ''
},
'jobs.tezDag.tezDagId': {
'real': '/proxy?url=http://{historyServerHostName}:8188/ws/v1/apptimeline/TEZ_DAG_ID/{tezDagId}?fields=relatedentities',
- 'mock': '/data/jobs/tezDag.json'
+ 'mock': '/data/jobs/tezDag.json',
+ 'apiPrefix': ''
},
'jobs.tezDag.tezDagVertexId': {
'real': '/proxy?url=http://{historyServerHostName}:8188/ws/v1/apptimeline/TEZ_VERTEX_ID/{tezDagVertexId}?fields=otherinfo',
- 'mock': '/data/jobs/tezDagVertex.json'
+ 'mock': '/data/jobs/tezDagVertex.json',
+ 'apiPrefix': ''
}
};
/**
@@ -1660,7 +1663,8 @@ var formatRequest = function (data) {
opt.type = 'GET';
}
else {
- opt.url = App.apiPrefix + formatUrl(this.real, data);
+ var prefix = this.apiPrefix != null ? this.apiPrefix : App.apiPrefix;
+ opt.url = prefix + formatUrl(this.real, data);
}
if (this.format) {
http://git-wip-us.apache.org/repos/asf/ambari/blob/f303a465/ambari-web/app/utils/jobs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/jobs.js b/ambari-web/app/utils/jobs.js
index b56db19..c391b7f 100644
--- a/ambari-web/app/utils/jobs.js
+++ b/ambari-web/app/utils/jobs.js
@@ -52,7 +52,7 @@ module.exports = {
var historyServerHostName = App.YARNService.find().objectAt(0).get('resourceManagerNode.hostName')
var hiveJobId = hiveJob.get('id');
// First refresh query
- var hiveQueriesUrl = App.testMode ? "/data/jobs/hive-query-2.json" : App.apiPrefix + "/proxy?url=http://" + historyServerHostName
+ var hiveQueriesUrl = App.testMode ? "/data/jobs/hive-query-2.json" : "/proxy?url=http://" + historyServerHostName
+ ":8188/ws/v1/apptimeline/HIVE_QUERY_ID/" + hiveJob.get('id') + "?fields=otherinfo";
App.HttpClient.get(hiveQueriesUrl, App.hiveJobMapper, {
complete : function(jqXHR, textStatus) {