aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wilmott <p@p8952.info>2015-03-22 22:31:40 +0000
committerPeter Wilmott <p@p8952.info>2015-03-22 22:31:40 +0000
commitf9cb0f8663b69029f35a1da2aac7b476d7b83aa3 (patch)
treeefec349b21f33140ffdce150535f28c936392d68
parentMerge pull request #14 from p8952/new_targets (diff)
downloadruby-tinderbox-f9cb0f8663b69029f35a1da2aac7b476d7b83aa3.tar.gz
ruby-tinderbox-f9cb0f8663b69029f35a1da2aac7b476d7b83aa3.tar.bz2
ruby-tinderbox-f9cb0f8663b69029f35a1da2aac7b476d7b83aa3.zip
Add filtering for pages with large tables
-rw-r--r--web/views/build/build_status.erb4
-rw-r--r--web/views/bumps/new_targets.erb4
-rw-r--r--web/views/package/outdated_gems.erb4
-rw-r--r--web/views/package/ruby_targets.erb4
-rw-r--r--web/views/partials/search.erb19
-rw-r--r--web/views/repoman/repoman_checks.erb4
6 files changed, 39 insertions, 0 deletions
diff --git a/web/views/build/build_status.erb b/web/views/build/build_status.erb
index 04ab1d8..fc4f5d1 100644
--- a/web/views/build/build_status.erb
+++ b/web/views/build/build_status.erb
@@ -8,6 +8,8 @@
</small>
</div>
+<%=erb :'partials/search', :layout => false%>
+
<form class="pull-right">
<input type="checkbox" onclick="$('td:contains(\'+amd64\')').parent().toggle();" checked> amd64
<input type="checkbox" onclick="$('td:contains(\'+~amd64\')').parent().toggle();" checked> ~amd64
@@ -22,6 +24,7 @@
<th class="width-17">History</th>
</tr>
</thead>
+ <tbody class="searchable">
<%builds.each do |build|%>
<%next if build.nil?%>
<tr>
@@ -42,4 +45,5 @@
</td>
</tr>
<%end%>
+ </tbody>
</table>
diff --git a/web/views/bumps/new_targets.erb b/web/views/bumps/new_targets.erb
index 4ecc565..305e849 100644
--- a/web/views/bumps/new_targets.erb
+++ b/web/views/bumps/new_targets.erb
@@ -8,6 +8,8 @@
</small>
</div>
+<%=erb :'partials/search', :layout => false%>
+
<form class="pull-right">
<input type="checkbox" onclick="$('td:contains(\'+amd64\')').parent().toggle();" checked> amd64
<input type="checkbox" onclick="$('td:contains(\'+~amd64\')').parent().toggle();" checked> ~amd64
@@ -23,6 +25,7 @@
<th class="width-12">QA Next</th>
</tr>
</thead>
+ <tbody class="searchable">
<%packages.each do |package|%>
<tr>
<td class="width-52">
@@ -45,4 +48,5 @@
</td>
</tr>
<%end%>
+ </tbody>
</table>
diff --git a/web/views/package/outdated_gems.erb b/web/views/package/outdated_gems.erb
index fc298a9..f583d95 100644
--- a/web/views/package/outdated_gems.erb
+++ b/web/views/package/outdated_gems.erb
@@ -8,6 +8,8 @@
</small>
</div>
+<%=erb :'partials/search', :layout => false%>
+
<form class="pull-right">
<input type="checkbox" onclick="$('td:contains(\'+amd64\')').parent().toggle();" checked> amd64
<input type="checkbox" onclick="$('td:contains(\'+~amd64\')').parent().toggle();" checked> ~amd64
@@ -21,6 +23,7 @@
<th class="width-24">RubyGem Version</th>
</tr>
</thead>
+ <tbody class="searchable">
<%packages.each do |package|%>
<%if package[:gem_version] > package[:version]%>
<tr>
@@ -35,4 +38,5 @@
</tr>
<%end%>
<%end%>
+ </tbody>
</table>
diff --git a/web/views/package/ruby_targets.erb b/web/views/package/ruby_targets.erb
index fcd54fc..e8c0db5 100644
--- a/web/views/package/ruby_targets.erb
+++ b/web/views/package/ruby_targets.erb
@@ -8,6 +8,8 @@
</small>
</div>
+<%=erb :'partials/search', :layout => false%>
+
<form class="pull-right">
<input type="checkbox" onclick="$('td:contains(\'+amd64\')').parent().toggle();" checked> amd64
<input type="checkbox" onclick="$('td:contains(\'+~amd64\')').parent().toggle();" checked> ~amd64
@@ -23,6 +25,7 @@
<th class="width-12">Ruby 2.2</th>
</tr>
</thead>
+ <tbody class="searchable">
<%packages.each do |package|%>
<tr>
<td class="width-52">
@@ -45,4 +48,5 @@
</td>
</tr>
<%end%>
+ </tbody>
</table>
diff --git a/web/views/partials/search.erb b/web/views/partials/search.erb
new file mode 100644
index 0000000..d08725e
--- /dev/null
+++ b/web/views/partials/search.erb
@@ -0,0 +1,19 @@
+<br>
+<div class="input-group"> <span class="input-group-addon">Filter Packages</span>
+ <input id="filter" type="text" class="form-control">
+</div>
+<br>
+
+<script>
+$(document).ready(function () {
+ (function ($) {
+ $('#filter').keyup(function () {
+ var rex = new RegExp($(this).val(), 'i');
+ $('.searchable tr').hide();
+ $('.searchable tr').filter(function () {
+ return rex.test($(this).text());
+ }).show();
+ })
+ }(jQuery));
+});
+</script>
diff --git a/web/views/repoman/repoman_checks.erb b/web/views/repoman/repoman_checks.erb
index a8ffc34..77be750 100644
--- a/web/views/repoman/repoman_checks.erb
+++ b/web/views/repoman/repoman_checks.erb
@@ -8,6 +8,8 @@
</small>
</div>
+<%=erb :'partials/search', :layout => false%>
+
<form class="pull-right">
<input type="checkbox" onclick="$('td:contains(\'+amd64\')').parent().toggle();" checked> amd64
<input type="checkbox" onclick="$('td:contains(\'+~amd64\')').parent().toggle();" checked> ~amd64
@@ -22,6 +24,7 @@
<th class="width-17">History</th>
</tr>
</thead>
+ <tbody class="searchable">
<%repomans.each do |repoman|%>
<%next if repoman.nil?%>
<tr>
@@ -42,4 +45,5 @@
</td>
</tr>
<%end%>
+ </tbody>
</table>