Skip to content

Commit

Permalink
v1.1-beta.512
Browse files Browse the repository at this point in the history
  • Loading branch information
genemars committed Jan 10, 2016
1 parent 7ac55ea commit fb5212f
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</div>

<div class="ui-grid-b" align="center" style="font-size:18pt;line-height:20px;margin-top:4px">
<div class="ui-block-a">
<div data-ui-field="btn_watt_load" class="ui-block-a" style="cursor:pointer">
<div style="margin-left:6px;font-size:8pt;text-transform:uppercase">Actual load</div>
<span class="hg-indicator-energy" style="padding-left:0;padding-top:5px;width:20px;">&nbsp;</span> <span data-ui-field="wattload">0.00</span>
</div>
Expand All @@ -25,7 +25,7 @@
</div>
</div>

<div data-ui-field="kwcounter" align="center" style="font-size:20pt"></div>
<div data-ui-field="kwcounter" align="center" style="font-size:20pt;cursor:pointer"></div>

<div style="position:absolute;bottom:0;height:140px;right:0;left:0;margin:1px;padding:4px;background-color:rgba(0,0,0,0.3);border-bottom-left-radius: 8px;border-bottom-right-radius: 8px;">
<div data-ui-field="energystats" style="height:140px;background-color:transparent;width:100%;"></div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[{
Name: "Unknown Module",
Author: "Generoso Martello",
Version: "2015-01-25",
Version: "2016-01-10",

GroupName: '',
IconImage: 'pages/control/widgets/homegenie/generic/images/power.png',
Expand All @@ -10,10 +10,13 @@
Initialized: false,
Widget: null,
LastDrawStats: new Date(0),
_fieldName: 'WattLoad',
_fieldDesc: 'Watt Load',

RenderView: function (cuid, module) {
var container = $(cuid);
var widget = this.Widget = container.find('[data-ui-field=widget]');
var _this = this;
if (!this.Initialized)
{
this.Widget.find('[data-ui-field=energystats]').qtip({
Expand All @@ -33,7 +36,7 @@
fixed: true
}
});
this.Widget.find('[data-ui-field=energystats]').bind("plothover", function (event, pos, item) {
this.Widget.find('[data-ui-field=energystats]').on('plothover', function (event, pos, item) {
// Grab the API reference
var graph = $(this),
api = graph.qtip(),
Expand All @@ -55,6 +58,18 @@
api.show(item);
}
});
this.Widget.find('[data-ui-field=btn_watt_load]').on('click', function(){
_this._fieldName = 'WattLoad';
_this._fieldDesc = 'Watt Load';
_this.LastDrawStats = new Date();
_this.DrawStats('');
});
this.Widget.find('[data-ui-field=kwcounter]').on('click', function(){
_this._fieldName = 'KwCounter';
_this._fieldDesc = 'kW Counter';
_this.LastDrawStats = new Date();
_this.DrawStats('');
});
}
// render widget
this.DrawData();
Expand Down Expand Up @@ -84,7 +99,7 @@
var showbars = true;

$.ajax({
url: '/' + HG.WebApp.Data.ServiceKey + '/HomeAutomation.HomeGenie/Config/Modules.StatisticsGet/HomeAutomation.EnergyMonitor/1/EnergyMonitor.KwCounter',
url: '/' + HG.WebApp.Data.ServiceKey + '/HomeAutomation.HomeGenie/Config/Modules.StatisticsGet/HomeAutomation.EnergyMonitor/1/EnergyMonitor.'+this._fieldName,
type: 'GET',
dataType: 'json',
success: function (counterData) {
Expand All @@ -103,7 +118,7 @@
try {
var dateFormat = dataStore.get('UI.DateFormat');
$.plot(_this.Widget.find('[data-ui-field=energystats]'), [
{ label: 'kW counter&nbsp;', data: dataSerie, lines: { show: true, lineWidth: 2.0 }, bars: { show: false }, splines: { show: false }, points: { show: true } }
{ label: _this._fieldDesc+'&nbsp;', data: dataSerie, lines: { show: true, lineWidth: 2.0 }, bars: { show: false }, splines: { show: false }, points: { show: true } }
],
{
yaxis: {
Expand Down
4 changes: 3 additions & 1 deletion HISTORY.TXT
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
RELEASE HISTORY

10/01/2015 v1.1-beta.512
10/01/2016 v1.1-beta.512
- Energy Monitor widget now shows Watt load graph as default
- Updated Russian and French locales
- Improved crontab input field with autocomplete
- Updated compression library (latest HEAD SharpZipLib from master repo)

Expand Down
8 changes: 5 additions & 3 deletions HomeGenie/release_info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
<Name>HomeGenie</Name>
<Version>1.1 beta r512</Version>
<Description>Latest public release.</Description>
<ReleaseNote> - Fixed compression/decompression issues
- Improved crontab input field with autocomplete</ReleaseNote>
<ReleaseDate>2016-01-09T21:08:12.0000Z</ReleaseDate>
<ReleaseNote> - Energy Monitor widget now shows Watt load graph as default
- Updated Russian and French locales
- Improved crontab input field with autocomplete
- Updated compression library (latest HEAD SharpZipLib from master repo)</ReleaseNote>
<ReleaseDate>2016-01-10T12:28:21.0000Z</ReleaseDate>
</ReleaseInfo>
Loading

0 comments on commit fb5212f

Please sign in to comment.