From 63adf40d88f59db554948ff7fe4d04a56362ad13 Mon Sep 17 00:00:00 2001 From: denz Date: Thu, 27 Apr 2017 13:33:59 +0900 Subject: [PATCH] fix bug. https://github.com/naver/pinpoint/issues/2860 --- .../application/alarm-rule.directive.js | 18 ++++++++++++++++-- .../configuration/application/alarmRule.html | 10 +++++----- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/web/src/main/webapp/features/configuration/application/alarm-rule.directive.js b/web/src/main/webapp/features/configuration/application/alarm-rule.directive.js index ff2aba236..4ca277d64 100644 --- a/web/src/main/webapp/features/configuration/application/alarm-rule.directive.js +++ b/web/src/main/webapp/features/configuration/application/alarm-rule.directive.js @@ -214,6 +214,20 @@ scope.ruleList = oRuleList; }, showAlert ); }; + scope.onCaptureUpdateClick = function($event) { + if ( $event.target.tagName.toUpperCase() === "SPAN" ) { + var $target = $($event.target); + if ( $target.hasClass( "update-confirm") ) { + scope.onApplyUpdateAlarm(); + } else if ( $target.hasClass( "update-cancel") ) { + scope.onCancelUpdateAlarm(); + } else if ( $target.hasClass( "add-confirm") ) { + scope.onApplyAddAlarm(); + } else if ( $target.hasClass( "add-cancel" ) ) { + scope.onCancelAddAlarm(); + } + } + }; scope.$on("applicationGroup.sub.load", function( event, appId, invokeCount ) { currentApplicationId = appId; cancelPreviousWork(); @@ -245,7 +259,7 @@ }; }]); var CONSTS = { - SELECT_USERGROUP_OR_RULE: "Select user group or rule.", + SELECT_USER_GROUP_OR_RULE: "Select user group or rule.", EXIST_A_SAME: "Exist a same rule set in the list", DIV_NORMAL: "div._normal", DIV_REMOVE: "div._remove", @@ -278,7 +292,7 @@ $.each( aEditNodes, function( index, $el ) { $el.addClass("blink-blink"); }); - cbFail({ errorMessage: CONSTS.SELECT_USERGROUP_OR_RULE }); + cbFail({ errorMessage: CONSTS.SELECT_USER_GROUP_OR_RULE }); return; } if ( cbHasAlarm( oNewRule.userGroupId, oNewRule.checkerName ) ) { diff --git a/web/src/main/webapp/features/configuration/application/alarmRule.html b/web/src/main/webapp/features/configuration/application/alarmRule.html index 5cf6bec68..223f4bb80 100644 --- a/web/src/main/webapp/features/configuration/application/alarmRule.html +++ b/web/src/main/webapp/features/configuration/application/alarmRule.html @@ -15,7 +15,7 @@ - +