12.2 Creating Custom Dialog Windows |
![]() |
Viewpoint allows you to create a popup dialog window with site-specific content. This can be done in the Server, Job, Reservation, VM, Node, and VPC Management pages. The window is created by placing the <open-dialog
> child element inside of the <controls
> element. For more information, see the Table Button documentation in the Node Management and VM Management pages.
open-dialog
> element within the <controls
> element of the desired page. Set the value of the required frame-url
attribute to the URL of the page to be shown in the popup window. The URL follows the same syntax as embedding HTML pages within Viewpoint. It may contain field references of the current object, preceded by $, that will be replaced by the field's value. See Node Management table fields.<controls> <open-dialog frame-url="customizations/vms/reprovision.gsp;vmId=$id"> </open-dialog> </controls>
The $id variable in the URL will be replaced by the actual VM name.
header
> to define the content of the header in the dialog window. It may also contain field references of the object, preceded by $, which will be replaced by the field's value.<controls> <open-dialog frame-url="customizations/vms/reprovision.gsp;vmId=$id"> <header> Reprovision VM $id </header> </open-dialog> </controls>
image
attribute in the <open-dialog
> element, setting the value to the image's location on the web server.
<controls> <open-dialog frame-url="customizations/vms/reprovision.gsp;vmId=$id"> <header image="images/reprovision.png"> Reprovision VM $id </header> </open-dialog> </controls>
requirement
>and specify a condition. <requirement
> accepts any boolean value decider and all keywords corresponding to the applicable fields for the record. In the following example, a VM must run Linux to access the dialog window.<controls> <open-dialog frame-url="customizations/vms/reprovision.gsp;vmId=$id"> <header image="images/reprovision.png"> Reprovision VM $id </header> <requirement comparison="equals"> <first> <component id="variable[vm_os]" /> </first> <second>linux</second> </requirement> </open-dialog> </controls>
open-dialog
> element, set any of the desired optional attributes for Above-Table Buttons as described in the Node Management and VPC Management documentation.tooltip
- the explanatory text to be displayed by the button on mouse-over.image-url
- the path of the icon that will be used to display the button.label
- the display text of the button.<controls> <open-dialog frame-url="customizations/vms/reprovision.gsp;vmId=$id" tooltip="Reprovision this VM" image-url="images/button.png" label="Reprovision"> <header image="images/reprovision.png"> Reprovision VM $id </header> <requirement comparison="equals"> <first> <component id="variable[vm_os]" /> </first> <second>linux</second> </requirement> </open-dialog> </controls>