Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MainUI] Code view for Item (and its link, if relevant) #728

Closed
digitlength opened this issue Dec 29, 2020 · 4 comments · Fixed by #1818
Closed

[MainUI] Code view for Item (and its link, if relevant) #728

digitlength opened this issue Dec 29, 2020 · 4 comments · Fixed by #1818
Assignees
Labels
enhancement New feature or request main ui Main UI

Comments

@digitlength
Copy link

digitlength commented Dec 29, 2020

The problem

(Not really a problem - this is a feature request - but I'll keep the template title)

We have a friendly Code tab for Things, from which YAML code can be edited, copied and shared on the Community forum.

This Code tab does not exist for Items (except for its metadata) and its links (if relevant).

I realise the API Explorer exists, but that's quite a 'scary' looking thing for a beginner, with its colour coding and location within the Developer Tools. Additionally, if the API Explorer is used one needs to enter the Items and Links separately - coming from OH2 where Items and Links where defined in a single line in a text file this adds to the 'unfriendliness', so to speak.

Is it possible, for an Item, to have a Code tab which includes all information required to recreate the Item and its Link, for easy and friendly editing and sharing? That would also improve consistency between Items and Things.

I have seen #397, but I think that just pertains to the Item metadata. This issue is essentially about all the Item parameters, as they used to be (still can be, I guess!) defined in Items files.

Your environment

runtimeInfo:
  version: 3.0.0
  buildString: Release Build
locale: en_GB
systemInfo:
  configFolder: /etc/openhab
  userdataFolder: /var/lib/openhab
  logFolder: /var/log/openhab
  javaVersion: 11.0.9.1
  javaVendor: Azul Systems, Inc.
  javaVendorVersion: Zulu11.43+55-CA
  osName: Linux
  osVersion: 5.4.0-58-generic
  osArchitecture: amd64
  availableProcessors: 2
  freeMemory: 29474216
  totalMemory: 96468992
bindings:
  - http
clientInfo:
  device:
    ios: false
    android: false
    androidChrome: false
    desktop: true
    iphone: false
    ipod: false
    ipad: false
    edge: false
    ie: false
    firefox: true
    macos: false
    windows: false
    cordova: false
    phonegap: false
    electron: false
    nwjs: false
    webView: false
    webview: false
    standalone: false
    pixelRatio: 1
    prefersColorScheme: light
  isSecureContext: true
  locationbarVisible: true
  menubarVisible: true
@digitlength digitlength added enhancement New feature or request main ui Main UI labels Dec 29, 2020
@florian-h05 florian-h05 self-assigned this Mar 8, 2023
florian-h05 added a commit to florian-h05/openhab-webui that referenced this issue Mar 30, 2023
Requested at openhab#1737 (comment), openhab#728 and several times on the community.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
ghys pushed a commit that referenced this issue Apr 19, 2023
Closes #728.
See discussion in
#1737 (comment).

Adds a YAML code tab to the Item editor as requested several times on
various places.
Editor hints are provided for Item types, groupTypes, groupNames and
metadata namespaces.

If the Item has been provisioned from file, the editor is read-only and
a big lock icon is displayed.

Note that metadata is currently not displayed, because mass-saving
metadata is not supported yet.

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@digitlength
Copy link
Author

digitlength commented Apr 20, 2023

@ghys, @florian-h05 : I'm not sure this can be closed yet - does the new feature also display Link information? I can't see it in the screenshot.

@florian-h05
Copy link
Contributor

No, Item links and metadata are not a part of it.

The problem is that those are stored in extra registries and there is no API yet to modify all metadata of an Item or all channel links at once.

@digitlength
Copy link
Author

No, Item links and metadata are not a part of it.

The problem is that those are stored in extra registries and there is no API yet to modify all metadata of an Item or all channel links at once.

OK - shall we reopen this issue, or split out the Link request into a new one?

@florian-h05
Copy link
Contributor

I’d prefer to split the link request to a new issue, where we can coordinate the required API endpoints (I have to check closer, but I think we need a new API endpoint) with the core maintainers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request main ui Main UI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants