Skip to content
This repository has been archived by the owner on May 23, 2019. It is now read-only.

Commit

Permalink
feat(ZWave): Improve rendering of device last wakeup time
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Jackson <chris@cd-jackson.com>
  • Loading branch information
cdjackson committed May 24, 2016
1 parent 03a24ad commit f8158ee
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
12 changes: 10 additions & 2 deletions src/app/configuration/thingAttributesZWave.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,18 @@

<div class="row" ng-if="selectedThing.properties['zwave_wakeup_time']">
<div class="col-md-4" i18n="zwave.WakeupTime"></div>
<div class="col-md-8">{{selectedThing.properties['zwave_wakeup_time']}}</div>
<div class="col-md-8">
<span>{{selectedThing.properties['zwave_wakeup_time'] | amUtc | amLocal | amDateFormat:'dddd, MMMM Do YYYY, hh:mm:ss'}}</span>
<span class="fa fa-history text-muted"></span>
<span am-time-ago="selectedThing.properties['zwave_wakeup_time']"></span>
</div>
</div>

<div class="row" ng-if="selectedThing.properties['zwave_neighbours']">
<div class="col-md-4" i18n="zwave.Neighbors"></div>
<div class="col-md-8">{{selectedThing.properties['zwave_neighbours'].split(",").join(", ")}}</div>
<div class="col-md-8">
{{selectedThing.properties['zwave_neighbours'].split(",").length}} nodes
<span class="fa fa-exchange text-muted"></span>
{{selectedThing.properties['zwave_neighbours'].split(",").join(", ")}}
</div>
</div>
3 changes: 2 additions & 1 deletion src/app/configuration/thingConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ angular.module('Config.Things', [
'ngInputModified',
'ngPromiseExtras',
'sitemapSwitchWidget',
'bootstrapCombo'
'bootstrapCombo',
'angularMoment'
])

.config(function config($stateProvider) {
Expand Down
6 changes: 3 additions & 3 deletions src/app/configuration/thingConfig.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -235,16 +235,16 @@
</div>
</div>

<div ng-if="selectedThing.channels.length">
<button type="button" class="btn"
<div ng-if="selectedThing.channels.length" class="pull-right">
<button type="button" class="btn btn-xs"
ng-click="refreshChannelItems()"
tooltip-placement="top" tooltip="Refresh all items on this thing"
tooltip-popup-delay="1500"
tooltip-enable="true" tooltip-trigger
tooltip-animation="false"
tooltip-append-to-body="true">
<span class="fa fa-refresh"></span>
<span>Refresh Items</span>
<span i18n="thing.RefreshItems">Refresh Items</span>
</button>
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion src/languages/en-GB/thing.lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@
"ChannelUnlinkConfirm": "Are you sure you wish to unlink the item from the channel?<br>This will not delete the item, and you will be able to relink it later if you wish.",
"ChannelDeleteTitle": "Delete Item from Channel",
"ChannelDeleteConfirm": "Are you sure you wish to delete the item and unlink it from the channel?<br>This will completely delete the item!",
"Attributes": "Attributes"
"Attributes": "Attributes",
"RefreshItems": "Refresh Items"
}

0 comments on commit f8158ee

Please sign in to comment.