You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2012/12/09 15:53:11 UTC

svn commit: r1418991 [2/2] - in /incubator/ambari/branches/AMBARI-666/ambari-web/app: ./ assets/data/apps/jobs/ assets/data/users/ controllers/ controllers/wizard/ mappers/ styles/ templates/ templates/main/ templates/main/dashboard/service/ templates/...

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/users/user_user.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/users/user_user.json?rev=1418991&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/users/user_user.json (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/users/user_user.json Sun Dec  9 14:53:08 2012
@@ -0,0 +1,10 @@
+{
+  "href" : "http://dev.hortonworks.com:8080/api/v1/users/user",
+  "Users" : {
+    "user_name" : "user",
+    "ldap_user" : false,
+    "roles" : [
+      "user"
+    ]
+  }
+}

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/users/users.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/users/users.json?rev=1418991&r1=1418990&r2=1418991&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/users/users.json (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/users/users.json Sun Dec  9 14:53:08 2012
@@ -1,25 +1,47 @@
 {
-  "href": "http://ambari:8080/api/clusters/mycluster/users",
-  "items": [
+  "href" : "http://dev.hortonworks.com:8080/api/v1/users/?fields=*",
+  "items" : [
     {
-      "href" : "http://ambari:8080/api/users/admin",
-      "Users" :
-      { "user_name" : "admin", "roles" : "admin,user",  "type" : "local" }
+      "href" : "http://dev.hortonworks.com:8080/api/v1/users/user",
+      "Users" : {
+        "user_name" : "user",
+        "ldap_user" : false,
+        "roles" : [
+          "user"
+        ]
+      }
     },
     {
-      "href" : "http://ambari:8080/api/users/user",
-      "Users" :
-      { "user_name" : "user", "roles" : "user", "type" : "local" }
+      "href" : "http://dev.hortonworks.com:8080/api/v1/users/admin",
+      "Users" : {
+        "user_name" : "admin",
+        "ldap_user" : false,
+        "roles" : [
+          "admin",
+          "user"
+        ]
+      }
     },
     {
-      "href" : "http://ambari:8080/api/users/john",
-      "Users" :
-      { "user_name" : "john", "roles" : "admin,user", "type" : "LDAP" }
+      "href" : "http://dev.hortonworks.com:8080/api/v1/users/jone",
+      "Users" : {
+        "user_name" : "jone",
+        "ldap_user" : true,
+        "roles" : [
+          "user"
+        ]
+      }
     },
     {
-      "href" : "http://ambari:8080/api/users/mike",
-      "Users" :
-      { "user_name" : "mike", "roles" : "user", "type" : "LDAP" }
+      "href" : "http://dev.hortonworks.com:8080/api/v1/users/alex",
+      "Users" : {
+        "user_name" : "alex",
+        "ldap_user" : false,
+        "roles" : [
+          "admin",
+          "user"
+        ]
+      }
     }
   ]
-}
+}
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/login_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/login_controller.js?rev=1418991&r1=1418990&r2=1418991&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/login_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/login_controller.js Sun Dec  9 14:53:08 2012
@@ -32,7 +32,7 @@ App.LoginController = Em.Object.extend({
     this.set('errorMessage', '');
 
     var self = this;
-    var loginFunc = (App.testMode) ? App.get('router').mockLogin : App.get('router').login;
+    var loginFunc =  App.get('router').login;
 
     var user = loginFunc.call(App.get('router'), function (isAuthenticated) {
       if (!isAuthenticated) {

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main.js?rev=1418991&r1=1418990&r2=1418991&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main.js Sun Dec  9 14:53:08 2012
@@ -21,6 +21,13 @@ require('models/background_operation');
 
 App.MainController = Em.Controller.extend({
   name: 'mainController',
+  clusterName: function () {
+    var name = App.db.getClusterName();
+    if (name) {
+      return name.capitalize();
+    }
+    return 'My Cluster';
+  }.property(),
   isClusterDataLoaded: function(){
       return App.router.get('clusterController.isLoaded');
   }.property('App.router.clusterController.isLoaded'),

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step3_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step3_controller.js?rev=1418991&r1=1418990&r2=1418991&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step3_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step3_controller.js Sun Dec  9 14:53:08 2012
@@ -277,9 +277,13 @@ App.WizardStep3Controller = Em.Controlle
               _host.set('bootStatus', 'REGISTERED');
               _host.set('bootLog', (_host.get('bootLog') != null ? _host.get('bootLog') : '') + '\nRegistration with the server succeeded.');
             }
+          } else if (_host.get('bootStatus') == 'FAILED') {
+            // ignore FAILED hosts
           } else {
+            // there are some hosts that are not REGISTERED or FAILED
+            // we need to keep polling
             allRegistered = false;
-            if (_host.get('bootStatus') != 'FAILED' && _host.get('bootStatus') != 'REGISTERING') {
+            if (_host.get('bootStatus') != 'REGISTERING') {
               _host.set('bootStatus', 'REGISTERING');
               currentBootLog = _host.get('bootLog') != null ? _host.get('bootLog') : '';
               _host.set('bootLog', (_host.get('bootLog') != null ? _host.get('bootLog') : '') + '\nRegistering with the server...');
@@ -391,7 +395,44 @@ App.WizardStep3Controller = Em.Controlle
 
       bodyClass: Ember.View.extend({
         templateName: require('templates/wizard/step3_host_log_popup'),
-        host: host
+        host: host,
+        didInsertElement: function () {
+          var self = this;
+          var button = $(this.get('element')).find('#textTrigger');
+          button.click(function () {
+            if(self.get('isTextArea')){
+              $(this).text('click to highlight');
+            } else {
+              $(this).text('press CTRL+C');
+            }
+            self.set('isTextArea', !self.get('isTextArea'));
+          });
+          $(this.get('element')).find('.content-area').mouseenter(
+            function () {
+              var element = $(this);
+              element.css('border', '1px solid #dcdcdc');
+              button.css('visibility', 'visible');
+            }).mouseleave(
+            function () {
+              var element = $(this);
+              element.css('border', 'none');
+              button.css('visibility', 'hidden');
+            })
+        },
+        isTextArea: false,
+        textArea: Em.TextArea.extend({
+          didInsertElement: function(){
+            var element = $(this.get('element'));
+            element.width($(this.get('parentView').get('element')).width() - 10);
+            element.height($(this.get('parentView').get('element')).height());
+            element.select();
+            element.css('resize', 'none');
+          },
+          disabled: true,
+          value: function(){
+            return this.get('content');
+          }.property('content')
+        })
       })
     });
   },

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step8_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step8_controller.js?rev=1418991&r1=1418990&r2=1418991&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step8_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step8_controller.js Sun Dec  9 14:53:08 2012
@@ -774,7 +774,7 @@ App.WizardStep8Controller = Em.Controlle
     var allHosts = this.get('content.hostsInfo');
     var data = [];
     for (var hostName in allHosts) {
-      if (!allHosts[hostName].isInstalled) {
+      if (!allHosts[hostName].isInstalled && allHosts[hostName].bootStatus == 'REGISTERED') {
         data.pushObject({"Hosts": { "host_name": hostName}});
       }
     }

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step9_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step9_controller.js?rev=1418991&r1=1418990&r2=1418991&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step9_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step9_controller.js Sun Dec  9 14:53:08 2012
@@ -520,7 +520,6 @@ App.WizardStep9Controller = Em.Controlle
       } else {
         url = 'data/wizard/deploy/poll_' + this.numPolls + '.json';
       }
-      debugger;
     }
 
     $.ajax({

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js?rev=1418991&r1=1418990&r2=1418991&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js Sun Dec  9 14:53:08 2012
@@ -39,9 +39,9 @@ App.hostsMapper = App.QuickDataMapper.cr
     disk_info: 'Hosts.disk_info',
     disk_usage: 'disk_usage',
     health_status: 'Hosts.host_status',
-    load_one: 'Hosts.load.load_one',
-    load_five: 'Hosts.load.load_five',
-    load_fifteen: 'Hosts.load.load_fifteen',
+    load_one: 'metrics.load.load_one',
+    load_five: 'metrics.load.load_five',
+    load_fifteen: 'metrics.load.load_fifteen',
     cpu_usage: 'cpu_usage',
     memory_usage: 'memory_usage',
     $network_usage: 36,
@@ -110,7 +110,7 @@ App.hostsMapper = App.QuickDataMapper.cr
 
         }
       }, this);
-      // console.log(this.get('model'), result);
+       //console.log(this.get('model'), result);
 
     }
   },

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/users_mapper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/users_mapper.js?rev=1418991&r1=1418990&r2=1418991&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/users_mapper.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/users_mapper.js Sun Dec  9 14:53:08 2012
@@ -20,8 +20,26 @@
 App.usersMapper = App.QuickDataMapper.create({
   model : App.User,
   config : {
+    id : 'Users.user_name',
     user_name : 'Users.user_name',
     roles : 'Users.roles',
-    is_ldap: 'Users.ldap_user'
+    is_ldap: 'Users.ldap_user',
+    admin: 'Users.admin'
+  },
+  map: function (json) {
+    self = this;
+    json.items.forEach(function (item) {
+      var result= [] ;
+      if(App.User.find(item.Users.user_name).get("userName") != item.Users.user_name)
+      {
+        if(item.Users.roles.indexOf("admin") >= 0){
+          item.Users.admin = true;
+        }else{
+          item.Users.admin = false;
+        }
+        result.push(self.parseIt(item, self.config));
+        App.store.loadMany(self.get('model'), result);
+      }
+    });
   }
 });

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js?rev=1418991&r1=1418990&r2=1418991&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js Sun Dec  9 14:53:08 2012
@@ -135,9 +135,18 @@ App.Router = Em.Router.extend({
     controller.set('loginName', loginName);
     var hash = window.btoa(loginName + ":" + controller.get('password'));
     var router = this;
+    var url = '';
+
+    if(loginName === "admin" && controller.get('password') === 'admin')
+    {
+      url = '/data/users/user_admin.json';
+    }else if(loginName === 'user' && controller.get('password') === 'user'){
+      url = '/data/users/user_user.json';
+    }
+
     $.ajax({
-      url : App.apiPrefix + '/users/' + loginName,
-      dataType : 'text',
+      url : (App.testMode) ? url  : App.apiPrefix + '/users/' + loginName ,
+      dataType : 'json',
       type: 'GET',
       beforeSend: function (xhr) {
         xhr.setRequestHeader("Authorization", "Basic " + hash);
@@ -156,18 +165,18 @@ App.Router = Em.Router.extend({
       success: function (data) {
         console.log('login success');
 
-        var resp = $.parseJSON(data);
+        var resp = data;
         var isAdmin = resp.Users.roles.indexOf('admin') >= 0;
         if(isAdmin){
           router.setAuthenticated(true);
           router.setLoginName(loginName);
-
-          router.setUser(App.store.createRecord(App.User, { userName: loginName, admin: isAdmin }));
+          App.usersMapper.map({"items":[data]});
+          router.setUser(App.User.find(loginName));
           router.transitionTo(router.getSection());
           postLogin(true);
         } else {
           $.ajax({
-            url: App.apiPrefix + '/clusters',
+            url:  (App.testMode) ? '/data/clusters/info.json' : App.apiPrefix + '/clusters',
             dataType: 'text',
             type: 'GET',
             success: function (data) {
@@ -175,8 +184,8 @@ App.Router = Em.Router.extend({
               if (clusterResp.items.length) {
                 router.setAuthenticated(true);
                 router.setLoginName(loginName);
-
-                router.setUser(App.store.createRecord(App.User, { userName: loginName, admin: isAdmin }));
+                App.usersMapper.map({"items":[resp]});
+                router.setUser(App.User.find(loginName));
                 router.transitionTo(router.getSection());
                 postLogin(true);
               } else {
@@ -234,54 +243,6 @@ App.Router = Em.Router.extend({
     });
   },
 
-  mockLogin: function (postLogin) {
-    var controller = this.get('loginController');
-    var loginName = controller.get('loginName');
-    var router = this;
-    if ((loginName === 'admin' && controller.get('password') === 'admin') ||
-      (loginName === 'user' && controller.get('password') === 'user')) {
-      if(loginName === 'admin'){
-        router.setAuthenticated(true);
-        router.setLoginName(loginName);
-
-        router.setUser(App.store.createRecord(App.User, { userName: loginName, admin: loginName === 'admin' }));
-        router.setAmbariStacks();
-
-        router.transitionTo(router.getSection());
-        postLogin(true);
-      } else {
-        $.ajax({
-          url: '/data/clusters/info.json',
-          dataType: 'text',
-          type: 'GET',
-          success: function (data) {
-            var clusterResp = $.parseJSON(data);
-            if (clusterResp.items.length) {
-              router.setAuthenticated(true);
-              router.setLoginName(loginName);
-
-              router.setUser(App.store.createRecord(App.User, { userName: loginName, admin: loginName === 'admin' }));
-              router.setAmbariStacks();
-
-              router.transitionTo(router.getSection());
-              postLogin(true);
-            } else {
-              controller.set('errorMessage', "Your administrator has not set up a Hadoop cluster yet.");
-            }
-          },
-          error: function (req) {
-            console.log("Server not responding: " + req.statusCode);
-          }
-        });
-      }
-    } else {
-      router.setAuthenticated(false);
-      postLogin(false);
-    }
-
-
-  },
-
   getSection: function () {
     if (App.alwaysGoToInstaller) {
       return 'installer';

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less?rev=1418991&r1=1418990&r2=1418991&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less Sun Dec  9 14:53:08 2012
@@ -131,6 +131,7 @@ footer {
   .brand {
     font-size: 17px;
     border-right: 1px solid rgba(0, 0, 0, 0.08);
+    color: #555555;
   }
   .operations-count {
     background-color: #006DCC;
@@ -1881,6 +1882,18 @@ ul.inline li {
 #step10-content {
   max-height: 440px;
 }
+.content-area {
+  position: relative;
+  #textTrigger {
+    cursor: pointer;
+    position: absolute;
+    right: 0;
+    top: 0;
+    visibility: hidden;
+    background-color: #dcdcdc;
+  }
+}
+
 
 //bootstrap
 //.dropdown-menu .active > a, .dropdown-menu .active > a:hover {
@@ -1894,3 +1907,10 @@ ul.inline li {
   background-position: 0;
 }
 // COMBOBOX FIXES END
+@media all and (max-width: 1024px) {
+  #main-nav {
+    li.span2 {
+      width: 125px;
+    }
+  }
+}

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/apps.less
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/apps.less?rev=1418991&r1=1418990&r2=1418991&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/apps.less (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/apps.less Sun Dec  9 14:53:08 2012
@@ -359,4 +359,13 @@
   }
 }
 
+@media all and (max-width: 1024px) {
+  .big-modal {
+    .modal {
+      width: 980px;
+      margin: -290px 0 0 -495px;
+    }
+  }
+}
+
 /*Big modal window end*/
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main.hbs?rev=1418991&r1=1418990&r2=1418991&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main.hbs Sun Dec  9 14:53:08 2012
@@ -21,7 +21,7 @@
   <div class="navbar">
     <div class="navbar-inner">
       <a class="brand" href="#">
-        My Cluster
+        {{clusterName}}
 
           {{#view App.EmptyView controllerBinding="App.router.backgroundOperationsController"}}
             {{#if allOperationsCount}}

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/background_operations_popup.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/background_operations_popup.hbs?rev=1418991&r1=1418990&r2=1418991&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/background_operations_popup.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/background_operations_popup.hbs Sun Dec  9 14:53:08 2012
@@ -23,14 +23,25 @@
         <i {{bindAttr class="view.iconClass"}}></i>
         {{#if view.isOpen}}Hide{{else}}Show{{/if}} info about {{operation.command}} {{operation.role}} on {{operation.host_name}}
       </a>
+      <div class="content-area">
+      <div id="textTrigger">click to highlight</div>
       {{#if view.isOpen}}
+      {{#if view.isTextArea}}
+      <div>
+      {{view view.textArea contentBinding="operation"}}
+      </div>
+      {{else}}
+      <div>
         <h5>exitcode:</h5>
         <pre class="stderr">{{operation.exit_code}}</pre>
         <h5>stderr:</h5>
         <pre class="stderr">{{highlight operation.stderr [err;fail]}}</pre>
         <h5>stdout:</h5>
         <pre class="stdout">{{highlight operation.stdout [err;fail]}}</pre>
+      </div>
       {{/if}}
-    </div>
+      {{/if}}
+      </div>
+     </div>
   {{/view}}
 {{/each}}
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hbase.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hbase.hbs?rev=1418991&r1=1418990&r2=1418991&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hbase.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hbase.hbs Sun Dec  9 14:53:08 2012
@@ -20,9 +20,9 @@
 <div class="clearfix" {{action toggleInfoView target="view"}}>
   <div class="name span2">
     {{#if view.isCollapsed}}
-    <i class="icon-arrow-down pull-left"></i>
+    <i class="icon-caret-down pull-left"></i>
     {{else}}
-    <i class="icon-arrow-right pull-left"></i>
+    <i class="icon-caret-right pull-left"></i>
     {{/if}}
     {{view App.MainDashboardServiceHealthView serviceBinding="view.service"}}
     <a {{action selectService view.service href=true}}>{{view.service.displayName}}</a>

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hdfs.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hdfs.hbs?rev=1418991&r1=1418990&r2=1418991&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hdfs.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hdfs.hbs Sun Dec  9 14:53:08 2012
@@ -20,9 +20,9 @@
 <div class="clearfix" {{action toggleInfoView target="view"}}>
   <div class="name span2">
     {{#if view.isCollapsed}}
-    <i class="icon-arrow-down pull-left"></i>
+    <i class="icon-caret-down pull-left"></i>
     {{else}}
-    <i class="icon-arrow-right pull-left"></i>
+    <i class="icon-caret-right pull-left"></i>
     {{/if}}
     {{view App.MainDashboardServiceHealthView serviceBinding="view.service"}}
     <a {{action selectService view.service href=true}}>{{view.service.displayName}}</a>

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs?rev=1418991&r1=1418990&r2=1418991&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs Sun Dec  9 14:53:08 2012
@@ -20,9 +20,9 @@
 <div class="clearfix" {{action toggleInfoView target="view"}}>
   <div class="name span2">
     {{#if view.isCollapsed}}
-    <i class="icon-arrow-down pull-left"></i>
+    <i class="icon-caret-down pull-left"></i>
     {{else}}
-    <i class="icon-arrow-right pull-left"></i>
+    <i class="icon-caret-right pull-left"></i>
     {{/if}}
     {{view App.MainDashboardServiceHealthView serviceBinding="view.service"}}
     <a {{action selectService view.service href=true}}>{{view.service.displayName}}</a>

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step3_host_log_popup.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step3_host_log_popup.hbs?rev=1418991&r1=1418990&r2=1418991&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step3_host_log_popup.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step3_host_log_popup.hbs Sun Dec  9 14:53:08 2012
@@ -18,7 +18,14 @@
 
 
 <div id="host-log">
-  <div>
+  <div class="content-area">
+      <div id="textTrigger">click to highlight</div>
+    {{#if view.isTextArea}}
+    <div>
+      {{view view.textArea contentBinding="view.host.bootLog"}}
+    </div>
+    {{else}}
     <pre class="bootLog">{{view.host.bootLog}}</pre>
+    {{/if}}
   </div>
 </div>

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/common/chart/linear_time.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/common/chart/linear_time.js?rev=1418991&r1=1418990&r2=1418991&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/common/chart/linear_time.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/common/chart/linear_time.js Sun Dec  9 14:53:08 2012
@@ -215,11 +215,11 @@ App.ChartLinearTimeView = Ember.View.ext
         var c = value[value.length - 1];
         if (!isNaN(parseInt(c))) {
           // c is digit
-          value = parseFloat(value).toFixed(3);
+          value = parseFloat(value).toFixed(3).replace(/0+$/, '').replace(/\.$/, '');
         }
         else {
           // c in not digit
-          value = parseFloat(value.substr(0, value.length - 1)).toFixed(3) + c;
+          value = parseFloat(value.substr(0, value.length - 1)).toFixed(3).replace(/0+$/, '').replace(/\.$/, '') + c;
         }
         return value;
       },
@@ -540,7 +540,7 @@ App.ChartLinearTimeView.PercentageFormat
   if (!value || value.length < 1) {
     value = '0 %';
   } else {
-    value = value.toFixed(3) + '%';
+    value = value.toFixed(3).replace(/0+$/, '').replace(/\.$/, '') + '%';
   }
   return value;
 };
@@ -569,9 +569,9 @@ App.ChartLinearTimeView.TimeElapsedForma
     } else if (seconds > 0) {
       value = seconds + ' s';
     } else if (millis > 0) {
-      value = millis.toFixed(3) + ' ms';
+      value = millis.toFixed(3).replace(/0+$/, '').replace(/\.$/, '') + ' ms';
     } else {
-      value = millis.toFixed(3) + ' ms';
+      value = millis.toFixed(3).replace(/0+$/, '').replace(/\.$/, '') + ' ms';
     }
   }
   return value;

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main.js?rev=1418991&r1=1418990&r2=1418991&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main.js Sun Dec  9 14:53:08 2012
@@ -32,6 +32,53 @@ App.MainBackgroundOperation = Em.View.ex
     return this.get('isOpen') ? 'icon-minus' : 'icon-plus';
   }.property('isOpen'),
   showOperationLog:function(){
-    this.set('isOpen', !this.get('isOpen'))
-  }
+    this.set('isOpen', !this.get('isOpen'));
+    this.set('isTextArea', false);
+  },
+  buttonLabel:function(){
+    var button = $(this.get('element')).find('#textTrigger');
+    if(this.get('isTextArea')){
+      button.text('press CTRL+C');
+    } else {
+      button.text('click to highlight');
+    }
+  }.observes('isTextArea'),
+  didInsertElement: function () {
+    var self = this;
+    var button = $(this.get('element')).find('#textTrigger');
+    button.click(function () {
+      self.set('isTextArea', !self.get('isTextArea'));
+    });
+    $(this.get('element')).find('.content-area').mouseenter(
+      function () {
+        var element = $(this);
+        element.css('border', '1px solid #dcdcdc');
+        button.css('visibility', 'visible');
+      }).mouseleave(
+      function () {
+        var element = $(this);
+        element.css('border', 'none');
+        button.css('visibility', 'hidden');
+      })
+  },
+  isTextArea: false,
+  textArea: Em.TextArea.extend({
+    didInsertElement: function(){
+      var element = $(this.get('element'));
+      element.width($(this.get('parentView').get('element')).width() - 10);
+      element.height($(this.get('parentView').get('element')).height());
+      element.select();
+      element.css('resize', 'none');
+    },
+    disabled: true,
+    value: function(){
+      var operation = this.get('content');
+      var content = "";
+      content += operation.command + " " + operation.role + " on " + operation.host_name + "\n";
+      content += "exitcode: " + operation.exit_code + "\n";
+      content += "stderr: " + operation.stderr + "\n";
+      content += "stdout: " + operation.stdout + "\n";
+      return content;
+    }.property('content')
+  })
 });
\ No newline at end of file