Ver Fonte

HUE-275. Add dynamic filter to Beeswax table view

Shawn Van Ittersum há 15 anos atrás
pai
commit
08f1710a8f

+ 7 - 0
apps/beeswax/src/beeswax/templates/configuration.mako

@@ -17,6 +17,13 @@
 <%namespace name="util" file="util.mako" />
 ${wrappers.head('Hive Configuration Variables', section='hive configuration')}
 <h1 class="ccs-hidden">Hive Configuration Variables</h1>
+<div class="toolbar">
+  <div class="bw-input-filter">
+    <input type="text" class="ccs-hidden" data-filters="OverText, ArtInput, FilterInput" data-art-input-type="search"
+      title="Filter by Name"
+      data-filter-elements="tbody tr" value=""/>
+  </div>
+</div>
 <table class="sortable" data-filters="HtmlTable" cellpadding="0" cellspacing="0">
   <thead>
     <tr>

+ 7 - 0
apps/beeswax/src/beeswax/templates/list_history.mako

@@ -42,6 +42,13 @@ ${wrappers.head("Beeswax: Query History", section='history')}
   % endif
 </%def>
 
+<div class="toolbar">
+  <div class="bw-input-filter">
+    <input type="text" class="ccs-hidden" data-filters="OverText, ArtInput, FilterInput" data-art-input-type="search"
+      title="Filter by Name"
+      data-filter-elements="tbody tr" value=""/>
+  </div>
+</div>
 <div id="list_history" class="view">
   ${comps.pagination(page)}
 

+ 7 - 1
apps/beeswax/src/beeswax/templates/show_tables.mako

@@ -26,7 +26,13 @@ ${wrappers.head("Beeswax: Table List", section='tables')}
 
 <div id="show_tables" class="view">
   <h2 class="ccs-hidden">Tables</h2>
-
+  <div class="toolbar">
+    <div class="bw-input-filter">
+      <input type="text" class="ccs-hidden" data-filters="OverText, ArtInput, FilterInput" data-art-input-type="search"
+        title="Filter by Name"
+        data-filter-elements="td.bw-tables_table" data-filter-parents="tr" value=""/>
+    </div>
+  </div>
   <table data-filters="HtmlTable" class="selectable sortable" cellpadding="0" cellspacing="0">
     <thead>
       <tr>

+ 9 - 2
apps/beeswax/static/css/beeswax.css

@@ -334,7 +334,7 @@ div.beeswax .bw-select_delim dt {
 div.beeswax .bw-select_delim a.ccs-help_link {
 	margin-bottom: 4px;
 }
-div.beeswax .bw-default_location label, div.beeswax .bw-import_data label, div.beeswax .bw-confirm_delim label,  div.beeswax .bw-show_hive label {
+div.beeswax .bw-default_location label, div.beeswax .bw-import_data label, div.beeswax .bw-confirm_delim label, div.beeswax .bw-show_hive label {
 	float: left;
 }
 div.beeswax .bw-default_location, div.beeswax .bw-external_loc, div.beeswax .bw-import_data {
@@ -349,7 +349,7 @@ div.beeswax .bw-import_data a {
 div.beeswax .bw-show_hive a {
 	margin-top: 8px;
 }
-div.beeswax .bw-file_formats label.ccs-bw-selected, div.beeswax .bw-format dt.ccs-bw-selected label, div.beeswax .bw-default_location .ccs-bw-selected, div.beeswax .bw-partition_key label.ccs-bw-selected,  div.beeswax .bw-show_hive label.ccs-bw-selected, div.beeswax .bw-import_data label.ccs-bw-selected {
+div.beeswax .bw-file_formats label.ccs-bw-selected, div.beeswax .bw-format dt.ccs-bw-selected label, div.beeswax .bw-default_location .ccs-bw-selected, div.beeswax .bw-partition_key label.ccs-bw-selected,	div.beeswax .bw-show_hive label.ccs-bw-selected, div.beeswax .bw-import_data label.ccs-bw-selected {
 	color: #003f6f;
 	text-shadow: 1px 1px #d0e6f7;
 	border: 1px solid #003f6f;
@@ -1172,3 +1172,10 @@ div.beeswax .list_history .bw-show_group a {
 	height:18px;
 	padding:4px 8px;
 }
+
+/* header */
+div.beeswax div.bw-input-filter {
+	position: absolute;
+	right: 16px;
+	top: 57px;
+}