Skip to content

Commit

Permalink
Fix gauge initialisation, upgrade problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Conway-Jones committed Feb 18, 2017
1 parent 1f50f44 commit 94f6c7f
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 10 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@

### 2.3.1: Maintenance Release

**Fixes**

Fix gauge initialisation for upgrading dashboard version

### 2.3.0: Milestone Release

**Enhancements**
Expand Down
2 changes: 1 addition & 1 deletion dist/dashboard.appcache
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ fonts/fontawesome-webfont.woff2
NETWORK:
*

# hash: ed7180349e2d72a163a443ac1f8e9b30370cf59378691616fde53d4ff352fe6f
# hash: 3566d900ca8e1b74bd454b935c0cd41269761720b89679826087b1757ed3e831
2 changes: 1 addition & 1 deletion dist/js/app.min.js

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions nodes/ui_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,14 @@

var site = { name:"Node-RED Dashboard", hideToolbar:"false", allowSwipe:"false", dateFormat:"DD/MM/YYYY", sizes:sizes }
if (globalDashboardNode !== null) {
site = {
name: globalDashboardNode.site.name || globalDashboardNode.name || "Node-RED Dashboard",
hideToolbar: globalDashboardNode.site.hideToolbar || "false",
allowSwipe: globalDashboardNode.site.allowSwipe || "false",
dateFormat: globalDashboardNode.site.dateFormat || "DD/MM/YYYY",
sizes: globalDashboardNode.site.sizes
if (typeof globalDashboardNode.site !== "undefined") {
site = {
name: globalDashboardNode.site.name || globalDashboardNode.name,
hideToolbar: globalDashboardNode.site.hideToolbar,
allowSwipe: globalDashboardNode.site.allowSwipe,
dateFormat: globalDashboardNode.site.dateFormat,
sizes: globalDashboardNode.site.sizes
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-red-dashboard",
"version": "2.3.0",
"version": "2.3.1",
"description": "A set of dashboard nodes for Node-RED",
"keywords": [
"node-red"
Expand Down
7 changes: 6 additions & 1 deletion ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -396,5 +396,10 @@ function getTheme() {
}

function getSizes() {
return baseConfiguration.site.sizes;
if (baseConfiguration && baseConfiguration.hasOwnProperty("site") && (typeof baseConfiguration.site !== "undefined") && baseConfiguration.site.hasOwnProperty("sizes")) {
return baseConfiguration.site.sizes;
}
else {
return { sx:48, sy:48, gx:6, gy:6, cx:6, cy:6, px:0, py:0 };
}
}

0 comments on commit 94f6c7f

Please sign in to comment.