<commit_before>/*
 * Loading screen Controller
 */

define([], function () {

    var Controller = Em.Controller.extend({

      loadingSrc: 'assets/img/services-loading-darkBg.gif',
      completeSrc: 'assets/img/ok-icon.png',

      load: function () {
        var self = this;

        this.set('appfabricImg', this.loadingSrc);
        this.set('streamsImg', this.loadingSrc);
        this.set('transactionsImg', this.loadingSrc);
        this.set('metricsImg', this.loadingSrc);

        /**
         * Check if all services have been loaded periodically and transition page
         * if everything is loaded.
         */
        this.interval = setInterval(function() {
          self.HTTP.rest('system/services/status', function (statuses) {
            if (!('APPFABRIC' in statuses
              && 'STREAMS' in statuses
              && 'TRANSACTION' in statuses
              && 'METRICS' in statuses)) {
              $(".warning-text").text('Could not get Reactor status. Please restart Reactor.');
              return;
            }
            var appfabricImg = statuses.APPFABRIC === 'OK' ? self.completeSrc : self.loadingSrc;
            var streamsImg = statuses.STREAMS === 'OK' ? self.completeSrc : self.loadingSrc;
            var transactionsImg = statuses.TRANSACTION === 'OK' ? self.completeSrc : self.loadingSrc;
            var metricsImg = statuses.METRICS === 'OK' ? self.completeSrc : self.loadingSrc;

            self.set('appfabricImg', appfabricImg);
            self.set('streamsImg', streamsImg);
            self.set('transactionsImg', transactionsImg);
            self.set('metricsImg', metricsImg);

            if (C.Util.isLoadingComplete(statuses)) {
              setTimeout(function() {
                clearInterval(this.interval);
                self.transitionToRoute('Overview');
              }, 500);
            }

          });
        }, 1000);
      },

      unload: function () {}

    });

    Controller.reopenClass({
      type: 'Loading',
      kind: 'Controller'
    });

    return Controller;

});<commit_msg>clearing out all intervals<commit_after>/*
 * Loading screen Controller
 */

define([], function () {

    var Controller = Em.Controller.extend({

      loadingSrc: 'assets/img/services-loading-darkBg.gif',
      completeSrc: 'assets/img/ok-icon.png',

      load: function () {
        var self = this;

        this.set('appfabricImg', this.loadingSrc);
        this.set('streamsImg', this.loadingSrc);
        this.set('transactionsImg', this.loadingSrc);
        this.set('metricsImg', this.loadingSrc);

        /**
         * Check if all services have been loaded periodically and transition page
         * if everything is loaded.
         */
        this.interval = setInterval(function() {
          self.HTTP.rest('system/services/status', function (statuses) {
            if (!('APPFABRIC' in statuses
              && 'STREAMS' in statuses
              && 'TRANSACTION' in statuses
              && 'METRICS' in statuses)) {
              $(".warning-text").text('Could not get Reactor status. Please restart Reactor.');
              return;
            }
            var appfabricImg = statuses.APPFABRIC === 'OK' ? self.completeSrc : self.loadingSrc;
            var streamsImg = statuses.STREAMS === 'OK' ? self.completeSrc : self.loadingSrc;
            var transactionsImg = statuses.TRANSACTION === 'OK' ? self.completeSrc : self.loadingSrc;
            var metricsImg = statuses.METRICS === 'OK' ? self.completeSrc : self.loadingSrc;

            self.set('appfabricImg', appfabricImg);
            self.set('streamsImg', streamsImg);
            self.set('transactionsImg', transactionsImg);
            self.set('metricsImg', metricsImg);

            if (C.Util.isLoadingComplete(statuses)) {
              setTimeout(function() {
                clearInterval(this.interval);
                self.transitionToRoute('Overview');
              }, 500);
            }

          });
        }, 1000);
      },

      unload: function () {
        clearInterval(this.interval);
      }

    });

    Controller.reopenClass({
      type: 'Loading',
      kind: 'Controller'
    });

    return Controller;

});
{'fraction_non_alphanumeric': 0.13064133016627077, 'fraction_numerical': 0.00332541567695962, 'mean_word_length': 2.044830079537238, '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': '2262164', 'n_tokens_mistral': 1169, 'n_tokens_neox': 1118, 'n_words': 236}