diff --git a/web/src/main/webapp/common/services/alarm-util.service.js b/web/src/main/webapp/common/services/alarm-util.service.js index 28ff734c7c3c..a9ee8f1a1ea0 100644 --- a/web/src/main/webapp/common/services/alarm-util.service.js +++ b/web/src/main/webapp/common/services/alarm-util.service.js @@ -1,70 +1,67 @@ (function($) { 'use strict'; - - /** - * (en) Alarm 설정의 공통된 리스트 구현 코드를 공유함. - * @ko Alarm 설정의 공통된 리스트 구현 코드를 공유함. - * @group Service - * @name AlarmUtilService - * @class - */ + pinpointApp.constant('AlarmUtilServiceConfig', { "hideClass": "hide-me" }); - pinpointApp.service( "AlarmUtilService", [ "AlarmUtilServiceConfig", "$timeout", "AlarmAjaxService", "SystemConfigurationService", function ( $config, $timeout, $ajaxService, SystemConfigService ) { - var self = this; - this.show = function( $el ) { - $el.removeClass( $config.hideClass ); - }; - this.hide = function() { - for( var i = 0 ; i < arguments.length ; i++ ) { - arguments[i].addClass( $config.hideClass ); - } - }; - this.sendCRUD = function( funcName, data, successCallback, failCallback ) { - if ( ( angular.isUndefined( data ) || data === "" ) ) { - data = { - "userId" : ( SystemConfigService.get("userId") || "" ) - }; - } + pinpointApp.service( "AlarmUtilService", [ "AlarmUtilServiceConfig", "$timeout", "AlarmAjaxService", "SystemConfigurationService", + function ( $config, $timeout, $ajaxService, SystemConfigService ) { + var self = this; + this.show = function( $el ) { + $el.removeClass( $config.hideClass ); + }; + this.hide = function() { + for( var i = 0 ; i < arguments.length ; i++ ) { + arguments[i].addClass( $config.hideClass ); + } + }; + this.sendCRUD = function( funcName, data, successCallback, failCallback ) { + if ( ( angular.isUndefined( data ) || data === "" ) ) { + SystemConfigService.getConfig().then(function(config) { + data = { + "userId" : ( config["userId"] || "" ) + }; + }); + } - $timeout(function() { - $ajaxService[funcName](data, function (resultData) { - if (resultData.errorCode || resultData.status) { - failCallback(resultData); - } else { - successCallback(resultData); - } + $timeout(function() { + $ajaxService[funcName](data, function (resultData) { + if (resultData.errorCode || resultData.status) { + failCallback(resultData); + } else { + successCallback(resultData); + } + }); }); - }); - }; - this.setTotal = function( $elTotal, n ) { - $elTotal.html( "(" + n + ")"); - }; - this.hasDuplicateItem = function( list, func ) { - var len = list.length; - var has = false; - for( var i = 0 ; i < len ; i++ ) { - if ( func( list[i] ) ) { - has = true; - break; + }; + this.setTotal = function( $elTotal, n ) { + $elTotal.html( "(" + n + ")"); + }; + this.hasDuplicateItem = function( list, func ) { + var len = list.length; + var has = false; + for( var i = 0 ; i < len ; i++ ) { + if ( func( list[i] ) ) { + has = true; + break; + } } - } - return has; - }; - this.closeAlert = function( $elAlert, $elLoading ) { - $elAlert.animate({ - height: 50, - }, 100, function() { - self.hide( $elAlert, $elLoading ); - }); - }; - this.extractID = function( $el ) { - return $el.prop("id").split("_")[1]; - }; - this.getNode = function( $event, tagName ) { - return $( $event.toElement || $event.target ).parents( tagName ); - }; - }]); + return has; + }; + this.closeAlert = function( $elAlert, $elLoading ) { + $elAlert.animate({ + height: 50 + }, 100, function() { + self.hide( $elAlert, $elLoading ); + }); + }; + this.extractID = function( $el ) { + return $el.prop("id").split("_")[1]; + }; + this.getNode = function( $event, tagName ) { + return $( $event.toElement || $event.target ).parents( tagName ); + }; + } + ]); })(jQuery); \ No newline at end of file diff --git a/web/src/main/webapp/common/services/analytics.service.js b/web/src/main/webapp/common/services/analytics.service.js index 6cf93dd8c2c2..9ee8db2c9faf 100644 --- a/web/src/main/webapp/common/services/analytics.service.js +++ b/web/src/main/webapp/common/services/analytics.service.js @@ -13,12 +13,17 @@ this.send = function( category, name, label, count, options ) { if ( typeof ga !== "undefined" ) { - if (SystemConfigService.get("sendUsage") !== true) return; - if (arguments.length == 1) { - ga("send", "pageview", arguments[0]); - } else { - ga("send", "event", category, name, label, count, options); - } + SystemConfigService.getConfig().then(function(config) { + console.log( "analytics - sendUsage : ", config["sendUsage"] ); + if ( config["sendUsage"] !== true ) { + return; + } + if (arguments.length == 1) { + ga("send", "pageview", arguments[0]); + } else { + ga("send", "event", category, name, label, count, options); + } + }); } }; this.sendMain = function( name, label, count, options ) { diff --git a/web/src/main/webapp/common/services/system-configuration.service.js b/web/src/main/webapp/common/services/system-configuration.service.js index 9b1b01878698..1e4224dd0297 100644 --- a/web/src/main/webapp/common/services/system-configuration.service.js +++ b/web/src/main/webapp/common/services/system-configuration.service.js @@ -5,17 +5,13 @@ }); pinpointApp.service( "SystemConfigurationService", [ "SystemConfigurationServiceConfig", "$http", function( cfg, $http ) { - var oConfig = {}; this.getConfig = function() { return $http.get( cfg.URL ).then(function(result) { if ( result.data.showApplicationStat !== true ) { result.data.showApplicationStat = false; } - return oConfig = result.data; + return result.data; }); }; - this.get = function( type ) { - return oConfig[type]; - }; }]); })( jQuery ); \ No newline at end of file diff --git a/web/src/main/webapp/features/agentInfo/agent-info.directive.js b/web/src/main/webapp/features/agentInfo/agent-info.directive.js index 6472123c1f39..d655ebaa6c86 100644 --- a/web/src/main/webapp/features/agentInfo/agent-info.directive.js +++ b/web/src/main/webapp/features/agentInfo/agent-info.directive.js @@ -3,8 +3,8 @@ ID: "AGENT_INFO_DRTV_" }); - pinpointApp.directive( "agentInfoDirective", [ "agentInfoDirectiveConfig", "$sce", "$timeout", "SystemConfigurationService", "CommonUtilService", "UrlVoService", "AlertsService", "ProgressBarService", "AgentDaoService", "ResponseTimeChartDaoService", "ActiveThreadChartDaoService", "TPSChartDaoService", "CPULoadChartDaoService", "MemoryChartDaoService", "AgentAjaxService", "TooltipService", "AnalyticsService", "helpContentService", - function ( cfg, $sce, $timeout, SystemConfigService, CommonUtilService, UrlVoService, AlertsService, ProgressBarService, AgentDaoService, ResponseTimeChartDaoService, ActiveThreadChartDaoService, TPSChartDaoService, CPULoadChartDaoService, MemoryChartDaoService, AgentAjaxService, TooltipService, AnalyticsService, helpContentService ) { + pinpointApp.directive( "agentInfoDirective", [ "agentInfoDirectiveConfig", "$sce", "$timeout", "CommonUtilService", "UrlVoService", "AlertsService", "ProgressBarService", "AgentDaoService", "ResponseTimeChartDaoService", "ActiveThreadChartDaoService", "TPSChartDaoService", "CPULoadChartDaoService", "MemoryChartDaoService", "AgentAjaxService", "TooltipService", "AnalyticsService", "helpContentService", + function ( cfg, $sce, $timeout, CommonUtilService, UrlVoService, AlertsService, ProgressBarService, AgentDaoService, ResponseTimeChartDaoService, ActiveThreadChartDaoService, TPSChartDaoService, CPULoadChartDaoService, MemoryChartDaoService, AgentAjaxService, TooltipService, AnalyticsService, helpContentService ) { return { restrict: 'EA', replace: true, diff --git a/web/src/main/webapp/features/agentList/agent-list.directive.js b/web/src/main/webapp/features/agentList/agent-list.directive.js index a704cce3eebd..3f9ac08fd5aa 100644 --- a/web/src/main/webapp/features/agentList/agent-list.directive.js +++ b/web/src/main/webapp/features/agentList/agent-list.directive.js @@ -19,8 +19,8 @@ } } }); - pinpointApp.directive( "agentListDirective", [ "agentListDirectiveConfig", "SystemConfigurationService", "CommonUtilService", "UrlVoService", "AgentAjaxService", "PreferenceService", "TooltipService", "AnalyticsService", - function ( cfg, SystemConfigService, CommonUtilService, UrlVoService, AgentAjaxService, PreferenceService, TooltipService, AnalyticsService ) { + pinpointApp.directive( "agentListDirective", [ "agentListDirectiveConfig", "CommonUtilService", "UrlVoService", "AgentAjaxService", "PreferenceService", "TooltipService", "AnalyticsService", + function ( cfg, CommonUtilService, UrlVoService, AgentAjaxService, PreferenceService, TooltipService, AnalyticsService ) { return { restrict: 'EA', replace: true, diff --git a/web/src/main/webapp/features/applicationStatistic/application-statistic.directive.js b/web/src/main/webapp/features/applicationStatistic/application-statistic.directive.js index e3576ffbe40f..3a7f15505d0e 100644 --- a/web/src/main/webapp/features/applicationStatistic/application-statistic.directive.js +++ b/web/src/main/webapp/features/applicationStatistic/application-statistic.directive.js @@ -3,8 +3,8 @@ ID: "APPLICATION_STATISTIC_DRTV_" }); - pinpointApp.directive( "applicationStatisticDirective", [ "applicationStatisticDirectiveConfig", "$sce", "$http", "$timeout", "SystemConfigurationService", "CommonUtilService", "UrlVoService", "AlertsService", "ProgressBarService", "AgentDaoService", "AgentAjaxService", "TooltipService", "AnalyticsService", "helpContentService", - function ( cfg, $sce, $http, $timeout, SystemConfigService, CommonUtilService, UrlVoService, AlertsService, ProgressBarService, AgentDaoService, AgentAjaxService, TooltipService, AnalyticsService, helpContentService ) { + pinpointApp.directive( "applicationStatisticDirective", [ "applicationStatisticDirectiveConfig", "$sce", "$http", "$timeout", "CommonUtilService", "UrlVoService", "AlertsService", "ProgressBarService", "AgentDaoService", "AgentAjaxService", "TooltipService", "AnalyticsService", "helpContentService", + function ( cfg, $sce, $http, $timeout, CommonUtilService, UrlVoService, AlertsService, ProgressBarService, AgentDaoService, AgentAjaxService, TooltipService, AnalyticsService, helpContentService ) { return { restrict: 'EA', replace: true, diff --git a/web/src/main/webapp/features/configuration/userGroup/pinpoint-user.directive.js b/web/src/main/webapp/features/configuration/userGroup/pinpoint-user.directive.js index 825df83d23dd..0712f6b46c26 100644 --- a/web/src/main/webapp/features/configuration/userGroup/pinpoint-user.directive.js +++ b/web/src/main/webapp/features/configuration/userGroup/pinpoint-user.directive.js @@ -1,12 +1,5 @@ (function($) { 'use strict'; - /** - * (en)alarmPinpointUserDirective - * @ko alarmPinpointUserDirective - * @group Directive - * @name alarmPinpointUserDirective - * @class - */ pinpointApp.directive( "pinpointUserDirective", [ "helpContentTemplate", "helpContentService", "AlarmUtilService", "AnalyticsService", "SystemConfigurationService", function ( helpContentTemplate, helpContentService, AlarmUtilService, AnalyticsService, SystemConfigService) { @@ -18,6 +11,9 @@ link: function (scope, element) { scope.prefix = "pinpointUser_"; + SystemConfigService.getConfig().then(function(config) { + scope.canEditUserInfo = config["editUserInfo"]; + }); var $element = $(element); var $elWrapper = $element.find(".wrapper"); var $elTotal = $element.find(".total"); @@ -34,9 +30,6 @@ var oGroupMemberList = []; scope.pinpointUserList = []; - scope.getCreateAllow = function() { - return SystemConfigService.get("editUserInfo"); - }; function cancelPreviousWork() { AddPinpointUser.cancelAction( aEditNode, hideEditArea ); RemovePinpointUser.cancelAction( AlarmUtilService, $workingNode ); diff --git a/web/src/main/webapp/features/configuration/userGroup/pinpointUser.html b/web/src/main/webapp/features/configuration/userGroup/pinpointUser.html index f02736b14cb7..106c89ee3ec3 100644 --- a/web/src/main/webapp/features/configuration/userGroup/pinpointUser.html +++ b/web/src/main/webapp/features/configuration/userGroup/pinpointUser.html @@ -41,11 +41,11 @@
  • {{"("+pinpointUser.department + ")" + pinpointUser.name}} -
    +
    -
    +
    diff --git a/web/src/main/webapp/features/configuration/userGroup/user-group-container.directive.js b/web/src/main/webapp/features/configuration/userGroup/user-group-container.directive.js index ef27e03c4a52..141aa1722d7f 100644 --- a/web/src/main/webapp/features/configuration/userGroup/user-group-container.directive.js +++ b/web/src/main/webapp/features/configuration/userGroup/user-group-container.directive.js @@ -14,9 +14,11 @@ scope.$on( "configuration.selectMenu", function( event, selectedName ) { if ( myName === selectedName ) { - scope.$broadcast( "configuration.userGroup.show" ); - scope.$broadcast( "pinpointUser.load", SystemConfigService.get("userDepartment") ); - $element.show(); + SystemConfigService.getConfig().then(function(config) { + scope.$broadcast( "configuration.userGroup.show" ); + scope.$broadcast( "pinpointUser.load", config["userDepartment"] ); + $element.show(); + }); } else { $element.hide(); } diff --git a/web/src/main/webapp/features/configuration/userGroup/user-group.directive.js b/web/src/main/webapp/features/configuration/userGroup/user-group.directive.js index 859d50cd7e0d..0d9396fca000 100644 --- a/web/src/main/webapp/features/configuration/userGroup/user-group.directive.js +++ b/web/src/main/webapp/features/configuration/userGroup/user-group.directive.js @@ -108,14 +108,16 @@ applyAddUserGroup(); }; function applyAddUserGroup() { - AddUserGroup.applyAction( AlarmUtilService, $elNewGroup, $elLoading, SystemConfigService.get("userId"), function( oServerData, groupId ) { - oUserGroupList.push({ - id: groupId, - number: oServerData.number - }); - scope.userGroupList = oUserGroupList; - AlarmUtilService.setTotal( $elTotal, oUserGroupList.length ); - }, showAlert ); + SystemConfigService.getConfig().then(function(config) { + AddUserGroup.applyAction( AlarmUtilService, $elNewGroup, $elLoading, config["userId"], function( oServerData, groupId ) { + oUserGroupList.push({ + id: groupId, + number: oServerData.number + }); + scope.userGroupList = oUserGroupList; + AlarmUtilService.setTotal( $elTotal, oUserGroupList.length ); + }, showAlert ); + }); } // remove process @@ -131,18 +133,20 @@ RemoveUserGroup.cancelAction( AlarmUtilService, $workingNode ); }; scope.onApplyRemoveUserGroup = function() { - RemoveUserGroup.applyAction( AlarmUtilService, $workingNode, $elLoading, SystemConfigService.get("userId"), function( groupId ) { - for (var i = 0; i < oUserGroupList.length; i++) { - if ( oUserGroupList[i].id == groupId ) { - oUserGroupList.splice(i, 1); - break; + SystemConfigService.getConfig().then(function(config) { + RemoveUserGroup.applyAction( AlarmUtilService, $workingNode, $elLoading, config["userId"], function( groupId ) { + for (var i = 0; i < oUserGroupList.length; i++) { + if ( oUserGroupList[i].id == groupId ) { + oUserGroupList.splice(i, 1); + break; + } } - } - scope.$apply(function () { - scope.userGroupList = oUserGroupList; - }); - AlarmUtilService.setTotal($elTotal, oUserGroupList.length); - }, showAlert ); + scope.$apply(function () { + scope.userGroupList = oUserGroupList; + }); + AlarmUtilService.setTotal($elTotal, oUserGroupList.length); + }, showAlert ); + }); }; // key down diff --git a/web/src/main/webapp/features/distributedCallFlow/distributed-call-flow.directive.js b/web/src/main/webapp/features/distributedCallFlow/distributed-call-flow.directive.js index 1cbe3af79433..15c9e769a6e4 100644 --- a/web/src/main/webapp/features/distributedCallFlow/distributed-call-flow.directive.js +++ b/web/src/main/webapp/features/distributedCallFlow/distributed-call-flow.directive.js @@ -18,11 +18,15 @@ }, link: function postLink(scope, element, attrs) { // initialize variables - var grid, dataView, lastAgent, startRow; + var grid, dataView, lastAgent, startRow, securityGuideUrl = ""; // initialize variables of methods var initialize, treeFormatter, treeFilter, parseData, execTimeFormatter, getColorByString, progressBarFormatter, argumentFormatter, linkFormatter, hasChildNode, searchRowByTime, searchRowByWord, selectRow; + + SystemConfigService.getConfig().then(function(config) { + securityGuideUrl = config["securityGuideUrl"]; + }); // bootstrap window.callStacks = []; // Due to Slick.Data.DataView, must use window property to resolve scope-related problems. @@ -39,7 +43,7 @@ if ( bIsAuthorized ) { return removeTag( text ); } else { - return "" + removeTag( text ) + " "; + return "" + removeTag( text ) + " "; } }; /** diff --git a/web/src/main/webapp/features/nodeInfoDetails/node-info-details.directive.js b/web/src/main/webapp/features/nodeInfoDetails/node-info-details.directive.js index 9b2ac47cb1c2..87f0dc8e3008 100644 --- a/web/src/main/webapp/features/nodeInfoDetails/node-info-details.directive.js +++ b/web/src/main/webapp/features/nodeInfoDetails/node-info-details.directive.js @@ -14,6 +14,9 @@ scope.isWas = false; scope.isGroup = false; scope.isAuthorized = true; + SystemConfigService.getConfig().then(function(config) { + scope.securyGuideUrl = config["securityGuideUrl"]; + }); var currentAgentName = PreferenceService.getAgentAllStr(); var oChartYMax = {}; var bRequesting = false; @@ -107,9 +110,6 @@ scope.isNotAuthorized = function() { return scope.isAuthorized === false; }; - scope.getAuthGuideUrl = function() { - return SystemConfigService.get("securityGuideUrl"); - }; scope.$on("nodeInfoDetailsDirective.initialize", function (event, target, oNavBarVoServiceArgu, bSendChartRequest) { identifyTarget(target); oNavBarVoService = oNavBarVoServiceArgu; diff --git a/web/src/main/webapp/features/nodeInfoDetails/nodeInfoDetails.html b/web/src/main/webapp/features/nodeInfoDetails/nodeInfoDetails.html index 936243fa40f7..44ce73fd1502 100644 --- a/web/src/main/webapp/features/nodeInfoDetails/nodeInfoDetails.html +++ b/web/src/main/webapp/features/nodeInfoDetails/nodeInfoDetails.html @@ -13,7 +13,7 @@
    You don't have authorization. - +
    \ No newline at end of file diff --git a/web/src/main/webapp/features/realtimeChart/realtime-chart.controller.js b/web/src/main/webapp/features/realtimeChart/realtime-chart.controller.js index 91b39bc87904..9f095133ca3b 100644 --- a/web/src/main/webapp/features/realtimeChart/realtime-chart.controller.js +++ b/web/src/main/webapp/features/realtimeChart/realtime-chart.controller.js @@ -415,26 +415,29 @@ initElements(); bIsFirstInit = false; } - if ( SystemConfigService.get("showActiveThread") === false ) return; - if ( bShowRealtimeChart === false ) return; - if ( bIsWas === false ) { - hidePopup(); - return; - } - initNamespaceToIndexMap(); - initChartDirective(); - adjustWidth(); - $scope.bInitialized = true; + SystemConfigService.getConfig().then(function(config) { + if ( config["showActiveThread"] === false ) return; - // resetStatus(); - currentApplicationName = applicationName; - currentServiceType = serviceType; - $elTitle.html( currentApplicationName ); - showPopup(); - showWaitingConnectionPopup(); - - initReceive(); - setPinColor(); + if ( bShowRealtimeChart === false ) return; + if ( bIsWas === false ) { + hidePopup(); + return; + } + initNamespaceToIndexMap(); + initChartDirective(); + adjustWidth(); + $scope.bInitialized = true; + + // resetStatus(); + currentApplicationName = applicationName; + currentServiceType = serviceType; + $elTitle.html( currentApplicationName ); + showPopup(); + showWaitingConnectionPopup(); + + initReceive(); + setPinColor(); + }); }); $scope.retryConnection = function() { showWaitingConnectionPopup(); @@ -449,25 +452,27 @@ if ( $( $event.target ).hasClass("paging") || $( $event.target ).parent().hasClass("paging") ) { return; } - if ( SystemConfigService.get("showActiveThreadDump") === true ) { - var $target = $( $event.target ); - if ($target.hasClass("agent-chart-list")) { - return; - } - var agentId = $target.parents(".agent-chart").find("div").attr("data-name"); - var openType = LocalStorageManagerService.getThreadDumpLayerOpenType(); - if (openType === null || openType === "window") { - $window.open( - getOpenUrl() + - "/threadDump/" + currentApplicationName + "@" + currentServiceType + "/" + agentId + "?" + Date.now().valueOf() , - "Thread Dump Info", - "width=1280px,height=800px,menubar=no,toolbar=no,location=no,resizable=yes,scrollbars=no,status=no" - ); - } else { - $rootScope.$broadcast("thread-dump-info-layer.open", currentApplicationName, agentId); + SystemConfigService.getConfig().then(function(config) { + if ( config["showActiveThreadDump"] === true ) { + var $target = $( $event.target ); + if ($target.hasClass("agent-chart-list")) { + return; + } + var agentId = $target.parents(".agent-chart").find("div").attr("data-name"); + var openType = LocalStorageManagerService.getThreadDumpLayerOpenType(); + if (openType === null || openType === "window") { + $window.open( + getOpenUrl() + + "/threadDump/" + currentApplicationName + "@" + currentServiceType + "/" + agentId + "?" + Date.now().valueOf() , + "Thread Dump Info", + "width=1280px,height=800px,menubar=no,toolbar=no,location=no,resizable=yes,scrollbars=no,status=no" + ); + } else { + $rootScope.$broadcast("thread-dump-info-layer.open", currentApplicationName, agentId); + } + AnalyticsService.send(AnalyticsService.CONST.MAIN, AnalyticsService.CONST.CLK_OPEN_THREAD_DUMP_LAYER); } - AnalyticsService.send(AnalyticsService.CONST.MAIN, AnalyticsService.CONST.CLK_OPEN_THREAD_DUMP_LAYER); - } + }); }; function getOpenUrl() { var url = $location.absUrl(); diff --git a/web/src/main/webapp/features/serverMap/server-map.directive.js b/web/src/main/webapp/features/serverMap/server-map.directive.js index 4f43c5c7be5c..014e2ecd9e63 100644 --- a/web/src/main/webapp/features/serverMap/server-map.directive.js +++ b/web/src/main/webapp/features/serverMap/server-map.directive.js @@ -403,25 +403,26 @@ reloadRealtimeServerMap( query ); } function reloadRealtimeServerMap() { - - var reloadRequestRepeatingTime = 5000; - var reloadRequestTimeRange = 300000; - if ( SystemConfigService.get("enableServerMapRealTime") === true && scope.oNavbarVoService.isRealtime() ) { - $timeout(function() { - if ( scope.oNavbarVoService.isRealtime() ) { - htLastQuery.to = htLastQuery.to + reloadRequestRepeatingTime; - htLastQuery.from = htLastQuery.from - reloadRequestTimeRange; - ServerMapDaoService.getServerMapData(htLastQuery, function (err, query, mapData) { - if ( scope.oNavbarVoService.isRealtime() ) { - htLastMapData = mapData; - var serverMapData = ServerMapDaoService.extractDataFromApplicationMapData(mapData.applicationMapData); - extractMergeTypeList(serverMapData); - serverMapCallback(query, serverMapData, scope.linkRouting, scope.linkCurve, true); - } - }); - } - }, reloadRequestRepeatingTime); - } + var reloadRequestRepeatingTime = 5000; + var reloadRequestTimeRange = 300000; + SystemConfigService.getConfig().then(function(config) { + if ( config["enableServerMapRealTime"] === true && scope.oNavbarVoService.isRealtime() ) { + $timeout(function() { + if ( scope.oNavbarVoService.isRealtime() ) { + htLastQuery.to = htLastQuery.to + reloadRequestRepeatingTime; + htLastQuery.from = htLastQuery.from - reloadRequestTimeRange; + ServerMapDaoService.getServerMapData(htLastQuery, function (err, query, mapData) { + if ( scope.oNavbarVoService.isRealtime() ) { + htLastMapData = mapData; + var serverMapData = ServerMapDaoService.extractDataFromApplicationMapData(mapData.applicationMapData); + extractMergeTypeList(serverMapData); + serverMapCallback(query, serverMapData, scope.linkRouting, scope.linkCurve, true); + } + }); + } + }, reloadRequestRepeatingTime); + } + }); } function showOverview() { return /^\/main/.test( $location.path() ); diff --git a/web/src/main/webapp/pages/inspector/inspector.controller.js b/web/src/main/webapp/pages/inspector/inspector.controller.js index c8031bedbc16..c82f4ac18580 100644 --- a/web/src/main/webapp/pages/inspector/inspector.controller.js +++ b/web/src/main/webapp/pages/inspector/inspector.controller.js @@ -16,7 +16,10 @@ function ( cfg, $scope, $routeParams, $timeout, SystemConfigService, locationService, CommonUtilService, UrlVoService, AnalyticsService, helpContentService) { $scope.selectedAgent = false; $scope.timeSliderOption = null; - $scope.showStatistic = SystemConfigService.get("showApplicationStat"); + $scope.showStatistic = true; + SystemConfigService.getConfig().then(function(config) { + $scope.showStatistic = config["showApplicationStat"]; + }); $scope.guideMessage = helpContentService.applicationInspectorGuideMessage; cfg.ID += CommonUtilService.getRandomNum(); AnalyticsService.send(AnalyticsService.CONST.INSPECTOR_PAGE); diff --git a/web/src/main/webapp/pages/main/main.controller.js b/web/src/main/webapp/pages/main/main.controller.js index 8986aa823883..7ed77fcf6b9b 100644 --- a/web/src/main/webapp/pages/main/main.controller.js +++ b/web/src/main/webapp/pages/main/main.controller.js @@ -10,7 +10,9 @@ pinpointApp.controller( "MainCtrl", [ "filterConfig", "$scope", "$timeout", "$routeParams", "locationService", "UrlVoService", "NavbarVoService", "$window", "filteredMapUtilService", "$rootElement", "SystemConfigurationService", "AnalyticsService", "PreferenceService", function (cfg, $scope, $timeout, $routeParams, locationService, UrlVoService, NavbarVoService, $window, filteredMapUtilService, $rootElement, SystemConfigService, analyticsService, preferenceService) { analyticsService.send(analyticsService.CONST.MAIN_PAGE); - analyticsService.sendMain(analyticsService.CONST.VERSION, SystemConfigService.get("version")); + SystemConfigService.getConfig().then(function(config) { + analyticsService.sendMain(analyticsService.CONST.VERSION, config["version"]); + }); // define private variables var oNavbarVoService, bNoData; diff --git a/web/src/main/webapp/pages/realtime/realtime.controller.js b/web/src/main/webapp/pages/realtime/realtime.controller.js index ba0feb71b6ea..f36ce67228c8 100644 --- a/web/src/main/webapp/pages/realtime/realtime.controller.js +++ b/web/src/main/webapp/pages/realtime/realtime.controller.js @@ -104,12 +104,14 @@ $elWarningMessage.hide(); } function startConnection() { - if ( SystemConfigService.get("showActiveThread") === false ) return; + SystemConfigService.getConfig().then(function(config) { + if ( config["showActiveThread"] === false ) return; - initNamespaceToIndexMap(); - initChartDirective(); - showWaitingConnectionPopup(); - initReceive(); + initNamespaceToIndexMap(); + initChartDirective(); + showWaitingConnectionPopup(); + initReceive(); + }); } function initNamespaceToIndexMap() { oNamespaceToIndexMap = {}; @@ -296,23 +298,25 @@ if ( $( $event.target ).hasClass("page") ) { return; } - if ( SystemConfigService.get("showActiveThreadDump") === true ) { - var $target = $( $event.target ); - if ($target.hasClass("agent-chart-list")) { - return; - } - var agentId = $target.parents(".agent-chart").find("div").attr("data-name"); - var openType = LocalStorageManagerService.getThreadDumpLayerOpenType(); - if (openType === null || openType === "window") { - $window.open( - getOpenUrl() + - "/threadDump/" + $scope.applicationName + "@" + $scope.serviceType + "/" + agentId + "?" + Date.now().valueOf() , - "Thread Dump Info", - "width=1280px,height=800px,menubar=no,toolbar=no,location=no,resizable=yes,scrollbars=no,status=no" - ); + SystemConfigService.getConfig().then(function(config) { + if ( config["showActiveThreadDump"] === true ) { + var $target = $( $event.target ); + if ($target.hasClass("agent-chart-list")) { + return; + } + var agentId = $target.parents(".agent-chart").find("div").attr("data-name"); + var openType = LocalStorageManagerService.getThreadDumpLayerOpenType(); + if (openType === null || openType === "window") { + $window.open( + getOpenUrl() + + "/threadDump/" + $scope.applicationName + "@" + $scope.serviceType + "/" + agentId + "?" + Date.now().valueOf() , + "Thread Dump Info", + "width=1280px,height=800px,menubar=no,toolbar=no,location=no,resizable=yes,scrollbars=no,status=no" + ); + } + AnalyticsService.send(AnalyticsService.CONST.MAIN, AnalyticsService.CONST.CLK_OPEN_THREAD_DUMP_LAYER); } - AnalyticsService.send(AnalyticsService.CONST.MAIN, AnalyticsService.CONST.CLK_OPEN_THREAD_DUMP_LAYER); - } + }); }; function getOpenUrl() { var url = $location.absUrl();