Adjust width of F7 dialog + include clipboard icon

As an avid Thing/Item file user, I sometimes find it cumbersome to create the equivalent Thing file configuration for an auto discovered thing from the inbox. This often leads to first accepting the auto discovered thing as a managed thing, then creating a file entry manually by copying representation property etc from the managed thing. Finally I delete the managed thing.

So make this easier I created this simple dialog where the user (me) can copy a starting point for the file configuration - with the representation property included.

Problem: Iā€™m new to F7 and Vue, and Iā€™m having trouble achieving the following:

  1. The generated thing configuration should show in full and not break ā†’ adjust dialog width
  1. I would like to include the clipboard copy icon, but it does not seem to render at all

See example so far:

Any tips?

The code is here; Add dialog to inbox that shows thing file template Ā· openhab/openhab-webui@47e9412 Ā· GitHub

2 Likes

An easier solution is to just make that button as a ā€œcopy to clipboardā€ and not show the value. The value could be a tooltip instead.

For clipboard copy take a look at clipboard-icon.vue

Thanks @JimT, I tried to embed this tag, but it did not render as I expected (not showing up at all).
Not sure if the syntax was wrong - or if the dialog component donā€™t support it. Maybe someone with sufficient experience knows?

Regards

This is good. On a similar note, i used to define all things and items in files. Now i take the approach to automatically generated both things and items as much as possible.
I do this in jrule using thing and item registry.

Not possible for everything, Iā€™ll try to include this in the unifiprotect binding as an example, to have the option to automatically generate items. To me if itā€™s manually creating items in files or linking channels to items in the gui is somewhat boring and time consuming.

A lot easier to do this with items than things due to the nature of it.

Wellā€¦ its possible to generate thing file from yaml and vice versaā€¦
If you will have a look at this examples: WM-Bus - Wireless M-Bus :: ConnectorIOĀ® Documentation
They are all delivered from this file:

Using this maven plugins: https://github.com/ConnectorIO/connectorio-addons/blob/master/bundles/pom.xml#L138L164. Plugin docs are available here: GitHub - thingfour/thingfour: An extra set of extensions targetting openHAB project and other openHAB-compatible deployments.. (no support for items yet)

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.