Repository: ambari Updated Branches: refs/heads/trunk 2ac95cf32 -> e814ba20e
AMBARI-10864. nfs gateways show in stack w/o nfs. (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e814ba20 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e814ba20 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e814ba20 Branch: refs/heads/trunk Commit: e814ba20ebd422f05ddfff7440e7281a3d3a3d12 Parents: 4f86eba Author: Aleksandr Kovalenko <akovale...@hortonworks.com> Authored: Thu Apr 30 15:45:01 2015 +0300 Committer: Aleksandr Kovalenko <akovale...@hortonworks.com> Committed: Thu Apr 30 16:14:37 2015 +0300 ---------------------------------------------------------------------- .../app/templates/main/service/services/hdfs.hbs | 14 ++++++++------ ambari-web/app/views/main/service/services/hdfs.js | 8 ++++++++ 2 files changed, 16 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/e814ba20/ambari-web/app/templates/main/service/services/hdfs.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/service/services/hdfs.hbs b/ambari-web/app/templates/main/service/services/hdfs.hbs index 1de34f2..11fd24b 100644 --- a/ambari-web/app/templates/main/service/services/hdfs.hbs +++ b/ambari-web/app/templates/main/service/services/hdfs.hbs @@ -30,17 +30,19 @@ </td> </tr> <!-- NFS Gateway --> -<tr> - <td class="summary-label"><a href="#" {{action filterHosts view.nfsGatewayComponent}}>{{t dashboard.services.hdfs.nfsgateways}}</a></td> - <td> +{{#if view.isNfsInStack}} + <tr> + <td class="summary-label"><a href="#" {{action filterHosts view.nfsGatewayComponent}}>{{t dashboard.services.hdfs.nfsgateways}}</a></td> + <td> <span> {{#view App.ComponentLiveTextView liveComponentsBinding="view.service.nfsGatewaysStarted" totalComponentsBinding="view.service.nfsGatewaysTotal"}} {{view.liveComponents}}/{{view.totalComponents}} {{/view}} </span> - {{t common.started}} - </td> -</tr> + {{t common.started}} + </td> + </tr> +{{/if}} <!-- Data Node Counts --> <tr> <td class="summary-label">{{t dashboard.services.hdfs.datanodecounts}}</td> http://git-wip-us.apache.org/repos/asf/ambari/blob/e814ba20/ambari-web/app/views/main/service/services/hdfs.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/services/hdfs.js b/ambari-web/app/views/main/service/services/hdfs.js index 01f1ee8..ba58947 100644 --- a/ambari-web/app/views/main/service/services/hdfs.js +++ b/ambari-web/app/views/main/service/services/hdfs.js @@ -190,6 +190,14 @@ App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({ }); //return this.get('service.dataNodes').objectAt(0); }.property(), + + /** + * Define if NFS_GATEWAY is present in the installed stack + * @type {Boolean} + */ + isNfsInStack: function () { + return App.StackServiceComponent.find().someProperty('componentName', 'NFS_GATEWAY'); + }.property(), journalNodeComponent: function () { return this.get('service.journalNodes').objectAt(0);