Skip to content

Commit 4432609

Browse files
committed
Fix for Revolt energy meter graph
1 parent 2a98d2f commit 4432609

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

www/app/DashboardController.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3320,19 +3320,19 @@ define(['app'], function (app) {
33203320
status=" ";
33213321
}
33223322
}
3323-
else if ((item.Type == "Current")||(item.Type == "Current/Energy")) {
3324-
xhtm+='current48.png" class="lcursor" onclick="ShowCurrentLog(\'#dashcontent\',\'ShowFavorites\',' + item.idx + ',\'' + escape(item.Name) + '\', ' + item.displaytype + ');" height="40" width="40"></td>\n';
3325-
status=item.Data;
3326-
}
3327-
else if ((item.Type == "Energy")||(item.SubType=="kWh")) {
3328-
if (((item.Type == "Energy")||(item.SubType=="kWh"))&&(item.SwitchTypeVal == 4)) {
3323+
else if ((item.Type == "Energy")||(item.Type == "Current/Energy")||(item.SubType=="kWh")) {
3324+
if (((item.Type == "Energy")||(item.Type == "Current/Energy")||(item.SubType=="kWh"))&&(item.SwitchTypeVal == 4)) {
33293325
xhtm+='PV48.png" class="lcursor" onclick="ShowCounterLogSpline(\'#dashcontent\',\'ShowFavorites\',' + item.idx + ',\'' + escape(item.Name) + '\', ' + item.SwitchTypeVal + ');" height="40" width="40"></td>\n';
33303326
}
33313327
else {
33323328
xhtm+='current48.png" class="lcursor" onclick="ShowCounterLogSpline(\'#dashcontent\',\'ShowFavorites\',' + item.idx + ',\'' + escape(item.Name) + '\', ' + item.SwitchTypeVal + ');" height="40" width="40"></td>\n';
33333329
}
33343330
status=item.Data;
33353331
}
3332+
else if (item.Type == "Current") {
3333+
xhtm+='current48.png" class="lcursor" onclick="ShowCurrentLog(\'#dashcontent\',\'ShowFavorites\',' + item.idx + ',\'' + escape(item.Name) + '\', ' + item.displaytype + ');" height="40" width="40"></td>\n';
3334+
status=item.Data;
3335+
}
33363336
else if (item.Type == "Air Quality") {
33373337
xhtm+='air48.png" class="lcursor" onclick="ShowAirQualityLog(\'#dashcontent\',\'ShowFavorites\',' + item.idx + ',\'' + escape(item.Name) + '\');" height="40" width="40"></td>\n';
33383338
status=item.Data + " (" + item.Quality + ")";

www/app/UtilityController.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1372,12 +1372,6 @@ define(['app'], function (app) {
13721372
xhtm+='<a class="btnsmall" onclick="EditUtilityDevice(' + item.idx + ',\'' + escape(item.Name) + '\',\'' + escape(item.Description) + '\');" data-i18n="Edit">Edit</a> ';
13731373
}
13741374
}
1375-
else if ((item.Type == "Current")||(item.Type == "Current/Energy")) {
1376-
xhtm+='<a class="btnsmall" onclick="ShowCurrentLog(\'#utilitycontent\',\'ShowUtilities\',' + item.idx + ',\'' + escape(item.Name) + '\', ' + item.displaytype + ');" data-i18n="Log">Log</a> ';
1377-
if (permissions.hasPermission("Admin")) {
1378-
xhtm+='<a class="btnsmall" onclick="EditUtilityDevice(' + item.idx + ',\'' + escape(item.Name) + '\',\'' + escape(item.Description) + '\');" data-i18n="Edit">Edit</a> ';
1379-
}
1380-
}
13811375
else if ((item.Type == "Energy")||(item.SubType == "kWh")||(item.Type == "Current/Energy")) {
13821376
xhtm+='<a class="btnsmall" onclick="ShowCounterLogSpline(\'#utilitycontent\',\'ShowUtilities\',' + item.idx + ',\'' + escape(item.Name) + '\', ' + item.SwitchTypeVal + ');" data-i18n="Log">Log</a> ';
13831377
if (permissions.hasPermission("Admin")) {
@@ -1388,6 +1382,12 @@ define(['app'], function (app) {
13881382
}
13891383
}
13901384
}
1385+
else if (item.Type == "Current") {
1386+
xhtm+='<a class="btnsmall" onclick="ShowCurrentLog(\'#utilitycontent\',\'ShowUtilities\',' + item.idx + ',\'' + escape(item.Name) + '\', ' + item.displaytype + ');" data-i18n="Log">Log</a> ';
1387+
if (permissions.hasPermission("Admin")) {
1388+
xhtm+='<a class="btnsmall" onclick="EditUtilityDevice(' + item.idx + ',\'' + escape(item.Name) + '\',\'' + escape(item.Description) + '\');" data-i18n="Edit">Edit</a> ';
1389+
}
1390+
}
13911391
else if ((item.Type == "Thermostat")&&(item.SubType=="SetPoint")) {
13921392
if (permissions.hasPermission("Admin")) {
13931393
xhtm+='<a class="btnsmall" onclick="ShowTempLog(\'#utilitycontent\',\'ShowUtilities\',' + item.idx + ',\'' + escape(item.Name) + '\');" data-i18n="Log">Log</a> ';

www/html5.appcache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CACHE MANIFEST
2-
# ref 1188
2+
# ref 1189
33

44
CACHE:
55
# CSS

www/js/domoticz.js.gz

-33 KB
Binary file not shown.

0 commit comments

Comments
 (0)