Repository: ambari Updated Branches: refs/heads/branch-2.4 cfbaf17aa -> 05e5cc8c2
AMBARI-20968.Pig and CapSched views are not loading (Akhil PB via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/05e5cc8c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/05e5cc8c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/05e5cc8c Branch: refs/heads/branch-2.4 Commit: 05e5cc8c2fee622b1b05dcd1670f45290f97455b Parents: cfbaf17 Author: Sumit Mohanty <smoha...@hortonworks.com> Authored: Wed May 10 10:48:37 2017 -0700 Committer: Sumit Mohanty <smoha...@hortonworks.com> Committed: Wed May 10 10:48:37 2017 -0700 ---------------------------------------------------------------------- .../src/main/resources/ui/app/app.js | 14 +++++- .../ui/app/utils/hive-explainer/renderer.js.rej | 17 +++++++ .../app/utils/hive-explainer/transformer.js.rej | 50 ++++++++++++++++++++ .../src/main/resources/ui/pig-web/app/app.js | 14 +++++- 4 files changed, 93 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/05e5cc8c/contrib/views/capacity-scheduler/src/main/resources/ui/app/app.js ---------------------------------------------------------------------- diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/app.js b/contrib/views/capacity-scheduler/src/main/resources/ui/app/app.js index 4349538..a816528 100644 --- a/contrib/views/capacity-scheduler/src/main/resources/ui/app/app.js +++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/app.js @@ -31,4 +31,16 @@ Ember.Application.initializer({ } }); -module.exports = Em.Application.create(); +module.exports = Em.Application.create({ + Resolver: Ember.DefaultResolver.extend({ + resolveTemplate: function(parsedName) { + var resolvedTemplate = this._super(parsedName); + var templateName = 'templates/' + parsedName.fullNameWithoutType.replace(/\./g, '/'); + if (resolvedTemplate) { + return resolvedTemplate; + } else { + return Ember.TEMPLATES[templateName]; + } + } + }) +}); http://git-wip-us.apache.org/repos/asf/ambari/blob/05e5cc8c/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/renderer.js.rej ---------------------------------------------------------------------- diff --git a/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/renderer.js.rej b/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/renderer.js.rej new file mode 100644 index 0000000..df32348 --- /dev/null +++ b/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/renderer.js.rej @@ -0,0 +1,17 @@ +*************** +*** 134,140 **** + + } + function isSingleReducerAvailable(data){ +- let reducerCount = data.vertices.filter(function(item){ + return item['_vertex'].indexOf("Reducer") === 0; + }); + if(reducerCount && reducerCount.length === 1) { +--- 134,140 ---- + + } + function isSingleReducerAvailable(data){ ++ let reducerCount = data.verticesData.filter(function(item){ + return item['_vertex'].indexOf("Reducer") === 0; + }); + if(reducerCount && reducerCount.length === 1) { http://git-wip-us.apache.org/repos/asf/ambari/blob/05e5cc8c/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/transformer.js.rej ---------------------------------------------------------------------- diff --git a/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/transformer.js.rej b/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/transformer.js.rej new file mode 100644 index 0000000..e95bd0c --- /dev/null +++ b/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/transformer.js.rej @@ -0,0 +1,50 @@ +*************** +*** 28,34 **** + getFetchVertex(fetch), + ]; + +- let edges = []; + if(tez) { + edges = getEdges(tez, vertices); + edges = getEdgesWithCorrectedUnion(edges); +--- 28,34 ---- + getFetchVertex(fetch), + ]; + ++ let edges = [], verticesData; + if(tez) { + edges = getEdges(tez, vertices); + edges = getEdgesWithCorrectedUnion(edges); +*************** +*** 38,44 **** + vertices = doEnhance(vertices); + + vertices = getProcessedVertices(vertices, edges); +- + const {adjustedVertices, adjustedEdges} = getAdjustedVerticesAndEdges(vertices, edges); + vertices = adjustedVertices; + edges = adjustedEdges; +--- 38,44 ---- + vertices = doEnhance(vertices); + + vertices = getProcessedVertices(vertices, edges); ++ verticesData = vertices; + const {adjustedVertices, adjustedEdges} = getAdjustedVerticesAndEdges(vertices, edges); + vertices = adjustedVertices; + edges = adjustedEdges; +*************** +*** 60,65 **** + tree, + nodes, + connections, + }); + } + +--- 60,66 ---- + tree, + nodes, + connections, ++ verticesData + }); + } + http://git-wip-us.apache.org/repos/asf/ambari/blob/05e5cc8c/contrib/views/pig/src/main/resources/ui/pig-web/app/app.js ---------------------------------------------------------------------- diff --git a/contrib/views/pig/src/main/resources/ui/pig-web/app/app.js b/contrib/views/pig/src/main/resources/ui/pig-web/app/app.js index 866b8a7..c683f72 100644 --- a/contrib/views/pig/src/main/resources/ui/pig-web/app/app.js +++ b/contrib/views/pig/src/main/resources/ui/pig-web/app/app.js @@ -35,5 +35,17 @@ module.exports = Em.Application.create({ } var namespaceUrl = 'api/v1/views' + view + version + '/instances' + instance; return namespaceUrl; - } + }, + + Resolver: Ember.DefaultResolver.extend({ + resolveTemplate: function(parsedName) { + var resolvedTemplate = this._super(parsedName); + var templateName = 'templates/' + parsedName.fullNameWithoutType.replace(/\./g, '/'); + if (resolvedTemplate) { + return resolvedTemplate; + } else { + return Ember.TEMPLATES[templateName]; + } + } + }) });