Repository: ambari Updated Branches: refs/heads/branch-2.5 8aa88e167 -> d036e0e21
AMBARI-19043 : CAPACITY-SCHEDULER & PIG View not loading for Ambari-2.5.0 (Akhil PB via nitirajrathore) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d036e0e2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d036e0e2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d036e0e2 Branch: refs/heads/branch-2.5 Commit: d036e0e2145a4b5c240803cd6b5c7fc4572ed128 Parents: 8aa88e1 Author: Nitiraj Rathore <[email protected]> Authored: Thu Dec 1 17:46:00 2016 +0530 Committer: Nitiraj Rathore <[email protected]> Committed: Thu Dec 1 17:51:53 2016 +0530 ---------------------------------------------------------------------- .../src/main/resources/ui/app/app.js | 14 +++++++++++++- .../pig/src/main/resources/ui/pig-web/app/app.js | 14 +++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/d036e0e2/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 fa1e05a..5854a09 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 @@ -53,4 +53,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/d036e0e2/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]; + } + } + }) });
