Legend:

Whoa! The {{{fields}}} option is a list if those chef attributes (aka fields) where you want to provide either a display name, a format handler, or both. So for example, {{{ec2.instance_type as Instance Type}}} above will use 'Instance Type' as the name of the {{{ec2.instance_type}}} attribute's the column or field. To define a display name (or label) for an attribute, list the attribute name followed by {{{ as }}} followed by the display name.

148

Whoa! The {{{fields}}} option is a list of those chef attributes (aka fields) where you want to provide either a display name, a format handler, or both. So for example, {{{ec2.instance_type as Instance Type}}} above will use 'Instance Type' as the name of the {{{ec2.instance_type}}} attribute's the column or field. To define a display name (or label) for an attribute, list the attribute name followed by {{{ as }}} followed by the display name.

149

149

150

150

Only slightly more complicated are handlers to format fields. So for example, {{{ohai_time_ as Last Check-in < AgoEpochHandler}}} has a display name as we've seen plus the {{{< AgoEpochHandler}}} directs the plugin to use a specific handler to format the {{{ohai_time}}} field's value. In this example, the {{{AgoEpochHandler}}} handler converts an epoch to a string format such as "0:08:36 ago" meaning "8 minutes and 36 seconds ago" as shown in the screenshot above. But wait, what's up with the underscore after the {{{ohai_time_}}}? In most cases when using a handler, you should postfix the field's name with an underscore ({{{_}}}) so that the re-formatted value doesn't get written back to the field's value. ''[I'm likely to get rid of the underscore business to make it simpler, but that's what it is for now. - rhg]'' See the {{{handlers.py}}} file for a full list of provided field handlers.