diff options
| author | Alban Peignier | 2015-05-19 11:00:47 +0200 |
|---|---|---|
| committer | Alban Peignier | 2015-05-19 11:00:47 +0200 |
| commit | 840c0ee89722930d63d5f12fdbbf76adfbc8a717 (patch) | |
| tree | 6e15856ec6a756fbaf191b32f592c8cedacde51b /app/assets/javascripts/partials | |
| parent | 53ec8195413d0137f439073a5fd9862ca4eb4a20 (diff) | |
| download | chouette-core-840c0ee89722930d63d5f12fdbbf76adfbc8a717.tar.bz2 | |
Reload Import/Export/Validation pages every 30s when job is started
Diffstat (limited to 'app/assets/javascripts/partials')
| -rw-r--r-- | app/assets/javascripts/partials/ie_report.js.coffee.erb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/app/assets/javascripts/partials/ie_report.js.coffee.erb b/app/assets/javascripts/partials/ie_report.js.coffee.erb index 3e38ce87b..ec9e5f836 100644 --- a/app/assets/javascripts/partials/ie_report.js.coffee.erb +++ b/app/assets/javascripts/partials/ie_report.js.coffee.erb @@ -1,5 +1,5 @@ -$(".imports.show, .exports.show").ready -> - +$(".imports.show, .exports.show").ready -> + get_export_results = (html_container, html_element) -> html_container.children().each -> if( $( this ).is(html_element) ) @@ -40,7 +40,7 @@ $(".imports.show, .exports.show").ready -> { object: $("th.stop_areas").text(), value: $(".lines table").data("total-stop_areas") }, { object: $("th.access_points").text(), value: $(".lines table").data("total-access_points") }, { object: $("th.vehicle_journeys").text(), value: $(".lines table").data("total-vehicle_journeys") }, - { object: $("th.journey_patterns").text(), value: $(".lines table").data("total-journey_patterns") }, + { object: $("th.journey_patterns").text(), value: $(".lines table").data("total-journey_patterns") }, ], xkey: 'object', ykeys: ['value'], @@ -51,3 +51,8 @@ $(".imports.show, .exports.show").ready -> hideHover: true }).on('click', update = (i, row) -> get_export_results( $(".report"), $("div.lines")) ) + + refreshInterval = $(".report").data("refresh-interval") + if refreshInterval > 0 + reloadPage = () -> window.location.reload() + setInterval(reloadPage,refreshInterval * 1000) |
