-
Notifications
You must be signed in to change notification settings - Fork 366
Dialogs
This page is meant to describe various details of the service dialog data formats, implementation, etc. The UI part is currently implemented as 2 components - dialog editor and dialog user.
(TODO describe formats)
(from https://github.com/ManageIQ/ui-components/pull/392#discussion_r296871830)
On the automate side, you want to set the 'value' key like you're doing above:
$evm.object['value'] = something
However, on the ui-components side, for most of the field types, default_value is the value that is getting passed back from the refresh API call that we should be looking at to determine what to show to the user after a refresh happens. We changed it in 7dcb1f7. For sorted items, values is the key we use since it needs to be a list, and default_value is simply the one that is selected from that list.
On the ui-components side, because of the way datetime controls work, there's special logic for the date and time parts because the default_value comes in as a string (cause it's just a JSON response), and then it gets parsed and separated into a dateField and a timeField since the controls are separate.
go to Automation > Automate > Explorer
add a new method anywhere, type inline
dialog_hash = {'A' => 'A', 'B' => 'B' ,'C' => 'C'}
$evm.root['values'] = dialog_hash
$evm.root['default_value'] = dialog_hash.keys
exit MIQ_OK
add a new instance in the same place, value = name of the new method
go to Automation > Automate > Customization
toolbar Configuration > Add a New Dialog
add a dropdown, edit details tab Field Information enable Dynamic tab Options set entry point to the newly created instance enable Show Refresh Button enable Load values on init enable Multiselect
go to Service > Catalogs > Catalog Items
add a new catalog item, select the newly created Dialog, enable Display in Catalog, select a Catalog
go to Service > Catalogs > Service Catalogs
order the new catalog item