Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7ce090e

Browse files
committed
v8.12.5 Release: Fix dependency page loading, Prevent loading of Highstock JS more than once
1 parent fcc0056 commit 7ce090e

8 files changed

Lines changed: 25 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 8.12.5 (2021-09-01)
2+
3+
### Bugfixes
4+
5+
- Fix dependency page loading
6+
- Prevent loading of Highstock JS more than once
7+
8+
19
## 8.12.4 (2021-08-31)
210

311
### Bugfixes

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Mycodo
33

44
Environmental Regulation System
55

6-
Latest version: 8.12.4
6+
Latest version: 8.12.5
77

88
Mycodo is open source software for the Raspberry Pi that couples inputs and outputs in interesting ways to sense and manipulate the environment.
99

mycodo/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
sys.path.append(os.path.abspath(os.path.dirname(__file__)))
1414
from config_translations import TRANSLATIONS
1515

16-
MYCODO_VERSION = '8.12.4'
16+
MYCODO_VERSION = '8.12.5'
1717
ALEMBIC_VERSION = '6e394f2e8fec'
1818

1919
# FORCE_UPGRADE_MASTER

mycodo/mycodo_flask/routes_admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ def admin_dependencies(device):
344344
if device in each_section:
345345
# Determine if a message for the dependencies exists
346346
if "dependencies_message" in each_section[device]:
347-
dependencies_message = each_section[device_name]["dependencies_message"]
347+
dependencies_message = each_section[device]["dependencies_message"]
348348

349349
# Find friendly name for device
350350
for each_device_, each_val in each_section[device].items():

mycodo/mycodo_flask/templates/pages/dashboard.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
{% set active_page = "dashboard" %}
33
{% set help_page = ["https://kizniche.github.io/Mycodo/Data-Viewing/#dashboard", dict_translation['dashboard']['title']] %}
44

5+
{% set dashboard_dict = dict() %}
6+
57
{% block title %} - {% for each_dash in dashboards if each_dash.unique_id == dashboard_id %}{{each_dash.name}}{% endfor %} {{dict_translation['dashboard']['title']}}{% endblock %}
68

79
{% block head %}

mycodo/widgets/widget_gauge_angular.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,10 @@ def generate_page_variables(widget_unique_id, widget_options):
201201
}
202202
],
203203

204-
'widget_dashboard_head': """<script src="/static/js/user_js/highstock-9.1.2.js"></script>
204+
'widget_dashboard_head': """{% if "highstock" not in dashboard_dict %}
205+
<script src="/static/js/user_js/highstock-9.1.2.js"></script>
206+
{% set _dummy = dashboard_dict.update({"highstock": 1}) %}
207+
{% endif %}
205208
<script src="/static/js/user_js/highcharts-more-9.1.2.js"></script>
206209
207210
{% if current_user.theme in dark_themes %}

mycodo/widgets/widget_gauge_solid.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,10 @@ def generate_page_variables(widget_unique_id, widget_options):
223223
}
224224
],
225225

226-
'widget_dashboard_head': """<script src="/static/js/user_js/highstock-9.1.2.js"></script>
226+
'widget_dashboard_head': """{% if "highstock" not in dashboard_dict %}
227+
<script src="/static/js/user_js/highstock-9.1.2.js"></script>
228+
{% set _dummy = dashboard_dict.update({"highstock": 1}) %}
229+
{% endif %}
227230
<script src="/static/js/user_js/highcharts-more-9.1.2.js"></script>
228231
<script src="/static/js/user_js/solid-gauge-9.1.2.js"></script>
229232

mycodo/widgets/widget_graph_synchronous.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,10 @@ def generate_page_variables(widget_unique_id, widget_options):
312312
}
313313
],
314314

315-
'widget_dashboard_head': """<script type="text/javascript" src="/static/js/user_js/highstock-9.1.2.js"></script>
315+
'widget_dashboard_head': """{% if "highstock" not in dashboard_dict %}
316+
<script type="text/javascript" src="/static/js/user_js/highstock-9.1.2.js"></script>
317+
{% set _dummy = dashboard_dict.update({"highstock": 1}) %}
318+
{% endif %}
316319
<script type="text/javascript" src="/static/js/user_js/highcharts-more-9.1.2.js"></script>
317320
<script type="text/javascript" src="/static/js/user_js/data-9.1.2.js"></script>
318321
<script type="text/javascript" src="/static/js/user_js/exporting-9.1.2.js"></script>

0 commit comments

Comments
 (0)