The app
interface provides context object information and helps your plug-in navigate and control the vSphere Client user interface.
app.ApiEndpoints
Description |
Holds a nested object that contains the parsed elements of the plug-in URL. |
Property |
Type |
Required? |
Notes |
---|---|---|---|
|
info only |
Used by: app.getApiEndpoints()
app.ClientInfo
Description |
Documents type and version of vSphere Client. |
Property |
Type |
Required? |
Notes |
---|---|---|---|
|
|
info only |
The vSphere Client type (must be |
|
|
info only |
The vSphere Client version string. |
Used by: app.getClientInfo()
app.ClientViewNavigationOptions
Description |
Specifies a destination view that is owned by the vSphere Client. |
Property |
Type |
Required? |
Notes |
---|---|---|---|
|
|
no |
Navigation ID of the destination view. (Only valid value is |
|
|
no |
ID of any object associated with the view. (For a global view, this field is not required.). |
Used by app.navigateToClientView()
app.formatDateTime()
Signature |
|
Description |
Returns a formatted string that contains a human-readable representation of the |
app.getApiEndpoints()
Signature |
|
Description |
Returns the URLs of the vsphere-ui service API endpoints available to plug-ins. For an example, see the sample remote plug-ins available in the vSphere Client SDK. |
app.getClientInfo()
Signature |
|
Description |
Returns type and version info for the vSphere Client. |
app.getClientLocale()
Signature |
|
Description |
Returns the current locale of the vSphere Client. |
app.getContextObjects()
Signature |
|
Description |
Returns the IDs of the current context objects, depending on the view or dialog from which the method is called. |
Return value: |
A context item is a JavaScript object containing a single property, |
app.getNavigationData()
Signature |
|
Description |
Returns the custom data passed to the view by the |
app.getPluginBackendInfo()
Signature |
|
Description |
Creates listings of service endpoints registered for the running plug-in instance, enabling plug-in front ends to use the vCenter Server The callback function must have the following signature: Function callback( If the method throws an exception, the |
app.getRemotePluginNavigationMap()
Signature |
|
Description |
Returns view IDs that belong to a plug-in specified by the The callback function must have the following signature: function callback(navigationInfo:app.RemotePluginNavigationMap):void If the method throws an exception, the |
app.getSessionInfo()
Signature |
|
Description |
Retrieves and processes information about the client's authentication session. The callback function must have the following signature: function callback(info:app.SessionInfo):void If the method throws an exception, the |
app.getTheme()
Signature |
|
Description |
Retrieves information about the UI theme that is currently selected. |
app.navigateTo()
Signature |
|
Description |
Navigates to a specified view, and optionally passes custom data to the view. |
Parameter: |
Specifies the destination view and custom data. |
app.navigateToClientView()
Signature |
|
Description |
Navigates to a specified vSphere Client view. |
Parameter: |
Specifies the destination view. |
app.navigateToRemotePluginView()
Signature |
|
Description |
Navigates to a view implemented by another remote plug-in, or by another instance of the same plug-in deployed by a different vCenter Server instance. Optionally passes custom data to the view. |
Parameter: |
Specifies the destination view and custom data. |
A best practice is to call app.getRemotePluginViewNavigationMap() before this procedure, to ensure that the navigation target is registered and enabled.
app.NavigationOptions
Description |
Specifies a destination view and custom data for the view. |
Property |
Type |
Required? |
Notes |
---|---|---|---|
|
|
no |
Navigation ID of the destination view. (For a remote plug-in, this property must identify a view created by the same plug-in.) Omit this to navigate to the last-used view of the object specified by |
|
|
no |
ID of any object associated with the view. Omit this to navigate to a global view. |
|
|
no |
A custom data structure passed to the view. |
Used by: app.navigateTo()
app.PluginBackendInfo
Description |
Contains two objects that list endpoint descriptors available to a given plug-in instance. |
Property |
Type |
Required? |
Notes |
---|---|---|---|
|
|
info only |
A list of plug-in server endpoint descriptors registered for a given plug-in instance. The list includes all registrations within the same link group. The list is unordered and contains no duplicates. |
|
|
info only |
A one-to-many mapping: vCenter Server GUID to a list of plug-in server endpoint descriptors registered with the vCenter Server instance on behalf of the running plug-in instance. |
Used by: app.getPluginBackendInfo()
app.PluginBackendServerInfo
Description |
A descriptor for a plug-in server endpoint registered for a plug-in instance. Choose the server by the |
Property |
Type |
Required? |
Notes |
---|---|---|---|
|
|
info only |
The path component of the server root URL, as seen on the reverse proxy service port. |
|
|
info only |
The |
Used by: app.PluginBackendInfo
app.PluginDateTimeFormatOptions
Description |
Specifies which part of a timestamp to format. |
Property |
Type |
Required? |
Notes |
---|---|---|---|
|
|
no (default: |
Possible values:
|
Used by: app.formatDateTime()
app.PluginTheme
Description |
Indicates a choice of UI theme. |
Property |
Type |
Required? |
Notes |
---|---|---|---|
|
|
info only |
Possible values: |
Used by: app.getTheme()
app.QueryParam
Description |
Holds a single query parameter of a URL. |
Property |
Type |
Required? |
Notes |
---|---|---|---|
|
|
info only |
Name of query parameter, as in |
|
|
info only |
Value of query parameter, as in |
Used by: app.UiApiEndpoint
app.RemotePluginNavigationMap
Description |
Lists remote plug-in destination views, belonging to a single vCenter Server instance, that are exposed by plug-ins using the |
Property |
Type |
Required? |
Notes |
---|---|---|---|
|
|
info only |
A one-to-many mapping of vCenter Server instances to view IDs that are served by a specified plug-in instance registered with each vCenter Server instance. Each map entry contains the GUID of a vCenter Server instance within the same link group, and a corresponding list of view descriptors. |
Used by: app.getRemotePluginNavigationMap()
app.RemotePluginVcNavigationInfo
Description |
Descriptor for views served by a given plug-in. Use a view ID as the value of the |
Property |
Type |
Required? |
Notes |
---|---|---|---|
|
|
info only |
The version of a plug-in instance registered with a given vCenter Server instance. |
|
|
info only |
All the view IDs, served by a given plug-in instance, that are accessible to the current plug-in instance. |
Used by: app.RemotePluginNavigationMap
app.RemotePluginViewNavigationOptions
Description |
Specifies a destination view served by a different plug-in instance, and custom data for the view. |
Property |
Type |
Required? |
Notes |
---|---|---|---|
|
|
yes |
ID of the plug-in that owns the destination view. |
|
|
yes |
Navigation ID of the destination view. Use only values returned by |
|
|
yes |
The GUID of the vCenter Server instance that determines the context for the target view. If |
|
|
no |
ID of any object associated with the view. (For a global view, this field is not required.) |
|
|
no |
A custom data structure passed to the view. |
Used by: app.navigateToRemotePluginView()
app.SessionInfo
Description |
Holds information about the current session of the vSphere Client. |
Property |
Type |
Required? |
Notes |
---|---|---|---|
|
|
info only |
Identifier of the plug-in authentication session with vCenter Server. |
|
|
info only |
Reserved for internal use only. |
Used by: app.getSessionInfo()
app.UiApiEndpoint
Description |
Holds the parsed elements of a plug-in URL. |
Property |
Type |
Required? |
Notes |
---|---|---|---|
|
|
info only |
<protocol>://<hostname><port> |
|
|
info only |
|
|
|
info only |
<name>=<value> |
|
|
info only |
<origin>/<pathname>?<queryParams> |
Used by: app.ApiEndpoints