Fix timeline script filter

This commit is contained in:
Gaël Métais
2015-06-20 14:34:13 +02:00
parent f86bd86043
commit 1225b27510
+6 -6
View File
@@ -44,19 +44,19 @@ timelineCtrl.controller('TimelineCtrl', ['$scope', '$rootScope', '$routeParams',
}
function initScriptFiltering() {
var offenders = $scope.result.rules.jsCount.offendersObj.list;
var offenders = $scope.result.rules.totalRequests.offendersObj.list.byType.js;
$scope.scripts = [];
offenders.forEach(function(script) {
var filePath = script.file;
offenders.forEach(function(filePath) {
var shortPath = filePath;
if (filePath.length > 100) {
filePath = filePath.substr(0, 98) + '...';
shortPath = filePath.substr(0, 98) + '...';
}
var scriptObj = {
fullPath: script.file,
shortPath: filePath
fullPath: filePath,
shortPath: shortPath
};
$scope.scripts.push(scriptObj);