mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Add description support to UI (#3079)
This commit is contained in:
parent
4d2390daf4
commit
eda168247c
@ -37,6 +37,7 @@ class HassioAddonNetwork extends EventsMixin(PolymerElement) {
|
|||||||
<tr>
|
<tr>
|
||||||
<th>Container</th>
|
<th>Container</th>
|
||||||
<th>Host</th>
|
<th>Host</th>
|
||||||
|
<th>Description</th>
|
||||||
</tr>
|
</tr>
|
||||||
<template is="dom-repeat" items="[[config]]">
|
<template is="dom-repeat" items="[[config]]">
|
||||||
<tr>
|
<tr>
|
||||||
@ -47,6 +48,7 @@ class HassioAddonNetwork extends EventsMixin(PolymerElement) {
|
|||||||
no-label-float=""
|
no-label-float=""
|
||||||
></paper-input>
|
></paper-input>
|
||||||
</td>
|
</td>
|
||||||
|
<td>[[item.description]]</td>
|
||||||
</tr>
|
</tr>
|
||||||
</template>
|
</template>
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -89,9 +91,11 @@ class HassioAddonNetwork extends EventsMixin(PolymerElement) {
|
|||||||
if (!addon) return;
|
if (!addon) return;
|
||||||
|
|
||||||
const network = addon.network || {};
|
const network = addon.network || {};
|
||||||
|
const description = addon.network_description || {};
|
||||||
const items = Object.keys(network).map((key) => ({
|
const items = Object.keys(network).map((key) => ({
|
||||||
container: key,
|
container: key,
|
||||||
host: network[key],
|
host: network[key],
|
||||||
|
description: description[key],
|
||||||
}));
|
}));
|
||||||
this.config = items.sort(function(el1, el2) {
|
this.config = items.sort(function(el1, el2) {
|
||||||
return el1.host - el2.host;
|
return el1.host - el2.host;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user