May
25
Written by:
Quest Field Team
5/25/2009 7:44 PM

Golan Shem-Tov here with the Solutions Architects team at Quest.
When building a custom dashboard you sometimes want to use your own images for alarm state and Foglight makes it easy to do so.
Step 1 in doing so is choosing or creating the images, the easiest for me is to create one image and save it in different colors.




In this case we also added a letter indicating Normal, Warning, Critical and Fatal states.
Add the images you chose for the 4 states to Foglight according to the information specified in Fun with Foglight part 1 - Adding and using images.
Step 2 - The easiest way to create a new state renderer is copy an existing state renderer and replacing the images that are used for the states with the new images.
Go to the renderers tab in your new custom module and click add.

Make the new renderer a copy of the existing renderer foglight > common > TopologyObject State Renderer – Title.

Give the new renderer a meaningful name and make it public.

Switch to the configuration tab and expend the configuration tree and clear all the icons that are currently used.

Expend the image node for the different states and click on the edit button for image reference.

Point the image reference to the image you want to use for the current state, note that the image size that is visible in the preview before you click save.

Edit the width and height according to the info in the preview area.

Repeat this step for all the states (normal, warning, critical, fatal) and save the renderer.
To replace the state renderer that was originally used with the new state renderer go to the label view you created in fun with Foglight part 2 and edit it, under configuration tab edit the label value and locate your new renderer.

Edit your original custom dashboard and click on the layout tab, resize and relocate your new label (keep in mind you can use the test button to see how it looks).

result should look like this:


I hope you find this blog useful, contact me with any questions at gshemtov@quest.com
Golan Shem-Tov
Tags: