Skip to content

Commit

Permalink
Widget actions: Add a HTTP action to perform HTTP requests (#2711)
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Hotze <[email protected]>
  • Loading branch information
florian-h05 authored Aug 13, 2024
1 parent f745fa9 commit a13ffe3
Show file tree
Hide file tree
Showing 27 changed files with 542 additions and 58 deletions.
21 changes: 19 additions & 2 deletions bundles/org.openhab.ui/doc/components/oh-aggregate-series.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,20 +157,37 @@ prev: /docs/ui/components/
<PropOption value="photos" label="Open photo browser" />
<PropOption value="group" label="Group details" />
<PropOption value="analyzer" label="Analyze item(s)" />
<PropOption value="url" label="External URL" />
<PropOption value="url" label="Navigate to external URL" />
<PropOption value="http" label="Send HTTP request" />
<PropOption value="variable" label="Set Variable" />
</PropOptions>
</PropBlock>
<PropBlock type="TEXT" name="actionUrl" label="Action URL" context="url">
<PropDescription>
URL to navigate to
URL to navigate to or to send HTTP request to
</PropDescription>
</PropBlock>
<PropBlock type="BOOLEAN" name="actionUrlSameWindow" label="Open in same tab/window">
<PropDescription>
Open the URL in the same tab/window instead of a new one. This will exit the app.
</PropDescription>
</PropBlock>
<PropBlock type="TEXT" name="actionHttpMethod" label="HTTP Method">
<PropDescription>
HTTP method to use for the request
</PropDescription>
<PropOptions>
<PropOption value="GET" label="GET" />
<PropOption value="POST" label="POST" />
<PropOption value="PUT" label="PUT" />
<PropOption value="DELETE" label="DELETE" />
</PropOptions>
</PropBlock>
<PropBlock type="TEXT" name="actionHttpBody" label="HTTP Body">
<PropDescription>
Body to send with the request
</PropDescription>
</PropBlock>
<PropBlock type="TEXT" name="actionItem" label="Action Item" context="item">
<PropDescription>
Item to perform the action on
Expand Down
42 changes: 38 additions & 4 deletions bundles/org.openhab.ui/doc/components/oh-button.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,20 +137,37 @@ Button performing an action
<PropOption value="photos" label="Open photo browser" />
<PropOption value="group" label="Group details" />
<PropOption value="analyzer" label="Analyze item(s)" />
<PropOption value="url" label="External URL" />
<PropOption value="url" label="Navigate to external URL" />
<PropOption value="http" label="Send HTTP request" />
<PropOption value="variable" label="Set Variable" />
</PropOptions>
</PropBlock>
<PropBlock type="TEXT" name="actionUrl" label="Action URL" context="url">
<PropDescription>
URL to navigate to
URL to navigate to or to send HTTP request to
</PropDescription>
</PropBlock>
<PropBlock type="BOOLEAN" name="actionUrlSameWindow" label="Open in same tab/window">
<PropDescription>
Open the URL in the same tab/window instead of a new one. This will exit the app.
</PropDescription>
</PropBlock>
<PropBlock type="TEXT" name="actionHttpMethod" label="HTTP Method">
<PropDescription>
HTTP method to use for the request
</PropDescription>
<PropOptions>
<PropOption value="GET" label="GET" />
<PropOption value="POST" label="POST" />
<PropOption value="PUT" label="PUT" />
<PropOption value="DELETE" label="DELETE" />
</PropOptions>
</PropBlock>
<PropBlock type="TEXT" name="actionHttpBody" label="HTTP Body">
<PropDescription>
Body to send with the request
</PropDescription>
</PropBlock>
<PropBlock type="TEXT" name="actionItem" label="Action Item" context="item">
<PropDescription>
Item to perform the action on
Expand Down Expand Up @@ -296,20 +313,37 @@ Button performing an action
<PropOption value="photos" label="Open photo browser" />
<PropOption value="group" label="Group details" />
<PropOption value="analyzer" label="Analyze item(s)" />
<PropOption value="url" label="External URL" />
<PropOption value="url" label="Navigate to external URL" />
<PropOption value="http" label="Send HTTP request" />
<PropOption value="variable" label="Set Variable" />
</PropOptions>
</PropBlock>
<PropBlock type="TEXT" name="taphold_actionUrl" label="Action URL" context="url">
<PropDescription>
URL to navigate to
URL to navigate to or to send HTTP request to
</PropDescription>
</PropBlock>
<PropBlock type="BOOLEAN" name="taphold_actionUrlSameWindow" label="Open in same tab/window">
<PropDescription>
Open the URL in the same tab/window instead of a new one. This will exit the app.
</PropDescription>
</PropBlock>
<PropBlock type="TEXT" name="taphold_actionHttpMethod" label="HTTP Method">
<PropDescription>
HTTP method to use for the request
</PropDescription>
<PropOptions>
<PropOption value="GET" label="GET" />
<PropOption value="POST" label="POST" />
<PropOption value="PUT" label="PUT" />
<PropOption value="DELETE" label="DELETE" />
</PropOptions>
</PropBlock>
<PropBlock type="TEXT" name="taphold_actionHttpBody" label="HTTP Body">
<PropDescription>
Body to send with the request
</PropDescription>
</PropBlock>
<PropBlock type="TEXT" name="taphold_actionItem" label="Action Item" context="item">
<PropDescription>
Item to perform the action on
Expand Down
21 changes: 19 additions & 2 deletions bundles/org.openhab.ui/doc/components/oh-calendar-axis.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,37 @@ prev: /docs/ui/components/
<PropOption value="photos" label="Open photo browser" />
<PropOption value="group" label="Group details" />
<PropOption value="analyzer" label="Analyze item(s)" />
<PropOption value="url" label="External URL" />
<PropOption value="url" label="Navigate to external URL" />
<PropOption value="http" label="Send HTTP request" />
<PropOption value="variable" label="Set Variable" />
</PropOptions>
</PropBlock>
<PropBlock type="TEXT" name="actionUrl" label="Action URL" context="url">
<PropDescription>
URL to navigate to
URL to navigate to or to send HTTP request to
</PropDescription>
</PropBlock>
<PropBlock type="BOOLEAN" name="actionUrlSameWindow" label="Open in same tab/window">
<PropDescription>
Open the URL in the same tab/window instead of a new one. This will exit the app.
</PropDescription>
</PropBlock>
<PropBlock type="TEXT" name="actionHttpMethod" label="HTTP Method">
<PropDescription>
HTTP method to use for the request
</PropDescription>
<PropOptions>
<PropOption value="GET" label="GET" />
<PropOption value="POST" label="POST" />
<PropOption value="PUT" label="PUT" />
<PropOption value="DELETE" label="DELETE" />
</PropOptions>
</PropBlock>
<PropBlock type="TEXT" name="actionHttpBody" label="HTTP Body">
<PropDescription>
Body to send with the request
</PropDescription>
</PropBlock>
<PropBlock type="TEXT" name="actionItem" label="Action Item" context="item">
<PropDescription>
Item to perform the action on
Expand Down
21 changes: 19 additions & 2 deletions bundles/org.openhab.ui/doc/components/oh-calendar-series.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,37 @@ prev: /docs/ui/components/
<PropOption value="photos" label="Open photo browser" />
<PropOption value="group" label="Group details" />
<PropOption value="analyzer" label="Analyze item(s)" />
<PropOption value="url" label="External URL" />
<PropOption value="url" label="Navigate to external URL" />
<PropOption value="http" label="Send HTTP request" />
<PropOption value="variable" label="Set Variable" />
</PropOptions>
</PropBlock>
<PropBlock type="TEXT" name="actionUrl" label="Action URL" context="url">
<PropDescription>
URL to navigate to
URL to navigate to or to send HTTP request to
</PropDescription>
</PropBlock>
<PropBlock type="BOOLEAN" name="actionUrlSameWindow" label="Open in same tab/window">
<PropDescription>
Open the URL in the same tab/window instead of a new one. This will exit the app.
</PropDescription>
</PropBlock>
<PropBlock type="TEXT" name="actionHttpMethod" label="HTTP Method">
<PropDescription>
HTTP method to use for the request
</PropDescription>
<PropOptions>
<PropOption value="GET" label="GET" />
<PropOption value="POST" label="POST" />
<PropOption value="PUT" label="PUT" />
<PropOption value="DELETE" label="DELETE" />
</PropOptions>
</PropBlock>
<PropBlock type="TEXT" name="actionHttpBody" label="HTTP Body">
<PropDescription>
Body to send with the request
</PropDescription>
</PropBlock>
<PropBlock type="TEXT" name="actionItem" label="Action Item" context="item">
<PropDescription>
Item to perform the action on
Expand Down
21 changes: 19 additions & 2 deletions bundles/org.openhab.ui/doc/components/oh-cell.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,37 @@ A regular or expandable cell
<PropOption value="photos" label="Open photo browser" />
<PropOption value="group" label="Group details" />
<PropOption value="analyzer" label="Analyze item(s)" />
<PropOption value="url" label="External URL" />
<PropOption value="url" label="Navigate to external URL" />
<PropOption value="http" label="Send HTTP request" />
<PropOption value="variable" label="Set Variable" />
</PropOptions>
</PropBlock>
<PropBlock type="TEXT" name="actionUrl" label="Action URL" context="url">
<PropDescription>
URL to navigate to
URL to navigate to or to send HTTP request to
</PropDescription>
</PropBlock>
<PropBlock type="BOOLEAN" name="actionUrlSameWindow" label="Open in same tab/window">
<PropDescription>
Open the URL in the same tab/window instead of a new one. This will exit the app.
</PropDescription>
</PropBlock>
<PropBlock type="TEXT" name="actionHttpMethod" label="HTTP Method">
<PropDescription>
HTTP method to use for the request
</PropDescription>
<PropOptions>
<PropOption value="GET" label="GET" />
<PropOption value="POST" label="POST" />
<PropOption value="PUT" label="PUT" />
<PropOption value="DELETE" label="DELETE" />
</PropOptions>
</PropBlock>
<PropBlock type="TEXT" name="actionHttpBody" label="HTTP Body">
<PropDescription>
Body to send with the request
</PropDescription>
</PropBlock>
<PropBlock type="TEXT" name="actionItem" label="Action Item" context="item">
<PropDescription>
Item to perform the action on
Expand Down
21 changes: 19 additions & 2 deletions bundles/org.openhab.ui/doc/components/oh-clock-card.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,20 +142,37 @@ Display a digital clock in a card
<PropOption value="photos" label="Open photo browser" />
<PropOption value="group" label="Group details" />
<PropOption value="analyzer" label="Analyze item(s)" />
<PropOption value="url" label="External URL" />
<PropOption value="url" label="Navigate to external URL" />
<PropOption value="http" label="Send HTTP request" />
<PropOption value="variable" label="Set Variable" />
</PropOptions>
</PropBlock>
<PropBlock type="TEXT" name="actionUrl" label="Action URL" context="url">
<PropDescription>
URL to navigate to
URL to navigate to or to send HTTP request to
</PropDescription>
</PropBlock>
<PropBlock type="BOOLEAN" name="actionUrlSameWindow" label="Open in same tab/window">
<PropDescription>
Open the URL in the same tab/window instead of a new one. This will exit the app.
</PropDescription>
</PropBlock>
<PropBlock type="TEXT" name="actionHttpMethod" label="HTTP Method">
<PropDescription>
HTTP method to use for the request
</PropDescription>
<PropOptions>
<PropOption value="GET" label="GET" />
<PropOption value="POST" label="POST" />
<PropOption value="PUT" label="PUT" />
<PropOption value="DELETE" label="DELETE" />
</PropOptions>
</PropBlock>
<PropBlock type="TEXT" name="actionHttpBody" label="HTTP Body">
<PropDescription>
Body to send with the request
</PropDescription>
</PropBlock>
<PropBlock type="TEXT" name="actionItem" label="Action Item" context="item">
<PropDescription>
Item to perform the action on
Expand Down
21 changes: 19 additions & 2 deletions bundles/org.openhab.ui/doc/components/oh-colorpicker-cell.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,20 +116,37 @@ A cell expanding to a color picker
<PropOption value="photos" label="Open photo browser" />
<PropOption value="group" label="Group details" />
<PropOption value="analyzer" label="Analyze item(s)" />
<PropOption value="url" label="External URL" />
<PropOption value="url" label="Navigate to external URL" />
<PropOption value="http" label="Send HTTP request" />
<PropOption value="variable" label="Set Variable" />
</PropOptions>
</PropBlock>
<PropBlock type="TEXT" name="actionUrl" label="Action URL" context="url">
<PropDescription>
URL to navigate to
URL to navigate to or to send HTTP request to
</PropDescription>
</PropBlock>
<PropBlock type="BOOLEAN" name="actionUrlSameWindow" label="Open in same tab/window">
<PropDescription>
Open the URL in the same tab/window instead of a new one. This will exit the app.
</PropDescription>
</PropBlock>
<PropBlock type="TEXT" name="actionHttpMethod" label="HTTP Method">
<PropDescription>
HTTP method to use for the request
</PropDescription>
<PropOptions>
<PropOption value="GET" label="GET" />
<PropOption value="POST" label="POST" />
<PropOption value="PUT" label="PUT" />
<PropOption value="DELETE" label="DELETE" />
</PropOptions>
</PropBlock>
<PropBlock type="TEXT" name="actionHttpBody" label="HTTP Body">
<PropDescription>
Body to send with the request
</PropDescription>
</PropBlock>
<PropBlock type="TEXT" name="actionItem" label="Action Item" context="item">
<PropDescription>
Item to perform the action on
Expand Down
21 changes: 19 additions & 2 deletions bundles/org.openhab.ui/doc/components/oh-data-series.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,37 @@ prev: /docs/ui/components/
<PropOption value="photos" label="Open photo browser" />
<PropOption value="group" label="Group details" />
<PropOption value="analyzer" label="Analyze item(s)" />
<PropOption value="url" label="External URL" />
<PropOption value="url" label="Navigate to external URL" />
<PropOption value="http" label="Send HTTP request" />
<PropOption value="variable" label="Set Variable" />
</PropOptions>
</PropBlock>
<PropBlock type="TEXT" name="actionUrl" label="Action URL" context="url">
<PropDescription>
URL to navigate to
URL to navigate to or to send HTTP request to
</PropDescription>
</PropBlock>
<PropBlock type="BOOLEAN" name="actionUrlSameWindow" label="Open in same tab/window">
<PropDescription>
Open the URL in the same tab/window instead of a new one. This will exit the app.
</PropDescription>
</PropBlock>
<PropBlock type="TEXT" name="actionHttpMethod" label="HTTP Method">
<PropDescription>
HTTP method to use for the request
</PropDescription>
<PropOptions>
<PropOption value="GET" label="GET" />
<PropOption value="POST" label="POST" />
<PropOption value="PUT" label="PUT" />
<PropOption value="DELETE" label="DELETE" />
</PropOptions>
</PropBlock>
<PropBlock type="TEXT" name="actionHttpBody" label="HTTP Body">
<PropDescription>
Body to send with the request
</PropDescription>
</PropBlock>
<PropBlock type="TEXT" name="actionItem" label="Action Item" context="item">
<PropDescription>
Item to perform the action on
Expand Down
21 changes: 19 additions & 2 deletions bundles/org.openhab.ui/doc/components/oh-gauge-card.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,20 +178,37 @@ Display a read-only gauge in a card to visualize a quantifiable item
<PropOption value="photos" label="Open photo browser" />
<PropOption value="group" label="Group details" />
<PropOption value="analyzer" label="Analyze item(s)" />
<PropOption value="url" label="External URL" />
<PropOption value="url" label="Navigate to external URL" />
<PropOption value="http" label="Send HTTP request" />
<PropOption value="variable" label="Set Variable" />
</PropOptions>
</PropBlock>
<PropBlock type="TEXT" name="actionUrl" label="Action URL" context="url">
<PropDescription>
URL to navigate to
URL to navigate to or to send HTTP request to
</PropDescription>
</PropBlock>
<PropBlock type="BOOLEAN" name="actionUrlSameWindow" label="Open in same tab/window">
<PropDescription>
Open the URL in the same tab/window instead of a new one. This will exit the app.
</PropDescription>
</PropBlock>
<PropBlock type="TEXT" name="actionHttpMethod" label="HTTP Method">
<PropDescription>
HTTP method to use for the request
</PropDescription>
<PropOptions>
<PropOption value="GET" label="GET" />
<PropOption value="POST" label="POST" />
<PropOption value="PUT" label="PUT" />
<PropOption value="DELETE" label="DELETE" />
</PropOptions>
</PropBlock>
<PropBlock type="TEXT" name="actionHttpBody" label="HTTP Body">
<PropDescription>
Body to send with the request
</PropDescription>
</PropBlock>
<PropBlock type="TEXT" name="actionItem" label="Action Item" context="item">
<PropDescription>
Item to perform the action on
Expand Down
Loading

0 comments on commit a13ffe3

Please sign in to comment.