Welcome to the HyperFORGE

The HyperFORGE was created to facilitate collaboration on plugins and documentation for they Hyperic Community.

Become a HyperFORGE member →

Recent Activity

Skip to end of metadata
Go to start of metadata
This and all subsequent pages relates to dynamic templates in future version 1.1. Subject to change until 1.1 GA is out.

Dynamic template language can be used to define wallmount layout templates programmatically. Dynamic templates are based on Groovy, Groovy DSL, dynamic layout API and a collection of helper classes.

Let's assume user is managing multiple Hyperic environments and there is a need to have a same kind of layout in every system which shows availability's for all platforms. This could be done using wallmount designer and build separate layouts manually for each system. This kind of scenario can be accomplished through dynamic templates where the dynamic template itself queries the API to get all platforms and then build the actual layout JSON. JSON representing the layout will be different for each system but the dynamic template will be same and can be distributed throughout the systems.

Writing a Dynamic Templates

Writing a dynamic template is as simple as to write a code which outputs a valid layout JSON string. See from layout JSON reference document how it is structured. When a Player requests content from a dynamic template it doesn't see what's in it, it only sees what's coming out from the template execution. Actually it's possible to take existing normal template, put that to a dynamic template as a string and just return it. There's no "dynamic" in that kind of template but Player don't know it.

Write Dynamic Template

Dynamic Template Examples

Various examples can be found from here: Examples

Template API and Helper Classes

DynResourceApi

DynResourceApi contains methods to access and query Hyperic's resources and metrics.

API Documentation

JsonGroovyBuilder

Usage of JsonGroovyBuilder is totally optional but those who are familiar with Groovy DSL know how this type of programming model can ease the creation of a complex structures like xml and json.

Class Usage

DynObjectCreator

Methods to create wallmount widgets with a basic settings.

Class Usage

DynlayoutUtils

Utility methods to work with a JsonGroovyBuilder.

Class Usage

DynWinUtils

This utility class contains methods to work with a layout windows. It's kind of a janitor who can be asked to re-organize window positions.

Class Usage

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.