Permalink
Browse files

Merge branch 'master' of github.com:edelight/kitchen

  • Loading branch information...
2 parents 808700f + 31ef8f5 commit 542ef48c38e0f8e7488070024b7bf55e11cebd2f @tobami tobami committed Apr 18, 2012
@@ -22,3 +22,8 @@ body {
.badge {
float: right;
}
+
+.node_name, .node_ip,
+.node_env {
+ width: 17em;
+}
@@ -43,9 +43,10 @@ def main(request):
messages.add_message(request, messages.ERROR, str(e))
else:
if not len(data['nodes']):
- messages.add_message(request, messages.ERROR,
+ messages.add_message(request, messages.INFO,
"There are no nodes that fit the supplied criteria.")
data['show_virt'] = SHOW_VIRT_VIEW
+ data['query_string'] = request.META['QUERY_STRING']
return render_to_response('main.html',
data, context_instance=RequestContext(request))
@@ -67,5 +68,6 @@ def graph(request):
messages.add_message(request,
messages.INFO, "Please select an environment")
graphs.generate_node_map(data['nodes'])
+ data['query_string'] = request.META['QUERY_STRING']
return render_to_response('graph.html',
data, context_instance=RequestContext(request))
@@ -37,7 +37,7 @@
{% block topnav %}
<ul class="nav">
<li class="active"><a href="/">List</a></li>
- <li><a href="/graph/">Graph</a></li>
+ <li><a href="/graph?{{query_string}}">Graph</a></li>
</ul>
{% endblock %}
</div><!--/.nav-collapse -->
@@ -79,9 +79,11 @@
</div>
<div class="span10">
{% if messages %}
- <ul class="messages">{% for message in messages %}
- <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>{% endfor %}
- </ul>
+ {% for message in messages %}
+ <div class="alert{% if message.tags %} alert-{{ message.tags }}{% endif %}">
+ {{ message }}
+ </div>
+ {% endfor %}
{% endif %}
{% block bodycontent %}{% endblock %}
</div>
@@ -6,7 +6,7 @@
{% block topnav %}
<ul class="nav">
- <li><a href="/">List</a></li>
- <li class="active"><a href="/graph/">Graph</a></li>
+ <li><a href="/?{{query_string}}">List</a></li>
+ <li class="active"><a href="/graph">Graph</a></li>
</ul>
{% endblock %}
@@ -2,27 +2,27 @@
{% load filters %}
{% block bodycontent %}
{% if nodes %}
- <table class='table'>
+ <table class="table">
<thead>
<tr>
- <th>Name</th>
- <th>IP Address</th>
- <th>Environment</th>
- <th>Role</th>
+ <th class="node_name">Name</th>
+ <th class="node_ip">IP Address</th>
+ <th class="node_env">Environment</th>
+ <th class="node_role">Role</th>
</tr>
</thead>
{% for node in nodes %}
<tr>
- <td>
+ <td class="node_name">
{{ node.name }}
</td>
- <td>
+ <td class="node_ip">
{{ node.ipaddress }}
</td>
- <td>
+ <td class="node_env">
{{ node.chef_environment }}
</td>
- <td>
+ <td class="node_role">
{% for entry in node.role %}{% if not entry|is_environment_role %}{{ entry }}{% if not forloop.last %}, {% endif %}{% endif %}{% endfor %}
</td>
</tr>

0 comments on commit 542ef48

Please sign in to comment.