Repository: tez Updated Branches: refs/heads/branch-0.8 3acab6512 -> 250f346f5
TEZ-3318. Tez UI: Polling is not restarted after RM recovery (sree) Project: http://git-wip-us.apache.org/repos/asf/tez/repo Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/250f346f Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/250f346f Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/250f346f Branch: refs/heads/branch-0.8 Commit: 250f346f53db4f69df5ae4aa74caa792469b8ec1 Parents: 3acab65 Author: Sreenath Somarajapuram <[email protected]> Authored: Wed Jul 6 01:40:08 2016 +0530 Committer: Sreenath Somarajapuram <[email protected]> Committed: Wed Jul 6 01:40:08 2016 +0530 ---------------------------------------------------------------------- CHANGES.txt | 3 +- .../webapp/app/routes/single-am-pollster.js | 2 +- .../src/main/webapp/app/templates/dag/index.hbs | 19 ++++++-- .../unit/routes/single-am-pollster-test.js | 49 ++++++++++++++++++++ 4 files changed, 66 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tez/blob/250f346f/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 987f6c6..b8c8751 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,7 +1,7 @@ Apache Tez Change Log ===================== -Release 0.8.4: Unreleased +Release 0.8.5: Unreleased INCOMPATIBLE CHANGES @@ -55,6 +55,7 @@ ALL CHANGES: TEZ-3259. Tez UI: Build issue - File saver package is not working well with bower TEZ-3262. Tez UI : zip.js is not having a bower friendly versioning system TEZ-3281. Tez UI: Swimlane improvements + TEZ-3318. Tez UI: Polling is not restarted after RM recovery Release 0.8.3: 2016-04-14 http://git-wip-us.apache.org/repos/asf/tez/blob/250f346f/tez-ui2/src/main/webapp/app/routes/single-am-pollster.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/single-am-pollster.js b/tez-ui2/src/main/webapp/app/routes/single-am-pollster.js index 4a0d507..4b72ee7 100644 --- a/tez-ui2/src/main/webapp/app/routes/single-am-pollster.js +++ b/tez-ui2/src/main/webapp/app/routes/single-am-pollster.js @@ -26,7 +26,7 @@ export default AmPollsterRoute.extend({ return isComplete === false && this._super(); }), - _loadedValueObserver: Ember.observer("loadedValue", function () { + _loadedValueObserver: Ember.observer("loadedValue.loadTime", function () { var loadedValue = this.get("loadedValue"); this.set("polledRecords", loadedValue ? [this.get("loadedValue")] : null); }) http://git-wip-us.apache.org/repos/asf/tez/blob/250f346f/tez-ui2/src/main/webapp/app/templates/dag/index.hbs ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/templates/dag/index.hbs b/tez-ui2/src/main/webapp/app/templates/dag/index.hbs index 9bc6a80..c4b3849 100644 --- a/tez-ui2/src/main/webapp/app/templates/dag/index.hbs +++ b/tez-ui2/src/main/webapp/app/templates/dag/index.hbs @@ -77,7 +77,21 @@ </tr> </tbody> </table> +{{else}} + {{partial "loading"}} +{{/if}} +<!-- + * Splitting the conditional blocks so that stats from inside the outlet, + is aligned with the details table. + * Keeping outlet outside the conditional block so that the loading of DAG + details doesnât affect the outlet content. +--> +<span class="{{unless loaded 'no-visible'}}"> + {{outlet}} +</span> + +{{#if loaded}} {{#if model.callerInfo}} {{caller-info type=model.callerType info=model.callerInfo}} {{/if}} @@ -92,9 +106,4 @@ </div> </div> {{/if}} - - {{outlet}} - -{{else}} - {{partial "loading"}} {{/if}} http://git-wip-us.apache.org/repos/asf/tez/blob/250f346f/tez-ui2/src/main/webapp/tests/unit/routes/single-am-pollster-test.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/tests/unit/routes/single-am-pollster-test.js b/tez-ui2/src/main/webapp/tests/unit/routes/single-am-pollster-test.js index 69c9457..f9b3385 100644 --- a/tez-ui2/src/main/webapp/tests/unit/routes/single-am-pollster-test.js +++ b/tez-ui2/src/main/webapp/tests/unit/routes/single-am-pollster-test.js @@ -16,6 +16,8 @@ * limitations under the License. */ +import Ember from 'ember'; + import { moduleFor, test } from 'ember-qunit'; moduleFor('route:single-am-pollster', 'Unit | Route | single am pollster', { @@ -30,3 +32,50 @@ test('Basic creation test', function(assert) { assert.ok(route.canPoll); assert.ok(route._loadedValueObserver); }); + +test('canPoll test', function(assert) { + let route = this.subject({ + polling: { + resetPoll: function () {} + }, + _canPollObserver: function () {} + }); + + assert.notOk(route.get("canPoll")); + + route.setProperties({ + polledRecords: {}, + loadedValue: { + app: { + isComplete: false + } + } + }); + assert.ok(route.get("canPoll"), true); + + route.set("loadedValue.app.isComplete", true); + assert.notOk(route.get("canPoll")); + + route.set("loadedValue.app.isComplete", undefined); + assert.notOk(route.get("canPoll")); +}); + +test('_loadedValueObserver test', function(assert) { + let route = this.subject({ + polling: { + resetPoll: function () {} + }, + _canPollObserver: function () {} + }), + loadedValue = Ember.Object.create(); + + assert.equal(route.get("polledRecords"), null); + + route.set("loadedValue", loadedValue); + assert.equal(route.get("polledRecords.0"), loadedValue); + + route.set("polledRecords", null); + + loadedValue.set("loadTime", 1); + assert.equal(route.get("polledRecords.0"), loadedValue); +});
