Skip to content

Instantly share code, notes, and snippets.

@caryp
Created March 10, 2011 06:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caryp/863665 to your computer and use it in GitHub Desktop.
Save caryp/863665 to your computer and use it in GitHub Desktop.
RightScale Dashboard Widget in Liquid markup
{% if servers == empty %}
<div style="text-align:center;padding:20px">-no matching servers-</div>
{% else %}
{% counter total_count = 0 %}
{% assign my_table_contents = "" %}
{% for s in servers %}
{% increment total_count %}
{% capture my_server_table_contents %}
{{ my_server_table_contents }}
<tr>
<td>{{ s.link }}</td>
<td>{{ s.runtime }}</td>
{% if config.current_view == "expanded" %}
<td>{{ s.server_template_link }}</td>
<td>{{ s.deployment_link }}</td>
<td>{{ s.cpu_icon }}</td>
<td>{{ s.zone }}</td>
<td>{{ s.cloud_name }}</td>
{% endif %}
</tr>
{% endcapture %}
{% endfor %}
</div>
<table>
<tr>
<th>Nickname</th>
<th>Runtime</th>
{% if config.current_view == "expanded" %}
<th>ServerTemplate</th>
<th>Deployment</th>
<th>CPU</th>
<th>Zone</th>
<th>Cloud</th>
{% endif %}
</tr>
{{ my_server_table_contents }}
</table>
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment