Skip to content

Commit

Permalink
Merge pull request #1428 from denzelsN/master
Browse files Browse the repository at this point in the history
add time slider UI to inspector
  • Loading branch information
denzelsN committed Jan 12, 2016
2 parents d8d54ed + 33b998e commit 4a3c223
Show file tree
Hide file tree
Showing 26 changed files with 804 additions and 381 deletions.
6 changes: 3 additions & 3 deletions web/src/main/resources/pinpoint-web.properties
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# local
#local
cluster.enable=true
cluster.web.tcp.port=9997
cluster.zookeeper.address=localhost
cluster.zookeeper.sessiontimeout=30000
cluster.zookeeper.retry.interval=60000
cluster.connect.address=

# FIXME - should be removed for proper authentication
admin.password=admin

Expand All @@ -19,4 +19,4 @@ config.sendUsage=true
config.editUserInfo=true

web.hbase.selectSpans.limit=500
web.hbase.selectAllSpans.limit=500
web.hbase.selectAllSpans.limit=500
12 changes: 12 additions & 0 deletions web/src/main/webapp/common/help/help-content-ko.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,18 @@
},{
name: "<span class='glyphicon glyphicon-hdd'></span>",
desc: "설치된 agent의 agent-id"
},{
name: "<span class='glyphicon glyphicon-ok-sign' style='color:#40E340'></span>",
desc: "정상적으로 실행중인 agent 상태 표시"
},{
name: "<span class='glyphicon glyphicon-minus-sign' style='color:#F00'></span>",
desc: "Shutdown 된 agent 상태 표시"
},{
name: "<span class='glyphicon glyphicon-remove-sign' style='color:#AAA'></span>",
desc: "연결이 끊긴 agent 상태 표시"
},{
name: "<span class='glyphicon glyphicon-question-sign' style='color:#AAA'></span>",
desc: "알수 없는 상태의 agent 상태 표시"
}]
}]
},
Expand Down
52 changes: 52 additions & 0 deletions web/src/main/webapp/common/services/agent-ajax.service.js
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);
4 changes: 2 additions & 2 deletions web/src/main/webapp/common/services/navbar-vo.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
this._sReadablePeriod = false;
this._sQueryEndDateTime = false;

this._nCallerRange = preferenceService.getDepth();
this._nCalleeRange = preferenceService.getDepth();
this._nCallerRange = preferenceService.getCaller();
this._nCalleeRange = preferenceService.getCallee();

this._sHint = false;

Expand Down
21 changes: 13 additions & 8 deletions web/src/main/webapp/common/services/preference.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,29 @@
*/
pinpointApp.constant('PreferenceServiceConfig', {
names: {
depth: "preference.depth",
caller: "preference.caller",
callee: "preference.callee",
period: "preference.period",
favorite: "preference.favorite"
},
defaults: {
depth: 1,
caller: 1,
callee: 1,
period: "5m"
},
list: [{
name: "depth",
name: "caller",
type: "number"
},{
name: "callee",
type: "number"
},{
name: "period",
type: "string"
}],
cst: {
periodTypes: ['5m', '20m', '1h', '3h', '6h', '12h', '1d', '2d'],
depthList: [ 1, 2, 3, 4, 5, 6, 7, 8],
depthList: [ 1, 2, 3, 4],
maxFavorite: 5000,
maxPeriod: 2
}
Expand All @@ -45,16 +50,16 @@
}
aFavoriteList.push( applicationName );
setFavoriteList();
}
};
this.removeFavorite = function( applicationName ) {
var index = aFavoriteList.indexOf( applicationName );
if ( index === -1 ) return;
aFavoriteList.splice( index, 1 );
setFavoriteList();
}
};
function setFavoriteList() {
localStorage.setItem(cfg.names.favorite, JSON.stringify(aFavoriteList) );
};
}
this.getFavoriteList = function() {
return aFavoriteList;
};
Expand All @@ -66,7 +71,7 @@
};
this.getMaxPeriod = function() {
return cfg.cst.maxPeriod;
}
};


function loadPreference() {
Expand Down
66 changes: 66 additions & 0 deletions web/src/main/webapp/common/services/tooltip.service.js
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);
21 changes: 21 additions & 0 deletions web/src/main/webapp/components/snap.svg/snap.svg.min.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions web/src/main/webapp/components/time-slider/time-slider.min.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit 4a3c223

Please # to comment.