UNPKG

@openhab-ui/setup-and-maintenance

Version:

Configuration and maintenance interface for openHAB

33 lines 13.9 kB
<html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1,user-scalable=yes"><link rel="icon" href="img/favicon.ico"><link rel="manifest" href="/manifest.json"><link rel="preload" href="fonts/fa-regular-400.woff2" as="font" type="font/woff2" crossorigin="anonymous"><link rel="preload" href="fonts/fa-solid-900.woff2" as="font" type="font/woff2" crossorigin="anonymous"><link rel="preload" href="fonts/roboto-v18-latin-ext_greek_cyrillic_cyrillic-ext_greek-ext_latin_vietnamese-regular.woff2" as="font" type="font/woff2" crossorigin="anonymous"><link rel="preload" href="fonts/roboto-v18-latin-ext_greek_cyrillic_cyrillic-ext_greek-ext_latin_vietnamese-500.woff2" as="font" type="font/woff2" crossorigin="anonymous"><link rel="preload" href="fonts/roboto-v18-latin-ext_greek_cyrillic_cyrillic-ext_greek-ext_latin_vietnamese-700.woff2" as="font" type="font/woff2" crossorigin="anonymous"><link rel="preload" href="img/pattern_opacity.png" as="image"><link rel="preload" href="img/openhab-logo.svg" as="image"><link rel="stylesheet" href="css/main.css" type="text/css"><link rel="stylesheet" href="css/main_deferred.css" type="text/css"><script type="module" src="js/app.js" async></script><script type="module" src="js/vue.js" async></script><script type="module" src="js/ohcomponents.js" async></script><script type="module" src="js/uicomponents.js" async></script><script type="module">async function applyTheme() { if (localStorage.getItem("darktheme") === "true") { let darkthemecss = document.getElementById("darkthemecss"); if (!darkthemecss) { let head = document.getElementsByTagName('head')[0]; let link = document.createElement('style'); link.id = "darkthemecss"; link.innerHTML = await fetch('css/dark.css').then(d => d.text()); head.appendChild(link); document.dispatchEvent(new Event("themechanged")); } } else { let darkthemecss = document.getElementById("darkthemecss"); if (darkthemecss) darkthemecss.remove(); } if (localStorage.getItem("widetheme") === "true") { document.querySelector("body").classList.add("wide"); } else { document.querySelector("body").classList.remove("wide"); } window.requestAnimationFrame(() => { window.dispatchEvent(new Event("resize")); }); } window.toggleWideTheme = function (event) { event.preventDefault(); let isEnabled = localStorage.getItem("widetheme") === "true"; localStorage.setItem("widetheme", !isEnabled); applyTheme(); } applyTheme(); window.addEventListener('storage', e => { if (e.key == "darktheme") applyTheme(); }); document.addEventListener('themechange', e => applyTheme());</script><title>openHAB - Empowering the smart home</title><link rel="parent" href="things.html" data-title="Thing list" data-keyid="UID"></head><body><link rel="stylesheet" href="css/listgridview.css" type="text/css"><link rel="stylesheet" href="css/config.css" type="text/css"><link rel="stylesheet" href="css/thingchannels.css" type="text/css"><nav class="sidebar leftright"><div class="wrapper fixedwrapper"><h4>Actions</h4><ul id="additionalactions"></ul></div><div id="newchannels" class="wrapper fixedwrapper mt-3"></div></nav><header class="navbarui"><a class="sidebar-button" href="#" onclick="toggleSidebar(event)"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon" style="max-width: 20px;"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg> </a><a class="home" id="home" href="index.html"><div alt="openHAB" class="logo"></div></a><nav><oh-nav-auto-link></oh-nav-auto-link><div><a id="navmaintenance" href="maintenance.html">Maintenance</a></div><div><a id="navbindings" href="bindings.html">Add-ons</a></div><div><a id="navinbox" href="inbox.html" style="display: inline-flex;align-items: center;">Inbox<oh-form-bind adapter="modeladapter_forms/inboxcounter" objectid=""></oh-form-bind><oh-vue-form></oh-vue-form><template><span class="ml-2 badge badge-pill badge-orange">{{inboxcounter}}</span></template></a></div><div><a id="navthings" href="things.html">Things</a></div><div><a id="navitems" href="items.html">Items</a></div><div><a id="navscheduler" href="schedules.html">Scheduler</a></div><div><a id="navscenes" href="scenes.html">Scenes</a></div><div><a id="navrules" href="rules.html">Automation</a></div></nav></header><nav-ajax-page-load></nav-ajax-page-load><div id="alert-area" class="alert-area"></div><template id="alert-template"><div class="alert-box"><div class="alert-content"><slot></slot></div><a class="alert-close no-loader" data-close href="#"></a></div></template><section class="header"><div><oh-prop-bind attribute="label" queryparameter="title"></oh-prop-bind><nav-breadcrumb label="Thing Channels"></nav-breadcrumb></div><span class="link roundbtn" onclick="toggleWideTheme(event)"><i class="fas fa-arrows-alt-h"></i></span><oh-doc-link toggle class="link helpbtn roundbtn" title="Open/Close context help"><i class="fas fa-times"></i><i class="fas fa-question"></i></oh-doc-link></section><main><ui-filter class="mt-4" placeholder="Filter..." grid="Grid view" list="List view" select="Selection mode" additionalbuttons="Linking,Configuration,Configuration with descriptions"><button class="btn btn-danger" data-action="remove"><i class="fas fa-check"></i> Create missing links<oh-event-bind eventname="selectionchanged" setcontent></oh-event-bind><span class="badge badge-light ml-2">0</span></button></ui-filter><oh-list-bind adapter="modeladapter_lists/thing-channels" filtercriteria="label" objectfromurl></oh-list-bind><oh-vue-list><div slot="app"><list><template #empty><p>No channels found.</p></template><template #beforelist="{list}"><div class="callouts"><div v-if="list.hasDescription" class="bs-callout bs-callout-info">{{list.description()}}</div><ui-github-issues v-if="list.bindingid" :filter="list.bindingid" class="bs-callout bs-callout-danger" label="There are known issues with the binding that provides this Thing" url="https://api.github.com/repos/openhab/openhab2-addons/issues"></ui-github-issues></div></template><template #afterlist="{list}"><div v-if="list.items && list.items.length>0" class="btn-group btnbar my-2" role="group"><button href="#" @click.prevent="save" class="btn btn-primary" :class="{disabled:list.unchanged}"><i class="fas fa-save"></i> Save</button></div><portal target-el="#additionalactions" breakshadow slim><li><a href="#" @click.prevent="save" :class="{disabled:list.unchanged}"><i class="fas fa-save"></i> Save changes</a></li><li><a href="#" @click.prevent="createMissingLinks" :class="{disabled:false}"><i class="fas fa-link"></i> Create missing Items</a></li><li><a :href="'thing_configuration.html?UID='+list.value.UID"><i class="fas fa-external-link-alt"></i> Configure Thing</a></li></portal><portal v-if="list.extensibleChannelTypeIds.length" target-el="#newchannels" breakshadow slim><p>Create a new Channel</p><input style="display: block" placeholder="Channel label" v-model="list.newchannel.label" v-on:keyup.enter="create"><ui-dropdown :options.prop="list.extensibleChannelTypeIds" title="Select a channel-type" viewkey="label" desckey="description" valuekey="UID" label="Channel-Type" @input="list.newchannel.channelTypeUID=$event.target.value"></ui-dropdown><button class="btn btn-outline-success" @click.prevent="create">Create</button></portal></template></list></div><template slot="list"><h4 class="pt-5" style="flex-direction: column;align-items: center;" v-if="status == OhListStatus.PENDING_WAITING" slot="app">Loading<div class="loader"></div></h4><div class="pt-5" style="flex-direction: column;align-items: center;" v-else-if="status == OhListStatus.NOTCONNECTED_WAITING" slot="app"><h4><i class="fas fa-exclamation-circle"></i> Not connected</h4><div class="bs-callout bs-callout-info mt-4" style="display:inline-block;max-width: 500px">You are not connected to an openHAB instance. <a href="login.html">Connect now</a></div></div><div class="pt-5" style="flex-direction: column;align-items: center;" v-else-if="status == OhListStatus.ERROR" slot="app"><h4><i class="fas fa-exclamation-circle"></i> Loading failed</h4><div>{{message}}</div><div class="bs-callout bs-callout-info mt-4" style="display:inline-block;max-width: 700px"><p>An error while loading a list can happen because of multiple reasons.</p><dl><dt>A programming error</dt><dd>We are really sorry for that. Please report it in our bug-tracker, thank you.</dd><dt>Your openHAB doesn't understand</dt><dd>Please make sure this version is compatible to your openHAB version and you have installed all minimum-required Add-ons for this interface to work.</dd><dt>Your openHAB / internet is slow</dt><dd>We can't really do much here. A request times out after 5 seconds. Please find out why your openHAB is soo slow. Reload the page to try again.</dd></dl></div></div><ui-codeeditor v-else-if="viewmode=='textual'" :modelschema.prop="modelschema" ref="editor" :content.prop="toTextual()" @state="editorContentChanged($event.target)"></ui-codeeditor><div v-else class="w-100"><slot name="beforelist" :list="$list"></slot><div v-if="status==OhListStatus.READY && items.length==0" class="emptylist"><slot name="empty"><p>No content found. You might find the help text interesting.</p><ui-context-help url="help.md" class="card"></ui-context-help></slot></div><transition-group name="fade" tag="div" id="listcontainer" :class="[{selectionmode:selectmode},viewmode]"><template v-if="Array.isArray(items)"><oh-vue-listitem v-for="item in items" :key="item.id" :class="{single:items.length==1}" :listitem="item"></oh-vue-listitem></template><template v-else v-for="(channelGroup,groupid) in items"><h2 v-if="channelGroup.label" style="grid-column: 1 / -1" :key="groupid">{{channelGroup.label}} <small>{{channelGroup.description}}</small></h2><oh-vue-listitem v-for="item in channelGroup" :key="item.id" :class="{single:channelGroup.length==1}" :listitem="item"></oh-vue-listitem></template></transition-group><div v-if="items.hasmore" class="text-center"><button class="btn btn-primary-hover" @click="showMore()">Show 50 more &hellip;</button></div><slot name="afterlist" :list="$list"></slot></div></template><template slot="item"><article :id="item.id.replace(/[:#]/g,'_')" :class="[{pulseAnimation: pulseAnimation}]"><vue-inprogress></vue-inprogress><header class="title"><span :title="item.label" contenteditable="true" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" @blur="item.label=$event.target.textContent" style="display: inline-block;min-width: 80px;">{{item.label}}</span><div class="text-muted small">{{channelDescription()}}</div></header><section class="actions btn-group"><oh-doc-link show class="btn btn-outline-secondary" style="cursor: pointer" href="thing_channels_technical.fragment.html" :context.prop="technical()" title="Technical details"><i class="fas fa-info"></i></oh-doc-link><button v-if="item.isExtended" class="btn btn-outline-danger" title="Remove item" @click="remove()"><i class="fas fa-trash"></i></button></section><section class="description py-0"><ui-tabs upsidedown :activetab.prop="$list.secondarymode==0?0:1"><div class="tab-content" slot="tabs"><section class="links"><div>An item <small>(item id)</small></div><ui-dropdown v-dynamicload:profile-types="" title="Profile" viewkey="label" desckey="description" valuekey="uid" label="Profile"></ui-dropdown><oh-doc-link show href="contexthelp/profiles.md" class="link"><i class="far fa-question-circle"></i></oh-doc-link><button class="btn btn-danger-hover btn-sm text-nowrap"><i class="fas fa-trash"></i> Remove</button></section><section class="config"><div v-if="!configurationParameters()">No fuher configuration available</div><div class="elements oneline" :class="{withdesc:$list.secondarymode==2}" v-else><vue-config-element v-for="param in configurationParameters()" :desc="$list.secondarymode==2" :key="param.id" :param="param" :value="getConfigValue(param)" @input="setConfigValue" @remove="removeConfigValue(param)"></vue-config-element></div></section></div></ui-tabs></section><footer :class="{hidden:$list.secondarymode!=0}"><input v-model="newlink.label" placeholder="item label" class="ml-auto w-100"><ui-dropdown v-dynamicload:items="" label="Item" viewkey="label" desckey="name" valuekey="name" label="Select item" @input="newlink.item=$event.target.value" allowunset></ui-dropdown><ui-dropdown v-dynamicload:profile-types="" title="Profile" viewkey="label" desckey="description" valuekey="uid" :value="newlink.profile" @input="newlink.profile=$event.target.value"></ui-dropdown><button class="btn btn-outline-success text-nowrap" :disabled="!newlink.label.length">Create link</button></footer></article></template></oh-vue-list></main><footer></footer><aside class="contexthelp"><div class="fixedwrapper"><ui-context-help url="contexthelp/thingchannels.md"></ui-context-help><div class="btnbar mt-4 mr-2"><oh-doc-link class="btn btn-danger helpbtn2 mr-2" toggle><i class="fas fa-times"></i> Close</oh-doc-link></div></div></aside></body></html>