Skip to content

Commit

Permalink
Merge pull request #1490 from denzelsN/master
Browse files Browse the repository at this point in the history
Add view option to select a chart for each agent
  • Loading branch information
denzelsN committed Jan 27, 2016
2 parents fee83c7 + 5ebb168 commit 8afcf72
Show file tree
Hide file tree
Showing 10 changed files with 1,078 additions and 1,144 deletions.
3 changes: 3 additions & 0 deletions web/src/main/webapp/common/services/navbar-vo.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@
self._nQueryStartTime = self._nQueryEndTime - self._nQueryPeriod;
return self;
};
this.getPartialURL = function( bAddApplication, bAddFilter) {
return (bAddApplication ? self.getApplication() + "/" : "" ) + self.getReadablePeriod() + "/" + self.getQueryEndDateTime() + ( bAddFilter ? ( self.getFilter() ? "/" + self.getFilter() : "" ) : "" );
}
};
}]);
})();
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
filter: query.filter,
limit: cfg.FILTER_FETCH_LIMIT,
callerRange: query.callerRange,
calleeRange: query.calleeRange
calleeRange: query.calleeRange,
v: 3
};
if ( isNaN( parseInt( query.serviceTypeName ) ) ) {
data.serviceTypeName = query.serviceTypeName;
Expand Down
7 changes: 6 additions & 1 deletion web/src/main/webapp/common/services/tooltip.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
* @class
*/
pinpointApp.constant('TooltipServiceConfig', {
"scatter": {
"position": "bottom",
"trigger": "click"
},
"navbar": {
"position": "bottom",
"trigger": "click"
Expand Down Expand Up @@ -47,6 +51,8 @@

function getTooltipStr( type ) {
switch( type ) {
case "scatter":
return function() { return helpContentTemplate(helpContentService.scatter["default"]); };
case "navbar":
return function() { return helpContentTemplate(helpContentService.navbar.applicationSelector) + helpContentTemplate(helpContentService.navbar.depth) + helpContentTemplate(helpContentService.navbar.periodSelector); };
case "agentList":
Expand All @@ -61,6 +67,5 @@
return function() { return helpContentTemplate(helpContentService.inspector.tps); };
}
}

}]);
})(jQuery);
10 changes: 6 additions & 4 deletions web/src/main/webapp/features/navbar/navbar.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,17 +610,19 @@
bIsClickDepthInnerArea = false;
bIsClickDepthInnerBtn = true;
$("#navbar_depth .dropdown-menu").trigger("click.bs.dropdown");
if ( prevCaller !== scope.caller || prevCallee !== scope.callee ) {
prevCaller = scope.caller;
console.log( "previous :", prevCallee, prevCaller, ", current :", scope.callee, scope.caller );
if ( prevCallee !== scope.callee || prevCaller !== scope.caller ) {
prevCallee = scope.callee;
setDepthToStorage(scope.application + "+caller", scope.caller);
prevCaller = scope.caller;
setDepthToStorage(scope.application + "+callee", scope.callee);
setDepthToStorage(scope.application + "+caller", scope.caller);

broadcast();
}
};
scope.cancelDepth = function( bHide ) {
scope.caller = prevCaller;
scope.callee = prevCallee;
scope.caller = prevCaller;
if ( bHide ) {
bIsClickDepthInnerArea = false;
bIsClickDepthInnerBtn = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
oChart.addListener('clickGraphItem', function(event) {
analyticsService.send(analyticsService.CONST.MAIN, analyticsService.CONST.CLK_RESPONSE_GRAPH);
if ( event.item.category == "Error" ) {
scope.$emit('responseTimeChartDirective.errorClicked' );
scope.$emit('responseTimeChartDirective.showErrorTransacitonList' );
}
if ( useFilterTransaction ) {
scope.$emit('responseTimeChartDirective.itemClicked.' + scope.namespace, event.item.serialDataItem.dataContext);
Expand Down
1,692 changes: 859 additions & 833 deletions web/src/main/webapp/features/scatter/jquery.BigScatterChart.js

Large diffs are not rendered by default.

471 changes: 178 additions & 293 deletions web/src/main/webapp/features/scatter/scatter.directive.js

Large diffs are not rendered by default.

25 changes: 16 additions & 9 deletions web/src/main/webapp/features/serverMap/jquery.ServerMap2.js
Original file line number Diff line number Diff line change
Expand Up @@ -909,19 +909,19 @@
});
this._oDiagram.addDiagramListener("BackgroundSingleClicked", function (e) {
var fOnBackgroundClicked = self.option('fOnBackgroundClicked');
if (_.isFunction(fOnBackgroundClicked)) {
if (angular.isFunction(fOnBackgroundClicked)) {
fOnBackgroundClicked.call(self, e);
}
});
this._oDiagram.addDiagramListener("BackgroundDoubleClicked", function (e) {
var fOnBackgroundDoubleClicked = self.option('fOnBackgroundDoubleClicked');
if (_.isFunction(fOnBackgroundDoubleClicked)) {
if (angular.isFunction(fOnBackgroundDoubleClicked)) {
fOnBackgroundDoubleClicked.call(self, e);
}
});
this._oDiagram.addDiagramListener("BackgroundContextClicked", function (e) {
var fOnBackgroundContextClicked = self.option('fOnBackgroundContextClicked');
if (_.isFunction(fOnBackgroundContextClicked)) {
if (angular.isFunction(fOnBackgroundContextClicked)) {
fOnBackgroundContextClicked.call(self, e);
}
});
Expand Down Expand Up @@ -1035,6 +1035,13 @@
var part = this._oDiagram.findPartForKey(sKey);
this._oDiagram.select(part);
this._updateHightlights(node);
//console.log( this._oDiagram.documentBounds, this._oDiagram.scale );
//this._oDiagram.zoomToRect( {
// x: part.actualBounds.x - part.actualBounds.width * 3,
// y: part.actualBounds.y - part.actualBounds.height * 3,
// width: part.actualBounds.width * 6,
// height: part.actualBounds.height * 6,
//}, this._oDiagram.UniformToFill );
}
},

Expand Down Expand Up @@ -1249,7 +1256,7 @@
_onNodeSubGroupClicked: function(e, obj, unknownKey, fromName) {
var node = obj.part,
fOnNodeSubGroupClicked = this.option('fOnNodeSubGroupClicked');
if (_.isFunction(fOnNodeSubGroupClicked)) {
if (angular.isFunction(fOnNodeSubGroupClicked)) {
this.analyticsService.send(this.analyticsService.CONST.MAIN, this.analyticsService.CONST.CLK_NODE);
fOnNodeSubGroupClicked.call(this, e, node, unknownKey, fromName);
}
Expand All @@ -1266,7 +1273,7 @@
var node = obj.part,
htData = node.data,
fOnNodeClicked = this.option('fOnNodeClicked');
if (_.isFunction(fOnNodeClicked)) {
if (angular.isFunction(fOnNodeClicked)) {
this.analyticsService.send(this.analyticsService.CONST.MAIN, this.analyticsService.CONST.CLK_NODE);
fOnNodeClicked.call(this, e, htData, unknownKey, query);
}
Expand All @@ -1282,7 +1289,7 @@
var node = obj.part,
htData = node.data,
fOnNodeDoubleClicked = this.option('fOnNodeDoubleClicked');
if (_.isFunction(fOnNodeDoubleClicked)) {
if (angular.isFunction(fOnNodeDoubleClicked)) {
fOnNodeDoubleClicked.call(this, e, node, htData);
}
},
Expand All @@ -1298,7 +1305,7 @@
var node = obj.part,
htData = node.data,
fOnNodeContextClicked = this.option('fOnNodeContextClicked');
if (_.isFunction(fOnNodeContextClicked)) {
if (angular.isFunction(fOnNodeContextClicked)) {
fOnNodeContextClicked.call(this, e, htData);
}
},
Expand All @@ -1314,7 +1321,7 @@
var link = obj.part,
htData = link.data,
fOnLinkClicked = this.option('fOnLinkClicked');
if (_.isFunction(fOnLinkClicked)) {
if (angular.isFunction(fOnLinkClicked)) {
this.analyticsService.send(this.analyticsService.CONST.MAIN, this.analyticsService.CONST.CLK_LINK);
htData.fromNode = obj.fromNode.part.data;
htData.toNode = obj.toNode.part.data;
Expand All @@ -1333,7 +1340,7 @@
var link = obj.part,
htData = link.data,
fOnLinkContextClicked = this.option('fOnLinkContextClicked');
if (_.isFunction(fOnLinkContextClicked)) {
if (angular.isFunction(fOnLinkContextClicked)) {
htData.fromNode = obj.fromNode.part.data;
htData.toNode = obj.toNode.part.data;
fOnLinkContextClicked.call(this, e, htData);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@
}
oNavbarVoService.autoCalculateByQueryEndDateTimeAndReadablePeriod();
$scope.$emit('scatterDirective.initialize', oNavbarVoService);
$scope.$emit('scatterDirective.initializeWithNode', {applicationName: oNavbarVoService.getApplicationName()}, 800, 600)
$scope.$emit('scatterDirective.initializeWithNode', {
key: oNavbarVoService.getApplicationName() + "^" + oNavbarVoService.getServiceTypeName(),
serviceType: oNavbarVoService.getServiceTypeName(),
applicationName: oNavbarVoService.getApplicationName(),
agentList : $routeParams.agentList.split(",")
}, 800, 600)
}, 500);
}
]);
Expand Down
2 changes: 1 addition & 1 deletion web/src/main/webapp/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pinpointApp.config(['$routeProvider', '$locationProvider', '$modalProvider', fun
}).when('/transactionView/:agentId/:traceId/:focusTimestamp', {
templateUrl: 'pages/transactionView/transactionView.html',
controller: 'TransactionViewCtrl'
}).when('/scatterFullScreenMode/:application/:readablePeriod/:queryEndDateTime', {
}).when('/scatterFullScreenMode/:application/:readablePeriod/:queryEndDateTime/:agentList', {
templateUrl: 'pages/scatterFullScreenMode/scatterFullScreenMode.html',
controller: 'ScatterFullScreenModeCtrl'
}).when('/scatterFullScreenMode/:application/:readablePeriod/:queryEndDateTime/:filter', {
Expand Down

0 comments on commit 8afcf72

Please # to comment.