TEZ-3656. Tez UI: Status correction is not working as expected (sree)
Project: http://git-wip-us.apache.org/repos/asf/tez/repo Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/852e80d8 Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/852e80d8 Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/852e80d8 Branch: refs/heads/TEZ-1190 Commit: 852e80d843c7bffd0c0670047f3b4fd392ea6d5f Parents: a9af6cf Author: Sreenath Somarajapuram <[email protected]> Authored: Mon Mar 13 18:30:28 2017 +0530 Committer: Sreenath Somarajapuram <[email protected]> Committed: Mon Mar 13 18:30:28 2017 +0530 ---------------------------------------------------------------------- CHANGES.txt | 1 + tez-ui/src/main/webapp/app/models/dag.js | 2 +- .../main/webapp/tests/unit/models/dag-test.js | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tez/blob/852e80d8/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 54b17b1..87dda41 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -218,6 +218,7 @@ ALL CHANGES: TEZ-3640. Tez UI: Add associated llap application id to queries page TEZ-3642. Tez UI: Auto-refresh is not stopping when DAG is the main entity TEZ-3503. Tez UI: Support search by queue name + TEZ-3656. Tez UI: Status correction is not working as expected Release 0.8.6: Unreleased http://git-wip-us.apache.org/repos/asf/tez/blob/852e80d8/tez-ui/src/main/webapp/app/models/dag.js ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/app/models/dag.js b/tez-ui/src/main/webapp/app/models/dag.js index 7e57615..2ab4af3 100644 --- a/tez-ui/src/main/webapp/app/models/dag.js +++ b/tez-ui/src/main/webapp/app/models/dag.js @@ -44,7 +44,7 @@ export default AMTimelineModel.extend({ type: ["AhsApp", "appRm"], idKey: "appID", loadType: function (record) { - if(record.get("queueName")) { + if(record.get("queueName") && record.get("atsStatus") !== "RUNNING") { return "demand"; } }, http://git-wip-us.apache.org/repos/asf/tez/blob/852e80d8/tez-ui/src/main/webapp/tests/unit/models/dag-test.js ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/tests/unit/models/dag-test.js b/tez-ui/src/main/webapp/tests/unit/models/dag-test.js index a219cf8..06e0ec1 100644 --- a/tez-ui/src/main/webapp/tests/unit/models/dag-test.js +++ b/tez-ui/src/main/webapp/tests/unit/models/dag-test.js @@ -59,6 +59,25 @@ test('Basic creation test', function(assert) { assert.ok(model.amWsVersion); }); +test('app loadType test', function(assert) { + let loadType = this.subject().get("needs.app.loadType"), + record = Ember.Object.create(); + + assert.equal(loadType(record), undefined); + + record.set("queueName", "Q"); + assert.equal(loadType(record), "demand"); + + record.set("atsStatus", "RUNNING"); + assert.equal(loadType(record), undefined); + + record.set("atsStatus", "SUCCEEDED"); + assert.equal(loadType(record), "demand"); + + record.set("queueName", undefined); + assert.equal(loadType(record), undefined); +}); + test('queue test', function(assert) { let model = this.subject(), queueName = "queueName",
