steampipe
steampipe copied to clipboard
Dashboard inputs should support defaults
Sometimes it's desirable to provide a default value for a dashboard input so that the dashboard executes immediately.
We need to consider the case where a default is provided for a select input and that value is not in the static or dynamic options that the input has. In this case we should allow the item(s) and artificially add to the list, but show them as erroneous through some icons / appropriate colouring.
For me the most-wanted version of this is a default for type="text"
. Ideally the default could be the empty string. That's because it's common to bind a search term to a Postgres regexp match, and matching the empty string is a convenient way to say "match all".
FYI, @MichaelBurgess, this is my current workaround:
input "text_match" {
type = "combo"
title = "match text"
width = 2
option "none" {}
}
I have to convert none
to the empty string, but it does function as a default, and the dashboard doesn't hang waiting for input.
I've thought of writing this up as a tip but if we're going to have a more official way of setting a default I won't.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue was closed because it has been stalled for 90 days with no activity.