1var csrflistHash = $('#csrflistHash').val(); 2 3app.controller('adminQuickLinkstListServicesCtrl', function ($scope, $http, toastr) { 4 $scope.resultListInit = function () { 5 $scope.resultsListArray = []; 6 $scope.inputSearchValue = ""; 7 $scope.seperator = "^%^"; 8 $scope.eventyear = ""; 9 $scope.getAllQuickLinksListService(); 10 $scope.isLoading = true; 11 }; 12 13 $scope.getAllQuickLinksListService = function () { 14 var transform = function (data) { 15 return $.param(data); 16 }; 17 18 console.log('Fetching results for year:', $scope.eventyear); // Debugging log 19 20 $http.post(window.site_url + "FrontEndAPI/getQuickLinkList", { 21 inputSearchValue: $scope.inputSearchValue, 22 eventyear: $scope.eventyear 23 }, { 24 headers: { "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8" }, 25 transformRequest: transform 26 }).then(function (response) { 27 try { 28 var responseData = response.data; 29 console.log('Raw Response:', responseData); 30 31 if (responseData && responseData.status && responseData.status.status === "201") { 32 let tempFileManagerArray = []; 33 34 if (Array.isArray(responseData.data)) { 35 responseData.data.forEach(function (getFileManagerObject) { 36 tempFileManagerArray.push(getFileManagerObject); 37 }); 38 $scope.resultsListArray = tempFileManagerArray; 39 $scope.isLoading = false; 40 console.log("Filtered resultListArray:", $scope.resultsListArray); 41 } else { 42 console.error("Unexpected data format:", responseData.data); 43 toastr.error('Unexpected data format.'); 44 $scope.isLoading = false 45 } 46 } else { 47 var errorMessage = responseData.status && responseData.status.message ? responseData.status.message : 'Unknown error'; 48 toastr.error(errorMessage); 49 $scope.isLoading = false 50 } 51 } catch (error) { 52 console.error("Failed to parse response:", error); 53 toastr.error('An error occurred while processing the results.'); 54 $scope.isLoading = false 55 } 56 }).catch(function (error) { 57 console.error("HTTP Request Error:", error); 58 toastr.error('An error occurred while fetching the results.'); 59 $scope.isLoading = false 60 }); 61 }; 62 63 $scope.filterResultsByYear = function () { 64 console.log('Filtering by Year:', $scope.eventyear); // Debugging log 65 $scope.getAllQuickLinksListService(); // Fetch data based on the selected year 66 }; 67 68 // Initialize the controller 69 $scope.resultListInit(); 70});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.