You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by rz...@apache.org on 2016/02/23 03:09:06 UTC
ambari git commit: AMBARI-15096. Edit WEB Alert should show Critical
for Connection Timeout (Joe Wang via rzang)
Repository: ambari
Updated Branches:
refs/heads/branch-2.2 217d5fea5 -> 720b7907d
AMBARI-15096. Edit WEB Alert should show Critical for Connection Timeout (Joe Wang via rzang)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/720b7907
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/720b7907
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/720b7907
Branch: refs/heads/branch-2.2
Commit: 720b7907da77331ce4ff0c11bd7aa546047c04bf
Parents: 217d5fe
Author: Richard Zang <rz...@apache.org>
Authored: Mon Feb 22 18:05:40 2016 -0800
Committer: Richard Zang <rz...@apache.org>
Committed: Mon Feb 22 18:05:40 2016 -0800
----------------------------------------------------------------------
ambari-web/app/models/alerts/alert_config.js | 8 ++++++++
.../main/alerts/configs/alert_config_text_field.hbs | 15 ++++++++++-----
2 files changed, 18 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/720b7907/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 839c80d..ecd48fb 100644
--- a/ambari-web/app/models/alerts/alert_config.js
+++ b/ambari-web/app/models/alerts/alert_config.js
@@ -442,6 +442,14 @@ App.AlertConfigProperties = {
label: 'Connection Timeout',
displayType: 'textField',
classNames: 'alert-connection-timeout',
+ badge: 'CRITICAL',
+ /**
+ * Custom css-class for different badges
+ * type {string}
+ */
+ badgeCssClass: function () {
+ return 'alert-state-' + this.get('badge');
+ }.property('badge'),
apiProperty: 'source.uri.connection_timeout',
unit: 'Seconds',
isValid: function () {
http://git-wip-us.apache.org/repos/asf/ambari/blob/720b7907/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 79f1fcb..7cfaafa 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
@@ -15,9 +15,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
}}
-<div {{bindAttr class="view.property.unit:input-append"}}>
- {{view Em.TextField valueBinding="view.property.value" disabledBinding="view.property.isDisabled"}}
- {{#if view.property.unit}}
- <span class="add-on">{{view.property.unit}}</span>
+<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>
{{/if}}
-</div>
+ <div {{bindAttr class=":span5 view.property.unit:input-append"}}>
+ {{view Em.TextField valueBinding="view.property.value" disabledBinding="view.property.isDisabled"}}
+ {{#if view.property.unit}}
+ <span class="add-on">{{view.property.unit}}</span>
+ {{/if}}
+ </div>
+</div>
\ No newline at end of file