You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by xi...@apache.org on 2014/07/02 02:13:32 UTC

[1/2] git commit: AMBARI-6348. Switching to host config group should spin since it takes a while.(xiwang)

Repository: ambari
Updated Branches:
  refs/heads/trunk 79fddb7da -> 3ed90ad24


AMBARI-6348. Switching to host config group should spin since it takes a while.(xiwang)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3ed90ad2
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3ed90ad2
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3ed90ad2

Branch: refs/heads/trunk
Commit: 3ed90ad248281a3eadcabbfef857d1692a42151a
Parents: d1769ff
Author: Xi Wang <xi...@apache.org>
Authored: Tue Jul 1 16:47:47 2014 -0700
Committer: Xi Wang <xi...@apache.org>
Committed: Tue Jul 1 17:12:59 2014 -0700

----------------------------------------------------------------------
 ambari-web/app/messages.js                      |  2 ++
 .../common/configs/overriddenProperty.hbs       | 33 +++++++++++---------
 .../common/configs/overriddenProperty_view.js   | 16 +++++++++-
 3 files changed, 36 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3ed90ad2/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index e81ba7a..bc14fc1 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1336,6 +1336,8 @@ Em.I18n.translations = {
   'services.service.config_groups.add_config_group_popup.header':'Create New Configuration Group',
   'services.service.config_groups.duplicate_config_group_popup.header':'Duplicate Configuration Group',
   'services.service.config_groups.rename_config_group_popup.header':'Rename Configuration Group',
+  'services.service.config_groups.switchGroupTextFull':'Switch to \'{0}\' host config group',
+  'services.service.config_groups.switchGroupTextShort':'Switch to \'{0}\'',
   'services.reassign.closePopup':'Move {0} wizard is in progress. You must allow the wizard to complete for Ambari to be in usable state. If you choose to quit, you must follow manual instructions to complete or revert move {0} wizard as documented in the Ambari User Guide. Are you sure you want to exit the wizard?',
 
   'services.reassign.step1.header':'Get Started',

http://git-wip-us.apache.org/repos/asf/ambari/blob/3ed90ad2/ambari-web/app/templates/common/configs/overriddenProperty.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/overriddenProperty.hbs b/ambari-web/app/templates/common/configs/overriddenProperty.hbs
index 053015b..8fe54d9 100644
--- a/ambari-web/app/templates/common/configs/overriddenProperty.hbs
+++ b/ambari-web/app/templates/common/configs/overriddenProperty.hbs
@@ -16,22 +16,27 @@
 * limitations under the License.
 }}
 {{#each overriddenSCP in view.serviceConfigProperty.overrides}}
-    {{! Here serviceConfigBinding should ideally be serviceConfigPropertyBinding }}
-    <div {{bindAttr class="overriddenSCP.errorMessage:error: :control-group :overrideField"}}>
-      {{view overriddenSCP.viewClass serviceConfigBinding="overriddenSCP" categoryConfigsBinding="view.categoryConfigs"}}
-      {{#if view.isDefaultGroupSelected}}
-        {{#if overriddenSCP.group}}
-            <a class="action" {{action selectConfigGroup overriddenSCP.group target="controller"}}>{{overriddenSCP.group.displayName}}</a>
-        {{/if}}
+  {{! Here serviceConfigBinding should ideally be serviceConfigPropertyBinding }}
+  <div {{bindAttr class="overriddenSCP.errorMessage:error: :control-group :overrideField"}}>
+    {{view overriddenSCP.viewClass serviceConfigBinding="overriddenSCP" categoryConfigsBinding="view.categoryConfigs"}}
+    {{#if view.isDefaultGroupSelected}}
+      {{#if overriddenSCP.group}}
+        <a rel='SwitchGroupTooltip' {{bindAttr data-original-title="overriddenSCP.group.switchGroupTextFull" }} class="action" {{action selectConfigGroup overriddenSCP.group target="controller"}}>
+          {{overriddenSCP.group.switchGroupTextShort}}
+        </a>
       {{/if}}
+    {{else}}
       {{#if overriddenSCP.isEditable}}
-	      {{#if isNotDefaultValue}}
-	        <a class="action" {{action "doRestoreDefaultValue" this target="view" }} ><i class="icon-undo"></i>{{t common.undo}}</a>
-	      {{/if}}
+        {{#if isNotDefaultValue}}
+          <a class="action" {{action "doRestoreDefaultValue" this target="view" }} ><i class="icon-undo"></i>{{t common.undo}}</a>
+        {{/if}}
         {{#if App.isAdmin}}
-	        <a class="action" {{action "removeOverride" overriddenSCP target="view" }} ><i class="icon-minus-sign"></i>{{t common.remove}}</a>
+          <a class="action" {{action "removeOverride" overriddenSCP target="view" }} ><i class="icon-minus-sign"></i>{{t common.remove}}</a>
         {{/if}}
-	      <span class="help-inline">{{overriddenSCP.errorMessage}}</span>
-	    {{/if}}
-    </div>
+          <span class="help-inline">{{overriddenSCP.errorMessage}}</span>
+      {{else}}
+        <a class="action">{{overriddenSCP.group.switchGroupTextShort}}</a> <i class="icon-spinner"></i>
+      {{/if}}
+    {{/if}}
+  </div>
 {{/each}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3ed90ad2/ambari-web/app/views/common/configs/overriddenProperty_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/overriddenProperty_view.js b/ambari-web/app/views/common/configs/overriddenProperty_view.js
index 5c77371..811846e 100644
--- a/ambari-web/app/views/common/configs/overriddenProperty_view.js
+++ b/ambari-web/app/views/common/configs/overriddenProperty_view.js
@@ -23,7 +23,21 @@ App.ServiceConfigView.SCPOverriddenRowsView = Ember.View.extend({
   serviceConfigProperty: null, // is passed dynamically at runtime where ever
   // we are declaring this from configs.hbs ( we are initializing this from UI )
   categoryConfigs: null, // just declared as viewClass need it
-  
+
+  didInsertElement: function (){
+    if (this.get('isDefaultGroupSelected')) {
+      var overrides = this.get('serviceConfigProperty.overrides');
+      overrides.forEach(function(overriddenSCP) {
+        overriddenSCP.get('group').set('switchGroupTextShort',
+          Em.I18n.t('services.service.config_groups.switchGroupTextShort').format(overriddenSCP.get('group.displayName')));
+        overriddenSCP.get('group').set('switchGroupTextFull',
+          Em.I18n.t('services.service.config_groups.switchGroupTextFull').format(overriddenSCP.get('group.displayName')));
+      })
+      this.set('serviceConfigProperty.overrides', overrides);
+      App.tooltip(this.$("[rel='SwitchGroupTooltip']"));
+    }
+  },
+
   removeOverride: function (event) {
     // arg 1 SCP means ServiceConfigProperty
     var scpToBeRemoved = event.contexts[0];


[2/2] git commit: AMBARI-6345. active host table column CSS cleanup.(xiwang)

Posted by xi...@apache.org.
AMBARI-6345. active host table column CSS cleanup.(xiwang)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d1769ff0
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d1769ff0
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d1769ff0

Branch: refs/heads/trunk
Commit: d1769ff0cb4470a696cd0da72d0f9237a9e08b0c
Parents: 79fddb7
Author: Xi Wang <xi...@apache.org>
Authored: Tue Jul 1 13:49:57 2014 -0700
Committer: Xi Wang <xi...@apache.org>
Committed: Tue Jul 1 17:12:59 2014 -0700

----------------------------------------------------------------------
 ambari-web/app/styles/application.less | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d1769ff0/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index 81293c3..424681b 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -3271,9 +3271,7 @@ table.graphs {
         color: #555555;
         text-decoration: none;
         background-color: #e5e5e5;
-        -webkit-box-shadow: inset 0 5px 8px rgba(0, 0, 0, 0.100);
-        -moz-box-shadow: inset 0 5px 8px rgba(0, 0, 0, 0.100);
-        box-shadow: inset 0 5px 8px rgba(0, 0, 0, 0.100);
+        border-radius: 0px;
       }
     }
 
@@ -4460,9 +4458,7 @@ ul.filter {
         color: #555555;
         text-decoration: none;
         background-color: #e5e5e5;
-        -webkit-box-shadow: inset 0 5px 8px rgba(0, 0, 0, 0.100);
-        -moz-box-shadow: inset 0 5px 8px rgba(0, 0, 0, 0.100);
-        box-shadow: inset 0 5px 8px rgba(0, 0, 0, 0.100);
+        border-radius: 0px;
       }
     }