Skip to content

Commit

Permalink
Profiler Template: Allocations modal close by btn
Browse files Browse the repository at this point in the history
Make Allocations modal closable by the corner X and via 'Close' button
in addition to clicking outside. Small usability improvement.
  • Loading branch information
jstuder-gh committed Apr 1, 2018
1 parent 6b49767 commit 32fd547
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/vm/moar/profiler/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,10 @@ <h3>Dynamic Optimization</h3>
</table>
<script type="text/ng-template" id="myModalContent.html">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<button type="button" ng-click="modalInstance.close()"
class="close" data-dismiss="modal">
<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
</button>
<h4 class="modal-title" id="allocatingRoutinesModalLabel">
Routines Allocating {{CurrentAllocatingRoutine}}
</h4>
Expand Down Expand Up @@ -528,7 +531,8 @@ <h4 class="modal-title" id="allocatingRoutinesModalLabel">
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" ng-click="modalInstance.close()"
class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</script>
</div>
Expand Down Expand Up @@ -1145,11 +1149,12 @@ <h3>Global Deoptimization</h3>
$scope.routineReverse = true;

// Allocating routines handlng.
$scope.modalInstance = null;
$scope.showAllocatingRoutines = function (alloc) {
// Show modal dialog with data.
$scope.CurrentAllocatingRoutine = alloc.Name;
$scope.CurrentAllocatingRoutineStats = alloc.RoutineStats;
var modalInstance = $uibModal.open({
$scope.modalInstance = $uibModal.open({
templateUrl: 'myModalContent.html',
scope: $scope
});
Expand Down

0 comments on commit 32fd547

Please sign in to comment.