If your plug-in module adds actions to the vSphere Web Client, you can change the order in which those actions appear at different points in the user interface.

You can prioritize the action order in the global action menu for all vSphere actions, or in the context-specific action menu for a vSphere or custom object.

To change your actions display order, you must create a Prioritization extension. You must define the Prioritization extension in the same plug-in package that contains your action extensions. You must create different extensions depending on whether you want to promote actions in the action menu for a certain object type, or to set the action priority in the global action list.

To change how actions are prioritized in the action menu for a specific object type, you must create a Prioritization extension at the extension point vmware.prioritization.actions. Your extension must provide a data object of type com.vmware.vsphere.client.prioritization.ActionPriorityGroup.

The ActionPriorityGroup object defines the priority order for the actions in the action menu, and the target object type. The actions listed first in your extension definition appear at the top of the action menu and to the right side of the actions toolbar. You can promote a maximum of five actions on the actions toolbar.

Following is a list of the properties of the ActionPriorityGroup object that you must set in your Prioritization extension.

Property

Type

Description

<prioritizedIds>

array

Array of <string> elements. Each <string>element contains the UID of an action. You list each action UID string in order from highest priority to lowest priority, depending on how you want the actions to appear in the action menu.

<actionTargetTypes>

array

The <string> element that contains the target object type, such as samples:Chassis or VirtualMachine. The Prioritization extension sets the display priority for the action menu of the target object type.

<regionId>

string

Optional parameter you can use to specify a specific subset of actions in an action menu. If a vSphere or custom object has a different action list depending on that object state, you can specify the UID of that action list in the <regionId> parameter to promote actions in that action list.

The following example shows a Prioritization action that sets the display priority for actions in the default actions menu for a custom object called Chassis.

<extension id="com.vmware.samples.chassis.actionMenuPrioritization.editAction">
<extendedPoint>vmware.prioritization.actions</extendedPoint>
<object>
<prioritizedIds>
<string>com.vmware.samples.chassis.editChassis</string>
<string>com.vmware.samples.chassis.deleteChassis</string>
<string>com.vmware.samples.chassis.moveChassis</string>
<string>com.vmware.samples.chassis.poweronChassis</string>
<string>com.vmware.samples.chassis.poweroffChassis</string>
</prioritizedIds>
<actionTargetTypes>
<string>samples:Chassis</string>
</actionTargetTypes>
</object>
</extension>

To change how actions are prioritized in the global actions menu, you must create a Prioritization extension at the extension point vmware.prioritization.listActions. Your extension must provide a data object of type com.vmware.vsphere.client.prioritization.ActionPriorityGroup.

The ActionPriorityGroup object defines the priority order for the actions in the global actions toolbar, which is the toolbar that appears to the left of the context toolbar. The actions listed first in your extension definition appear farthest left in the global actions toolbar.

The following table lists the properties of the ActionPriorityGroup object that you must set in your Prioritization extension.

Property

Type

Description

<prioritizedIds>

array

Array of <string> elements. Each <string> element contains the UID of an action. You list each action UID string in order from highest priority to lowest priority, depending on how you want the actions to appear in the global action list.

<regionId>

string

UID of the region of the global action list to modify.

The following example shows a Prioritization action that sets the display priority for actions in the default actions menu for a custom object called Chassis.

<extension id="com.vmware.samples.chassis.actionListPrioritization.createAction">
   <extendedPoint>vmware.prioritization.listActions</extendedPoint>
   <object>
      <prioritizedIds>
         <string>com.vmware.samples.chassis.createChassis</string>
         <string>com.vmware.samples.chassis.createRack</string>
      </prioritizedIds>
      <regionId>com.vmware.samples.chassis.list</regionId>
   </object>
</extension>