Commit 866991ff5bbc93fcc55f4229f324da28568938af
1 parent
9854610e
Exists in
master
and in
2 other branches
Add Jupiter's CME catalogs.
Also fix #10
Showing
6 changed files
with
40 additions
and
11 deletions
Show diff stats
CHANGELOG.md
@@ -28,19 +28,25 @@ et prendre aussi | @@ -28,19 +28,25 @@ et prendre aussi | ||
28 | 28 | ||
29 | ## Future ? | 29 | ## Future ? |
30 | 30 | ||
31 | -- [ ] Set the log level to _error_ in production (see `web/run.py`) | ||
32 | - [ ] Rework the images of Rosetta and Juno | 31 | - [ ] Rework the images of Rosetta and Juno |
33 | - [ ] Optimize data aggregation (numpy vectorization?) | 32 | - [ ] Optimize data aggregation (numpy vectorization?) |
34 | -- [ ] IE compat, if you can (I can't) | ||
35 | - [ ] Bump D3JS to v5 (and its promises) | 33 | - [ ] Bump D3JS to v5 (and its promises) |
36 | - [ ] Enable p67 | 34 | - [ ] Enable p67 |
35 | +- [ ] IE compat, if you can (mouahahahahaha good luck) | ||
37 | - [ ] Fix the warmup on the prod server (I was kicked out, do it yourselves) | 36 | - [ ] Fix the warmup on the prod server (I was kicked out, do it yourselves) |
37 | +- [ ] Set the log level to _error_ in production (see `web/run.py` -- DIY) | ||
38 | 38 | ||
39 | 39 | ||
40 | ## 1.9 | 40 | ## 1.9 |
41 | 41 | ||
42 | -- [ ] Auroral Emissions (Jupiter) | ||
43 | -- [ ] Auroral Emissions Fixes | 42 | +- [x] Auroral Emissions (Jupiter) |
43 | +- [x] Auroral Emissions Fixes | ||
44 | +- [x] Enable the Input selector | ||
45 | + | ||
46 | + | ||
47 | +## 1.8.3 | ||
48 | + | ||
49 | +- [x] Fix whitespaces | ||
44 | 50 | ||
45 | 51 | ||
46 | ## 1.8.2 | 52 | ## 1.8.2 |
VERSION
config.yml
@@ -59,7 +59,7 @@ layers: | @@ -59,7 +59,7 @@ layers: | ||
59 | - slug: "hstjupiterobservations" | 59 | - slug: "hstjupiterobservations" |
60 | name: "HST Jupiter" | 60 | name: "HST Jupiter" |
61 | desc: "Hubble Space Telescope Jupiter Observations" | 61 | desc: "Hubble Space Telescope Jupiter Observations" |
62 | - live: false | 62 | + live: true |
63 | - slug: "hstsaturnobservations" | 63 | - slug: "hstsaturnobservations" |
64 | name: "HST Saturn" | 64 | name: "HST Saturn" |
65 | desc: "Hubble Space Telescope Saturn Observations" | 65 | desc: "Hubble Space Telescope Saturn Observations" |
@@ -240,6 +240,8 @@ targets: | @@ -240,6 +240,8 @@ targets: | ||
240 | - slug: 'tao_jup_sta' | 240 | - slug: 'tao_jup_sta' |
241 | sb: | 241 | sb: |
242 | - slug: 'tao_jup_stb' | 242 | - slug: 'tao_jup_stb' |
243 | + tap: | ||
244 | + target_name: 'Jupiter' | ||
243 | locked: false | 245 | locked: false |
244 | default: false | 246 | default: false |
245 | - type: 'planet' | 247 | - type: 'planet' |
web/run.py
@@ -1582,7 +1582,6 @@ def download_auroral_catalog_csv(target): | @@ -1582,7 +1582,6 @@ def download_auroral_catalog_csv(target): | ||
1582 | filename = "%s_auroral_catalog.csv" % (target) | 1582 | filename = "%s_auroral_catalog.csv" % (target) |
1583 | local_csv_file = join(CACHE_DIR, filename) | 1583 | local_csv_file = join(CACHE_DIR, filename) |
1584 | 1584 | ||
1585 | - | ||
1586 | target_name = tc['tap']['target_name'] | 1585 | target_name = tc['tap']['target_name'] |
1587 | emissions = retrieve_auroral_emissions(target_name) | 1586 | emissions = retrieve_auroral_emissions(target_name) |
1588 | 1587 |
web/static/js/main.js
@@ -386,7 +386,7 @@ | @@ -386,7 +386,7 @@ | ||
386 | targetButton.addClass('empty'); | 386 | targetButton.addClass('empty'); |
387 | break; | 387 | break; |
388 | } | 388 | } |
389 | - target.active = false | 389 | + target.active = false; |
390 | targetButton.addClass('failed'); | 390 | targetButton.addClass('failed'); |
391 | targetButton.removeClass('loading'); | 391 | targetButton.removeClass('loading'); |
392 | this$.hideLoader(); | 392 | this$.hideLoader(); |
@@ -531,7 +531,7 @@ | @@ -531,7 +531,7 @@ | ||
531 | if (h in this._image_preview_layers_data) { | 531 | if (h in this._image_preview_layers_data) { |
532 | resolve(app._image_preview_layers_data[h]); | 532 | resolve(app._image_preview_layers_data[h]); |
533 | } else { | 533 | } else { |
534 | - let url_route = "saturn_auroral_catalog.csv"; // FIXME | 534 | + let url_route = target_slug + "_auroral_catalog.csv"; |
535 | let url = app.configuration['api']['root'] + url_route; | 535 | let url = app.configuration['api']['root'] + url_route; |
536 | //url += "/" + url_route; // Extra / yields havoc -- flask? | 536 | //url += "/" + url_route; // Extra / yields havoc -- flask? |
537 | let d3csv = d3.csv(url, csv => { | 537 | let d3csv = d3.csv(url, csv => { |
web/view/home.html.jinja2
@@ -145,7 +145,7 @@ | @@ -145,7 +145,7 @@ | ||
145 | <br /> | 145 | <br /> |
146 | {% endfor %} | 146 | {% endfor %} |
147 | <br /> | 147 | <br /> |
148 | - <input type="button" id="apply_new_input" value="Reload for input" title="[COMING SOON] Reloading may take a while." class="mdl-button mdl-js-button mdl-js-ripple-effect"> | 148 | + <input type="button" id="apply_new_input" value="Reload for input" title="Reloading may take a while." class="mdl-button mdl-js-button mdl-js-ripple-effect"> |
149 | </section> | 149 | </section> |
150 | </details> | 150 | </details> |
151 | 151 | ||
@@ -391,6 +391,7 @@ jQuery().ready(function($){ | @@ -391,6 +391,7 @@ jQuery().ready(function($){ | ||
391 | }); | 391 | }); |
392 | return s < 2; | 392 | return s < 2; |
393 | }; | 393 | }; |
394 | + | ||
394 | $(".targets-filters .target:not(.locked)").on("click", function(e){ | 395 | $(".targets-filters .target:not(.locked)").on("click", function(e){ |
395 | if ($(this).hasClass('loading')) return false; | 396 | if ($(this).hasClass('loading')) return false; |
396 | var switch_on = ! $(this).hasClass('active'); | 397 | var switch_on = ! $(this).hasClass('active'); |
@@ -404,6 +405,7 @@ jQuery().ready(function($){ | @@ -404,6 +405,7 @@ jQuery().ready(function($){ | ||
404 | } | 405 | } |
405 | return false; | 406 | return false; |
406 | }); | 407 | }); |
408 | + | ||
407 | parameters.find(".parameter").click(function(e){ | 409 | parameters.find(".parameter").click(function(e){ |
408 | var switch_on = ! $(this).hasClass('active'); | 410 | var switch_on = ! $(this).hasClass('active'); |
409 | var parameter_slug = $(this).attr('data-ts-slug'); | 411 | var parameter_slug = $(this).attr('data-ts-slug'); |
@@ -416,15 +418,21 @@ jQuery().ready(function($){ | @@ -416,15 +418,21 @@ jQuery().ready(function($){ | ||
416 | } | 418 | } |
417 | return false; | 419 | return false; |
418 | }); | 420 | }); |
421 | + | ||
419 | $('#apply_new_interval').on("click", function(e){ | 422 | $('#apply_new_interval').on("click", function(e){ |
420 | var started_at = moment($("#started_at").val()); | 423 | var started_at = moment($("#started_at").val()); |
421 | var stopped_at = moment($("#stopped_at").val()); | 424 | var stopped_at = moment($("#stopped_at").val()); |
422 | sw.resizeDomain(started_at, stopped_at); | 425 | sw.resizeDomain(started_at, stopped_at); |
423 | return false; | 426 | return false; |
424 | }); | 427 | }); |
428 | + | ||
425 | $('#apply_new_input').on("click", function(e){ | 429 | $('#apply_new_input').on("click", function(e){ |
426 | var new_input_slug = $("input[name='input_slug']:checked").val(); | 430 | var new_input_slug = $("input[name='input_slug']:checked").val(); |
427 | - window.location = "?input_slug="+new_input_slug; | 431 | + var started_at = $("#started_at").val(); |
432 | + var stopped_at = $("#stopped_at").val(); | ||
433 | + window.location = "?input_slug="+new_input_slug+ | ||
434 | + "&started_at="+started_at+ | ||
435 | + "&stopped_at="+stopped_at; | ||
428 | return false; | 436 | return false; |
429 | }); | 437 | }); |
430 | 438 | ||
@@ -435,6 +443,20 @@ jQuery().ready(function($){ | @@ -435,6 +443,20 @@ jQuery().ready(function($){ | ||
435 | else { sw.hideCatalogLayer(catalog_slug); } | 443 | else { sw.hideCatalogLayer(catalog_slug); } |
436 | }); | 444 | }); |
437 | 445 | ||
446 | + $('#option-layer-hstjupiterobservations').on("click", function(e){ | ||
447 | + var that = $(this); | ||
448 | + var catalog_slug = $(this).attr('value'); | ||
449 | + var checked = $(this).prop('checked'); | ||
450 | + if (checked) { | ||
451 | + $(this).addClass('loading'); | ||
452 | + sw.showImagePreviewLayer("jupiter", catalog_slug).finally( function(){ | ||
453 | + that.removeClass('loading'); | ||
454 | + }); | ||
455 | + } else { | ||
456 | + sw.hideImagePreviewLayer("jupiter", catalog_slug); | ||
457 | + } | ||
458 | + }); | ||
459 | + | ||
438 | $('#option-layer-hstsaturnobservations').on("click", function(e){ | 460 | $('#option-layer-hstsaturnobservations').on("click", function(e){ |
439 | var that = $(this); | 461 | var that = $(this); |
440 | var catalog_slug = $(this).attr('value'); | 462 | var catalog_slug = $(this).attr('value'); |