Created
March 10, 2011 06:38
-
-
Save caryp/863665 to your computer and use it in GitHub Desktop.
RightScale Dashboard Widget in Liquid markup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% 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