Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

add guide message when has wrong application name. #1650

Merged
merged 1 commit into from
Mar 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions web/src/main/webapp/common/help/help-content-en.js
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,15 @@
desc: "All transactions"
}]
}]
}
},
},
wrongApp: [
"<div style='font-size:12px'>The agent is currently registered under {{application2}} due to the following:<br>",
"1. The agent has moved from {{application1}} to {{application2}}<br>",
"2. A different agent with the same agent id has been registered to {{application2}}<hr>",
"For the former case, you should delete the mapping between {{application1}} and {{agentId}}.<br>",
"For the latter case, the agent id of the duplicate agent must be changed.</div>"
].join("")
},
callTree: {
column: {
mainStyle: "",
Expand Down
10 changes: 9 additions & 1 deletion web/src/main/webapp/common/help/help-content-ko.js
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,15 @@
desc: "모든 트랜잭션"
}]
}]
}
},
wrongApp: [
"<div style='font-size:12px'>해당 agent는 {{application1}}이 아닌 {{application2}}에 포함되어 있습니다.<br>",
"원인은 다음 중 하나입니다.<hr>",
"1. 해당 agent가 {{application1}}에서 {{application2}}으로 이동한 경우<br>",
"2.{{agentId}}의 agent가 {{application2}}에도 등록 된 경우<hr>",
"1의 경우 {{application1}}과 {{agentId}}간의 매핑 저보를 삭제해야 합니다<br>",
"2의 경우 중복 등록 된 agent의 id를 변경해야 합니다.</div>"
].join("")
},
callTree: {
column: {
Expand Down
2 changes: 1 addition & 1 deletion web/src/main/webapp/common/services/tooltip.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

pinpointApp.service('TooltipService', [ 'TooltipServiceConfig', 'helpContentTemplate', 'helpContentService', function ( $config, helpContentTemplate, helpContentService ) {

this.init = function(type) {
this.init = function( type ) {
$("." + type + "Tooltip").tooltipster({
content: getTooltipStr( type ),
position: $config[type].position,
Expand Down
17 changes: 15 additions & 2 deletions web/src/main/webapp/features/agentInfo/agent-info.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
agentStatUrl: '/getAgentStat.pinpoint'
});

pinpointApp.directive('agentInfoDirective', [ 'agentInfoConfig', '$timeout', 'AlertsService', 'ProgressBarService', 'AgentDaoService', 'AgentAjaxService', 'TooltipService', "AnalyticsService",
function ( cfg, $timeout, AlertsService, ProgressBarService, AgentDaoService, agentAjaxService, tooltipService, analyticsService ) {
pinpointApp.directive('agentInfoDirective', [ 'agentInfoConfig', '$timeout', 'AlertsService', 'ProgressBarService', 'AgentDaoService', 'AgentAjaxService', 'TooltipService', "AnalyticsService", 'helpContentService',
function ( cfg, $timeout, AlertsService, ProgressBarService, AgentDaoService, agentAjaxService, tooltipService, analyticsService, helpContentService ) {
return {
restrict: 'EA',
replace: true,
Expand Down Expand Up @@ -228,6 +228,19 @@
scope.$broadcast('tpsChartDirective.showCursorAt.forTps', event.index);
}
};
scope.toggleHelp = function() {
$("._wrongApp").popover({
"title": "<span class='label label-info'>" + oNavbarVoService.getApplicationName() + "</span> <span class='glyphicon glyphicon-resize-horizontal'></span> <span class='label label-info'>" + scope.agent.applicationName + "</span>",
"content": helpContentService.inspector.wrongApp
.replace(/\{\{application1\}\}/g, oNavbarVoService.getApplicationName() )
.replace(/\{\{application2\}\}/g, scope.agent.applicationName )
.replace(/\{\{agentId\}\}/g, scope.agent.agentId ),
"html": true
}).popover("toggle");
};
scope.isSameApplication = function() {
return scope.agent.applicationName === oNavbarVoService.getApplicationName();
};

scope.formatDate = function( time ) {
return moment(time).format('YYYY.MM.DD HH:mm:ss');
Expand Down
3 changes: 2 additions & 1 deletion web/src/main/webapp/features/agentInfo/agentInfoMain.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ <h3>Information <span style="float:right;font-size:16px;" class="label label-def
<tbody>
<tr>
<td class="col-md-2 text-right"><strong>Application Name</strong></td>
<td class="col-md-3 text-left">{{agent.applicationName}}</td>
<td class="col-md-3 text-left" ng-show="isSameApplication()">{{agent.applicationName}}</td>
<td class="col-md-3 text-left" ng-hide="isSameApplication()"><span style="color:red">{{agent.applicationName}}</span> <button type="button" class="btn btn-xs btn-danger _wrongApp" ng-click="toggleHelp(this)" style="font-size:10px;float:right" data-toggle="popover" data-container="body" data-trigger="manual" data-placement="bottom"><span class="glyphicon glyphicon-exclamation-sign"></span></button></td>
<td class="col-md-2 text-right"><strong>Agent Version</strong></td>
<td class="col-md-5 text-left">{{agent.agentVersion}}</td>
</tr>
Expand Down
14 changes: 7 additions & 7 deletions web/src/main/webapp/lib/js/pinpoint.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion web/src/main/webapp/lib/js/pinpoint.min.js.map

Large diffs are not rendered by default.