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 2016/11/03 07:03:37 UTC
tez git commit: TEZ-3502. Tez UI: Search in All DAGs page doesn't
work with numeric values (sree)
Repository: tez
Updated Branches:
refs/heads/master 90bd710d9 -> cac9237b5
TEZ-3502. Tez UI: Search in All DAGs page doesn't work with numeric values (sree)
Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/cac9237b
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/cac9237b
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/cac9237b
Branch: refs/heads/master
Commit: cac9237b55c650965812cdbdc9def66e2b4446e9
Parents: 90bd710
Author: Sreenath Somarajapuram <sr...@apache.org>
Authored: Thu Nov 3 12:33:04 2016 +0530
Committer: Sreenath Somarajapuram <sr...@apache.org>
Committed: Thu Nov 3 12:33:04 2016 +0530
----------------------------------------------------------------------
CHANGES.txt | 1 +
tez-ui/src/main/webapp/app/adapters/timeline.js | 1 +
.../src/main/webapp/tests/unit/adapters/timeline-test.js | 10 +++++++---
3 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tez/blob/cac9237b/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 569bc75..48c0f1e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -131,6 +131,7 @@ ALL CHANGES:
TEZ-3419. Tez UI: Applications page shows error, for users with only DAG level ACL permission
TEZ-3484. Tez UI: Remove .travis.yml from webapp folder
TEZ-3470. Tez UI: Make the build work in IBM PPC
+ TEZ-3502. Tez UI: Search in All DAGs page doesn't work with numeric values
Release 0.8.5: Unreleased
http://git-wip-us.apache.org/repos/asf/tez/blob/cac9237b/tez-ui/src/main/webapp/app/adapters/timeline.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/adapters/timeline.js b/tez-ui/src/main/webapp/app/adapters/timeline.js
index 1a341f7..e2b4ef3 100644
--- a/tez-ui/src/main/webapp/app/adapters/timeline.js
+++ b/tez-ui/src/main/webapp/app/adapters/timeline.js
@@ -44,6 +44,7 @@ export default AbstractAdapter.extend({
var filterStrs = [];
MoreObject.forEach(filters, function (key, value) {
+ value = JSON.stringify(String(value));
filterStrs.push(`${key}:${value}`);
});
http://git-wip-us.apache.org/repos/asf/tez/blob/cac9237b/tez-ui/src/main/webapp/tests/unit/adapters/timeline-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/unit/adapters/timeline-test.js b/tez-ui/src/main/webapp/tests/unit/adapters/timeline-test.js
index 7b0e978..c398a05 100644
--- a/tez-ui/src/main/webapp/tests/unit/adapters/timeline-test.js
+++ b/tez-ui/src/main/webapp/tests/unit/adapters/timeline-test.js
@@ -38,10 +38,14 @@ test('Basic creation test', function(assert) {
test('stringifyFilters test', function(assert) {
let adapter = this.subject();
- assert.equal(adapter.stringifyFilters({a: 1, b: 2}), "a:1,b:2");
+ assert.equal(adapter.stringifyFilters({a: 1, b: 2}), 'a:"1",b:"2"');
assert.throws(function () {
adapter.stringifyFilters();
});
+
+ assert.equal(adapter.stringifyFilters({a: "123", b: "abc"}), 'a:"123",b:"abc"');
+ assert.equal(adapter.stringifyFilters({a: '123', b: 'abc'}), 'a:"123",b:"abc"');
+ assert.equal(adapter.stringifyFilters({a: '123"abc'}), 'a:"123\\"abc"');
});
test('normalizeQuery test', function(assert) {
@@ -55,8 +59,8 @@ test('normalizeQuery test', function(assert) {
normalQuery = adapter.normalizeQuery({a: 1, b: 2, c: 3, d: 4});
- assert.deepEqual(normalQuery.primaryFilter, "A_ID:1");
- assert.deepEqual(normalQuery.secondaryFilter, "B_ID:2");
+ assert.deepEqual(normalQuery.primaryFilter, 'A_ID:"1"');
+ assert.deepEqual(normalQuery.secondaryFilter, 'B_ID:"2"');
assert.deepEqual(normalQuery.c, 3);
assert.deepEqual(normalQuery.d, 4);
});