Author: yusaku
Date: Wed Jan 30 01:40:26 2013
New Revision: 1440239
URL: http://svn.apache.org/viewvc?rev=1440239&view=rev
Log:
AMBARI-1295. Move cluster name display from the main nav to the top nav.
(Jaimin Jetly via yusaku)
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/ambari-web/app/controllers/application.js
incubator/ambari/trunk/ambari-web/app/controllers/main.js
incubator/ambari/trunk/ambari-web/app/styles/application.less
incubator/ambari/trunk/ambari-web/app/templates/application.hbs
incubator/ambari/trunk/ambari-web/app/templates/main.hbs
Modified: incubator/ambari/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1440239&r1=1440238&r2=1440239&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Wed Jan 30 01:40:26 2013
@@ -36,6 +36,9 @@ Trunk (unreleased changes):
IMPROVEMENTS
+ AMBARI-1295. Move cluster name display from the main nav to the top nav.
+ (Jaimin Jetly via yusaku)
+
AMBARI-1268. Improve DAG UI. (billie via yusaku)
AMBARI-1289. App page: remove old ode and fix test mode. (srimanth via
Modified: incubator/ambari/trunk/ambari-web/app/controllers/application.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/application.js?rev=1440239&r1=1440238&r2=1440239&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/application.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/application.js Wed Jan 30
01:40:26 2013
@@ -22,13 +22,17 @@ var App = require('app');
App.ApplicationController = Em.Controller.extend({
name: 'applicationController',
+
clusterName: function () {
- var name = App.router.get('clusterController.clusterName');
- if (name) {
- return name.capitalize();
- }
- return Em.I18n.t('installer.header');
+ return (App.router.get('clusterController.clusterName') || 'My
Cluster').capitalize();
}.property('App.router.clusterController.clusterName'),
+
+ clusterDisplayName: function () {
+ var name = this.get('clusterName');
+ var displayName = name.length > 13 ? name.substr(0, 10) + "..." : name;
+ return displayName.capitalize();
+ }.property('clusterName'),
+
isClusterDataLoaded: function() {
return App.router.get('clusterController.isLoaded');
}.property('App.router.clusterController.isLoaded'),
Modified: incubator/ambari/trunk/ambari-web/app/controllers/main.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main.js?rev=1440239&r1=1440238&r2=1440239&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/main.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/main.js Wed Jan 30
01:40:26 2013
@@ -21,23 +21,6 @@ require('models/background_operation');
App.MainController = Em.Controller.extend({
name: 'mainController',
-
- clusterName: function () {
- var name = App.router.get('clusterController.clusterName');
- if (name) {
- return name;
- }
- return 'My Cluster';
- }.property('App.router.clusterController.clusterName'),
-
- clusterDisplayName: function () {
- var name = App.router.get('clusterController.clusterName');
- if (name) {
- var displayName = name.length > 13 ? name.substr(0, 10) + "..." : name;
- return displayName.capitalize();
- }
- return 'My Cluster';
- }.property('App.router.clusterController.clusterName'),
updateTitle: function(){
var name = App.router.get('clusterController.clusterName');
Modified: incubator/ambari/trunk/ambari-web/app/styles/application.less
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/styles/application.less?rev=1440239&r1=1440238&r2=1440239&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/styles/application.less (original)
+++ incubator/ambari/trunk/ambari-web/app/styles/application.less Wed Jan 30
01:40:26 2013
@@ -77,8 +77,14 @@ footer {
}
.brand.cluster-name {
- padding-left: 0px;
+ margin-left: 10px;
+
+ .operations-count {
+ background-color: #006DCC;
+ }
}
+
+
}
.navbar .nav {
@@ -116,14 +122,7 @@ footer {
}
#main-nav {
- .brand {
- font-size: 17px;
- border-right: 1px solid rgba(0, 0, 0, 0.08);
- color: #555555;
- }
- .operations-count {
- background-color: #006DCC;
- }
+
li {
font-size: 15px;
border-left: 1px solid #fefefe;
@@ -136,6 +135,18 @@ footer {
width: 140px;
}
+ li:first-child{
+ border-left: none;
+ a{
+ border-radius: 4px 0 0 4px;
+ }
+ }
+
+ .navbar-inner{
+ padding-left: 0;
+ border-left: 0;
+ }
+
margin-bottom: 20px;
}
@@ -2334,12 +2345,6 @@ ul.inline li {
background-color: #555555;
}
-#main-nav .brand {
- background-color: #777777;
- color: #FFFFFF;
- text-shadow: none;
-}
-
.modal-body {
max-height: none;
}
Modified: incubator/ambari/trunk/ambari-web/app/templates/application.hbs
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/application.hbs?rev=1440239&r1=1440238&r2=1440239&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/application.hbs (original)
+++ incubator/ambari/trunk/ambari-web/app/templates/application.hbs Wed Jan 30
01:40:26 2013
@@ -23,11 +23,20 @@
<div class="container">
<a {{translateAttr href="topnav.logo.href"}} class="logo"
target="_blank"><img src="/img/logo-small.png" alt="Apache Ambari"
title="Apache Ambari"></a>
<a class="brand" {{translateAttr href="topnav.logo.href"}}
target="_blank" alt="Apache Ambari" title="Apache Ambari">{{t app.name}}</a>
- {{!#if App.router.loggedIn} }
- <a class="brand cluster-name" href="#">
- - {{clusterName} }
+
+ {{#if isClusterDataLoaded}}
+ <a class="brand cluster-name" href="javascript:void(null);"
{{bindAttr title="clusterName"}}>
+ {{clusterDisplayName}}
+
+ {{#with App.router.backgroundOperationsController}}
+ {{#if allOperationsCount}}
+ <span class="label operations-count" {{action
"showPopup"
target="App.router.backgroundOperationsController"}}>{{allOperationsCount}}</span>
+ {{/if}}
+ {{/with}}
+
</a>
- {{/if}}
+ {{/if}}
+
<ul class="nav">
<!-- <li class="right"><a class="help" {{!translateAttr
href="topnav.help.href"}} target="_blank">Help</a></li> -->
{{#if App.router.loggedIn}}
Modified: incubator/ambari/trunk/ambari-web/app/templates/main.hbs
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main.hbs?rev=1440239&r1=1440238&r2=1440239&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/main.hbs (original)
+++ incubator/ambari/trunk/ambari-web/app/templates/main.hbs Wed Jan 30
01:40:26 2013
@@ -20,15 +20,6 @@
<div id="main-nav">
<div class="navbar">
<div class="navbar-inner">
- <a class="brand" href="#" {{bindAttr title="clusterName"}}>
- {{clusterDisplayName}}
-
- {{#view Em.View tagName=""
controllerBinding="App.router.backgroundOperationsController"}}
- {{#if allOperationsCount}}
- <span class="label operations-count" {{action "showPopup"
target="controller"}}>{{allOperationsCount}}</span>
- {{/if}}
- {{/view}}
- </a>
{{view App.MainMenuView}}
</div>
</div>