Im trying to create a workflow to create a new customized VM where the user has to choose a datastore to place the VM.
In the presentation section, under concerned "datastore" user input object properties, if the datastores objects are populated using "Predefined list of elements", I can see all datastore related properties when running the workflow from VCO tool (please refer below screenshot for more details)
But when I try to run the same workflow from vSphere web client, I see below
As you can see, most of the details such as capacity & free space columns are missing in web client.
Does anyone know how to correct this?
Short answer - you cannot.
These two choosers are completely different implementations, operating on two different object models which expose different properties of datastore objects.
Thanks for your reply IIian, is there any other way to do this?
I want the users to see datastore capacity & free space while choosing the datastore.
One ugly hack would be to change the input parameter type from VC:Datastore to string (this way, you'll choose datastore not as a vCenter object but by its name).
Then, your action which now generates a list of datastore objects to choose from can be changed to return a list of datastore names, and each element in this list will be not simple datastore name but a custom-formatted string containing datastore name plus capacity/free space information. When you select such item in the UI, you should be able to get the actual datastore object either by its index in the list or by parsing the custom-formatted string, fetching the name part, and finding the datastore object by name.
That would be really ugly :smileysilly:..but seems that's the only option left.
Made changes as suggested above but now there is a new challenge, please refer below screenshots:
VCO tool:
Web Client:
As you can see, in VCO tool things looks fine but on web client side it looks very ugly, users will have to hover over each and every datastore name to check the capacity/free space (whichwill be very irritating )
Is there any way to increase the length of the field in web client?
P.S. wonder why the web client is not as smart/flexible as VCO tool and extends the drop down menu as required.:smileyangry::smileyconfused:
Workflow presentation UI in vSphere Web Client is data-driven/auto-generated from presentation definition metadata. There is no way to manually change field dimensions without code changes.
Ah... the madness created by the various ways the workflows have their presentations processed. I have found that for many of my workflows I need an additional wrapper for whatever the user interaction point is. Based on the way evaluations of things like defaults, validations, and data bindings trigger (performance can vary dramatically) ,or on how things look, I have found this to be the only way to get somewhat satisfactory results.
what code level changes are required to make this look better on web UI? any example would be great