application.hbs 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 id="main">
  19. <div id="top-nav">
  20. <div class="navbar navbar-static-top">
  21. <div class="navbar-inner">
  22. <div class="container main-container">
  23. {{#if isClusterDataLoaded}}
  24. <a {{translateAttr href="topnav.logo.href"}} class="logo"><img src="/img/logo-white.png" alt="Apache Ambari" title="Apache Ambari"></a>
  25. <a class="brand" {{translateAttr href="topnav.logo.href"}} title="Apache Ambari">{{t app.name}}</a>
  26. {{else}}
  27. <a class="logo"><img src="/img/logo-white.png" alt="Apache Ambari" title="Apache Ambari"></a>
  28. <a class="brand" title="Apache Ambari">{{t app.name}}</a>
  29. {{/if}}
  30. {{#if isClusterDataLoaded}}
  31. {{#if clusterExists}}
  32. <a class="brand cluster-name" href="javascript:void(null);" {{bindAttr title="clusterName"}}>
  33. <span {{action "showPopup" target="App.router.backgroundOperationsController"}} >{{clusterDisplayName}} </span>
  34. {{#with App.router.backgroundOperationsController}}
  35. {{#if allOperationsCount}}
  36. <i class="icon-caret-left ops-count"></i><span class="label operations-count" {{action "showPopup" target="App.router.backgroundOperationsController"}}> {{allOperationsCount}} {{t ops}}</span>
  37. {{else}}
  38. <i class="icon-caret-left"></i><span class="label" {{action "showPopup" target="App.router.backgroundOperationsController"}}>{{allOperationsCount}} {{t ops}}</span>
  39. {{/if}}
  40. {{/with}}
  41. </a>
  42. {{/if}}
  43. {{/if}}
  44. {{#if App.router.loggedIn}}
  45. <div class="top-nav-user btn-group">
  46. <button class="btn dropdown-toggle" data-toggle="dropdown">
  47. <i class="icon-user"></i>&nbsp;{{App.router.loginName}}&nbsp;<span class="caret"></span>
  48. </button>
  49. <ul class="dropdown-menu">
  50. <li><a href="" {{action showAboutPopup target="controller"}}>{{t app.aboutAmbari}}</a></li>
  51. {{#if App.isAdmin}}{{#unless App.isOperator}}
  52. <li><a href="/views/ADMIN_VIEW/1.0.0/INSTANCE/#/">{{t app.manageAmbari}}</a></li>
  53. {{/unless}}{{/if}}
  54. {{#if isClusterDataLoaded}}
  55. {{#if App.isAdmin}}
  56. <li><a href="" {{action showSettingsPopup target="controller"}}>{{t app.settings}}</a></li>
  57. {{/if}}
  58. {{/if}}
  59. <li class="break"></li>
  60. <li><a href="" {{action logoff}}>{{t app.signout}}</a></li>
  61. </ul>
  62. </div>
  63. {{/if}}
  64. {{view App.MainMenuView}}
  65. </div>
  66. </div>
  67. </div>
  68. </div>
  69. <div class="container main-container">
  70. <div id="content">
  71. {{outlet}}
  72. </div>
  73. </div>
  74. </div>