hdfs_links.hbs 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. {{!
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. }}
  18. <div class="links">
  19. <li class="thumbnail row">
  20. <a class="corner-icon span1" href="#" {{action deleteWidget target="view"}}>
  21. <i class="icon-remove-sign icon-large"></i>
  22. </a>
  23. <div class="caption span10"> {{view.title}}</div>
  24. <div class="widget-content" >
  25. {{#if view.isHAEnabled }}
  26. <table>
  27. <!--Active NameNode-->
  28. <tr>
  29. {{#if view.isActiveNNValid}}
  30. <td><a href="#" {{action showDetails view.model.activeNameNode}}>{{t dashboard.widgets.HDFSLinks.activeNameNode}}</a></td>
  31. {{else}}
  32. <td><a class="disabled-hdfs-link">{{t dashboard.widgets.HDFSLinks.activeNameNode}}</a></td>
  33. {{/if}}
  34. </tr>
  35. <!--Standby NameNodes-->
  36. <tr>
  37. {{#if view.isStandbyNNValid}}
  38. {{#if view.isTwoStandbyNN}}
  39. <!--Two Standby NameNodes-->
  40. <td><a href="#" {{action filterHosts view.twoStandbyComponent}}>{{t dashboard.widgets.HDFSLinks.standbyNameNodes}}</a></td>
  41. {{else}}
  42. <!--One Standby NameNode-->
  43. <td><a href="#" {{action showDetails view.model.standbyNameNode}}>{{t dashboard.widgets.HDFSLinks.standbyNameNode}}</a></td>
  44. {{/if}}
  45. {{else}}
  46. <td><a class="disabled-hdfs-link">{{t dashboard.widgets.HDFSLinks.standbyNameNode}}</a></td>
  47. {{/if}}
  48. </tr>
  49. <!--Data Nodes-->
  50. <tr>
  51. <td>
  52. <a href="#" {{action filterHosts view.component}}>{{view.model.dataNodes.length}} {{t dashboard.services.hdfs.datanodes}}</a>
  53. </td>
  54. </tr>
  55. </table>
  56. {{else}}
  57. <table>
  58. <!--NameNode-->
  59. <tr>
  60. <td><a href="#" {{action showDetails view.model.nameNode}}>{{t dashboard.services.hdfs.nanmenode}}</a></td>
  61. </tr>
  62. <!--SecondaryNameNode-->
  63. <tr>
  64. <td><a href="#" {{action showDetails view.model.snameNode}}>{{t dashboard.services.hdfs.snanmenode}}</a></td>
  65. </tr>
  66. <!--Data Nodes-->
  67. <tr>
  68. <td>
  69. <a href="#" {{action filterHosts view.component}}>{{view.model.dataNodes.length}} {{t dashboard.services.hdfs.datanodes}}</a>
  70. </td>
  71. </tr>
  72. </table>
  73. {{/if}}
  74. </div>
  75. <div class="link-button">
  76. {{#if view.model.quickLinks.length}}
  77. {{#view App.QuickViewLinks contentBinding="view.model"}}
  78. <div class="btn-group">
  79. <a class="btn btn-mini dropdown-toggle" data-toggle="dropdown" href="#">
  80. {{t common.more}}
  81. <span class="caret"></span>
  82. </a>
  83. <ul class="dropdown-menu">
  84. {{#each view.quickLinks}}
  85. <li><a {{bindAttr href="url"}} target="_blank">{{label}}</a></li>
  86. {{/each}}
  87. </ul>
  88. </div>
  89. {{/view}}
  90. {{/if}}
  91. </div>
  92. </li>
  93. </div>