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

Commit

Permalink
[Paper UI] Sort Thing properties by key name alphabetically (#5812)
Browse files Browse the repository at this point in the history
Signed-off-by: Wouter Born <eclipse@maindrain.net>
  • Loading branch information
wborn authored and htreu committed Jun 28, 2018
1 parent d0caf85 commit 36fdc67
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
@@ -1,6 +1,6 @@
<table class="thing-properties-table table">
<tr ng-show="key != 'firmwareVersion'" ng-repeat="(key,value) in thing.properties">
<tr ng-show="key != 'firmwareVersion'" ng-repeat="key in getKeysArray(thing.properties) | orderBy:'+'">
<td>{{key}}</td>
<td>{{value}}</td>
<td>{{thing.properties[key]}}</td>
</tr>
</table>
Expand Up @@ -149,6 +149,10 @@ angular.module('PaperUI.things') //
return camelStr;
}

$scope.getKeysArray = function(object) {
return Object.keys(object);
}

$scope.unlinkChannel = function(channelID, itemName, event) {
var channel = $scope.getChannelById(channelID);
$mdDialog.show({
Expand Down

0 comments on commit 36fdc67

Please sign in to comment.