diff --git a/web/src/main/webapp/features/configuration/alarm/alarm-group-member.directive.js b/web/src/main/webapp/features/configuration/alarm/alarm-group-member.directive.js index 5743a4f07..e077efd56 100644 --- a/web/src/main/webapp/features/configuration/alarm/alarm-group-member.directive.js +++ b/web/src/main/webapp/features/configuration/alarm/alarm-group-member.directive.js @@ -96,6 +96,7 @@ scope.onSortGroupMember = function() { if ( currentUserGroupId === "" ) return; + cancelPreviousWork(); var oSortedGroupMemberList = []; var len = oGroupMemberList.length - 1; for( var j = 0, i = len ; i >= 0 ; j++, i-- ) { @@ -109,6 +110,9 @@ scope.onCloseAlert = function() { alarmUtilService.closeAlert( $elAlert, $elLoading ); }; + scope.canSort = function() { + return currentUserGroupId === "" ? "0.5" : "1.0"; + } scope.$on("alarmGroupMember.configuration.load", function( event, userGroupID, willBeAddedUser ) { currentUserGroupId = userGroupID; cancelPreviousWork(); @@ -129,12 +133,13 @@ cancelPreviousWork(); AddGroupMember.applyAction( alarmUtilService, oUser, currentUserGroupId, $elLoading, hasUser, function( oUser ) { analyticsService.send( analyticsService.CONST.MAIN, analyticsService.CONST.CLK_ALARM_ADD_USER ); - scope.groupMemberList.push({ + oGroupMemberList.push({ "name": oUser.name, "memberId": oUser.userId, "department": oUser.department, "userGroupId": currentUserGroupId }); + scope.groupMemberList = oGroupMemberList; alarmBroadcastService.sendCallbackAddedUser( true ); alarmUtilService.setTotal( $elTotal, oGroupMemberList.length ); alarmUtilService.hide( $elLoading ); @@ -161,11 +166,11 @@ } scope.groupMemberList = oGroupMemberList; } - scope.$on("alarmGroupMember.configuration.removeUser", function( event, userID ) { - if ( hasUser( userID ) ) { + scope.$on("alarmGroupMember.configuration.removeUser", function( event, userId ) { + if ( hasUser( userId ) ) { cancelPreviousWork(); // scope.$apply(function() { - removeGroupMember( userID ); + removeGroupMember( userId ); // }); } }); @@ -202,11 +207,13 @@ _bIng: false, onAction: function( alarmUtilService, $node ) { this._bIng = true; + $node.addClass( "remove" ); alarmUtilService.hide( $node.find( CONSTS.DIV_NORMAL ) ); alarmUtilService.show( $node.find( CONSTS.DIV_REMOVE ) ); }, cancelAction: function( alarmUtilService, $node ) { if ( this._bIng === true ) { + $node.removeClass( "remove" ); alarmUtilService.hide($node.find( CONSTS.DIV_REMOVE )); alarmUtilService.show($node.find( CONSTS.DIV_NORMAL )); this._bIng = false; diff --git a/web/src/main/webapp/features/configuration/alarm/alarm-pinpoint-user.directive.js b/web/src/main/webapp/features/configuration/alarm/alarm-pinpoint-user.directive.js index c2c36b8b4..524e20297 100644 --- a/web/src/main/webapp/features/configuration/alarm/alarm-pinpoint-user.directive.js +++ b/web/src/main/webapp/features/configuration/alarm/alarm-pinpoint-user.directive.js @@ -38,8 +38,9 @@ return globalConfig.editUserInfo; }; function cancelPreviousWork() { - AddPinpointUser.cancelAction( hideEditArea ); + AddPinpointUser.cancelAction( aEditNode, hideEditArea ); RemovePinpointUser.cancelAction( alarmUtilService, $workingNode ); + UpdatePinpointUser.cancelAction( alarmUtilService, aEditNode, $workingNode, hideEditArea ); } function showAlert( oServerError ) { $elAlert.find( ".message" ).html( oServerError.errorMessage ); @@ -79,7 +80,7 @@ $.each( aEditNode, function( index, $el ) { alarmUtilService.show( $el ); }); - aEditNode[0].focus(); + aEditNode[0].find("input").focus(); } function showEditArea( oPinpointUser ) { var len = aEditNode.length - 1; @@ -122,14 +123,6 @@ }; return oPinpointUser; } - function validateEmail( email ) { - var reg = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i; - return reg.test(email); - } - function validatePhone( phone ) { - var reg = /^\d+$/; - return reg.test(phone); - } function isSameNode( $current ) { return alarmUtilService.extractID( $workingNode ) === alarmUtilService.extractID( $current ); } @@ -152,7 +145,7 @@ }); }; scope.onCancelAddPinpointUser = function() { - AddPinpointUser.cancelAction( function() { + AddPinpointUser.cancelAction( aEditNode, function() { hideEditArea(); }); }; @@ -160,12 +153,12 @@ applyAddPinpointUser(); }; function applyAddPinpointUser() { - AddPinpointUser.applyAction( alarmUtilService, getNewPinpointUser(), $elLoading, function( oNewPinpointUser ) { + AddPinpointUser.applyAction( alarmUtilService, getNewPinpointUser(), aEditNode, $elLoading, function( oNewPinpointUser ) { analyticsService.send( analyticsService.CONST.MAIN, analyticsService.CONST.CLK_ALARM_CREATE_PINPOINT_USER ); oPinpointUserList.push( oNewPinpointUser ); scope.pinpointUserList = oPinpointUserList; hideEditArea(); - alarmUtilService.setTotal( $elTotal, oPinpointUserList.length ); + alarmUtilService.setTotal( $elTotal, getTotal() ); }, showAlert ); } // remove @@ -188,8 +181,10 @@ break; } } - scope.pinpointUserList = oPinpointUserList; - alarmUtilService.setTotal( $elTotal, oPinpointUserList.length ); + scope.$apply(function() { + scope.pinpointUserList = oPinpointUserList; + }); + alarmUtilService.setTotal( $elTotal, getTotal() ); alarmBroadcastService.sendUserRemoved( userId ); }, showAlert ); }; @@ -202,10 +197,10 @@ }); }; scope.onCancelUpdatePinpointUser = function() { - UpdatePinpointUser.cancelAction( alarmUtilService, $workingNode, hideEditArea ); + UpdatePinpointUser.cancelAction( alarmUtilService, aEditNode, $workingNode, hideEditArea ); }; scope.onApplyUpdatePinpointUser = function() { - UpdatePinpointUser.applyAction( alarmUtilService, getNewPinpointUser(), $workingNode, $elLoading, function( oPinpointUser ) { + UpdatePinpointUser.applyAction( alarmUtilService, getNewPinpointUser(), aEditNode, $workingNode, $elLoading, function( oPinpointUser ) { for( var i = 0 ; i < oPinpointUserList.length ; i++ ) { if ( oPinpointUserList[i].userId == oPinpointUser.userId ) { @@ -217,10 +212,27 @@ } } scope.pinpointUserList = oPinpointUserList; + hideEditArea(); alarmBroadcastService.sendUserUpdated( oPinpointUser ); }, showAlert ); }; + scope.onEditPinpointUserKeydown = function( $event ) { + if ( $event.keyCode == 13 ) { // Enter + if ( AddPinpointUser.isOn() ) { + scope.onApplyAddPinpointUser(); + } else { + scope.onApplyUpdatePinpointUser(); + } + } else if ( $event.keyCode == 27 ) { // ESC + if ( AddPinpointUser.isOn() ) { + scope.onCancelAddPinpointUser(); + } else { + scope.onCancelUpdatePinpointUser(); + } + $event.stopPropagation(); + } + }; scope.onSearchKeydown = function( $event ) { if ( $event.keyCode == 13 ) { // Enter scope.onSearch(); @@ -232,14 +244,13 @@ cancelPreviousWork(); var query = $.trim( $elSearch.val() ); - if ( query.length < 3 ) { + if ( query.length < CONSTS.MIN_SEARCH_LENGTH ) { $elSearch.focus(); return; } alarmUtilService.show( $elLoading ); analyticsService.send( analyticsService.CONST.MAIN, analyticsService.CONST.CLK_ALARM_FILTER_PINPOINT_USER ); - loadData({ "userName": query }); - // { "department" :query } + loadData({ "searchKey": query }); }; scope.checkUser = function( $event ) { alarmUtilService.show( $elLoading ); @@ -252,16 +263,7 @@ } }; scope.$on("alarmPinpointUser.configuration.groupUserRemoved", function( event, list, userId ) { - oGroupMemberList = list; - $.each( oPinpointUserList, function( index, oPinpointUser ) { - oPinpointUser.has = false; - for( var i = 0 ; i < oGroupMemberList.length ; i++ ) { - if ( oPinpointUser.userId == oGroupMemberList[i].memberId ) { - oPinpointUser.has = true; - break; - } - } - }); + resetList( list ); scope.$apply(function() { scope.pinpointUserList = oPinpointUserList; }); @@ -269,6 +271,12 @@ }); scope.$on("alarmPinpointUser.configuration.groupLoaded", function( event, list ) { $elWrapper.removeClass( "_disable-check" ); + console.log( list ); + resetList( list ); + scope.pinpointUserList = oPinpointUserList; + alarmUtilService.setTotal( $elTotal, getTotal() ); + }); + function resetList( list ) { oGroupMemberList = list; $.each( oPinpointUserList, function( index, oPinpointUser ) { oPinpointUser.has = false; @@ -279,9 +287,7 @@ } } }); - scope.pinpointUserList = oPinpointUserList; - alarmUtilService.setTotal( $elTotal, getTotal() ); - }); + } scope.$on("alarmPinpointUser.configuration.selectNone", function() { $elWrapper.addClass( "_disable-check" ); $.each( oPinpointUserList, function( index, oPinpointUser ) { @@ -292,11 +298,6 @@ alarmUtilService.setTotal( $elTotal, getTotal() ); }); scope.$on("alarmPinpointUser.configuration.addUserCallback", function( event, list ) { - if ( list.length > oGroupMemberList.length ) { - //success - } else { - //fail - } oGroupMemberList = list; alarmUtilService.setTotal( $elTotal, getTotal() ); @@ -308,7 +309,7 @@ scope.$on("alarmPinpointUser.configuration.load", function( event, department ) { cancelPreviousWork(); if ( bIsLoaded === false ) { - loadData( angular.isUndefined( department ) ? {} : { "department": department } ); + loadData( angular.isUndefined( department ) ? {} : { "searchKey": department } ); } }); } @@ -316,6 +317,7 @@ }]); var CONSTS = { + MIN_SEARCH_LENGTH : 2, INPUT_USERID_AND_NAME: "Input user id and name", INPUT_PHONE_OR_EMAIL: "Input phone number or email", YOU_CAN_ONLY_INPUT_NUMBERS: "You can only input numbers", @@ -335,28 +337,33 @@ this._bIng = true; cb(); }, - cancelAction: function( cbCancel ) { + cancelAction: function( aEditNode, cbCancel ) { if ( this._bIng === true ) { + removeBlink(aEditNode ); cbCancel(); this._bIng = false; } }, - applyAction: function( alarmUtilService, oNewPinpointUser, $elLoading, cbSuccess, cbFail ) { + applyAction: function( alarmUtilService, oNewPinpointUser, aEditNode, $elLoading, cbSuccess, cbFail ) { var self = this; alarmUtilService.show( $elLoading ); if ( oNewPinpointUser.userId === "" || oNewPinpointUser.name === "" ) { + addBlink( aEditNode ); cbFail({ errorMessage: CONSTS.INPUT_USERID_AND_NAME }); return; } if ( oNewPinpointUser.phoneNumber === "" && oNewPinpointUser.email === "" ) { + addBlink( aEditNode ); cbFail({ errorMessage: CONSTS.INPUT_PHONE_OR_EMAIL }); return; } - if ( oNewPinpointUser.phoneNumber !== "" && validatePhone( oNewPinpointUser.phoneNumber ) ) { + if ( oNewPinpointUser.phoneNumber !== "" && validatePhone( oNewPinpointUser.phoneNumber ) === false ) { + addBlink( aEditNode ); cbFail({ errorMessage: CONSTS.YOU_CAN_ONLY_INPUT_NUMBERS }); return; } - if ( oNewPinpointUser.email !== "" && validateEmail( oNewPinpointUser.email ) ) { + if ( oNewPinpointUser.email !== "" && validateEmail( oNewPinpointUser.email ) === false ) { + addBlink( aEditNode ); cbFail({ errorMessage: CONSTS.INVALID_EMAIL_FORMAT }); return; } @@ -364,7 +371,7 @@ alarmUtilService.sendCRUD( "createPinpointUser", oNewPinpointUser, function( oServerData ) { oNewPinpointUser.number = oServerData.number; cbSuccess( oNewPinpointUser ); - self.cancelAction( function() {} ); + self.cancelAction( aEditNode, function() {} ); alarmUtilService.hide( $elLoading ); }, function( oServerError ) { cbFail( oServerError ); @@ -395,7 +402,7 @@ var userId = alarmUtilService.extractID( $node ); alarmUtilService.sendCRUD( "removePinpointUser", { "userId": userId }, function( oServerData ) { cbSuccess( userId ); - self.cancel( alarmUtilService, $node ); + self.cancelAction( alarmUtilService, $node ); alarmUtilService.hide( $elLoading ); }, function( oServerError ) { cbFail( oServerError ); @@ -412,41 +419,65 @@ alarmUtilService.hide( $node ); cb( alarmUtilService.extractID( $node ) ); }, - cancelAction: function( alarmUtilService, $node, cbCancel ) { + cancelAction: function( alarmUtilService, aEditNode, $node, cbCancel ) { if ( this._bIng === true ) { cbCancel(); + removeBlink( aEditNode ); alarmUtilService.show( $node ); this._bIng = false; } }, - applyAction: function (alarmUtilService, oPinpointUser, $node, $elLoading, cbSuccess, cbFail) { + applyAction: function (alarmUtilService, oPinpointUser, aEditNode, $node, $elLoading, cbSuccess, cbFail) { var self = this; alarmUtilService.show($elLoading); if ( oPinpointUser.name === "" ) { + addBlink( aEditNode ); cbFail({ errorMessage: CONSTS.INPUT_USERID_AND_NAME }); return; } if ( oPinpointUser.phoneNumber === "" && oPinpointUser.email === "" ) { + addBlink( aEditNode ); cbFail({ errorMessage: CONSTS.INPUT_PHONE_OR_EMAIL }); return; } - if ( oPinpointUser.phoneNumber !== "" && validatePhone( oPinpointUser.phoneNumber ) ) { + if ( oPinpointUser.phoneNumber !== "" && validatePhone( oPinpointUser.phoneNumber ) === false ) { + addBlink( aEditNode ); cbFail({ errorMessage: CONSTS.YOU_CAN_ONLY_INPUT_NUMBERS }); return; } - if ( oPinpointUser.email !== "" && validateEmail( oPinpointUser.email ) ) { + if ( oPinpointUser.email !== "" && validateEmail( oPinpointUser.email ) === false ) { + addBlink( aEditNode ); cbFail({ errorMessage: CONSTS.INVALID_EMAIL_FORMAT }); return; } alarmUtilService.sendCRUD( "updatePinpointUser", oPinpointUser, function( oServerData ) { - self.cancelAction( alarmUtilService, $node, function () {}); + self.cancelAction( alarmUtilService, aEditNode, $node, function () {}); cbSuccess( oPinpointUser ); alarmUtilService.hide($elLoading); }, function( oServerError ) { cbFail( oServerError ); } ); } + }; + function validateEmail( email ) { + var reg = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i; + return reg.test(email); } + function validatePhone( phone ) { + var reg = /^\d+$/; + return reg.test(phone); + } + function addBlink( a ) { + $.each( a, function( index, $el ) { + $el.addClass("blink-blink"); + }); + } + function removeBlink( a ) { + $.each( a, function( index, $el ) { + $el.removeClass("blink-blink"); + }); + } + })(jQuery); \ No newline at end of file diff --git a/web/src/main/webapp/features/configuration/alarm/alarm-rule.directive.js b/web/src/main/webapp/features/configuration/alarm/alarm-rule.directive.js index b372c01dc..8768fc306 100644 --- a/web/src/main/webapp/features/configuration/alarm/alarm-rule.directive.js +++ b/web/src/main/webapp/features/configuration/alarm/alarm-rule.directive.js @@ -17,6 +17,7 @@ scope: true, link: function (scope, element) { var $element = $(element); + var $elGuide = $element.find(".some-guide"); var $elWrapper = $element.find(".wrapper"); var $elTotal = $element.find(".total"); var $elLoading = $element.find(".some-loading"); @@ -32,16 +33,13 @@ scope.ruleSets = []; function cancelPreviousWork() { - AddAlarm.cancelAction( hideEditArea ); + AddAlarm.cancelAction( aEditNodes, hideEditArea ); RemoveAlarm.cancelAction( alarmUtilService, $workingNode, hideEditArea ); - UpdateAlarm.cancelAction( alarmUtilService, $workingNode, aEditNodes ); + UpdateAlarm.cancelAction( alarmUtilService, $workingNode, aEditNodes, hideEditArea ); } function isSameNode( $current ) { return alarmUtilService.extractID( $workingNode ) === alarmUtilService.extractID( $current ); } - function reset() { - cancelPreviousWork(); - } function showAlert( oServerError ) { $elAlert.find( ".message" ).html( oServerError.errorMessage ); alarmUtilService.hide( $elLoading ); @@ -151,17 +149,23 @@ aEditNodes[1].find("input").val( "" ); } function getNewRule( ruleId ) { + + var oApplicationData = aEditNodes[0].find("select[name=application]").select2("data"); + var ruleData = aEditNodes[0].find("select[name=rule]").select2("data"); + var aApplication = oApplicationData === null || oApplicationData === undefined ? [ "", "" ] : oApplicationData.id.split("@"); + ruleData = ruleData === null || ruleData === undefined ? "" : ruleData.id; + var application = aEditNodes[0].find("select[name=application]").select2("val").split("@"); - var type = aEditNodes[0].find("select[name=type]").val(); + var notificationType = aEditNodes[0].find("select[name=type]").val(); var oRule = { - "applicationId": application[0], - "serviceType": application[1], + "applicationId": aApplication[0], + "serviceType": aApplication[1], "userGroupId": currentUserGroupId, - "checkerName": aEditNodes[0].find("select[name=rule]").select2( "val" ), + "checkerName": ruleData, "threshold": aEditNodes[0].find("input[name=threshold]").val(), - "smsSend": ( type === "all" || type === "sms" ? true : false ), - "emailSend": ( type === "all" || type === "email" ? true : false ), + "smsSend": ( notificationType === "all" || notificationType === "sms" ? true : false ), + "emailSend": ( notificationType === "all" || notificationType === "email" ? true : false ), "notes": aEditNodes[1].find("input").val() }; if ( angular.isUndefined( ruleId ) === false ) { @@ -179,10 +183,12 @@ } scope.$on("alarmRule.configuration.selectNone", function( event ) { - reset(); + cancelPreviousWork(); currentUserGroupId = ""; oRuleList = []; scope.ruleList = []; + alarmUtilService.show( $elGuide ); + alarmUtilService.setTotal( $elTotal, oRuleList.length ); }); scope.onAddAlarm = function() { if ( currentUserGroupId === "" || AddAlarm.isOn() ) { @@ -194,7 +200,7 @@ }); }; scope.onApplyAddAlarm = function() { - AddAlarm.applyAction( alarmUtilService, getNewRule(), $elLoading, function( application, rule ) { + AddAlarm.applyAction( alarmUtilService, getNewRule(), aEditNodes, $elLoading, function( application, rule ) { return alarmUtilService.hasDuplicateItem( oRuleList, function( oRule ) { return oRule.applicationId === application && oRule.checkerName === rule; }); @@ -207,7 +213,7 @@ }, showAlert ); }; scope.onCancelAddAlarm = function() { - AddAlarm.cancelAction( hideEditArea ); + AddAlarm.cancelAction( aEditNodes, hideEditArea ); }; scope.onRemoveAlarm = function( $event ) { var $node = alarmUtilService.getNode( $event, "tr" ); @@ -241,10 +247,10 @@ }); }; scope.onCancelUpdateAlarm = function() { - UpdateAlarm.cancelAction( alarmUtilService, $workingNode, hideEditArea ); + UpdateAlarm.cancelAction( alarmUtilService, $workingNode, aEditNodes, hideEditArea ); }; scope.onApplyUpdateAlarm = function() { - UpdateAlarm.applyAction( alarmUtilService, getNewRule( alarmUtilService.extractID( $workingNode ) ), $workingNode, $elLoading, function( ruleId, application, rule ) { + UpdateAlarm.applyAction( alarmUtilService, getNewRule( alarmUtilService.extractID( $workingNode ) ), aEditNodes, $workingNode, $elLoading, function( ruleId, application, rule ) { return alarmUtilService.hasDuplicateItem( oRuleList, function( oRule ) { return ( oRule.applicationId === application && oRule.checkerName === rule ) && oRule.ruleId != ruleId; }); @@ -270,7 +276,8 @@ }); scope.$on("alarmRule.configuration.load", function( event, userGroupID ) { currentUserGroupId = userGroupID; - reset(); + cancelPreviousWork(); + alarmUtilService.hide( $elGuide ); loadData( true ); loadRuleSet(); }); @@ -312,27 +319,36 @@ this._bIng = true; cb(); }, - cancelAction: function( cbCancel ) { + cancelAction: function( aEditNodes, cbCancel ) { if ( this._bIng === true ) { + $.each( aEditNodes, function( index, $el ) { + $el.removeClass("blink-blink"); + }); cbCancel(); this._bIng = false; } }, - applyAction: function( alarmUtilService, oNewRule, $elLoading, cbHasAlarm, cbSuccess, cbFail ) { + applyAction: function( alarmUtilService, oNewRule, aEditNodes, $elLoading, cbHasAlarm, cbSuccess, cbFail ) { var self = this; alarmUtilService.show( $elLoading ); if ( oNewRule.applicationId === "" || oNewRule.checkerName === "" ) { + $.each( aEditNodes, function( index, $el ) { + $el.addClass("blink-blink"); + }); cbFail({ errorMessage: CONSTS.SELECT_APP_OR_RULE }); return; } if ( cbHasAlarm( oNewRule.applicationId, oNewRule.checkerName ) ) { + $.each( aEditNodes, function( index, $el ) { + $el.addClass("blink-blink"); + }); cbFail({ errorMessage: CONSTS.EXIST_A_SAME }); return; } alarmUtilService.sendCRUD( "createRule", oNewRule, function( oServerData ) { oNewRule.ruleId = oServerData.ruleId; cbSuccess( oNewRule ); - self.cancelAction( function() {} ); + self.cancelAction( aEditNodes, function() {} ); alarmUtilService.hide( $elLoading ); }, function( oServerError ) { cbFail( oServerError ); @@ -375,17 +391,23 @@ alarmUtilService.hide( $node ); cb( alarmUtilService.extractID( $node ) ); }, - cancelAction: function( alarmUtilService, $node, cbCancel ) { + cancelAction: function( alarmUtilService, $node, aEditNodes, cbCancel ) { if ( this._bIng === true ) { cbCancel(); + $.each( aEditNodes, function( index, $el ) { + $el.removeClass("blink-blink"); + }); alarmUtilService.show( $node ); this._bIng = false; } }, - applyAction: function( alarmUtilService, oUpdateRule, $node, $elLoading, cbHasAlarm, cbSuccess, cbFail ) { + applyAction: function( alarmUtilService, oUpdateRule, aEditNodes, $node, $elLoading, cbHasAlarm, cbSuccess, cbFail ) { var self = this; alarmUtilService.show($elLoading); if ( cbHasAlarm( oUpdateRule.ruleId, oUpdateRule.applicationId, oUpdateRule.checkerName ) ) { + $.each( aEditNodes, function( index, $el ) { + $el.addClass("blink-blink"); + }); cbFail({errorMessage: CONSTS.EXIST_A_SAME}); return; } 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 7a41fbf3e..6944e42b9 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 @@ -84,13 +84,17 @@ alarmUtilService.show( $elLoading ); cancelPreviousWork(); var query = $.trim( $elSearchInput.val() ); - if ( query.length < CONSTS.MIN_GROUPNAME_LENGTH ) { - $elSearchInput.val(""); - alarmUtilService.hide( $elLoading ); - return; + if ( query === "" ) { + loadData(); + } else { + if ( query.length < CONSTS.MIN_GROUPNAME_LENGTH ) { + $elSearchInput.val(""); + alarmUtilService.hide( $elLoading ); + return; + } + analyticsService.send( analyticsService.CONST.MAIN, analyticsService.CONST.CLK_ALARM_FILTER_USER_GROUP ); + loadData( { "userGroupId": query } ); } - analyticsService.send( analyticsService.CONST.MAIN, analyticsService.CONST.CLK_ALARM_FILTER_USER_GROUP ); - loadData( { "userGroupId": query } ); }; // add process @@ -212,11 +216,11 @@ ]); var CONSTS = { MIN_GROUPNAME_LENGTH : 3, - ENTER_AT_LEAST: "Enter at least 3 letters to search", - EXIST_A_SAME: "Exist a same group name", NEW_GROUP: "New Group", - DIV_NORMAL: "div._normal", + EXIST_A_SAME: "Exist a same group name", + ENTER_AT_LEAST: "Enter at least 3 letters to search", DIV_EDIT: "div._edit", + DIV_NORMAL: "div._normal", DIV_REMOVE: "div._remove" }; @@ -311,7 +315,7 @@ var groupNumber = alarmUtilService.extractID( $node ); var groupName = $node.find("input").val(); - if ( groupName === "" || groupName.length < CONST.MIN_GROUPNAME_LENGTH ) { + if ( groupName.length < CONSTS.MIN_GROUPNAME_LENGTH ) { alarmUtilService.hide( $elLoading ); $node.addClass("blink-blink"); $node.find("input").attr("placeholder", CONSTS.ENTER_AT_LEAST).val("").focus(); diff --git a/web/src/main/webapp/features/configuration/alarm/alarmGroupMember.html b/web/src/main/webapp/features/configuration/alarm/alarmGroupMember.html index 16bc192a6..dd6ea80c9 100644 --- a/web/src/main/webapp/features/configuration/alarm/alarmGroupMember.html +++ b/web/src/main/webapp/features/configuration/alarm/alarmGroupMember.html @@ -1,7 +1,7 @@
Group Member - +
    diff --git a/web/src/main/webapp/features/configuration/alarm/alarmPinpointUser.html b/web/src/main/webapp/features/configuration/alarm/alarmPinpointUser.html index 73a643db3..32473827d 100644 --- a/web/src/main/webapp/features/configuration/alarm/alarmPinpointUser.html +++ b/web/src/main/webapp/features/configuration/alarm/alarmPinpointUser.html @@ -16,19 +16,19 @@
    • - +
    • - +
    • - +
    • - +
    • - +
      diff --git a/web/src/main/webapp/features/configuration/alarm/alarmRule.html b/web/src/main/webapp/features/configuration/alarm/alarmRule.html index d956bc0a9..e52a0c842 100644 --- a/web/src/main/webapp/features/configuration/alarm/alarmRule.html +++ b/web/src/main/webapp/features/configuration/alarm/alarmRule.html @@ -75,6 +75,9 @@
    +
    + Select a 'User Group'
    to enable here +
    diff --git a/web/src/main/webapp/features/configuration/alarm/alarmUserGroup.html b/web/src/main/webapp/features/configuration/alarm/alarmUserGroup.html index b766f62b1..86c9ffd42 100644 --- a/web/src/main/webapp/features/configuration/alarm/alarmUserGroup.html +++ b/web/src/main/webapp/features/configuration/alarm/alarmUserGroup.html @@ -23,7 +23,7 @@
  • {{userGroup.id}} - +
    diff --git a/web/src/main/webapp/lib/css/pinpoint.css b/web/src/main/webapp/lib/css/pinpoint.css index 041e68263..910cec1f4 100644 --- a/web/src/main/webapp/lib/css/pinpoint.css +++ b/web/src/main/webapp/lib/css/pinpoint.css @@ -2350,14 +2350,19 @@ div.jquery-drag-to-select.active { padding-bottom: 4px; } .blink-blink { + background-color: rgba( 255, 0, 0, 0.4 ) !important; + /* animation: back-blink 1s; - animation-iteration-count: infinite; + animation-iteration-count: 2; + */ } +/* @keyframes back-blink { - 0% {background-color: #F3FBFF;} - 50% {background-color: #F00;} - 100% {background-color: #FF0 } + 0% {background-color: rgba( 255, 0, 0, 0.2 )} + 50% {background-color: rgba( 255, 0, 0, 0.5 ) } + 100% {background-color: rgba( 255, 0, 0, 0.2 ) } } +*/ @font-face{font-family:xeicon;src:url(/fonts/xeicon.eot?v=1.0.4);src:url(/fonts/xeicon.eot?#iefix&v=1.0.4)format('embedded-opentype'),url(/fonts/xeicon.woff2?v=1.0.4)format('woff2'),url(/fonts/xeicon.woff?v=1.0.4)format('woff'),url(/fonts/xeicon.ttf?v=1.0.4)format('truetype'),url(/fonts/xeicon.svg?v=1.0.4#xeicon)format('svg');font-weight:400;font-style:normal}i{display:inline-block;font-family:xeicon;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.xi-home:before{content:"\e606"}.xi-bars:before{content:"\e607"}.xi-plus:before{content:"\e603"}.xi-plus-circle:before{content:"\e611"}.xi-plus-square:before{content:"\e612"}.xi-minus:before{content:"\e613"}.xi-minus-circle:before{content:"\e614"}.xi-minus-square:before{content:"\e615"}.xi-close:before{content:"\e616"}.xi-close-circle:before{content:"\e617"}.xi-close-square:before{content:"\e618"}.xi-angle-left:before{content:"\e60b"}.xi-left-circle:before{content:"\e61a"}.xi-left-square:before{content:"\e61b"}.xi-angle-right:before{content:"\e60d"}.xi-right-circle:before{content:"\e61d"}.xi-right-square:before{content:"\e61e"}.xi-angle-up:before{content:"\e60e"}.xi-up-circle:before{content:"\e620"}.xi-up-square:before{content:"\e621"}.xi-angle-down:before{content:"\e619"}.xi-down-circle:before{content:"\e623"}.xi-down-square:before{content:"\e624"}.xi-arrow-left:before{content:"\e625"}.xi-arrow-right:before{content:"\e626"}.xi-arrow-up:before{content:"\e627"}.xi-arrow-down:before{content:"\e628"}.xi-angle-double-left:before{content:"\e629"}.xi-angle-double-right:before{content:"\e62a"}.xi-angle-double-up:before{content:"\e62b"}.xi-angle-double-down:before{content:"\e62c"}.xi-caret-left:before{content:"\e62d"}.xi-caret-left-circle:before{content:"\e62e"}.xi-caret-left-square:before{content:"\e62f"}.xi-caret-right:before{content:"\e630"}.xi-caret-right-circle:before{content:"\e631"}.xi-caret-right-square:before{content:"\e632"}.xi-caret-up:before{content:"\e633"}.xi-caret-up-circle:before{content:"\e634"}.xi-caret-up-square:before{content:"\e635"}.xi-caret-down:before{content:"\e636"}.xi-caret-down-circle:before{content:"\e637"}.xi-caret-down-square:before{content:"\e638"}.xi-arrows:before{content:"\e639"}.xi-arrows-alt:before{content:"\e63a"}.xi-expand-square:before{content:"\e61c"}.xi-compress-square:before{content:"\e63c"}.xi-arrows-h:before{content:"\e63e"}.xi-arrows-v:before{content:"\e63f"}.xi-expand:before{content:"\e640"}.xi-compress:before{content:"\e641"}.xi-refresh:before{content:"\e642"}.xi-power-off:before{content:"\e643"}.xi-alt:before{content:"\e644"}.xi-command:before{content:"\e645"}.xi-esc:before{content:"\e646"}.xi-eye:before{content:"\e64a"}.xi-eye-slash:before{content:"\e61f"}.xi-toggle:before{content:"\e647"}.xi-toggle-off:before{content:"\e648"}.xi-toggle-on:before{content:"\e649"}.xi-ellipsis-h:before{content:"\e64b"}.xi-ellipsis-v:before{content:"\e64c"}.xi-link:before{content:"\e600"}.xi-link-l:before{content:"\e601"}.xi-unlink:before{content:"\e602"}.xi-download-circle:before{content:"\e64d"}.xi-upload-circle:before{content:"\e650"}.xi-download:before{content:"\e651"}.xi-upload:before{content:"\e652"}.xi-download-disk:before{content:"\e653"}.xi-upload-disk:before{content:"\e654"}.xi-archive:before{content:"\e655"}.xi-download-my:before{content:"\e656"}.xi-download-bottom:before{content:"\e657"}.xi-download-caret:before{content:"\e658"}.xi-cloud:before{content:"\e659"}.xi-cloud-upload:before{content:"\e65a"}.xi-cloud-download:before{content:"\e65b"}.xi-upload-square:before{content:"\e65d"}.xi-download-square:before{content:"\e622"}.xi-share2:before{content:"\e64e"}.xi-share-l:before{content:"\e64f"}.xi-share-alt:before{content:"\e65f"}.xi-share-arrow-alt:before{content:"\e661"}.xi-cloud-minus:before{content:"\e663"}.xi-external-share:before{content:"\e664"}.xi-external-link:before{content:"\e665"}.xi-rss-square:before{content:"\e666"}.xi-code-fork:before{content:"\e667"}.xi-sitemap:before{content:"\e65c"}.xi-wifi-router:before{content:"\e668"}.xi-wifi:before{content:"\e669"}.xi-signal:before{content:"\e66a"}.xi-antenna:before{content:"\e660"}.xi-marquee-add:before{content:"\e66e"}.xi-marquee-remove:before{content:"\e66f"}.xi-exchange:before{content:"\e670"}.xi-repeat:before{content:"\e671"}.xi-pen:before{content:"\e673"}.xi-eraser:before{content:"\e674"}.xi-magnifier:before{content:"\e63b"}.xi-magnifier-expand:before{content:"\e63d"}.xi-magnifier-reduce:before{content:"\e65e"}.xi-trash:before{content:"\e662"}.xi-scissors:before{content:"\e675"}.xi-pin:before{content:"\e678"}.xi-clip:before{content:"\e679"}.xi-key:before{content:"\e683"}.xi-slip-tongs:before{content:"\e684"}.xi-lock:before{content:"\e66b"}.xi-unlock:before{content:"\e66c"}.xi-target:before{content:"\e68f"}.xi-paper:before{content:"\e604"}.xi-stack-paper:before{content:"\e605"}.xi-pen-point:before{content:"\e67a"}.xi-pencil-point:before{content:"\e67b"}.xi-brush-point:before{content:"\e67c"}.xi-magnet:before{content:"\e67d"}.xi-cube:before{content:"\e67e"}.xi-type:before{content:"\e66d"}.xi-paint-brush:before{content:"\e672"}.xi-paint-bucket:before{content:"\e676"}.xi-crop:before{content:"\e677"}.xi-marquee:before{content:"\e685"}.xi-color:before{content:"\e687"}.xi-rgb:before{content:"\e67f"}.xi-ruler:before{content:"\e68c"}.xi-ruler-triangle:before{content:"\e680"}.xi-magic:before{content:"\e68d"}.xi-eyedropper:before{content:"\e681"}.xi-canvas:before{content:"\e682"}.xi-cog:before{content:"\e686"}.xi-wrench:before{content:"\e68b"}.xi-align-justify:before{content:"\e690"}.xi-align-left:before{content:"\e691"}.xi-align-center:before{content:"\e692"}.xi-align-right:before{content:"\e693"}.xi-layout-full:before{content:"\e694"}.xi-layout-side-left:before{content:"\e695"}.xi-layout-side-right:before{content:"\e696"}.xi-layout-left-mid:before{content:"\e6a1"}.xi-layout-center:before{content:"\e6a7"}.xi-layout-side-three:before{content:"\e6ac"}.xi-layout-grid:before{content:"\e697"}.xi-layout-top:before{content:"\e698"}.xi-layout-top-left:before{content:"\e699"}.xi-layout-top-grid:before{content:"\e69a"}.xi-layout-top-three:before{content:"\e6ad"}.xi-layout-top-center:before{content:"\e69b"}.xi-layout-top-left-mid:before{content:"\e69c"}.xi-layout-top-right:before{content:"\e69d"}.xi-bold:before{content:"\e69e"}.xi-underline:before{content:"\e69f"}.xi-italic:before{content:"\e6a0"}.xi-caps:before{content:"\e6ae"}.xi-strikethrough:before{content:"\e6a2"}.xi-paragraph:before{content:"\e6a3"}.xi-list-ul:before{content:"\e6a4"}.xi-list-ul-square:before{content:"\e6a5"}.xi-list-ol:before{content:"\e6a6"}.xi-list-ul-l:before{content:"\e6af"}.xi-indent:before{content:"\e6a8"}.xi-indent-arrow:before{content:"\e6a9"}.xi-dedent:before{content:"\e6aa"}.xi-dedent-arrow:before{content:"\e6ab"}.xi-contents-right:before{content:"\e6b0"}.xi-contents-left:before{content:"\e6b1"}.xi-contents-grid:before{content:"\e6b2"}.xi-lineheight-plus:before{content:"\e6b4"}.xi-lineheight-minus:before{content:"\e6b5"}.xi-lineheight:before{content:"\e688"}.xi-code:before{content:"\e689"}.xi-rotate-right:before{content:"\e6b8"}.xi-rotate-left:before{content:"\e6b9"}.xi-user:before{content:"\e68a"}.xi-user-plus:before{content:"\e68e"}.xi-user-minus:before{content:"\e6b3"}.xi-user-check:before{content:"\e6b6"}.xi-user-circle:before{content:"\e6b7"}.xi-user-info:before{content:"\e6ba"}.xi-user-add:before{content:"\e6bb"}.xi-users:before{content:"\e6c0"}.xi-user-folder:before{content:"\e6c4"}.xi-user-address:before{content:"\e6c5"}.xi-user-lock:before{content:"\e6c6"}.xi-female:before{content:"\e6c7"}.xi-male:before{content:"\e6c8"}.xi-gender:before{content:"\e6c9"}.xi-woman:before{content:"\e6bc"}.xi-man:before{content:"\e6bd"}.xi-toilet:before{content:"\e6be"}.xi-love:before{content:"\e6bf"}.xi-handshake:before{content:"\e6c1"}.xi-meeting:before{content:"\e6c2"}.xi-community:before{content:"\e6c3"}.xi-family:before{content:"\e6ca"}.xi-lecture:before{content:"\e6cb"}.xi-maternity:before{content:"\e6cd"}.xi-baby:before{content:"\e6cf"}.xi-wheelchair:before{content:"\e6d0"}.xi-collaboration:before{content:"\e6d3"}.xi-envelope:before{content:"\e6cc"}.xi-letter:before{content:"\e6ce"}.xi-postcard:before{content:"\e6d4"}.xi-envelope-open:before{content:"\e6d1"}.xi-at:before{content:"\e6d2"}.xi-postbox:before{content:"\e6d6"}.xi-reply:before{content:"\e6d7"}.xi-reply-all:before{content:"\e6d8"}.xi-reply-l:before{content:"\e6d9"}.xi-reply-all-l:before{content:"\e6da"}.xi-paper-plane:before{content:"\e6d5"}.xi-refresh-l:before{content:"\e6db"}.xi-undo:before{content:"\e6dc"}.xi-chat:before{content:"\e6dd"}.xi-message:before{content:"\e6de"}.xi-message-list:before{content:"\e6df"}.xi-comment:before{content:"\e6eb"}.xi-comments:before{content:"\e6ec"}.xi-note:before{content:"\e6ed"}.xi-smiley-face:before{content:"\e6ee"}.xi-neutral-face:before{content:"\e6ef"}.xi-sad-face:before{content:"\e6f0"}.xi-happy-face:before{content:"\e6f1"}.xi-lol-face:before{content:"\e6f2"}.xi-dead-face:before{content:"\e6f3"}.xi-angry-face:before{content:"\e6f4"}.xi-confused-face:before{content:"\e6f7"}.xi-wink-face:before{content:"\e6f9"}.xi-lips-sealed-face:before{content:"\e6fa"}.xi-thumbs-up:before{content:"\e6fc"}.xi-thumbs-down:before{content:"\e6fd"}.xi-star:before{content:"\e6fe"}.xi-heart:before{content:"\e6ff"}.xi-badge:before{content:"\e700"}.xi-medal:before{content:"\e701"}.xi-trophy:before{content:"\e753"}.xi-present:before{content:"\e755"}.xi-tag:before{content:"\e70a"}.xi-tags:before{content:"\e70b"}.xi-flag-triangle:before{content:"\e70c"}.xi-bookmark:before{content:"\e70d"}.xi-book-spread:before{content:"\e70e"}.xi-book:before{content:"\e70f"}.xi-tagged-book:before{content:"\e710"}.xi-crown:before{content:"\e711"}.xi-check:before{content:"\e6e0"}.xi-check-box:before{content:"\e6e1"}.xi-check-boxout:before{content:"\e6e2"}.xi-check-circle:before{content:"\e6e3"}.xi-check-circleout:before{content:"\e6e4"}.xi-check-shield:before{content:"\e6e5"}.xi-check-shieldout:before{content:"\e6e6"}.xi-check-comment:before{content:"\e6e8"}.xi-check-commentout:before{content:"\e6e7"}.xi-check-home-o:before{content:"\e712"}.xi-check-home:before{content:"\e6e9"}.xi-check-homeout:before{content:"\e6ea"}.xi-form:before{content:"\e713"}.xi-form-check:before{content:"\e714"}.xi-form-checkout:before{content:"\e715"}.xi-notice:before{content:"\e608"}.xi-announce:before{content:"\e609"}.xi-slash-circle:before{content:"\e60a"}.xi-ban-circle:before{content:"\e716"}.xi-ban-square:before{content:"\e717"}.xi-unknown-square:before{content:"\e718"}.xi-unknown-circle:before{content:"\e719"}.xi-rollback:before{content:"\e6f5"}.xi-rollback-circle:before{content:"\e6f6"}.xi-info-circle:before{content:"\e71a"}.xi-info-suqare:before{content:"\e71b"}.xi-info-triangle:before{content:"\e6f8"}.xi-new:before{content:"\e71e"}.xi-update:before{content:"\e725"}.xi-information-square:before{content:"\e726"}.xi-information-circle:before{content:"\e727"}.xi-help:before{content:"\e6fb"}.xi-skull:before{content:"\e728"}.xi-image:before{content:"\e729"}.xi-images:before{content:"\e72b"}.xi-camera:before{content:"\e72c"}.xi-camera-round:before{content:"\e702"}.xi-camera-retro:before{content:"\e703"}.xi-cameracorder:before{content:"\e704"}.xi-shutter:before{content:"\e72d"}.xi-shuffle:before{content:"\e60c"}.xi-step-backward:before{content:"\e705"}.xi-step-forward:before{content:"\e706"}.xi-pause:before{content:"\e72e"}.xi-fast-backward:before{content:"\e707"}.xi-fast-forward:before{content:"\e708"}.xi-eject:before{content:"\e72f"}.xi-stop:before{content:"\e709"}.xi-record:before{content:"\e71c"}.xi-play:before{content:"\e71d"}.xi-forward:before{content:"\e71f"}.xi-backward:before{content:"\e720"}.xi-pause-o:before{content:"\e721"}.xi-step-forward-o:before{content:"\e722"}.xi-step-backward-o:before{content:"\e723"}.xi-eject-o:before{content:"\e724"}.xi-video-camera:before{content:"\e72a"}.xi-movie:before{content:"\e730"}.xi-cine-camera:before{content:"\e731"}.xi-video-call:before{content:"\e732"}.xi-film:before{content:"\e733"}.xi-volume-circle:before{content:"\e738"}.xi-volume-off-circle:before{content:"\e734"}.xi-volume:before{content:"\e735"}.xi-volume-min:before{content:"\e73c"}.xi-volume-mid:before{content:"\e73b"}.xi-volume-max:before{content:"\e73a"}.xi-volume-plus:before{content:"\e73d"}.xi-volume-minus:before{content:"\e73e"}.xi-volume-slash:before{content:"\e73f"}.xi-volume-off:before{content:"\e740"}.xi-headset:before{content:"\e736"}.xi-microphone:before{content:"\e737"}.xi-microphone-slash:before{content:"\e739"}.xi-stand-mic:before{content:"\e741"}.xi-dynamic-mic:before{content:"\e742"}.xi-volume-bar:before{content:"\e743"}.xi-music:before{content:"\e744"}.xi-music-scale:before{content:"\e74f"}.xi-speaker:before{content:"\e745"}.xi-record-play:before{content:"\e746"}.xi-music-keyboard:before{content:"\e748"}.xi-adult:before{content:"\e749"}.xi-marker:before{content:"\e60f"}.xi-marker-circle:before{content:"\e763"}.xi-marker-plus:before{content:"\e764"}.xi-marker-minus:before{content:"\e765"}.xi-marker-multiply:before{content:"\e766"}.xi-pin-circle:before{content:"\e767"}.xi-pin-plus:before{content:"\e768"}.xi-pin-minus:before{content:"\e769"}.xi-pin-multiply:before{content:"\e76a"}.xi-map-marker:before{content:"\e74a"}.xi-map-folding:before{content:"\e770"}.xi-location-arrow:before{content:"\e771"}.xi-compass:before{content:"\e74b"}.xi-gps:before{content:"\e774"}.xi-flag-wind:before{content:"\e74e"}.xi-flag:before{content:"\e750"}.xi-flag-line:before{content:"\e751"}.xi-car:before{content:"\e752"}.xi-bus:before{content:"\e754"}.xi-taxi:before{content:"\e756"}.xi-subway:before{content:"\e757"}.xi-ship:before{content:"\e758"}.xi-scooter:before{content:"\e759"}.xi-bike:before{content:"\e75a"}.xi-ambulance:before{content:"\e75b"}.xi-truck:before{content:"\e75c"}.xi-flight:before{content:"\e75d"}.xi-automobile:before{content:"\e75e"}.xi-walking:before{content:"\e75f"}.xi-bicycle:before{content:"\e760"}.xi-motorbike:before{content:"\e761"}.xi-cruise:before{content:"\e762"}.xi-bus-side:before{content:"\e76b"}.xi-train:before{content:"\e76c"}.xi-helicopter:before{content:"\e76d"}.xi-shipping:before{content:"\e76e"}.xi-gas-station:before{content:"\e76f"}.xi-coffee:before{content:"\e772"}.xi-restaurants:before{content:"\e773"}.xi-florist:before{content:"\e775"}.xi-market:before{content:"\e776"}.xi-hlz:before{content:"\e777"}.xi-park:before{content:"\e778"}.xi-cake:before{content:"\e779"}.xi-cash-machine:before{content:"\e77a"}.xi-gamepad:before{content:"\e77b"}.xi-hospital:before{content:"\e77c"}.xi-bank-o:before{content:"\e77e"}.xi-monitor:before{content:"\e77f"}.xi-laptop:before{content:"\e780"}.xi-pc:before{content:"\e781"}.xi-mobile:before{content:"\e782"}.xi-tablet:before{content:"\e783"}.xi-tv:before{content:"\e784"}.xi-mouse:before{content:"\e77d"}.xi-print:before{content:"\e785"}.xi-fax:before{content:"\e787"}.xi-battery-min:before{content:"\e788"}.xi-battery-mid:before{content:"\e78b"}.xi-battery-full:before{content:"\e78c"}.xi-keyboard:before{content:"\e78e"}.xi-telephone:before{content:"\e610"}.xi-phone:before{content:"\e78f"}.xi-ringing:before{content:"\e791"}.xi-missed:before{content:"\e793"}.xi-reception:before{content:"\e794"}.xi-outgoing:before{content:"\e795"}.xi-call-log:before{content:"\e796"}.xi-plug:before{content:"\e78d"}.xi-presentation:before{content:"\e797"}.xi-projector:before{content:"\e79b"}.xi-radio:before{content:"\e79c"}.xi-diskette:before{content:"\e786"}.xi-usb:before{content:"\e79d"}.xi-memorycard:before{content:"\e79e"}.xi-webcam:before{content:"\e79f"}.xi-cd-r:before{content:"\e789"}.xi-hdd:before{content:"\e78a"}.xi-line-sharer:before{content:"\e7a0"}.xi-tablet-pen:before{content:"\e7a1"}.xi-time:before{content:"\e790"}.xi-alarm-clock:before{content:"\e792"}.xi-timer:before{content:"\e7a2"}.xi-time-forward:before{content:"\e7a3"}.xi-time-back:before{content:"\e7a4"}.xi-bell:before{content:"\e798"}.xi-bell-ring:before{content:"\e799"}.xi-bell-slash:before{content:"\e79a"}.xi-sandwatch-min:before{content:"\e7a5"}.xi-sandwatch-mid:before{content:"\e7a6"}.xi-sandwatch-full:before{content:"\e7a7"}.xi-watch:before{content:"\e7a8"}.xi-calendar:before{content:"\e7a9"}.xi-calendar-o:before{content:"\e7aa"}.xi-calendar-month:before{content:"\e7ab"}.xi-calendar-week:before{content:"\e7ac"}.xi-calendar-add:before{content:"\e7ad"}.xi-calendar-remove:before{content:"\e7ae"}.xi-calendar-cancel:before{content:"\e7af"}.xi-calendar-check:before{content:"\e7b0"}.xi-file:before{content:"\e7b1"}.xi-file-add:before{content:"\e7b2"}.xi-file-remove:before{content:"\e7b3"}.xi-file-text:before{content:"\e7b4"}.xi-documents:before{content:"\e7b5"}.xi-file-image:before{content:"\e7b6"}.xi-file-movie:before{content:"\e7b7"}.xi-file-music:before{content:"\e7b8"}.xi-file-code:before{content:"\e7b9"}.xi-file-zip:before{content:"\e7ba"}.xi-file-excel:before{content:"\e7bb"}.xi-file-word:before{content:"\e7bc"}.xi-file-powerpoint:before{content:"\e7bd"}.xi-file-check:before{content:"\e7be"}.xi-file-upload:before{content:"\e7bf"}.xi-file-download:before{content:"\e7c0"}.xi-file-bookmark:before{content:"\e7c1"}.xi-folder:before{content:"\e7c2"}.xi-folder-open:before{content:"\e7c3"}.xi-folder-check:before{content:"\e7c4"}.xi-folder-plus:before{content:"\e7c5"}.xi-folder-remove:before{content:"\e7c6"}.xi-folder-upload:before{content:"\e7c7"}.xi-folder-download:before{content:"\e7c8"}.xi-folder-zip:before{content:"\e7c9"}.xi-windows:before{content:"\e7ca"}.xi-windows-text:before{content:"\e7cb"}.xi-windows-ban:before{content:"\e7cc"}.xi-windows-add:before{content:"\e7cd"}.xi-windows-remove:before{content:"\e7ce"}.xi-windows-check:before{content:"\e7cf"}.xi-windows-refresh:before{content:"\e7d0"}.xi-windows-search:before{content:"\e7d1"}.xi-windows-lock:before{content:"\e7d2"}.xi-computer-network:before{content:"\e7d3"}.xi-home-network:before{content:"\e7d4"}.xi-cloud-network:before{content:"\e7d5"}.xi-internet-network:before{content:"\e7d6"}.xi-server:before{content:"\e7d7"}.xi-server-folder:before{content:"\e7d8"}.xi-db-min:before{content:"\e7d9"}.xi-db-mid:before{content:"\e7da"}.xi-db-full:before{content:"\e7db"}.xi-db-pull:before{content:"\e7dc"}.xi-db-push:before{content:"\e7dd"}.xi-chart-bar:before{content:"\e7de"}.xi-rise:before{content:"\e7df"}.xi-decline:before{content:"\e7e0"}.xi-chart-circle:before{content:"\e7e1"}.xi-chart-donut:before{content:"\e7e2"}.xi-chart-pyramid:before{content:"\e7e3"}.xi-chart-line:before{content:"\e7e4"}.xi-chart-star:before{content:"\e7e5"}.xi-yuan:before{content:"\e7e6"}.xi-yen:before{content:"\e7e7"}.xi-pound:before{content:"\e7e8"}.xi-euro:before{content:"\e7e9"}.xi-won:before{content:"\e7ea"}.xi-dollar:before{content:"\e7eb"}.xi-peso:before{content:"\e7ec"}.xi-rupee:before{content:"\e7ed"}.xi-rial:before{content:"\e7ee"}.xi-credit-card:before{content:"\e7ef"}.xi-wallet:before{content:"\e7f0"}.xi-money:before{content:"\e7f3"}.xi-piggy-bank:before{content:"\e7f4"}.xi-strongbox:before{content:"\e7f5"}.xi-bank:before{content:"\e7f8"}.xi-briefcase:before{content:"\e7f9"}.xi-percent:before{content:"\e7fa"}.xi-calculator:before{content:"\e7fb"}.xi-payment:before{content:"\e7fc"}.xi-scales:before{content:"\e7fd"}.xi-cart:before{content:"\e7fe"}.xi-cart-add:before{content:"\e7ff"}.xi-cart-remove:before{content:"\e800"}.xi-shopping-bag:before{content:"\e801"}.xi-basket:before{content:"\e802"}.xi-barcode:before{content:"\e803"}.xi-box:before{content:"\e804"}.xi-fragile:before{content:"\e805"}.xi-hat:before{content:"\e806"}.xi-underwear:before{content:"\e807"}.xi-shirts:before{content:"\e808"}.xi-dress:before{content:"\e809"}.xi-sofa:before{content:"\e80a"}.xi-clothes:before{content:"\e80b"}.xi-barter:before{content:"\e80c"}.xi-shop:before{content:"\e80d"}.xi-shoes:before{content:"\e80e"}.xi-glasses:before{content:"\e80f"}.xi-ring:before{content:"\e810"}.xi-lipstick:before{content:"\e811"}.xi-toilet-paper:before{content:"\e812"}.xi-backpack:before{content:"\e813"}.xi-tent:before{content:"\e814"}.xi-sticker:before{content:"\e815"}.xi-coupon:before{content:"\e816"}.xi-feeding-bottle:before{content:"\e817"}.xi-apple:before{content:"\e818"}.xi-education:before{content:"\e84a"}.xi-qr-code:before{content:"\e857"}.xi-devices:before{content:"\e865"}.xi-html5:before{content:"\e866"}.xi-css3:before{content:"\e867"}.xi-ruby:before{content:"\e868"}.xi-radiation:before{content:"\e7f1"}.xi-rocket:before{content:"\e7f2"}.xi-satellite:before{content:"\e869"}.xi-atom:before{content:"\e86a"}.xi-shield:before{content:"\e86b"}.xi-globus:before{content:"\e7f6"}.xi-saturn:before{content:"\e86c"}.xi-network:before{content:"\e86d"}.xi-idea:before{content:"\e86e"}.xi-funnel:before{content:"\e7f7"}.xi-chip:before{content:"\e86f"}.xi-microscope:before{content:"\e870"}.xi-gene:before{content:"\e871"}.xi-vitro:before{content:"\e872"}.xi-robot:before{content:"\e873"}.xi-fire:before{content:"\e874"}.xi-spinner-1:before{content:"\e875"}.xi-spinner-2:before{content:"\e876"}.xi-spinner-3:before{content:"\e877"}.xi-spinner-4:before{content:"\e878"}.xi-spinner-5:before{content:"\e879"}.xi-spinner-6:before{content:"\e87a"}.xi-sun:before{content:"\e87b"}.xi-sunset:before{content:"\e87c"}.xi-umbrella:before{content:"\e87d"}.xi-humidity:before{content:"\e87e"}.xi-snow:before{content:"\e87f"}.xi-fog:before{content:"\e880"}.xi-lightning:before{content:"\e881"}.xi-cloudiness:before{content:"\e882"}.xi-cloudy-rain:before{content:"\e883"}.xi-heavy-snow:before{content:"\e884"}.xi-rain:before{content:"\e885"}.xi-cloudy-night:before{content:"\e886"}.xi-partly-cloudy:before{content:"\e887"}.xi-cloudy:before{content:"\e888"}.xi-wind:before{content:"\e889"}.xi-windy:before{content:"\e88a"}.xi-night:before{content:"\e88b"}.xi-full-moon:before{content:"\e88c"}.xi-waxing-gibbous:before{content:"\e88d"}.xi-halfmoon:before{content:"\e88e"}.xi-crescent:before{content:"\e88f"}.xi-hot:before{content:"\e890"}.xi-warm:before{content:"\e891"}.xi-cold:before{content:"\e892"}.xi-tree:before{content:"\e893"}.xi-leaf:before{content:"\e894"}.xi-flower:before{content:"\e895"}.xi-tornado:before{content:"\e896"}.xi-snowman:before{content:"\e897"}.xi-facebook:before{content:"\e819"}.xi-google-plus:before{content:"\e81a"}.xi-twitter:before{content:"\e81b"}.xi-vk:before{content:"\e81c"}.xi-blogger:before{content:"\e81d"}.xi-hubpages:before{content:"\e81e"}.xi-medium:before{content:"\e81f"}.xi-naver:before{content:"\e820"}.xi-tumblr:before{content:"\e821"}.xi-xing:before{content:"\e822"}.xi-bloglovin:before{content:"\e823"}.xi-stumbleupon:before{content:"\e824"}.xi-delicious:before{content:"\e825"}.xi-linkedin:before{content:"\e826"}.xi-pocket:before{content:"\e827"}.xi-feedly:before{content:"\e828"}.xi-social-rssfeed:before{content:"\e829"}.xi-digg:before{content:"\e82a"}.xi-reddit:before{content:"\e82b"}.xi-social-email:before{content:"\e82c"}.xi-social-print:before{content:"\e82d"}.xi-github:before{content:"\e82e"}.xi-git:before{content:"\e82f"}.xi-hunie:before{content:"\e830"}.xi-trello:before{content:"\e831"}.xi-yobi:before{content:"\e832"}.xi-d2:before{content:"\e898"}.xi-skillshare:before{content:"\e833"}.xi-slideshare:before{content:"\e834"}.xi-stackoverflow:before{content:"\e835"}.xi-flickr:before{content:"\e836"}.xi-instagram:before{content:"\e837"}.xi-kakaostory:before{content:"\e838"}.xi-path:before{content:"\e839"}.xi-behance:before{content:"\e83a"}.xi-deviantart:before{content:"\e83b"}.xi-dribbble:before{content:"\e83c"}.xi-pinterest:before{content:"\e83d"}.xi-evernote:before{content:"\e83e"}.xi-onenote:before{content:"\e83f"}.xi-goodreads:before{content:"\e840"}.xi-kickstarter:before{content:"\e841"}.xi-senscritique:before{content:"\e842"}.xi-myplace:before{content:"\e843"}.xi-soundcloud:before{content:"\e844"}.xi-vimeo:before{content:"\e845"}.xi-youtube:before{content:"\e846"}.xi-foursquare:before{content:"\e847"}.xi-trover:before{content:"\e848"}.xi-facebook-messenger:before{content:"\e849"}.xi-kakaotalk:before{content:"\e899"}.xi-line-messenger:before{content:"\e84b"}.xi-skype:before{content:"\e84c"}.xi-telegram:before{content:"\e84d"}.xi-wechat:before{content:"\e84e"}.xi-whatsapp:before{content:"\e84f"}.xi-bitrix:before{content:"\e850"}.xi-concrete5:before{content:"\e851"}.xi-dot-cms:before{content:"\e852"}.xi-drupal:before{content:"\e853"}.xi-expressionengine:before{content:"\e854"}.xi-ghost:before{content:"\e855"}.xi-joomla:before{content:"\e856"}.xi-magento:before{content:"\e858"}.xi-opencart:before{content:"\e859"}.xi-oscommerce:before{content:"\e85a"}.xi-prestashop:before{content:"\e85b"}.xi-silverstripe:before{content:"\e85c"}.xi-typo3:before{content:"\e85d"}.xi-ubercart:before{content:"\e85e"}.xi-vbulletin:before{content:"\e85f"}.xi-wix:before{content:"\e860"}.xi-virtuemart:before{content:"\e861"}.xi-wordpress:before{content:"\e862"}.xi-xpressengine:before{content:"\e863"}.xi-xe:before{content:"\e89b"}.xi-zencart:before{content:"\e864"}.xi-copyright:before{content:"\e89c"}.xi-copyleft:before{content:"\e89d"}.xi-registered:before{content:"\e89e"}.xi-trademark:before{content:"\e89f"}.xi-cc:before{content:"\e8a0"}.xi-by:before{content:"\e8a1"}.xi-sa:before{content:"\e8a2"}.xi-nd:before{content:"\e8a3"}.xi-nc:before{content:"\e8a4"}.xi-nc-eu:before{content:"\e8a5"}.xi-nc-jp:before{content:"\e8a6"}.xi-remix:before{content:"\e8a7"}.xi-pd:before{content:"\e8a8"}.xi-sampling:before{content:"\e8a9"}.xi-share:before{content:"\e8aa"}.xi-zero:before{content:"\e8ab"}.xi-x{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.xi-2x{font-size:2em}.xi-3x{font-size:3em}.xi-4x{font-size:4em}.xi-5x{font-size:5em}.xi-spin{-webkit-animation:xi-spin 2s infinite linear;animation:xi-spin 2s infinite linear}@-webkit-keyframes xi-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes xi-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.xi-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.xi-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.xi-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.xi-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.xi-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .xi-flip-horizontal,:root .xi-flip-vertical,:root .xi-rotate-180,:root .xi-rotate-270,:root .xi-rotate-90{filter:none}.xi-fw{width:1.28571429em;text-align:center}.xi-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.xi-ul>li{position:relative}.xi-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.xi-li.xi-lg{left:-1.85714286em}.xi-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.xi.pull-left{margin-right:.3em}.xi.pull-right{margin-left:.3em} \ No newline at end of file diff --git a/web/src/main/webapp/lib/js/pinpoint.min.js b/web/src/main/webapp/lib/js/pinpoint.min.js index ba3468810..170d4f4a9 100644 --- a/web/src/main/webapp/lib/js/pinpoint.min.js +++ b/web/src/main/webapp/lib/js/pinpoint.min.js @@ -4,6 +4,6 @@ this.setMainApplication=function(a){if(!angular.isString(a))throw new Error("mai w(d),c.periodType=b.periodType.REALTIME,P(l.getPeriod())}),c.$on("navbarDirective.initializeWithStaticApplication",function(a,b){H(b)}),c.$on("navbarDirective.moveToPast",function(a){O(c.periodType===b.periodType.LAST?-N(c.readablePeriod):-(s.getQueryEndTime()-s.getQueryStartTime()))}),c.$on("navbarDirective.moveToFuture",function(a){O(c.periodType===b.periodType.LAST?N(c.readablePeriod):s.getQueryEndTime()-s.getQueryStartTime())}),c.$on("navbarDirective.changedFavorite",function(a){F(S,function(){c.disableApplication=!1,g(function(){s.getApplication()&&(p.select2("val",s.getApplication()),c.application=s.getApplication())})})})}}}])}(jQuery),function(){"use strict";pinpointApp.constant("serverMapDirectiveConfig",{options:{sContainerId:"servermap",sOverviewId:"servermapOverview",sBigFont:"11pt Lato,NanumGothic,ng,dotum,AppleGothic,sans-serif",sSmallFont:"11pt Lato,NanumGothic,ng,dotum,AppleGothic,sans-serif",sImageDir:"/images/servermap/",htLinkType:{sRouting:"Normal",sCurve:"JumpGap"},htLinkTheme:{"default":{backgroundColor:"#ffffff",borderColor:"#c5c5c5",fontFamily:"11pt Lato,NanumGothic,ng,dotum,AppleGothic,sans-serif",fontColor:"#000000",fontAlign:"center",margin:1,strokeWidth:1},bad:{backgroundColor:"#ffc9c9",borderColor:"#7d7d7d",fontFamily:"11pt Lato,NanumGothic,ng,dotum,AppleGothic,sans-serif",fontColor:"#FF1300",fontAlign:"center",margin:1,strokeWidth:1}}}}),pinpointApp.directive("serverMapDirective",["serverMapDirectiveConfig","$rootScope","ServerMapDaoService","AlertsService","ProgressBarService","SidebarTitleVoService","$filter","ServerMapFilterVoService","filteredMapUtilService","$base64","ServerMapHintVoService","$timeout","$location","$window","helpContentTemplate","helpContentService","AnalyticsService",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){return{restrict:"EA",replace:!0,templateUrl:"features/serverMap/serverMap.html?v="+G_BUILD_TIME,link:function(r,s,t){var u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W;z=new d(s),A=new e(s),E=!1,y=null,B={applicationMapData:{linkDataArray:[],nodeDataArray:[]},lastFetchedTimestamp:[],timeSeriesResponses:{values:{},time:[]}},w={},C={},D={},r.oNavbarVoService=null,r.totalRequestCount=!0,r.bShowServerMapStatus=!1,r.linkRouting=a.options.htLinkType.sRouting,r.linkCurve=a.options.htLinkType.sCurve,r.searchNodeQuery="",r.searchNodeIndex=0,r.searchNodeList=[],J=s.find(".serverMapTime"),F=s.find(".fromAgentName"),G=s.find(".toAgentName"),F.select2(),G.select2(),H=!1,r.mergeTypeList=[],r.mergeStatus={},r.showAntStyleHint=!1,W=function(a){a.nodeDataArray.forEach(function(a){a.isWas===!1&&"USER"!==a.serviceType&&angular.isUndefined(r.mergeStatus[a.serviceType])&&(r.mergeTypeList.push(a.serviceType),r.mergeStatus[a.serviceType]=!0)})},M=function(){r.nodeContextMenuStyle="",r.linkContextMenuStyle="",r.backgroundContextMenuStyle="",r.urlPattern="",r.responseTime={from:0,to:3e4},r.includeFailed=null,$("#filterWizard").modal("hide"),"$apply"!=r.$$phase&&"$digest"!=r.$$phase&&"$apply"!=r.$root.$$phase&&"$digest"!=r.$root.$$phase&&r.$digest()},K=function(a,b,d,e,f,g,h,j){A.startLoading(),z.hideError(),z.hideWarning(),z.hideInfo(),y&&y.clear(),A.setLoading(10),w={applicationName:a,serviceTypeName:b,from:d-e,to:d,originTo:r.oNavbarVoService.getQueryEndTime(),callerRange:r.oNavbarVoService.getCallerRange(),calleeRange:r.oNavbarVoService.getCalleeRange(),period:e,filter:n.encodeURIComponent(f),hint:g?n.encodeURIComponent(g):!1},f?c.getFilteredServerMapData(w,function(a,b,d){if(a)return A.stopLoading(),z.showError("There is some error."),!1;A.setLoading(50),b.from===d.lastFetchedTimestamp?r.$emit("serverMapDirective.allFetched",d):(B.lastFetchedTimestamp=d.lastFetchedTimestamp-1,r.$emit("serverMapDirective.fetched",B.lastFetchedTimestamp,d));var e=JSON.parse(f);B.applicationMapData=c.mergeFilteredMapData(B.applicationMapData,d.applicationMapData);var g=c.extractDataFromApplicationMapData(B.applicationMapData);if(g=c.addFilterProperty(e,g),W(g),i.doFiltersHaveUnknownNode(e))for(var k in r.mergeStatus)r.mergeStatus[k]=!1;N(B),Q(b,g,h,j)}):c.getServerMapData(w,function(a,b,d){if(a||d.exception)return A.stopLoading(),a?z.showError("There is some error."):z.showError(d.exception),r.$emit("serverMapDirective.hasNoData"),!1;A.setLoading(50),N(d),B=d;var e=c.extractDataFromApplicationMapData(d.applicationMapData);W(e),Q(b,e,h,j)})},N=function(a){0===a.applicationMapData.nodeDataArray.length?r.$emit("serverMapDirective.hasNoData"):r.$emit("serverMapDirective.hasData")},L=function(a,b,c,d){r.inspectApplicationName=c,r.inspectCategory=d,r.nodeContextMenuStyle={display:"block",top:a,left:b,"z-index":9999999},r.$digest()},O=function(a,b){r.linkContextMenuStyle={display:"block",top:a,left:b,"z-index":9999999},r.$digest()},P=function(a,b){r.backgroundContextMenuStyle={display:"block",top:a,left:b,"z-index":9999999},r.$digest()},V=function(){var a=[];for(var b in r.mergeStatus)r.mergeStatus[b]===!0&&a.push(b);return a},Q=function(d,e,f,h){var i=V();if(I=c.mergeMultiLinkGroup(c.mergeGroup(e,i),i),A.setLoading(80),0!==I.nodeDataArray.length){I.linkDataArray=R(I.linkDataArray,f,h),A.setLoading(90);var k=a.options;k.fOnNodeSubGroupClicked=function(a,b,d,e){var f=c.getLinkNodeDataByNodeKey(B.applicationMapData,d,e);f.fromNode=c.getNodeDataByKey(B.applicationMapData,f.from),f.toNode=c.getNodeDataByKey(B.applicationMapData,f.to),k.fOnLinkClicked(a,f)},k.fOnNodeClicked=function(a,d,e,f){var g;angular.isDefined(d.unknownNodeGroup)&&!e?d.unknownNodeGroup=c.getUnknownNodeDataByUnknownNodeGroup(B.applicationMapData,d.unknownNodeGroup):g=c.getNodeDataByKey(B.applicationMapData,e||d.key),g&&(d=g),E="node",D=d,r.$emit("serverMapDirective.nodeClicked",a,w,d,I,f),r.oNavbarVoService&&r.oNavbarVoService.isRealtime()&&b.$broadcast("realtimeChartController.initialize",d.isWas,d.applicationName,r.oNavbarVoService.getApplication()+"/"+r.oNavbarVoService.getReadablePeriod()+"/"+r.oNavbarVoService.getQueryEndDateTime()+"/"+r.oNavbarVoService.getCallerRange()),M()},k.fOnNodeDoubleClicked=function(a,b,c){a.diagram.zoomToRect(b.actualBounds,1.2)},k.fOnNodeContextClicked=function(a,b){if(!r.oNavbarVoService.isRealtime()){M();var d=c.getNodeDataByKey(B.applicationMapData,b.key);d&&(b=d),D=b,u&&b.isWas===!0&&L(a.event.layerY,a.event.layerX,b.applicationName,b.category)}},k.fOnLinkClicked=function(a,b){if(!r.oNavbarVoService.isRealtime()){var d;angular.isDefined(b.unknownLinkGroup)?b.unknownLinkGroup=c.getUnknownLinkDataByUnknownLinkGroup(B.applicationMapData,b.unknownLinkGroup):d=c.getLinkDataByKey(B.applicationMapData,b.key),d&&(d.fromNode=b.fromNode,d.toNode=b.toNode,b=d),E="link",C=b,M(),r.$emit("serverMapDirective.linkClicked",a,w,b,I)}},k.fOnLinkContextClicked=function(a,b){var f=c.getLinkDataByKey(B.applicationMapData,b.key);f&&(f.fromNode=b.fromNode,f.toNode=b.toNode,b=f),M(),C=b,v&&!angular.isArray(b.targetInfo)&&(O(a.event.layerY,a.event.layerX),r.$emit("serverMapDirective.linkContextClicked",a,d,b,e))},k.fOnBackgroundClicked=function(a){r.$emit("serverMapDirective.backgroundClicked",a,d),M()},k.fOnBackgroundDoubleClicked=function(a){S()},k.fOnBackgroundContextClicked=function(a){r.$emit("serverMapDirective.backgroundContextClicked",a,d),M(),x&&P(a.diagram.lastInput.event.layerY,a.diagram.lastInput.event.layerX)};var l;try{l=_.find(I.nodeDataArray,function(a){return a.applicationName===d.applicationName&&angular.isUndefined(d.serviceType)?!0:a.applicationName===d.applicationName&&a.serviceTypeCode===d.serviceTypeCode}),l&&(k.sBoldKey=l.key)}catch(n){z.showError("There is some error while selecting a node."),console.log(n)}A.setLoading(100),null===y?y=new ServerMap(k,m,q):y.option(k),y.load(I),A.stopLoading(),T(l)}else if(A.stopLoading(),r.oNavbarVoService.getFilter()){var o=r.oNavbarVoService.getFilterAsJson(),p=[];p.push("

    There is no data with the filter below.

    "),angular.forEach(o,function(a,b){p.push("

    Filter"),o.length>1&&p.push(" #"+(b+1)),p.push(" : "+a.fa+"("+a.fst+") ~ "+a.ta+"("+a.tst+")
    "),p.push("

      "),a.url&&p.push("
    • Url Pattern : "+j.decode(a.url)+"
    • "),a.rf&&a.rt&&p.push("
    • Response Time : "+g("number")(a.rf)+" ms ~ "+g("number")(a.rt)+" ms
    • "),p.push("
    • Transaction Result : "+(a.ie?"Failed Only":"Success + Failed")+"
    • "),p.push("

    ")}),z.showInfo(p.join(""))}else z.showInfo("There is no data.")},R=function(a,b,c){var d=a;for(var e in d)d[e].from===d[e].to?d[e].routing="AvoidsNodes":d[e].routing=b,d[e].curve=c;return d},U=function(){M();var a=new f;"USER"===C.fromNode.serviceType?a.setImageType("USER").setTitle("USER"):a.setImageType(C.fromNode.serviceType).setTitle(C.fromNode.applicationName),a.setImageType2(C.toNode.serviceType).setTitle2(C.toNode.applicationName),r.fromAgent=C.fromAgent||[],r.toAgent=C.toAgent||[],r.sourceInfo=C.sourceInfo,r.targetInfo=C.targetInfo,r.fromApplicationName=C.fromNode.applicationName,r.toApplicationName=C.toNode.applicationName,F.select2("val",""),G.select2("val",""),r.fromAgentName="",r.toAgentName="",r.$broadcast("sidebarTitleDirective.initialize.forServerMap",a),$("#filterWizard").modal("show"),H||(H=!0,$("#filterWizard").on("shown.bs.modal",function(){if($("slider",this).addClass("auto"),setTimeout(function(){$("#filterWizard slider").removeClass("auto")},500),r.oNavbarVoService.getFilter()){var a=i.findFilterInNavbarVo(C.fromNode.applicationName,C.fromNode.serviceType,C.toNode.applicationName,C.toNode.serviceType,r.oNavbarVoService);if(a){r.urlPattern=a.oServerMapFilterVoService.getRequestUrlPattern(),r.responseTime.from=a.oServerMapFilterVoService.getResponseFrom();var b=a.oServerMapFilterVoService.getResponseTo();r.responseTime.to="max"===b?3e4:b,r.includeFailed=a.oServerMapFilterVoService.getIncludeException(),F.select2("val",a.oServerMapFilterVoService.getFromAgentName()),G.select2("val",a.oServerMapFilterVoService.getToAgentName())}else r.responseTime={from:0,to:3e4}}else r.responseTime={from:0,to:3e4};r.$$phase||r.$digest()}))},r.passingTransactionResponseToScatterChart=function(){r.$emit("serverMapDirective.passingTransactionResponseToScatterChart",D),M()},r.passingTransactionList=function(){q.send(q.CONST.CONTEXT,q.CONST.CLK_FILTER_TRANSACTION);var a=new h;a.setMainApplication(C.filterApplicationName).setMainServiceTypeName(C.filterApplicationServiceTypeName).setMainServiceTypeCode(C.filterApplicationServiceTypeCode).setFromApplication(C.fromNode.applicationName).setFromServiceType(C.fromNode.serviceType).setToApplication(C.toNode.applicationName).setToServiceType(C.toNode.serviceType);var b=new k;C.sourceInfo.isWas&&C.targetInfo.isWas&&b.setHint(C.toNode.applicationName,C.filterTargetRpcList),r.$broadcast("serverMapDirective.openFilteredMap",a,b),M()},r.openFilterWizard=function(){q.send(q.CONST.CONTEXT,q.CONST.CLK_FILTER_TRANSACTION_WIZARD),U()},S=function(){y&&y.zoomToFit()},T=function(a){l(function(){"node"===E&&D?y.highlightNodeByKey(D.key):"link"===E&&C?y.highlightLinkByFromTo(C.from,C.to):a&&y.highlightNodeByKey(a.key)})},r.responseTimeFormatting=function(a){return 3e4==a?"30,000+ ms":g("number")(a)+" ms"},r.passingTransactionMap=function(){var a=new h;a.setMainApplication(C.filterApplicationName).setMainServiceTypeCode(C.filterApplicationServiceTypeCode).setMainServiceTypeName(C.filterApplicationServiceTypeName).setFromApplication(C.fromNode.applicationName).setFromServiceType(C.fromNode.serviceType).setToApplication(C.toNode.applicationName).setToServiceType(C.toNode.serviceType).setResponseFrom(r.responseTime.from).setResponseTo(r.responseTime.to).setIncludeException(r.includeFailed).setRequestUrlPattern(j.encode(r.urlPattern)),r.fromAgentName&&a.setFromAgentName(r.fromAgentName),r.toAgentName&&a.setToAgentName(r.toAgentName);var b=new k;C.sourceInfo.isWas&&C.targetInfo.isWas&&b.setHint(C.toNode.applicationName,C.filterTargetRpcList),r.$broadcast("serverMapDirective.openFilteredMap",a,b),M()},r.toggleMergeGroup=function(a){q.send(q.CONST.CONTEXT,q.CONST.TG_MERGE_TYPE,a),r.mergeStatus[a]=!r.mergeStatus[a],Q(w,c.extractDataFromApplicationMapData(B.applicationMapData),r.linkRouting,r.linkCurve),M()},r.toggleLinkLableTextType=function(a){"tps"===a?(q.send(q.CONST.CONTEXT,q.CONST.TG_TPS),r.totalRequestCount=!1,r.tps=!0):(q.send(q.CONST.CONTEXT,q.CONST.TG_CALL_COUNT),r.totalRequestCount=!0,r.tps=!1),r.totalRequestCount="tps"!==a,r.tps="tps"===a,Q(w,I,r.linkRouting,r.linkCurve),M()},r.toggleLinkRouting=function(b){q.send(q.CONST.CONTEXT,q.CONST.TG_ROUTING,b),r.linkRouting=a.options.htLinkType.sRouting=b,Q(w,I,r.linkRouting,r.linkCurve),M()},r.toggleLinkCurve=function(b){q.send(q.CONST.CONTEXT,q.CONST.TG_CURVE,b),r.linkCurve=a.options.htLinkType.sCurve=b,Q(w,I,r.linkRouting,r.linkCurve),M()},r.refresh=function(){q.send(q.CONST.CONTEXT,q.CONST.CLK_REFRESH),y&&y.refresh(),M()},r.$on("serverMapDirective.initialize",function(a,b){r.oNavbarVoService&&w.applicationName!==b.getApplicationName()&&(E=!1),r.oNavbarVoService=b,r.oNavbarVoService.getQueryEndTime()===!1||r.oNavbarVoService.getQueryStartTime()===!1?r.bShowServerMapStatus=!1:r.bShowServerMapStatus=!0,v=x=!0,u=!1,K(b.getApplicationName(),b.getServiceTypeName(),b.getQueryEndTime(),b.getQueryPeriod(),b.getFilter(),b.getHint(),r.linkRouting,r.linkCurve)}),r.$on("serverMapDirective.fetch",function(a,b,c){K(r.oNavbarVoService.getApplicationName(),r.oNavbarVoService.getServiceTypeName(),c,b,r.oNavbarVoService.getFilter(),r.oNavbarVoService.getHint(),r.linkRouting,r.linkCurve)}),r.$on("serverMapDirective.initializeWithMapData",function(a,b,d,e){M(),r.bShowServerMapStatus=!1,x=!0,u=b,v=!1,w={applicationName:d.applicationId},B=d,r.oNavbarVoService=e,Q(w,c.extractDataFromApplicationMapData(B.applicationMapData),r.linkRouting,r.linkCurve)}),r.$on("serverMapDirective.zoomToFit",function(a){S()}),r.$on("serverMapDirective.openFilterWizard",function(a,b){C=b,U()}),r.searchNodeByEnter=function(a){13==a.keyCode&&r.searchNode()},r.searchNodeWithCategory=function(a){y&&(r.searchNodeIndex=a,y.searchNode(r.searchNodeList[a].applicationName,r.searchNodeList[a].serviceType))},r.searchNode=function(){y&&""!==r.searchNodeQuery&&(q.send(q.CONST.MAIN,q.CONST.CLK_SEARCH_NODE),r.searchNodeIndex=0,r.searchNodeList=y.searchNode(r.searchNodeQuery),jQuery(s).find(".search-result").show().find(".count").html("Result : "+r.searchNodeList.length))},r.clearSearchNode=function(){q.send(q.CONST.MAIN,q.CONST.CLK_CLEAR_SEARCH),y.clearQuery(),r.searchNodeIndex=0,r.searchNodeQuery="",r.searchNodeList=[],jQuery(s).find(".search-result").hide()},r.toggleShowAntStyleHint=function(){r.showAntStyleHint=!r.showAntStyleHint},r.moveToPast=function(){r.$emit("navbarDirective.moveToPast"),J.effect("highlight",{color:"#FFFF00"},1e3)},r.moveToFuture=function(){r.$emit("navbarDirective.moveToFuture"),J.effect("highlight",{color:"#FFFF00"},1e3)},r.toggleToolbar=function(){var a=jQuery(s).find(".servermap-toolbar"),b=jQuery(s).find(".servermap-toolbar-handle span");-1==parseInt(a.css("top"))?(a.find(".search-result").hide(),a.animate({top:-55},"fast",function(){b.addClass("glyphicon-chevron-down").removeClass("glyphicon-chevron-up")})):a.animate({top:-1},"fast",function(){r.searchNodeList.length>0&&a.find(".search-result").show(),b.addClass("glyphicon-chevron-up").removeClass("glyphicon-chevron-down")})},jQuery(".serverMapTooltip").tooltipster({content:function(){return o(p.servermap["default"])},position:"bottom-right",trigger:"click"})}}}])}(),function(){"use strict";pinpointApp.constant("realtimeChartDirectiveConfig",{params:{TIMEOUT_MAX_COUNT:"timeoutMaxCount",SHOW_EXTRA_INFO:"showExtraInfo",REQUEST_LABEL:"requestLabel",REQUEST_COLOR:"requestColor",CHART_COLOR:"chartColor",NAMESPACE:"namespace",XCOUNT:"xcount",HEIGHT:"height",WIDTH:"width"},responseCode:{ERROR_BLACK:111,TIMEOUT:211},consts:{maxDealyCount:5,verticalGridCount:5},message:{NO_ACTIVE_THREAD:"No Active Thread",NO_RESPONSE:"No Response"}}),pinpointApp.directive("realtimeChartDirective",["realtimeChartDirectiveConfig",function(a){return{restrict:"EA",replace:!0,template:'',link:function(b,c,d){function e(){L=d3.select(c.get(0)).attr("width",y.width).attr("height",y.height).append("g").attr("class","base").attr("transform","translate("+(y.showExtraInfo?z.margin.left:0)+","+z.margin.top+")"),L.append("defs").append("clipPath").attr("id","clip-"+y.namespace).append("rect").attr("x",1).attr("y",0).attr("width",A).attr("height",B)}function f(){G.length=0;for(var a=Date.now(),b=0;bA?-1e3:E,V.attr("transform","translate("+(E-z.tooltipWidth)+",0)"),p(o(D))})}function o(a){var b=[];if(-1===a)return b;for(var c=0;c1?(Y.attr("y","20%"),Z.text(b[0]),$.text(b[1])):(Y.attr("y","40%"),Z.text(b[0]),$.text(""))}function t(a){if(y.showExtraInfo!==!1){var b=0;T.data(a).text(function(a,c){return"undefined"!=typeof a.y?(b+=a.y,a.y):""}),U.text(b)}}function u(){I=0}function v(){aa=aa.each(function(){if(I++,0===F.length)return void(I>a.consts.maxDealyCount&&y.showExtraInfo===!1&&s(!1,[a.message.NO_RESPONSE]));u();var b=F.shift();t(b),h(),y.showExtraInfo===!1&&w();var c=0;for(c=0;c
    ",images:{config:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QTI2NzMzRDI2QTlGMTFFM0E1RENBRjZGODkwRDBCMEIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QTI2NzMzRDM2QTlGMTFFM0E1RENBRjZGODkwRDBCMEIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBMjY3MzNEMDZBOUYxMUUzQTVEQ0FGNkY4OTBEMEIwQiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBMjY3MzNEMTZBOUYxMUUzQTVEQ0FGNkY4OTBEMEIwQiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pn/ejkcAAAFwSURBVHjanFKxSsNQFE2CFEtaTNsMCbSQ4lA6GSghi2igo/o/GVz6AfmD/EFGJ7cKDiVLO0hFEByzpG1EA5LUxntC80jFKhi4LzfnnnPfzXmPz7KM+9ezT6iq6gnF+T4Nny88/110VK1WbwRB4OM4vgyC4PVXIQlW9JqRwGo2mzm2XC65zWYzplSnBo1CeFDu1Ov1XhaLhVWpVBimKAqXJInVarWmJGQ42xHjybIcQSSK4rNt29cgOI5jR1Gkk5gLw1DC2LkvWGBCu90eDwaDDOF53hXhhwjf908LHByYBo2ArqZpfnY6HbEYw3XdJ5riAzEajR4LHJxut6syhyhq5c6apt1hdER5EnCIKzFzqPM7fUwkSZrhf+r1+lmaphFqjUZuJIeaYRgT4q7ZqFvxmn7+GAQYBDcRyIGhBs6PN4dyjKLP5/OL4XA4RSAHhlpZs3OO1PF+W3ggwxQ6u7d+v3+7s9Nfd3VrQm3fXf0SYADyptv3yy4A0QAAAABJRU5ErkJggg==",download:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RUU3MjQyMUQ2QTlGMTFFM0IxRTY4MjI3MUU5MUUyMzMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RUU3MjQyMUU2QTlGMTFFM0IxRTY4MjI3MUU5MUUyMzMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpFRTcyNDIxQjZBOUYxMUUzQjFFNjgyMjcxRTkxRTIzMyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpFRTcyNDIxQzZBOUYxMUUzQjFFNjgyMjcxRTkxRTIzMyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PlnySxAAAADPSURBVHjaxFLBDYMwDLQjMgEf4M8E4Y0YgzHaTTpGFuDfARAdoH3DiwmQSLmqRIZSpPLpSTH4krOjc9g5R0cQIDDzgozj2Ffrum6xOTcKtqolSUJCuNlR0UH8WTiZcpPGzEaB3xVWVXVO0/QhOeTgP1rKOU7/QdM0RZ7nd2OMwxc5eHkeixEm+71aKUVhGJLWmoZhoL7vaRxHX7xtW/ZzlHOTgDiKIirL8oTcWnuZ914dsyzbfXfoCuAmdV3z15ezBgRr8Nuc4ocRXhGeAgwAFHJVgfQ6KdUAAAAASUVORK5CYII=",fullscreen:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QkMwOTc3QTg2QTlGMTFFMzk5MzhBOTM4OEFCMzg3MTciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QkMwOTc3QTk2QTlGMTFFMzk5MzhBOTM4OEFCMzg3MTciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpCQzA5NzdBNjZBOUYxMUUzOTkzOEE5Mzg4QUIzODcxNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpCQzA5NzdBNzZBOUYxMUUzOTkzOEE5Mzg4QUIzODcxNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvZjiPIAAAE/SURBVHjanFKxaoRAEHXhbM4UopViGWzv0C5VUvsJqdP7A/6Dfb7DMmCVSuRCunClaKUYSKUQM2+zY1SsMjDuuDtv9u3ME9M0af+xAz6u687opmnENslxnFX1uq6FhhvDMKRluofvVeczuMr9vREmhMhRmRy/F3IukhOjM7Mh4B9VNkqQq67rR9u25VnbtsdxHPkZ6zcWRfFAN2qGYVzx3/e9X1XVC2LLsnzTNK8MQK5kCL4AwcqylPTiOH4m8C1igNI0fUIcBEGu3rwGRlFkK3qvRM9XtD+I9h3iLMvaXaDneRdF78T0cHPXdW+Iif6ZgavmALClB9q0nBRw3RyMAa0mWnJzGIbvJEneOeb9hRgEK0e2mjtG9kX+qeJH8hs163lkh2UlVWAruYIlp8ShzeNYqEQqaE9ym638R4ABADZiqF446UJLAAAAAElFTkSuQmCC",error:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABmJLR0QA/wD/AP+gvaeTAAADvUlEQVRoge2ZQW8bRRTHf2+2tMTrkCYFkQ9QqBBKC03aOOkldqtKUcUFqeUbkAN3pFSIGxQOFRx6IN8AJeIYtVIc1xdqHAdCE3EgKeeqNAlV8dIm8u7j0FasHW+8u7E3Rcrv9mbe7P7/mtHsmx044IA9Ie14iI4fP1LdPjYKZEEHBE4g9KOkAUVwUO4rrIIuI9bt9CvrJbl5b2uv796TASc7POgJEyJ6BeiJOPyRotNGrSm78NMvcTXEMuDkMqfVeNdQLsZ9cQO3MDqZnqv8GnVgJAM6MtLlpLyvQD8BrKgva0EN0Rt2zZ6UYvFp2EGhDTzODp0wRmZABuLpC81d18jlnrnyWpjkUAac82fOqMoswht70xaaTU/1g9cKlTutElsa+CebGVbj5RXS7dEWDoGqqHc+VVhcaJEXzLNlY34EjrVVXXjWXSOjuy0nE9ShY2OvGmO+Z//EA7xued4POjLSFZQQaMCxnnwNvNcRWZGQAafL/SKwt1mjk8ucVvEWaP9WGRcXo0PNvhNNZ0CNd42XRzyAhUrTWdgxA052eFCNLnZeU2RUxBu084tL/sYdM+AJE8lpioR4mI93NPoDHT9+xNnue0D0wiwZhL/sXqdfZn7bftFUNwPVrb5zvKziAZTe6kYq42+qX0IiY0nqiYWRXF1Y1yneqUTFxEE56Q8P+QNReSvsc+x8uV2SAHAuDIfKE3jbHzfuQm+2S1AHqdPYaCDRijMm3f4gsBb6v9BooLovKqKgPPaHjQYeJCglHsKf/rBuF1JYFXgnzHPC7hrtRlR+98cNM6B3kxQTD132Rw0GTDFBJbFwhYI/rjOQPrxxB3iUqKJobHb3OXVf0DoDcvPelqrMJKspPCpM+ytRaPIdMMh3yUmKhIroVGPjDgPPf7TeSkRSNGZDn4kR61Og1mlFEajh8VmzjqYG0vnSCqI3OqspAqLfpm8vNN3iA2shu2ZPAktB/QmybDuHPg/qDDQgxeJT18hHwHpHZIVBeVhT90MplZ4EpexajfbMldeMepdkH4o8gaqIXjpa+PmP3fJaltPP/g5rDuVh++S1ZFPgoj1fqbRKDHUesOcrFdeSc0AStdJSTd2zqfmFUpjk0Aeanrnymu2mMijf0JkttgZy3XZTo62WjZ9Yl3zV7NlTWHyJMh73GT4UmEWsq+l8aSXq4L1ds14Yet9TMyHCFZTeiMM3VZgW0ak4t5MvaM9F9+V3D1c3UhmM5FBOPv/10c9/B/C/Ue4LsuoZXVFlvrvPKTcWZgccsA/8C1bvKjPyfF8QAAAAAElFTkSuQmCC"},options:{containerId:"",containerClass:"bigscatterchart",width:400,height:250,minX:0,maxX:1e3,minY:0,maxY:1e4,minZ:0,maxZ:5,bubbleSize:3,labelX:"",labelY:"(ms)",realtime:!1,chartAnimationTime:300,gridAxisStyle:{lineWidth:1,lineDash:[1,0],globalAlpha:1,strokeStyle:"#e3e3e3"},padding:{top:40,left:50,right:40,bottom:30},typeInfo:{0:["Failed","#d62728",20],1:["Success","#2ca02c",10]},propertyIndex:{x:0,y:1,meta:2,transactionId:3,type:4,groupCount:5},checkBoxImage:{checked:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODk0MjRENUI2Qjk2MTFFM0E3NkNCRkIyQTkxMjZFQjMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODk0MjRENUM2Qjk2MTFFM0E3NkNCRkIyQTkxMjZFQjMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4OTQyNEQ1OTZCOTYxMUUzQTc2Q0JGQjJBOTEyNkVCMyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4OTQyNEQ1QTZCOTYxMUUzQTc2Q0JGQjJBOTEyNkVCMyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkJ02akAAAEfSURBVHjalJI/aoRQEMbnrU8RRVYsBAXJASxEtLGRXEDIJXKTpPcOHiDl1gsp1QvEIiD2AbGLmpm3f7Is68YMjOOb9/0Y/Rg2zzPEcTzDP6IsS7Y5QXTAsibFIH4BQVVVi1Mcx9liyTFN13W/+JpPI0iSpL1hGEHf9+E0TSBAxtifkGVZgSzLgBkMwwCbNZNOEIVpmo3v+78gigLMt+O/3IR0XW/yPH/uuu4AEqQoComeSIznhyUoDMP3cRwPoKZpLyjaqqoKJOacfy5B6Mc39QRYFMUrOtbQO4lt24Z70BlMkqSkSxJdmrMEiYiiSGwOrh6v6/oxTdMP6lGlM/Wv3RYMPY55hrMs292DKNn1kqOb4HketG0L5N5CsB8BBgCZjoUNsxfiYwAAAABJRU5ErkJggg==", unchecked:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OEQxQ0ZERUQ2Qjk2MTFFMzg5MjNGMjAzRjdCQ0FEMjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEQxQ0ZERUU2Qjk2MTFFMzg5MjNGMjAzRjdCQ0FEMjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4RDFDRkRFQjZCOTYxMUUzODkyM0YyMDNGN0JDQUQyOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4RDFDRkRFQzZCOTYxMUUzODkyM0YyMDNGN0JDQUQyOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pq1+Js8AAABTSURBVHjaYvz//z+DiYnJfwYSwJkzZxgZjY2NYZoYidQHVs9Eoia4WhY0JxDUBfQWA7KNRGlCVsfEQCYY1UhLjf9hEUtEAgAnOUZyEjlIH0CAAQDn/BlKI9rDJAAAAABJRU5ErkJggg=="}}}),pinpointApp.directive("scatterDirective",["scatterDirectiveConfig","$rootScope","$compile","$timeout","webStorage","$window","$http","CommonAjaxService","TooltipService","AnalyticsService","PreferenceService",function(a,b,c,d,e,f,g,h,i,j,k){return{template:a.template,restrict:"EA",replace:!0,link:function(c,g,l){function m(c,g,h,l,m){var n=v.getQueryStartTime(),o=v.getQueryEndTime(),p=v.getFilter(),q=g.split("^")[0],r={};angular.copy(a.options,r),r.sPrefix="BigScatterChart2-"+parseInt(1e5*Math.random()),r.containerId=c,r.width=h?h:400,r.height=l?l:250,r.minX=n,r.maxX=o,r.errorImage=a.images.error,r.realtime=u();var s=new BigScatterChart2(r,t(m),[new BigScatterChart2.SettingPlugin(a.images.config).addCallback(function(a,b){e.add("scatter-y-min",b.min),e.add("scatter-y-max",b.max),a.changeRangeOfY(b),a.redraw()}),new BigScatterChart2.DownloadPlugin(a.images.download,"PNG").addCallback(function(a){j.send(j.CONST.MAIN,j.CONST.CLK_DOWNLOAD_SCATTER)}),new BigScatterChart2.WideOpenPlugin(a.images.fullscreen).addCallback(function(){var a=v.isRealtime()?"realtime/"+v.getQueryEndDateTime():v.getPartialURL(!1,!0);f.open("#/scatterFullScreenMode/"+x.applicationName+"@"+x.serviceType+"/"+a+"/"+t().join(","),"width=900, height=700, resizable=yes")}),new BigScatterChart2.HelpPlugin(i)],{sendAnalytics:function(a,b){j.send(j.CONST.MAIN,j.CONST["Success"===a?"TG_SCATTER_SUCCESS":"TG_SCATTER_FAILED"],j.CONST[b?"ON":"OFF"])},loadFromStorage:function(a){return e.get(a)},onSelect:function(a,b){if(3===arguments.length)f.open("#/transactionList/"+v.getPartialURL(!0,!1),g+"|"+arguments[0]+"|"+arguments[1]+"|"+arguments[2]);else{var c=g+"|"+b.fromX+"|"+b.toX+"|"+b.fromY+"|"+b.toY;f.open("#/transactionList/"+v.getPartialURL(!0,!1),c)}},onError:function(){}},k.getAgentAllStr());return d(function(){angular.isUndefined(m)?s.drawWithDataSource(new BigScatterChart2.DataLoadManager(q,p,{url:a.scatterDataUrl,realtime:u(),realtimeInterval:2e3,realtimeDefaultTimeGap:3e3,realtimeResetTimeGap:2e4,fetchLimit:5e3,fetchingInterval:2e3,useIntervalForFetching:!1},function(a,c,d){v.setQueryEndDateTime(c),b.$broadcast("responseTimeChartDirective.loadRealtime",q,s.getCurrentAgent(),a.min,a.max)})):s.addBubbleAndMoveAndDraw(s.createDataBlock(m)),f.htoScatter[g]=s},100),s}function n(a,b,c){g.children().hide(),r(),angular.isDefined(w[a])?(w[a].target.show(),u()?h.getServerTime(function(b){w[a].scatter.resume(b-k.getRealtimeScatterXRange(),b),w[a].scatter.selectAgent(k.getAgentAllStr(),!0)}):(w[a].scatter.resume(),w[a].scatter.selectAgent(k.getAgentAllStr(),!0))):p(a,b,c)}function o(a,b,c,d){angular.isDefined(w[a])?w[a].scatter.addBubbleAndMoveAndDraw(w[a].scatter.createDataBlocK(d)):p(a,b,c,d).hide()}function p(b,c,d,e){var f=angular.element(a.template),h=m(f,b,c,d,e);return w[b]={target:f,scatter:h},g.append(f),f}function q(a){g.children().hide(),angular.isDefined(w[a])&&(w[a].target.show(),w[a].scatter.selectAgent(k.getAgentAllStr(),!0))}function r(){angular.forEach(w,function(a,b){a.scatter.pause()})}function s(){for(var a in w)w[a].scatter.abort();w={}}function t(a){var b,c=[];if("undefined"!=typeof a)return $.each(a.scatter.metadata,function(a,b){c.push(b[0])}),c;if(x.agentList)return x.agentList;if(x.serverList)for(b in x.serverList){var d=x.serverList[b].instanceList;for(var e in d)c.push(d[e].name)}return c}function u(){return"realtime"===v.getPeriodType()}var v=null,w={},x=null;c.$on("scatterDirective.initialize",function(a,b){v=b,s(),g.empty()}),c.$on("scatterDirective.initializeWithNode",function(a,b,d,e){c.currentAgent=k.getAgentAllStr(),x=b,n(b.key,d,e)}),c.$on("scatterDirective.initializeWithData",function(a,b,d){c.currentAgent=k.getAgentAllStr();var e=b.split("^");x={applicationName:e[0],serviceType:e[1],key:b},o(b,null,null,d)}),c.$on("scatterDirective.showByNode",function(a,b){x=b,q(b.key)}),c.$on("responseTimeChartDirective.showErrorTransacitonList",function(b,c){f.htoScatter[x.key].selectType("Failed").fireDragEvent({animate:function(){},css:function(b){return"left"===b?a.options.padding.left+"px":"top"===b?a.options.padding.top+"px":"0px"},width:function(){return a.options.width-a.options.padding.left-a.options.padding.right},height:function(){return a.options.height-a.options.padding.top-a.options.padding.bottom}})}),c.$on("changedCurrentAgent",function(a,b){w[x.key].scatter.selectAgent(b)})}}}])}(),function(){"use strict";pinpointApp.constant("nodeInfoDetailsDirectiveConfig",{maxTimeToShowLoadAsDefaultForUnknown:43200}),pinpointApp.directive("nodeInfoDetailsDirective",["nodeInfoDetailsDirectiveConfig","$filter","$timeout","isVisibleService","$window","AnalyticsService","PreferenceService","TooltipService","CommonAjaxService",function(a,b,c,d,e,f,g,h,i){return{restrict:"EA",replace:!0,templateUrl:"features/nodeInfoDetails/nodeInfoDetails.html?v="+G_BUILD_TIME,scope:{},link:function(j,k){function l(a){var b=g.getResponseTypeFormat();return $.each(a,function(a,c){$.each(c,function(a,c){b[a]+=c})}),b}function m(a){var b=[];return $.each(a,function(a,c){for(var d=0;d0&&j.errorServerCount++}/_GROUP$/.test(b.serviceType)===!1?(j.showNodeResponseSummary=!0,j.showNodeLoad=!0,B("forNode",b.applicationName,b.histogram,"100%","150px"),D("forNode",b.applicationName,b.timeSeriesHistogram,"100%","220px",!0)):/_GROUP$/.test(b.serviceType)&&(j.showNodeResponseSummaryForUnknown=!(j.oNavbarVoService.getPeriod()<=a.maxTimeToShowLoadAsDefaultForUnknown),y(b),j.htLastUnknownNode=b,c(function(){k.find('[data-toggle="tooltip"]').tooltip("destroy").tooltip()})),"$apply"!=j.$$phase&&"$digest"!=j.$$phase&&"$apply"!=j.$root.$$phase&&"$digest"!=j.$root.$$phase&&j.$digest()},y=function(a){c(function(){angular.forEach(a.unknownNodeGroup,function(a){var c=a.applicationName,e=b("applicationNameToClassName")(c);if(!angular.isDefined(p[c])&&!angular.isDefined(q[c])){var f=".nodeInfoDetails .summaryCharts_"+e,g=angular.element(f),h=d(g.get(0),1);h&&(j.showNodeResponseSummaryForUnknown?(p[c]=!0,B(null,c,a.histogram,"360px","180px")):(q[c]=!0,D(null,c,a.timeSeriesHistogram,"360px","200px",!0)))}})})},B=function(a,c,d,e,f){var g=b("applicationNameToClassName")(c);a=a||"forNode_"+g,j.$broadcast("responseTimeChartDirective.initAndRenderWithData."+a,d,e,f,!1,!0)},C=function(a,c,d,e,f){var g=b("applicationNameToClassName")(c);a=a||"forNode_"+g,j.$broadcast("responseTimeChartDirective.updateData."+a,d)},D=function(a,c,d,e,f,g){var h=b("applicationNameToClassName")(c);a=a||"forNode_"+h,j.$broadcast("loadChartDirective.initAndRenderWithData."+a,d,e,f,g)},E=function(a,c,d,e,f,g){var h=b("applicationNameToClassName")(c);a=a||"forNode_"+h,j.$broadcast("loadChartDirective.updateData."+a,d)},v=function(a){for(var b=null,c=0;c-1||b.totalCount.toString().indexOf(a)>-1:!0},j.showServerList=function(){f.send(f.CONST.MAIN,f.CONST.CLK_SHOW_SERVER_LIST),j.$emit("serverListDirective.show",!0,o,j.oNavbarVoService)},j.$on("nodeInfoDetailsDirective.initialize",function(a,b,c,d,e,f,g,h){A(),w(),r=c,u=d.key,o=d,j.htLastUnknownNode=!1,j.oNavbarVoService=f,j.nodeSearch=h||"",n=e,x(d)}),j.$on("nodeInfoDetailsDirective.hide",function(a){z()}),j.$on("nodeInfoDetailsDirective.lazyRendering",function(a,b){y(o)}),j.$on("responseTimeChartDirective.itemClicked.forNode",function(a,b){}),j.$on("responseTimeChartDirective.loadRealtime",function(a,b,c,d,e){angular.isUndefined(j.node)||j.node.applicationName!==b||F===!1&&(F=!0,i.getResponseTimeHistogramData({applicationName:j.node.applicationName,serviceTypeName:j.node.category,from:d,to:e},function(a){c===g.getAgentAllStr()?(C("forNode",j.node.applicationName,l(a.summary)),E("forNode",j.node.applicationName,m(a.timeSeries))):(C("forNode",j.node.applicationName,a.summary[c]),E("forNode",j.node.applicationName,a.timeSeries[c])),F=!1},function(){F=!1}))}),j.$on("changedCurrentAgent",function(a,b){var c=null,d=null;b===g.getAgentAllStr()?(c=j.node.histogram,d=j.node.timeSeriesHistogram):(c=j.node.agentHistogram[b],d=j.node.agentTimeSeriesHistogram[b]),B("forNode",j.node.applicationName,c,"100%","150px"),D("forNode",j.node.applicationName,d,"100%","220px",!0)}),h.init("responseSummaryChart"),h.init("loadChart")}}}])}(),function(){"use strict";pinpointApp.constant("linkInfoDetailsDirectiveConfig",{maxTimeToShowLoadAsDefaultForUnknown:43200}),pinpointApp.directive("linkInfoDetailsDirective",["linkInfoDetailsDirectiveConfig","$filter","ServerMapFilterVoService","filteredMapUtilService","$timeout","isVisibleService","ServerMapHintVoService","AnalyticsService","$window",function(a,b,c,d,e,f,g,h,i){return{restrict:"EA",replace:!0,templateUrl:"features/linkInfoDetails/linkInfoDetails.html?v="+G_BUILD_TIME,scope:!0,link:function(j,k,l){var m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D;j.linkSearch="",s=!1,t=!1,q=!1,j.htLastUnknownLink=!1,angular.element(i).bind("resize",function(a){q&&n.targetRawData&&z(n)}),k.find(".unknown-list").bind("scroll",function(a){z(n)}),v=function(){m=!1,n=!1,o={},r={},p={},j.linkCategory=null,j.unknownLinkGroup=null,j.showLinkInfoDetails=!1,j.showLinkResponseSummary=!1,j.showLinkLoad=!1,j.showLinkServers=!1,j.linkSearch="",j.linkOrderBy="totalCount",j.linkOrderByNameClass="",j.linkOrderByCountClass="glyphicon-sort-by-order-alt",j.linkOrderByDesc=!0,j.sourceApplicationName="",j.sourceHistogram=!1,j.namespace=null,j.$$phase||j.$digest()},w=function(b){if(j.link=b,b.unknownLinkGroup)j.unknownLinkGroup=b.unknownLinkGroup,j.htLastUnknownLink=b,j.showLinkResponseSummaryForUnknown=!(j.oNavbarVoService.getPeriod()<=a.maxTimeToShowLoadAsDefaultForUnknown),z(b),e(function(){k.find('[data-toggle="tooltip"]').tooltip("destroy").tooltip()});else{j.showLinkResponseSummary=!0,j.showLinkLoad=!0,y("forLink",b.targetInfo.applicationName,b.histogram,"100%","150px"),x("forLink",b.targetInfo.applicationName,b.timeSeriesHistogram,"100%","220px",!0),j.showLinkServers=!_.isEmpty(b.sourceHistogram),j.sourceApplicationName=b.sourceInfo.applicationName,j.sourceHistogram=b.sourceHistogram,j.fromNode=b.fromNode,j.serverCount=0,j.errorServerCount=0;for(var c in j.sourceHistogram)j.serverCount++,j.sourceHistogram[c].Error>0&&j.errorServerCount++}j.showLinkInfoDetails=!0,j.$$phase||j.$digest()},z=function(a){e(function(){angular.forEach(a.unknownLinkGroup,function(a,c){var d=a.targetInfo.applicationName,e=b("applicationNameToClassName")(d);if(!angular.isDefined(o[d])&&!angular.isDefined(p[d])){var g=".linkInfoDetails .summaryCharts_"+e,h=angular.element(g),i=f(h.get(0),1);i&&(j.showLinkResponseSummaryForUnknown?(o[d]=!0,C(null,a,"360px","180px")):(p[d]=!0,x(null,d,a.timeSeriesHistogram,"360px","200px",!0)))}})})},y=function(a,e,f,h,i){var k=b("applicationNameToClassName")(e);a=a||"forLink_"+k,"forLink"===a&&s?j.$broadcast("responseTimeChartDirective.updateData."+a,f):("forLink"===a&&(s=!0),j.$broadcast("responseTimeChartDirective.initAndRenderWithData."+a,f,h,i,!0,!0),j.$on("responseTimeChartDirective.itemClicked."+a,function(a,b){var e=b.responseTime,f=b.count,h=new c;h.setMainApplication(n.filterApplicationName).setMainServiceTypeCode(n.filterApplicationServiceTypeCode),"USER"===n.sourceInfo.serviceType?h.setFromApplication("USER").setFromServiceType("USER"):h.setFromApplication(n.sourceInfo.applicationName).setFromServiceType(n.sourceInfo.serviceType),h.setToApplication(n.targetInfo.applicationName).setToServiceType(n.targetInfo.serviceType),"error"===e.toLowerCase()?h.setIncludeException(!0):"slow"===e.toLowerCase()?h.setResponseFrom(1e3*d.getStartValueForFilterByLabel(e,f)).setIncludeException(!1).setResponseTo("max"):h.setResponseFrom(1e3*d.getStartValueForFilterByLabel(e,f)).setIncludeException(!1).setResponseTo(1e3*parseInt(e,10));var i=new g;n.sourceInfo.isWas&&n.targetInfo.isWas&&i.setHint(n.targetInfo.applicationName,n.filterTargetRpcList),j.$emit("linkInfoDetailsDirective.ResponseSummary.barClicked",h,i)}))},C=function(a,e,f,h){var i=b("applicationNameToClassName")(e.targetInfo.applicationName);a=a||"forLink_"+i,"forLink"===a&&s?j.$broadcast("responseTimeChartDirective.updateData."+a,e.histogram):("forLink"===a&&(s=!0),j.$broadcast("responseTimeChartDirective.initAndRenderWithData."+a,e.histogram,f,h,!0,!0),j.$on("responseTimeChartDirective.itemClicked."+a,function(a,b){var f=b.responseTime,h=b.count,i=new c;i.setMainApplication(e.filterApplicationName).setMainServiceTypeCode(e.filterApplicationServiceTypeCode),"USER"===e.sourceInfo.serviceType?i.setFromApplication("USER").setFromServiceType("USER"):i.setFromApplication(e.sourceInfo.applicationName).setFromServiceType(e.sourceInfo.serviceType),i.setToApplication(e.targetInfo.applicationName).setToServiceType(e.targetInfo.serviceType),"error"===f.toLowerCase()?i.setIncludeException(!0):"slow"===f.toLowerCase()?i.setResponseFrom(1e3*d.getStartValueForFilterByLabel(f,h)).setIncludeException(!1).setResponseTo("max"):i.setResponseFrom(1e3*d.getStartValueForFilterByLabel(f,h)).setIncludeException(!1).setResponseTo(1e3*parseInt(f,10));var k=new g;e.sourceInfo.isWas&&e.targetInfo.isWas&&k.setHint(e.targetInfo.applicationName,e.filterTargetRpcList),j.$emit("linkInfoDetailsDirective.ResponseSummary.barClicked",i,k)}))},x=function(a,c,d,e,f,g){var h=b("applicationNameToClassName")(c);a=a||"forLink_"+h,"forLink"===a&&t?j.$broadcast("loadChartDirective.updateData."+a,d):("forLink"===a&&(t=!0),j.$broadcast("loadChartDirective.initAndRenderWithData."+a,d,e,f,g))},D=function(a){for(var b=null,c=0;c-1||b.totalCount.toString().indexOf(a)>-1:!0},j.passingTransactionMapFromLinkInfoDetails=function(a){var b=D(a),d=new c;d.setMainApplication(b.filterApplicationName).setMainServiceTypeCode(b.filterApplicationServiceTypeCode).setFromApplication(b.sourceInfo.applicationName).setFromServiceType(b.sourceInfo.serviceType).setToApplication(b.targetInfo.applicationName).setToServiceType(b.targetInfo.serviceType);var e=new g;b.sourceInfo.isWas&&b.targetInfo.isWas&&e.setHint(b.toNode.applicationName,b.filterTargetRpcList),j.$emit("linkInfoDetailsDirective.openFilteredMap",d,e)},j.openFilterWizard=function(a){var b=D(a);j.$emit("linkInfoDetailsDirective.openFilterWizard",b)},j.renderLinkAgentCharts=function(a){angular.isDefined(r[a])||(r[a]=!0,y(null,a,n.sourceHistogram[a],"100%","150px"),x(null,a,n.sourceTimeSeriesHistogram[a],"100%","200px",!0))},j.linkSearchChange=function(){z(n)},j.$on("linkInfoDetailsDirective.hide",function(a){A()}),j.$on("linkInfoDetailsDirective.initialize",function(a,b,c,d,e,f,g){B(),v(),m=c,u=d.key,n=d,j.htLastUnknownLink=!1,j.oNavbarVoService=f,w(d)}),j.$on("linkInfoDetailsDirective.lazyRendering",function(a,b){z(n)})}}}])}(),function(){"use strict";pinpointApp.constant("agentListConfig",{}),pinpointApp.directive("agentListDirective",["agentListConfig","$rootScope","AgentAjaxService","TooltipService","AnalyticsService",function(a,b,c,d,e){return{restrict:"EA",replace:!0,templateUrl:"features/agentList/agentList.html?v="+G_BUILD_TIME,link:function(a,b,f){d.init("agentList");var g={sign:{100:"ok-sign",200:"minus-sign",201:"minus-sign",300:"remove-sign","-1":"question-sign"},color:{100:"#40E340",200:"#F00",201:"#F00",300:"#AAA","-1":"#AAA"}},h=function(b,d,e,f,g){c.getAgentList({application:b,from:e,to:f},function(b){b.errorCode||b.status||(a.agentGroup=b,a.select(i(g)))})},i=function(b){for(var c in a.agentGroup)for(var d in a.agentGroup[c])if(a.agentGroup[c][d].agentId===b)return a.agentGroup[c][d];return!1};a.select=function(b){e.send(e.CONST.INSPECTOR,e.CONST.CLK_CHANGE_AGENT_INSPECTOR),a.currentAgent=b,a.$emit("agentListDirective.agentChanged",b)},a.getState=function(a){return g.sign[a+""]},a.getStateColor=function(a){return g.color[a+""]},a.$on("agentListDirective.initialize",function(a,b){h(b.getApplicationName(),b.getServiceTypeName(),b.getQueryStartTime(),b.getQueryEndTime(),b.getAgentId())})}}}])}(),function(a){"use strict";pinpointApp.constant("agentInfoConfig",{agentStatUrl:"/getAgentStat.pinpoint"}),pinpointApp.directive("agentInfoDirective",["agentInfoConfig","$timeout","AlertsService","ProgressBarService","AgentDaoService","AgentAjaxService","TooltipService","AnalyticsService","helpContentService",function(b,c,d,e,f,g,h,i,j){return{restrict:"EA",replace:!0,templateUrl:"features/agentInfo/agentInfo.html?v"+G_BUILD_TIME,link:function(b,k,l){b.agentInfoTemplate="features/agentInfo/agentInfoReady.html?v="+G_BUILD_TIME,b.showEventInfo=!1,b.showDetail=!1,b.selectTime=-1;var m,n=null,o=!1,p=new d,q=new e,r=null,s=function(c){null===r&&(r=a("#target-picker"),r.datetimepicker({dateFormat:"yy-mm-dd",timeFormat:"HH:mm:ss",controlType:"select",showButtonPanel:!0,onSelect:function(){},onClose:function(a){var c=moment(a,"YYYY-MM-DD HH:mm:ss").valueOf();b.selectTime!==c&&n.setSelectTime(c)}}),a("#ui-datepicker-div").addClass("inspector-datepicker")),t(c)},t=function(a){r.datetimepicker("setDate",new Date(a))},u=function(c,d){null!==n?n.emptyData():n=new TimeSlider("timeSlider",{width:a("#timeSlider").get(0).getBoundingClientRect().width,height:90,handleSrc:"images/handle.png",timeSeries:d?d:A(c),handleTimeSeries:c,selectTime:c[1],eventData:[]}).addEvent("clickEvent",function(a){z(a[2])}).addEvent("selectTime",function(a){b.selectTime=a,y(a),w(),t(a)}).addEvent("changeSelectionZone",function(a){x(b.agent.agentId,a,v(a[0],a[1]),function(){})}).addEvent("changeSliderTimeSeries",function(a){})},v=function(a,b){return(b-a)/1e3/60},w=function(){n.setDefaultStateLineColor(TimeSlider.EventColor[100==b.agent.status.state.code?"10100":"10200"])},x=function(a,d,e,h){q.startLoading(),q.setLoading(40),g.getAgentStateForChart({agentId:a,from:d[0],to:d[1],sampleRate:f.getSampleRate(e)},function(a){return a.errorCode||a.status?(q.stopLoading(),void p.showError("There is some error.")):(b.agentStat=a,angular.isDefined(a.type)&&a.type&&(b.agent.jvmGcType=a.type),q.setLoading(80),D(a),c(function(){q.setLoading(100),q.stopLoading()},700),void h())})},y=function(a){q.startLoading(),q.setLoading(40),g.getAgentInfo({agentId:b.agent.agentId,timestamp:a},function(a){var c=b.agent.jvmGcType;q.setLoading(80),b.agent=a,b.agent.jvmGcType=c,b.currentServiceInfo=C(a),q.setLoading(100),q.stopLoading()})},z=function(a){g.getEvent({agentId:b.agent.agentId,eventTimestamp:a.eventTimestamp,eventTypeCode:a.eventTypeCode},function(a){a.errorCode||a.status?p.showError("There is some error."):(b.eventInfo=a,b.showEventInfo=!0)})},A=function(a){var b=a[0],c=a[1],d=1728e5,e=c-b;return e>d?[c-d,c]:[c-3*e,c]},B=function(){o===!1&&(h.init("heap"),h.init("permGen"),h.init("cpuUsage"),h.init("tps"),o=!0)},C=function(a){if(a.serverMetaData&&a.serverMetaData.serviceInfos)for(var b=a.serverMetaData.serviceInfos,c=0;c0)return b[c]},D=function(a){var c={id:"heap",title:"Heap Usage",span:"span12",line:[{id:"JVM_MEMORY_HEAP_USED",key:"Used",values:[],isFgc:!1},{id:"JVM_MEMORY_HEAP_MAX",key:"Max",values:[],isFgc:!1},{id:"fgc",key:"FGC",values:[],bar:!0,isFgc:!0}]},d={id:"nonheap",title:"PermGen Usage",span:"span12",line:[{id:"JVM_MEMORY_NON_HEAP_USED",key:"Used",values:[],isFgc:!1},{id:"JVM_MEMORY_NON_HEAP_MAX",key:"Max",values:[],isFgc:!1},{id:"fgc",key:"FGC",values:[],bar:!0,isFgc:!0}]},e={id:"cpuLoad",title:"JVM/System Cpu Usage",span:"span12",isAvailable:!1},g={id:"tps",title:"Transactions Per Second",span:"span12",isAvailable:!1};b.memoryGroup=[c,d],b.cpuLoadChart=e,b.tpsChart=g,b.$broadcast("jvmMemoryChartDirective.initAndRenderWithData.forHeap",f.parseMemoryChartDataForAmcharts(c,a),"100%","270px"),b.$broadcast("jvmMemoryChartDirective.initAndRenderWithData.forNonHeap",f.parseMemoryChartDataForAmcharts(d,a),"100%","270px"),b.$broadcast("cpuLoadChartDirective.initAndRenderWithData.forCpuLoad",f.parseCpuLoadChartDataForAmcharts(e,a),"100%","270px"),b.$broadcast("tpsChartDirective.initAndRenderWithData.forTps",f.parseTpsChartDataForAmcharts(g,a),"100%","270px")},E=function(a,b){g.getEventList({agentId:a,from:b[0],to:b[1]},function(a){a.errorCode||a.status?p.showError("There is some error."):n.addEventData(a)})},F=function(a,c){b.cpuLoadChart.isAvailable&&b.$broadcast("cpuLoadChartDirective.showCursorAt.forCpuLoad",c.index)},G=function(a,c){b.tpsChart.isAvailable&&b.$broadcast("tpsChartDirective.showCursorAt.forTps",c.index)};b.toggleHelp=function(){a("._wrongApp").popover({title:""+m.getApplicationName()+" "+b.agent.applicationName+"",content:j.inspector.wrongApp.replace(/\{\{application1\}\}/g,m.getApplicationName()).replace(/\{\{application2\}\}/g,b.agent.applicationName).replace(/\{\{agentId\}\}/g,b.agent.agentId),html:!0}).popover("toggle")},b.isSameApplication=function(){return b.agent.applicationName===m.getApplicationName()},b.formatDate=function(a){return moment(a).format("YYYY.MM.DD HH:mm:ss")},b.hideEventInfo=function(){b.showEventInfo=!1},b.zoomInTimeSlider=function(){n.zoomIn()},b.zoomOutTimeSlider=function(){n.zoomOut();var a=n.getSliderTimeSeries();E(b.agent.agentId,a)},b.toggleShowDetail=function(){i.send(i.CONST.INSPECTOR,i.CONST.CLK_SHOW_SERVER_TYPE_DETAIL),b.showDetail=!b.showDetail},b.hasDuplicate=function(a,c){for(var d=b.currentServiceInfo.serviceLibs.length,e=!1,f=0;d>f;f++)if(b.currentServiceInfo.serviceLibs[f]==a&&f!=c){e=!0;break}return e?"color:red":""},b.selectServiceInfo=function(a){a.serviceLibs.length>0&&(b.currentServiceInfo=a)},b.$on("agentInfoDirective.initialize",function(a,d,e){m=d,b.agentInfoTemplate="features/agentInfo/agentInfoMain.html?v="+G_BUILD_TIME,b.agent=e,b.chartGroup=null,b.currentServiceInfo=C(e);var f,g,h=[];null===n?(h[0]=m.getQueryStartTime(),h[1]=m.getQueryEndTime(),g=m.getPeriod()):(h=n.getSelectionTimeSeries(),f=n.getSliderTimeSeries(),g=v(h[0],h[1])),-1===b.selectTime?b.selectTime=m.getQueryEndTime():b.selectTime!==m.getQueryEndTime()&&y(b.selectTime),c(function(){x(e.agentId,h,g,function(){s(b.selectTime),B(),u(h,f),w(),E(e.agentId,f||A(h))}),b.$apply()})}),b.$on("jvmMemoryChartDirective.cursorChanged.forHeap",function(a,c){b.$broadcast("jvmMemoryChart.showCursorAt.forNonHeap",c.index),F(a,c),G(a,c)}),b.$on("jvmMemoryChartDirective.cursorChanged.forNonHeap",function(a,c){b.$broadcast("jvmMemoryChartDirective.showCursorAt.forHeap",c.index),F(a,c),G(a,c)}),b.$on("cpuLoadChartDirective.cursorChanged.forCpuLoad",function(a,c){b.$broadcast("jvmMemoryChartDirective.showCursorAt.forHeap",c.index),b.$broadcast("jvmMemoryChartDirective.showCursorAt.forNonHeap",c.index),G(a,c)}),b.$on("tpsChartDirective.cursorChanged.forTps",function(a,c){b.$broadcast("jvmMemoryChartDirective.showCursorAt.forHeap",c.index),b.$broadcast("jvmMemoryChartDirective.showCursorAt.forNonHeap",c.index),F(a,c)})}}}])}(jQuery),function(){"use strict";pinpointApp.constant("timeSliderDirectiveConfig",{scaleCount:10}),pinpointApp.directive("timeSliderDirective",["timeSliderDirectiveConfig","$timeout","AnalyticsService",function(a,b,c){return{restrict:"EA",replace:!0,templateUrl:"features/timeSlider/timeSlider.html?v="+G_BUILD_TIME,link:function(d,e,f){var g,h,i,j,k,l,m;g=e.find(".timeslider_input"),d.oTimeSliderVoService=null,d.disableMore=!1,d.done=!1,h=function(a){d.oTimeSliderVoService=a,d.oTimeSliderVoService.getReady()!==!1&&(b(function(){g.jslider({from:d.oTimeSliderVoService.getFrom(),to:d.oTimeSliderVoService.getTo(),scale:j(i()),skin:"round_plastic",calculate:function(a){return k(a)},beforeMouseDown:function(a,b){return!1},beforeMouseMove:function(a,b){return!1}}),e.find(".jslider-pointer-from").addClass("jslider-transition"),e.find(".jslider-bg .v").addClass("jslider-transition")},100),m())},m=function(){d.oTimeSliderVoService.getCount()&&d.oTimeSliderVoService.getTotal()&&d.oTimeSliderVoService.getCount()>=d.oTimeSliderVoService.getTotal()&&(d.disableMore=!0)},i=function(){var b=d.oTimeSliderVoService.getFrom(),c=d.oTimeSliderVoService.getTo(),e=c-b,f=e/(a.scaleCount-1),g=[];return _.times(a.scaleCount,function(a){g.push(b+f*a)}),g},j=function(a){var b=[];return _.each(a,function(a){b.push(k(a))}),b},k=function(a){return moment(a).format("HH:mm")},l=function(a,b){g.jslider("value",a,b)},d.more=function(){c.send(c.CONST.CALLSTACK,c.CONST.CLK_MORE),d.$emit("timeSliderDirective.moreClicked",d.oTimeSliderVoService)},d.$on("timeSliderDirective.initialize",function(a,b){h(b),m()}),d.$on("timeSliderDirective.setInnerFromTo",function(a,b){d.oTimeSliderVoService=b,l(b.getInnerFrom(),b.getInnerTo()),m()}),d.$on("timeSliderDirective.enableMore",function(a){d.disableMore=!1}),d.$on("timeSliderDirective.disableMore",function(a){d.disableMore=!0}),d.$on("timeSliderDirective.changeMoreToDone",function(a){d.done=!0}),d.$on("timeSliderDirective.changeDoneToMore",function(a){d.done=!1})}}}])}(),function(){"use strict";pinpointApp.directive("transactionTableDirective",["$window","helpContentTemplate","helpContentService","AnalyticsService",function(a,b,c,d){return{restrict:"EA",replace:!0,templateUrl:"features/transactionTable/transactionTable.html?v="+G_BUILD_TIME,link:function(e,f,g){var h,i,j;e.transactionList=[],e.currentTransaction=null,e.transactionReverse=!1,h=function(){e.transactionList=[]},i=function(a){e.transactionList.length>0?(e.transactionOrderBy="",e.transactionReverse=!1,f.find("table tbody tr:last-child")[0].scrollIntoView(!0)):(e.transactionOrderBy="elapsed",e.transactionReverse=!0),e.transactionList=e.transactionList.concat(a),j(),f.find('[data-toggle="tooltip"]').tooltip("destroy").tooltip()},j=function(){var a=1;angular.forEach(e.transactionList,function(b,c){b.index=a++})},e.traceByApplication=function(a){d.send(d.CONST.CALLSTACK,d.CONST.CLK_TRANSACTION),e.currentTransaction=a,e.$emit("transactionTableDirective.applicationSelected",a)},e.openTransactionView=function(b){a.open("#/transactionView/"+b.agentId+"/"+b.traceId+"/"+b.collectorAcceptTime)},e.transactionOrder=function(a){e.transactionOrderBy===a?e.transactionReverse=!e.transactionReverse:e.transactionReverse=!1,d.send(d.CONST.CALLSTACK,d.CONST.ST_+a.charAt(0).toUpperCase()+a.substring(1),e.transactionReverse?d.CONST.DESCENDING:d.CONST.ASCENDING), e.transactionOrderBy=a},e.$on("transactionTableDirective.appendTransactionList",function(a,b){i(b)}),e.$on("transactionTableDirective.clear",function(a){h()}),e.initTooltipster=function(){jQuery(".neloTooltip").tooltipster({content:function(){return b(c.transactionTable.log)},position:"bottom",trigger:"click",interactive:!0})}}}}])}(),function(a){"use strict";pinpointApp.directive("timelineDirective",["AnalyticsService",function(b){return{restrict:"EA",replace:!0,templateUrl:"features/timeline/timeline.html?v="+G_BUILD_TIME,link:function(c,d,e){var f,g,h,i,j,k=["#66CCFF","#FFCCFF","#66CC00","#FFCC33","#669999","#FF9999","#6666FF","#FF6633","#66FFCC","#006666","#FFFF00","#66CCCC","#FFCCCC","#6699FF","#FF99FF","#669900","#FF9933","#66FFFF","#996600","#66FF00"],l=[],m=new InfiniteCircularScroll({scroller:a(d),wrapper:a(d).find("div"),elementHeight:21,template:['
    ','
    ','
    ',"",'','','',"","
    ","
    ","
    "].join("")});m.renderFunc(function(a,b,d){var e=o(d);a[b==this._selectedRow?"addClass":"removeClass"]("timeline-bar-selected").find("div.clickable-bar").css({width:p(d)+"px",backgroundColor:n(d[c.key.applicationName]),marginLeft:e+"px"}).find("span.nameType").html(d[c.key.applicationName]+"/"+d[c.key.apiType]+"("+(d[c.key.end]-d[c.key.begin])+"ms)"),e>=68?a.find("span.before").show().end().find("span.after").hide().end().find("span.before .startTime").html(q(d)):a.find("span.before").hide().end().find("span.after").show().end().find("span.after .startTime").html(q(d))}),g=function(){var a=[];return angular.forEach(c.timeline.callStack,function(b){b[c.key.isMethod]&&!b[c.key.excludeFromTimeline]&&""!==b[c.key.service]&&a.push(b)}),a},f=function(b){c.timeline=b,c.key=b.callStackIndex,c.barRatio=1e3/(b.callStack[0][c.key.end]-b.callStack[0][c.key.begin]),c.newCallStacks=g(),m.source(c.newCallStacks).viewAreaHeight(a(d).parentsUntil("div.wrapper").height()-70).selectedRow(-1,angular.noop).reset(),c.maxHeight=m.contentsAreaHeight(),i=0,c.$digest()};var n=function(a){var b=l.indexOf(a);return-1==b&&(l.push(a),b=l.length-1),k[b>=k.length?0:b]},o=function(a){return(a[c.key.begin]-c.timeline.callStackStart)*c.barRatio+.9},p=function(a){return(a[c.key.end]-a[c.key.begin])*c.barRatio+.9},q=function(a){return a[c.key.begin]-c.timeline.callStackStart};a(d).on("click",".clickable-bar",function(){b.send(b.CONST.CALLSTACK,b.CONST.CLK_CALL),c.$emit("transactionDetail.selectDistributedCallFlowRow",c.newCallStacks[parseInt(a(this).parent().attr("data-index"))][6])}),a(d).on("mouseenter",".timeline-bar-frame",function(b){a(this).parent().css({"box-shadow":"6px 6px 2px -2px rgba(0,0,0,0.75)","font-weight":"bold"})}),a(d).on("mouseleave",".timeline-bar-frame",function(b){a(this).parent().css({"box-shadow":"none","font-weight":"normal"})}),c.$on("timelineDirective.initialize",function(a,b){f(b)}),c.$on("timelineDirective.resize",function(b){m.resize(a(d).parentsUntil("div.wrapper").height()-70)}),c.$on("timelineDirective.searchCall",function(a,b,d){var e=h(i,-1,b);-1==e?0===i?c.$emit("transactionDetail.timelineSearchCallResult","No call took longer than {time}ms."):(e=h(0,i,b),-1==e?c.$emit("transactionDetail.timelineSearchCallResult","No call took longer than {time}ms."):j(e,"Loop")):j(e,"")}),h=function(a,b,d){return m.searchRow(a,b,function(a){return a[c.key.end]-a[c.key.begin]>=d})},j=function(a,b){m.selectedRow(a,function(a){this.$wrapper.find("div[data-index="+this._selectedRow+"]").removeClass("timeline-bar-selected"),this.$wrapper.find("div[data-index="+a+"]").addClass("timeline-bar-selected")}).moveByRow(a),i=a+1,c.$emit("transactionDetail.timelineSearchCallResult",b)}}}}])}(jQuery),function(){"use strict";pinpointApp.constant("agentChartGroupConfig",{POINTS_TIMESTAMP:0,POINTS_MIN:1,POINTS_MAX:2,POINTS_AVG:3}),pinpointApp.directive("agentChartGroupDirective",["agentChartGroupConfig","$timeout","AgentDaoService","AnalyticsService",function(a,b,c,d){return{restrict:"EA",replace:!0,templateUrl:"features/agentChartGroup/agentChartGroup.html?v="+G_BUILD_TIME,scope:{namespace:"@"},link:function(a,b,e){var f,g,h,i,j,k,l,m;a.showChartGroup=!1,h=function(e){f={Heap:!1,PermGen:!1,CpuLoad:!1},g=null,a.showChartGroup=!0,a.$digest(),c.getAgentStat(e,function(a,b){return a?void console.log("error",a):(f.Heap===!1&&i(b),void(g=b))}),b.tabs({activate:function(b,c){var e=c.newTab.text();return"Heap"==e?(d.send(d.CONST.MIXEDVIEW,d.CONST.CLK_HEAP),void(f.Heap===!1?i(g):a.$broadcast("jvmMemoryChartDirective.resize.forHeap_"+a.namespace))):"PermGen"==e?(d.send(d.CONST.MIXEDVIEW,d.CONST.CLK_PERM_GEN),void(f.PermGen===!1?j(g):a.$broadcast("jvmMemoryChartDirective.resize.forNonHeap_"+a.namespace))):"CpuLoad"==e?(d.send(d.CONST.MIXEDVIEW,d.CONST.CLK_CPU_LOAD),void(f.CpuLoad===!1?k(g):a.$broadcast("cpuLoadChartDirective.resize.forCpuLoad_"+a.namespace))):void 0}}),b.tabs("paging")},i=function(b){f.Heap=!0;var d={id:"heap",title:"Heap",span:"span12",line:[{id:"JVM_MEMORY_HEAP_USED",key:"Used",values:[],isFgc:!1},{id:"JVM_MEMORY_HEAP_MAX",key:"Max",values:[],isFgc:!1},{id:"fgc",key:"FGC",values:[],isFgc:!0}]};a.$broadcast("jvmMemoryChartDirective.initAndRenderWithData.forHeap_"+a.namespace,c.parseMemoryChartDataForAmcharts(d,b),"100%","100%")},j=function(b){f.PermGen=!0;var d={id:"nonheap",title:"PermGen",span:"span12",line:[{id:"JVM_MEMORY_NON_HEAP_USED",key:"Used",values:[],isFgc:!1},{id:"JVM_MEMORY_NON_HEAP_MAX",key:"Max",values:[],isFgc:!1},{id:"fgc",key:"FGC",values:[],isFgc:!0}]};a.$broadcast("jvmMemoryChartDirective.initAndRenderWithData.forNonHeap_"+a.namespace,c.parseMemoryChartDataForAmcharts(d,b),"100%","100%")},k=function(b){f.CpuLoad=!0;var d={id:"cpuLoad",title:"JVM/System Cpu Usage",span:"span12",isAvailable:!1};a.$broadcast("cpuLoadChartDirective.initAndRenderWithData.forCpuLoad_"+a.namespace,c.parseCpuLoadChartDataForAmcharts(d,b),"100%","100%")},l=function(b){f.Heap&&a.$broadcast("jvmMemoryChartDirective.showCursorAt.forHeap_"+a.namespace,b),f.PermGen&&a.$broadcast("jvmMemoryChartDirective.showCursorAt.forNonHeap_"+a.namespace,b),f.CpuLoad&&a.$broadcast("cpuLoadChartDirective.showCursorAt.forCpuLoad_"+a.namespace,b)},m=function(){f.Heap&&a.$broadcast("jvmMemoryChartDirective.resize.forHeap_"+a.namespace),f.PermGen&&a.$broadcast("jvmMemoryChartDirective.resize.forNonHeap_"+a.namespace),f.CpuLoad&&a.$broadcast("cpuLoadChartDirective.resize.forCpuLoad_"+a.namespace)},a.$on("agentChartGroupDirective.initialize."+a.namespace,function(a,b){h(b)}),a.$on("agentChartGroupDirective.showCursorAt."+a.namespace,function(a,b){l(b)}),a.$on("agentChartGroupDirective.resize."+a.namespace,function(a){m()})}}}])}(),function(){"use strict";pinpointApp.directive("sidebarTitleDirective",["$timeout","$rootScope","PreferenceService","AnalyticsService",function(a,b,c,d){return{restrict:"E",replace:!0,templateUrl:"features/sidebar/title/sidebarTitle.html?v="+G_BUILD_TIME,scope:{namespace:"@"},link:function(e,f,g){function h(a){if(e.currentAgent=c.getAgentAllStr(),"undefined"==typeof a)return void(e.agentList=[]);var b=[];if(a.serverList)for(var d in a.serverList){var f=a.serverList[d].instanceList;for(var g in f)b.push(g)}e.agentList=b}function i(b,c){e.isWas=angular.isDefined(c)&&angular.isDefined(c.isWas)?c.isWas:!1,e.stImage=b.getImage(),e.stImageShow=!!b.getImage(),e.stTitle=b.getTitle(),e.stImage2=b.getImage2(),e.stImage2Show=!!b.getImage2(),e.stTitle2=b.getTitle2(),a(function(){f.find('[data-toggle="tooltip"]').tooltip("destroy").tooltip()})}function j(){e.currentAgent=c.getAgentAllStr(),e.stImage=!1,e.stImageShow=!1,e.stTitle=!1,e.stImage2=!1,e.stTitle2=!1,e.stImage2Show=!1,e.isWas=!1,e.agentList=[]}e.agentList=[],a(function(){j()}),e.changeAgent=function(){d.send(d.CONST.INSPECTOR,d.CONST.CLK_CHANGE_AGENT_MAIN),b.$broadcast("changedCurrentAgent",e.currentAgent)},e.$on("sidebarTitleDirective.initialize."+e.namespace,function(a,b,c){i(b,c),h(c)}),e.$on("sidebarTitleDirective.empty."+e.namespace,function(a){j()})}}}])}(),function(){"use strict";pinpointApp.directive("filterInformationDirective",["$filter","$base64",function(a,b){return{restrict:"EA",replace:!0,templateUrl:"features/sidebar/filter/filterInformation.html?v="+G_BUILD_TIME,scope:{namespace:"@"},link:function(c,d,e){var f,g;f=function(d){if(g(),oServerMapFilterVo.getRequestUrlPattern()&&(c.urlPattern=b.decode(d.getRequestUrlPattern())),c.includeException=v.getIncludeException()?"Failed Only":"Success + Failed",angular.isNumber(d.getResponseFrom())&&oServerMapFilterVo.getResponseTo()){var e=[];e.push(a("number")(d.getResponseFrom())),e.push("ms"),e.push("~"),"max"===d.getResponseTo()?e.push("30,000+"):e.push(a("number")(d.getResponseTo())),e.push("ms"),c.responseTime=e.join(" ")}var f=d.getFromAgentName(),h=d.getToAgentName();f||h?c.agentFilterInfo=(f||"all")+" -> "+(h||"all"):c.agentFilterInfo=!1},g=function(){c.urlPattern="none",c.responseTime="none",c.includeException="none"},c.$on("filterInformationDirective.initialize."+c.namespace,function(a,b){f(b)})}}}])}(),function(){"use strict";pinpointApp.directive("distributedCallFlowDirective",["$filter","$timeout","CommonAjaxService",function(a,b,c){return{restrict:"E",replace:!0,templateUrl:"features/distributedCallFlow/distributedCallFlow.html?v=${buildTime}",scope:{namespace:"@"},link:function(d,e,f){var g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;window.callStacks=[],o=function(a){var b=0,c=0,d="#";for(b=0,c=0;bb;d+=("00"+(c>>8*b++&255).toString(16)).slice(-2));return d},k=function(a,b,c,d,e){var f=[];c=c.replace(/&/g,"&").replace(//g,">");var g=h.getItemById(e.id);i=g.agent?g.agent:i;var j=o(i),k=h.getIdxById(e.id),l="dcf-popover";if(g.hasException?l+=" has-exception":g.isMethod||(l+=" not-method"),f.push('
    '),f.push("
    "),f.push(""),window.callStacks[k+1]&&window.callStacks[k+1].indent>window.callStacks[k].indent?e._collapsed?f.push("  "):f.push("  "):f.push("  "),g.hasException)f.push(' ');else if(g.isMethod){var m=parseInt(g.methodType);switch(m){case 100:f.push(' ');break;case 200:f.push(' ');break;case 900:f.push(' ')}}else"SQL"===g.method?f.push(' '):f.push(' ');return f.push(c),f.push("
    "),f.join("")},l=function(a){var b=!0;if(angular.isDefined(a.parent)&&null!==a.parent)for(var c=window.callStacks[a.parent];c;)c._collapsed&&(b=!1),c=window.callStacks[c.parent];return b},q=function(a,b,c,d,e){var f=[];return f.push('
    '),f.push(c),f.push("
    "),f.join("")},r=function(a,b,c,d,e){if(c&&0!==c.length){var f=[];f.push('');var g=h.getItemById(e.id),i=g.logButtonName;return f.push(i),f.push(""),f.join("")}},n=function(b,c,d,e,f){return a("date")(d,"HH:mm:ss sss")},p=function(a,b,c,d,e){if(angular.isUndefined(c)||null===c||""===c||0===c)return"";var f;return f="#5bc0de",""},m=function(a,b){var c=[],d=100/(b[0][a.end]-b[0][a.begin]);return angular.forEach(b,function(b,e){c.push({id:"id_"+e,parent:b[a.parentId]?b[a.parentId]-1:null,indent:b[a.tab],method:b[a.title],argument:b[a.arguments],execTime:b[a.begin]>0?b[a.begin]:null,gapMs:b[a.gap],timeMs:b[a.elapsedTime],timePer:b[a.elapsedTime]?(b[a.end]-b[a.begin])*d+.9:null,"class":b[a.simpleClassName],methodType:b[a.methodType],apiType:b[a.apiType],agent:b[a.agent],applicationName:b[a.applicationName],hasException:b[a.hasException],isMethod:b[a.isMethod],logLink:b[a.logPageUrl],logButtonName:b[a.logButtonName],isFocused:b[a.isFocused],execMilli:b[a.executionMilliseconds],execPer:b[a.elapsedTime]&&b[a.executionMilliseconds]?parseInt(b[a.executionMilliseconds].replace(/,/gi,""))/parseInt(b[a.elapsedTime].replace(/,/gi,""))*100:0})}),c},j=function(a){window.callStacks=m(a.callStackIndex,a.callStack);var f={enableCellNavigation:!0,enableColumnReorder:!0,enableTextSelectionOnCells:!0,topPanelHeight:30,rowHeight:25};h=new Slick.Data.DataView({inlineFilters:!0}),h.beginUpdate(),h.setItems(window.callStacks),h.setFilter(l),h.getItemMetadata=function(a){var b=h.getItemByIdx(a),c={cssClasses:""};return b.hasException===!0&&(c.cssClasses+=" error-point"),b.isFocused===!0&&(c.cssClasses+=" entry-point"),null!==b.execTime&&(c.cssClasses+=" id_"+(a+1)),c},h.endUpdate();var i=[{id:"method",name:"Method",field:"method",width:400,formatter:k},{id:"argument",name:"Argument",field:"argument",width:300,formatter:q},{id:"exec-time",name:"Start Time",field:"execTime",width:90,formatter:n},{id:"gap-ms",name:"Gap(ms)",field:"gapMs",width:70,cssClass:"right-align"},{id:"time-ms",name:"Exec(ms)",field:"timeMs",width:70,cssClass:"right-align"},{id:"time-per",name:"Exec(%)",field:"timePer",width:100,formatter:p},{id:"exec-milli",name:"Self(ms)",field:"execMilli",width:75,cssClass:"right-align"},{id:"class",name:"Class",field:"class",width:120},{id:"api-type",name:"API",field:"apiType",width:90},{id:"agent",name:"Agent",field:"agent",width:130},{id:"application-name",name:"Application",field:"applicationName",width:150}];g=new Slick.Grid(e.get(0),h,i,f),g.setSelectionModel(new Slick.RowSelectionModel);var j=!0,o=!1;g.onClick.subscribe(function(a,d){var f;if($(a.target).hasClass("toggle")&&(f=h.getItem(d.row),f&&(f._collapsed?f._collapsed=!1:f._collapsed=!0,h.updateItem(f.id,f)),a.stopImmediatePropagation()),$(a.target).hasClass("sql")){f=h.getItem(d.row);var g=h.getItem(d.row+1),i="sql="+encodeURIComponent(f.argument);angular.isDefined(g)&&"SQL-BindValue"===g.method?(i+="&bind="+encodeURIComponent(g.argument),c.getSQLBind("/sqlBind.pinpoint",i,function(a){$("#customLogPopup").find("h4").html("SQL").end().find("div.modal-body").html('

    Binded SQL

    '+a+'
    '+a.replace(/\t\t/g,"")+'

    Original SQL

    '+f.argument+'
    '+f.argument.replace(/\t\t/g,"")+'

    SQL Bind Value

    '+g.argument+'
    '+g.argument+"
    ").end().modal("show"),prettyPrint()})):($("#customLogPopup").find("h4").html("SQL").end().find("div.modal-body").html('

    Original SQL

    '+f.argument+'
    '+f.argument.replace(/\t\t/g,"")+"
    ").end().modal("show"),prettyPrint())}o||(o=b(function(){j&&e.find(".dcf-popover").popover("hide"),j=!0,o=!1},300))}),g.onDblClick.subscribe(function(a,b){j=!1,$(a.target).popover("toggle")}),g.onCellChange.subscribe(function(a,b){h.updateItem(b.item.id,b.item)}),g.onActiveCellChanged.subscribe(function(a,b){d.$emit("distributedCallFlowDirective.rowSelected."+d.namespace,b.grid.getDataItem(b.row))}),s=function(a){var b=h.getItem(a+1);return!(!b||a!==b.parent)},g.onKeyDown.subscribe(function(a,b){var c=h.getItem(b.row);if(37==a.which)if(s(b.row))c._collapsed=!0,h.updateItem(c.id,c);else{var d=h.getItem(b.row-1);d&&g.setActiveCell(b.row-1,0)}else if(39==a.which){if(c._collapsed)c._collapsed=!1;else{var e=h.getItem(b.row+1);e&&g.setActiveCell(b.row+1,0)}h.updateItem(c.id,c)}}),h.onRowCountChanged.subscribe(function(a,b){g.updateRowCount(),g.render()}),h.onRowsChanged.subscribe(function(a,b){g.invalidateRows(b.rows),g.render()})},$("#customLogPopup").on("click","button",function(){var a=document.createRange();a.selectNode($(this).parent().next().get(0)),window.getSelection().addRange(a);try{document.execCommand("copy")}catch(b){console.log("unable to copy :",b)}window.getSelection().removeAllRanges()}),d.$on("distributedCallFlowDirective.initialize."+d.namespace,function(a,b){j(b)}),d.$on("distributedCallFlowDirective.resize."+d.namespace,function(a){g&&g.resizeCanvas()}),d.$on("distributedCallFlowDirective.selectRow."+d.namespace,function(a,b){var c=b-1;g.setSelectedRows([c]),g.setActiveCell(c,0),g.scrollRowToTop(c)}),d.$on("distributedCallFlowDirective.searchCall."+d.namespace,function(a,b,c){var e=t(b,c);-1==e?c>0?(u(t(b,0)),d.$emit("transactionDetail.calltreeSearchCallResult","Loop")):d.$emit("transactionDetail.calltreeSearchCallResult","No call took longer than {time}ms."):(u(e),d.$emit("transactionDetail.calltreeSearchCallResult",""))}),t=function(a,b){for(var c=0,d=-1,e=0;e=a){if(c==b){d=e;break}c++}return d},u=function(a){g.setSelectedRows([a]),g.setActiveCell(a,0),g.scrollRowIntoView(a,!0)}}}}])}(),function(){"use strict";pinpointApp.constant("responseTimeChartDirectiveConfig",{myColors:["#2ca02c","#3c81fa","#f8c731","#f69124","#f53034"]}),pinpointApp.directive("responseTimeChartDirective",["responseTimeChartDirectiveConfig","$timeout","AnalyticsService","PreferenceService",function(a,b,c,d){var e=d.getResponseTypeColor();return{template:"
    ",replace:!0,restrict:"EA",scope:{namespace:"@"},link:function(a,f,g){var h,i,j,k,l,m,n,o;j=function(){h="responseTimeId-"+a.namespace,f.attr("id",h)},k=function(a,b){f.css("width",a||"100%"),f.css("height",b||"150px")},l=function(d,e,f){b(function(){var b={type:"serial",theme:"none",dataProvider:d,startDuration:0,valueAxes:[{gridAlpha:.1,usePrefixes:!0}],graphs:[{balloonText:e?"[[category]] filtering":"",colorField:"color",labelText:"[[value]]",fillAlphas:.3,alphaField:"alpha",lineAlpha:.8,lineColor:"#787779",type:"column",valueField:"count"}],categoryField:"responseTime",categoryAxis:{gridAlpha:0}};f&&(b.chartCursor={fullWidth:!0,categoryBalloonAlpha:.7,cursorColor:"#000000",cursorAlpha:0,zoomable:!1}),i=AmCharts.makeChart(h,b),i.addListener("clickGraphItem",function(b){"Error"==b.item.category&&(c.send(c.CONST.MAIN,c.CONST.CLK_RESPONSE_GRAPH),a.$emit("responseTimeChartDirective.showErrorTransacitonList",b.item.category)),e&&a.$emit("responseTimeChartDirective.itemClicked."+a.namespace,b.item.serialDataItem.dataContext)}),e&&(i.addListener("clickGraphItem",m),i.addListener("rollOverGraphItem",function(a){a.event.target.style.cursor="pointer"}))})},m=function(b){a.$emit("responseTimeChartDirective.itemClicked."+a.namespace,b.item.serialDataItem.dataContext)},n=function(a){i.dataProvider=a,b(function(){i.validateData()})},o=function(a){angular.isUndefined(a)&&(a=d.getResponseTypeFormat());var b=[],c=[.2,.3,.4,.6,.6],f=0;for(var g in a)b.push({responseTime:g,count:a[g],color:e[f],alpha:c[f++]});return b},a.$on("responseTimeChartDirective.initAndRenderWithData."+a.namespace,function(a,b,c,d,e,f){j(),k(c,d),l(o(b),e,f)}),a.$on("responseTimeChartDirective.updateData."+a.namespace,function(a,b){n(o(b))})}}}])}(),function(){"use strict";pinpointApp.constant("loadChartDirectiveConfig",{}),pinpointApp.directive("loadChartDirective",["loadChartDirectiveConfig","$timeout","AnalyticsService","PreferenceService",function(a,b,c,d){var e=d.getResponseTypeColor();return{template:'
    ',replace:!0,restrict:"EA",scope:{namespace:"@"},link:function(a,d,f){var g,h,i,j,k,l,m,n,o,p;j=function(){g="loadId-"+a.namespace,d.attr("id",g)},k=function(a,b){a&&d.css("width",a),b&&d.css("height",b)},l=function(a,d){b(function(){var b={type:"serial",theme:"light",legend:{autoMargins:!1,align:"right",borderAlpha:0,equalWidths:!0,horizontalGap:0,verticalGap:0,markerSize:10,useGraphSettings:!1,valueWidth:0,spacing:0,markerType:"circle",position:"top"},dataProvider:a,valueAxes:[{stackType:"regular",axisAlpha:1,usePrefixes:!0,gridAlpha:.1}],categoryField:"time",categoryAxis:{startOnAxis:!0,gridPosition:"start",labelFunction:function(a,b,c){var d=a.indexOf("-"),e=a.indexOf(" ");return a.substring(d+1,e)+"\n"+a.substring(e+1)}},balloon:{fillAlpha:1,borderThickness:1},graphs:[{balloonText:"[[title]] : [[value]]",fillAlphas:.2,fillColors:e[0],lineAlpha:.8,lineColor:"#787779",title:h[0],type:"step",legendColor:e[0],valueField:h[0]},{balloonText:"[[title]] : [[value]]",fillAlphas:.3,fillColors:e[1],lineAlpha:.8,lineColor:"#787779",title:h[1],type:"step",legendColor:e[1],valueField:h[1]},{balloonText:"[[title]] : [[value]]",fillAlphas:.4,fillColors:e[2],lineAlpha:.8,lineColor:"#787779",title:h[2],type:"step",legendColor:e[2],valueField:h[2]},{balloonText:"[[title]] : [[value]]",fillAlphas:.6,fillColors:e[3],lineAlpha:.8,lineColor:"#787779",title:h[3],type:"step",legendColor:e[3],valueField:h[3]},{balloonText:"[[title]] : [[value]]",fillAlphas:.6,fillColors:e[4],lineAlpha:.8,lineColor:"#787779",title:h[4],type:"step",legendColor:e[4],valueField:h[4]}]};d&&(b.chartCursor={cursorPosition:"mouse",categoryBalloonAlpha:.7,categoryBalloonDateFormat:"H:NN"}),i=AmCharts.makeChart(g,b),i.addListener("clickGraph",function(a){c.send(c.CONST.MAIN,c.CONST.CLK_LOAD_GRAPH)})})},o=function(a,c){b(function(){var b={type:"serial",pathToImages:"./components/amcharts/images/",theme:"light",dataProvider:a,valueAxes:[{stackType:"regular",axisAlpha:0,gridAlpha:0,labelsEnabled:!1}],categoryField:"time",categoryAxis:{startOnAxis:!0,gridPosition:"start",labelFunction:function(a,b,c){return moment(a).format("HH:mm")}},chartScrollbar:{graph:"AmGraph-1"},graphs:[{id:"AmGraph-1",fillAlphas:.2,fillColors:e[0],lineAlpha:.8,lineColor:"#787779",type:"step",valueField:h[0]},{id:"AmGraph-2",fillAlphas:.3,fillColors:e[1],lineAlpha:.8,lineColor:"#787779",type:"step",valueField:h[1]},{id:"AmGraph-3",fillAlphas:.4,fillColors:e[2],lineAlpha:.8,lineColor:"#787779",type:"step",valueField:h[2]},{id:"AmGraph-4",fillAlphas:.6,fillColors:e[3],lineAlpha:.8,lineColor:"#787779",type:"step",valueField:h[3]},{id:"AmGraph-5",fillAlphas:.6,fillColors:e[4],lineAlpha:.8,lineColor:"#787779",type:"step",valueField:h[4]}]};c&&(b.chartCursor={avoidBalloonOverlapping:!1}),i=AmCharts.makeChart(g,b),i.addListener("changed",function(a){})})},p=function(){d.append("

    No Data

    ")},n=function(a){angular.isUndefined(i)?0!==a.length&&l(a,!0):(i.dataProvider=a,b(function(){i.validateData()}))},m=function(a){function b(a){for(var b in c)if(moment(a).format("YYYY-MM-DD HH:mm")===c[b].time)return b;return-1}if(angular.isUndefined(a))return[];h=[];for(var c=[],d=0;d-1)c[i][e.key]=g[1];else{var j={time:moment(g[0]).format("YYYY-MM-DD HH:mm")};j[e.key]=g[1],c.push(j)}}}return c},a.$on("loadChartDirective.initAndRenderWithData."+a.namespace,function(a,b,c,d,e){j(),k(c,d);var f=m(b);0===f.length?p():l(f,e)}),a.$on("loadChartDirective.updateData."+a.namespace,function(a,b){n(m(b))}),a.$on("loadChartDirective.initAndSimpleRenderWithData."+a.namespace,function(a,b,c,d,e){j(),k(c,d);var f=m(b);0===f.length?p():o(f,e)})}}}])}(),function(){"use strict";angular.module("pinpointApp").directive("jvmMemoryChartDirective",["$timeout",function(a){return{template:"
    ",replace:!0,restrict:"E",scope:{namespace:"@"},link:function(b,c,d){var e,f,g,h,i,j,k;g=function(){e="multipleValueAxesId-"+b.namespace,c.attr("id",e)},h=function(a,b){a&&c.css("width",a),b&&c.css("height",b)},i=function(c){var d={type:"serial",theme:"light",autoMargins:!1,marginTop:10,marginLeft:70,marginRight:70,marginBottom:30,legend:{useGraphSettings:!0,autoMargins:!1,align:"right",position:"top",valueWidth:70},usePrefixes:!0,dataProvider:c,valueAxes:[{id:"v1",gridAlpha:0,axisAlpha:1,position:"right",title:"Full GC (ms)",minimum:0},{id:"v2",gridAlpha:0,axisAlpha:1,position:"left",title:"Memory (bytes)",minimum:0}],graphs:[{valueAxis:"v2",balloonText:"[[value]]B",legendValueText:"[[value]]B",lineColor:"rgb(174, 199, 232)",title:"Max",valueField:"Max",fillAlphas:0,connect:!1},{valueAxis:"v2",balloonText:"[[value]]B",legendValueText:"[[value]]B",lineColor:"rgb(31, 119, 180)",fillColor:"rgb(31, 119, 180)",title:"Used",valueField:"Used",fillAlphas:.4,connect:!1},{valueAxis:"v1",balloonFunction:function(a,b){var c=a.serialDataItem.dataContext,d=c.FGCTime+"ms",e=c.FGCCount;return e>1&&(d+=" ("+e+")"),d},legendValueText:"[[value]]ms",lineColor:"#FF6600",title:"FGC",valueField:"FGCTime",type:"column",fillAlphas:.3,connect:!1}],chartCursor:{categoryBalloonAlpha:.7,fullWidth:!0,cursorAlpha:.1},categoryField:"time",categoryAxis:{axisColor:"#DADADA",startOnAxis:!0,gridPosition:"start",labelFunction:function(a,b,c){return a.substring(a.indexOf(" ")+1)}}};a(function(){f=AmCharts.makeChart(e,d),f.chartCursor.addListener("changed",function(a){b.$emit("jvmMemoryChartDirective.cursorChanged."+b.namespace,a)})})},j=function(a){a?(angular.isNumber(a)&&(a=f.dataProvider[a].time),f.chartCursor.showCursorAt(a)):f.chartCursor.hideCursor()},k=function(){f&&(f.validateNow(),f.validateSize())},b.$on("jvmMemoryChartDirective.initAndRenderWithData."+b.namespace,function(a,b,c,d){g(),h(c,d),i(b)}),b.$on("jvmMemoryChartDirective.showCursorAt."+b.namespace,function(a,b){j(b)}),b.$on("jvmMemoryChartDirective.resize."+b.namespace,function(a){k()})}}}])}(),function(){"use strict";angular.module("pinpointApp").directive("cpuLoadChartDirective",["$timeout",function(a){return{template:"
    ",replace:!0,restrict:"E",scope:{namespace:"@"},link:function(b,c,d){var e,f,g,h,i,j,k;g=function(){e="multipleValueAxesId-"+b.namespace,c.attr("id",e)},h=function(a,b){a&&c.css("width",a),b&&c.css("height",b)},i=function(c){var d={type:"serial",theme:"light",autoMargins:!1,marginTop:10,marginLeft:70,marginRight:70,marginBottom:30,legend:{useGraphSettings:!0,autoMargins:!0,align:"right",position:"top",valueWidth:70},usePrefixes:!0,dataProvider:c,valueAxes:[{id:"v1",gridAlpha:0,axisAlpha:1,position:"left",title:"Cpu Usage (%)",maximum:100,minimum:0}],graphs:[{valueAxis:"v1",balloonText:"[[value]]%",legendValueText:"[[value]]%",lineColor:"rgb(31, 119, 180)",fillColor:"rgb(31, 119, 180)",title:"JVM",valueField:"jvmCpuLoad",fillAlphas:.4,connect:!1},{valueAxis:"v1",balloonText:"[[value]]%",legendValueText:"[[value]]%",lineColor:"rgb(174, 199, 232)",fillColor:"rgb(174, 199, 232)",title:"System",valueField:"systemCpuLoad",fillAlphas:.4,connect:!1},{valueAxis:"v1",showBalloon:!1,lineColor:"#FF6600",title:"Max",valueField:"maxCpuLoad",fillAlphas:0,visibleInLegend:!1}],chartCursor:{categoryBalloonAlpha:.7,fullWidth:!0,cursorAlpha:.1},categoryField:"time",categoryAxis:{axisColor:"#DADADA",startOnAxis:!0,gridPosition:"start",labelFunction:function(a,b,c){return moment(a).format("HH:mm:ss")}}};a(function(){f=AmCharts.makeChart(e,d),f.chartCursor.addListener("changed",function(a){b.$emit("cpuLoadChartDirective.cursorChanged."+b.namespace,a)})})},j=function(a){a?(angular.isNumber(a)&&(a=f.dataProvider[a].time),f.chartCursor.showCursorAt(a)):f.chartCursor.hideCursor()},k=function(){f&&(f.validateNow(),f.validateSize())},b.$on("cpuLoadChartDirective.initAndRenderWithData."+b.namespace,function(a,b,c,d){g(),h(c,d),i(b)}),b.$on("cpuLoadChartDirective.showCursorAt."+b.namespace,function(a,b){j(b)}),b.$on("cpuLoadChartDirective.resize."+b.namespace,function(a){k()})}}}])}(),function(){"use strict";angular.module("pinpointApp").directive("tpsChartDirective",["$timeout",function(a){return{template:"
    ",replace:!0,restrict:"E",scope:{namespace:"@"},link:function(b,c,d){var e,f,g,h,i,j,k;g=function(){e="multipleValueAxesId-"+b.namespace,c.attr("id",e)},h=function(a,b){a&&c.css("width",a),b&&c.css("height",b)},i=function(c){var d={type:"serial",theme:"light",autoMargins:!1,marginTop:10,marginLeft:70,marginRight:70,marginBottom:30,legend:{useGraphSettings:!0,autoMargins:!0,align:"right",position:"top",valueWidth:70},usePrefixes:!0,dataProvider:c,valueAxes:[{stackType:"regular",gridAlpha:0,axisAlpha:1,position:"left",title:"TPS",minimum:0}],graphs:[{balloonText:"Sampled Continuation : [[value]]",legendValueText:"[[value]]",lineColor:"rgb(214, 141, 8)",fillColor:"rgb(214, 141, 8)",title:"S.C",valueField:"sampledContinuationTps",fillAlphas:.4,connect:!0},{balloonText:"Sampled New : [[value]]",legendValueText:"[[value]]",lineColor:"rgb(252, 178, 65)",fillColor:"rgb(252, 178, 65)",title:"S.N",valueField:"sampledNewTps",fillAlphas:.4,connect:!0},{balloonText:"Unsampled Continuation : [[value]]",legendValueText:"[[value]]",lineColor:"rgb(90, 103, 166)",fillColor:"rgb(90, 103, 166)",title:"U.C",valueField:"unsampledContinuationTps",fillAlphas:.4,connect:!0},{balloonText:"Unsampled New : [[value]]",legendValueText:"[[value]]",lineColor:"rgb(160, 153, 255)",fillColor:"rgb(160, 153, 255)",title:"U.N",valueField:"unsampledNewTps",fillAlphas:.4,connect:!0},{balloonText:"Total : [[value]]",legendValueText:"[[value]]",lineColor:"rgba(31, 119, 180, 0)",fillColor:"rgba(31, 119, 180, 0)",valueField:"totalTps",fillAlphas:.4,connect:!0}],chartCursor:{categoryBalloonAlpha:.7,fullWidth:!0,cursorAlpha:.1},categoryField:"time",categoryAxis:{axisColor:"#DADADA",startOnAxis:!0,gridPosition:"start",labelFunction:function(a,b,c){return moment(a).format("HH:mm:ss")}}};a(function(){f=AmCharts.makeChart(e,d),f.chartCursor.addListener("changed",function(a){b.$emit("tpsChartDirective.cursorChanged."+b.namespace,a)})})},j=function(a){a?(angular.isNumber(a)&&(a=f.dataProvider[a].time),f.chartCursor.showCursorAt(a)):f.chartCursor.hideCursor()},k=function(){f&&(f.validateNow(),f.validateSize())},b.$on("tpsChartDirective.initAndRenderWithData."+b.namespace,function(a,b,c,d){g(),h(c,d),i(b)}),b.$on("tpsChartDirective.showCursorAt."+b.namespace,function(a,b){j(b)}),b.$on("tpsChartDirective.resize."+b.namespace,function(a){k()})}}}])}(),function(){"use strict";pinpointApp.directive("loadingDirective",["$timeout","$templateCache","$compile",function(a,b,c){return{restrict:"A",scope:{showLoading:"=loadingDirective",loadingMessage:"@"},link:function(a,d,e){a.loadingMessage||(a.loadingMessage="Please Wait...");var f=b.get(e.loadingDirective);"static"===d.css("position")&&d.css("position","relative"),d.append(c(f)(a))}}}])}(),function(a){"use strict";pinpointApp.constant("ConfigurationConfig",{menu:{GENERAL:"general",ALARM:"alarm",HELP:"help"}}),pinpointApp.controller("ConfigurationCtrl",["$scope","$element","ConfigurationConfig","AnalyticsService",function(b,c,d,e){b.selectMember=!0,b.currentTab=d.menu.GENERAL; -for(var f in d.menu)!function(a){var c="is"+a.substring(0,1).toUpperCase()+a.substring(1).toLowerCase();b[c]=function(){return b.currentTab==d.menu[a]}}(f);a(c).on("hidden.bs.modal",function(a){b.currentTab=d.menu.GENERAL,b.$broadcast("configuration.alarm.initClose"),b.$broadcast("configuration.general.initClose")}),b.setCurrentTab=function(a){if(b.currentTab!=a)switch(b.currentTab=a,a){case d.menu.GENERAL:e.send(e.CONST.MAIN,e.CONST.CLK_GENERAL),b.$broadcast("general.configuration.show");break;case d.menu.ALARM:e.send(e.CONST.MAIN,e.CONST.CLK_ALARM),b.$broadcast("alarmUserGroup.configuration.show");break;case d.menu.HELP:e.send(e.CONST.MAIN,e.CONST.CLK_HELP)}},b.getMemberButtonStyle=function(){return b.selectMember?"btn-primary":"btn-default"},b.getAlarmButtonStyle=function(){return b.selectMember?"btn-default":"btn-primary"},b.showMember=function(){b.selectMember=!0},b.showAlarm=function(){b.selectMember=!1},b.$on("configuration.show",function(){e.send(e.CONST.MAIN,e.CONST.CLK_CONFIGURATION),c.modal("show")})}])}(jQuery),function(a){"use strict";pinpointApp.controller("HelpCtrl",["$scope","$element",function(a,b){a.enHelpList=[{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:"About Alarm",link:"https://github.com/naver/pinpoint/blob/master/doc/alarm.md#alarm"}],a.koHelpList=[{title:"Pinpoint 개발자가 작성한 Pinpoint 기술문서",link:"http://helloworld.naver.com/helloworld/1194202"},{title:"소개 및 설치 가이드",link:"http://dev2.prompt.co.kr/33"},{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:"Alarm 가이드",link:"https://github.com/naver/pinpoint/blob/master/doc/alarm.md#alarm-1"}]}])}(jQuery),function(a){"use strict";pinpointApp.constant("GeneralConfig",{menu:{GENERAL:"general",ALRAM:"alram"}}),pinpointApp.controller("GeneralCtrl",["GeneralConfig","$scope","$rootScope","$element","$document","PreferenceService","AnalyticsService","helpContentService",function(a,b,c,d,e,f,g,h){function i(a){g.send(g.CONST.MAIN,g.CONST.CLK_GENERAL_SET_FAVORITE),f.addFavorite(a),b.$apply(function(){b.savedFavoriteList=f.getFavoriteList(),c.$broadcast("navbarDirective.changedFavorite")})}function j(a){if(!a.id)return a.text;var b=a.text.split("@");if(b.length>1){var c=e.get(0).createElement("img");return c.src="/images/icons/"+b[1]+".png",c.style.height="25px",c.style.paddingRight="3px",c.outerHTML+b[0]}return a.text}function k(){var a=!1;l.select2({placeholder:"Select an application.",searchInputPlaceholder:"Input your application name.",allowClear:!1,formatResult:j,formatSelection:j,escapeMarkup:function(a){return a}}).on("select2-selecting",function(b){a=!0}).on("select2-close",function(b){a===!0&&setTimeout(function(){i(l.select2("val"))},0),a=!1}),m.on("hide.bs.dropdown",function(a){n===!1&&(a.preventDefault(),n=!1)}),m.on("click",function(){n=!1})}d.find("div.general-warning").html(h.configuration.general.warning),d.find("div.favorite-empty").html(h.configuration.general.empty),b.$on("general.configuration.show",function(){}),b.depthList=f.getDepthList(),b.periodTypes=f.getPeriodTypes(),b.caller=f.getCaller(),b.callee=f.getCallee(),b.period=f.getPeriod(),b.savedFavoriteList=f.getFavoriteList();var l=d.find(".applicationList"),m=d.find(".inout-bound"),n=!1;b.changeCaller=function(a){b.caller=a,g.send(g.CONST.MAIN,g.CONST.CLK_GENERAL_SET_DEPTH,b.caller),f.setCaller(b.caller)},b.changeCallee=function(a){b.callee=a,g.send(g.CONST.MAIN,g.CONST.CLK_GENERAL_SET_DEPTH,b.callee),f.setCallee(b.callee)},b.changePeriod=function(){g.send(g.CONST.MAIN,g.CONST.CLK_GENERAL_SET_PERIOD,b.period),f.setPeriod(b.period)},b.removeFavorite=function(a){g.send(g.CONST.MAIN,g.CONST.CLK_GENERAL_SET_FAVORITE),f.removeFavorite(a),b.savedFavoriteList=f.getFavoriteList(),c.$broadcast("navbarDirective.changedFavorite")},b.closeInOut=function(){n=!0,m.trigger("click.bs.dropdown")},b.$on("configuration.general.applications.set",function(a,c){b.applications=c,k()}),b.$on("configuration.general.initClose",function(){b.closeInOut()})}])}(jQuery),function(a){"use strict";pinpointApp.directive("alarmUserGroupDirective",["$rootScope","$timeout","helpContentService","AlarmUtilService","AlarmBroadcastService","AnalyticsService",function(f,g,h,i,j,k){return{restrict:"EA",replace:!0,templateUrl:"features/configuration/alarm/alarmUserGroup.html?v="+G_BUILD_TIME,scope:!0,link:function(f,g){function h(a){i.show(z),i.sendCRUD("getUserGroupList",a,function(a){v=f.userGroupList=a,i.setTotal(x,v.length),j.sendSelectionEmpty(),u===!1&&j.sendLoadPinpointUser(),u=!0,i.hide(z)},p)}function l(a){a.find(b.DIV_NORMAL).hasClass("hide-me")||(o(),m(i.extractID(a)),j.sendReloadWithUserGroupID(a.find(".contents").html()))}function m(b){a("#"+f.prefix+s).removeClass("selected"),a("#"+f.prefix+b).addClass("selected"),s=b}function n(a){return i.extractID(t)===i.extractID(a)}function o(){c.cancelAction(i,A),e.cancelAction(i,t),d.cancelAction(i,t)}function p(a){y.find(".message").html(a.errorMessage),i.hide(z),i.show(y)}function q(){c.applyAction(i,A,z,function(a,b){v.push({id:b,number:a.number}),f.userGroupList=v,i.setTotal(x,v.length)},p)}function r(){e.applyAction(i,t,z,function(a,b){return i.hasDuplicateItem(v,function(c){return c.number!=a&&c.id==b||c.number==a&&c.id==b})},function(a,b){k.send(k.CONST.MAIN,k.CONST.CLK_ALARM_CREATE_USER_GROUP);for(var c=0;c0}function n(a){i.show(u),i.sendCRUD("getGroupMemberListInGroup",{userGroupId:w},function(a){y=a,e.groupMemberList=y,i.setTotal(t,y.length),i.hide(u),j.sendGroupMemberLoaded(y)},h)}function o(a){return i.extractID(x)===i.extractID(a)}function p(a){for(var b=0;b=0;c++,d--)a[c]=y[d];y=a,e.groupMemberList=y}},e.onCloseAlert=function(){i.closeAlert(v,u)},e.$on("alarmGroupMember.configuration.load",function(a,b,c){w=b,g(),l(),i.hide(s),n(c)}),e.$on("alarmGroupMember.configuration.selectNone",function(){w="",l(),i.show(s)}),e.$on("alarmGroupMember.configuration.addUser",function(a,d){return""===w?void j.sendCallbackAddedUser(!1):(g(),void c.applyAction(i,d,w,u,m,function(a){k.send(k.CONST.MAIN,k.CONST.CLK_ALARM_ADD_USER),e.groupMemberList.push({name:a.name,memberId:a.userId,department:a.department,userGroupId:w}),j.sendCallbackAddedUser(!0),i.setTotal(t,y.length),i.hide(u)},function(){h({message:b.EXIST_A_SAME}),j.sendCallbackAddedUser(!0)}))}),e.$on("alarmGroupMember.configuration.updateUser",function(a,b){m(b.userId)&&(g(),q(b))}),e.$on("alarmGroupMember.configuration.removeUser",function(a,b){m(b)&&(g(),p(b))})}}}]);var b={EXIST_A_SAME:"Exist a same user in the lists.",DIV_NORMAL:"div._normal",DIV_EDIT:"div._edit",DIV_REMOVE:"div._remove"},c={applyAction:function(a,b,c,d,e,f,g){a.show(d),e(b.userId)===!0?g():a.sendCRUD("addMemberInGroup",{userGroupId:c,memberId:b.userId},function(c){f(b),a.hide(d)},function(a){g(a)})}},d={_bIng:!1,onAction:function(a,c){this._bIng=!0,a.hide(c.find(b.DIV_NORMAL)),a.show(c.find(b.DIV_REMOVE))},cancelAction:function(a,c){this._bIng===!0&&(a.hide(c.find(b.DIV_REMOVE)),a.show(c.find(b.DIV_NORMAL)),this._bIng=!1)},applyAction:function(a,b,c,d,e,f){a.show(d);var g=this,h=a.extractID(c);a.sendCRUD("removeMemberInGroup",{userGroupId:b,memberId:h},function(b){e(h),g.cancelAction(a,c),a.hide(d)},function(a){f(a)})}}}(jQuery),function(a){"use strict";pinpointApp.directive("alarmPinpointUserDirective",["$rootScope","$timeout","helpContentTemplate","helpContentService","AlarmUtilService","AlarmBroadcastService","AnalyticsService","globalConfig",function(f,g,h,i,j,k,l,m){return{restrict:"EA",replace:!0,templateUrl:"features/configuration/alarm/alarmPinpointUser.html?v="+G_BUILD_TIME,scope:!0,link:function(f,g){function h(){c.cancelAction(s),d.cancelAction(j,D)}function i(a){B.find(".message").html(a.errorMessage),j.hide(A),j.show(B)}function n(b){j.show(A),j.sendCRUD("getPinpointUserList",b||{},function(b){a.each(b,function(a,b){b.has=!1}),G=f.pinpointUserList=b,j.setTotal(z,o()),j.hide(A)},i)}function o(){return H.length+"/"+G.length}function p(a){for(var b=0;b=0;e--)c.prepend(E[e]);E[0].find("input").removeAttr("disabled"),j.hide(E[d].find(b.DIV_EDIT)),j.show(E[d].find(b.DIV_ADD)),a.each(E,function(a,b){j.show(b)}),E[0].focus()}function r(c){for(var d=E.length-1,e=d;e>=0;e--)D.after(E[e]);E[0].find("input").val(c.userId),E[1].find("input").val(c.name),E[2].find("input").val(c.department),E[3].find("input").val(c.phoneNumber),E[4].find("input").val(c.email),E[0].find("input").attr("disabled","disabled"),j.hide(E[d].find(b.DIV_ADD)),j.show(E[d].find(b.DIV_EDIT)),a.each(E,function(a,b){j.show(b)}),E[0].find("input").focus()}function s(){a.each(E,function(a,b){j.hide(b),b.find("input").val("")})}function t(){var b=a.trim(E[0].find("input").val()),c=a.trim(E[1].find("input").val()),d=a.trim(E[2].find("input").val()),e=a.trim(E[3].find("input").val()),f=a.trim(E[4].find("input").val()),g={userId:b,name:c,department:d,phoneNumber:e,email:f};return g}function u(a){return j.extractID(D)===j.extractID(a)}function v(a){for(var b=0;bH.length,H=b,j.setTotal(z,o()),j.hide(A)}),f.onCloseAlert=function(){j.closeAlert(B,A)},f.$on("alarmPinpointUser.configuration.load",function(a,b){h(),F===!1&&n(angular.isUndefined(b)?{}:{department:b})})}}}]);var b={INPUT_USERID_AND_NAME:"Input user id and name",INPUT_PHONE_OR_EMAIL:"Input phone number or email",YOU_CAN_ONLY_INPUT_NUMBERS:"You can only input numbers",INVALID_EMAIL_FORMAT:"Invalid email format.",DIV_NORMAL:"div._normal",DIV_REMOVE:"div._remove",DIV_ADD:"div._add",DIV_EDIT:"div._edit"},c={_bIng:!1,isOn:function(){return this._bIng},onAction:function(a){this._bIng=!0,a()},cancelAction:function(a){this._bIng===!0&&(a(),this._bIng=!1)},applyAction:function(a,c,d,e,f){var g=this;return a.show(d),""===c.userId||""===c.name?void f({errorMessage:b.INPUT_USERID_AND_NAME}):""===c.phoneNumber&&""===c.email?void f({errorMessage:b.INPUT_PHONE_OR_EMAIL}):""!==c.phoneNumber&&validatePhone(c.phoneNumber)?void f({errorMessage:b.YOU_CAN_ONLY_INPUT_NUMBERS}):""!==c.email&&validateEmail(c.email)?void f({errorMessage:b.INVALID_EMAIL_FORMAT}):void a.sendCRUD("createPinpointUser",c,function(b){c.number=b.number,e(c),g.cancelAction(function(){}),a.hide(d)},function(a){f(a)})}},d={_bIng:!1,isOn:function(){return this._bIng},onAction:function(a,c){this._bIng=!0,c.addClass("remove"),a.hide(c.find(b.DIV_NORMAL)),a.show(c.find(b.DIV_REMOVE))},cancelAction:function(a,c){this._bIng===!0&&(c.removeClass("remove"),a.hide(c.find(b.DIV_REMOVE)),a.show(c.find(b.DIV_NORMAL)),this._bIng=!1)},applyAction:function(a,b,c,d,e){var f=this,g=a.extractID(b);a.sendCRUD("removePinpointUser",{userId:g},function(e){d(g),f.cancel(a,b),a.hide(c)},function(a){e(a)})}},e={_bIng:!1,isOn:function(){return this._bIng},onAction:function(a,b,c){this._bIng=!0,a.hide(b),c(a.extractID(b))},cancelAction:function(a,b,c){this._bIng===!0&&(c(),a.show(b),this._bIng=!1)},applyAction:function(a,c,d,e,f,g){var h=this;return a.show(e),""===c.name?void g({errorMessage:b.INPUT_USERID_AND_NAME}):""===c.phoneNumber&&""===c.email?void g({errorMessage:b.INPUT_PHONE_OR_EMAIL}):""!==c.phoneNumber&&validatePhone(c.phoneNumber)?void g({errorMessage:b.YOU_CAN_ONLY_INPUT_NUMBERS}):""!==c.email&&validateEmail(c.email)?void g({errorMessage:b.INVALID_EMAIL_FORMAT}):void a.sendCRUD("updatePinpointUser",c,function(b){h.cancelAction(a,d,function(){}),f(c),a.hide(e)},function(a){g(a)})}}}(jQuery),function(a){"use strict";pinpointApp.directive("alarmRuleDirective",["$rootScope","$document","$timeout","AlarmUtilService","AnalyticsService","TooltipService",function(f,g,h,i,j,k){return{restrict:"EA",replace:!0,templateUrl:"features/configuration/alarm/alarmRule.html?v="+G_BUILD_TIME,scope:!0,link:function(f,h){function k(){c.cancelAction(v),d.cancelAction(i,E,v),e.cancelAction(i,E,C)}function l(a){return i.extractID(E)===i.extractID(a)}function m(){k()}function n(a){D.find(".message").html(a.errorMessage),i.hide(B),i.show(D)}function o(){i.show(B),i.sendCRUD("getRuleList",{userGroupId:F},function(a){G=!0,H=a,f.ruleList=a,i.setTotal(A,H.length),i.hide(B)},n)}function p(){f.ruleSets.length>1||i.sendCRUD("getRuleSet",{},function(b){a.each(b,function(a,b){f.ruleSets.push({text:b})}),s()},n)}function q(a){if(!a.id)return a.text;var b=a.text.split("@");if(b.length>1){var c=g.get(0).createElement("img");return c.src="/images/icons/"+b[1]+".png",c.style.height="25px",c.style.paddingRight="3px",c.outerHTML+b[0]}return a.text}function r(){y.find("select[name=application]").select2({placeholder:"Select an application.",searchInputPlaceholder:"Input your application name.",allowClear:!1,formatResult:q,formatSelection:q,escapeMarkup:function(a){return a}}).on("change",function(a){})}function s(){y.find("select[name=rule]").select2({searchInputPlaceholder:"Input your rule name.",placeholder:"Select an rule.",allowClear:!1,formatResult:q,formatSelection:q,escapeMarkup:function(a){return a}}).on("change",function(a){})}function t(){z.find("tbody").prepend(C[1]).prepend(C[0]),i.hide(C[0].find(b.DIV_EDIT)),i.show(C[0].find(b.DIV_ADD)),a.each(C,function(a,b){i.show(b)})}function u(c){i.hide(C[0].find(b.DIV_ADD)),i.show(C[0].find(b.DIV_EDIT)),C[0].find("select[name=application]").select2("val",c.applicationId+"@"+c.serviceType),C[0].find("select[name=rule]").select2("val",c.checkerName),C[0].find("input[name=threshold]").val(c.threshold),C[0].find("select[name=type]").val(function(){return c.smsSend&&c.emailSend?"all":c.smsSend?"sms":c.emailSend?"email":""}()),C[1].find("input").val(c.notes),a.each(C,function(a,b){i.show(b)})}function v(){a.each(C,function(a,b){i.hide(b)}),C[0].find("select[name=application]").select2("val",""),C[0].find("select[name=rule]").select2("val",""),C[0].find("input[name=threshold]").val("1"),C[0].find("select[name=type]").val("all"),C[1].find("input").val("")}function w(a){var b=C[0].find("select[name=application]").select2("val").split("@"),c=C[0].find("select[name=type]").val(),d={applicationId:b[0],serviceType:b[1],userGroupId:F,checkerName:C[0].find("select[name=rule]").select2("val"),threshold:C[0].find("input[name=threshold]").val(),smsSend:"all"===c||"sms"===c,emailSend:"all"===c||"email"===c,notes:C[1].find("input").val()};return angular.isUndefined(a)===!1&&(d.ruleId=a),d}function x(a){for(var b=0;b
  • ',chartDirective:Handlebars.compile('')},css:{borderWidth:2,height:180,navbarHeight:70,titleHeight:30},sumChart:{width:260,height:120},otherChart:{width:120,height:60},"const":{MIN_Y:10}}),pinpointApp.controller("RealtimeChartCtrl",["RealtimeChartCtrlConfig","$scope","$element","$rootScope","$compile","$timeout","$window","globalConfig","$location","RealtimeWebsocketService","AnalyticsService","TooltipService",function(b,c,d,e,f,g,h,i,j,k,l,m){function n(){O=d.find("div.agent-sum-chart"),P=d.find("div.agent-sum-chart div:first-child span:first-child"),Q=d.find("div.agent-sum-chart div:first-child span:last-child"),R=d.find("div.agent-chart-list"),S=d.find(".connection-message"),T=d.find(".handle .glyphicon"),U=d.find(".glyphicon-pushpin"),S.hide(),P.html(""),Q.html("0")}function o(){q("sum")===!1&&(O.append(f(b.template.chartDirective({width:b.sumChart.width,height:b.sumChart.height,namespace:"sum",chartColor:"sumChartColor",xAxisCount:W,showExtraInfo:"true",timeoutMaxCount:V}))(c)),_.sum=-1)}function p(){angular.isDefined(_.sum)?(_={},_.sum=-1):_={}}function q(a){return angular.isDefined(_[a])}function r(d){var e=a(b.template.agentChart).append(f(b.template.chartDirective({width:b.otherChart.width,height:b.otherChart.height,namespace:$.length,chartColor:"agentChartColor",xAxisCount:W,showExtraInfo:"false",timeoutMaxCount:V}))(c));R.append(e),x(d,$.length),$.push(e)}function s(){var a=k.open({onopen:function(a){E()},onmessage:function(a){t(a)},onclose:function(a){c.$apply(function(){I()})},ondelay:function(){k.close()},retry:function(){c.retryConnection()}});a&&o()}function t(a){switch(S.hide(),a[b.keys.TYPE]){case b.values.PING:k.send(ga);break;case b.values.RESPONSE:var c=a[b.keys.RESULT];if(c[b.keys.APPLICATION_NAME]!==Z)return;var d=c[b.keys.ACTIVE_THREAD_COUNTS],e=B(d);C(e),u(d,e,c[b.keys.TIME_STAMP])}}function u(a,d,e){var f=Math.max(D(),b["const"].MIN_Y),g=0,h=!0;for(var i in a)w(i,g),a[i][b.keys.CODE]===X?(h=!1,c.$broadcast("realtimeChartDirective.onData."+_[i],a[i][b.keys.STATUS],e,f,h)):c.$broadcast("realtimeChartDirective.onError."+_[i],a[i],e,f),z(g),g++;c.$broadcast("realtimeChartDirective.onData.sum",d,e,f,h),Q.html(g)}function v(a){return ha[b.keys.PARAMETERS][b.keys.APPLICATION_NAME]=a,JSON.stringify(ha)}function w(a,b){q(a)===!1&&(y(b)?x(a,b):r(a)),A(b,a)}function x(a,b){_[a]=b}function y(a){return $.length>a}function z(a){$[a].show()}function A(a,b){$[a].find("div").html(b)}function B(a){var c=[0,0,0,0];for(var d in a)a[d][b.keys.CODE]===X&&jQuery.each(a[d][b.keys.STATUS],function(a,b){c[a]+=b});return c}function C(a){aa.push(a.reduce(function(a,b){return a+b})),aa.length>W&&aa.shift()}function D(){return d3.max(aa,function(a){return a})}function E(){k.send(v(Z))}function F(){k.isOpened()===!1?s():E(),ea=!0}function G(){ea=!1,k.stopReceive(v(""))}function H(){e.$broadcast("realtimeChartDirective.clear.sum"),a.each($,function(a,b){e.$broadcast("realtimeChartDirective.clear."+a),b.hide()})}function I(){S.css("background-color","rgba(200, 200, 200, 0.9)"),S.find("h4").css("color","red").html("Closed connection.

    Select node again."),S.find("button").show(),S.show()}function J(){S.css("background-color","rgba(138, 171, 136, 0.5)"),S.find("h4").css("color","blue").html("Waiting Connection..."),S.find("button").hide(),S.show()}function K(){d.animate({bottom:-fa,left:0},500,function(){T.removeClass("glyphicon-chevron-down").addClass("glyphicon-chevron-up")})}function L(){d.animate({bottom:0,left:0},500,function(){T.removeClass("glyphicon-chevron-up").addClass("glyphicon-chevron-down")})}function M(){d.innerWidth(d.parent().width()-b.css.borderWidth+"px")}function N(){U.css("color",ba?"red":"")}d=a(d);var O,P,Q,R,S,T,U,V=10,W=10,X=0,Y="",Z="",$=[],_={},aa=[0],ba=!0,ca=!1,da=!1,ea=!0,fa=b.css.height,ga=function(){var a={};return a[b.keys.TYPE]=b.values.PONG,JSON.stringify(a)}(),ha=function(){var a={};return a[b.keys.TYPE]=b.values.REQUEST,a[b.keys.COMMAND]=b.values.ACTIVE_THREAD_COUNT,a[b.keys.PARAMETERS]={},a}(),ia=null;m.init("realtime"),c.sumChartColor=["rgba(44, 160, 44, 1)","rgba(60, 129, 250, 1)","rgba(248, 199, 49, 1)","rgba(246, 145, 36, 1)"],c.agentChartColor=["rgba(44, 160, 44, .8)","rgba(60, 129, 250, .8)","rgba(248, 199, 49, .8)","rgba(246, 145, 36, .8)"],c.requestLabelNames=["1s","3s","5s","Slow"],c.bInitialized=!1,a(document).on("visibilitychange",function(){switch(document.visibilityState){case"hidden":ia=g(function(){k.close(),ia=null},6e4);break;case"visible":null!==ia?g.cancel(ia):c.retryConnection(),ia=null}}),n(),c.$on("realtimeChartController.close",function(){K();var a=ea;c.closePopup(),ea=a,N()}),c.$on("realtimeChartController.initialize",function(a,b,d,e){ -if((ba!==!0||Y!==e)&&/^\/main/.test(j.path())!==!1&&(ca=angular.isUndefined(b)?!1:b,d=angular.isUndefined(d)?"":d,Y=e,n(),P.html(Z=d),i.useRealTime!==!1&&ea!==!1)){if(ca===!1)return void K();p(),M(),c.bInitialized=!0,L(),c.closePopup(),P.html(Z=d),J(),F(),N()}}),c.retryConnection=function(){J(),F()},c.pin=function(){ba=!ba,l.send(l.CONST.MAIN,ba?l.CONST.CLK_REALTIME_CHART_PIN_ON:l.CONST.CLK_REALTIME_CHART_PIN_OFF),N()},c.resizePopup=function(){l.send(l.CONST.MAIN,l.CONST.TG_REALTIME_CHART_RESIZE),da?(fa=b.css.height,d.css({height:b.css.height+"px",bottom:"0px"}),R.css("height","150px")):(fa=h.innerHeight-b.css.navbarHeight,d.css({height:fa+"px",bottom:"0px"}),R.css("height",fa-b.css.titleHeight+"px")),da=!da},c.closePopup=function(){G(),H(),S.hide(),P.html(Z=""),Q.html("0")},a(h).on("resize",function(){M()})}])}(jQuery),function(){"use strict";pinpointApp.controller("MainCtrl",["filterConfig","$scope","$timeout","$routeParams","locationService","NavbarVoService","$window","SidebarTitleVoService","filteredMapUtilService","$rootElement","AnalyticsService","PreferenceService",function(a,b,c,d,e,f,g,h,i,j,k,l){k.send(k.CONST.MAIN_PAGE);var m,n,o,p,q,r;b.hasScatter=!1,g.htoScatter={},n=!0,o=!1,b.sidebarLoading=!0,c(function(){m=new f,d.application&&m.setApplication(d.application),d.readablePeriod&&m.setReadablePeriod(d.readablePeriod),d.queryEndDateTime&&m.setQueryEndDateTime(d.queryEndDateTime),m.setCalleeRange(l.getCalleeByApp(d.application)),m.setCallerRange(l.getCallerByApp(d.application)),m.isRealtime()?b.$broadcast("navbarDirective.initialize.realtime.andReload",m):angular.isDefined(d.application)&&angular.isUndefined(d.readablePeriod)?b.$broadcast("navbarDirective.initialize.andReload",m):(g.$routeParams=d,m.autoCalculateByQueryEndDateTimeAndReadablePeriod(),b.$broadcast("navbarDirective.initialize",m),b.$broadcast("scatterDirective.initialize",m),b.$broadcast("serverMapDirective.initialize",m))},500),p=function(){return e.path().split("/")[1]||"main"},q=function(){var a="/"+p()+"/"+m.getApplication()+"/";m.isRealtime()?(a+=m.getPeriodType(),g.$routeParams={application:m.getApplication(),readablePeriod:m.getPeriodType()}):a+=m.getReadablePeriod()+"/"+m.getQueryEndDateTime(),e.path()!==a&&("/main"===e.path()?e.path(a).replace():e.skipReload().path(a).replace(),g.$routeParams={application:m.getApplication(),readablePeriod:m.getReadablePeriod().toString(),queryEndDateTime:m.getQueryEndDateTime().toString()},b.$$phase||b.$apply())},r=function(a,b){var c=i.getFilteredMapUrlWithFilterVo(m,a,b);g.open(c,"")},b.getMainContainerClass=function(){return o?"no-data":""},b.getInfoDetailsClass=function(){var a=[];return b.hasScatter&&a.push("has-scatter"),b.hasFilter&&a.push("has-filter"),a.join(" ")},b.$on("serverMapDirective.hasData",function(a){o=!1,b.sidebarLoading=!1}),b.$on("serverMapDirective.hasNoData",function(a){o=!0,b.sidebarLoading=!1}),b.$on("navbarDirective.changed",function(a,c){o=!1,m=c,q(m),g.htoScatter={},b.hasScatter=!1,b.sidebarLoading=!0,m.isRealtime()&&b.$broadcast("realtimeChartController.close"),b.$broadcast("sidebarTitleDirective.empty.forMain"),b.$broadcast("nodeInfoDetailsDirective.hide"),b.$broadcast("linkInfoDetailsDirective.hide"),b.$broadcast("scatterDirective.initialize",m),b.$broadcast("serverMapDirective.initialize",m),b.$broadcast("sidebarTitleDirective.empty.forMain")}),b.$on("serverMapDirective.passingTransactionResponseToScatterChart",function(a,c){b.$broadcast("scatterDirective.initializeWithNode",c)}),b.$on("serverMapDirective.nodeClicked",function(a,c,d,e,f,g){n=!0;var i=new h;i.setImageType(e.serviceType),e.isWas===!0?(b.hasScatter=!0,i.setTitle(e.applicationName),b.$broadcast("scatterDirective.initializeWithNode",e)):e.unknownNodeGroup?(i.setTitle(e.serviceType.replace("_"," ")),b.hasScatter=!1):(i.setTitle(e.applicationName),b.hasScatter=!1),b.hasFilter=!1,b.$broadcast("sidebarTitleDirective.initialize.forMain",i,e),b.$broadcast("nodeInfoDetailsDirective.initialize",c,d,e,f,m,null,g),b.$broadcast("linkInfoDetailsDirective.hide")}),b.$on("serverMapDirective.linkClicked",function(a,c,d,e,f){n=!1;var g=new h;e.unknownLinkGroup?g.setImageType(e.sourceInfo.serviceType).setTitle("Unknown Group from "+e.sourceInfo.applicationName):g.setImageType(e.sourceInfo.serviceType).setTitle(e.sourceInfo.applicationName).setImageType2(e.targetInfo.serviceType).setTitle2(e.targetInfo.applicationName),b.hasScatter=!1;var j=i.findFilterInNavbarVo(e.sourceInfo.applicationName,e.sourceInfo.serviceType,e.targetInfo.applicationName,e.targetInfo.serviceType,m);j?(b.hasFilter=!0,b.$broadcast("filterInformationDirective.initialize.forMain",j.oServerMapFilterVoService)):b.hasFilter=!1,b.$broadcast("sidebarTitleDirective.initialize.forMain",g),b.$broadcast("nodeInfoDetailsDirective.hide"),b.$broadcast("linkInfoDetailsDirective.initialize",c,d,e,f,m)}),b.$on("serverMapDirective.openFilteredMap",function(a,b,c){r(b,c)}),b.$on("linkInfoDetailsDirective.openFilteredMap",function(a,b,c){r(b,c)}),b.$on("linkInfoDetailsDirective.openFilterWizard",function(a,c,d){b.$broadcast("serverMapDirective.openFilterWizard",c,d)}),b.$on("linkInfoDetailsDirective.ResponseSummary.barClicked",function(a,b){r(b)}),b.$on("linkInfoDetailsDirective.showDetailInformationClicked",function(a,c,d){b.hasScatter=!1;var e=new h;e.setImageType(d.sourceInfo.serviceType).setTitle(d.sourceInfo.applicationName).setImageType2(d.targetInfo.serviceType).setTitle2(d.targetInfo.applicationName),b.$broadcast("sidebarTitleDirective.initialize.forMain",e),b.$broadcast("nodeInfoDetailsDirective.hide")}),b.$on("nodeInfoDetailDirective.showDetailInformationClicked",function(a,c,d){b.hasScatter=!1;var e=new h;e.setImageType(d.serviceType),d.unknownNodeGroup?(e.setTitle(d.serviceType.replace("_"," ")),b.hasScatter=!1):(e.setTitle(d.applicationName),b.hasScatter=!1),b.$broadcast("sidebarTitleDirective.initialize.forMain",e),b.$broadcast("linkInfoDetailsDirective.hide")}),b.loadingOption={hideTip:"init"},b.$watch("loadingOption.hideTip",function(a){if("init"!=a&&g.localStorage){var b=new Date;b.setDate(b.getDate()+30),g.localStorage.setItem("__HIDE_LOADING_TIP",a?b.valueOf():"-")}})}])}(),function(){"use strict";pinpointApp.controller("InspectorCtrl",["$scope","$timeout","$routeParams","locationService","NavbarVoService","AnalyticsService",function(a,b,c,d,e,f){f.send(f.CONST.INSPECTOR_PAGE);var g,h,i,j,k,l;b(function(){g=new e,c.application&&g.setApplication(c.application),c.readablePeriod&&g.setReadablePeriod(c.readablePeriod),c.queryEndDateTime&&g.setQueryEndDateTime(c.queryEndDateTime),c.agentId&&g.setAgentId(c.agentId),g.autoCalculateByQueryEndDateTimeAndReadablePeriod(),a.$emit("navbarDirective.initializeWithStaticApplication",g),a.$emit("agentListDirective.initialize",g)},500),a.$on("navbarDirective.changed",function(a,b){g=b,j()}),a.$on("agentListDirective.agentChanged",function(b,c){h=c,g.setAgentId(c.agentId),l()&&j(),h&&a.$emit("agentInfoDirective.initialize",g,h)}),i=function(){var a=d.path().split("/");return a[1]||"inspector"},j=function(){var b=k();l()&&("/inspector"===d.path()||d.skipReload().path(b).replace(),a.$emit("navbarDirective.initializeWithStaticApplication",g),a.$emit("agentListDirective.initialize",g))},k=function(){var a="/"+i()+"/"+g.getApplication()+"/"+g.getReadablePeriod()+"/"+g.getQueryEndDateTime();return g.getAgentId()&&(a+="/"+g.getAgentId()),a},l=function(){var a=k();return d.path()!==a}}])}(),function(){"use strict";pinpointApp.constant("TransactionListConfig",{applicationUrl:"/transactionmetadata.pinpoint",MAX_FETCH_BLOCK_SIZE:100}),pinpointApp.controller("TransactionListCtrl",["TransactionListConfig","$scope","$location","$routeParams","$rootScope","$timeout","$window","$http","webStorage","TimeSliderVoService","TransactionDaoService","AnalyticsService","helpContentService",function(a,b,c,d,e,f,g,h,i,j,k,l,m){l.send(l.CONST.TRANSACTION_LIST_PAGE);var n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H;f(function(){n=1,o=0,b.transactionDetailUrl="index.html#/transactionDetail",b.sidebarLoading=!0;var a=E(),c=F(),e=!angular.isUndefined(d.transactionInfo);if(e){var h=d.transactionInfo.lastIndexOf("-"),i=d.transactionInfo.lastIndexOf("-",h-1);s=[d.transactionInfo.substring(0,i),d.transactionInfo.substring(i+1,h),d.transactionInfo.substring(h+1)]}a&&c?(p=A(g.name),B(p.applicationName)?(q=C(p),G(e)):H(m.transactionList.openError.noData.replace(/\{\{application\}\}/,p.applicationName))):e===!1?H(m.transactionList.openError.noParent):(p=D(),q=[[s[1],s[2],s[0]]],G(e)),f(function(){$("#main-container").layout({north__minSize:20,north__size:(window.innerHeight-40)/2,center__maskContents:!0})},100)},100),H=function(a){alert(a),g.location.replace(g.location.href.replace("transactionList","main"))},G=function(a){r=new j,r.setTotal(q.length),t(a)},E=function(){return angular.isDefined(g.opener)},F=function(){if(angular.isUndefined(g.opener)||null===g.opener)return!1;var a=g.opener.$routeParams;if(angular.isDefined(d)&&angular.isDefined(a))if("realtime"===a.readablePeriod){if(angular.equals(d.application,a.application))return!0}else if(angular.equals(d.application,a.application)&&angular.equals(d.readablePeriod,a.readablePeriod)&&angular.equals(d.queryEndDateTime,a.queryEndDateTime))return!0;return!1},A=function(a){var b=a.split("|");return 4===b.length?{applicationName:b[0],type:b[1],min:b[2],max:b[3]}:{applicationName:b[0],nXFrom:b[1],nXTo:b[2],nYFrom:b[3],nYTo:b[4]}},D=function(){return{applicationName:d.application.split("@")[0],nXFrom:parseInt(s[1])-1e3,nXTo:parseInt(s[1])+1e3,nYFrom:0,nYTo:0}},B=function(a){return angular.isDefined(g.opener.htoScatter[a])},C=function(a){var b=g.opener.htoScatter[a.applicationName];return a.type?b.getDataByRange(a.type,a.min,a.max):b.getDataByXY(a.nXFrom,a.nXTo,a.nYFrom,a.nYTo)},w=function(a){b.$emit("transactionTableDirective.appendTransactionList",a.metadata)},x=function(){if(!q)return g.alert("Query failed - Query parameter cache deleted.\n\nPossibly due to scatter chart being refreshed."),!1;for(var b=[],c=o,d=0;c0&&b.push("&"),b=b.concat(["I",d,"=",q[c][0]]),b=b.concat(["&T",d,"=",q[c][1]]),b=b.concat(["&R",d,"=",q[c][2]]),o++;return n++,b},u=function(){y(x(),function(c){return 0===c.metadata.length?(b.$emit("timeSliderDirective.disableMore"),b.$emit("timeSliderDirective.changeMoreToDone"),!1):(c.metadata.length1){var c=e.get(0).createElement("img");return c.src="/images/icons/"+b[1]+".png",c.style.height="25px",c.style.paddingRight="3px",c.outerHTML+b[0]}return a.text}function k(){var a=!1;l.select2({placeholder:"Select an application.",searchInputPlaceholder:"Input your application name.",allowClear:!1,formatResult:j,formatSelection:j,escapeMarkup:function(a){return a}}).on("select2-selecting",function(b){a=!0}).on("select2-close",function(b){a===!0&&setTimeout(function(){i(l.select2("val"))},0),a=!1}),m.on("hide.bs.dropdown",function(a){n===!1&&(a.preventDefault(),n=!1)}),m.on("click",function(){n=!1})}d.find("div.general-warning").html(h.configuration.general.warning),d.find("div.favorite-empty").html(h.configuration.general.empty),b.$on("general.configuration.show",function(){}),b.depthList=f.getDepthList(),b.periodTypes=f.getPeriodTypes(),b.caller=f.getCaller(),b.callee=f.getCallee(),b.period=f.getPeriod(),b.savedFavoriteList=f.getFavoriteList();var l=d.find(".applicationList"),m=d.find(".inout-bound"),n=!1;b.changeCaller=function(a){b.caller=a,g.send(g.CONST.MAIN,g.CONST.CLK_GENERAL_SET_DEPTH,b.caller),f.setCaller(b.caller)},b.changeCallee=function(a){b.callee=a,g.send(g.CONST.MAIN,g.CONST.CLK_GENERAL_SET_DEPTH,b.callee),f.setCallee(b.callee)},b.changePeriod=function(){g.send(g.CONST.MAIN,g.CONST.CLK_GENERAL_SET_PERIOD,b.period),f.setPeriod(b.period)},b.removeFavorite=function(a){g.send(g.CONST.MAIN,g.CONST.CLK_GENERAL_SET_FAVORITE),f.removeFavorite(a),b.savedFavoriteList=f.getFavoriteList(),c.$broadcast("navbarDirective.changedFavorite")},b.closeInOut=function(){n=!0,m.trigger("click.bs.dropdown")},b.$on("configuration.general.applications.set",function(a,c){b.applications=c,k()}),b.$on("configuration.general.initClose",function(){b.closeInOut()})}])}(jQuery),function(a){"use strict";pinpointApp.directive("alarmUserGroupDirective",["$rootScope","$timeout","helpContentService","AlarmUtilService","AlarmBroadcastService","AnalyticsService",function(f,g,h,i,j,k){return{restrict:"EA",replace:!0,templateUrl:"features/configuration/alarm/alarmUserGroup.html?v="+G_BUILD_TIME,scope:!0,link:function(f,g){function h(a){i.show(z),i.sendCRUD("getUserGroupList",a,function(a){v=f.userGroupList=a,i.setTotal(x,v.length),j.sendSelectionEmpty(),u===!1&&j.sendLoadPinpointUser(),u=!0,i.hide(z)},p)}function l(a){a.find(b.DIV_NORMAL).hasClass("hide-me")||(o(),m(i.extractID(a)),j.sendReloadWithUserGroupID(a.find(".contents").html()))}function m(b){a("#"+f.prefix+s).removeClass("selected"),a("#"+f.prefix+b).addClass("selected"),s=b}function n(a){return i.extractID(t)===i.extractID(a)}function o(){c.cancelAction(i,A),e.cancelAction(i,t),d.cancelAction(i,t)}function p(a){y.find(".message").html(a.errorMessage),i.hide(z),i.show(y)}function q(){c.applyAction(i,A,z,function(a,b){v.push({id:b,number:a.number}),f.userGroupList=v,i.setTotal(x,v.length)},p)}function r(){e.applyAction(i,t,z,function(a,b){return i.hasDuplicateItem(v,function(c){return c.number!=a&&c.id==b||c.number==a&&c.id==b})},function(a,b){k.send(k.CONST.MAIN,k.CONST.CLK_ALARM_CREATE_USER_GROUP);for(var c=0;c0}function n(a){i.show(u),i.sendCRUD("getGroupMemberListInGroup",{userGroupId:w},function(a){y=a,e.groupMemberList=y,i.setTotal(t,y.length),i.hide(u),j.sendGroupMemberLoaded(y)},h)}function o(a){return i.extractID(x)===i.extractID(a)}function p(a){for(var b=0;b=0;c++,d--)a[c]=y[d];y=a,e.groupMemberList=y}},e.onCloseAlert=function(){i.closeAlert(v,u)},e.canSort=function(){return""===w?"0.5":"1.0"},e.$on("alarmGroupMember.configuration.load",function(a,b,c){w=b,g(),l(),i.hide(s),n(c)}),e.$on("alarmGroupMember.configuration.selectNone",function(){w="",l(),i.show(s)}),e.$on("alarmGroupMember.configuration.addUser",function(a,d){return""===w?void j.sendCallbackAddedUser(!1):(g(),void c.applyAction(i,d,w,u,m,function(a){k.send(k.CONST.MAIN,k.CONST.CLK_ALARM_ADD_USER),y.push({name:a.name,memberId:a.userId,department:a.department,userGroupId:w}),e.groupMemberList=y,j.sendCallbackAddedUser(!0),i.setTotal(t,y.length),i.hide(u)},function(){h({message:b.EXIST_A_SAME}),j.sendCallbackAddedUser(!0)}))}),e.$on("alarmGroupMember.configuration.updateUser",function(a,b){m(b.userId)&&(g(),q(b))}),e.$on("alarmGroupMember.configuration.removeUser",function(a,b){m(b)&&(g(),p(b))})}}}]);var b={EXIST_A_SAME:"Exist a same user in the lists.",DIV_NORMAL:"div._normal",DIV_EDIT:"div._edit",DIV_REMOVE:"div._remove"},c={applyAction:function(a,b,c,d,e,f,g){a.show(d),e(b.userId)===!0?g():a.sendCRUD("addMemberInGroup",{userGroupId:c,memberId:b.userId},function(c){f(b),a.hide(d)},function(a){g(a)})}},d={_bIng:!1,onAction:function(a,c){this._bIng=!0,c.addClass("remove"),a.hide(c.find(b.DIV_NORMAL)),a.show(c.find(b.DIV_REMOVE))},cancelAction:function(a,c){this._bIng===!0&&(c.removeClass("remove"),a.hide(c.find(b.DIV_REMOVE)),a.show(c.find(b.DIV_NORMAL)),this._bIng=!1)},applyAction:function(a,b,c,d,e,f){a.show(d);var g=this,h=a.extractID(c);a.sendCRUD("removeMemberInGroup",{userGroupId:b,memberId:h},function(b){e(h),g.cancelAction(a,c),a.hide(d)},function(a){f(a)})}}}(jQuery),function(a){"use strict";function b(a){var b=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;return b.test(a)}function c(a){var b=/^\d+$/;return b.test(a)}function d(b){a.each(b,function(a,b){b.addClass("blink-blink")})}function e(b){a.each(b,function(a,b){b.removeClass("blink-blink")})}pinpointApp.directive("alarmPinpointUserDirective",["$rootScope","$timeout","helpContentTemplate","helpContentService","AlarmUtilService","AlarmBroadcastService","AnalyticsService","globalConfig",function(b,c,d,e,j,k,l,m){return{restrict:"EA",replace:!0,templateUrl:"features/configuration/alarm/alarmPinpointUser.html?v="+G_BUILD_TIME,scope:!0,link:function(b,c){function d(){g.cancelAction(F,s),h.cancelAction(j,E),i.cancelAction(j,F,E,s)}function e(a){C.find(".message").html(a.errorMessage),j.hide(B),j.show(C)}function n(c){j.show(B),j.sendCRUD("getPinpointUserList",c||{},function(c){a.each(c,function(a,b){b.has=!1}),H=b.pinpointUserList=c,j.setTotal(A,o()),j.hide(B)},e)}function o(){return I.length+"/"+H.length}function p(a){for(var b=0;b=0;d--)b.prepend(F[d]);F[0].find("input").removeAttr("disabled"),j.hide(F[c].find(f.DIV_EDIT)),j.show(F[c].find(f.DIV_ADD)),a.each(F,function(a,b){j.show(b)}),F[0].find("input").focus()}function r(b){for(var c=F.length-1,d=c;d>=0;d--)E.after(F[d]);F[0].find("input").val(b.userId),F[1].find("input").val(b.name),F[2].find("input").val(b.department),F[3].find("input").val(b.phoneNumber),F[4].find("input").val(b.email),F[0].find("input").attr("disabled","disabled"),j.hide(F[c].find(f.DIV_ADD)),j.show(F[c].find(f.DIV_EDIT)),a.each(F,function(a,b){j.show(b)}),F[0].find("input").focus()}function s(){a.each(F,function(a,b){j.hide(b),b.find("input").val("")})}function t(){var b=a.trim(F[0].find("input").val()),c=a.trim(F[1].find("input").val()),d=a.trim(F[2].find("input").val()),e=a.trim(F[3].find("input").val()),f=a.trim(F[4].find("input").val()),g={userId:b,name:c,department:d,phoneNumber:e,email:f};return g}function u(a){return j.extractID(E)===j.extractID(a)}function v(a){for(var b=0;b1||i.sendCRUD("getRuleSet",{},function(b){a.each(b,function(a,b){f.ruleSets.push({text:b})}),r()},m)}function p(a){if(!a.id)return a.text;var b=a.text.split("@");if(b.length>1){var c=g.get(0).createElement("img");return c.src="/images/icons/"+b[1]+".png",c.style.height="25px",c.style.paddingRight="3px",c.outerHTML+b[0]}return a.text}function q(){x.find("select[name=application]").select2({placeholder:"Select an application.",searchInputPlaceholder:"Input your application name.",allowClear:!1,formatResult:p,formatSelection:p,escapeMarkup:function(a){return a}}).on("change",function(a){})}function r(){x.find("select[name=rule]").select2({searchInputPlaceholder:"Input your rule name.",placeholder:"Select an rule.",allowClear:!1,formatResult:p,formatSelection:p,escapeMarkup:function(a){return a}}).on("change",function(a){})}function s(){z.find("tbody").prepend(C[1]).prepend(C[0]),i.hide(C[0].find(b.DIV_EDIT)),i.show(C[0].find(b.DIV_ADD)),a.each(C,function(a,b){i.show(b)})}function t(c){i.hide(C[0].find(b.DIV_ADD)),i.show(C[0].find(b.DIV_EDIT)),C[0].find("select[name=application]").select2("val",c.applicationId+"@"+c.serviceType),C[0].find("select[name=rule]").select2("val",c.checkerName),C[0].find("input[name=threshold]").val(c.threshold),C[0].find("select[name=type]").val(function(){return c.smsSend&&c.emailSend?"all":c.smsSend?"sms":c.emailSend?"email":""}()),C[1].find("input").val(c.notes),a.each(C,function(a,b){i.show(b)})}function u(){a.each(C,function(a,b){i.hide(b)}),C[0].find("select[name=application]").select2("val",""),C[0].find("select[name=rule]").select2("val",""),C[0].find("input[name=threshold]").val("1"),C[0].find("select[name=type]").val("all"),C[1].find("input").val("")}function v(a){var b=C[0].find("select[name=application]").select2("data"),c=C[0].find("select[name=rule]").select2("data"),d=null===b||void 0===b?["",""]:b.id.split("@");c=null===c||void 0===c?"":c.id;var e=(C[0].find("select[name=application]").select2("val").split("@"),C[0].find("select[name=type]").val()),f={applicationId:d[0],serviceType:d[1],userGroupId:F,checkerName:c,threshold:C[0].find("input[name=threshold]").val(),smsSend:"all"===e||"sms"===e,emailSend:"all"===e||"email"===e,notes:C[1].find("input").val()};return angular.isUndefined(a)===!1&&(f.ruleId=a),f}function w(a){for(var b=0;b
',chartDirective:Handlebars.compile('')},css:{borderWidth:2,height:180,navbarHeight:70,titleHeight:30},sumChart:{width:260,height:120},otherChart:{width:120,height:60},"const":{MIN_Y:10}}),pinpointApp.controller("RealtimeChartCtrl",["RealtimeChartCtrlConfig","$scope","$element","$rootScope","$compile","$timeout","$window","globalConfig","$location","RealtimeWebsocketService","AnalyticsService","TooltipService",function(b,c,d,e,f,g,h,i,j,k,l,m){function n(){O=d.find("div.agent-sum-chart"),P=d.find("div.agent-sum-chart div:first-child span:first-child"),Q=d.find("div.agent-sum-chart div:first-child span:last-child"),R=d.find("div.agent-chart-list"),S=d.find(".connection-message"),T=d.find(".handle .glyphicon"),U=d.find(".glyphicon-pushpin"),S.hide(),P.html(""),Q.html("0")}function o(){q("sum")===!1&&(O.append(f(b.template.chartDirective({width:b.sumChart.width,height:b.sumChart.height,namespace:"sum",chartColor:"sumChartColor",xAxisCount:W,showExtraInfo:"true",timeoutMaxCount:V}))(c)),_.sum=-1)}function p(){angular.isDefined(_.sum)?(_={},_.sum=-1):_={}}function q(a){return angular.isDefined(_[a])}function r(d){var e=a(b.template.agentChart).append(f(b.template.chartDirective({width:b.otherChart.width,height:b.otherChart.height,namespace:$.length,chartColor:"agentChartColor",xAxisCount:W,showExtraInfo:"false",timeoutMaxCount:V}))(c));R.append(e),x(d,$.length),$.push(e)}function s(){var a=k.open({onopen:function(a){E()},onmessage:function(a){t(a)},onclose:function(a){c.$apply(function(){I()})},ondelay:function(){k.close()},retry:function(){c.retryConnection()}});a&&o()}function t(a){switch(S.hide(),a[b.keys.TYPE]){case b.values.PING:k.send(ga);break;case b.values.RESPONSE:var c=a[b.keys.RESULT];if(c[b.keys.APPLICATION_NAME]!==Z)return;var d=c[b.keys.ACTIVE_THREAD_COUNTS],e=B(d);C(e),u(d,e,c[b.keys.TIME_STAMP])}}function u(a,d,e){var f=Math.max(D(),b["const"].MIN_Y),g=0,h=!0;for(var i in a)w(i,g),a[i][b.keys.CODE]===X?(h=!1,c.$broadcast("realtimeChartDirective.onData."+_[i],a[i][b.keys.STATUS],e,f,h)):c.$broadcast("realtimeChartDirective.onError."+_[i],a[i],e,f),z(g),g++;c.$broadcast("realtimeChartDirective.onData.sum",d,e,f,h),Q.html(g)}function v(a){return ha[b.keys.PARAMETERS][b.keys.APPLICATION_NAME]=a,JSON.stringify(ha)}function w(a,b){q(a)===!1&&(y(b)?x(a,b):r(a)),A(b,a)}function x(a,b){_[a]=b}function y(a){return $.length>a}function z(a){$[a].show()}function A(a,b){$[a].find("div").html(b)}function B(a){var c=[0,0,0,0];for(var d in a)a[d][b.keys.CODE]===X&&jQuery.each(a[d][b.keys.STATUS],function(a,b){c[a]+=b});return c}function C(a){aa.push(a.reduce(function(a,b){return a+b})),aa.length>W&&aa.shift()}function D(){return d3.max(aa,function(a){return a})}function E(){k.send(v(Z))}function F(){k.isOpened()===!1?s():E(),ea=!0}function G(){ea=!1,k.stopReceive(v(""))}function H(){e.$broadcast("realtimeChartDirective.clear.sum"),a.each($,function(a,b){e.$broadcast("realtimeChartDirective.clear."+a),b.hide()})}function I(){S.css("background-color","rgba(200, 200, 200, 0.9)"),S.find("h4").css("color","red").html("Closed connection.

Select node again."),S.find("button").show(),S.show()}function J(){S.css("background-color","rgba(138, 171, 136, 0.5)"),S.find("h4").css("color","blue").html("Waiting Connection..."),S.find("button").hide(),S.show()}function K(){d.animate({bottom:-fa,left:0},500,function(){T.removeClass("glyphicon-chevron-down").addClass("glyphicon-chevron-up"); +})}function L(){d.animate({bottom:0,left:0},500,function(){T.removeClass("glyphicon-chevron-up").addClass("glyphicon-chevron-down")})}function M(){d.innerWidth(d.parent().width()-b.css.borderWidth+"px")}function N(){U.css("color",ba?"red":"")}d=a(d);var O,P,Q,R,S,T,U,V=10,W=10,X=0,Y="",Z="",$=[],_={},aa=[0],ba=!0,ca=!1,da=!1,ea=!0,fa=b.css.height,ga=function(){var a={};return a[b.keys.TYPE]=b.values.PONG,JSON.stringify(a)}(),ha=function(){var a={};return a[b.keys.TYPE]=b.values.REQUEST,a[b.keys.COMMAND]=b.values.ACTIVE_THREAD_COUNT,a[b.keys.PARAMETERS]={},a}(),ia=null;m.init("realtime"),c.sumChartColor=["rgba(44, 160, 44, 1)","rgba(60, 129, 250, 1)","rgba(248, 199, 49, 1)","rgba(246, 145, 36, 1)"],c.agentChartColor=["rgba(44, 160, 44, .8)","rgba(60, 129, 250, .8)","rgba(248, 199, 49, .8)","rgba(246, 145, 36, .8)"],c.requestLabelNames=["1s","3s","5s","Slow"],c.bInitialized=!1,a(document).on("visibilitychange",function(){switch(document.visibilityState){case"hidden":ia=g(function(){k.close(),ia=null},6e4);break;case"visible":null!==ia?g.cancel(ia):c.retryConnection(),ia=null}}),n(),c.$on("realtimeChartController.close",function(){K();var a=ea;c.closePopup(),ea=a,N()}),c.$on("realtimeChartController.initialize",function(a,b,d,e){if((ba!==!0||Y!==e)&&/^\/main/.test(j.path())!==!1&&(ca=angular.isUndefined(b)?!1:b,d=angular.isUndefined(d)?"":d,Y=e,n(),P.html(Z=d),i.useRealTime!==!1&&ea!==!1)){if(ca===!1)return void K();p(),M(),c.bInitialized=!0,L(),c.closePopup(),P.html(Z=d),J(),F(),N()}}),c.retryConnection=function(){J(),F()},c.pin=function(){ba=!ba,l.send(l.CONST.MAIN,ba?l.CONST.CLK_REALTIME_CHART_PIN_ON:l.CONST.CLK_REALTIME_CHART_PIN_OFF),N()},c.resizePopup=function(){l.send(l.CONST.MAIN,l.CONST.TG_REALTIME_CHART_RESIZE),da?(fa=b.css.height,d.css({height:b.css.height+"px",bottom:"0px"}),R.css("height","150px")):(fa=h.innerHeight-b.css.navbarHeight,d.css({height:fa+"px",bottom:"0px"}),R.css("height",fa-b.css.titleHeight+"px")),da=!da},c.closePopup=function(){G(),H(),S.hide(),P.html(Z=""),Q.html("0")},a(h).on("resize",function(){M()})}])}(jQuery),function(){"use strict";pinpointApp.controller("MainCtrl",["filterConfig","$scope","$timeout","$routeParams","locationService","NavbarVoService","$window","SidebarTitleVoService","filteredMapUtilService","$rootElement","AnalyticsService","PreferenceService",function(a,b,c,d,e,f,g,h,i,j,k,l){k.send(k.CONST.MAIN_PAGE);var m,n,o,p,q,r;b.hasScatter=!1,g.htoScatter={},n=!0,o=!1,b.sidebarLoading=!0,c(function(){m=new f,d.application&&m.setApplication(d.application),d.readablePeriod&&m.setReadablePeriod(d.readablePeriod),d.queryEndDateTime&&m.setQueryEndDateTime(d.queryEndDateTime),m.setCalleeRange(l.getCalleeByApp(d.application)),m.setCallerRange(l.getCallerByApp(d.application)),m.isRealtime()?b.$broadcast("navbarDirective.initialize.realtime.andReload",m):angular.isDefined(d.application)&&angular.isUndefined(d.readablePeriod)?b.$broadcast("navbarDirective.initialize.andReload",m):(g.$routeParams=d,m.autoCalculateByQueryEndDateTimeAndReadablePeriod(),b.$broadcast("navbarDirective.initialize",m),b.$broadcast("scatterDirective.initialize",m),b.$broadcast("serverMapDirective.initialize",m))},500),p=function(){return e.path().split("/")[1]||"main"},q=function(){var a="/"+p()+"/"+m.getApplication()+"/";m.isRealtime()?(a+=m.getPeriodType(),g.$routeParams={application:m.getApplication(),readablePeriod:m.getPeriodType()}):a+=m.getReadablePeriod()+"/"+m.getQueryEndDateTime(),e.path()!==a&&("/main"===e.path()?e.path(a).replace():e.skipReload().path(a).replace(),g.$routeParams={application:m.getApplication(),readablePeriod:m.getReadablePeriod().toString(),queryEndDateTime:m.getQueryEndDateTime().toString()},b.$$phase||b.$apply())},r=function(a,b){var c=i.getFilteredMapUrlWithFilterVo(m,a,b);g.open(c,"")},b.getMainContainerClass=function(){return o?"no-data":""},b.getInfoDetailsClass=function(){var a=[];return b.hasScatter&&a.push("has-scatter"),b.hasFilter&&a.push("has-filter"),a.join(" ")},b.$on("serverMapDirective.hasData",function(a){o=!1,b.sidebarLoading=!1}),b.$on("serverMapDirective.hasNoData",function(a){o=!0,b.sidebarLoading=!1}),b.$on("navbarDirective.changed",function(a,c){o=!1,m=c,q(m),g.htoScatter={},b.hasScatter=!1,b.sidebarLoading=!0,m.isRealtime()&&b.$broadcast("realtimeChartController.close"),b.$broadcast("sidebarTitleDirective.empty.forMain"),b.$broadcast("nodeInfoDetailsDirective.hide"),b.$broadcast("linkInfoDetailsDirective.hide"),b.$broadcast("scatterDirective.initialize",m),b.$broadcast("serverMapDirective.initialize",m),b.$broadcast("sidebarTitleDirective.empty.forMain")}),b.$on("serverMapDirective.passingTransactionResponseToScatterChart",function(a,c){b.$broadcast("scatterDirective.initializeWithNode",c)}),b.$on("serverMapDirective.nodeClicked",function(a,c,d,e,f,g){n=!0;var i=new h;i.setImageType(e.serviceType),e.isWas===!0?(b.hasScatter=!0,i.setTitle(e.applicationName),b.$broadcast("scatterDirective.initializeWithNode",e)):e.unknownNodeGroup?(i.setTitle(e.serviceType.replace("_"," ")),b.hasScatter=!1):(i.setTitle(e.applicationName),b.hasScatter=!1),b.hasFilter=!1,b.$broadcast("sidebarTitleDirective.initialize.forMain",i,e),b.$broadcast("nodeInfoDetailsDirective.initialize",c,d,e,f,m,null,g),b.$broadcast("linkInfoDetailsDirective.hide")}),b.$on("serverMapDirective.linkClicked",function(a,c,d,e,f){n=!1;var g=new h;e.unknownLinkGroup?g.setImageType(e.sourceInfo.serviceType).setTitle("Unknown Group from "+e.sourceInfo.applicationName):g.setImageType(e.sourceInfo.serviceType).setTitle(e.sourceInfo.applicationName).setImageType2(e.targetInfo.serviceType).setTitle2(e.targetInfo.applicationName),b.hasScatter=!1;var j=i.findFilterInNavbarVo(e.sourceInfo.applicationName,e.sourceInfo.serviceType,e.targetInfo.applicationName,e.targetInfo.serviceType,m);j?(b.hasFilter=!0,b.$broadcast("filterInformationDirective.initialize.forMain",j.oServerMapFilterVoService)):b.hasFilter=!1,b.$broadcast("sidebarTitleDirective.initialize.forMain",g),b.$broadcast("nodeInfoDetailsDirective.hide"),b.$broadcast("linkInfoDetailsDirective.initialize",c,d,e,f,m)}),b.$on("serverMapDirective.openFilteredMap",function(a,b,c){r(b,c)}),b.$on("linkInfoDetailsDirective.openFilteredMap",function(a,b,c){r(b,c)}),b.$on("linkInfoDetailsDirective.openFilterWizard",function(a,c,d){b.$broadcast("serverMapDirective.openFilterWizard",c,d)}),b.$on("linkInfoDetailsDirective.ResponseSummary.barClicked",function(a,b){r(b)}),b.$on("linkInfoDetailsDirective.showDetailInformationClicked",function(a,c,d){b.hasScatter=!1;var e=new h;e.setImageType(d.sourceInfo.serviceType).setTitle(d.sourceInfo.applicationName).setImageType2(d.targetInfo.serviceType).setTitle2(d.targetInfo.applicationName),b.$broadcast("sidebarTitleDirective.initialize.forMain",e),b.$broadcast("nodeInfoDetailsDirective.hide")}),b.$on("nodeInfoDetailDirective.showDetailInformationClicked",function(a,c,d){b.hasScatter=!1;var e=new h;e.setImageType(d.serviceType),d.unknownNodeGroup?(e.setTitle(d.serviceType.replace("_"," ")),b.hasScatter=!1):(e.setTitle(d.applicationName),b.hasScatter=!1),b.$broadcast("sidebarTitleDirective.initialize.forMain",e),b.$broadcast("linkInfoDetailsDirective.hide")}),b.loadingOption={hideTip:"init"},b.$watch("loadingOption.hideTip",function(a){if("init"!=a&&g.localStorage){var b=new Date;b.setDate(b.getDate()+30),g.localStorage.setItem("__HIDE_LOADING_TIP",a?b.valueOf():"-")}})}])}(),function(){"use strict";pinpointApp.controller("InspectorCtrl",["$scope","$timeout","$routeParams","locationService","NavbarVoService","AnalyticsService",function(a,b,c,d,e,f){f.send(f.CONST.INSPECTOR_PAGE);var g,h,i,j,k,l;b(function(){g=new e,c.application&&g.setApplication(c.application),c.readablePeriod&&g.setReadablePeriod(c.readablePeriod),c.queryEndDateTime&&g.setQueryEndDateTime(c.queryEndDateTime),c.agentId&&g.setAgentId(c.agentId),g.autoCalculateByQueryEndDateTimeAndReadablePeriod(),a.$emit("navbarDirective.initializeWithStaticApplication",g),a.$emit("agentListDirective.initialize",g)},500),a.$on("navbarDirective.changed",function(a,b){g=b,j()}),a.$on("agentListDirective.agentChanged",function(b,c){h=c,g.setAgentId(c.agentId),l()&&j(),h&&a.$emit("agentInfoDirective.initialize",g,h)}),i=function(){var a=d.path().split("/");return a[1]||"inspector"},j=function(){var b=k();l()&&("/inspector"===d.path()||d.skipReload().path(b).replace(),a.$emit("navbarDirective.initializeWithStaticApplication",g),a.$emit("agentListDirective.initialize",g))},k=function(){var a="/"+i()+"/"+g.getApplication()+"/"+g.getReadablePeriod()+"/"+g.getQueryEndDateTime();return g.getAgentId()&&(a+="/"+g.getAgentId()),a},l=function(){var a=k();return d.path()!==a}}])}(),function(){"use strict";pinpointApp.constant("TransactionListConfig",{applicationUrl:"/transactionmetadata.pinpoint",MAX_FETCH_BLOCK_SIZE:100}),pinpointApp.controller("TransactionListCtrl",["TransactionListConfig","$scope","$location","$routeParams","$rootScope","$timeout","$window","$http","webStorage","TimeSliderVoService","TransactionDaoService","AnalyticsService","helpContentService",function(a,b,c,d,e,f,g,h,i,j,k,l,m){l.send(l.CONST.TRANSACTION_LIST_PAGE);var n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H;f(function(){n=1,o=0,b.transactionDetailUrl="index.html#/transactionDetail",b.sidebarLoading=!0;var a=E(),c=F(),e=!angular.isUndefined(d.transactionInfo);if(e){var h=d.transactionInfo.lastIndexOf("-"),i=d.transactionInfo.lastIndexOf("-",h-1);s=[d.transactionInfo.substring(0,i),d.transactionInfo.substring(i+1,h),d.transactionInfo.substring(h+1)]}a&&c?(p=A(g.name),B(p.applicationName)?(q=C(p),G(e)):H(m.transactionList.openError.noData.replace(/\{\{application\}\}/,p.applicationName))):e===!1?H(m.transactionList.openError.noParent):(p=D(),q=[[s[1],s[2],s[0]]],G(e)),f(function(){$("#main-container").layout({north__minSize:20,north__size:(window.innerHeight-40)/2,center__maskContents:!0})},100)},100),H=function(a){alert(a),g.location.replace(g.location.href.replace("transactionList","main"))},G=function(a){r=new j,r.setTotal(q.length),t(a)},E=function(){return angular.isDefined(g.opener)},F=function(){if(angular.isUndefined(g.opener)||null===g.opener)return!1;var a=g.opener.$routeParams;if(angular.isDefined(d)&&angular.isDefined(a))if("realtime"===a.readablePeriod){if(angular.equals(d.application,a.application))return!0}else if(angular.equals(d.application,a.application)&&angular.equals(d.readablePeriod,a.readablePeriod)&&angular.equals(d.queryEndDateTime,a.queryEndDateTime))return!0;return!1},A=function(a){var b=a.split("|");return 4===b.length?{applicationName:b[0],type:b[1],min:b[2],max:b[3]}:{applicationName:b[0],nXFrom:b[1],nXTo:b[2],nYFrom:b[3],nYTo:b[4]}},D=function(){return{applicationName:d.application.split("@")[0],nXFrom:parseInt(s[1])-1e3,nXTo:parseInt(s[1])+1e3,nYFrom:0,nYTo:0}},B=function(a){return angular.isDefined(g.opener.htoScatter[a])},C=function(a){var b=g.opener.htoScatter[a.applicationName];return a.type?b.getDataByRange(a.type,a.min,a.max):b.getDataByXY(a.nXFrom,a.nXTo,a.nYFrom,a.nYTo)},w=function(a){b.$emit("transactionTableDirective.appendTransactionList",a.metadata)},x=function(){if(!q)return g.alert("Query failed - Query parameter cache deleted.\n\nPossibly due to scatter chart being refreshed."),!1;for(var b=[],c=o,d=0;c0&&b.push("&"),b=b.concat(["I",d,"=",q[c][0]]),b=b.concat(["&T",d,"=",q[c][1]]),b=b.concat(["&R",d,"=",q[c][2]]),o++;return n++,b},u=function(){y(x(),function(c){return 0===c.metadata.length?(b.$emit("timeSliderDirective.disableMore"),b.$emit("timeSliderDirective.changeMoreToDone"),!1):(c.metadata.length