You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by cr...@apache.org on 2014/08/26 17:21:41 UTC
git commit: SAMZA-396; add slash for search shortcut in AM UI
Repository: incubator-samza
Updated Branches:
refs/heads/master fd3f40f5c -> 5b253485c
SAMZA-396; add slash for search shortcut in AM UI
Project: http://git-wip-us.apache.org/repos/asf/incubator-samza/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-samza/commit/5b253485
Tree: http://git-wip-us.apache.org/repos/asf/incubator-samza/tree/5b253485
Diff: http://git-wip-us.apache.org/repos/asf/incubator-samza/diff/5b253485
Branch: refs/heads/master
Commit: 5b253485c8e92e52a24dbd7721598c7604d9855a
Parents: fd3f40f
Author: David Chen <dc...@linkedin.com>
Authored: Tue Aug 26 08:19:21 2014 -0700
Committer: Chris Riccomini <cr...@criccomi-mn.linkedin.biz>
Committed: Tue Aug 26 08:19:21 2014 -0700
----------------------------------------------------------------------
.../resources/scalate/WEB-INF/views/index.scaml | 22 +++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/5b253485/samza-yarn/src/main/resources/scalate/WEB-INF/views/index.scaml
----------------------------------------------------------------------
diff --git a/samza-yarn/src/main/resources/scalate/WEB-INF/views/index.scaml b/samza-yarn/src/main/resources/scalate/WEB-INF/views/index.scaml
index 86fc0fd..7b0077e 100644
--- a/samza-yarn/src/main/resources/scalate/WEB-INF/views/index.scaml
+++ b/samza-yarn/src/main/resources/scalate/WEB-INF/views/index.scaml
@@ -142,7 +142,7 @@
%h2 Config
%div.panel.panel-default
%div.panel-heading
- %input.form-control#config-table-filter(type="text" placeholder="Filter")
+ %input.form-control#config-table-filter(type="text" placeholder="Type '/' to search")
%table.table.table-striped.table-bordered.tablesorter#config-table
%thead
%tr
@@ -156,10 +156,22 @@
:javascript
$(document).ready(function() {
- $("#containers-table").tablesorter();
- $("#taskids-table").tablesorter();
- $("#config-table").tablesorter();
- $("#config-table-filter").keyup(function() {
+ $('#containers-table').tablesorter();
+ $('#taskids-table').tablesorter();
+ $('#config-table').tablesorter();
+
+ // Type '/' to search.
+ $(document).keyup(function(e) {
+ if (e.keyCode == 191 && $('#config').is(':visible')) {
+ $('#config-table-filter').focus();
+ }
+ });
+
+ $('#config-table-filter').keyup(function(e) {
+ // Press ESC to exit search box.
+ if (e.keyCode == 27) {
+ $('#config-table-filter').blur();
+ }
var regex = new RegExp($(this).val(), 'i');
$('.searchable tr').hide();
$('.searchable tr').filter(function() {