Repository: ambari Updated Branches: refs/heads/branch-2.2 2c941026f -> e7e6c91d0
AMBARI-15354. Edit alert UI is mis-aligned (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e7e6c91d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e7e6c91d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e7e6c91d Branch: refs/heads/branch-2.2 Commit: e7e6c91d056a45a5ff4be5a2da551a246e3cdc73 Parents: 2c94102 Author: Oleg Nechiporenko <onechipore...@apache.org> Authored: Wed Mar 9 18:13:02 2016 +0200 Committer: Oleg Nechiporenko <onechipore...@apache.org> Committed: Wed Mar 9 18:15:58 2016 +0200 ---------------------------------------------------------------------- ambari-web/app/models/alerts/alert_config.js | 1 + ambari-web/app/styles/alerts.less | 4 ++++ .../templates/main/alerts/configs/alert_config_text_field.hbs | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/e7e6c91d/ambari-web/app/models/alerts/alert_config.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/models/alerts/alert_config.js b/ambari-web/app/models/alerts/alert_config.js index ecd48fb..60a0a7c 100644 --- a/ambari-web/app/models/alerts/alert_config.js +++ b/ambari-web/app/models/alerts/alert_config.js @@ -237,6 +237,7 @@ App.AlertConfigProperties = { displayType: 'textField', unit: 'Minute', classNames: 'alert-interval-input', + stuckLeft: true, apiProperty: 'interval', isValid: function () { var value = this.get('value'); http://git-wip-us.apache.org/repos/asf/ambari/blob/e7e6c91d/ambari-web/app/styles/alerts.less ---------------------------------------------------------------------- diff --git a/ambari-web/app/styles/alerts.less b/ambari-web/app/styles/alerts.less index a2a2dcf..1b8d5f4 100644 --- a/ambari-web/app/styles/alerts.less +++ b/ambari-web/app/styles/alerts.less @@ -300,6 +300,10 @@ width: 170px; } + .stuck-left { + margin-left: 0!important; + } + .controls.shifted { margin-left: 190px; } http://git-wip-us.apache.org/repos/asf/ambari/blob/e7e6c91d/ambari-web/app/templates/main/alerts/configs/alert_config_text_field.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/alerts/configs/alert_config_text_field.hbs b/ambari-web/app/templates/main/alerts/configs/alert_config_text_field.hbs index 7cfaafa..d6da156 100644 --- a/ambari-web/app/templates/main/alerts/configs/alert_config_text_field.hbs +++ b/ambari-web/app/templates/main/alerts/configs/alert_config_text_field.hbs @@ -17,9 +17,9 @@ }} <div> {{#if view.property.badge}} - <div class="span2 badge-container"><span {{bindAttr class="view.property.badgeCssClass :alert-threshold-badge :alert-state-single-host :label"}}>{{view.property.badge}}</span> </div> + <div class="stuck-left span2 badge-container"><span {{bindAttr class="view.property.badgeCssClass :alert-threshold-badge :alert-state-single-host :label"}}>{{view.property.badge}}</span> </div> {{/if}} - <div {{bindAttr class=":span5 view.property.unit:input-append"}}> + <div {{bindAttr class=":span5 view.property.unit:input-append view.property.stuckLeft:stuck-left"}}> {{view Em.TextField valueBinding="view.property.value" disabledBinding="view.property.isDisabled"}} {{#if view.property.unit}} <span class="add-on">{{view.property.unit}}</span>