VMware Cloud Community
vijaysn828
Contributor
Contributor

Adding columns to "chooser" window in workflow inputs section

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)

pastedImage_0.png

pastedImage_0.png

But when I try to run the same workflow from vSphere web client, I see below

pastedImage_1.png

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?

Tags (1)
0 Kudos
8 Replies
iiliev
VMware Employee
VMware Employee

Short answer - you cannot.

These two choosers are completely different implementations, operating on two different object models which expose different properties of datastore objects.

0 Kudos
vijaysn828
Contributor
Contributor

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.

0 Kudos
iiliev
VMware Employee
VMware Employee

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.

vijaysn828
Contributor
Contributor

That would be really ugly :smileysilly:..but seems that's the only option left.

0 Kudos
vijaysn828
Contributor
Contributor

Made changes as suggested above but now there is a new challenge, please refer below screenshots:

VCO tool:

pastedImage_1.png

Web Client:

pastedImage_2.png

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 Smiley Wink)

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:

0 Kudos
iiliev
VMware Employee
VMware Employee

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.

0 Kudos
qc4vmware
Virtuoso
Virtuoso

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.

0 Kudos
vijaysn828
Contributor
Contributor

what code level changes are required to make this look better on web UI? any example would be great Smiley Happy

0 Kudos