From 1225b27510de8c3ef6124712206fcc74bee0dc0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20M=C3=A9tais?= Date: Sat, 20 Jun 2015 14:34:13 +0200 Subject: [PATCH] Fix timeline script filter --- front/src/js/controllers/timelineCtrl.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/front/src/js/controllers/timelineCtrl.js b/front/src/js/controllers/timelineCtrl.js index c641dc6..e23fee1 100644 --- a/front/src/js/controllers/timelineCtrl.js +++ b/front/src/js/controllers/timelineCtrl.js @@ -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);