Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/widgets/services/customapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ widget:
name: id # required, field in each item to use as the item name (left side)
label: ip_address # required, field in each item to use as the item label (right side)
limit: 5 # optional, limit the number of items to display
format: text # optional - format of the label field
target: https://example.com/server/{id} # optional, makes items clickable with template support
```

Expand Down
4 changes: 2 additions & 2 deletions src/widgets/customapi/component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -267,14 +267,14 @@ export default function Component({ service }) {
>
<div className="font-thin pl-2">{itemName}</div>
<div className="flex flex-row text-right">
<div className="font-bold mr-2">{itemLabel}</div>
<div className="font-bold mr-2">{formatValue(t, mappings, itemLabel)}</div>
</div>
</a>
) : (
<div key={`${itemName}-${index}`} className={className}>
<div className="font-thin pl-2">{itemName}</div>
<div className="flex flex-row text-right">
<div className="font-bold mr-2">{itemLabel}</div>
<div className="font-bold mr-2">{formatValue(t, mappings, itemLabel)}</div>
</div>
</div>
);
Expand Down
Loading