puppetboard/catalog: Making the catalog tables searchable

Also standardizing the form declarations
This commit is contained in:
Corey Hammerton
2015-10-28 19:54:16 -04:00
parent a3473abf61
commit e0866a12ea
3 changed files with 9 additions and 6 deletions

View File

@@ -25,4 +25,4 @@ class QueryForm(Form):
class CatalogForm(Form): class CatalogForm(Form):
"""The form used to compare the catalogs of different nodes.""" """The form used to compare the catalogs of different nodes."""
compare = HiddenField('compare') compare = HiddenField('compare')
against = SelectField(u'against') against = SelectField('against')

View File

@@ -48,7 +48,7 @@
<th>Target</th> <th>Target</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody class='searchable'>
{% for edge in catalog.get_edges() %} {% for edge in catalog.get_edges() %}
<tr> <tr>
<td>{{edge.source}}</td> <td>{{edge.source}}</td>

View File

@@ -1,5 +1,8 @@
{% extends 'layout.html' %} {% extends 'layout.html' %}
{% block content %} {% block content %}
<div class="ui fluid icon input hide" style="margin-bottom:20px">
<input autofocus="autofocus" class="filter-table" placeholder="Type here to filter...">
</div>
<table class="ui basic table"> <table class="ui basic table">
<tbody> <tbody>
<tr> <tr>
@@ -16,7 +19,7 @@
<thead> <thead>
<tr><th>Resources</th></tr> <tr><th>Resources</th></tr>
</thead> </thead>
<tbody> <tbody class='searchable'>
{% for resource in compare.get_resources() %} {% for resource in compare.get_resources() %}
<tr> <tr>
<td>{{resource.type_}}[{{resource.name}}]</td> <td>{{resource.type_}}[{{resource.name}}]</td>
@@ -30,7 +33,7 @@
<thead> <thead>
<tr><th>Resources</th></tr> <tr><th>Resources</th></tr>
</thead> </thead>
<tbody> <tbody class='searchable'>
{% for resource in against.get_resources() %} {% for resource in against.get_resources() %}
<tr> <tr>
<td>{{resource.type_}}[{{resource.name}}]</td> <td>{{resource.type_}}[{{resource.name}}]</td>
@@ -50,7 +53,7 @@
<th>Target</th> <th>Target</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody class='searchable'>
{% for edge in compare.get_edges() %} {% for edge in compare.get_edges() %}
<tr> <tr>
<td>{{edge.source}}</td> <td>{{edge.source}}</td>
@@ -70,7 +73,7 @@
<th>Target</th> <th>Target</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody class='searchable'>
{% for edge in against.get_edges() %} {% for edge in against.get_edges() %}
<tr> <tr>
<td>{{edge.source}}</td> <td>{{edge.source}}</td>