-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cloud Export integration, saving & display (#1192)
* initial exports per map display * integration with new LDI v0.10.0, uploading status.json URL * yarn.lock * fix * tab tweak * console * LDI update to v0.11.0 * almost working!! * working! * docs link * Update package.json * bump LDI to v0.11.5 * fix popper * moved popper/bootstrap * new LDI * fixed map_id in new map template * fixed popper to popper.js * include correct file * Tweak for precompiling assets * Move styling to stylesheets for login page (#1220) * initial exports per map display * integration with new LDI v0.10.0, uploading status.json URL * yarn.lock * fix * tab tweak * console * LDI update to v0.11.0 * almost working!! * working! * docs link * Update package.json * bump LDI to v0.11.5 * fix popper * moved popper/bootstrap * new LDI * fixed map_id in new map template * fixed popper to popper.js * include correct file * Tweak for precompiling assets * commenting out closure delay (function(){})() * popper properly included via bootstrap bundle * add SSL https://export.mapknitter.org * "reorder for avoiding function hoisting" merge from unstable * Remove dropping database on redeploying container * Fix missed doublequote * Add asset compilation to Makefile * Try exec instead of run * Move asset building * Wrap yarn call in Makefile * Mimic plots2 deployment config * Find assets! * Restore Makefile * Update Map.js * Update _cloud_exports.html.erb * Update _cloud_exports.html.erb * Update Map.js Co-authored-by: Sebastian Silva <sebastian@somosazucar.org> Co-authored-by: Ruturaj Mohite <53974118+gr455@users.noreply.github.com> Co-authored-by: Sebastian Silva <sebastian@fuentelibre.org>
- Loading branch information
1 parent
964d2b2
commit 36f6d77
Showing
12 changed files
with
240 additions
and
4,056 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<p><a href="https://publiclab.org/wiki/mapknitter-cloud-exporter">Using the Cloud Exporter »</a></p> | ||
<div class="mapknitter-cloud-exports" id="cloud-exports"> | ||
<% exports.order(created_at: :desc).each_with_index do |export, i| %> | ||
<p class="export mapknitter-cloud-export" style="font-size:11px;"> | ||
<b>Export <%= exports.count - i %>:</b> | ||
(<a href="<%= export.export_url %>">status</a>) | ||
</p> | ||
<% end %> | ||
</div> | ||
<script> | ||
(function() { | ||
$('.mapknitter-cloud-exports .mapknitter-cloud-export').each(function collectExportUrls() { | ||
var export_el = $(this); | ||
var export_url = export_el.find('a').attr('href'); | ||
$.ajax(export_url).done(function displayExportStatus(response) { | ||
response = JSON.parse(response); | ||
console.log(response, response.status); | ||
|
||
if (response.status) export_el.append(' <i class="status">' + response.status + '</i>'); | ||
if (response.jpg) export_el.append(' <span class="file"><a href="https://mapknitter-exports-warps.storage.googleapis.com/' + response.jpg.split('public/warps/')[1] + '">JPG</span>'); | ||
if (response.geotiff) export_el.append(' <span class="file"><a href="https://mapknitter-exports-warps.storage.googleapis.com/' + response.geotiff.split('public/warps/')[1] + '">GeoTiff</span>'); | ||
|
||
export_el.append('<br />'); | ||
|
||
if (response.height && response.width) export_el.append(' <span class="meta">' + response.height + 'x' + response.width + '</span>'); | ||
if (response.size) export_el.append(' <span class="meta">' + (response.size.split('B')[0]/1000000) + 'MB</span>'); | ||
if (response.zip) export_el.append(' <span class="file"><a href="https://mapknitter-exports-warps.storage.googleapis.com/' + response.zip.split('public/tms/')[1].split('.zip')[0] + "/" + response.zip.split('public/tms/')[1] + '">TMS (zip)</span>'); | ||
if (response.start_time) export_el.append(' <i class="start_time">' + response.start_time + '</i>'); | ||
}); | ||
}) | ||
})() | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.