diff --git a/web/src/main/webapp/features/configuration/alarm/alarm-user-group.directive.js b/web/src/main/webapp/features/configuration/alarm/alarm-user-group.directive.js index d5f562ff7..7a4c30994 100644 --- a/web/src/main/webapp/features/configuration/alarm/alarm-user-group.directive.js +++ b/web/src/main/webapp/features/configuration/alarm/alarm-user-group.directive.js @@ -37,8 +37,8 @@ var $elTotal = $element.find(".total"); var $elLoading = $element.find(".some-loading"); var $elAlert = $element.find(".some-alert"); - var $elFilterInput = $element.find("div.filter-input input"); - var $elFilterEmpty = $element.find("div.filter-input button.trash"); + var $elSearchInput = $element.find("div.filter-input input"); + var $elSearchEmpty = $element.find("div.filter-input button.trash"); var $elEdit = $element.find(".some-edit-content"); var $elEditInput = $elEdit.find("input"); var $elEditGuide = $elEdit.find(".title-message"); @@ -83,7 +83,7 @@ }); function reset() { alarmUtilService.unsetFilterBackground( $elWrapper ); - $elFilterInput.val(""); + $elSearchInput.val(""); } function removeConfirm( $el ) { @@ -161,8 +161,9 @@ isRemoving = false; }, function( errorData ) {}, $elAlert ); } - function loadGroupList( isFirst ) { - alarmUtilService.sendCRUD( "getUserGroupList", { "userId" : (globalConfig.userId || "") }, function( resultData ) { + function loadGroupList( isFirst, sParam ) { + alarmUtilService.sendCRUD( "getUserGroupList", + angular.isUndefined(sParam) || sParam == "" ? { "userId" : (globalConfig.userId || "") } : { "userGroupId" : sParam }, function( resultData ) { // @TODO // 많이 쓰는 놈 기준 3개를 뽑아 내야 함. isLoadedUserGroupList = true; @@ -189,7 +190,7 @@ analyticsService.send( analyticsService.CONST.MAIN, analyticsService.CONST.CLK_ALARM_REFRESH_USER_GROUP ); reset(); alarmUtilService.showLoading( $elLoading, false ); - loadGroupList( false ); + loadGroupList( false, $.trim( $elSearchInput.val() ) ); }; scope.onCreate = function() { if ( isRemoving == true ) return; @@ -213,51 +214,17 @@ alarmUtilService.show( $elEdit ); $elEditInput.focus().select(); }; - scope.onInputFilter = function($event) { + scope.onSearch = function() { if ( isRemoving == true ) return; - - if ( $event.keyCode == 13 ) { // Enter - scope.onFilterGroup(); - return; - } - if ($.trim( $elFilterInput.val() ).length >= 3 ) { - $elFilterEmpty.removeClass("disabled"); - } else { - $elFilterEmpty.addClass("disabled"); - } - }; - scope.onFilterGroup = function() { - if ( isRemoving == true ) return; - var query = $.trim( $elFilterInput.val() ); + var query = $.trim( $elSearchInput.val() ); if ( query.length != 0 && query.length < 3 ) { alarmUtilService.showLoading( $elLoading, false ); alarmUtilService.showAlert( $elAlert, "You must enter at least three characters."); return; } analyticsService.send( analyticsService.CONST.MAIN, analyticsService.CONST.CLK_ALARM_FILTER_USER_GROUP ); - if ( query == "" ) { - if ( scope.userGroupList.length != userGroupList.length ) { - scope.userGroupList = userGroupList; - alarmUtilService.unsetFilterBackground( $elWrapper ); - } - $elFilterEmpty.addClass("disabled"); - } else { - var newFilterUserGroup = []; - var length = userGroupList.length; - for( var i = 0 ; i < userGroupList.length ; i++ ) { - if ( userGroupList[i].id.indexOf( query ) != -1 ) { - newFilterUserGroup.push( userGroupList[i] ); - } - } - scope.userGroupList = newFilterUserGroup; - alarmUtilService.setFilterBackground( $elWrapper ); - } - }; - scope.onFilterEmpty = function() { - if ( isRemoving == true ) return; - if ( $.trim( $elFilterInput.val() ) == "" ) return; - $elFilterInput.val(""); - scope.onFilterGroup(); + alarmUtilService.showLoading( $elLoading, false ); + loadGroupList( false, query ); }; scope.onInputEdit = function($event) { if ( $event.keyCode == 13 ) { // Enter diff --git a/web/src/main/webapp/features/configuration/alarm/alarmUserGroup.html b/web/src/main/webapp/features/configuration/alarm/alarmUserGroup.html index 76288e877..15a551c74 100644 --- a/web/src/main/webapp/features/configuration/alarm/alarmUserGroup.html +++ b/web/src/main/webapp/features/configuration/alarm/alarmUserGroup.html @@ -12,9 +12,8 @@
- - - + +
diff --git a/web/src/main/webapp/features/configuration/help/help.controller.js b/web/src/main/webapp/features/configuration/help/help.controller.js index cfb41be4f..f59452cad 100644 --- a/web/src/main/webapp/features/configuration/help/help.controller.js +++ b/web/src/main/webapp/features/configuration/help/help.controller.js @@ -13,7 +13,8 @@ { "title": "Quick start guide", "link": "https://github.com/naver/pinpoint/blob/master/quickstart/README.md" }, { "title": "Technical Overview of Pinpoint", "link": "https://github.com/naver/pinpoint/wiki/Technical-Overview-Of-Pinpoint" }, { "title": "Using Pinpont with Docker", "link": "http://yous.be/2015/05/05/using-pinpoint-with-docker/" }, - { "title": "Notes on Jetty Plugin for Pinpoint ", "link": "https://github.com/cijung/Docs/blob/master/JettyPluginNotes.md" } + { "title": "Notes on Jetty Plugin for Pinpoint ", "link": "https://github.com/cijung/Docs/blob/master/JettyPluginNotes.md" }, + { "title": "About Alarm", "link": "https://github.com/naver/pinpoint/blob/master/doc/alarm.md#alarm" } ]; $scope.koHelpList = [ { "title": "Pinpoint 개발자가 작성한 Pinpoint 기술문서", "link": "http://helloworld.naver.com/helloworld/1194202" }, @@ -21,7 +22,8 @@ { "title": "Pinpoint 사용 경험", "link": "http://www.barney.pe.kr/blog/category/development/page/2/" }, { "title": "설치 가이드 동영상 강좌 1", "link": "https://www.youtube.com/watch?v=hrvKaEaDEGs" }, { "title": "설치 가이드 동영상 강좌 2", "link": "https://www.youtube.com/watch?v=fliKPGHGXK4" }, - { "title": "AWS Ubuntu 14.04 설치 가이드 ", "link": "http://lky1001.tistory.com/132" } + { "title": "AWS Ubuntu 14.04 설치 가이드 ", "link": "http://lky1001.tistory.com/132" }, + { "title": "Alarm 가이드", "link": "https://github.com/naver/pinpoint/blob/master/doc/alarm.md#alarm-1" } ]; } ]);