Skip to content

Commit 32fd547

Browse files
committed
Profiler Template: Allocations modal close by btn
Make Allocations modal closable by the corner X and via 'Close' button in addition to clicking outside. Small usability improvement.
1 parent 6b49767 commit 32fd547

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/vm/moar/profiler/template.html

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,10 @@ <h3>Dynamic Optimization</h3>
488488
</table>
489489
<script type="text/ng-template" id="myModalContent.html">
490490
<div class="modal-header">
491-
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
491+
<button type="button" ng-click="modalInstance.close()"
492+
class="close" data-dismiss="modal">
493+
<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
494+
</button>
492495
<h4 class="modal-title" id="allocatingRoutinesModalLabel">
493496
Routines Allocating {{CurrentAllocatingRoutine}}
494497
</h4>
@@ -528,7 +531,8 @@ <h4 class="modal-title" id="allocatingRoutinesModalLabel">
528531
</table>
529532
</div>
530533
<div class="modal-footer">
531-
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
534+
<button type="button" ng-click="modalInstance.close()"
535+
class="btn btn-default" data-dismiss="modal">Close</button>
532536
</div>
533537
</script>
534538
</div>
@@ -1145,11 +1149,12 @@ <h3>Global Deoptimization</h3>
11451149
$scope.routineReverse = true;
11461150

11471151
// Allocating routines handlng.
1152+
$scope.modalInstance = null;
11481153
$scope.showAllocatingRoutines = function (alloc) {
11491154
// Show modal dialog with data.
11501155
$scope.CurrentAllocatingRoutine = alloc.Name;
11511156
$scope.CurrentAllocatingRoutineStats = alloc.RoutineStats;
1152-
var modalInstance = $uibModal.open({
1157+
$scope.modalInstance = $uibModal.open({
11531158
templateUrl: 'myModalContent.html',
11541159
scope: $scope
11551160
});

0 commit comments

Comments
 (0)