Skip to content

Commit a362b03

Browse files
committed
Merge pull request pinpoint-apm#1665 from denzelsN/master
bug fix.
2 parents 98f1809 + eae96be commit a362b03

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

web/src/main/webapp/common/services/analytics.service.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888

8989
this.CONST.TG_DATE = "ToggleDate";
9090
this.CONST.TG_UPDATE_ON = "ToggleUpdateOn";
91+
this.CONST.TG_UPDATE_OFF = "ToggleUpdateOff";
9192
this.CONST.TG_NODE_VIEW = "ToggleNodeView";
9293
this.CONST.TG_SCATTER_SUCCESS = "ToggleScatterSuccess";
9394
this.CONST.TG_SCATTER_FAILED = "ToggleScatterFailed";

web/src/main/webapp/features/navbar/navbar.directive.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,9 @@
573573
scope.showUpdate = function () {
574574
return scope.periodType === cfg.periodType.LAST && (_.indexOf(['5m', '20m', '1h', '3h'], scope.readablePeriod) >= 0) && scope.application ? true : false;
575575
};
576+
scope.changeUpdateSetting = function() {
577+
analyticsService.send(analyticsService.CONST.MAIN, scope.autoUpdate ? analyticsService.CONST.TG_UPDATE_OFF : analyticsService.CONST.TG_UPDATE_ON );
578+
};
576579

577580
/**
578581
* start update
@@ -689,7 +692,6 @@
689692
*/
690693
scope.$watch('autoUpdate', function (newVal, oldVal) {
691694
if (newVal) {
692-
analyticsService.send(analyticsService.CONST.MAIN, analyticsService.CONST.TG_UPDATE_ON);
693695
$timeout(startUpdate, 1000);
694696
} else {
695697
resetTimeLeft();

web/src/main/webapp/features/navbar/navbar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<div class="btn-group btn-group-sm input-group input-group-sm" style="margin-top:0px;padding-left:6px;width:146px;" ng-show="showUpdate()">
5757
<span class="input-group-addon">
5858
<label style="margin:0;">
59-
<input type="checkbox" ng-model="autoUpdate"> Update
59+
<input type="checkbox" ng-model="autoUpdate" ng-click="changeUpdateSetting()"> Update
6060
</label>
6161
</span>
6262
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">

web/src/main/webapp/lib/js/pinpoint.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/src/main/webapp/lib/js/pinpoint.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)