From 5f5234d2a83150cd9b2c87b507a77a2f46c55539 Mon Sep 17 00:00:00 2001 From: Fedor Baart Date: Wed, 13 Dec 2017 17:33:42 +0100 Subject: [PATCH] tide info for old models --- app/scripts/realtime.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/scripts/realtime.js b/app/scripts/realtime.js index 7bb2dbc..2da256f 100644 --- a/app/scripts/realtime.js +++ b/app/scripts/realtime.js @@ -44,7 +44,20 @@ _.each(realtime, (el) => { el.loaded = false; }); + this.realtime = json.realtime; + if (_.has(this.model, 'realtime')) { + this.realtime.push(this.model.realtime); + if (!_.has(this.model.realtime, 'title')) { + this.model.realtime.title = 'Model timeseries'; + } + if (!_.has(this.model.realtime, 'abstract')) { + this.model.realtime.abstract = 'Timeseries extracted from model'; + } + if (!_.has(this.model.realtime, 'types')) { + this.model.realtime.types = ['waterlevel']; + } + } }); },