Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
use angular-bootstrap, not jquery-bootstrap
We're already using angular - use the ui.bootstrap module for all
our bootstrap needs; avoids loading two frameworks simultaneously.
  • Loading branch information
coke committed Oct 6, 2015
1 parent 72b284c commit e522c72
Showing 1 changed file with 19 additions and 25 deletions.
44 changes: 19 additions & 25 deletions src/vm/moar/profiler/template.html
Expand Up @@ -220,9 +220,9 @@ <h3>Dynamic Optimization</h3>
<th><a href="" ng-click="reverse = predicate == 'InclusiveTimePercent' ? !reverse : true; predicate = 'InclusiveTimePercent';">Inclusive Time</a></th>
<th><a href="" ng-click="reverse = predicate == 'ExclusiveTimePercent' ? !reverse : true; predicate = 'ExclusiveTimePercent';">Exclusive Time</a></th>
<th>
<span class="text-danger" data-toggle="tooltip" data-placement="bottom" title="Unoptimized interpreted code">Interp</span> /
<span class="text-warning" data-toggle="tooltip" data-placement="bottom" title="Type-specialized interpreted code">Spesh</span> /
<span class="text-success" data-toggle="tooltip" data-placement="bottom" title="Type-specialized, JIT-compiled code">JIT</span>
<span class="text-danger" tooltip-placement="bottom" tooltip="Unoptimized interpreted code">Interp</span> /
<span class="text-warning" tooltip-placement="bottom" tooltip="Type-specialized interpreted code">Spesh</span> /
<span class="text-success" tooltip-placement="bottom" tooltip="Type-specialized, JIT-compiled code">JIT</span>
</th>
</thead>
<tbody>
Expand Down Expand Up @@ -385,12 +385,12 @@ <h3>Dynamic Optimization</h3>
<th><a href="" ng-click="reverse = predicate == 'Calls' ? !reverse : true; predicate = 'Calls';">Calls</a></th>
<th><a href="" ng-click="reverse = predicate == 'TimePercent' ? !reverse : true; predicate = 'TimePercent';">Time In Callee</a></th>
<th>
<span class="text-danger" data-toggle="tooltip" data-placement="bottom" title="Unoptimized interpreted code">Interp</span> /
<span class="text-warning" data-toggle="tooltip" data-placement="bottom" title="Type-specialized interpreted code">Spesh</span> /
<span class="text-success" data-toggle="tooltip" data-placement="bottom" title="Type-specialized, JIT-compiled code">JIT</span>
<span class="text-danger" tooltip-placement="bottom" tooltip="Unoptimized interpreted code">Interp</span> /
<span class="text-warning" tooltip-placement="bottom" tooltip="Type-specialized interpreted code">Spesh</span> /
<span class="text-success" tooltip-placement="bottom" tooltip="Type-specialized, JIT-compiled code">JIT</span>
</th>
<th>
<span data-toggle="tooltip" data-placement="bottom" title="Code from this callee was flattened into the routine by the optimizer">Inlined</span>
<span tooltip-placement="bottom" tooltip="Code from this callee was flattened into the routine by the optimizer">Inlined</span>
</th>
</thead>
<tbody>
Expand Down Expand Up @@ -482,9 +482,7 @@ <h3>Dynamic Optimization</h3>
</tr>
</tbody>
</table>
<div class="modal fade" id="allocatingRoutinesModal" tabindex="-1" role="dialog" aria-labelledby="allocatingRoutinesModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<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>
<h4 class="modal-title" id="allocatingRoutinesModalLabel">
Expand Down Expand Up @@ -528,9 +526,7 @@ <h4 class="modal-title" id="allocatingRoutinesModalLabel">
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</script>
</div>
</div>

Expand All @@ -547,9 +543,9 @@ <h4 class="modal-title" id="allocatingRoutinesModalLabel">
</th>
<th>
Nursery:
<span class="text-danger" data-toggle="tooltip" data-placement="bottom" title="Bytes retained in the nursery">Retained</span> /
<span class="text-warning" data-toggle="tooltip" data-placement="bottom" title="Bytes promoted to gen2 and now available in nursery">Promoted</span> /
<span class="text-success" data-toggle="tooltip" data-placement="bottom" title="Bytes released and now availabe in nursery">Freed</span>
<span class="text-danger" tooltip-placement="bottom" tooltip="Bytes retained in the nursery">Retained</span> /
<span class="text-warning" tooltip-placement="bottom" tooltip="Bytes promoted to gen2 and now available in nursery">Promoted</span> /
<span class="text-success" tooltip-placement="bottom" tooltip="Bytes released and now availabe in nursery">Freed</span>
</th>
</thead>
<tbody>
Expand Down Expand Up @@ -706,9 +702,8 @@ <h3>Global Deoptimization</h3>
</div>
</div>

<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.13.4/ui-bootstrap-tpls.js"></script>
<script>
var rawData = JSON.parse('{{{PROFIELR_OUTPUT}}}');

Expand All @@ -730,7 +725,7 @@ <h3>Global Deoptimization</h3>
}());

// Register application and add controllers, increase recursion depth for callGraphController
var moarProfApp = angular.module('moarProfApp', []).config(function($rootScopeProvider) {
var moarProfApp = angular.module('moarProfApp', ['ui.bootstrap']).config(function($rootScopeProvider) {
$rootScopeProvider.digestTtl(100);
});

Expand Down Expand Up @@ -992,7 +987,7 @@ <h3>Global Deoptimization</h3>
}
});

moarProfApp.controller('AllocationsController', function ($scope) {
moarProfApp.controller('AllocationsController', function ($scope, $modal) {
// Traverse all call nodes, counting up the allocations.
var typeIdToName = {};
var typeIdToAllocations = {};
Expand Down Expand Up @@ -1074,7 +1069,10 @@ <h3>Global Deoptimization</h3>
// Show modal dialog with data.
$scope.CurrentAllocatingRoutine = alloc.Name;
$scope.CurrentAllocatingRoutineStats = alloc.RoutineStats;
$('#allocatingRoutinesModal').modal();
var modalInstance = $modal.open({
templateUrl: 'myModalContent.html',
scope: $scope
});
}
});

Expand Down Expand Up @@ -1175,10 +1173,6 @@ <h3>Global Deoptimization</h3>
$scope.predicate = 'Count';
$scope.reverse = true;
});

$(function () {
$("[data-toggle='tooltip']").tooltip();
});
</script>
</body>
</html>

0 comments on commit e522c72

Please sign in to comment.