@openhab-ui/setup-and-maintenance
Version:
Configuration and maintenance interface for openHAB
33 lines • 13.8 kB
HTML
<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></head><body><link rel="stylesheet" href="css/maintenance.css" type="text/css"><script type="module" src="js/ui-time-graph.js"></script><nav class="sidebar leftright"><h4>Navigation</h4><ul><oh-nav-auto-link></oh-nav-auto-link><li><a data-no-reload="nav" href="maintenance.html">Maintenance</a></li><li><a data-no-reload="nav" href="configuration.html">Configuration</a></li><li><a data-no-reload="nav" href="user-roles.html">User roles</a></li><li><a data-no-reload="nav" href="persistence.html">Persistence</a></li><li><a data-no-reload="nav" href="logview.html">Show log</a></li></ul><div class="wrapper" id="actions"></div><p>UI options</p><ul><li><ui-switch storekey="skiphome" label="Start on 'Maintenance' screen" title="You will start on the maintenance screen instead of the home screen"></ui-switch></li><li><ui-switch documentevent="themechange" storekey="darktheme" label="Dark theme"></ui-switch></li><li><ui-dropdown class="mt-2 d-block" value="English" options="English,German,French"></ui-dropdown></li></ul><p>Service config</p><oh-list-bind adapter="modeladapter_lists/services" fixedfilter="category:^(?!system).*$"></oh-list-bind><oh-vue-list style="display: block;" class="wrapper"><div slot="app"><list></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><ul v-else><oh-vue-listitem v-for="item in items" :key="item.id" :listitem="item"></oh-vue-listitem><oh-nav-auto-link v-if="items.length"></oh-nav-auto-link></ul></template><template slot="item"><li><a data-no-reload="nav" :href="'service_config.html?id=' + encodeURIComponent(item.id) + '&title=' + encodeURIComponent(item.label)">{{item.label}}</a></li></template></oh-vue-list></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="Configure services, adjust preferences and check the application health"></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/distributioninfo" objectid=""></oh-form-bind><oh-vue-form></oh-vue-form><template><div v-if="!value">Distribution info not found. Is your openHAB recent enough?</div><section v-else><div class="card my-4"><div class="card-body"><div class="row"><div class="card-text col-sm mb-0"><div>Your {{value.name}} version is: {{value.version}} - {{new Date(value.builddate).toLocaleDateString()}}</div><div v-if="value.distribution">Your {{value.name}} distribution: {{value.distribution.name}} {{value.distribution.version}}</div></div><div class="col-md-auto text-right"><a class="btn btn-primary-hover" href="changelog.html">Changelog</a> <a v-if="value.distribution" class="btn btn-primary-hover" target="_blank" :href="value.distribution.url">About {{value.distribution.name}}</a></div></div></div></div></section></template><oh-form-bind adapter="modeladapter_forms/service" mixin="modeladapter_mixins/ltsGraphs" objectid="org.openhab.longtimestability"></oh-form-bind><oh-vue-form></oh-vue-form><template><div v-if="!value">Long time stability service not found. Is your openHAB recent enough?</div><section v-else><h4>{{value.label}}</h4><div class="graphs mb-4"><oh-websocket-data id="ltsGraphs" :href="value.config ? value.config.websocketPort : ''" simulation="modelsimulation/ltsGraphs" @data="newData" :run.prop="websocketRun"></oh-websocket-data><ui-time-graph @loaded="targetLoaded" ref="memory" color="green" views="Hour,Day,Week" maxdata="20" label="Memory in MB"></ui-time-graph><ui-time-graph @loaded="targetLoaded" ref="cpu" color="red" views="Hour,Day,Week" maxdata="20" label="CPU in %"></ui-time-graph><ui-time-graph @loaded="targetLoaded" ref="threads" color="blue" views="Hour,Day,Week" maxdata="20" label="# Threads"></ui-time-graph></div><template v-if="value.status && value.status.extended"><div class="mb-4" v-for="extended of value.status.extended" v-if="extended.id!='warning'"><span>{{extended.label}}</span>: <span>{{extended.value}}</span></div><div v-for="extended of value.status.extended" v-if="extended.id=='warning'" class="bs-callout bs-callout-warning mb-4"><button class="float-right btn btn-primary" title="Accept the new memory average"><i class="fas fa-check"></i></button>{{extended.label}}: {{extended.value}} <a :href="'service_config.html?id='+value.id+'&title='+value.label">Configure thresholds</a></div></template><p><button v-if="value.actions" v-for="actionItem of value.actions" class="btn btn-primary-hover mr-2" :title="actionItem.description" @click="action(actionItem.id)">{{actionItem.label}}</button></p></section></template><oh-form-bind adapter="modeladapter_forms/service" objectid="org.openhab.backup" mixin="modeladapter_mixins/backup"></oh-form-bind><oh-vue-form></oh-vue-form><template><div v-if="!value">Backup service not found. Is your openHAB recent enough?</div><section v-else><h4>{{value.label}}</h4><table class="table table-hover table-sm"><tbody><tr :title="statusDetails"><td>Status</td><td><i :class="statusBadge">{{statusinfo}}</i> <span>{{statusDetails}}</span></td></tr><template v-if="value.status && value.status.extended"><tr v-for="extended of value.status.extended"><td>{{extended.label}}</td><td>{{extended.value}}</td></tr></template></tbody></table><p><button v-if="value.actions" v-for="actionItem of value.actions" class="btn btn-primary-hover mr-2" :title="actionItem.description" @click="action(actionItem.id)">{{actionItem.label}}</button></p></section></template><oh-form-bind adapter="modeladapter_forms/osgibundles" objectid=""></oh-form-bind><oh-vue-form></oh-vue-form><template><section class="bundles mb-4"><h4>Running bundles</h4><div class="btnbar m-2"><button class="btn btn-primary-hover btn-sm" style="justify-self: flex-start" @click.prevent="reload">Reload</button><div style="flex:1"></div><span>Show bundles from:</span><ui-switch class="ml-3" label="Core" :value.prop="core" @input="core=$event.target.value"></ui-switch><ui-switch class="ml-3" label="Add-ons" :value.prop="addons" @input="addons=$event.target.value"></ui-switch><ui-switch class="ml-3" label="Auxilary" :value.prop="aux" @input="aux=$event.target.value"></ui-switch></div><div class="maxheight"><div v-if="!filtered.length">No OSGI Bundle status known. Is your openHAB recent enough?</div><table v-else class="table table-striped table-bordered"><thead><tr><th>ID</th><th>State</th><th>Lvl</th><th>Version</th><th>Name</th></tr></thead><tbody><tr v-for="item of filtered"><td>{{item.id}}</td><td><a href="#" @click.prevent="start(item)" class="mr-2"><i class="fas fa-play"></i></a> <a href="#" @click.prevent="restart(item)" class="mr-2"><i class="fas fa-redo"></i> </a><a href="#" @click.prevent="stop(item)" class="mr-2"><i class="fas fa-stop"></i></a> {{item.state}}</td><td>{{item.lvl}}</td><td>{{item.version}}</td><td>{{item.name}}</td></tr></tbody></table></div></section></template></main><footer></footer><aside class="contexthelp"><div class="fixedwrapper"><ui-context-help url="contexthelp/maintenance.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>