coalescing_panda 3.1.4 → 3.1.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99ae7fd46a00f12688336f1d8013bc68d6ed58fd
|
4
|
+
data.tar.gz: 7cff2c9b34463d0dc575a4703c7fba4e95792415
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67ce91be318eb336ec0a1da1402e0f27c064ff221f5b2a6d45d4b8ec2aa8cb2afc8516c3207088813e634f0378adfd93dba2dbd672b1be577b471359c8816fbf
|
7
|
+
data.tar.gz: 3534590ee35db4ee8deed87d9ac95a06b36d9cb3148eec8ea0d9584397ae09d50835c5cb86422260e4b652790f465b9bccced8bf65f5825eb0b180ffe9301019
|
data/app/assets/javascripts/coalescing_panda/{canvas_batch.js.coffee.erb → canvas_batch.js.coffee}
RENAMED
@@ -1,22 +1,25 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
window.CoalescingPanda or= {}
|
2
|
+
|
3
|
+
window.CoalescingPanda.CanvasBatchProgress = class CanvasBatchProgress
|
4
|
+
constructor: (successCallback, errorCallback) ->
|
3
5
|
batch = $('#batch-progress').data('batch')
|
4
6
|
url = $('#batch-progress').data('url')
|
5
7
|
window.clearPath = $('#batch-progress').data('clear-path')
|
6
8
|
if batch && batch.status != "Completed" || batch.status != "Error"
|
7
|
-
window.batchInterval = setInterval(getBatchStatus, 3000, batch.id, url)
|
9
|
+
window.batchInterval = setInterval(getBatchStatus, 3000, batch.id, url, successCallback, errorCallback)
|
8
10
|
|
9
|
-
getBatchStatus = (id, url) ->
|
11
|
+
getBatchStatus = (id, url, successCallback, errorCallback) ->
|
10
12
|
$.ajax
|
11
13
|
url: url
|
12
14
|
success: (data) ->
|
13
15
|
$('#batch-progress').html(data)
|
14
16
|
batch = $('#batch-info').data('batch')
|
15
|
-
if batch.status == "Completed"
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
if batch.status == "Completed"
|
18
|
+
clearIntervalAndBatch(data, batch)
|
19
|
+
successCallback() if successCallback != undefined
|
20
|
+
else if batch.status == 'Error'
|
21
|
+
clearIntervalAndBatch(data, batch)
|
22
|
+
errorCallback() if errorCallback != undefined
|
20
23
|
|
21
24
|
error: (message) ->
|
22
25
|
$('#batch-progress').html('Batch status request failed')
|
@@ -34,8 +37,11 @@ class CanvasBatchProgress
|
|
34
37
|
|
35
38
|
delay = (ms, func) -> setTimeout func, ms
|
36
39
|
|
37
|
-
|
38
|
-
|
40
|
+
clearIntervalAndBatch = (data, batch) ->
|
41
|
+
clearInterval(window.batchInterval)
|
42
|
+
$('#batch-progress').html(data)
|
43
|
+
clearBatchFromSession(batch.id)
|
39
44
|
|
45
|
+
$ ->
|
40
46
|
$("#batch-container").unbind().bind "batchStarted", (event, data) ->
|
41
47
|
new CanvasBatchProgress()
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coalescing_panda
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Mills
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-11-
|
13
|
+
date: 2014-11-26 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -307,7 +307,7 @@ files:
|
|
307
307
|
- app/assets/javascripts/bootstrap/bootstrap-datepicker.js
|
308
308
|
- app/assets/javascripts/bootstrap/bootstrap.js
|
309
309
|
- app/assets/javascripts/coalescing_panda/application.js
|
310
|
-
- app/assets/javascripts/coalescing_panda/canvas_batch.js.coffee
|
310
|
+
- app/assets/javascripts/coalescing_panda/canvas_batch.js.coffee
|
311
311
|
- app/assets/javascripts/coalescing_panda/oauth2.js.coffee
|
312
312
|
- app/assets/stylesheets/bootstrap/bootstrap-datepicker.css
|
313
313
|
- app/assets/stylesheets/bootstrap/bootstrap-overrides.css.scss
|