5.5
Table Of Contents
- Developing Web Views for VMware vCenter Orchestrator
- Contents
- Developing Web Views for VMware vCenter Orchestrator
- Web View Overview
- Weboperator Web View
- Web View Development Tasks to Perform in Orchestrator
- Create a Web View Skeleton
- Export a Web View as a Template
- Create a Web View from a Template
- Define a Web View Template as a Resource Element
- Create a Web View from a Resource Element Template
- Export Web View Files to a Working Folder
- Configure the Server for Web View Development
- Import Web View Files from a Working Folder
- Create a Web View Attribute
- Add a Resource Element to a Web View
- Disable Web View Development Mode
- Publish a Web View
- File Structure of a Web View
- Web View Home Page
- Web View Components
- Tapestry Web View Components
- Creating Tapestry Web View Components
- Orchestrator Tapestry Component Library
- vco:DisplayProperty Component
- vco:IfMemberOf Component
- vco:IncludeJavascript Component
- vco:IncludeStylesheet Component
- vco:IncludeWorkflowHeader Component
- vco:ListPane Component
- vco:Login Component
- vco:PageAccessControl Component
- vco:TaskAction Component
- vco:WebformContainer Component
- vco:WorkflowLink Component
- Accessing Server Objects from URLs
- Create a Simple Web View Using the Default Template
- Import the Default Web View Template
- Export the Virtual Machine Manager Web View to a Working Folder
- Provide Unique Component Names
- Configure the Server for Web View Development
- Edit the Virtual Machine Manager Web View Home Page
- Add a vco:ListPane Component to the Web View Home Page
- Define the Web View Attributes for the vco:ListPane Component
- Create a Web View Component to Display Virtual Machine Information
- Create a Web View Tab by Using the Menu Component
- Add Links to Run Workflows from a Web View by Using the vco:WorkflowLink Component
- Customize the Web View Interface
- Publish the Virtual Machine Manager Web View
- Index
4 Create a Web view attribute, of type Action with the value set to the action of your choice.
For example, name the Web view attribute MyAction.
5 Create Web view attributes for each of the input parameters that the action requires.
For example, name a Web view attribute ActionParameterAttribute.
6 Click Save and close to exit the Web view editor.
7 Open the HTML page in which to insert the URL in an HTML editor.
8 Add a link to https://orchestrator_server:
8280/vco/vmo/web_view_url_folder/system/vmo/pages/action.html at the appropriate place in the
HTML file.
Add a relative link to the action URL, that starts below the Web view URL folder value, rather than
hard-coding the address of the Orchestrator server in the URL, as the following example shows:
<a href="./system/vmo/pages/action.html?action=myAction
&actionParameters=attribute:ActionParameterAttribute
&actionParameters=action_parameter_value">
Click here to run an action</a>
The URL uses the Web view attributes you set in the Orchestrator client to start the action myAction and
to set the ActionParameterAttributeparameter. The second parameter, ActionParameterValue, is not a
Web view attribute so you add the parameter value directly in the URL.
You added a link to run an action from a URL. When users click the link in the published Web view, the
action runs with the parameters you reference in the URL. JavaScript functions that you define can process
the results of running the action.
Accessing Resource Elements from URLs
Workflows and Web views can require as attributes objects that you create independently of Orchestrator.
To use external objects as attributes in workflows or Web views, you import them into the Orchestrator
server as resource elements.
You can add URLs to Web view pages to retrieve resource elements from the Orchestrator server. You can
then add JavaScript functions to the Web view to process the resource elements. To access a resource
element from a URL in a Web view, you must declare that resource element as a Web view attribute and
reference the attribute in the URL.
Web views access resource elements at the following URL:
https://orchestrator_server:
8280/vco/vmo/web_view_url_folder/system/resources/attributes/resource_attribute_name.att
To avoid hard-coding the orchestrator_server address into the URL, you can provide relative paths to the
action that start from the directory below the Web view URL folder, as the following path shows:
<a href="./system/resources/attributes/resource_attribute_name.att"></a>
Obtain a Resource Element from a URL
Resource elements are files that are imported into the Orchestrator server for use by Orchestrator
applications. By accessing a resource element from a URL in a Web view, you make that resource element
available to processing that you define in the Web view.
Objects that workflows and Web views can use as resource elements include image files, scripts, XML
templates, HTML files, and so on. Any workflows or Web views that run in the Orchestrator server can use
any resource elements that you import into Orchestrator.
Chapter 7 Accessing Server Objects from URLs
VMware, Inc. 45