blob: 683982627a5fbc83913e7666f3b6fa538953fe5f [file] [log] [blame]
{{!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
}}
<div id="main">
{{#if App.enableDigitalClock}}
{{view App.ClockView}}
{{/if}}
<div id="main">
<div id="top-nav">
<div class="navbar navbar-static-top">
<div class="navbar-inner">
<div class="container main-container">
{{#if enableLinks}}
<a {{translateAttr href="topnav.logo.href"}} class="logo"><img src="/img/logo-white.png" alt="Apache Ambari"
title="Apache Ambari"></a>
<a class="brand" {{translateAttr href="topnav.logo.href"}} title="Apache Ambari">{{t app.name}}</a>
<a class="brand cluster-name" href="javascript:void(null);" {{bindAttr title="clusterName"}}>
{{#unless App.isClusterUser}}
<span {{action "showPopup" target="App.router.backgroundOperationsController"}} >{{clusterDisplayName}} </span>
{{#with App.router.backgroundOperationsController}}
{{#if allOperationsCount}}
<i class="icon-caret-left ops-count"></i><span id="span-bg-operation-count"
class="label operations-count" {{action "showPopup" target="App.router.backgroundOperationsController"}}>
{{allOperationsCount}} {{pluralize allOperationsCount singular="t:op" plural="t:ops"}}</span>
{{else}}
<i class="icon-caret-left"></i><span id="span-bg-operation-count"
class="label" {{action "showPopup" target="App.router.backgroundOperationsController"}}>
{{allOperationsCount}} {{pluralize allOperationsCount singular="t:op" plural="t:ops"}}</span>
{{/if}}
{{/with}}
{{/unless}}
{{#if App.router.clusterController.isAlertsLoaded}}
{{#if App.router.mainAlertDefinitionsController.unhealthyAlertInstancesCount}}
<span {{bindAttr class=":label App.router.mainAlertDefinitionsController.isCriticalAlerts:alert-crit-count:alert-warn-count"}} {{action "showPopup" target="App.router.mainAlertInstancesController"}}>
{{App.router.mainAlertDefinitionsController.unhealthyAlertInstancesCount}} {{pluralize App.router.mainAlertDefinitionsController.unhealthyAlertInstancesCount singular="alert" plural="alerts"}}</span>
{{else}}
<span {{translateAttr title="titlebar.alerts.noAlerts"}}
class="label alerts-none-count" {{action "showPopup" target="App.router.mainAlertInstancesController"}}>
{{App.router.mainAlertDefinitionsController.unhealthyAlertInstancesCount}} {{pluralize App.router.mainAlertDefinitionsController.unhealthyAlertInstancesCount singular="alert" plural="alerts"}}</span>
{{/if}}
{{/if}}
</a>
{{else}}
<a class="logo"><img src="/img/logo-white.png" alt="Apache Ambari" title="Apache Ambari"></a>
<a class="brand" title="Apache Ambari">{{t app.name}}</a>
{{/if}}
{{#if App.router.loggedIn}}
<div class="top-nav-user btn-group">
<button class="btn dropdown-toggle" data-toggle="dropdown">
<i class="icon-user"></i>&nbsp;{{App.router.displayLoginName}}&nbsp;<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="" id="about" {{action showAboutPopup target="controller"}}>{{t app.aboutAmbari}}</a></li>
{{#if App.router.clusterInstallCompleted}}
{{#if isClusterDataLoaded}}
{{#isAuthorized "AMBARI.ADD_DELETE_CLUSTERS, AMBARI.ASSIGN_ROLES, AMBARI.EDIT_STACK_REPOS, AMBARI.MANAGE_GROUPS, AMBARI.MANAGE_STACK_VERSIONS, AMBARI.MANAGE_USERS, AMBARI.MANAGE_VIEWS, AMBARI.RENAME_CLUSTER, AMBARI.MANAGE_USERS"}}
<li><a href=""
id="manage-ambari" {{action goToAdminView target="controller"}}>{{t app.manageAmbari}}</a>
</li>
{{/isAuthorized}}
{{/if}}
{{else}}
{{#if App.isPermissionDataLoaded}}
{{#isAuthorized "AMBARI.ADD_DELETE_CLUSTERS, AMBARI.ASSIGN_ROLES, AMBARI.EDIT_STACK_REPOS, AMBARI.MANAGE_GROUPS, AMBARI.MANAGE_STACK_VERSIONS, AMBARI.MANAGE_USERS, AMBARI.MANAGE_VIEWS, AMBARI.RENAME_CLUSTER, AMBARI.MANAGE_USERS"}}
<li><a href=""
id="manage-ambari" {{action goToAdminView target="controller"}}>{{t app.manageAmbari}}</a>
</li>
{{/isAuthorized}}
{{/if}}
{{/if}}
{{#if isExistingClusterDataLoaded}}
{{#isAuthorized "AMBARI.MANAGE_SETTINGS"}}
<li><a href="" {{action showSettingsPopup target="App.router.userSettingsController"}}>{{t app.settings}}</a></li>
{{/isAuthorized}}
{{/if}}
{{#if showExitLink}}
<li class="break"></li>
<li><a href="" id="sign-out" {{action logoff}}>{{t app.signout}}</a></li>
{{/if}}
</ul>
</div>
{{/if}}
{{view App.MainMenuView}}
</div>
</div>
</div>
</div>
<div class="container main-container">
<div id="content">
{{#if App.wizardIsNotFinished}}
<div class="ru-badge span12">
<div class="navbar navbar-static-top clearfix">
<div class="span11">
{{#if isExistingClusterDataLoaded}}
<p class="span4 offset4">
{{#if App.router.wizardWatcherController.isNonWizardUser}}
<span class="brand cluster-name">
<span class="label upgrade-in-progress">
<i class="icon-cog"></i>&nbsp;{{App.router.wizardWatcherController.wizardDisplayName}}
</span>
</span>
{{/if}}
{{#isAuthorized "CLUSTER.UPGRADE_DOWNGRADE_STACK"}}
<a class="brand cluster-name" href="#">
{{else}}
<a class="brand cluster-name">
{{/isAuthorized}}
{{#if showUpgradeLabel}}
<span {{bindAttr class="upgradeMap.cls :label"}} {{action "openUpgradeDialog" target="App.router.mainAdminStackAndUpgradeController"}}>
<i {{bindAttr class="upgradeMap.icon"}}></i>&nbsp;
{{upgradeMap.msg}}
</span>
{{/if}}
</a>
</p>
{{#if App.router.mainAdminStackAndUpgradeController.isFinalizeItem}}
<p class="span10 alert alert-danger">{{t admin.stackVersions.version.upgrade.notFinalized.warning}}</p>
{{/if}}
{{/if}}
</div>
</div>
</div>
{{/if}}
{{outlet}}
</div>
</div>
</div>