Return-Path: X-Original-To: apmail-climate-commits-archive@minotaur.apache.org Delivered-To: apmail-climate-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DDF5810763 for ; Fri, 28 Feb 2014 05:49:32 +0000 (UTC) Received: (qmail 66499 invoked by uid 500); 28 Feb 2014 05:49:32 -0000 Delivered-To: apmail-climate-commits-archive@climate.apache.org Received: (qmail 66470 invoked by uid 500); 28 Feb 2014 05:49:31 -0000 Mailing-List: contact commits-help@climate.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@climate.incubator.apache.org Delivered-To: mailing list commits@climate.incubator.apache.org Received: (qmail 66462 invoked by uid 99); 28 Feb 2014 05:49:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Feb 2014 05:49:30 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Feb 2014 05:49:28 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 914032388A5B; Fri, 28 Feb 2014 05:49:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1572832 - /incubator/climate/trunk/ocw-ui/frontend/app/js/controllers/ResultCtrl.js Date: Fri, 28 Feb 2014 05:49:07 -0000 To: commits@climate.incubator.apache.org From: joyce@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140228054907.914032388A5B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: joyce Date: Fri Feb 28 05:49:07 2014 New Revision: 1572832 URL: http://svn.apache.org/r1572832 Log: CLIMATE-333 - Update backend call in ResultCtrl CLIMATE-354 - Fix cache directory removal code Modified: incubator/climate/trunk/ocw-ui/frontend/app/js/controllers/ResultCtrl.js Modified: incubator/climate/trunk/ocw-ui/frontend/app/js/controllers/ResultCtrl.js URL: http://svn.apache.org/viewvc/incubator/climate/trunk/ocw-ui/frontend/app/js/controllers/ResultCtrl.js?rev=1572832&r1=1572831&r2=1572832&view=diff ============================================================================== --- incubator/climate/trunk/ocw-ui/frontend/app/js/controllers/ResultCtrl.js (original) +++ incubator/climate/trunk/ocw-ui/frontend/app/js/controllers/ResultCtrl.js Fri Feb 28 05:49:07 2014 @@ -24,11 +24,15 @@ function($rootScope, $scope, $http) { $scope.results = []; // Get all evaluation directories - $http.jsonp($rootScope.baseURL + '/getResultDirInfo?callback=JSON_CALLBACK') + $http.jsonp($rootScope.baseURL + '/dir/results/?callback=JSON_CALLBACK') .success(function(data) { - var removeItem = "/cache"; - data.splice( $.inArray(removeItem,data) ,1 ); - $scope.results = data.sort().reverse(); - }); + data = data['listing'] + + var cacheDirIndex = data.indexOf("/cache"); + if (cacheDirIndex > -1) { + data.split(cacheDirIndex, 1) + } + $scope.results = data.sort().reverse(); + }); }]);