The vSphere Client determines whether to show a dynamic extension by asking a plug-in server at the time the context makes the extension relevant. The vSphere Client identifies the relevant extensions and sends a request to each plug-in server that makes visibility choices for the relevant extensions. Each plug-in server collects the information needed to decide whether to hide or show its extensions, and responds with its visibility choice for each of its relevant extensions.
As of vSphere 8.0 U3, dynamic plug-in actions can be hidden or disabled depending on response from the plug-in server, which can return items with two properties: visible
or relevant
.
- Setting the
visible
property tofalse
has a different effect on actions than on Cards, Monitor or Configure views. For Cards, Monitor views, or Configure views,visible=false
means that the view is not shown at all. For actions,visible=false
makes the action visible but disabled. - Setting the
relevant
property tofalse
makes the action disappear from the menu. Therelevant
property is not required because it istrue
by default. All actions are deemed relevant and get enabled or disabled by thevisible
property. To remove an action, the plug-in should return a response withrelevant=false
andvisible=false
.
Dynamic Views
While the vSphere Client waits for answers, it might display views associated with static extensions, as well as indications that it is waiting for more data. If a plug-in has any dynamic extensions that are relevant in the current context, the vSphere Client will display the plug-in category name in the items list, with a spinner beside it indicating that the display is not yet complete. The vSphere Client will not display the view names in the plug-in category until the list has stabilized.
Dynamic Cards
If a card on the Summary tab is configured to be dynamic, the vSphere Client queries the associated plug-in server for visibility choices. The Summary tab displays only static cards while the vSphere Client waits for a response. After the response arrives, the vSphere Client adds to the display any dynamic cards that the response indicates should be visible.
Dynamic Actions
If a plug-in has dynamic action extensions in the Action menu, the vSphere Client creates place-holders in the menu until the plug-in response indicates whether or not the plug-in actions should be visible. While waiting for a response, the vSphere Client displays the plug-in name in the Actions menu, and puts a brief message in the plug-in submenu that indicates the client code is still loading information. When the plug-in response indicates that an action should be visible, the vSphere Client enables the action in the plug-in submenu. As of 8.0 U3, the plug-in can disable an action with visible=false
or remove it with relevant=false
also.
Direct Links to Dynamic Views
If a user clicks a link to a dynamic view, the vSphere Client might need to query the plug-in server for the view's visibility. While waiting for the response, the vSphere Client might open an iFrame for the dynamic view, with only a spinner and a message that the view is not yet ready. If the response indicates that the dynamic view should be hidden, the vSphere Client displays a message saying that the view is not available.
Direct Links to Static Views
If a user clicks a link to a static view, the vSphere Client displays the static view immediately. If there are also dynamic views that might apply, the client code marks the plug-in name in the category list with a spinner while it queries the plug-in server for its visibility choices.
Time-outs
In case the plug-in server does not return a timely response, the vSphere Client will time out and cancel the request. When the vSphere Client times out a request for dynamic extension visibility, it assumes the extension should be hidden.