You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by on...@apache.org on 2015/04/04 10:52:13 UTC

[1/2] ambari git commit: AMBARI-10357. Merge Enhanced Configs overrides and comparisons to the separated views (onechiporenko)

Repository: ambari
Updated Branches:
  refs/heads/trunk c9033c986 -> fc18e469b


AMBARI-10357. Merge Enhanced Configs overrides and comparisons to the separated views (onechiporenko)


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

Branch: refs/heads/trunk
Commit: a27378257cec945e154afcaa3b5e3e22dfe06121
Parents: c9033c9
Author: Oleg Nechiporenko <on...@apache.org>
Authored: Sat Apr 4 11:35:22 2015 +0300
Committer: Oleg Nechiporenko <on...@apache.org>
Committed: Sat Apr 4 11:35:22 2015 +0300

----------------------------------------------------------------------
 .../mixins/common/configs/enhanced_configs.js   |  2 +-
 .../configs/widgets/checkbox_config_widget.hbs  |  4 +-
 .../configs/widgets/combo_config_widget.hbs     | 10 ++++
 .../checkbox_config_widget_comparison.hbs       | 34 -----------
 .../comparison/config_widget_comparison.hbs     | 34 +++++++++++
 .../slider_config_widget_comparison.hbs         | 34 -----------
 .../configs/widgets/directory_config_widget.hbs | 10 ++++
 .../configs/widgets/list_config_widget.hbs      | 10 ++++
 .../checkbox_config_widget_override.hbs         | 61 --------------------
 .../overrides/config_widget_override.hbs        | 61 ++++++++++++++++++++
 .../overrides/slider_config_widget_override.hbs | 61 --------------------
 .../configs/widgets/radio_button_config.hbs     | 10 ++++
 .../configs/widgets/slider_config_widget.hbs    |  4 +-
 .../configs/widgets/textfield_config_widget.hbs | 10 ++++
 .../configs/widgets/time_interval_spinner.hbs   | 10 ++++
 .../configs/widgets/toggle_config_widget.hbs    | 10 ++++
 ambari-web/app/views.js                         |  6 +-
 .../configs/service_config_layout_tab_view.js   | 22 +++----
 .../checkbox_config_widget_comparison_view.js   | 24 --------
 .../comparison/config_widget_comparison_view.js | 24 ++++++++
 .../slider_config_widget_comparison_view.js     | 24 --------
 .../checkbox_config_widget_override_view.js     | 25 --------
 .../overrides/config_widget_override_view.js    | 25 ++++++++
 .../slider_config_widget_override_view.js       | 25 --------
 24 files changed, 229 insertions(+), 311 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a2737825/ambari-web/app/mixins/common/configs/enhanced_configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js b/ambari-web/app/mixins/common/configs/enhanced_configs.js
index f6b4588..948865e 100644
--- a/ambari-web/app/mixins/common/configs/enhanced_configs.js
+++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js
@@ -498,7 +498,7 @@ App.EnhancedConfigsMixin = Em.Mixin.create({
    * @private
    */
   _saveRecommendedValues: function(data, updateOnlyBoundaries) {
-    Em.assert('invalid data', data && data.resources[0] && Em.get(data.resources[0], 'recommendations.blueprint.configurations'));
+    Em.assert('invalid data - `data.resources[0].recommendations.blueprint.configurations` not defined ', data && data.resources[0] && Em.get(data.resources[0], 'recommendations.blueprint.configurations'));
     var configs = data.resources[0].recommendations.blueprint.configurations;
     /** get all configs by config group **/
     var stepConfigsByGroup = this._getConfigsByGroup(this.get('stepConfigs'));

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2737825/ambari-web/app/templates/common/configs/widgets/checkbox_config_widget.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/widgets/checkbox_config_widget.hbs b/ambari-web/app/templates/common/configs/widgets/checkbox_config_widget.hbs
index d68b02e..b515489 100644
--- a/ambari-web/app/templates/common/configs/widgets/checkbox_config_widget.hbs
+++ b/ambari-web/app/templates/common/configs/widgets/checkbox_config_widget.hbs
@@ -55,12 +55,12 @@
 {{/if}}
 
 {{#if view.isOriginalSCP}}
-  {{view App.CheckboxConfigWidgetOverrideView
+  {{view App.ConfigWidgetOverrideView
   serviceConfigPropertyBinding="view.config"
   isDefaultGroupSelectedBinding="controller.selectedConfigGroup.isDefault"
   }}
 {{/if}}
 
 {{#if view.isComparison}}
-  {{view App.CheckboxConfigWidgetComparisonView serviceConfigPropertyBinding="view.config"}}
+  {{view App.ConfigWidgetComparisonView serviceConfigPropertyBinding="view.config"}}
 {{/if}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2737825/ambari-web/app/templates/common/configs/widgets/combo_config_widget.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/widgets/combo_config_widget.hbs b/ambari-web/app/templates/common/configs/widgets/combo_config_widget.hbs
index cf12229..edddf0f 100644
--- a/ambari-web/app/templates/common/configs/widgets/combo_config_widget.hbs
+++ b/ambari-web/app/templates/common/configs/widgets/combo_config_widget.hbs
@@ -33,4 +33,14 @@
   </div>
 </div>
 {{view App.RestoreConfigView}}
+{{#if view.isOriginalSCP}}
+  {{view App.ConfigWidgetOverrideView
+  serviceConfigPropertyBinding="view.config"
+  isDefaultGroupSelectedBinding="controller.selectedConfigGroup.isDefault"
+  }}
+{{/if}}
+
+{{#if view.isComparison}}
+  {{view App.ConfigWidgetComparisonView serviceConfigPropertyBinding="view.config"}}
+{{/if}}
 <div class="clearfix"></div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2737825/ambari-web/app/templates/common/configs/widgets/comparison/checkbox_config_widget_comparison.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/widgets/comparison/checkbox_config_widget_comparison.hbs b/ambari-web/app/templates/common/configs/widgets/comparison/checkbox_config_widget_comparison.hbs
deleted file mode 100644
index 67e06c9..0000000
--- a/ambari-web/app/templates/common/configs/widgets/comparison/checkbox_config_widget_comparison.hbs
+++ /dev/null
@@ -1,34 +0,0 @@
-{{!
-* 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.
-}}
-
-{{#each compareConfig in view.serviceConfigProperty.compareConfigs}}
-  <div {{bindAttr class=":control-group :overrideField"}}>
-    {{view App.CheckboxConfigWidgetView configBinding="compareConfig" categoryConfigsAllBinding="view.parentView.categoryConfigsAll" isPopoverEnabled="false"}}
-      <span class="label label-info">{{compareConfig.serviceVersion.versionText}}</span>
-      {{#if compareConfig.serviceVersion.isCurrent}}
-        <span class="label label-success">{{t common.current}}</span>
-      {{/if}}
-      {{#unless compareConfig.isMock}}
-        {{#if compareConfig.supportsFinal}}
-          <a disabled="disabled" {{bindAttr class=":btn :btn-small :btn-final compareConfig.isFinal:active compareConfig.hideFinalIcon:hidden" }}>
-            <i class="icon-lock"></i>
-          </a>
-        {{/if}}
-      {{/unless}}
-  </div>
-{{/each}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2737825/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
new file mode 100644
index 0000000..b5975de
--- /dev/null
+++ b/ambari-web/app/templates/common/configs/widgets/comparison/config_widget_comparison.hbs
@@ -0,0 +1,34 @@
+{{!
+* 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.
+}}
+
+{{#each compareConfig in view.serviceConfigProperty.compareConfigs}}
+  <div {{bindAttr class=":control-group :overrideField"}}>
+    {{view view.serviceConfigProperty.widget configBinding="compareConfig" categoryConfigsAllBinding="view.parentView.categoryConfigsAll" isPopoverEnabled="false"}}
+      <span class="label label-info">{{compareConfig.serviceVersion.versionText}}</span>
+      {{#if compareConfig.serviceVersion.isCurrent}}
+        <span class="label label-success">{{t common.current}}</span>
+      {{/if}}
+      {{#unless compareConfig.isMock}}
+        {{#if compareConfig.supportsFinal}}
+          <a disabled="disabled" {{bindAttr class=":btn :btn-small :btn-final compareConfig.isFinal:active compareConfig.hideFinalIcon:hidden" }}>
+            <i class="icon-lock"></i>
+          </a>
+        {{/if}}
+      {{/unless}}
+  </div>
+{{/each}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2737825/ambari-web/app/templates/common/configs/widgets/comparison/slider_config_widget_comparison.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/widgets/comparison/slider_config_widget_comparison.hbs b/ambari-web/app/templates/common/configs/widgets/comparison/slider_config_widget_comparison.hbs
deleted file mode 100644
index 0688c44..0000000
--- a/ambari-web/app/templates/common/configs/widgets/comparison/slider_config_widget_comparison.hbs
+++ /dev/null
@@ -1,34 +0,0 @@
-{{!
-* 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.
-}}
-
-{{#each compareConfig in view.serviceConfigProperty.compareConfigs}}
-  <div {{bindAttr class=":control-group :overrideField"}}>
-    {{view App.SliderConfigWidgetView configBinding="compareConfig" categoryConfigsAllBinding="view.parentView.categoryConfigsAll" isPopoverEnabled="false"}}
-      <span class="label label-info">{{compareConfig.serviceVersion.versionText}}</span>
-      {{#if compareConfig.serviceVersion.isCurrent}}
-        <span class="label label-success">{{t common.current}}</span>
-      {{/if}}
-      {{#unless compareConfig.isMock}}
-        {{#if compareConfig.supportsFinal}}
-          <a disabled="disabled" {{bindAttr class=":btn :btn-small :btn-final compareConfig.isFinal:active compareConfig.hideFinalIcon:hidden" }}>
-            <i class="icon-lock"></i>
-          </a>
-        {{/if}}
-      {{/unless}}
-  </div>
-{{/each}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2737825/ambari-web/app/templates/common/configs/widgets/directory_config_widget.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/widgets/directory_config_widget.hbs b/ambari-web/app/templates/common/configs/widgets/directory_config_widget.hbs
index 856a973..35095f5 100644
--- a/ambari-web/app/templates/common/configs/widgets/directory_config_widget.hbs
+++ b/ambari-web/app/templates/common/configs/widgets/directory_config_widget.hbs
@@ -24,3 +24,13 @@
 {{#if view.configErrorMessage}}
   <p class="text-error">{{view.configErrorMessage}}</p>
 {{/if}}
+{{#if view.isOriginalSCP}}
+  {{view App.ConfigWidgetOverrideView
+  serviceConfigPropertyBinding="view.config"
+  isDefaultGroupSelectedBinding="controller.selectedConfigGroup.isDefault"
+  }}
+{{/if}}
+
+{{#if view.isComparison}}
+  {{view App.ConfigWidgetComparisonView serviceConfigPropertyBinding="view.config"}}
+{{/if}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2737825/ambari-web/app/templates/common/configs/widgets/list_config_widget.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/widgets/list_config_widget.hbs b/ambari-web/app/templates/common/configs/widgets/list_config_widget.hbs
index e8e2aa2..62bbfc9 100644
--- a/ambari-web/app/templates/common/configs/widgets/list_config_widget.hbs
+++ b/ambari-web/app/templates/common/configs/widgets/list_config_widget.hbs
@@ -39,4 +39,14 @@
       {{/each}}
     </ul>
   </div>
+  {{#if view.isOriginalSCP}}
+    {{view App.ConfigWidgetOverrideView
+    serviceConfigPropertyBinding="view.config"
+    isDefaultGroupSelectedBinding="controller.selectedConfigGroup.isDefault"
+    }}
+  {{/if}}
+
+  {{#if view.isComparison}}
+    {{view App.ConfigWidgetComparisonView serviceConfigPropertyBinding="view.config"}}
+  {{/if}}
 </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2737825/ambari-web/app/templates/common/configs/widgets/overrides/checkbox_config_widget_override.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/widgets/overrides/checkbox_config_widget_override.hbs b/ambari-web/app/templates/common/configs/widgets/overrides/checkbox_config_widget_override.hbs
deleted file mode 100644
index 1b77cba..0000000
--- a/ambari-web/app/templates/common/configs/widgets/overrides/checkbox_config_widget_override.hbs
+++ /dev/null
@@ -1,61 +0,0 @@
-{{!
-* 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.
-}}
-{{#each overriddenSCP in view.serviceConfigProperty.overrides}}
-{{! Here serviceConfigBinding should ideally be serviceConfigPropertyBinding }}
-  <div {{bindAttr class="overriddenSCP.errorMessage:error: :control-group :overrideField"}}>
-    {{view App.CheckboxConfigWidgetView configBinding="overriddenSCP" isPopoverEnabled="false"}}
-    <div {{bindAttr class="view.parentView.isHover:show:not-show"}}>
-      {{#if overriddenSCP.supportsFinal}}
-        <a href="#" data-toggle="tooltip"
-          {{bindAttr class=":btn :btn-small :btn-final overriddenSCP.isFinal:active overriddenSCP.hideFinalIcon:hidden" disabled="overriddenSCP.isNotEditable"}}
-          {{action "toggleFinalFlag" overriddenSCP target="view"}}
-          {{translateAttr data-original-title="services.service.config.final"}}>
-          <i class="icon-lock"></i>
-        </a>
-      {{/if}}
-      {{#if view.isDefaultGroupSelected}}
-        {{#if overriddenSCP.group}}
-          <a href="#" data-toggle="tooltip" {{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="btn btn-small" href="#" data-toggle="tooltip"
-              {{action "doRestoreDefaultValue" overriddenSCP target="view"}}
-              {{translateAttr data-original-title="common.undo"}}>
-              <i class="icon-undo"></i>
-            </a>
-          {{/if}}
-          {{#isAccessible ADMIN}}
-            <a class="btn btn-small" href="#" data-toggle="tooltip"
-              {{action "removeOverride" overriddenSCP target="view"}}
-              {{translateAttr data-original-title="common.remove"}}>
-              <i class="icon-minus-sign"></i>
-            </a>
-          {{/isAccessible}}
-          <span class="help-inline">{{overriddenSCP.errorMessage}}</span>
-        {{else}}
-          <a class="action">{{overriddenSCP.group.switchGroupTextShort}}</a> <i class="icon-spinner"></i>
-        {{/if}}
-      {{/if}}
-    </div>
-  </div>
-{{/each}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2737825/ambari-web/app/templates/common/configs/widgets/overrides/config_widget_override.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/widgets/overrides/config_widget_override.hbs b/ambari-web/app/templates/common/configs/widgets/overrides/config_widget_override.hbs
new file mode 100644
index 0000000..66dc49d
--- /dev/null
+++ b/ambari-web/app/templates/common/configs/widgets/overrides/config_widget_override.hbs
@@ -0,0 +1,61 @@
+{{!
+* 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.
+}}
+{{#each overriddenSCP in view.serviceConfigProperty.overrides}}
+{{! Here serviceConfigBinding should ideally be serviceConfigPropertyBinding }}
+  <div {{bindAttr class="overriddenSCP.errorMessage:error: :control-group :overrideField"}}>
+    {{view view.serviceConfigProperty.widget configBinding="overriddenSCP" isPopoverEnabled="false"}}
+    <div {{bindAttr class="view.parentView.isHover:show:not-show"}}>
+      {{#if overriddenSCP.supportsFinal}}
+        <a href="#" data-toggle="tooltip"
+          {{bindAttr class=":btn :btn-small :btn-final overriddenSCP.isFinal:active overriddenSCP.hideFinalIcon:hidden" disabled="overriddenSCP.isNotEditable"}}
+          {{action "toggleFinalFlag" overriddenSCP target="view"}}
+          {{translateAttr data-original-title="services.service.config.final"}}>
+          <i class="icon-lock"></i>
+        </a>
+      {{/if}}
+      {{#if view.isDefaultGroupSelected}}
+        {{#if overriddenSCP.group}}
+          <a href="#" data-toggle="tooltip" {{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="btn btn-small" href="#" data-toggle="tooltip"
+              {{action "doRestoreDefaultValue" overriddenSCP target="view"}}
+              {{translateAttr data-original-title="common.undo"}}>
+              <i class="icon-undo"></i>
+            </a>
+          {{/if}}
+          {{#isAccessible ADMIN}}
+            <a class="btn btn-small" href="#" data-toggle="tooltip"
+              {{action "removeOverride" overriddenSCP target="view"}}
+              {{translateAttr data-original-title="common.remove"}}>
+              <i class="icon-minus-sign"></i>
+            </a>
+          {{/isAccessible}}
+          <span class="help-inline">{{overriddenSCP.errorMessage}}</span>
+        {{else}}
+          <a class="action">{{overriddenSCP.group.switchGroupTextShort}}</a> <i class="icon-spinner"></i>
+        {{/if}}
+      {{/if}}
+    </div>
+  </div>
+{{/each}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2737825/ambari-web/app/templates/common/configs/widgets/overrides/slider_config_widget_override.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/widgets/overrides/slider_config_widget_override.hbs b/ambari-web/app/templates/common/configs/widgets/overrides/slider_config_widget_override.hbs
deleted file mode 100644
index 565e305..0000000
--- a/ambari-web/app/templates/common/configs/widgets/overrides/slider_config_widget_override.hbs
+++ /dev/null
@@ -1,61 +0,0 @@
-{{!
-* 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.
-}}
-{{#each overriddenSCP in view.serviceConfigProperty.overrides}}
-{{! Here serviceConfigBinding should ideally be serviceConfigPropertyBinding }}
-  <div {{bindAttr class="overriddenSCP.errorMessage:error: :control-group :overrideField"}}>
-    {{view App.SliderConfigWidgetView configBinding="overriddenSCP" isPopoverEnabled="false"}}
-    <div {{bindAttr class="view.parentView.isHover:show:not-show"}}>
-      {{#if overriddenSCP.supportsFinal}}
-        <a href="#" data-toggle="tooltip"
-          {{bindAttr class=":btn :btn-small :btn-final overriddenSCP.isFinal:active overriddenSCP.hideFinalIcon:hidden" disabled="overriddenSCP.isNotEditable"}}
-          {{action "toggleFinalFlag" overriddenSCP target="view"}}
-          {{translateAttr data-original-title="services.service.config.final"}}>
-          <i class="icon-lock"></i>
-        </a>
-      {{/if}}
-      {{#if view.isDefaultGroupSelected}}
-        {{#if overriddenSCP.group}}
-          <a href="#" data-toggle="tooltip" {{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="btn btn-small" href="#" data-toggle="tooltip"
-              {{action "doRestoreDefaultValue" overriddenSCP target="view"}}
-              {{translateAttr data-original-title="common.undo"}}>
-              <i class="icon-undo"></i>
-            </a>
-          {{/if}}
-          {{#isAccessible ADMIN}}
-            <a class="btn btn-small" href="#" data-toggle="tooltip"
-              {{action "removeOverride" overriddenSCP target="view"}}
-              {{translateAttr data-original-title="common.remove"}}>
-              <i class="icon-minus-sign"></i>
-            </a>
-          {{/isAccessible}}
-          <span class="help-inline">{{overriddenSCP.errorMessage}}</span>
-        {{else}}
-          <a class="action">{{overriddenSCP.group.switchGroupTextShort}}</a> <i class="icon-spinner"></i>
-        {{/if}}
-      {{/if}}
-    </div>
-  </div>
-{{/each}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2737825/ambari-web/app/templates/common/configs/widgets/radio_button_config.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/widgets/radio_button_config.hbs b/ambari-web/app/templates/common/configs/widgets/radio_button_config.hbs
index fd23429..89dab64 100644
--- a/ambari-web/app/templates/common/configs/widgets/radio_button_config.hbs
+++ b/ambari-web/app/templates/common/configs/widgets/radio_button_config.hbs
@@ -30,4 +30,14 @@
   {{/each}}
 </div>
 {{view App.RestoreConfigView}}
+{{#if view.isOriginalSCP}}
+  {{view App.ConfigWidgetOverrideView
+  serviceConfigPropertyBinding="view.config"
+  isDefaultGroupSelectedBinding="controller.selectedConfigGroup.isDefault"
+  }}
+{{/if}}
+
+{{#if view.isComparison}}
+  {{view App.ConfigWidgetComparisonView serviceConfigPropertyBinding="view.config"}}
+{{/if}}
 <div class="clearfix"></div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2737825/ambari-web/app/templates/common/configs/widgets/slider_config_widget.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/widgets/slider_config_widget.hbs b/ambari-web/app/templates/common/configs/widgets/slider_config_widget.hbs
index 57c10c6..554c706 100644
--- a/ambari-web/app/templates/common/configs/widgets/slider_config_widget.hbs
+++ b/ambari-web/app/templates/common/configs/widgets/slider_config_widget.hbs
@@ -56,13 +56,13 @@
   {{/if}}
 
   {{#if view.isOriginalSCP}}
-    {{view App.SliderConfigWidgetOverrideView
+    {{view App.ConfigWidgetOverrideView
       serviceConfigPropertyBinding="view.config"
       isDefaultGroupSelectedBinding="controller.selectedConfigGroup.isDefault"
     }}
   {{/if}}
 
   {{#if view.isComparison}}
-    {{view App.SliderConfigWidgetComparisonView serviceConfigPropertyBinding="view.config"}}
+    {{view App.ConfigWidgetComparisonView serviceConfigPropertyBinding="view.config"}}
   {{/if}}
 </div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2737825/ambari-web/app/templates/common/configs/widgets/textfield_config_widget.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/widgets/textfield_config_widget.hbs b/ambari-web/app/templates/common/configs/widgets/textfield_config_widget.hbs
index 4bd5c20..57af194 100644
--- a/ambari-web/app/templates/common/configs/widgets/textfield_config_widget.hbs
+++ b/ambari-web/app/templates/common/configs/widgets/textfield_config_widget.hbs
@@ -25,3 +25,13 @@
 {{#if view.configErrorMessage}}
   <p class="text-error">{{view.configErrorMessage}}</p>
 {{/if}}
+{{#if view.isOriginalSCP}}
+  {{view App.ConfigWidgetOverrideView
+  serviceConfigPropertyBinding="view.config"
+  isDefaultGroupSelectedBinding="controller.selectedConfigGroup.isDefault"
+  }}
+{{/if}}
+
+{{#if view.isComparison}}
+  {{view App.ConfigWidgetComparisonView serviceConfigPropertyBinding="view.config"}}
+{{/if}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2737825/ambari-web/app/templates/common/configs/widgets/time_interval_spinner.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/widgets/time_interval_spinner.hbs b/ambari-web/app/templates/common/configs/widgets/time_interval_spinner.hbs
index 204f1b2..54c606a 100644
--- a/ambari-web/app/templates/common/configs/widgets/time_interval_spinner.hbs
+++ b/ambari-web/app/templates/common/configs/widgets/time_interval_spinner.hbs
@@ -30,4 +30,14 @@
   <div class="clearfix"></div>
   <p class="text-error">{{view.errorMessage}}</p>
 {{/if}}
+{{#if view.isOriginalSCP}}
+  {{view App.ConfigWidgetOverrideView
+  serviceConfigPropertyBinding="view.config"
+  isDefaultGroupSelectedBinding="controller.selectedConfigGroup.isDefault"
+  }}
+{{/if}}
+
+{{#if view.isComparison}}
+  {{view App.ConfigWidgetComparisonView serviceConfigPropertyBinding="view.config"}}
+{{/if}}
 <div class="clearfix"></div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2737825/ambari-web/app/templates/common/configs/widgets/toggle_config_widget.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/widgets/toggle_config_widget.hbs b/ambari-web/app/templates/common/configs/widgets/toggle_config_widget.hbs
index ab5986e..0c8f268 100644
--- a/ambari-web/app/templates/common/configs/widgets/toggle_config_widget.hbs
+++ b/ambari-web/app/templates/common/configs/widgets/toggle_config_widget.hbs
@@ -21,4 +21,14 @@
   {{view Ember.Checkbox checkedBinding="view.switcherValue"}}
 </div>
 {{view App.RestoreConfigView}}
+{{#if view.isOriginalSCP}}
+  {{view App.ConfigWidgetOverrideView
+  serviceConfigPropertyBinding="view.config"
+  isDefaultGroupSelectedBinding="controller.selectedConfigGroup.isDefault"
+  }}
+{{/if}}
+
+{{#if view.isComparison}}
+  {{view App.ConfigWidgetComparisonView serviceConfigPropertyBinding="view.config"}}
+{{/if}}
 <div class="clearfix"></div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2737825/ambari-web/app/views.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views.js b/ambari-web/app/views.js
index 78daf4f..48d86d7 100644
--- a/ambari-web/app/views.js
+++ b/ambari-web/app/views.js
@@ -65,10 +65,8 @@ require('views/common/configs/widgets/slider_config_widget_view');
 require('views/common/configs/widgets/string_config_widget_view');
 require('views/common/configs/widgets/time_interval_spinner_view');
 require('views/common/configs/widgets/toggle_config_widget_view');
-require('views/common/configs/widgets/overrides/checkbox_config_widget_override_view');
-require('views/common/configs/widgets/overrides/slider_config_widget_override_view');
-require('views/common/configs/widgets/comparison/checkbox_config_widget_comparison_view');
-require('views/common/configs/widgets/comparison/slider_config_widget_comparison_view');
+require('views/common/configs/widgets/overrides/config_widget_override_view');
+require('views/common/configs/widgets/comparison/config_widget_comparison_view');
 require('views/common/configs/service_config_layout_tab_view');
 require('views/common/filter_combobox');
 require('views/common/filter_combo_cleanable');

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2737825/ambari-web/app/views/common/configs/service_config_layout_tab_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/service_config_layout_tab_view.js b/ambari-web/app/views/common/configs/service_config_layout_tab_view.js
index 73f89fa..d67b970 100644
--- a/ambari-web/app/views/common/configs/service_config_layout_tab_view.js
+++ b/ambari-web/app/views/common/configs/service_config_layout_tab_view.js
@@ -77,23 +77,17 @@ App.ServiceConfigLayoutTabView = Em.View.extend(App.ConfigOverridable, {
               var configWidgetType = config.get('widget.type');
               var widget = widgetTypeMap[configWidgetType];
               Em.assert('Unknown config widget view for config ' + configProperty.get('id') + ' with type ' + configWidgetType, widget);
-              configProperty.set('widget', widget);
-              configProperty.set('stackConfigProperty', config);
+              configProperty.setProperties({
+                widget: widget,
+                stackConfigProperty: config
+              });
               if (configProperty.get('overrides')) {
-                configProperty.get('overrides').forEach(function (override) {
-                  override.setProperties({
-                    widget: widget,
-                    stackConfigProperty: config
-                  });
-                });
+                configProperty.get('overrides').setEach('stackConfigProperty', config);
               }
               if (configProperty.get('compareConfigs')) {
-                configProperty.get('compareConfigs').forEach(function (compareConfig) {
-                  compareConfig.setProperties({
-                    widget: widget,
-                    isComparison: false,
-                    stackConfigProperty: config
-                  });
+                configProperty.get('compareConfigs').invoke('setProperties', {
+                  isComparison: false,
+                  stackConfigProperty: config
                 });
               }
             });

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2737825/ambari-web/app/views/common/configs/widgets/comparison/checkbox_config_widget_comparison_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/widgets/comparison/checkbox_config_widget_comparison_view.js b/ambari-web/app/views/common/configs/widgets/comparison/checkbox_config_widget_comparison_view.js
deleted file mode 100644
index 62a0351..0000000
--- a/ambari-web/app/views/common/configs/widgets/comparison/checkbox_config_widget_comparison_view.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * 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.
- */
-
-var App = require('app');
-
-App.CheckboxConfigWidgetComparisonView = App.ServiceConfigView.SCPComparisonRowsView.extend({
-
-  templateName: require('templates/common/configs/widgets/comparison/checkbox_config_widget_comparison')
-
-});

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2737825/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
new file mode 100644
index 0000000..970fffe
--- /dev/null
+++ b/ambari-web/app/views/common/configs/widgets/comparison/config_widget_comparison_view.js
@@ -0,0 +1,24 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+App.ConfigWidgetComparisonView = App.ServiceConfigView.SCPComparisonRowsView.extend({
+
+  templateName: require('templates/common/configs/widgets/comparison/config_widget_comparison')
+
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2737825/ambari-web/app/views/common/configs/widgets/comparison/slider_config_widget_comparison_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/widgets/comparison/slider_config_widget_comparison_view.js b/ambari-web/app/views/common/configs/widgets/comparison/slider_config_widget_comparison_view.js
deleted file mode 100644
index 440b884..0000000
--- a/ambari-web/app/views/common/configs/widgets/comparison/slider_config_widget_comparison_view.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * 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.
- */
-
-var App = require('app');
-
-App.SliderConfigWidgetComparisonView = App.ServiceConfigView.SCPComparisonRowsView.extend({
-
-  templateName: require('templates/common/configs/widgets/comparison/slider_config_widget_comparison')
-
-});

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2737825/ambari-web/app/views/common/configs/widgets/overrides/checkbox_config_widget_override_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/widgets/overrides/checkbox_config_widget_override_view.js b/ambari-web/app/views/common/configs/widgets/overrides/checkbox_config_widget_override_view.js
deleted file mode 100644
index 93e7f75..0000000
--- a/ambari-web/app/views/common/configs/widgets/overrides/checkbox_config_widget_override_view.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * 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.
- */
-
-var App = require('app');
-
-App.CheckboxConfigWidgetOverrideView = App.ServiceConfigView.SCPOverriddenRowsView.extend({
-
-  templateName: require('templates/common/configs/widgets/overrides/checkbox_config_widget_override')
-
-});

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2737825/ambari-web/app/views/common/configs/widgets/overrides/config_widget_override_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/widgets/overrides/config_widget_override_view.js b/ambari-web/app/views/common/configs/widgets/overrides/config_widget_override_view.js
new file mode 100644
index 0000000..8c055c1
--- /dev/null
+++ b/ambari-web/app/views/common/configs/widgets/overrides/config_widget_override_view.js
@@ -0,0 +1,25 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+App.ConfigWidgetOverrideView = App.ServiceConfigView.SCPOverriddenRowsView.extend({
+
+  templateName: require('templates/common/configs/widgets/overrides/config_widget_override')
+
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2737825/ambari-web/app/views/common/configs/widgets/overrides/slider_config_widget_override_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/widgets/overrides/slider_config_widget_override_view.js b/ambari-web/app/views/common/configs/widgets/overrides/slider_config_widget_override_view.js
deleted file mode 100644
index 5cb6f9e..0000000
--- a/ambari-web/app/views/common/configs/widgets/overrides/slider_config_widget_override_view.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * 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.
- */
-
-var App = require('app');
-
-App.SliderConfigWidgetOverrideView = App.ServiceConfigView.SCPOverriddenRowsView.extend({
-
-  templateName: require('templates/common/configs/widgets/overrides/slider_config_widget_override')
-
-});


[2/2] ambari git commit: AMBARI-10358. After click on Override, original slider becomes editable for some configs (onechiporenko)

Posted by on...@apache.org.
AMBARI-10358. After click on Override, original slider becomes editable for some configs (onechiporenko)


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

Branch: refs/heads/trunk
Commit: fc18e469b17ed3c146bc6e6531f1389c95a429f9
Parents: a273782
Author: Oleg Nechiporenko <on...@apache.org>
Authored: Sat Apr 4 11:36:21 2015 +0300
Committer: Oleg Nechiporenko <on...@apache.org>
Committed: Sat Apr 4 11:36:21 2015 +0300

----------------------------------------------------------------------
 .../widgets/slider_config_widget_view.js        | 102 +++++++++++--------
 1 file changed, 58 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/fc18e469/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
index 968047a..59074c2 100644
--- a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
+++ b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
@@ -36,31 +36,6 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
   slider: null,
 
   /**
-   * recreate widget in case max or min values were changed
-   * @method changeBoundaries
-   */
-  changeBoundaries: function() {
-    if ($.mocho) {
-      //temp fix as it can broke test that doesn't have any connection with this method
-      return;
-    }
-    var self = this;
-    var valueAttributes = this.get('config.stackConfigProperty.valueAttributes');
-    Em.run.once(this, function() {
-      self.prepareValueAttributes();
-      if (self.get('slider')) {
-        self.get('slider').destroy();
-        self.initSlider();
-        if (self.get('config.value') > Em.get(valueAttributes, 'maximum')) {
-          self.set('mirrorValue', Em.get(valueAttributes, 'maximum'))
-        }
-        if (self.get('config.value') < Em.get(valueAttributes, 'minimum')) {
-          self.set('mirrorValue', Em.get(valueAttributes, 'minimum'))
-        }
-      }
-    })
-  },
-  /**
    * Determines if widget controls should be disabled
    * @type {boolean}
    */
@@ -178,7 +153,8 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
    * set widget value same as config value
    */
   setValue: function() {
-    this.set('mirrorValue', this.get('config.value'));
+    var parseFunction = this.get('parseFunction');
+    this.set('mirrorValue', parseFunction(this.get('config.value')));
   },
 
   /**
@@ -255,38 +231,42 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
       var val = parseFunction(obj.newValue);
       self.set('config.value', '' + val);
       self.set('mirrorValue', val);
-    });
-    /**
-     * action to run sendRequestRorDependentConfigs when
-     * we have changed config value within slider
-     */
-    slider.on('slideStop', function() {
-      self.sendRequestRorDependentConfigs(self.get('config'));
-    });
+    }).on('slideStop', function() {
+        /**
+         * action to run sendRequestRorDependentConfigs when
+         * we have changed config value within slider
+         */
+        self.sendRequestRorDependentConfigs(self.get('config'));
+      });
+    this.set('slider', slider);
+    var sliderTicks = this.$('.ui-slider-wrapper:eq(0) .slider-tick');
 
-    this.$('.slider-track .slider-tick.round:eq({0})'.format(defaultValueId)).addClass('slider-tick-default').on('click', function() {
+    sliderTicks.eq(defaultValueId).addClass('slider-tick-default').on('click', function() {
       self.restoreValue();
     });
     // if mirrored value was added need to hide the tick for it
     if (defaultValueMirroredId) {
-      this.$('.slider-tick:eq({0})'.format(defaultValueMirroredId)).hide();
+      sliderTicks.eq(defaultValueMirroredId).hide();
     }
-    this.set('slider', slider);
     // hide some ticks. can't do this via css
     if (defaultValueId == 0) {
-      this.$('.slider-tick:last').hide();
-    } else if (defaultValueId == ticks.length - 1) {
-      this.$('.slider-tick:first').hide();
-    } else {
-      this.$('.slider-tick:first, .slider-tick:last').hide();
-    }
+      sliderTicks.last().hide();
+    } else
+      if (defaultValueId == ticks.length - 1) {
+        sliderTicks.first().hide();
+      }
+      else {
+        sliderTicks.first().hide();
+        sliderTicks.last().hide();
+      }
   },
 
   /**
    * Convert value according to property attribute unit.
    *
    * @method valueForTick
-   * @param {Number}
+   * @param {Number} val
+   * @private
    * @returns {Number}
    */
   valueForTick: function(val) {
@@ -304,6 +284,40 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
       val = parseFunction(this.get('config.value'));
     this.get('slider').setValue(val);
     this.set('mirrorValue', val);
+  },
+
+  /**
+   * Run changeBoundariesOnce only once
+   * @method changeBoundaries
+   */
+  changeBoundaries: function() {
+    Em.run.once(this, 'changeBoundariesOnce');
+  },
+
+  /**
+   * recreate widget in case max or min values were changed
+   * @method changeBoundariesOnce
+   */
+  changeBoundariesOnce: function () {
+    if ($.mocho) {
+      //temp fix as it can broke test that doesn't have any connection with this method
+      return;
+    }
+    var self = this;
+    var valueAttributes = this.get('config.stackConfigProperty.valueAttributes');
+
+    self.prepareValueAttributes();
+    if (self.get('slider')) {
+      self.get('slider').destroy();
+      self.initSlider();
+      if (self.get('config.value') > Em.get(valueAttributes, 'maximum')) {
+        self.set('mirrorValue', Em.get(valueAttributes, 'maximum'))
+      }
+      if (self.get('config.value') < Em.get(valueAttributes, 'minimum')) {
+        self.set('mirrorValue', Em.get(valueAttributes, 'minimum'))
+      }
+      self.toggleWidgetState();
+    }
   }
 
 });