diff --git a/bundles/org.openhab.ui/web/src/css/app.styl b/bundles/org.openhab.ui/web/src/css/app.styl index d82e2f545d..b20dfd1e1b 100644 --- a/bundles/org.openhab.ui/web/src/css/app.styl +++ b/bundles/org.openhab.ui/web/src/css/app.styl @@ -297,6 +297,9 @@ html .sitemap-validation-dialog --f7-dialog-width 80% +.thing-file-configuration-dialog + --f7-dialog-width 80% + // Align smart-select item with f7-list-input fields @media (min-width 1024px) .aligned-smart-select diff --git a/bundles/org.openhab.ui/web/src/pages/settings/things/inbox/inbox-list.vue b/bundles/org.openhab.ui/web/src/pages/settings/things/inbox/inbox-list.vue index 4ae86899fc..2cec4e1b01 100644 --- a/bundles/org.openhab.ui/web/src/pages/settings/things/inbox/inbox-list.vue +++ b/bundles/org.openhab.ui/web/src/pages/settings/things/inbox/inbox-list.vue @@ -290,6 +290,28 @@ export default { entry.thingUID.substring(entry.thingUID.lastIndexOf(':') + 1)) } }, + { + text: 'Show equivalent Thing file configuration (basic properties)', + color: 'blue', + bold: true, + onClick: () => { + let properties = Object.entries(entry.properties).map(([k, v]) => `${k}="${v}"`) + let explanatoryText = 'NOTE: If this is a bridge, substitute Thing with Bridge' + + '

All properties are show here, but you may not want to include them all in the file configuraiton. Refer to binding docs for this particular binding for more details.

' + let content = `

Thing ${entry.thingUID} "${entry.label}" [ ${properties} ]

` + this.$f7.dialog.create({ + title: 'Equivalent Thing file configuration', + text: explanatoryText + content, + cssClass: 'thing-file-configuration-dialog', + buttons: [ + { + text: 'Close', + color: 'orange' + } + ] + }).open() + } + }, { text: (!ignored) ? 'Ignore' : 'Unignore', color: (!ignored) ? 'orange' : 'blue',