Sha256: 83110a778bf4d2874c45f5f4a2086102287231340d0dc890e5de5ad7e4eb8c88

Contents?: true

Size: 737 Bytes

Versions: 32

Compression:

Stored size: 737 Bytes

Contents

!(angular => {
  'use strict';

  function ResultPollerImports(PollService) {

    return class ResultPoller {
      constructor(result) {
        this._result = result;
      }

      poll() {
        let result = this._result.item;
        this.pollingKey = 'result_' + result.id + '_' + new Date().getTime();

        PollService.poll(
          result,
          this.pollingKey,
          () => (result.status === 'complete' || result.status === 'failed') ? true : false
        );
      }

      unPoll() {
        PollService.unPoll(this.pollingKey);
      }
    };
  }

  ResultPollerImports.$inject = ['PollService'];
  angular.module('alephServices.resultPoller', []).service('ResultPoller', ResultPollerImports);
}(angular));

Version data entries

32 entries across 16 versions & 1 rubygems

Version Path
aleph_analytics-0.4.9.pre.dev public/assets/angular/services/result/result_poller.js-b15617d53f164cbe5636bb5573a70504.es6
aleph_analytics-0.4.9.pre.dev app/assets/javascripts/angular/services/result/result_poller.js.es6
aleph_analytics-0.4.8 public/assets/angular/services/result/result_poller.js-b15617d53f164cbe5636bb5573a70504.es6
aleph_analytics-0.4.8 app/assets/javascripts/angular/services/result/result_poller.js.es6
aleph_analytics-0.4.7 app/assets/javascripts/angular/services/result/result_poller.js.es6
aleph_analytics-0.4.7 public/assets/angular/services/result/result_poller.js-b15617d53f164cbe5636bb5573a70504.es6
aleph_analytics-0.4.4 public/assets/angular/services/result/result_poller.js-b15617d53f164cbe5636bb5573a70504.es6
aleph_analytics-0.4.4 app/assets/javascripts/angular/services/result/result_poller.js.es6
aleph_analytics-0.4.2 public/assets/angular/services/result/result_poller.js-b15617d53f164cbe5636bb5573a70504.es6
aleph_analytics-0.4.2 app/assets/javascripts/angular/services/result/result_poller.js.es6
aleph_analytics-0.4.1 public/assets/angular/services/result/result_poller.js-b15617d53f164cbe5636bb5573a70504.es6
aleph_analytics-0.4.1 app/assets/javascripts/angular/services/result/result_poller.js.es6
aleph_analytics-0.3.0 public/assets/angular/services/result/result_poller.js-b15617d53f164cbe5636bb5573a70504.es6
aleph_analytics-0.3.0 app/assets/javascripts/angular/services/result/result_poller.js.es6
aleph_analytics-0.2.0 app/assets/javascripts/angular/services/result/result_poller.js.es6
aleph_analytics-0.2.0 public/assets/angular/services/result/result_poller.js-b15617d53f164cbe5636bb5573a70504.es6
aleph_analytics-0.1.0 public/assets/angular/services/result/result_poller.js-b15617d53f164cbe5636bb5573a70504.es6
aleph_analytics-0.1.0 app/assets/javascripts/angular/services/result/result_poller.js.es6
aleph_analytics-0.0.6 public/assets/angular/services/result/result_poller.js-b15617d53f164cbe5636bb5573a70504.es6
aleph_analytics-0.0.6 app/assets/javascripts/angular/services/result/result_poller.js.es6