Merge pull request #3 from SandyWalsh/ui_tweaks
cleanup UI and add search
This commit is contained in:
commit
b08ccb6fbd
@ -30,7 +30,7 @@ under the License.
|
||||
.fancy {
|
||||
font-family: 'Kaushan Script';
|
||||
font-style: normal;
|
||||
padding-bottom: 1em;
|
||||
padding-bottom: 0em;
|
||||
font-size: 3em;
|
||||
color:#C63520;
|
||||
}
|
||||
@ -86,7 +86,7 @@ under the License.
|
||||
margin-bottom:1em;
|
||||
}
|
||||
.std-height {
|
||||
height:5em;
|
||||
height:30em;
|
||||
overflow-y:scroll;
|
||||
overflow-x:hidden;
|
||||
}
|
||||
|
@ -10,6 +10,16 @@
|
||||
{
|
||||
$("#row_expansion_" + row_id).load('/' + tenant_id + '/expand/' + row_id);
|
||||
};
|
||||
|
||||
function search_form(tenant_id)
|
||||
{
|
||||
var field = $("#field").val();
|
||||
var value = $("#query").val();
|
||||
var data = {'field':field, 'value':value};
|
||||
$("#detail").load('/' + tenant_id + '/search/', data);
|
||||
return false;
|
||||
};
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_init_js %}
|
||||
@ -19,28 +29,33 @@
|
||||
|
||||
{% block body %}
|
||||
<div style='float:right;'>{{state.tenant.email}} (TID:{{state.tenant.tenant_id}}) - {{state.tenant.project_name}} <a href='/logout'>logout</a></div>
|
||||
<div class='status-title'>Recent Host Activity</div>
|
||||
<div class='status-title'>Recent Activity</div>
|
||||
<div id='host-box' class='status std-height'>
|
||||
<div id='host_activity' class='status-inner'>
|
||||
{% include "host_status.html" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='status-title'>Recent Instance Activity</div>
|
||||
<div id='instance-box' class='status std-height'>
|
||||
<div id='instance_activity' class='status-inner'>
|
||||
{% include "instance_status.html" %}
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<div class='status-title'>Commands</div>
|
||||
<div class='status'>
|
||||
<div class='status-inner'>
|
||||
<input type=text style='width:100%; background-color:black;color:white;'
|
||||
value='<custom query here>'/>
|
||||
<div class='status-inner' style='padding-bottom:0em; margin-bottom:0em; margin-top:1em'>
|
||||
<div>
|
||||
<form action="">
|
||||
<select id='field'>
|
||||
<option value='routing_key'>source
|
||||
<option value='nova_tenant'>tenant
|
||||
<option>service
|
||||
<option>host
|
||||
<option>event
|
||||
<option selected='true'>instance
|
||||
</select>
|
||||
<input type='text' id='query' size='60' value=''/>
|
||||
<input type='submit' value='Search' onclick='return search_form({{state.tenant.tenant_id}});'/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
<div class='status-title'>Details</div>
|
||||
<div class='status'>
|
||||
<div id='detail' class='status-inner'>
|
||||
|
@ -9,6 +9,9 @@
|
||||
<td class='title'>instance</td>
|
||||
<td class='title'>when</td>
|
||||
</th>
|
||||
{% if not rows %}
|
||||
<tr><td>No results</td></tr>
|
||||
{% endif %}
|
||||
{% for row in rows %}
|
||||
<tr {% if row.highlight %}style='background-color:#FFD88F;'{% endif %} >
|
||||
<td>
|
||||
@ -37,7 +40,7 @@
|
||||
{% endif %}
|
||||
</a>
|
||||
</td>
|
||||
<td class='cell-border'><a href='#' onclick='details({{state.tenant.tenant_id}}, "when", {{row.id}});'>{% if show_absolute_time %}{{row.when}}{%else%}{{row.when|timesince:utc}} ago{%endif%}</a></td>
|
||||
<td class='cell-border'><a href='#' onclick='details({{state.tenant.tenant_id}}, "when", {{row.id}});'>{% if show_absolute_time %}{{row.when}} (+{{row.when.microsecond}}){%else%}{{row.when|timesince:utc}} ago{%endif%}</a></td>
|
||||
</tr>
|
||||
{% if allow_expansion %}
|
||||
<tr>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<ul>
|
||||
<li>Get a <a href='/new_tenant'>StackTach Tenant ID</a>
|
||||
<li>Add <pre>--notification_driver=nova.notifier.rabbit_notifier</pre> and
|
||||
<li><pre>--notification_topics=info,monitor</pre> to your nova.conf file.
|
||||
<li><pre>--notification_topics=notifications,monitor</pre> to your nova.conf file.
|
||||
<li>Configure and run the <a target='_blank' href='https://github.com/Rackspace/StackTach'>StackTach Worker</a> somewhere in your Nova development environment.
|
||||
<li>Restart Nova and visit http://[your server]/[your_tenant_id]/ to see your Nova installation in action!
|
||||
</ul>
|
||||
|
21
urls.py
21
urls.py
@ -1,9 +1,20 @@
|
||||
from django.conf.urls.defaults import patterns, include, url
|
||||
|
||||
# Uncomment the next two lines to enable the admin:
|
||||
# from django.contrib import admin
|
||||
# admin.autodiscover()
|
||||
|
||||
urlpatterns = patterns('',
|
||||
url(r'^', include('stacktach.url')),
|
||||
url(r'^$', 'stacktach.views.welcome', name='welcome'),
|
||||
url(r'new_tenant', 'stacktach.views.new_tenant', name='new_tenant'),
|
||||
url(r'logout', 'stacktach.views.logout', name='logout'),
|
||||
url(r'^(?P<tenant_id>\d+)/$', 'stacktach.views.home', name='home'),
|
||||
url(r'^(?P<tenant_id>\d+)/data/$', 'stacktach.views.data',
|
||||
name='data'),
|
||||
url(r'^(?P<tenant_id>\d+)/details/(?P<column>\w+)/(?P<row_id>\d+)/$',
|
||||
'stacktach.views.details', name='details'),
|
||||
url(r'^(?P<tenant_id>\d+)/search/$',
|
||||
'stacktach.views.search', name='search'),
|
||||
url(r'^(?P<tenant_id>\d+)/expand/(?P<row_id>\d+)/$',
|
||||
'stacktach.views.expand', name='expand'),
|
||||
url(r'^(?P<tenant_id>\d+)/host_status/$',
|
||||
'stacktach.views.host_status', name='host_status'),
|
||||
url(r'^(?P<tenant_id>\d+)/instance_status/$',
|
||||
'stacktach.views.instance_status', name='instance_status'),
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user