<commit_before>'use strict';

angular.module('myApp')
    .controller('CollateralsCtrl', ['$scope', '$kinvey','trainingUtils', function ($scope, $kinvey, trainingUtils) {

        $scope.$on('$ionicView.beforeEnter', function (event, viewData) {
            viewData.enableBack = true;
        });

        $scope.collaterals = [];

        $scope.loadCollaterals = function(){
            trainingUtils.showProgress();
            var query = new $kinvey.Query();
            query.equalTo('mimeType','application/pdf');
            var fileStore = new $kinvey.FileStore(),
                promise = fileStore.find(query);
            promise.then(function(files) {
                $scope.collaterals = files;
                $scope.$digest();
                trainingUtils.hideProgress();
            }).catch(function(err) {
                console.log("fetch collaterals error " + JSON.stringify(err));
                trainingUtils.hideProgress();
                trainingUtils.showOkDialog("Error: " + err.description);
            });
        };

        $scope.loadCollaterals();

    }]);<commit_msg>comment progress bar before filestore calling<commit_after>'use strict';

angular.module('myApp')
    .controller('CollateralsCtrl', ['$scope', '$kinvey','trainingUtils', function ($scope, $kinvey, trainingUtils) {

        $scope.$on('$ionicView.beforeEnter', function (event, viewData) {
            viewData.enableBack = true;
        });

        $scope.collaterals = [];

        $scope.loadCollaterals = function(){
            //trainingUtils.showProgress();
            var query = new $kinvey.Query();
            query.equalTo('mimeType','application/pdf');
            var fileStore = new $kinvey.FileStore(),
                promise = fileStore.find(query);
            promise.then(function(files) {
                $scope.collaterals = files;
                $scope.$digest();
                trainingUtils.hideProgress();
            }).catch(function(err) {
                console.log("fetch collaterals error " + JSON.stringify(err));
                trainingUtils.hideProgress();
                trainingUtils.showOkDialog("Error: " + err.description);
            });
        };

        $scope.loadCollaterals();

    }]);
{'fraction_non_alphanumeric': 0.14298401420959148, 'fraction_numerical': 0.0, 'mean_word_length': 2.111878453038674, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '107114', 'n_tokens_mistral': 599, 'n_tokens_neox': 572, 'n_words': 95}