UNPKG

@openhab-ui/setup-and-maintenance

Version:

Configuration and maintenance interface for openHAB

33 lines 10.6 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><script type="module" src="js/ui-maps.js"></script><link rel="stylesheet" href="css/config.css"><link rel="stylesheet" href="css/thingchannels.css" type="text/css"><nav class="sidebar leftright"><div class="wrapper fixedwrapper"><h4>Navigation</h4><ul id="additionalactions"></ul></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 Configuration"></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><oh-form-bind adapter="modeladapter_forms/thing" objectfromurl allownew></oh-form-bind><oh-vue-form></oh-vue-form><template><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><div v-else><portal target-el="#additionalactions" breakshadow slim><li><a :href="'thing_channels.html?UID='+value.UID"><i class="fas fa-external-link-alt"></i> Configure Channels</a></li></portal><div class="callouts"><div v-if="hasDescription" class="bs-callout bs-callout-info">{{description()}}</div><ui-github-issues v-if="bindingid" :filter="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><div class="statusinfo my-4" v-if="value.statusInfo"><ui-switch name="enabled" :value.prop="isEnabled" @input="setEnabled" label="Enabled" title="A disabled thing will not connect to its peer device"></ui-switch><div class="ml-2"><i :class="statusBadge">{{statusInfo}}</i><div v-if="value.statusInfo.description">{{value.statusInfo.description}}</div></div></div><form @submit.prevent="false" class="was-validated configheadergrid"><label for="thingname">Thing label</label><div><input autofocus type="text" class="form-control" name="thingname" id="thingname" pattern=".{1,}" required placeholder="Thing label" :value="valuecopy.label" @input="$set(valuecopy,'label',$event.target.value)"></div><label v-if="!value.UID" for="bindingid">Thing Type</label><div v-if="!value.UID && status==OhListStatus.READY"><ui-dropdown id="bindingid" ref="bindingid" name="bindingid" title="Binding" viewkey="name" desckey="description" valuekey="id" label="Select a binding" v-dynamicload:bindings="" @input="setBindingFilter($event.target.value)" required></ui-dropdown><ui-dropdown id="thingtype" :value.prop="valuecopy.thingTypeUID" name="thingtype" title="Thing types" viewkey="label" desckey="description" valuekey="UID" label="Select a thing type" v-dynamicload:thing-types="bindingfilter" @input="setThingType($event.target.value)" required></ui-dropdown></div><template v-if="bridgeTypeFilter"><label for="bridgetype">Bridge Type</label><ui-dropdown id="bridgetype" name="bridgetype" title="Bridge type" viewkey="label" desckey="description" valuekey="UID" label="Select a bridge type" v-dynamicload:things="bridgeTypeFilter" required></ui-dropdown></template></form><section class="config" v-if="!bridgeTypeFilter && value.UID && configurationParameters"><h4>Configuration</h4><div class="elements"><vue-config-element v-for="param in configurationParameters" :desc="true" :key="param.id" :param="param" :value="getConfigValue(param)" @input="setConfigValue(param,$event)" @remove="removeConfigValue(param)"></vue-config-element></div></section><div class="btnbar" role="group"><button v-if="!value.UID" class="btn btn-primary" :class="{disabled:canNotCreate}" @click.prevent="create"><i class="fas fa-save"></i> Create</button> <button v-else class="btn btn-primary" :class="{disabled:unchanged}" @click.prevent="save"><i class="fas fa-save"></i> Save</button></div></div></template></main><footer></footer><aside class="contexthelp"><div class="fixedwrapper"><ui-context-help url="contexthelp/thingconfig.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>