-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1428 from denzelsN/master
add time slider UI to inspector
- Loading branch information
Showing
26 changed files
with
804 additions
and
381 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
(function($) { | ||
'use strict'; | ||
|
||
/** | ||
* (en) Agent 모든 Ajax 요청을 대리함. | ||
* @ko Agent 모든 Ajax 요청을 대리함. | ||
* @group Service | ||
* @name AgentAjaxService | ||
* @class | ||
*/ | ||
pinpointApp.constant('AgentAjaxServiceConfig', { | ||
"agentList": "/getAgentList.pinpoint", // agentId, timestamp ( or agentId, from, to ) | ||
"agentInfo": "/getAgentInfo.pinpoint", // agentId, timestamp | ||
"agetEvent": "/getAgentEvent.pinpoint", // agentId, eventTimestamp, eventTypeCode | ||
"agentStatus": "/getAgentStatus.pinpoint", // agentId, timestamp | ||
"agentEventList": "/getAgentEvents.pinpoint", // agentId, from, to | ||
"agentStateForChart": "/getAgentStat.pinpoint" // | ||
}); | ||
|
||
pinpointApp.service('AgentAjaxService', [ 'AgentAjaxServiceConfig', '$http', function ($config, $http) { | ||
this.getAgentList = function(data, callback) { | ||
retrieve($config.agentList, data, callback); | ||
}; | ||
this.getAgentStateForChart = function( data, callback ) { | ||
retrieve($config.agentStateForChart, data, callback); | ||
}; | ||
this.getAgentInfo = function( data, callback ) { | ||
retrieve($config.agentInfo, data, callback); | ||
}; | ||
this.getEventList = function( data, callback ) { | ||
retrieve($config.agentEventList, data, callback); | ||
}; | ||
this.getEvent = function( data, callback ) { | ||
retrieve($config.agetEvent, data, callback); | ||
}; | ||
|
||
function retrieve(url, data, callback) { | ||
$http.get(url + getQueryStr( data ) ).then(function(result) { | ||
callback(result.data); | ||
}, function(error) { | ||
callback(error); | ||
}); | ||
} | ||
function getQueryStr( o ) { | ||
var query = "?"; | ||
for( var p in o ) { | ||
query += ( query == "?" ? "" : "&" ) + p + "=" + o[p]; | ||
} | ||
return query; | ||
} | ||
}]); | ||
})(jQuery); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
(function($) { | ||
'use strict'; | ||
|
||
/** | ||
* (en) initialize tooltip. | ||
* @ko Tooltip 초기화. | ||
* @group Service | ||
* @name TooltipService | ||
* @class | ||
*/ | ||
pinpointApp.constant('TooltipServiceConfig', { | ||
"navbar": { | ||
"position": "bottom", | ||
"trigger": "click" | ||
}, | ||
"agentList": { | ||
"position": "bottom", | ||
"trigger": "click" | ||
}, | ||
"heap": { | ||
"position": "top", | ||
"trigger": "click" | ||
}, | ||
"permGen": { | ||
"position": "top", | ||
"trigger": "click" | ||
}, | ||
"cpuUsage": { | ||
"position": "top", | ||
"trigger": "click" | ||
}, | ||
"tps": { | ||
"position": "top", | ||
"trigger": "click" | ||
} | ||
}); | ||
|
||
pinpointApp.service('TooltipService', [ 'TooltipServiceConfig', 'helpContentTemplate', 'helpContentService', function ( $config, helpContentTemplate, helpContentService ) { | ||
|
||
this.init = function(type) { | ||
$("." + type + "Tooltip").tooltipster({ | ||
content: getTooltipStr( type ), | ||
position: $config[type].position, | ||
trigger: $config[type].trigger | ||
}); | ||
}; | ||
|
||
function getTooltipStr( type ) { | ||
switch( type ) { | ||
case "navbar": | ||
return function() { return helpContentTemplate(helpContentService.navbar.applicationSelector) + helpContentTemplate(helpContentService.navbar.depth) + helpContentTemplate(helpContentService.navbar.periodSelector); }; | ||
case "agentList": | ||
return function() { return helpContentTemplate(helpContentService.inspector.list); }; | ||
case "heap": | ||
return function() { return helpContentTemplate(helpContentService.inspector.heap); }; | ||
case "permGen": | ||
return function() { return helpContentTemplate(helpContentService.inspector.permGen); }; | ||
case "cpuUsage": | ||
return function() { return helpContentTemplate(helpContentService.inspector.cpuUsage); }; | ||
case "tps": | ||
return function() { return helpContentTemplate(helpContentService.inspector.tps); }; | ||
} | ||
} | ||
|
||
}]); | ||
})(jQuery); |
Large diffs are not rendered by default.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
web/src/main/webapp/components/time-slider/time-slider.min.js
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
web/src/main/webapp/components/time-slider/time-slider.min.js.map
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.