Repository: ambari Updated Branches: refs/heads/trunk 4b3879151 -> 7c07dd359
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/7c07dd35 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7c07dd35 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7c07dd35 Branch: refs/heads/trunk Commit: 7c07dd3595068b4e9a58db0fd2d6a8415898261c Parents: 4b38791 Author: Nitiraj Rathore <[email protected]> Authored: Thu Dec 1 17:46:00 2016 +0530 Committer: Nitiraj Rathore <[email protected]> Committed: Thu Dec 1 17:46:00 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/7c07dd35/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/7c07dd35/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]; + } + } + }) });
