From 5febf027a0e0983e25005c0c92f9c03f54c53b46 Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Tue, 22 Oct 2024 23:26:45 +0200 Subject: [PATCH] Thing page: Support invoking Thing actions & Viewing their output (#2818) Refs https://github.com/openhab/openhab-core/pull/4392. Closes #2817. This adds a new section "Actions" to the Thing tab of the Thing page, which provides a button for each UI-supported Thing action. Clicking on that button will open a popup, where action input can be configured and action output can be viewed. All keys of the action output response object from REST are rendered as list Items, the labels are taken from the action output definitions and fallback to the key. If the key is `qrCode` or its output type is defined as `qrCode`, its value is rendered as QR code. For actions without inputs or without outputs, messages are shown indicating that there is no such. --------- Signed-off-by: Florian Hotze --- .../settings/things/thing-action-popup.vue | 120 ++++++++++++++++++ .../pages/settings/things/thing-details.vue | 61 ++++++++- 2 files changed, 177 insertions(+), 4 deletions(-) create mode 100644 bundles/org.openhab.ui/web/src/pages/settings/things/thing-action-popup.vue diff --git a/bundles/org.openhab.ui/web/src/pages/settings/things/thing-action-popup.vue b/bundles/org.openhab.ui/web/src/pages/settings/things/thing-action-popup.vue new file mode 100644 index 0000000000..77b62cf843 --- /dev/null +++ b/bundles/org.openhab.ui/web/src/pages/settings/things/thing-action-popup.vue @@ -0,0 +1,120 @@ + + + diff --git a/bundles/org.openhab.ui/web/src/pages/settings/things/thing-details.vue b/bundles/org.openhab.ui/web/src/pages/settings/things/thing-details.vue index fbdffe889c..b63487b036 100644 --- a/bundles/org.openhab.ui/web/src/pages/settings/things/thing-details.vue +++ b/bundles/org.openhab.ui/web/src/pages/settings/things/thing-details.vue @@ -1,7 +1,7 @@