You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by sr...@apache.org on 2015/06/02 23:17:37 UTC
tez git commit: TEZ-2527. Tez UI: Application hangs on entering
erroneous RegEx in counter table search box (ssomarajapuram)
Repository: tez
Updated Branches:
refs/heads/master 4d5ea0e51 -> cd068538d
TEZ-2527. Tez UI: Application hangs on entering erroneous RegEx in counter table search box (ssomarajapuram)
Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/cd068538
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/cd068538
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/cd068538
Branch: refs/heads/master
Commit: cd068538d7ecc2cf18c606dfcf0bcbebcf2dbe11
Parents: 4d5ea0e
Author: sreenaths <so...@gmail.com>
Authored: Wed Jun 3 02:36:50 2015 +0530
Committer: sreenaths <so...@gmail.com>
Committed: Wed Jun 3 02:36:50 2015 +0530
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../main/webapp/app/scripts/components/counter-table.js | 12 +++++++++++-
.../webapp/app/templates/components/counter-table.hbs | 6 +++++-
3 files changed, 17 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tez/blob/cd068538/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index c0b49be..1780eac 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -31,6 +31,7 @@ Release 0.7.1: Unreleased
INCOMPATIBLE CHANGES
ALL CHANGES:
+ TEZ-2527. Tez UI: Application hangs on entering erroneous RegEx in counter table search box
TEZ-2523. Tez UI: derive applicationId from dag/vertex id instead of relying on json data
TEZ-2505. PipelinedSorter uses Comparator objects concurrently from multiple threads.
TEZ-2504. Tez UI: tables - show status column without scrolling, numeric 0 shown as Not available
http://git-wip-us.apache.org/repos/asf/tez/blob/cd068538/tez-ui/src/main/webapp/app/scripts/components/counter-table.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/components/counter-table.js b/tez-ui/src/main/webapp/app/scripts/components/counter-table.js
index 94615c3..8d6f37d 100644
--- a/tez-ui/src/main/webapp/app/scripts/components/counter-table.js
+++ b/tez-ui/src/main/webapp/app/scripts/components/counter-table.js
@@ -19,9 +19,19 @@
App.CounterTableComponent = Em.Component.extend({
layoutName: 'components/counter-table',
nameFilter: null,
+
+ validFilter: function () {
+ try {
+ new RegExp(this.get('nameFilter'), 'i');
+ return true;
+ }
+ catch(e){}
+ return false;
+ }.property('nameFilter'),
+
filteredData: function() {
var rawData = this.get('data') || [];
- if (Em.isEmpty(this.nameFilter)) {
+ if (Em.isEmpty(this.nameFilter) || !this.get('validFilter')) {
return rawData;
}
http://git-wip-us.apache.org/repos/asf/tez/blob/cd068538/tez-ui/src/main/webapp/app/templates/components/counter-table.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/components/counter-table.hbs b/tez-ui/src/main/webapp/app/templates/components/counter-table.hbs
index 6da06f0..4e8f603 100644
--- a/tez-ui/src/main/webapp/app/templates/components/counter-table.hbs
+++ b/tez-ui/src/main/webapp/app/templates/components/counter-table.hbs
@@ -23,7 +23,11 @@
<th>Counter Value</th>
</tr>
<tr>
- <td class='filter'>{{input size='60' type='search' results='1' placeholder='Search...' valueBinding='nameFilter'}}</td>
+ <td class='filter'>
+ <div {{bind-attr class=":input-group validFilter::has-error"}}>
+ {{input size='60' class="form-control" type='search' results='1' placeholder='Search...' valueBinding='nameFilter'}}
+ </div>
+ </td>
<td class='filter'></td>
</tr>
<tbody>