[31/45] tez git commit: TEZ-3069. Tez UI 2: Make error bar fully functional (sree)
TEZ-3069. Tez UI 2: Make error bar fully functional (sree) Project: http://git-wip-us.apache.org/repos/asf/tez/repo Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/6d4bb2c6 Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/6d4bb2c6 Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/6d4bb2c6 Branch: refs/heads/master Commit: 6d4bb2c6366e01971ce07460664e88fa8344eb30 Parents: 963e77a Author: Sreenath SomarajapuramAuthored: Sat Jan 30 19:55:25 2016 +0530 Committer: Sreenath Somarajapuram Committed: Thu Feb 25 03:32:52 2016 +0530 -- TEZ-2980-CHANGES.txt| 1 + .../src/main/webapp/app/adapters/abstract.js| 15 +++ tez-ui2/src/main/webapp/app/adapters/am.js | 1 + tez-ui2/src/main/webapp/app/adapters/rm.js | 1 + .../src/main/webapp/app/adapters/timeline.js| 1 + .../src/main/webapp/app/components/error-bar.js | 109 +++ .../main/webapp/app/controllers/application.js | 2 + tez-ui2/src/main/webapp/app/entities/entity.js | 2 + tez-ui2/src/main/webapp/app/routes/abstract.js | 12 +- .../src/main/webapp/app/routes/am-pollster.js | 6 +- tez-ui2/src/main/webapp/app/routes/app.js | 3 +- .../src/main/webapp/app/routes/application.js | 2 +- tez-ui2/src/main/webapp/app/routes/attempt.js | 3 +- tez-ui2/src/main/webapp/app/routes/dag.js | 3 +- .../main/webapp/app/routes/dag/index/index.js | 5 + tez-ui2/src/main/webapp/app/routes/pollster.js | 18 +-- tez-ui2/src/main/webapp/app/routes/task.js | 3 +- tez-ui2/src/main/webapp/app/routes/vertex.js| 3 +- tez-ui2/src/main/webapp/app/styles/app.less | 8 +- .../src/main/webapp/app/styles/error-bar.less | 102 + .../main/webapp/app/templates/application.hbs | 3 +- .../app/templates/components/error-bar.hbs | 31 ++ .../integration/components/error-bar-test.js| 43 .../webapp/tests/unit/entities/entity-test.js | 3 + .../webapp/tests/unit/routes/abstract-test.js | 6 +- 25 files changed, 362 insertions(+), 24 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tez/blob/6d4bb2c6/TEZ-2980-CHANGES.txt -- diff --git a/TEZ-2980-CHANGES.txt b/TEZ-2980-CHANGES.txt index fc99577..0457cb0 100644 --- a/TEZ-2980-CHANGES.txt +++ b/TEZ-2980-CHANGES.txt @@ -28,3 +28,4 @@ ALL CHANGES: TEZ-3070. Tez UI 2: Jenkins build is failing TEZ-3060. Tez UI 2: Activate auto-refresh TEZ-3061. Tez UI 2: Display in-progress vertex table in DAG details + TEZ-3069. Tez UI 2: Make error bar fully functional http://git-wip-us.apache.org/repos/asf/tez/blob/6d4bb2c6/tez-ui2/src/main/webapp/app/adapters/abstract.js -- diff --git a/tez-ui2/src/main/webapp/app/adapters/abstract.js b/tez-ui2/src/main/webapp/app/adapters/abstract.js index 6cb701b..121d4ee 100644 --- a/tez-ui2/src/main/webapp/app/adapters/abstract.js +++ b/tez-ui2/src/main/webapp/app/adapters/abstract.js @@ -52,4 +52,19 @@ export default LoaderAdapter.extend({ Ember.assert(`Path not found for type:${type} to server:${serverName}`, path); return path; }, + + normalizeErrorResponse: function(status, headers, payload) { +var response; + +if(payload && payload.exception && !payload.errors) { + payload = `${payload.exception}\n${payload.message}\n${payload.javaClassName}`; + response = this._super(status, headers, payload); +} +else { + response = this._super(status, headers, payload); + Ember.set(response, '0.title', this.get("outOfReachMessage")); +} + +return response; + } }); http://git-wip-us.apache.org/repos/asf/tez/blob/6d4bb2c6/tez-ui2/src/main/webapp/app/adapters/am.js -- diff --git a/tez-ui2/src/main/webapp/app/adapters/am.js b/tez-ui2/src/main/webapp/app/adapters/am.js index 85f3d27..c4cb75d 100644 --- a/tez-ui2/src/main/webapp/app/adapters/am.js +++ b/tez-ui2/src/main/webapp/app/adapters/am.js @@ -20,6 +20,7 @@ import AbstractAdapter from './abstract'; export default AbstractAdapter.extend({ serverName: "am", + outOfReachMessage: "Application Master (AM) is out of reach. Either it's down, or CORS is not enabled for YARN ResourceManager.", queryRecord: function(store, type, query) { return this.query(store, type, query); http://git-wip-us.apache.org/repos/asf/tez/blob/6d4bb2c6/tez-ui2/src/main/webapp/app/adapters/rm.js -- diff --git a/tez-ui2/src/main/webapp/app/adapters/rm.js b/tez-ui2/src/main/webapp/app/adapters/rm.js index b87c77d..252affb 100644 --- a/tez-ui2/src/main/webapp/app/adapters/rm.js +++
[31/45] tez git commit: TEZ-3069. Tez UI 2: Make error bar fully functional (sree)
TEZ-3069. Tez UI 2: Make error bar fully functional (sree) Project: http://git-wip-us.apache.org/repos/asf/tez/repo Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/6d4bb2c6 Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/6d4bb2c6 Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/6d4bb2c6 Branch: refs/heads/TEZ-2980 Commit: 6d4bb2c6366e01971ce07460664e88fa8344eb30 Parents: 963e77a Author: Sreenath SomarajapuramAuthored: Sat Jan 30 19:55:25 2016 +0530 Committer: Sreenath Somarajapuram Committed: Thu Feb 25 03:32:52 2016 +0530 -- TEZ-2980-CHANGES.txt| 1 + .../src/main/webapp/app/adapters/abstract.js| 15 +++ tez-ui2/src/main/webapp/app/adapters/am.js | 1 + tez-ui2/src/main/webapp/app/adapters/rm.js | 1 + .../src/main/webapp/app/adapters/timeline.js| 1 + .../src/main/webapp/app/components/error-bar.js | 109 +++ .../main/webapp/app/controllers/application.js | 2 + tez-ui2/src/main/webapp/app/entities/entity.js | 2 + tez-ui2/src/main/webapp/app/routes/abstract.js | 12 +- .../src/main/webapp/app/routes/am-pollster.js | 6 +- tez-ui2/src/main/webapp/app/routes/app.js | 3 +- .../src/main/webapp/app/routes/application.js | 2 +- tez-ui2/src/main/webapp/app/routes/attempt.js | 3 +- tez-ui2/src/main/webapp/app/routes/dag.js | 3 +- .../main/webapp/app/routes/dag/index/index.js | 5 + tez-ui2/src/main/webapp/app/routes/pollster.js | 18 +-- tez-ui2/src/main/webapp/app/routes/task.js | 3 +- tez-ui2/src/main/webapp/app/routes/vertex.js| 3 +- tez-ui2/src/main/webapp/app/styles/app.less | 8 +- .../src/main/webapp/app/styles/error-bar.less | 102 + .../main/webapp/app/templates/application.hbs | 3 +- .../app/templates/components/error-bar.hbs | 31 ++ .../integration/components/error-bar-test.js| 43 .../webapp/tests/unit/entities/entity-test.js | 3 + .../webapp/tests/unit/routes/abstract-test.js | 6 +- 25 files changed, 362 insertions(+), 24 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tez/blob/6d4bb2c6/TEZ-2980-CHANGES.txt -- diff --git a/TEZ-2980-CHANGES.txt b/TEZ-2980-CHANGES.txt index fc99577..0457cb0 100644 --- a/TEZ-2980-CHANGES.txt +++ b/TEZ-2980-CHANGES.txt @@ -28,3 +28,4 @@ ALL CHANGES: TEZ-3070. Tez UI 2: Jenkins build is failing TEZ-3060. Tez UI 2: Activate auto-refresh TEZ-3061. Tez UI 2: Display in-progress vertex table in DAG details + TEZ-3069. Tez UI 2: Make error bar fully functional http://git-wip-us.apache.org/repos/asf/tez/blob/6d4bb2c6/tez-ui2/src/main/webapp/app/adapters/abstract.js -- diff --git a/tez-ui2/src/main/webapp/app/adapters/abstract.js b/tez-ui2/src/main/webapp/app/adapters/abstract.js index 6cb701b..121d4ee 100644 --- a/tez-ui2/src/main/webapp/app/adapters/abstract.js +++ b/tez-ui2/src/main/webapp/app/adapters/abstract.js @@ -52,4 +52,19 @@ export default LoaderAdapter.extend({ Ember.assert(`Path not found for type:${type} to server:${serverName}`, path); return path; }, + + normalizeErrorResponse: function(status, headers, payload) { +var response; + +if(payload && payload.exception && !payload.errors) { + payload = `${payload.exception}\n${payload.message}\n${payload.javaClassName}`; + response = this._super(status, headers, payload); +} +else { + response = this._super(status, headers, payload); + Ember.set(response, '0.title', this.get("outOfReachMessage")); +} + +return response; + } }); http://git-wip-us.apache.org/repos/asf/tez/blob/6d4bb2c6/tez-ui2/src/main/webapp/app/adapters/am.js -- diff --git a/tez-ui2/src/main/webapp/app/adapters/am.js b/tez-ui2/src/main/webapp/app/adapters/am.js index 85f3d27..c4cb75d 100644 --- a/tez-ui2/src/main/webapp/app/adapters/am.js +++ b/tez-ui2/src/main/webapp/app/adapters/am.js @@ -20,6 +20,7 @@ import AbstractAdapter from './abstract'; export default AbstractAdapter.extend({ serverName: "am", + outOfReachMessage: "Application Master (AM) is out of reach. Either it's down, or CORS is not enabled for YARN ResourceManager.", queryRecord: function(store, type, query) { return this.query(store, type, query); http://git-wip-us.apache.org/repos/asf/tez/blob/6d4bb2c6/tez-ui2/src/main/webapp/app/adapters/rm.js -- diff --git a/tez-ui2/src/main/webapp/app/adapters/rm.js b/tez-ui2/src/main/webapp/app/adapters/rm.js index b87c77d..252affb 100644 --- a/tez-ui2/src/main/webapp/app/adapters/rm.js