Show state attributes in default more info dialog

pull/21/merge
Paulus Schoutsen 2015-01-12 23:57:57 -08:00
parent b9a08bb25d
commit d1ad6f3e65
3 changed files with 47 additions and 10 deletions

View File

@ -1,2 +1,2 @@
""" DO NOT MODIFY. Auto-generated by build_frontend script """
VERSION = "7484b7aecbe15593d924b47daf4a89df"
VERSION = "b32ea78a1157b29555410384fe251dc9"

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,44 @@
<link rel="import" href="../bower_components/polymer/polymer.html">
<polymer-element name="more-info-default" attributes="stateObj" noscript>
<template>
<div>
There is no extra info for domain '{{stateObj.domain}}' yet.
</div>
</template>
<polymer-element name="more-info-default" attributes="stateObj">
<template>
<style>
.data-entry {
margin-bottom: 8px;
}
.data-entry:last-child {
margin-bottom: 0;
}
.data {
padding-left: 10px;
text-align: right;
word-break: break-all;
max-width: 200px;
}
</style>
<div layout vertical>
<template repeat="{{key in stateObj.attributes | getKeys}}">
<div layout justified horizontal class='data-entry' id='rising'>
<div>
{{key}}
</div>
<div class='data'>
{{stateObj.attributes[key]}}
</div>
</div>
</template>
</div>
</template>
<script>
Polymer({
getKeys: function(obj) {
return Object.keys(obj || {});
},
});
</script>
</polymer-element>