diff --git a/config.yml b/config.yml index 29d8a86..887545e 100644 --- a/config.yml +++ b/config.yml @@ -61,7 +61,7 @@ amda: "http://cdpp.irap.omp.eu/BASE/DDService/getDataUrl.php?dataSet={dataSet}&S # `title` appears on mouse hover # `locked` is for sources that are "coming soon" # `default` sources are shown to incoming visitors, others need user activation -sources: +targets: - type: 'planet' slug: 'mercury' name: 'Mercury' @@ -101,7 +101,7 @@ sources: - slug: 'tao_mars_sw' started_at: "1990-01-01T01:30:00" stopped_at: "2017-02-19T00:00:00" - locked: true + locked: false default: true - type: 'planet' slug: 'jupiter' @@ -167,9 +167,9 @@ sources: #Jupiter tao_jup_sw 1990-01-01T01:00 2017-02-19T00:00 #Saturn tao_sat_sw 1990-01-01T01:30 2017-02-19T00:00 -models: - jupiter: - name: Jupiter - model: tao_jup_sw - started_at: "1990-01-01T01:30:00" - stopped_at: "2017-02-19T00:00:00" +#models: +# jupiter: +# name: Jupiter +# model: tao_jup_sw +# started_at: "1990-01-01T01:30:00" +# stopped_at: "2017-02-19T00:00:00" diff --git a/web/run.py b/web/run.py index c2f47e9..1f14906 100755 --- a/web/run.py +++ b/web/run.py @@ -156,7 +156,7 @@ def datetime_from_list(time_list): def get_source_config(slug): - for s in config['sources']: + for s in config['targets']: if s['slug'] == slug: return s raise Exception("No source found for slug '%s'." % slug) @@ -224,10 +224,10 @@ def favicon(): @app.route("/index.html") def home(): return render_view('home.html.jinja2', { - 'sources': config['sources'], - 'planets': [s for s in config['sources'] if s['type'] == 'planet'], - 'probes': [s for s in config['sources'] if s['type'] == 'probe'], - 'comets': [s for s in config['sources'] if s['type'] == 'comet'], + 'targets': config['targets'], + 'planets': [s for s in config['targets'] if s['type'] == 'planet'], + 'probes': [s for s in config['targets'] if s['type'] == 'probe'], + 'comets': [s for s in config['targets'] if s['type'] == 'comet'], }) diff --git a/web/static/js/swapp.js b/web/static/js/swapp.js index 495ecd2..43edd06 100644 --- a/web/static/js/swapp.js +++ b/web/static/js/swapp.js @@ -4,7 +4,7 @@ GOLDEN_RATIO = 2 / (1 + Math.sqrt(5)); out$.SpaceWeather = SpaceWeather = (function(){ SpaceWeather.displayName = 'SpaceWeather'; - var prototype = SpaceWeather.prototype, constructor = SpaceWeather; + var timeSeries, prototype = SpaceWeather.prototype, constructor = SpaceWeather; function SpaceWeather(configuration){ var configs, res$, k, this$ = this; this.configuration = configuration; @@ -108,9 +108,9 @@ }); return promise; }; + timeSeries = []; SpaceWeather.prototype.createTimeSeries = function(source, data){ - var timeSeries, this$ = this; - timeSeries = []; + var this$ = this; this.configuration['parameters'].forEach(function(parameter){ var container, id, title; container = this.configuration['time_series_container']; diff --git a/web/static/js/swapp.ls b/web/static/js/swapp.ls index 92fefd2..483ab3a 100644 --- a/web/static/js/swapp.ls +++ b/web/static/js/swapp.ls @@ -78,8 +78,8 @@ export class SpaceWeather ) promise + timeSeries = [] createTimeSeries: (source, data) -> - timeSeries = [] @configuration['parameters'].forEach((parameter) -> container = @configuration['time_series_container'] id = parameter['id'] ; title = parameter['title'] diff --git a/web/view/home.html.jinja2 b/web/view/home.html.jinja2 index 2447f61..43b6020 100755 --- a/web/view/home.html.jinja2 +++ b/web/view/home.html.jinja2 @@ -68,11 +68,10 @@ {#