It's better when it's simple

User Tools

Site Tools


This is an old revision of the document!

rack plugin

Compatible with DokuWiki


plugin Displays an elevation of a datacenter rack.

Last updated on

The missing download url means that this extension cannot be installed via the Extension Manager. Please see Publishing a Plugin on Recommended are public repository hosts like GitHub, GitLab or Bitbucket.

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Similar to advrack, patchpanel, phpipam, switchpanel

Tagged with diagram, images, media

Download and Installation

Download and install the plugin using the Plugin Manager using the following URL. Refer to Plugins on how to install plugins manually.

Update notes

20100301.0: Add Josef Fortier's improved link HTML. Also styled the links a bit.

20100118.0: Added a small feature request: you can now express racks that number top-to-bottom by specifying “descending” in the <rack> tag.

20100115.0: Folded in a change introduced by Sylvain Bigonneau: you can now assign links to rack items. Thanks for the contribution! A lot of people have been asking for this.

20090608.0: Renamed the JavaScript function getElementsByClass to rack_getElementsByClass, since the former exists as a part of the base DokuWiki. (Of course, if IE would just support modern CSS, I wouldn't need any JavaScript at all.) Thanks to Christian Marg for spotting this!

20090520.0: Sidestepped frustrating Firefox rendering bug by making the bottom border a whole row. Ugly, I know, but otherwise Firefox will leave little black lines across the rack when you scroll past it (????). Very weird.

20090519.0: Initial release

Submit changes

If you add something useful to the plugin, email me and post a patch or pastebin or something below and I'll see about folding it into the plugin.

Put your comments/fixes here

Changes accepted

URL Add by Sylvain Bigonneau

I figured I could use a “link” option for this nice plugin, so I made little changes in the syntax.php file. Please contact me for remarks and questions.


<u_bottom> <u_size> <model> [name] [#color] [link:http://url] [comment]

(This feature is now available in the official 20100115.0 release linked at the top of this page. –TKB)

The link now covers the whole cell, so you can now click on the model or hostname. Email.

(Integrated into 20100301.0 –TKB)

Rack syntax

Each rack is enclosed in <rack>...</rack> tags. The rack tag can have the following parameters (all optional):

  • name=<name>: The name of the rack (default: 'Rack')
  • height=<U>: The height of the rack, in U (default: 42)
  • descending: Indicates that the rack is numbered top-to-bottom

Between these tags is a series of lines, each describing a piece of equipment:

<u_bottom> <u_size> <model> [name] [#color] [link:<URL>] [comment]

The fields:

  • <u_bottom>: The starting U of the equipment.
  • <u_size>: The height of the equipment in U.
  • <model>: The model name or other description of the item (e.g. “Cisco 4948” or “Patch panel”). If it has spaces, enclose it in quotes.
  • [name]: Optional. The hostname or other designator of this specific item (e.g. “rtpserver1”). If it has spaces, enclose it in quotes. If you want to specify a comment but no name, use “” as the name.
  • [#color]: Optional. The color of the item is normally automatically picked based on the model, but you can override it by specifying a #RRGGBB HTML color after the model/name.
  • [link:<URL>]: Optional. Optional. The cell will now link to the URL given.
  • [comment]: Optional. After the name (and possibly color), any remaining text on the line is treated as free-form comment. Comments are visible by hovering the mouse over the equipment in the rack. Items with comments are designated with an asterisk * after the model name.

You can also include comment lines starting with a pound sign #.

Here is an example 16U rack and the resulting output:

<rack name=A20 height=16>
# This line is a comment, and will be ignored.

# Here's a 4U server.  We just give the location, size, model, and name:
1 4 "IBM x3950" webserver1

# Here's another server with a comment appended and a link to a web page:
7 4 "HP DL380" webdemo  link:  On loan from Bob.

# There's some empty space in the rack here, but there's no need to make a note of it.

# If the model or name doesn't have any spaces, you can drop the quotes.
# Also, the name field is optional.
12 1 Cableguide

# The color is automatically picked based on the model, unless you override it.  
# This unknown device will be gray by default.
13 1 "Crazytown 9000" crazy1

# To override the color, just specify a #RRGGBB HTML color after the model/name.  We'll make this one yellow:
14 1 "Crazytown 9000" crazy2 #FFFF00 link:

Because doesn't have my plugin installed, this is just an image, not the real thing

If you want to add new auto-coloring options, edit syntax.php and add conditionals to the autoselect_color function.

What if I find this plugin useful? What if I have problems?

Shoot me an email.


The usual: Author assumes no responsibility for this software, use at your own risk. Don't sue me.

plugin/rack.1280963224.txt.gz · Last modified: 2010-08-05 01:07 by