Repository: ambari Updated Branches: refs/heads/trunk e9d8264a5 -> cb1ec1e2a
AMBARI-6395 Hosts section is not loading.(Max Shepel via atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cb1ec1e2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cb1ec1e2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cb1ec1e2 Branch: refs/heads/trunk Commit: cb1ec1e2a599fe36941c622e840bce6e0ebef908 Parents: e3de7b3 Author: atkach <atk...@hortonworks.com> Authored: Mon Jul 7 21:43:46 2014 +0300 Committer: atkach <atk...@hortonworks.com> Committed: Mon Jul 7 21:44:05 2014 +0300 ---------------------------------------------------------------------- ambari-web/app/controllers/global/update_controller.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/cb1ec1e2/ambari-web/app/controllers/global/update_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/global/update_controller.js b/ambari-web/app/controllers/global/update_controller.js index 6007ba5..6238658 100644 --- a/ambari-web/app/controllers/global/update_controller.js +++ b/ambari-web/app/controllers/global/update_controller.js @@ -187,13 +187,11 @@ App.UpdateController = Em.Controller.extend({ var params = p + self.computeParameters(queryParams), viewProps = self.computeParameters(viewProperties), sortProps = self.computeParameters(sortProperties); - if (!viewProps.length) viewProps = '&'; - if (!sortProps.length) sortProps = '&'; if ((params.length + viewProps.length + sortProps.length) > 0) { realUrl = App.get('apiPrefix') + '/clusters/' + App.get('clusterName') + - realUrl.replace('<parameters>', '') + '&' + - viewProps.substring(0, viewProps.length - 1) + '&' + - sortProps.substring(0, sortProps.length - 1); + realUrl.replace('<parameters>', '') + + (viewProps.length > 0 ? '&' + viewProps.substring(0, viewProps.length - 1) : '') + + (sortProps.length > 0 ? '&' + sortProps.substring(0, sortProps.length - 1) : ''); App.HttpClient.get(realUrl, App.hostsMapper, { complete: callback, doGetAsPost: true,