ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srima...@apache.org
Subject ambari git commit: AMBARI-11411. Enhanced configs: final icon is missing when comparing two versions. (Richard Zang via srimanth)
Date Sat, 30 May 2015 22:23:18 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 3353ec2da -> 04673a266


AMBARI-11411. Enhanced configs: final icon is missing when comparing two versions. (Richard
Zang via srimanth)


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

Branch: refs/heads/trunk
Commit: 04673a2663d50d3ae81cbc0b7dc0a3502271a4c3
Parents: 3353ec2
Author: Srimanth Gunturi <sgunturi@hortonworks.com>
Authored: Sat May 30 15:21:47 2015 -0700
Committer: Srimanth Gunturi <sgunturi@hortonworks.com>
Committed: Sat May 30 15:22:06 2015 -0700

----------------------------------------------------------------------
 .../app/controllers/main/service/info/configs.js       |  2 +-
 ambari-web/app/styles/widgets.less                     |  9 +++++++++
 .../widgets/comparison/config_widget_comparison.hbs    |  7 +++----
 .../app/templates/common/configs/widgets/controls.hbs  | 13 +++++++++++++
 .../comparison/config_widget_comparison_view.js        |  3 +--
 5 files changed, 27 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/04673a26/ambari-web/app/controllers/main/service/info/configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js
index 8e6386d..c79897b 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -658,7 +658,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
       compareObject.serviceVersion = App.ServiceConfigVersion.find(this.get('content.serviceName')
+ "_" + compareConfig.service_config_version);
       compareObject = App.ServiceConfigProperty.create(compareObject);
       compareObject.setProperties({
-        isFinal: compareConfig.isFinal,
+        isFinal: !!compareConfig.isFinal,
         value: App.config.formatOverrideValue(serviceConfig, compareConfig.value),
         compareConfigs: null
       });

http://git-wip-us.apache.org/repos/asf/ambari/blob/04673a26/ambari-web/app/styles/widgets.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/widgets.less b/ambari-web/app/styles/widgets.less
index 897c6e5..13a543e 100644
--- a/ambari-web/app/styles/widgets.less
+++ b/ambari-web/app/styles/widgets.less
@@ -78,6 +78,12 @@
       .label-current {
         padding: 2px 3px 3px 5px;
       }
+      .icon-lock {
+        position: relative;
+        top: 2px;
+        left: 2px;
+        color: #ccc;
+      }
     }
     .widget-col {
       width: 18px;
@@ -465,4 +471,7 @@
 .compare-mode {
   background-color: rgba(211, 237, 247, 0.39);
   padding: 10px 5px 0px 10px;
+  .version-labels {
+    min-width: 70px !important;
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/04673a26/ambari-web/app/templates/common/configs/widgets/comparison/config_widget_comparison.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/widgets/comparison/config_widget_comparison.hbs
b/ambari-web/app/templates/common/configs/widgets/comparison/config_widget_comparison.hbs
index cab83c3..f4ea796 100644
--- a/ambari-web/app/templates/common/configs/widgets/comparison/config_widget_comparison.hbs
+++ b/ambari-web/app/templates/common/configs/widgets/comparison/config_widget_comparison.hbs
@@ -19,7 +19,8 @@
 {{#each compareConfig in view.serviceConfigProperty.compareConfigs}}
   <div class="clearfix"></div>
   <div {{bindAttr class=":control-group :overrideField :widget-config-comparison"}}>
-    {{view view.serviceConfigProperty.widget canEditBinding="view.canEdit" configBinding="compareConfig"
categoryConfigsAllBinding="view.parentView.categoryConfigsAll" isPopoverEnabled="false"}}
+    {{view view.serviceConfigProperty.widget canEditBinding="view.canEdit" configBinding="compareConfig"
+    isBeingComparedBinding="view.isBeingCompared" categoryConfigsAllBinding="view.parentView.categoryConfigsAll"
isPopoverEnabled="false"}}
     <div class="widget-config-controls version-labels">
       <span class="label label-info">{{compareConfig.serviceVersion.versionText}}</span>
       {{#if compareConfig.serviceVersion.isCurrent}}
@@ -27,9 +28,7 @@
       {{/if}}
       {{#unless compareConfig.isMock}}
         {{#if compareConfig.supportsFinal}}
-          <a disabled="disabled" {{bindAttr class=":btn-small :btn-final compareConfig.isFinal:active
compareConfig.hideFinalIcon:hidden" }}>
-            <i class="icon-lock"></i>
-          </a>
+            <i {{bindAttr class=":icon-lock compareConfig.isFinal::hidden" }}></i>
         {{/if}}
       {{/unless}}
     </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/04673a26/ambari-web/app/templates/common/configs/widgets/controls.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/widgets/controls.hbs b/ambari-web/app/templates/common/configs/widgets/controls.hbs
index fe132f5..20651d7 100644
--- a/ambari-web/app/templates/common/configs/widgets/controls.hbs
+++ b/ambari-web/app/templates/common/configs/widgets/controls.hbs
@@ -105,11 +105,24 @@
       {{#if controller.isCurrentSelected}}
         <span class="label label-success icon-ok label-current" data-toggle="tooltip"
{{translateAttr title="common.current"}}></span>
       {{/if}}
+      {{#if view.config.supportsFinal}}
+        <i {{bindAttr class=":icon-lock view.config.isFinal::hidden" }}></i>
+      {{/if}}
     {{else}}
       <span class="label label-info">{{t common.default}}
         &nbsp;{{t services.service.config.configHistory.configGroup}}</span>
     {{/if}}
   </div>
+{{else}}
+  {{#unless view.isBeingCompared}} {{! subview(ConfigWidgetComparisonView) will take care
of config being compared}}
+    {{#unless view.canEdit}}
+      {{#if view.config.supportsFinal}}
+      <div class="widget-config-controls version-labels">
+        <i {{bindAttr class=":icon-lock view.config.isFinal::hidden" }}></i>
+      </div>
+      {{/if}}
+    {{/unless}}
+  {{/unless}}
 {{/if}}
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/04673a26/ambari-web/app/views/common/configs/widgets/comparison/config_widget_comparison_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/widgets/comparison/config_widget_comparison_view.js
b/ambari-web/app/views/common/configs/widgets/comparison/config_widget_comparison_view.js
index 970fffe..1461b87 100644
--- a/ambari-web/app/views/common/configs/widgets/comparison/config_widget_comparison_view.js
+++ b/ambari-web/app/views/common/configs/widgets/comparison/config_widget_comparison_view.js
@@ -18,7 +18,6 @@
 var App = require('app');
 
 App.ConfigWidgetComparisonView = App.ServiceConfigView.SCPComparisonRowsView.extend({
-
+  isBeingCompared: true,
   templateName: require('templates/common/configs/widgets/comparison/config_widget_comparison')
-
 });


Mime
View raw message