DevPortal

How do I modify Dashboard using XMLs?


Table of Contents


How do I modify Dashboard using XMLs?

The dashboard runs as a Web application and the entire data that is displayed in it is configurable through various xmls. You can configure the graphs that are to be shown for each component, for example, you can change the list of properties, the names that appear for each detail and what statistics should be shown in the dials etc.

Following is the list of xmls that determine the configuration of the dashboard. You can modify these xmls to change the look of your dashboard to suit your own purposes:

Use Cases

How do I change the overall UI of Graphs, Dials, and Properties?

You can edit the dashboard-ui-defaults.xml to accomplish this. For example, to change the background color of the dial, you can change the value of the bgcolor attribute of the <dial-display> element to the new value.

<dial-display bgcolor="eeeeee" textcolor="666666" safe-color="66cc66" caution-color="ffcc66" danger-color="ff6666" divisions="5" type="relative"/>

Similarly, you can change the text color, the number of y divisions on the graph the kind of plot (whether line, area, or bar) that are shown initially, etc.

How do I change the data displayed along with Server Machine Node in Enterprise View?

You can edit the dashboard-allnodes.xml and add or remove the statistics that you want to see there. But you have to keep in mind that there is a limited real-estate available.

For example, to change the vertical bar that shows up along-side the Server node, you can make the following change:

 <index>
   <nodes>
    <bargraph display-name="CPU Usage">
     <max-stat stat-id="trend-008"/>
     <current-stat stat-id="trend-009"/>
    </bargraph>
   <nodes>
 <index>

The bargraph element provides the statistic ID for the maximum possible value and the current value.

Similarly, to have the JVM CPU Usage displayed in the property table along-side the Server node, instead of Web Sessions, replace the property element:

 <index>
   <nodes>
    <properties>
     <property id="3" display-name="Web Sessions">
      <stat id="trend-006" context-based="false"/>
    </property>
   <nodes>
 <index>

with:
 <index>
   <nodes>
    <properties>
     <property id="1" display-name="JVM CPU Usage">
      <stat id="trend-025" context-based="false"/>
    </property>
   <nodes>
 <index>

How do I change the Hierarchy displayed in the Tree?

To achieve this, you need to edit the dashboard-components.xml. For example, if you want to remove the marker Applications node in the tree and just display all the applications, ears, wars, and jars directly beneath the root, just remove the <component id="Applications" opcode="" type="marker"> element and add all it's children directly to the component-hiearchy element.

The modified dashboard-components.xml will look like this:
 <node>
     <component-hiearchy>
       <component id="Applications" opcode="" type="marker">
       <component id="ear" opcode="0107" type="many">
       <component id="war" opcode="0211" type="many"/> ... </component>
       <component id="ear" opcode="0112" type="many"/> ... </component>
     <component-hiearchy>
 </node>

If there is a need to add a new component to the hierarchy, say list the JMS Destinations under the JMS Container, then add the following element as a child to the <component id="JMS" opcode="0104" type="one"/> element.

The value of the opcode should be the operation ID corresponding to the operation element in dashboard-components.xml, that defines the operation to get a list of JMS destinations. You will have to look up the MBean repository on the Server for the object name and the method name that provide this list.

How do I change the data shown in Dials, Graphs, and Table for each component?

To change data shown in the dials/graphs/table for each component (in the component tree) on the right-side panel of the dashboard, use the component element under <index>/<components> element in the dashboard-components.xml. This element specifies the list of graphs/dials/properties that need to be displayed for each component in the component-hierarchy tree.

The id attribute of component element forms the link. The /graphs/graph element corresponds to the graphs (both small and big), /properties/property element to the tabular properties, and /dials/dial for the dials.

On the panel, only two dials and two small graphs can be seen. So if there are more than two dials or graphs, then only the first (in the order in which they appear) two are picked and others are not considered.

For example, if Web Container Sessions is to be shown as the first dial for the server component, that is, when the Server node is clicked in the tree, move the following under the /dials/dial element (of the component element which has the id attribute set to server) as the first element child:

<dial id="5" name="Web Container Sessions" unit="Count" caution-value="60" danger-value="90"> <stat id="trend-006" context-based="false"/> </dial>

Here itself you can modify the other UI features of the dial like the name for the unit to be used, the caution-value and the danger-value.


Related Topics:

© Pramati Technologies 2007 Runs on Pramati Server | Feedback | Legal