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/01/28 19:13:30 UTC
[1/3] tez git commit: TEZ-3060. Tez UI 2: Activate auto-refresh (sree)
Repository: tez
Updated Branches:
refs/heads/TEZ-2980 852247b3d -> 6f366403d
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/controllers/counters-table-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/controllers/counters-table-test.js b/tez-ui2/src/main/webapp/tests/unit/controllers/counters-table-test.js
new file mode 100644
index 0000000..e0e7b02
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/controllers/counters-table-test.js
@@ -0,0 +1,91 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import Ember from 'ember';
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('controller:counters-table', 'Unit | Controller | counters table', {
+ // Specify the other units that are required for this test.
+ // needs: ['controller:foo']
+});
+
+test('Basic creation test', function(assert) {
+ let controller = this.subject({
+ send: Ember.K,
+ initVisibleColumns: Ember.K
+ });
+
+ assert.ok(controller);
+ assert.ok(controller.columns);
+ assert.ok(controller.counters);
+ assert.ok(controller._countersObserver);
+
+});
+
+test('counters & _countersObserver test', function(assert) {
+ let controller = this.subject({
+ send: Ember.K,
+ initVisibleColumns: Ember.K,
+ model: {
+ counterGroupsHash: {
+ "foo": {
+ "Foo Name 1": "Value 1",
+ "Foo Name 2": "Value 2",
+ "Foo Name 3": "Value 3"
+ },
+ "bar": {
+ "Bar Name 1": "Value 1",
+ "Bar Name 2": "Value 2",
+ "Bar Name 3": "Value 3"
+ }
+ }
+ }
+ });
+
+ assert.equal(controller.countersCount, 0);
+
+ controller._countersObserver();
+
+ assert.equal(controller.get("counters.0.groupName"), "foo");
+ assert.equal(controller.get("counters.0.counterName"), "Foo Name 1");
+ assert.equal(controller.get("counters.0.counterValue"), "Value 1");
+
+ assert.equal(controller.get("counters.1.groupName"), "foo");
+ assert.equal(controller.get("counters.1.counterName"), "Foo Name 2");
+ assert.equal(controller.get("counters.1.counterValue"), "Value 2");
+
+ assert.equal(controller.get("counters.2.groupName"), "foo");
+ assert.equal(controller.get("counters.2.counterName"), "Foo Name 3");
+ assert.equal(controller.get("counters.2.counterValue"), "Value 3");
+
+
+ assert.equal(controller.get("counters.3.groupName"), "bar");
+ assert.equal(controller.get("counters.3.counterName"), "Bar Name 1");
+ assert.equal(controller.get("counters.3.counterValue"), "Value 1");
+
+ assert.equal(controller.get("counters.4.groupName"), "bar");
+ assert.equal(controller.get("counters.4.counterName"), "Bar Name 2");
+ assert.equal(controller.get("counters.4.counterValue"), "Value 2");
+
+ assert.equal(controller.get("counters.5.groupName"), "bar");
+ assert.equal(controller.get("counters.5.counterName"), "Bar Name 3");
+ assert.equal(controller.get("counters.5.counterValue"), "Value 3");
+
+ assert.equal(controller.countersCount, 6);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/controllers/dag/attempts-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/controllers/dag/attempts-test.js b/tez-ui2/src/main/webapp/tests/unit/controllers/dag/attempts-test.js
index 3fa8ff7..f0aeeb9 100644
--- a/tez-ui2/src/main/webapp/tests/unit/controllers/dag/attempts-test.js
+++ b/tez-ui2/src/main/webapp/tests/unit/controllers/dag/attempts-test.js
@@ -28,7 +28,10 @@ moduleFor('controller:dag/attempts', 'Unit | Controller | dag/attempts', {
test('Basic creation test', function(assert) {
let controller = this.subject({
send: Ember.K,
- initVisibleColumns: Ember.K
+ initVisibleColumns: Ember.K,
+ getCounterColumns: function () {
+ return [];
+ }
});
assert.ok(controller);
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/controllers/dag/tasks-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/controllers/dag/tasks-test.js b/tez-ui2/src/main/webapp/tests/unit/controllers/dag/tasks-test.js
index eace870..474c61a 100644
--- a/tez-ui2/src/main/webapp/tests/unit/controllers/dag/tasks-test.js
+++ b/tez-ui2/src/main/webapp/tests/unit/controllers/dag/tasks-test.js
@@ -28,7 +28,10 @@ moduleFor('controller:dag/tasks', 'Unit | Controller | dag/tasks', {
test('Basic creation test', function(assert) {
let controller = this.subject({
send: Ember.K,
- initVisibleColumns: Ember.K
+ initVisibleColumns: Ember.K,
+ getCounterColumns: function () {
+ return [];
+ }
});
assert.ok(controller);
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/controllers/dag/vertices-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/controllers/dag/vertices-test.js b/tez-ui2/src/main/webapp/tests/unit/controllers/dag/vertices-test.js
index f54b1a8..d0b32f3 100644
--- a/tez-ui2/src/main/webapp/tests/unit/controllers/dag/vertices-test.js
+++ b/tez-ui2/src/main/webapp/tests/unit/controllers/dag/vertices-test.js
@@ -28,7 +28,10 @@ moduleFor('controller:dag/vertices', 'Unit | Controller | dag/vertices', {
test('Basic creation test', function(assert) {
let controller = this.subject({
send: Ember.K,
- initVisibleColumns: Ember.K
+ initVisibleColumns: Ember.K,
+ getCounterColumns: function () {
+ return [];
+ }
});
assert.ok(controller);
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/controllers/multi-table-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/controllers/multi-table-test.js b/tez-ui2/src/main/webapp/tests/unit/controllers/multi-table-test.js
new file mode 100644
index 0000000..d4ab10f
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/controllers/multi-table-test.js
@@ -0,0 +1,40 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import Ember from 'ember';
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('controller:multi-table', 'Unit | Controller | multi table', {
+ // Specify the other units that are required for this test.
+ // needs: ['service:local-storage']
+});
+
+test('Basic creation test', function(assert) {
+ let controller = this.subject({
+ send: Ember.K,
+ initVisibleColumns: Ember.K,
+ localStorage: Ember.Object.create(),
+ getCounterColumns: function () {
+ return [];
+ }
+ });
+
+ assert.ok(controller);
+ assert.ok(controller._visibleColumnsObserver);
+ assert.ok(controller.sendCountersChanged);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/controllers/parent-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/controllers/parent-test.js b/tez-ui2/src/main/webapp/tests/unit/controllers/parent-test.js
new file mode 100644
index 0000000..2b0ff97
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/controllers/parent-test.js
@@ -0,0 +1,36 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import Ember from 'ember';
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('controller:parent', 'Unit | Controller | parent', {
+ // Specify the other units that are required for this test.
+ // needs: ['controller:foo']
+});
+
+test('Basic creation test', function(assert) {
+ let controller = this.subject({
+ send: Ember.K,
+ initVisibleColumns: Ember.K
+ });
+
+ assert.ok(controller);
+ assert.ok(controller.polling);
+ assert.ok(controller.actions.autoRefreshChanged);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/controllers/table-page-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/controllers/table-page-test.js b/tez-ui2/src/main/webapp/tests/unit/controllers/table-page-test.js
deleted file mode 100644
index 07941b9..0000000
--- a/tez-ui2/src/main/webapp/tests/unit/controllers/table-page-test.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import Ember from 'ember';
-
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('controller:table-page', 'Unit | Controller | table page', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('Basic creation test', function(assert) {
- let controller = this.subject({
- send: Ember.K,
- initVisibleColumns: Ember.K
- });
-
- assert.ok(controller);
- assert.ok(controller.queryParams);
-
- assert.equal(controller.rowCount, 10);
- assert.equal(controller.searchText, "");
- assert.equal(controller.sortColumnId, "");
- assert.equal(controller.sortOrder, "");
- assert.equal(controller.pageNo, 1);
-
- assert.ok(controller.headerComponentNames);
- assert.ok(controller.visibleColumnIDs);
- assert.ok(controller.columnSelectorTitle);
- assert.ok(controller.definition);
-
- assert.ok(controller.storageID);
- assert.ok(controller.initVisibleColumns);
-
- assert.ok(controller.columns);
- assert.ok(controller.allColumns);
- assert.ok(controller.visibleColumns);
-
- assert.ok(controller.getCounterColumns);
-
- assert.ok(controller.actions.searchChanged);
- assert.ok(controller.actions.sortChanged);
- assert.ok(controller.actions.rowsChanged);
- assert.ok(controller.actions.pageChanged);
-
- assert.ok(controller.actions.openColumnSelector);
- assert.ok(controller.actions.columnsSelected);
-});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/controllers/table-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/controllers/table-test.js b/tez-ui2/src/main/webapp/tests/unit/controllers/table-test.js
new file mode 100644
index 0000000..360b6a9
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/controllers/table-test.js
@@ -0,0 +1,64 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import Ember from 'ember';
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('controller:table', 'Unit | Controller | table', {
+ // Specify the other units that are required for this test.
+ // needs: ['controller:foo']
+});
+
+test('Basic creation test', function(assert) {
+ let controller = this.subject({
+ send: Ember.K,
+ initVisibleColumns: Ember.K
+ });
+
+ assert.ok(controller);
+ assert.ok(controller.queryParams);
+
+ assert.equal(controller.rowCount, 10);
+ assert.equal(controller.searchText, "");
+ assert.equal(controller.sortColumnId, "");
+ assert.equal(controller.sortOrder, "");
+ assert.equal(controller.pageNo, 1);
+
+ assert.ok(controller.headerComponentNames);
+ assert.ok(controller.visibleColumnIDs);
+ assert.ok(controller.columnSelectorTitle);
+ assert.ok(controller.definition);
+
+ assert.ok(controller.storageID);
+ assert.ok(controller.initVisibleColumns);
+
+ assert.ok(controller.columns);
+ assert.ok(controller.allColumns);
+ assert.ok(controller.visibleColumns);
+
+ assert.ok(controller.getCounterColumns);
+
+ assert.ok(controller.actions.searchChanged);
+ assert.ok(controller.actions.sortChanged);
+ assert.ok(controller.actions.rowsChanged);
+ assert.ok(controller.actions.pageChanged);
+
+ assert.ok(controller.actions.openColumnSelector);
+ assert.ok(controller.actions.columnsSelected);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/controllers/task/attempts-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/controllers/task/attempts-test.js b/tez-ui2/src/main/webapp/tests/unit/controllers/task/attempts-test.js
index 43badfc..b2006de 100644
--- a/tez-ui2/src/main/webapp/tests/unit/controllers/task/attempts-test.js
+++ b/tez-ui2/src/main/webapp/tests/unit/controllers/task/attempts-test.js
@@ -28,7 +28,10 @@ moduleFor('controller:task/attempts', 'Unit | Controller | task/attempts', {
test('Basic creation test', function(assert) {
let controller = this.subject({
send: Ember.K,
- initVisibleColumns: Ember.K
+ initVisibleColumns: Ember.K,
+ getCounterColumns: function () {
+ return [];
+ }
});
assert.ok(controller);
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/controllers/vertex/attempts-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/controllers/vertex/attempts-test.js b/tez-ui2/src/main/webapp/tests/unit/controllers/vertex/attempts-test.js
index de89864..eb68055 100644
--- a/tez-ui2/src/main/webapp/tests/unit/controllers/vertex/attempts-test.js
+++ b/tez-ui2/src/main/webapp/tests/unit/controllers/vertex/attempts-test.js
@@ -28,7 +28,10 @@ moduleFor('controller:vertex/attempts', 'Unit | Controller | vertex/attempts', {
test('Basic creation test', function(assert) {
let controller = this.subject({
send: Ember.K,
- initVisibleColumns: Ember.K
+ initVisibleColumns: Ember.K,
+ getCounterColumns: function () {
+ return [];
+ }
});
assert.ok(controller);
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/controllers/vertex/tasks-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/controllers/vertex/tasks-test.js b/tez-ui2/src/main/webapp/tests/unit/controllers/vertex/tasks-test.js
index 23393ef..9aae299 100644
--- a/tez-ui2/src/main/webapp/tests/unit/controllers/vertex/tasks-test.js
+++ b/tez-ui2/src/main/webapp/tests/unit/controllers/vertex/tasks-test.js
@@ -28,7 +28,10 @@ moduleFor('controller:vertex/tasks', 'Unit | Controller | vertex/tasks', {
test('Basic creation test', function(assert) {
let controller = this.subject({
send: Ember.K,
- initVisibleColumns: Ember.K
+ initVisibleColumns: Ember.K,
+ getCounterColumns: function () {
+ return [];
+ }
});
assert.ok(controller);
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/entities/am-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/entities/am-test.js b/tez-ui2/src/main/webapp/tests/unit/entities/am-test.js
new file mode 100644
index 0000000..b48eea5
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/entities/am-test.js
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('entitie:am', 'Unit | Entity | am', {
+ // Specify the other units that are required for this test.
+ // needs: ['entitie:foo']
+});
+
+test('Basic creation test', function(assert) {
+ let adapter = this.subject();
+
+ assert.ok(adapter);
+ assert.ok(adapter.resetJoiner);
+ assert.ok(adapter.queryRecord);
+ assert.ok(adapter.queryJoinedRecords);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/entities/attempt-am-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/entities/attempt-am-test.js b/tez-ui2/src/main/webapp/tests/unit/entities/attempt-am-test.js
new file mode 100644
index 0000000..2856ec5
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/entities/attempt-am-test.js
@@ -0,0 +1,31 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('entitie:attempt-am', 'Unit | Entity | attempt am', {
+ // Specify the other units that are required for this test.
+ // needs: ['entitie:foo']
+});
+
+test('Basic creation test', function(assert) {
+ let adapter = this.subject();
+
+ assert.ok(adapter);
+ assert.ok(adapter.queryPropertyToJoin);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/entities/entity-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/entities/entity-test.js b/tez-ui2/src/main/webapp/tests/unit/entities/entity-test.js
index 2129fb3..fb0bd8a 100644
--- a/tez-ui2/src/main/webapp/tests/unit/entities/entity-test.js
+++ b/tez-ui2/src/main/webapp/tests/unit/entities/entity-test.js
@@ -29,55 +29,26 @@ test('Basic creation test', function(assert) {
let adapter = this.subject();
assert.ok(adapter);
- assert.ok(adapter.loadRelations);
- assert.ok(adapter.normalizeNeed);
- assert.ok(adapter.loadNeeds);
-});
-
-test('loadRelations test', function(assert) {
- let adapter = this.subject(),
- testLoader = {},
- testModel = {},
- relationsPromise;
-
- assert.expect(2 + 1 + 2 + 2);
-
- // Test model without needs
- adapter.loadNeeds = function (loader, model) {
- assert.equal(loader, testLoader);
- assert.equal(model, testModel);
-
- return null;
- };
- relationsPromise = adapter.loadRelations(testLoader, testModel);
-
- assert.equal(relationsPromise, testModel, "Model without needs");
-
- // Test model with needs
- adapter.loadNeeds = function (loader, model) {
- assert.equal(loader, testLoader);
- assert.equal(model, testModel);
- return Ember.RSVP.resolve();
- };
- relationsPromise = adapter.loadRelations(testLoader, testModel);
+ assert.ok(adapter.queryRecord);
+ assert.ok(adapter.query);
- assert.notEqual(relationsPromise, testModel);
- relationsPromise.then(function (model) {
- assert.equal(model, testModel);
- });
+ assert.ok(adapter.normalizeNeed);
+ assert.ok(adapter._loadNeed);
+ assert.ok(adapter.loadNeed);
+ assert.ok(adapter._loadAllNeeds);
+ assert.ok(adapter.loadAllNeeds);
});
test('normalizeNeed test', function(assert) {
let adapter = this.subject(),
- expectedProperties = ["name", "type", "idKey", "lazy", "silent"];
+ expectedProperties = ["name", "type", "idKey", "silent"];
assert.deepEqual(adapter.normalizeNeed("app", "appKey").getProperties(expectedProperties), {
name: "app",
type: "app",
idKey: "appKey",
- lazy: false,
silent: false
}, "Test 1");
@@ -85,7 +56,6 @@ test('normalizeNeed test', function(assert) {
name: "app",
type: "app",
idKey: "appKey",
- lazy: false,
silent: false
}, "Test 2");
@@ -93,28 +63,18 @@ test('normalizeNeed test', function(assert) {
name: "app",
type: "application",
idKey: "appKey",
- lazy: false,
silent: false
}, "Test 3");
- assert.deepEqual(adapter.normalizeNeed( "app", { lazy: true, idKey: "appKey" }).getProperties(expectedProperties), {
- name: "app",
- type: "app",
- idKey: "appKey",
- lazy: true,
- silent: false
- }, "Test 4");
-
assert.deepEqual(adapter.normalizeNeed( "app", { silent: true, idKey: "appKey" }).getProperties(expectedProperties), {
name: "app",
type: "app",
idKey: "appKey",
- lazy: false,
silent: true
- }, "Test 5");
+ }, "Test 4");
});
-test('loadNeeds basic test', function(assert) {
+test('loadAllNeeds basic test', function(assert) {
let adapter = this.subject(),
loader,
testModel = Ember.Object.create({
@@ -128,7 +88,7 @@ test('loadNeeds basic test', function(assert) {
assert.expect(1 + 2 + 1);
- assert.equal(adapter.loadNeeds(loader, Ember.Object.create()), undefined, "Model without needs");
+ assert.equal(adapter.loadAllNeeds(loader, Ember.Object.create()), undefined, "Model without needs");
loader = {
queryRecord: function (type, id) {
@@ -146,12 +106,12 @@ test('loadNeeds basic test', function(assert) {
return Ember.RSVP.resolve();
}
};
- adapter.loadNeeds(loader, testModel).then(function () {
+ adapter.loadAllNeeds(loader, testModel).then(function () {
assert.ok(true);
});
});
-test('loadNeeds silent=false test', function(assert) {
+test('loadAllNeeds silent=false test', function(assert) {
let adapter = this.subject(),
loader,
testModel = Ember.Object.create({
@@ -173,12 +133,12 @@ test('loadNeeds silent=false test', function(assert) {
return Ember.RSVP.reject(testErr);
}
};
- adapter.loadNeeds(loader, testModel).catch(function (err) {
+ adapter.loadAllNeeds(loader, testModel).catch(function (err) {
assert.equal(err, testErr);
});
});
-test('loadNeeds silent=true test', function(assert) {
+test('loadAllNeeds silent=true test', function(assert) {
let adapter = this.subject(),
loader,
testModel = Ember.Object.create({
@@ -199,31 +159,8 @@ test('loadNeeds silent=true test', function(assert) {
return Ember.RSVP.resolve();
}
};
- adapter.loadNeeds(loader, testModel).then(function (val) {
+ adapter.loadAllNeeds(loader, testModel).then(function (val) {
assert.ok(val);
});
});
-test('loadNeeds lazy=true test', function(assert) {
- let adapter = this.subject(),
- loader,
- testModel = Ember.Object.create({
- needs: {
- app: {
- idKey: "appID",
- lazy: true
- },
- },
- appID: 1,
- });
-
- assert.expect(1 + 1);
-
- loader = {
- queryRecord: function (type, id) {
- assert.equal(id, testModel.get("appID"));
- return Ember.RSVP.resolve();
- }
- };
- assert.equal(adapter.loadNeeds(loader, testModel), undefined, "Model without needs");
-});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/entities/task-am-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/entities/task-am-test.js b/tez-ui2/src/main/webapp/tests/unit/entities/task-am-test.js
new file mode 100644
index 0000000..7caca54
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/entities/task-am-test.js
@@ -0,0 +1,31 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('entitie:task-am', 'Unit | Entity | task am', {
+ // Specify the other units that are required for this test.
+ // needs: ['entitie:foo']
+});
+
+test('Basic creation test', function(assert) {
+ let adapter = this.subject();
+
+ assert.ok(adapter);
+ assert.ok(adapter.queryPropertyToJoin);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/entities/vertex-am-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/entities/vertex-am-test.js b/tez-ui2/src/main/webapp/tests/unit/entities/vertex-am-test.js
new file mode 100644
index 0000000..19937f3
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/entities/vertex-am-test.js
@@ -0,0 +1,31 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('entitie:vertex-am', 'Unit | Entity | vertex am', {
+ // Specify the other units that are required for this test.
+ // needs: ['entitie:foo']
+});
+
+test('Basic creation test', function(assert) {
+ let adapter = this.subject();
+
+ assert.ok(adapter);
+ assert.ok(adapter.queryPropertyToJoin);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/mixins/auto-counter-column-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/mixins/auto-counter-column-test.js b/tez-ui2/src/main/webapp/tests/unit/mixins/auto-counter-column-test.js
index 191eb67..88e2e09 100644
--- a/tez-ui2/src/main/webapp/tests/unit/mixins/auto-counter-column-test.js
+++ b/tez-ui2/src/main/webapp/tests/unit/mixins/auto-counter-column-test.js
@@ -39,26 +39,40 @@ test('getCounterColumns test', function(assert) {
let AutoCounterColumnObject = TestParent.extend(AutoCounterColumnMixin);
let subject = AutoCounterColumnObject.create({
model: [{
- counterGroups: [{
- counterGroupName: "gp1",
- counters: [{counterName: "c11"}, {counterName: "c12"}]
- }]
+ counterGroupsHash: {
+ gp1: {
+ c11: "v11",
+ c12: "v12"
+ }
+ }
}, {
- counterGroups: [{
- counterGroupName: "gp2",
- counters: [{counterName: "c21"}, {counterName: "c22"}]
- }]
+ counterGroupsHash: {
+ gp2: {
+ c21: "v21",
+ c22: "v22"
+ },
+ gp3: {
+ c31: "v31",
+ c32: "v32"
+ }
+ }
}]
});
let columns = subject.getCounterColumns();
- assert.equal(columns.length, 4);
+ assert.equal(columns.length, 6);
assert.equal(columns[0].counterGroupName, "gp1");
assert.equal(columns[0].counterName, "c11");
assert.equal(columns[1].counterGroupName, "gp1");
assert.equal(columns[1].counterName, "c12");
+
assert.equal(columns[2].counterGroupName, "gp2");
assert.equal(columns[2].counterName, "c21");
assert.equal(columns[3].counterGroupName, "gp2");
assert.equal(columns[3].counterName, "c22");
+
+ assert.equal(columns[4].counterGroupName, "gp3");
+ assert.equal(columns[4].counterName, "c31");
+ assert.equal(columns[5].counterGroupName, "gp3");
+ assert.equal(columns[5].counterName, "c32");
});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/models/abstract-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/models/abstract-test.js b/tez-ui2/src/main/webapp/tests/unit/models/abstract-test.js
index cec99a2..bd6f141 100644
--- a/tez-ui2/src/main/webapp/tests/unit/models/abstract-test.js
+++ b/tez-ui2/src/main/webapp/tests/unit/models/abstract-test.js
@@ -34,6 +34,11 @@ test('Basic test for existence', function(assert) {
assert.ok(model._notifyProperties);
assert.ok(model.didLoad);
+
+ assert.ok(model.entityID);
+ assert.ok(model.index);
+ assert.ok(model.status);
+ assert.ok(model.isComplete);
});
test('_notifyProperties test - will fail if _notifyProperties implementation is changed in ember-data', function(assert) {
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/models/ahs-app-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/models/ahs-app-test.js b/tez-ui2/src/main/webapp/tests/unit/models/ahs-app-test.js
index 04b472a..5fd9c60 100644
--- a/tez-ui2/src/main/webapp/tests/unit/models/ahs-app-test.js
+++ b/tez-ui2/src/main/webapp/tests/unit/models/ahs-app-test.js
@@ -25,5 +25,7 @@ moduleForModel('ahs-app', 'Unit | Model | ahs app', {
test('Basic creation test', function(assert) {
let model = this.subject();
+
assert.ok(!!model);
+ assert.ok(!!model.duration);
});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/models/am-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/models/am-test.js b/tez-ui2/src/main/webapp/tests/unit/models/am-test.js
new file mode 100644
index 0000000..75317bc
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/models/am-test.js
@@ -0,0 +1,31 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleForModel, test } from 'ember-qunit';
+
+moduleForModel('am', 'Unit | Model | am', {
+ // Specify the other units that are required for this test.
+ needs: []
+});
+
+test('Basic creation test', function(assert) {
+ let model = this.subject();
+
+ // let store = this.store();
+ assert.ok(!!model);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/models/am-timeline-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/models/am-timeline-test.js b/tez-ui2/src/main/webapp/tests/unit/models/am-timeline-test.js
new file mode 100644
index 0000000..3ed9efb
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/models/am-timeline-test.js
@@ -0,0 +1,34 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleForModel, test } from 'ember-qunit';
+
+moduleForModel('am-timeline', 'Unit | Model | am timeline', {
+ // Specify the other units that are required for this test.
+ needs: []
+});
+
+test('Basic creation test', function(assert) {
+ let model = this.subject();
+ // let store = this.store();
+
+ assert.ok(!!model);
+ assert.ok(!!model.status);
+ assert.ok(!!model.progress);
+ assert.ok(!!model.counterGroupsHash);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/models/app-rm-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/models/app-rm-test.js b/tez-ui2/src/main/webapp/tests/unit/models/app-rm-test.js
new file mode 100644
index 0000000..8a4a630
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/models/app-rm-test.js
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleForModel, test } from 'ember-qunit';
+
+moduleForModel('app-rm', 'Unit | Model | app rm', {
+ // Specify the other units that are required for this test.
+ needs: []
+});
+
+test('Basic creation test', function(assert) {
+ let model = this.subject();
+
+ assert.ok(!!model);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/models/attempt-am-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/models/attempt-am-test.js b/tez-ui2/src/main/webapp/tests/unit/models/attempt-am-test.js
new file mode 100644
index 0000000..0e7f2d0
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/models/attempt-am-test.js
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleForModel, test } from 'ember-qunit';
+
+moduleForModel('attempt-am', 'Unit | Model | attempt am', {
+ // Specify the other units that are required for this test.
+ needs: []
+});
+
+test('Basic creation test', function(assert) {
+ let model = this.subject();
+ // let store = this.store();
+ assert.ok(!!model);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/models/attempt-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/models/attempt-test.js b/tez-ui2/src/main/webapp/tests/unit/models/attempt-test.js
index 7d0a78e..c470012 100644
--- a/tez-ui2/src/main/webapp/tests/unit/models/attempt-test.js
+++ b/tez-ui2/src/main/webapp/tests/unit/models/attempt-test.js
@@ -27,9 +27,22 @@ test('Basic creation test', function(assert) {
let model = this.subject();
assert.ok(model);
- assert.ok(model.index);
+
+ assert.ok(model.needs.dag);
+ assert.ok(model.needs.am);
+
+ assert.ok(model.taskID);
assert.ok(model.taskIndex);
+
+ assert.ok(model.vertexID);
+ assert.ok(model.vertexIndex);
assert.ok(model.vertexName);
+
+ assert.ok(model.dagID);
+ assert.ok(model.dag);
+
+ assert.ok(model.containerID);
+ assert.ok(model.nodeID);
});
test('index test', function(assert) {
@@ -45,7 +58,7 @@ test('taskIndex test', function(assert) {
taskID: "1_2_3",
});
- assert.equal(model.get("taskIndex"), "2_3");
+ assert.equal(model.get("taskIndex"), "3");
});
test('vertexName test', function(assert) {
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/models/dag-am-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/models/dag-am-test.js b/tez-ui2/src/main/webapp/tests/unit/models/dag-am-test.js
new file mode 100644
index 0000000..58ac45a
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/models/dag-am-test.js
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleForModel, test } from 'ember-qunit';
+
+moduleForModel('dag-am', 'Unit | Model | dag am', {
+ // Specify the other units that are required for this test.
+ needs: []
+});
+
+test('Basic creation test', function(assert) {
+ let model = this.subject();
+ // let store = this.store();
+ assert.ok(!!model);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/models/dag-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/models/dag-test.js b/tez-ui2/src/main/webapp/tests/unit/models/dag-test.js
index 9b04398..513af7d 100644
--- a/tez-ui2/src/main/webapp/tests/unit/models/dag-test.js
+++ b/tez-ui2/src/main/webapp/tests/unit/models/dag-test.js
@@ -34,6 +34,7 @@ test('Basic creation test', function(assert) {
});
assert.ok(!!model);
+ assert.ok(!!model.needs.am);
assert.equal(model.get("queue"), testQueue);
});
});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/models/rm-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/models/rm-test.js b/tez-ui2/src/main/webapp/tests/unit/models/rm-test.js
new file mode 100644
index 0000000..39ea4b1
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/models/rm-test.js
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleForModel, test } from 'ember-qunit';
+
+moduleForModel('rm', 'Unit | Model | rm', {
+ // Specify the other units that are required for this test.
+ needs: []
+});
+
+test('Basic creation test', function(assert) {
+ let model = this.subject();
+ // let store = this.store();
+ assert.ok(!!model);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/models/task-am-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/models/task-am-test.js b/tez-ui2/src/main/webapp/tests/unit/models/task-am-test.js
new file mode 100644
index 0000000..fac3a5a
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/models/task-am-test.js
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleForModel, test } from 'ember-qunit';
+
+moduleForModel('task-am', 'Unit | Model | task am', {
+ // Specify the other units that are required for this test.
+ needs: []
+});
+
+test('Basic creation test', function(assert) {
+ let model = this.subject();
+ // let store = this.store();
+ assert.ok(!!model);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/models/task-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/models/task-test.js b/tez-ui2/src/main/webapp/tests/unit/models/task-test.js
index 3d59df6..076b4eb 100644
--- a/tez-ui2/src/main/webapp/tests/unit/models/task-test.js
+++ b/tez-ui2/src/main/webapp/tests/unit/models/task-test.js
@@ -27,9 +27,15 @@ test('Basic creation test', function(assert) {
let model = this.subject();
assert.ok(model);
- assert.ok(model.needs);
- assert.ok(model.index);
+ assert.ok(model.needs.dag);
+ assert.ok(model.needs.am);
+
+ assert.ok(model.vertexID);
+ assert.ok(model.vertexIndex);
assert.ok(model.vertexName);
+
+ assert.ok(model.dagID);
+ assert.ok(model.dag);
});
test('index test', function(assert) {
@@ -37,7 +43,7 @@ test('index test', function(assert) {
entityID: "1_2_3",
});
- assert.equal(model.get("index"), "2_3");
+ assert.equal(model.get("index"), "3");
});
test('vertexName test', function(assert) {
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/models/timeline-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/models/timeline-test.js b/tez-ui2/src/main/webapp/tests/unit/models/timeline-test.js
index fc52feb..c47054e 100644
--- a/tez-ui2/src/main/webapp/tests/unit/models/timeline-test.js
+++ b/tez-ui2/src/main/webapp/tests/unit/models/timeline-test.js
@@ -43,8 +43,8 @@ test('Basic creation test', function(assert) {
assert.ok(model.endTime);
assert.ok(model.duration);
- assert.ok(model.counterGroups);
- assert.ok(model.counterHash);
+ assert.ok(model._counterGroups);
+ assert.ok(model.counterGroupsHash);
});
test('appID test', function(assert) {
@@ -92,7 +92,7 @@ test('duration test', function(assert) {
});
});
-test('counterHash test', function(assert) {
+test('counterGroupsHash test', function(assert) {
let model = this.subject(),
testCounterGroup = [{
counterGroupName: "group_1",
@@ -115,10 +115,10 @@ test('counterHash test', function(assert) {
}];
Ember.run(function () {
- model.set("counterGroups", testCounterGroup);
- assert.equal(model.get("counterHash.group_1.counter_1_1"), "value_1_1");
- assert.equal(model.get("counterHash.group_1.counter_1_2"), "value_1_2");
- assert.equal(model.get("counterHash.group_2.counter_2_1"), "value_2_1");
- assert.equal(model.get("counterHash.group_2.counter_2_2"), "value_2_2");
+ model.set("_counterGroups", testCounterGroup);
+ assert.equal(model.get("counterGroupsHash.group_1.counter_1_1"), "value_1_1");
+ assert.equal(model.get("counterGroupsHash.group_1.counter_1_2"), "value_1_2");
+ assert.equal(model.get("counterGroupsHash.group_2.counter_2_1"), "value_2_1");
+ assert.equal(model.get("counterGroupsHash.group_2.counter_2_2"), "value_2_2");
});
});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/models/vertex-am-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/models/vertex-am-test.js b/tez-ui2/src/main/webapp/tests/unit/models/vertex-am-test.js
new file mode 100644
index 0000000..1a5bc66
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/models/vertex-am-test.js
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleForModel, test } from 'ember-qunit';
+
+moduleForModel('vertex-am', 'Unit | Model | vertex am', {
+ // Specify the other units that are required for this test.
+ needs: []
+});
+
+test('Basic creation test', function(assert) {
+ let model = this.subject();
+ // let store = this.store();
+ assert.ok(!!model);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/models/vertex-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/models/vertex-test.js b/tez-ui2/src/main/webapp/tests/unit/models/vertex-test.js
index bea4317..c0d2047 100644
--- a/tez-ui2/src/main/webapp/tests/unit/models/vertex-test.js
+++ b/tez-ui2/src/main/webapp/tests/unit/models/vertex-test.js
@@ -16,6 +16,8 @@
* limitations under the License.
*/
+import Ember from 'ember';
+
import { moduleForModel, test } from 'ember-qunit';
moduleForModel('vertex', 'Unit | Model | vertex', {
@@ -27,6 +29,10 @@ test('Basic creation test', function(assert) {
let model = this.subject();
assert.ok(model);
+
+ assert.ok(model.needs.dag);
+ assert.ok(model.needs.am);
+
assert.ok(model.runningTasks);
assert.ok(model.pendingTasks);
});
@@ -34,15 +40,19 @@ test('Basic creation test', function(assert) {
test('runningTasks test', function(assert) {
let model = this.subject();
- assert.equal(model.get("runningTasks"), null);
- model.set("status", "SUCCEEDED");
- assert.equal(model.get("runningTasks"), 0);
+ Ember.run(function () {
+ assert.equal(model.get("runningTasks"), null);
+ model.set("status", "SUCCEEDED");
+ assert.equal(model.get("runningTasks"), 0);
+ });
});
test('pendingTasks test', function(assert) {
let model = this.subject();
- assert.equal(model.get("pendingTasks"), null);
- model.set("status", "SUCCEEDED");
- assert.equal(model.get("pendingTasks"), 0);
+ Ember.run(function () {
+ assert.equal(model.get("pendingTasks"), null);
+ model.set("status", "SUCCEEDED");
+ assert.equal(model.get("pendingTasks"), 0);
+ });
});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/routes/am-pollster-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/routes/am-pollster-test.js b/tez-ui2/src/main/webapp/tests/unit/routes/am-pollster-test.js
new file mode 100644
index 0000000..a5383ab
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/routes/am-pollster-test.js
@@ -0,0 +1,34 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('route:am-pollster', 'Unit | Route | am pollster', {
+ // Specify the other units that are required for this test.
+ // needs: ['controller:foo']
+});
+
+test('Basic creation test', function(assert) {
+ let route = this.subject();
+
+ assert.ok(route);
+ assert.ok(route.onRecordPoll);
+ assert.ok(route.onPollFailure);
+ assert.ok(route.reload);
+ assert.ok(route.actions.countersToPollChanged);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/routes/multi-am-pollster-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/routes/multi-am-pollster-test.js b/tez-ui2/src/main/webapp/tests/unit/routes/multi-am-pollster-test.js
new file mode 100644
index 0000000..eb3670b
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/routes/multi-am-pollster-test.js
@@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('route:multi-am-pollster', 'Unit | Route | multi am pollster', {
+ // Specify the other units that are required for this test.
+ // needs: ['controller:foo']
+});
+
+test('Basic creation test', function(assert) {
+ let route = this.subject();
+
+ assert.ok(route);
+ assert.ok(route.canPoll);
+ assert.ok(route.actions.setPollingRecords);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/routes/pollster-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/routes/pollster-test.js b/tez-ui2/src/main/webapp/tests/unit/routes/pollster-test.js
new file mode 100644
index 0000000..79a5a99
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/routes/pollster-test.js
@@ -0,0 +1,39 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('route:pollster', 'Unit | Route | pollster', {
+ // Specify the other units that are required for this test.
+ // needs: ['controller:foo']
+});
+
+test('Basic creation test', function(assert) {
+ let route = this.subject();
+
+ assert.ok(route);
+
+ assert.ok(route.onRecordPoll);
+ assert.ok(route.onPollSuccess);
+ assert.ok(route.onPollFailure);
+
+ assert.ok(route.pollData);
+ assert.ok(route.canPoll);
+ assert.ok(route._canPollInit);
+ assert.ok(route._canPollObserver);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/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
new file mode 100644
index 0000000..69c9457
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/routes/single-am-pollster-test.js
@@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('route:single-am-pollster', 'Unit | Route | single am pollster', {
+ // Specify the other units that are required for this test.
+ // needs: ['controller:foo']
+});
+
+test('Basic creation test', function(assert) {
+ let route = this.subject();
+
+ assert.ok(route);
+ assert.ok(route.canPoll);
+ assert.ok(route._loadedValueObserver);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/routes/vertex/tasks-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/routes/vertex/tasks-test.js b/tez-ui2/src/main/webapp/tests/unit/routes/vertex/tasks-test.js
index 432b619..ee983d8 100644
--- a/tez-ui2/src/main/webapp/tests/unit/routes/vertex/tasks-test.js
+++ b/tez-ui2/src/main/webapp/tests/unit/routes/vertex/tasks-test.js
@@ -16,6 +16,8 @@
* limitations under the License.
*/
+import Ember from 'ember';
+
import { moduleFor, test } from 'ember-qunit';
moduleFor('route:vertex/tasks', 'Unit | Route | vertex/tasks', {
@@ -24,7 +26,10 @@ moduleFor('route:vertex/tasks', 'Unit | Route | vertex/tasks', {
});
test('Basic creation test', function(assert) {
- let route = this.subject();
+ let route = this.subject({
+ initVisibleColumns: Ember.K,
+ getCounterColumns: Ember.K
+ });
assert.ok(route);
assert.ok(route.title);
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/serializers/am-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/serializers/am-test.js b/tez-ui2/src/main/webapp/tests/unit/serializers/am-test.js
new file mode 100644
index 0000000..d9476ad
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/serializers/am-test.js
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('serializer:am', 'Unit | Serializer | am', {
+ // Specify the other units that are required for this test.
+ // needs: ['serializer:foo']
+});
+
+test('Basic creation test', function(assert) {
+ let serializer = this.subject();
+
+ assert.ok(serializer);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/serializers/app-rm-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/serializers/app-rm-test.js b/tez-ui2/src/main/webapp/tests/unit/serializers/app-rm-test.js
new file mode 100644
index 0000000..01051cf
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/serializers/app-rm-test.js
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('serializer:app-rm', 'Unit | Serializer | app rm', {
+ // Specify the other units that are required for this test.
+ // needs: ['serializer:foo']
+});
+
+test('Basic creation test', function(assert) {
+ let serializer = this.subject();
+
+ assert.ok(serializer);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/serializers/attempt-am-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/serializers/attempt-am-test.js b/tez-ui2/src/main/webapp/tests/unit/serializers/attempt-am-test.js
new file mode 100644
index 0000000..6fd9e57
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/serializers/attempt-am-test.js
@@ -0,0 +1,31 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('serializer:attempt-am', 'Unit | Serializer | attempt am', {
+ // Specify the other units that are required for this test.
+ // needs: ['serializer:foo']
+});
+
+test('Basic creation test', function(assert) {
+ let serializer = this.subject();
+
+ assert.ok(serializer);
+ assert.ok(serializer.payloadNamespace);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/serializers/dag-am-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/serializers/dag-am-test.js b/tez-ui2/src/main/webapp/tests/unit/serializers/dag-am-test.js
new file mode 100644
index 0000000..be68f98
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/serializers/dag-am-test.js
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('serializer:dag-am', 'Unit | Serializer | dag am', {
+ // Specify the other units that are required for this test.
+ // needs: ['serializer:foo']
+});
+
+test('Basic creation test', function(assert) {
+ let serializer = this.subject();
+
+ assert.ok(serializer);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/serializers/rm-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/serializers/rm-test.js b/tez-ui2/src/main/webapp/tests/unit/serializers/rm-test.js
new file mode 100644
index 0000000..7175d1a
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/serializers/rm-test.js
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('serializer:rm', 'Unit | Serializer | rm', {
+ // Specify the other units that are required for this test.
+ // needs: ['serializer:foo']
+});
+
+test('Basic creation test', function(assert) {
+ let serializer = this.subject();
+
+ assert.ok(serializer);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/serializers/task-am-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/serializers/task-am-test.js b/tez-ui2/src/main/webapp/tests/unit/serializers/task-am-test.js
new file mode 100644
index 0000000..cdd1b04
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/serializers/task-am-test.js
@@ -0,0 +1,31 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('serializer:task-am', 'Unit | Serializer | task am', {
+ // Specify the other units that are required for this test.
+ // needs: ['serializer:foo']
+});
+
+test('Basic creation test', function(assert) {
+ let serializer = this.subject();
+
+ assert.ok(serializer);
+ assert.ok(serializer.payloadNamespace);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/serializers/vertex-am-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/serializers/vertex-am-test.js b/tez-ui2/src/main/webapp/tests/unit/serializers/vertex-am-test.js
new file mode 100644
index 0000000..254ca9f
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/serializers/vertex-am-test.js
@@ -0,0 +1,31 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('serializer:vertex-am', 'Unit | Serializer | vertex am', {
+ // Specify the other units that are required for this test.
+ // needs: ['serializer:foo']
+});
+
+test('Basic creation test', function(assert) {
+ let serializer = this.subject();
+
+ assert.ok(serializer);
+ assert.ok(serializer.payloadNamespace);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/services/loader-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/services/loader-test.js b/tez-ui2/src/main/webapp/tests/unit/services/loader-test.js
index 7000188..dbf8faa 100644
--- a/tez-ui2/src/main/webapp/tests/unit/services/loader-test.js
+++ b/tez-ui2/src/main/webapp/tests/unit/services/loader-test.js
@@ -142,30 +142,32 @@ test('entityFor test', function(assert) {
}
if(name === "entity") {
assert.equal(type, "entitie");
- return {
- actualName: "entity"
- };
+ return Ember.Object.create({
+ actualName: "entity",
+ name: name
+ });
}
};
entity = service.entityFor(testName);
assert.equal(entity.actualName, "entity", "Default lookups succeeded");
- assert.equal(entity.name, testName, "Default lookups succeeded");
+ assert.equal(entity.get("name"), testName, "Default lookups succeeded");
// Primary lookups succeeded
service.lookup = function (type, name) {
if(name === testName) {
assert.equal(type, "entitie");
- return {
- actualName: name
- };
+ return Ember.Object.create({
+ actualName: name,
+ name: name
+ });
}
if(name === "entity") {
assert.equal(type, "entitie"); // Shouldn't be called
}
};
entity = service.entityFor(testName);
- assert.equal(entity.name, testName, "Default lookups succeeded");
- assert.equal(entity.name, testName, "Default lookups succeeded");
+ assert.equal(entity.get("name"), testName, "Default lookups succeeded");
+ assert.equal(entity.get("name"), testName, "Default lookups succeeded");
});
test('getCacheKey test', function(assert) {
@@ -180,7 +182,7 @@ test('getCacheKey test', function(assert) {
test('queryRecord test', function(assert) {
let service = this.subject(),
testNameSpace = "ns",
- testOptions = {},
+ testOptions = {opt: 1},
testQueryParams = {},
testUrlParams = {},
testType = "type",
@@ -188,7 +190,7 @@ test('queryRecord test', function(assert) {
testID = 1,
cacheKey = service.getCacheKey(testType, testQueryParams, testID);
- assert.expect(1 + 4 + 5 + 3);
+ assert.expect(1 + 5 + 3);
service.nameSpace = testNameSpace;
service.checkRequisite = Ember.K;
@@ -196,26 +198,17 @@ test('queryRecord test', function(assert) {
assert.equal(type, testType);
return {
- loadRelations: function (thisService, record, options, urlParams) {
- assert.equal(thisService, service);
- assert.equal(record, testRecord);
- assert.equal(options, testOptions);
- assert.equal(urlParams, testUrlParams);
-
- return record;
+ queryRecord: function (loader, id, options, query, urlParams) {
+ assert.equal(loader, service, "Loader");
+ assert.equal(id, testID, "id");
+ assert.equal(options.opt, testOptions.opt, "options");
+ assert.equal(query, testQueryParams, "query");
+ assert.equal(urlParams, testUrlParams, "urlParams");
+
+ return Ember.RSVP.resolve(testRecord);
}
};
};
- service.get("store").queryRecord = function (type, query) {
- assert.equal(type, testType);
-
- assert.equal(query.id, testID);
- assert.equal(query.nameSpace, testNameSpace);
- assert.equal(query.params, testQueryParams);
- assert.equal(query.urlParams, testUrlParams);
-
- return Ember.RSVP.resolve(testRecord);
- };
service.cache = Ember.Object.create();
assert.notOk(service.get("cache").get(cacheKey));
@@ -228,7 +221,7 @@ test('queryRecord test', function(assert) {
test('query test', function(assert) {
let service = this.subject(),
testNameSpace = "ns",
- testOptions = {},
+ testOptions = {opt: 1},
testQueryParams = {},
testUrlParams = {},
testType = "type",
@@ -236,7 +229,7 @@ test('query test', function(assert) {
testRecords = [testRecord, testRecord],
cacheKey = service.getCacheKey(testType, testQueryParams);
- assert.expect(1 + (4 + 4) + 4 + 3);
+ assert.expect(1 + 4 + 3);
service.nameSpace = testNameSpace;
service.checkRequisite = Ember.K;
@@ -244,25 +237,16 @@ test('query test', function(assert) {
assert.equal(type, testType);
return {
- loadRelations: function (thisService, record, options, urlParams) {
- assert.equal(thisService, service);
- assert.equal(record, testRecord);
- assert.equal(options, testOptions);
- assert.equal(urlParams, testUrlParams);
+ query: function (loader, query, options, urlParams) {
+ assert.equal(loader, service, "Loader");
+ assert.equal(options.opt, testOptions.opt, "options");
+ assert.equal(query, testQueryParams, "query");
+ assert.equal(urlParams, testUrlParams, "urlParams");
- return record;
+ return Ember.RSVP.resolve(testRecords);
}
};
};
- service.get("store").query = function (type, query) {
- assert.equal(type, testType);
-
- assert.equal(query.nameSpace, testNameSpace);
- assert.equal(query.params, testQueryParams);
- assert.equal(query.urlParams, testUrlParams);
-
- return Ember.RSVP.resolve(testRecords);
- };
service.cache = Ember.Object.create();
assert.notOk(service.get("cache").get(cacheKey));
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/services/pollster-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/services/pollster-test.js b/tez-ui2/src/main/webapp/tests/unit/services/pollster-test.js
new file mode 100644
index 0000000..7687a87
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/services/pollster-test.js
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('service:pollster', 'Unit | Service | pollster', {
+ // Specify the other units that are required for this test.
+ needs: ['service:localStorage']
+});
+
+test('Basic creation test', function(assert) {
+ let service = this.subject();
+ assert.ok(service);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/utils/counter-column-definition-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/utils/counter-column-definition-test.js b/tez-ui2/src/main/webapp/tests/unit/utils/counter-column-definition-test.js
index 64df664..9e0476f 100644
--- a/tez-ui2/src/main/webapp/tests/unit/utils/counter-column-definition-test.js
+++ b/tez-ui2/src/main/webapp/tests/unit/utils/counter-column-definition-test.js
@@ -37,7 +37,7 @@ test('Basic creation test', function(assert) {
assert.ok(CounterColumnDefinition.make);
assert.equal(definition.observePath, true);
- assert.equal(definition.contentPath, "counterHash");
+ assert.equal(definition.contentPath, "counterGroupsHash");
});
test('getCellContent, getSearchValue & getSortValue test', function(assert) {
@@ -46,7 +46,7 @@ test('getCellContent, getSearchValue & getSortValue test', function(assert) {
testCounterValue = "val",
testContent = {},
testRow = {
- counterHash: testContent
+ counterGroupsHash: testContent
};
testContent[testGroupName] = {};
[2/3] tez git commit: TEZ-3060. Tez UI 2: Activate auto-refresh (sree)
Posted by sr...@apache.org.
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/models/task-am.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/models/task-am.js b/tez-ui2/src/main/webapp/app/models/task-am.js
new file mode 100644
index 0000000..55722b6
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/models/task-am.js
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import AMModel from './am';
+
+export default AMModel.extend({
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/models/task.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/models/task.js b/tez-ui2/src/main/webapp/app/models/task.js
index 2ded910..4db732e 100644
--- a/tez-ui2/src/main/webapp/app/models/task.js
+++ b/tez-ui2/src/main/webapp/app/models/task.js
@@ -19,39 +19,41 @@
import Ember from 'ember';
import DS from 'ember-data';
-import TimelineModel from './timeline';
-/*
- Inherited properties
+import AMTimelineModel from './am-timeline';
- entityID - String
- appID - Computed from entityID
-
- status - String
- progress - Computed from status
-
- startTime - Number
- endTime - Number
- duration - Computed from start & end times
-
- counterGroups - Array
- counterHash - Computed from counterGroups
-*/
-
-export default TimelineModel.extend({
+export default AMTimelineModel.extend({
needs: {
dag: {
type: "dag",
idKey: "dagID",
silent: true
+ },
+ am: {
+ type: "taskAm",
+ idKey: "entityID",
+ loadType: "demand",
+ queryParams: function (model) {
+ var vertexIndex = parseInt(model.get("vertexIndex")),
+ taskIndex = parseInt(model.get("index"));
+ return {
+ taskID: `${vertexIndex}_${taskIndex}`,
+ dagID: parseInt(model.get("dag.index")),
+ counters: "*"
+ };
+ },
+ urlParams: function (model) {
+ return {
+ app_id: model.get("appID")
+ };
+ }
}
},
- index: Ember.computed("entityID", function () {
- var idParts = this.get("entityID").split("_");
- return idParts.slice(Math.max(idParts.length - 2, 1)).join("_");
- }),
-
vertexID: DS.attr('string'),
+ vertexIndex: Ember.computed("vertexID", function () {
+ var id = this.get("vertexID") || "";
+ return id.substr(id.lastIndexOf('_') + 1);
+ }),
vertexName: Ember.computed("vertexID", "dag", function () {
var vertexID = this.get("vertexID");
return this.get(`dag.vertexIdNameMap.${vertexID}`);
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/models/timeline.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/models/timeline.js b/tez-ui2/src/main/webapp/app/models/timeline.js
index cdd8d22..60157d3 100644
--- a/tez-ui2/src/main/webapp/app/models/timeline.js
+++ b/tez-ui2/src/main/webapp/app/models/timeline.js
@@ -31,7 +31,6 @@ export default AbstractModel.extend({
}
},
- entityID: DS.attr("string"),
appID: Ember.computed("entityID", function () {
var idParts = this.get("entityID").split("_");
return `application_${idParts[1]}_${idParts[2]}`;
@@ -39,7 +38,7 @@ export default AbstractModel.extend({
app: DS.attr("object"), // Either RMApp or AHSApp
atsStatus: DS.attr("string"),
- status: Ember.computed("atsStatus", "app.status", function () {
+ status: Ember.computed("atsStatus", "app.status", "app.finalStatus", function () {
var status = this.get("atsStatus"),
yarnStatus = this.get("app.status");
@@ -53,6 +52,7 @@ export default AbstractModel.extend({
return this.get("app.finalStatus");
}),
+
progress: Ember.computed("status", function () {
return this.get("status") === "SUCCEEDED" ? 1 : null;
}),
@@ -64,10 +64,11 @@ export default AbstractModel.extend({
return duration > 0 ? duration : null;
}),
- counterGroups: DS.attr('object'),
- counterHash: Ember.computed("counterGroups", function () {
+ // Hash will be created only on demand, till then counters will be stored in _counterGroups
+ _counterGroups: DS.attr('object'),
+ counterGroupsHash: Ember.computed("_counterGroups", function () {
var counterHash = {},
- counterGroups = this.get("counterGroups") || [];
+ counterGroups = this.get("_counterGroups") || [];
counterGroups.forEach(function (group) {
var counters = group.counters,
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/models/vertex-am.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/models/vertex-am.js b/tez-ui2/src/main/webapp/app/models/vertex-am.js
new file mode 100644
index 0000000..55722b6
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/models/vertex-am.js
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import AMModel from './am';
+
+export default AMModel.extend({
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/models/vertex.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/models/vertex.js b/tez-ui2/src/main/webapp/app/models/vertex.js
index 4192771..51e50b1 100644
--- a/tez-ui2/src/main/webapp/app/models/vertex.js
+++ b/tez-ui2/src/main/webapp/app/models/vertex.js
@@ -19,30 +19,31 @@
import Ember from 'ember';
import DS from 'ember-data';
-import TimelineModel from './timeline';
-/*
- Inherited properties
+import AMTimelineModel from './am-timeline';
- entityID - String
- appID - Computed from entityID
-
- status - String
- progress - Computed from status
-
- startTime - Number
- endTime - Number
- duration - Computed from start & end times
-
- counterGroups - Array
- counterHash - Computed from counterGroups
-*/
-
-export default TimelineModel.extend({
+export default AMTimelineModel.extend({
needs: {
dag: {
type: "dag",
idKey: "dagID",
silent: true
+ },
+ am: {
+ type: "vertexAm",
+ idKey: "entityID",
+ loadType: "demand",
+ queryParams: function (model) {
+ return {
+ vertexID: parseInt(model.get("index")),
+ dagID: parseInt(model.get("dag.index")),
+ counters: "*"
+ };
+ },
+ urlParams: function (model) {
+ return {
+ app_id: model.get("appID")
+ };
+ }
}
},
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/router.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/router.js b/tez-ui2/src/main/webapp/app/router.js
index 4e8cb0b..db26954 100644
--- a/tez-ui2/src/main/webapp/app/router.js
+++ b/tez-ui2/src/main/webapp/app/router.js
@@ -47,6 +47,8 @@ Router.map(function() {
this.route('dags');
this.route('configs');
});
+ this.route('multi-am-pollster');
+ this.route('single-am-pollster');
});
export default Router;
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/routes/abstract.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/routes/abstract.js b/tez-ui2/src/main/webapp/app/routes/abstract.js
index c3efc18..923ac96 100644
--- a/tez-ui2/src/main/webapp/app/routes/abstract.js
+++ b/tez-ui2/src/main/webapp/app/routes/abstract.js
@@ -68,7 +68,7 @@ export default Ember.Route.extend(NameMixin, {
},
setDocTitle: function () {
- Ember.$(document).attr('title', this.get('title'));
+ Ember.$(document).attr('title', "Tez UI : " + this.get('title'));
},
setupController: function (controller, model) {
@@ -171,6 +171,9 @@ export default Ember.Route.extend(NameMixin, {
},
reload: function () {
Ember.run.later(this, "loadData", {reload: true});
- }
+ },
+ willTransition: function () {
+ this.set("loadedValue", null);
+ },
}
});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/routes/am-pollster.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/routes/am-pollster.js b/tez-ui2/src/main/webapp/app/routes/am-pollster.js
new file mode 100644
index 0000000..5907a91
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/routes/am-pollster.js
@@ -0,0 +1,88 @@
+/*global more*/
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import PollsterRoute from './pollster';
+
+var MoreObject = more.Object;
+
+export default PollsterRoute.extend({
+
+ countersToPoll: null,
+
+ onRecordPoll: function (record) {
+ var query = {},
+ countersToPoll = this.get("countersToPoll");
+
+ if(countersToPoll !== null) {
+ query.counters = countersToPoll;
+ }
+
+ return this.get("loader").loadNeed(record, "am", {reload: true}, query);
+ },
+
+ onPollFailure: function (error) {
+ var that = this,
+ record = this.get("polledRecords.0");
+
+ this.get("loader").queryRecord("appRm", record.get("appID"), {reload: true}).then(function (appRm) {
+ if(appRm.get('isComplete')) {
+ that.reload();
+ }
+ else {
+ error.message = "Application Master (AM) is out of reach. Either it's down, or CORS is not enabled for YARN ResourceManager.";
+ that.send("error", error);
+ }
+ }, function (error) {
+ error.message = "Resource Manager (RM) is out of reach. Either it's down, or CORS is not enabled.";
+ that.send("error", error);
+ that.reload();
+ });
+ },
+
+ reload: function () {
+ this.set("polledRecords", null);
+ this.send("reload");
+ },
+
+ actions: {
+ countersToPollChanged: function (counterColumnDefinitions) {
+ var counterGroupHash = {},
+ counterGroups = [];
+
+ if(counterColumnDefinitions){
+ counterColumnDefinitions.forEach(function (definition) {
+ var counterGroupName = definition.get("counterGroupName"),
+ counterNames = counterGroupHash[counterGroupName];
+ if(!counterNames) {
+ counterNames = counterGroupHash[counterGroupName] = [];
+ }
+ counterNames.push(definition.get("counterName"));
+ });
+
+ MoreObject.forEach(counterGroupHash, function (groupName, counters) {
+ counters = counters.join(",");
+ counterGroups.push(`${groupName}/${counters}`);
+ });
+ }
+
+ this.set("countersToPoll", counterGroups.join(";"));
+ }
+ }
+
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/routes/app/configs.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/routes/app/configs.js b/tez-ui2/src/main/webapp/app/routes/app/configs.js
index 825bdad..bdd53ae 100644
--- a/tez-ui2/src/main/webapp/app/routes/app/configs.js
+++ b/tez-ui2/src/main/webapp/app/routes/app/configs.js
@@ -17,13 +17,15 @@
*/
import Ember from 'ember';
-import AbstractRoute from '../abstract';
+import SingleAmPollsterRoute from '../single-am-pollster';
-export default AbstractRoute.extend({
+export default SingleAmPollsterRoute.extend({
title: "Application Details",
loaderNamespace: "app",
+ canPoll: false,
+
setupController: function (controller, model) {
this._super(controller, model);
Ember.run.later(this, "startCrumbBubble");
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/routes/app/dags.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/routes/app/dags.js b/tez-ui2/src/main/webapp/app/routes/app/dags.js
index 80643c0..8264299 100644
--- a/tez-ui2/src/main/webapp/app/routes/app/dags.js
+++ b/tez-ui2/src/main/webapp/app/routes/app/dags.js
@@ -17,9 +17,9 @@
*/
import Ember from 'ember';
-import AbstractRoute from '../abstract';
+import MultiAmPollsterRoute from '../multi-am-pollster';
-export default AbstractRoute.extend({
+export default MultiAmPollsterRoute.extend({
title: "DAGs",
loaderNamespace: "app",
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/routes/app/index.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/routes/app/index.js b/tez-ui2/src/main/webapp/app/routes/app/index.js
index 825bdad..7df42e5 100644
--- a/tez-ui2/src/main/webapp/app/routes/app/index.js
+++ b/tez-ui2/src/main/webapp/app/routes/app/index.js
@@ -17,9 +17,9 @@
*/
import Ember from 'ember';
-import AbstractRoute from '../abstract';
+import SingleAmPollsterRoute from '../single-am-pollster';
-export default AbstractRoute.extend({
+export default SingleAmPollsterRoute.extend({
title: "Application Details",
loaderNamespace: "app",
@@ -29,6 +29,10 @@ export default AbstractRoute.extend({
Ember.run.later(this, "startCrumbBubble");
},
+ onRecordPoll: function () {
+ this.reload();
+ },
+
load: function (value, query, options) {
return this.get("loader").queryRecord('app', this.modelFor("app").get("id"), options);
},
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/routes/application.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/routes/application.js b/tez-ui2/src/main/webapp/app/routes/application.js
index 998cce4..121eda2 100644
--- a/tez-ui2/src/main/webapp/app/routes/application.js
+++ b/tez-ui2/src/main/webapp/app/routes/application.js
@@ -37,6 +37,11 @@ export default Ember.Route.extend({
this.set("controller.breadcrumbs", breadcrumbs);
},
+ error: function (error) {
+ // Display error bar
+ Ember.Logger.error(error);
+ },
+
// Modal window actions
openModal: function (componentName, options) {
options = options || {};
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/routes/attempt.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/routes/attempt.js b/tez-ui2/src/main/webapp/app/routes/attempt.js
index ff9d4fb..4a1ac20 100644
--- a/tez-ui2/src/main/webapp/app/routes/attempt.js
+++ b/tez-ui2/src/main/webapp/app/routes/attempt.js
@@ -19,7 +19,7 @@
import AbstractRoute from './abstract';
export default AbstractRoute.extend({
- title: "Vertex",
+ title: "Attempt",
loaderQueryParams: {
id: "attempt_id"
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/routes/attempt/counters.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/routes/attempt/counters.js b/tez-ui2/src/main/webapp/app/routes/attempt/counters.js
index e63e6ab..add4ce5 100644
--- a/tez-ui2/src/main/webapp/app/routes/attempt/counters.js
+++ b/tez-ui2/src/main/webapp/app/routes/attempt/counters.js
@@ -17,9 +17,9 @@
*/
import Ember from 'ember';
-import AbstractRoute from '../abstract';
+import SingleAmPollsterRoute from '../single-am-pollster';
-export default AbstractRoute.extend({
+export default SingleAmPollsterRoute.extend({
title: "DAG Details",
loaderNamespace: "attempt",
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/routes/attempt/index.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/routes/attempt/index.js b/tez-ui2/src/main/webapp/app/routes/attempt/index.js
index e63e6ab..add4ce5 100644
--- a/tez-ui2/src/main/webapp/app/routes/attempt/index.js
+++ b/tez-ui2/src/main/webapp/app/routes/attempt/index.js
@@ -17,9 +17,9 @@
*/
import Ember from 'ember';
-import AbstractRoute from '../abstract';
+import SingleAmPollsterRoute from '../single-am-pollster';
-export default AbstractRoute.extend({
+export default SingleAmPollsterRoute.extend({
title: "DAG Details",
loaderNamespace: "attempt",
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/routes/dag/attempts.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/routes/dag/attempts.js b/tez-ui2/src/main/webapp/app/routes/dag/attempts.js
index c8c897a..167c10e 100644
--- a/tez-ui2/src/main/webapp/app/routes/dag/attempts.js
+++ b/tez-ui2/src/main/webapp/app/routes/dag/attempts.js
@@ -17,9 +17,9 @@
*/
import Ember from 'ember';
-import AbstractRoute from '../abstract';
+import MultiAmPollsterRoute from '../multi-am-pollster';
-export default AbstractRoute.extend({
+export default MultiAmPollsterRoute.extend({
title: "All Task Attempts",
loaderNamespace: "dag",
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/routes/dag/counters.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/routes/dag/counters.js b/tez-ui2/src/main/webapp/app/routes/dag/counters.js
index 51b3fc5..be60c1d 100644
--- a/tez-ui2/src/main/webapp/app/routes/dag/counters.js
+++ b/tez-ui2/src/main/webapp/app/routes/dag/counters.js
@@ -17,9 +17,9 @@
*/
import Ember from 'ember';
-import AbstractRoute from '../abstract';
+import SingleAmPollsterRoute from '../single-am-pollster';
-export default AbstractRoute.extend({
+export default SingleAmPollsterRoute.extend({
title: "DAG Details",
loaderNamespace: "dag",
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/routes/dag/index.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/routes/dag/index.js b/tez-ui2/src/main/webapp/app/routes/dag/index.js
index 51b3fc5..be60c1d 100644
--- a/tez-ui2/src/main/webapp/app/routes/dag/index.js
+++ b/tez-ui2/src/main/webapp/app/routes/dag/index.js
@@ -17,9 +17,9 @@
*/
import Ember from 'ember';
-import AbstractRoute from '../abstract';
+import SingleAmPollsterRoute from '../single-am-pollster';
-export default AbstractRoute.extend({
+export default SingleAmPollsterRoute.extend({
title: "DAG Details",
loaderNamespace: "dag",
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/routes/dag/tasks.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/routes/dag/tasks.js b/tez-ui2/src/main/webapp/app/routes/dag/tasks.js
index 859a712..744913d 100644
--- a/tez-ui2/src/main/webapp/app/routes/dag/tasks.js
+++ b/tez-ui2/src/main/webapp/app/routes/dag/tasks.js
@@ -17,9 +17,9 @@
*/
import Ember from 'ember';
-import AbstractRoute from '../abstract';
+import MultiAmPollsterRoute from '../multi-am-pollster';
-export default AbstractRoute.extend({
+export default MultiAmPollsterRoute.extend({
title: "All Tasks",
loaderNamespace: "dag",
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/routes/dag/vertices.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/routes/dag/vertices.js b/tez-ui2/src/main/webapp/app/routes/dag/vertices.js
index 063f2cc..0b7d63b 100644
--- a/tez-ui2/src/main/webapp/app/routes/dag/vertices.js
+++ b/tez-ui2/src/main/webapp/app/routes/dag/vertices.js
@@ -17,9 +17,9 @@
*/
import Ember from 'ember';
-import AbstractRoute from '../abstract';
+import MultiAmPollsterRoute from '../multi-am-pollster';
-export default AbstractRoute.extend({
+export default MultiAmPollsterRoute.extend({
title: "All Vertices",
loaderNamespace: "dag",
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/routes/dags.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/routes/dags.js b/tez-ui2/src/main/webapp/app/routes/dags.js
index 5fab777..45fd25d 100644
--- a/tez-ui2/src/main/webapp/app/routes/dags.js
+++ b/tez-ui2/src/main/webapp/app/routes/dags.js
@@ -75,18 +75,18 @@ export default AbstractRoute.extend({
});
},
- load: function (value, query, options) {
+ load: function (value, query/*, options*/) {
var loader,
that = this;
if(query.dagID) {
that.set("loadedRecords", []);
- loader = this.get("loader").queryRecord('dag', query.dagID, options).then(function (record) {
+ loader = this.get("loader").queryRecord('dag', query.dagID, {reload: true}).then(function (record) {
return [record];
});
}
else {
- loader = this.get("loader").query('dag', query, options);
+ loader = this.get("loader").query('dag', query, {reload: true});
}
return loader.then(function (records) {
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/routes/multi-am-pollster.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/routes/multi-am-pollster.js b/tez-ui2/src/main/webapp/app/routes/multi-am-pollster.js
new file mode 100644
index 0000000..c3260a6
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/routes/multi-am-pollster.js
@@ -0,0 +1,35 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import Ember from 'ember';
+import AmPollsterRoute from './am-pollster';
+
+export default AmPollsterRoute.extend({
+
+ canPoll: Ember.computed("polledRecords.0.app.isComplete", "loadedValue", function () {
+ var isComplete = this.get("polledRecords.0.app.isComplete");
+ return isComplete === false && this._super();
+ }),
+
+ actions: {
+ setPollingRecords: function (records) {
+ this.set("polledRecords", records);
+ }
+ }
+
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/routes/pollster.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/routes/pollster.js b/tez-ui2/src/main/webapp/app/routes/pollster.js
new file mode 100644
index 0000000..5a7af16
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/routes/pollster.js
@@ -0,0 +1,65 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import Ember from 'ember';
+import AbstractRoute from './abstract';
+
+export default AbstractRoute.extend({
+ polling: Ember.inject.service("pollster"),
+
+ polledRecords: null,
+
+ // Must be implemented by inheriting classes
+ onRecordPoll: Ember.K,
+ onPollSuccess: Ember.K,
+ onPollFailure: Ember.K,
+
+ pollData: function () {
+ var polledRecords = this.get("polledRecords");
+
+ if(!this.get("isLoading") && polledRecords) {
+ polledRecords = polledRecords.map(this.onRecordPoll.bind(this));
+ return Ember.RSVP.all(polledRecords).then(
+ this.onPollSuccess.bind(this),
+ this.onPollFailure.bind(this)
+ );
+ }
+ return Ember.RSVP.reject();
+ },
+
+ canPoll: Ember.computed("polledRecords", "loadedValue", function () {
+ return this.get("polledRecords") && this.get("loadedValue");
+ }),
+
+ _canPollInit: Ember.on("init", function () {
+ // This sets a flag that ensures that the _canPollObserver is called whenever
+ // canPoll changes. By default observers on un-used computed properties
+ // are not called.
+ this.get("canPoll");
+ }),
+
+ _canPollObserver: Ember.observer("canPoll", function () {
+ if(this.get("canPoll")) {
+ this.get("polling").setPoll(this.pollData, this);
+ }
+ else {
+ this.get("polling").resetPoll();
+ }
+ }),
+
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/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
new file mode 100644
index 0000000..4a0d507
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/routes/single-am-pollster.js
@@ -0,0 +1,34 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import Ember from 'ember';
+import AmPollsterRoute from './am-pollster';
+
+export default AmPollsterRoute.extend({
+
+ canPoll: Ember.computed("polledRecords", "loadedValue.app.isComplete", function () {
+ var isComplete = this.get("loadedValue.app.isComplete");
+ return isComplete === false && this._super();
+ }),
+
+ _loadedValueObserver: Ember.observer("loadedValue", function () {
+ var loadedValue = this.get("loadedValue");
+ this.set("polledRecords", loadedValue ? [this.get("loadedValue")] : null);
+ })
+
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/routes/task.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/routes/task.js b/tez-ui2/src/main/webapp/app/routes/task.js
index 835243f..42d9715 100644
--- a/tez-ui2/src/main/webapp/app/routes/task.js
+++ b/tez-ui2/src/main/webapp/app/routes/task.js
@@ -19,7 +19,7 @@
import AbstractRoute from './abstract';
export default AbstractRoute.extend({
- title: "Vertex",
+ title: "Task",
loaderQueryParams: {
id: "task_id"
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/routes/task/attempts.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/routes/task/attempts.js b/tez-ui2/src/main/webapp/app/routes/task/attempts.js
index 3a0bc18..536d085 100644
--- a/tez-ui2/src/main/webapp/app/routes/task/attempts.js
+++ b/tez-ui2/src/main/webapp/app/routes/task/attempts.js
@@ -17,9 +17,9 @@
*/
import Ember from 'ember';
-import AbstractRoute from '../abstract';
+import MultiAmPollsterRoute from '../multi-am-pollster';
-export default AbstractRoute.extend({
+export default MultiAmPollsterRoute.extend({
title: "Task Attempts",
loaderNamespace: "task",
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/routes/task/counters.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/routes/task/counters.js b/tez-ui2/src/main/webapp/app/routes/task/counters.js
index a2d5d33..086e0cc 100644
--- a/tez-ui2/src/main/webapp/app/routes/task/counters.js
+++ b/tez-ui2/src/main/webapp/app/routes/task/counters.js
@@ -17,9 +17,9 @@
*/
import Ember from 'ember';
-import AbstractRoute from '../abstract';
+import SingleAmPollsterRoute from '../single-am-pollster';
-export default AbstractRoute.extend({
+export default SingleAmPollsterRoute.extend({
title: "DAG Details",
loaderNamespace: "task",
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/routes/task/index.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/routes/task/index.js b/tez-ui2/src/main/webapp/app/routes/task/index.js
index a2d5d33..086e0cc 100644
--- a/tez-ui2/src/main/webapp/app/routes/task/index.js
+++ b/tez-ui2/src/main/webapp/app/routes/task/index.js
@@ -17,9 +17,9 @@
*/
import Ember from 'ember';
-import AbstractRoute from '../abstract';
+import SingleAmPollsterRoute from '../single-am-pollster';
-export default AbstractRoute.extend({
+export default SingleAmPollsterRoute.extend({
title: "DAG Details",
loaderNamespace: "task",
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/routes/vertex/attempts.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/routes/vertex/attempts.js b/tez-ui2/src/main/webapp/app/routes/vertex/attempts.js
index aa0a83d..b0b33b2 100644
--- a/tez-ui2/src/main/webapp/app/routes/vertex/attempts.js
+++ b/tez-ui2/src/main/webapp/app/routes/vertex/attempts.js
@@ -17,9 +17,9 @@
*/
import Ember from 'ember';
-import AbstractRoute from '../abstract';
+import MultiAmPollsterRoute from '../multi-am-pollster';
-export default AbstractRoute.extend({
+export default MultiAmPollsterRoute.extend({
title: "Task Attempts",
loaderNamespace: "vertex",
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/routes/vertex/counters.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/routes/vertex/counters.js b/tez-ui2/src/main/webapp/app/routes/vertex/counters.js
index bb5a9ce..d7cae37 100644
--- a/tez-ui2/src/main/webapp/app/routes/vertex/counters.js
+++ b/tez-ui2/src/main/webapp/app/routes/vertex/counters.js
@@ -17,9 +17,9 @@
*/
import Ember from 'ember';
-import AbstractRoute from '../abstract';
+import SingleAmPollsterRoute from '../single-am-pollster';
-export default AbstractRoute.extend({
+export default SingleAmPollsterRoute.extend({
title: "DAG Details",
loaderNamespace: "vertex",
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/routes/vertex/index.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/routes/vertex/index.js b/tez-ui2/src/main/webapp/app/routes/vertex/index.js
index bb5a9ce..d7cae37 100644
--- a/tez-ui2/src/main/webapp/app/routes/vertex/index.js
+++ b/tez-ui2/src/main/webapp/app/routes/vertex/index.js
@@ -17,9 +17,9 @@
*/
import Ember from 'ember';
-import AbstractRoute from '../abstract';
+import SingleAmPollsterRoute from '../single-am-pollster';
-export default AbstractRoute.extend({
+export default SingleAmPollsterRoute.extend({
title: "DAG Details",
loaderNamespace: "vertex",
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/routes/vertex/tasks.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/routes/vertex/tasks.js b/tez-ui2/src/main/webapp/app/routes/vertex/tasks.js
index f392343..25e0f4b 100644
--- a/tez-ui2/src/main/webapp/app/routes/vertex/tasks.js
+++ b/tez-ui2/src/main/webapp/app/routes/vertex/tasks.js
@@ -17,9 +17,9 @@
*/
import Ember from 'ember';
-import AbstractRoute from '../abstract';
+import MultiAmPollsterRoute from '../multi-am-pollster';
-export default AbstractRoute.extend({
+export default MultiAmPollsterRoute.extend({
title: "All Tasks",
loaderNamespace: "vertex",
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/serializers/am.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/serializers/am.js b/tez-ui2/src/main/webapp/app/serializers/am.js
new file mode 100644
index 0000000..f9c5848
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/serializers/am.js
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import LoaderSerializer from './loader';
+
+export default LoaderSerializer.extend({
+ primaryKey: 'id',
+
+ payloadNamespace: null, // Must be set by inheriting classes
+
+ extractSinglePayload: function (rawPayload) {
+ return rawPayload[this.get("payloadNamespace")][0];
+ },
+ extractArrayPayload: function(rawPayload) {
+ return rawPayload[this.get("payloadNamespace")];
+ },
+
+ maps: {
+ entityID: 'id',
+
+ status: 'status',
+ progress: 'progress',
+
+ counterGroupsHash: 'counters'
+ }
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/serializers/app-rm.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/serializers/app-rm.js b/tez-ui2/src/main/webapp/app/serializers/app-rm.js
new file mode 100644
index 0000000..37166c3
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/serializers/app-rm.js
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import Ember from 'ember';
+
+import RMSerializer from './rm';
+
+export default RMSerializer.extend({
+
+ extractSinglePayload: function (rawPayload) {
+ return Ember.get(rawPayload, "app");
+ },
+
+ extractArrayPayload: function(rawPayload) {
+ return Ember.get(rawPayload, "apps.app");
+ },
+
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/serializers/attempt-am.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/serializers/attempt-am.js b/tez-ui2/src/main/webapp/app/serializers/attempt-am.js
new file mode 100644
index 0000000..277a0d5
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/serializers/attempt-am.js
@@ -0,0 +1,23 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import AMSerializer from './am';
+
+export default AMSerializer.extend({
+ payloadNamespace: "attempts"
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/serializers/dag-am.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/serializers/dag-am.js b/tez-ui2/src/main/webapp/app/serializers/dag-am.js
new file mode 100644
index 0000000..510d6f1
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/serializers/dag-am.js
@@ -0,0 +1,28 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import AMSerializer from './am';
+
+export default AMSerializer.extend({
+ extractSinglePayload: function (rawPayload) {
+ return rawPayload.dag;
+ },
+ extractArrayPayload: function(rawPayload) {
+ return rawPayload.dag;
+ },
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/serializers/loader.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/serializers/loader.js b/tez-ui2/src/main/webapp/app/serializers/loader.js
index 82899f6..102f4e9 100644
--- a/tez-ui2/src/main/webapp/app/serializers/loader.js
+++ b/tez-ui2/src/main/webapp/app/serializers/loader.js
@@ -42,6 +42,7 @@ function mapObject(hash, map) {
export default DS.JSONSerializer.extend({
_isLoader: true,
+ mergedProperties: ["maps"],
maps: null,
extractId: function (modelClass, resourceHash) {
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/serializers/rm.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/serializers/rm.js b/tez-ui2/src/main/webapp/app/serializers/rm.js
new file mode 100644
index 0000000..fbb91c3
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/serializers/rm.js
@@ -0,0 +1,28 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import LoaderSerializer from './loader';
+
+export default LoaderSerializer.extend({
+ primaryKey: 'id',
+
+ maps: {
+ entityID: 'id',
+ status: 'state',
+ }
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/serializers/task-am.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/serializers/task-am.js b/tez-ui2/src/main/webapp/app/serializers/task-am.js
new file mode 100644
index 0000000..129f5e0
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/serializers/task-am.js
@@ -0,0 +1,23 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import AMSerializer from './am';
+
+export default AMSerializer.extend({
+ payloadNamespace: "tasks"
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/serializers/timeline.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/serializers/timeline.js b/tez-ui2/src/main/webapp/app/serializers/timeline.js
index 7e20317..2f6a0d5 100644
--- a/tez-ui2/src/main/webapp/app/serializers/timeline.js
+++ b/tez-ui2/src/main/webapp/app/serializers/timeline.js
@@ -21,8 +21,6 @@ import LoaderSerializer from './loader';
export default LoaderSerializer.extend({
primaryKey: 'entity',
- mergedProperties: ["maps"],
-
extractArrayPayload: function (payload) {
return payload.entities;
},
@@ -35,6 +33,6 @@ export default LoaderSerializer.extend({
startTime: 'otherinfo.startTime',
endTime: 'otherinfo.endTime',
- counterGroups: 'otherinfo.counters.counterGroups'
+ _counterGroups: 'otherinfo.counters.counterGroups'
}
});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/serializers/vertex-am.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/serializers/vertex-am.js b/tez-ui2/src/main/webapp/app/serializers/vertex-am.js
new file mode 100644
index 0000000..163cf5c
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/serializers/vertex-am.js
@@ -0,0 +1,23 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import AMSerializer from './am';
+
+export default AMSerializer.extend({
+ payloadNamespace: "vertices"
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/services/hosts.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/services/hosts.js b/tez-ui2/src/main/webapp/app/services/hosts.js
index a3dc1f3..0da7fe5 100644
--- a/tez-ui2/src/main/webapp/app/services/hosts.js
+++ b/tez-ui2/src/main/webapp/app/services/hosts.js
@@ -63,4 +63,8 @@ export default Ember.Service.extend({
return this.normalizeURL(this.get("env.app.hosts.rm"));
}),
+ am: Ember.computed(function () {
+ return this.normalizeURL(this.get("env.app.hosts.rm"));
+ }),
+
});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/services/loader.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/services/loader.js b/tez-ui2/src/main/webapp/app/services/loader.js
index 92758e3..0fd44d2 100644
--- a/tez-ui2/src/main/webapp/app/services/loader.js
+++ b/tez-ui2/src/main/webapp/app/services/loader.js
@@ -54,17 +54,17 @@ export default Ember.Service.extend({
);
},
- lookup: function (type, name) {
+ lookup: function (type, name, options) {
name = Ember.String.dasherize(name);
- return this.get("container").lookup(type + ":" + name);
+ return this.get("container").lookup(type + ":" + name, options);
},
entityFor: function (entityName) {
var entity = this.lookup("entitie", entityName);
if(!entity) {
- entity = this.lookup("entitie", "entity");
+ entity = this.lookup("entitie", "entity", { singleton: false });
+ entity.set("name", entityName);
}
- entity.name = entityName;
return entity;
},
@@ -78,68 +78,61 @@ export default Ember.Service.extend({
parts.push(JSON.stringify(query));
}
- return parts.join(":");
+ return parts.join(":").replace(/\./g, ":");
+ },
+
+ loadNeed: function (record, needName, options, queryParams, urlParams) {
+ var entity = this.entityFor(record.get("constructor.modelName"));
+ return entity.loadNeed(this, record, needName, options, queryParams, urlParams);
+ },
+
+ normalizeOptions: function (options) {
+ options = options || {};
+
+ if(!options.cache){
+ options = Ember.$.extend({}, options);
+ options.cache = options.reload ? Ember.Object.create() : this.get("cache");
+ }
+
+ return options;
},
queryRecord: function(type, id, options, query, urlParams) {
var entity = this.entityFor(type),
- cache = this.get("cache"),
cacheKey = this.getCacheKey(type, query, id),
- that = this,
record;
this.checkRequisite(type);
- options = options || {};
- if(!options.reload) {
- record = cache.get(cacheKey);
- if(record) {
- return record;
- }
+ options = this.normalizeOptions(options);
+
+ record = options.cache.get(cacheKey);
+ if(record) {
+ return record;
}
- record = this.get('store').queryRecord(type, {
- id: id,
- nameSpace: this.get('nameSpace'),
- params: query,
- urlParams: urlParams
- }).then(function (record) {
- return entity.loadRelations(that, record, options, urlParams);
- });
+ record = entity.queryRecord(this, id, options, query, urlParams);
+ options.cache.set(cacheKey, record);
- cache.set(cacheKey, record);
return record;
},
query: function(type, query, options, urlParams) {
var entity = this.entityFor(type),
- cache = this.get("cache"),
cacheKey = this.getCacheKey(type, query),
- that = this,
records;
this.checkRequisite(type);
- options = options || {};
- if(!options.reload) {
- records = cache.get(cacheKey);
- if(records) {
- return records;
- }
+ options = this.normalizeOptions(options);
+
+ records = options.cache.get(cacheKey);
+ if(records) {
+ return records;
}
- records = this.get('store').query(type, {
- nameSpace: this.get('nameSpace'),
- params: query,
- urlParams: urlParams
- }).then(function (records) {
- return Ember.RSVP.all(records.map(function (record) {
- return entity.loadRelations(that, record, options, urlParams);
- })).then(function () {
- return records;
- });
- });
-
- cache.set(cacheKey, records);
+ records = entity.query(this, query, options, urlParams);
+ options.cache.set(cacheKey, records);
+
return records;
}
});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/services/pollster.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/services/pollster.js b/tez-ui2/src/main/webapp/app/services/pollster.js
new file mode 100644
index 0000000..8e76bc9
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/services/pollster.js
@@ -0,0 +1,83 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import Ember from 'ember';
+
+const STATE_STORAGE_KEY = "pollingIsActive";
+
+export default Ember.Service.extend({
+ localStorage: Ember.inject.service("localStorage"),
+ env: Ember.inject.service("env"),
+
+ interval: Ember.computed.oneWay("env.app.pollingInterval"),
+
+ active: false,
+ isPolling: false,
+ scheduleID: null,
+
+ poll: null,
+ pollContext: null,
+
+ initState: Ember.on("init", function () {
+ Ember.run.later(this, function () {
+ this.set("active", this.get("localStorage").get(STATE_STORAGE_KEY));
+ });
+ }),
+ stateObserver: Ember.observer("active", function () {
+ this.get("localStorage").set(STATE_STORAGE_KEY, this.get("active"));
+ this.callPoll();
+ }),
+
+ isReady: Ember.computed("active", "poll", function () {
+ return this.get("active") && this.get("poll");
+ }),
+
+ callPoll: function () {
+ var that = this;
+ this.unSchedulePoll();
+ if(this.get("isReady") && !this.get("isPolling")) {
+ this.set("isPolling", true);
+ this.get("poll").call(this.get("pollContext")).finally(function () {
+ that.set("isPolling", false);
+ that.schedulePoll();
+ });
+ }
+ },
+
+ schedulePoll: function () {
+ this.set("scheduleID", setTimeout(this.callPoll.bind(this), this.get("interval")));
+ },
+ unSchedulePoll: function () {
+ clearTimeout(this.get("scheduleID"));
+ },
+
+ setPoll: function (pollFunction, context) {
+ this.setProperties({
+ pollContext: context,
+ poll: pollFunction,
+ });
+ this.callPoll();
+ },
+ resetPoll: function () {
+ this.unSchedulePoll();
+ this.setProperties({
+ poll: null,
+ pollContext: null
+ });
+ }
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/templates/app.hbs
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/templates/app.hbs b/tez-ui2/src/main/webapp/app/templates/app.hbs
index 80ec4f4..8906371 100644
--- a/tez-ui2/src/main/webapp/app/templates/app.hbs
+++ b/tez-ui2/src/main/webapp/app/templates/app.hbs
@@ -16,5 +16,5 @@
* limitations under the License.
}}
-{{tab-n-refresh tabs=tabs loadTime=loadTime}}
+{{tab-n-refresh tabs=tabs loadTime=loadTime autoRefreshEnabled=polling.active}}
{{outlet}}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/templates/app/dags.hbs
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/templates/app/dags.hbs b/tez-ui2/src/main/webapp/app/templates/app/dags.hbs
index 57cfe86..d36678a 100644
--- a/tez-ui2/src/main/webapp/app/templates/app/dags.hbs
+++ b/tez-ui2/src/main/webapp/app/templates/app/dags.hbs
@@ -27,8 +27,10 @@
searchAction="searchChanged"
sortAction="sortChanged"
- rowAction="rowsChanged"
+ rowAction="rowCountChanged"
pageAction="pageChanged"
+
+ rowsChanged="rowsChanged"
}}
{{else}}
{{partial "loading"}}
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/templates/attempt.hbs
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/templates/attempt.hbs b/tez-ui2/src/main/webapp/app/templates/attempt.hbs
index 80ec4f4..8906371 100644
--- a/tez-ui2/src/main/webapp/app/templates/attempt.hbs
+++ b/tez-ui2/src/main/webapp/app/templates/attempt.hbs
@@ -16,5 +16,5 @@
* limitations under the License.
}}
-{{tab-n-refresh tabs=tabs loadTime=loadTime}}
+{{tab-n-refresh tabs=tabs loadTime=loadTime autoRefreshEnabled=polling.active}}
{{outlet}}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/templates/attempt/counters.hbs
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/templates/attempt/counters.hbs b/tez-ui2/src/main/webapp/app/templates/attempt/counters.hbs
index aa4c127..649cfe2 100644
--- a/tez-ui2/src/main/webapp/app/templates/attempt/counters.hbs
+++ b/tez-ui2/src/main/webapp/app/templates/attempt/counters.hbs
@@ -21,7 +21,7 @@
columns=columns
rows=counters
- rowCount=counters.length
+ rowCount=countersCount
definition=definition
enablePagination=false
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/templates/attempt/index.hbs
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/templates/attempt/index.hbs b/tez-ui2/src/main/webapp/app/templates/attempt/index.hbs
index 9edaacd..1d77e25 100644
--- a/tez-ui2/src/main/webapp/app/templates/attempt/index.hbs
+++ b/tez-ui2/src/main/webapp/app/templates/attempt/index.hbs
@@ -42,9 +42,11 @@
</tr>
<tr>
<td>Status</td>
- <td>
- {{em-table-status-cell content=model.status}}
- </td>
+ <td>{{em-table-status-cell content=model.status}}</td>
+ </tr>
+ <tr>
+ <td>Progress</td>
+ <td>{{em-table-progress-cell content=model.progress}}</td>
</tr>
<tr>
<td>Start Time</td>
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/templates/components/tab-n-refresh.hbs
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/templates/components/tab-n-refresh.hbs b/tez-ui2/src/main/webapp/app/templates/components/tab-n-refresh.hbs
index 9b6a594..9d80c6a 100644
--- a/tez-ui2/src/main/webapp/app/templates/components/tab-n-refresh.hbs
+++ b/tez-ui2/src/main/webapp/app/templates/components/tab-n-refresh.hbs
@@ -26,13 +26,13 @@
{{/each}}
<span class="refresh-ui">
<span class="text-elements">
- <span class="auto-refresh {{unless autoRefreshEnabled 'no-visible'}}">
- {{input type="checkbox" name="autoEnabled" checked=autoEnabled}}
+ <span class="auto-refresh {{unless autoRefreshVisible 'no-visible'}}">
+ {{input type="checkbox" name="autoEnabled" checked=autoRefreshEnabled}}
Auto Refresh
<br/>
</span>
{{#if loadTime}}
- Last refreshed at <b>{{txt loadTime type="date" format="DD MMM YYYY HH:mm:ss"}}</b>
+ Last refreshed at <b>{{txt loadTime type="date"}}</b>
{{else}}
Load time not available!
{{/if}}
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/templates/dag.hbs
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/templates/dag.hbs b/tez-ui2/src/main/webapp/app/templates/dag.hbs
index 80ec4f4..8906371 100644
--- a/tez-ui2/src/main/webapp/app/templates/dag.hbs
+++ b/tez-ui2/src/main/webapp/app/templates/dag.hbs
@@ -16,5 +16,5 @@
* limitations under the License.
}}
-{{tab-n-refresh tabs=tabs loadTime=loadTime}}
+{{tab-n-refresh tabs=tabs loadTime=loadTime autoRefreshEnabled=polling.active}}
{{outlet}}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/templates/dag/attempts.hbs
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/templates/dag/attempts.hbs b/tez-ui2/src/main/webapp/app/templates/dag/attempts.hbs
index 57cfe86..d36678a 100644
--- a/tez-ui2/src/main/webapp/app/templates/dag/attempts.hbs
+++ b/tez-ui2/src/main/webapp/app/templates/dag/attempts.hbs
@@ -27,8 +27,10 @@
searchAction="searchChanged"
sortAction="sortChanged"
- rowAction="rowsChanged"
+ rowAction="rowCountChanged"
pageAction="pageChanged"
+
+ rowsChanged="rowsChanged"
}}
{{else}}
{{partial "loading"}}
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/templates/dag/counters.hbs
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/templates/dag/counters.hbs b/tez-ui2/src/main/webapp/app/templates/dag/counters.hbs
index aa4c127..649cfe2 100644
--- a/tez-ui2/src/main/webapp/app/templates/dag/counters.hbs
+++ b/tez-ui2/src/main/webapp/app/templates/dag/counters.hbs
@@ -21,7 +21,7 @@
columns=columns
rows=counters
- rowCount=counters.length
+ rowCount=countersCount
definition=definition
enablePagination=false
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/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 2f4a214..b81194f 100644
--- a/tez-ui2/src/main/webapp/app/templates/dag/index.hbs
+++ b/tez-ui2/src/main/webapp/app/templates/dag/index.hbs
@@ -50,6 +50,10 @@
<td>{{em-table-status-cell content=model.status}}</td>
</tr>
<tr>
+ <td>Progress</td>
+ <td>{{em-table-progress-cell content=model.progress}}</td>
+ </tr>
+ <tr>
<td>Start Time</td>
<td>{{txt model.startTime type="date"}}</td>
</tr>
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/templates/dag/tasks.hbs
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/templates/dag/tasks.hbs b/tez-ui2/src/main/webapp/app/templates/dag/tasks.hbs
index 57cfe86..d36678a 100644
--- a/tez-ui2/src/main/webapp/app/templates/dag/tasks.hbs
+++ b/tez-ui2/src/main/webapp/app/templates/dag/tasks.hbs
@@ -27,8 +27,10 @@
searchAction="searchChanged"
sortAction="sortChanged"
- rowAction="rowsChanged"
+ rowAction="rowCountChanged"
pageAction="pageChanged"
+
+ rowsChanged="rowsChanged"
}}
{{else}}
{{partial "loading"}}
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/templates/dag/vertices.hbs
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/templates/dag/vertices.hbs b/tez-ui2/src/main/webapp/app/templates/dag/vertices.hbs
index 57cfe86..d36678a 100644
--- a/tez-ui2/src/main/webapp/app/templates/dag/vertices.hbs
+++ b/tez-ui2/src/main/webapp/app/templates/dag/vertices.hbs
@@ -27,8 +27,10 @@
searchAction="searchChanged"
sortAction="sortChanged"
- rowAction="rowsChanged"
+ rowAction="rowCountChanged"
pageAction="pageChanged"
+
+ rowsChanged="rowsChanged"
}}
{{else}}
{{partial "loading"}}
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/templates/dags.hbs
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/templates/dags.hbs b/tez-ui2/src/main/webapp/app/templates/dags.hbs
index 56621e9..cb75f26 100644
--- a/tez-ui2/src/main/webapp/app/templates/dags.hbs
+++ b/tez-ui2/src/main/webapp/app/templates/dags.hbs
@@ -16,7 +16,7 @@
* limitations under the License.
}}
-{{tab-n-refresh tabs=tabs autoRefreshEnabled=false loadTime=loadTime}}
+{{tab-n-refresh tabs=tabs autoRefreshVisible=false loadTime=loadTime}}
{{#if loaded}}
{{em-table
@@ -33,7 +33,7 @@
searchAction="searchChanged"
sortAction="sortChanged"
- rowAction="rowsChanged"
+ rowAction="rowCountChanged"
pageAction="pageChanged"
}}
{{else}}
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/templates/task.hbs
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/templates/task.hbs b/tez-ui2/src/main/webapp/app/templates/task.hbs
index 80ec4f4..8906371 100644
--- a/tez-ui2/src/main/webapp/app/templates/task.hbs
+++ b/tez-ui2/src/main/webapp/app/templates/task.hbs
@@ -16,5 +16,5 @@
* limitations under the License.
}}
-{{tab-n-refresh tabs=tabs loadTime=loadTime}}
+{{tab-n-refresh tabs=tabs loadTime=loadTime autoRefreshEnabled=polling.active}}
{{outlet}}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/templates/task/attempts.hbs
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/templates/task/attempts.hbs b/tez-ui2/src/main/webapp/app/templates/task/attempts.hbs
index 57cfe86..d36678a 100644
--- a/tez-ui2/src/main/webapp/app/templates/task/attempts.hbs
+++ b/tez-ui2/src/main/webapp/app/templates/task/attempts.hbs
@@ -27,8 +27,10 @@
searchAction="searchChanged"
sortAction="sortChanged"
- rowAction="rowsChanged"
+ rowAction="rowCountChanged"
pageAction="pageChanged"
+
+ rowsChanged="rowsChanged"
}}
{{else}}
{{partial "loading"}}
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/templates/task/counters.hbs
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/templates/task/counters.hbs b/tez-ui2/src/main/webapp/app/templates/task/counters.hbs
index aa4c127..649cfe2 100644
--- a/tez-ui2/src/main/webapp/app/templates/task/counters.hbs
+++ b/tez-ui2/src/main/webapp/app/templates/task/counters.hbs
@@ -21,7 +21,7 @@
columns=columns
rows=counters
- rowCount=counters.length
+ rowCount=countersCount
definition=definition
enablePagination=false
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/templates/task/index.hbs
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/templates/task/index.hbs b/tez-ui2/src/main/webapp/app/templates/task/index.hbs
index ee6b0c6..b9d98c8 100644
--- a/tez-ui2/src/main/webapp/app/templates/task/index.hbs
+++ b/tez-ui2/src/main/webapp/app/templates/task/index.hbs
@@ -34,9 +34,11 @@
</tr>
<tr>
<td>Status</td>
- <td>
- {{em-table-status-cell content=model.status}}
- </td>
+ <td>{{em-table-status-cell content=model.status}}</td>
+ </tr>
+ <tr>
+ <td>Progress</td>
+ <td>{{em-table-progress-cell content=model.progress}}</td>
</tr>
<tr>
<td>Start Time</td>
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/templates/vertex.hbs
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/templates/vertex.hbs b/tez-ui2/src/main/webapp/app/templates/vertex.hbs
index 80ec4f4..8906371 100644
--- a/tez-ui2/src/main/webapp/app/templates/vertex.hbs
+++ b/tez-ui2/src/main/webapp/app/templates/vertex.hbs
@@ -16,5 +16,5 @@
* limitations under the License.
}}
-{{tab-n-refresh tabs=tabs loadTime=loadTime}}
+{{tab-n-refresh tabs=tabs loadTime=loadTime autoRefreshEnabled=polling.active}}
{{outlet}}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/templates/vertex/attempts.hbs
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/templates/vertex/attempts.hbs b/tez-ui2/src/main/webapp/app/templates/vertex/attempts.hbs
index 57cfe86..d36678a 100644
--- a/tez-ui2/src/main/webapp/app/templates/vertex/attempts.hbs
+++ b/tez-ui2/src/main/webapp/app/templates/vertex/attempts.hbs
@@ -27,8 +27,10 @@
searchAction="searchChanged"
sortAction="sortChanged"
- rowAction="rowsChanged"
+ rowAction="rowCountChanged"
pageAction="pageChanged"
+
+ rowsChanged="rowsChanged"
}}
{{else}}
{{partial "loading"}}
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/templates/vertex/counters.hbs
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/templates/vertex/counters.hbs b/tez-ui2/src/main/webapp/app/templates/vertex/counters.hbs
index aa4c127..649cfe2 100644
--- a/tez-ui2/src/main/webapp/app/templates/vertex/counters.hbs
+++ b/tez-ui2/src/main/webapp/app/templates/vertex/counters.hbs
@@ -21,7 +21,7 @@
columns=columns
rows=counters
- rowCount=counters.length
+ rowCount=countersCount
definition=definition
enablePagination=false
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/templates/vertex/index.hbs
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/templates/vertex/index.hbs b/tez-ui2/src/main/webapp/app/templates/vertex/index.hbs
index 153d583..eb3a477 100644
--- a/tez-ui2/src/main/webapp/app/templates/vertex/index.hbs
+++ b/tez-ui2/src/main/webapp/app/templates/vertex/index.hbs
@@ -53,6 +53,10 @@
<td>{{em-table-status-cell content=model.status}}</td>
</tr>
<tr>
+ <td>Progress</td>
+ <td>{{em-table-progress-cell content=model.progress}}</td>
+ </tr>
+ <tr>
<td>Start Time</td>
<td>{{txt model.startTime type="date"}}</td>
</tr>
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/templates/vertex/tasks.hbs
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/templates/vertex/tasks.hbs b/tez-ui2/src/main/webapp/app/templates/vertex/tasks.hbs
index 57cfe86..d36678a 100644
--- a/tez-ui2/src/main/webapp/app/templates/vertex/tasks.hbs
+++ b/tez-ui2/src/main/webapp/app/templates/vertex/tasks.hbs
@@ -27,8 +27,10 @@
searchAction="searchChanged"
sortAction="sortChanged"
- rowAction="rowsChanged"
+ rowAction="rowCountChanged"
pageAction="pageChanged"
+
+ rowsChanged="rowsChanged"
}}
{{else}}
{{partial "loading"}}
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/utils/counter-column-definition.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/utils/counter-column-definition.js b/tez-ui2/src/main/webapp/app/utils/counter-column-definition.js
index be36053..d66e551 100644
--- a/tez-ui2/src/main/webapp/app/utils/counter-column-definition.js
+++ b/tez-ui2/src/main/webapp/app/utils/counter-column-definition.js
@@ -43,7 +43,7 @@ var CounterColumnDefinition = ColumnDefinition.extend({
counterGroupName: "",
observePath: true,
- contentPath: "counterHash",
+ contentPath: "counterGroupsHash",
getCellContent: getCounterContent,
getSearchValue: getCounterContent,
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/config/default-app-conf.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/config/default-app-conf.js b/tez-ui2/src/main/webapp/config/default-app-conf.js
index 200dc14..084e9b7 100644
--- a/tez-ui2/src/main/webapp/config/default-app-conf.js
+++ b/tez-ui2/src/main/webapp/config/default-app-conf.js
@@ -20,6 +20,8 @@ module.exports = { // Tez App configurations
buildVersion: "",
isStandalone: true, // Must be set false while running in wrapped mode
rowLoadLimit: 9007199254740991,
+ pollingInterval: 3000,
+
hosts: {
timeline: 'localhost:8188',
rm: 'localhost:8088',
@@ -29,7 +31,7 @@ module.exports = { // Tez App configurations
timeline: 'ws/v1/timeline',
appHistory: 'ws/v1/applicationhistory',
rm: 'ws/v1/cluster',
- am: 'proxy/{app_id}/ws/v{version}/tez',
+ am: 'proxy/{app_id}/ws/v2/tez',
},
web: {
rm: 'cluster'
@@ -45,6 +47,15 @@ module.exports = { // Tez App configurations
hiveQuery: 'HIVE_QUERY_ID',
app: 'TEZ_APPLICATION'
+ },
+ am: {
+ "dag-am": 'dagInfo',
+ "vertex-am": 'verticesInfo',
+ "task-am": 'tasksInfo',
+ "attempt-am": 'attemptsInfo',
+ },
+ rm: {
+ "app-rm": "apps"
}
},
hrefs: {
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/package.json
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/package.json b/tez-ui2/src/main/webapp/package.json
index f484913..9cb055b 100644
--- a/tez-ui2/src/main/webapp/package.json
+++ b/tez-ui2/src/main/webapp/package.json
@@ -49,7 +49,7 @@
"dependencies": {
"broccoli-funnel": "^1.0.1",
"em-helpers": "0.5.8",
- "em-table": "0.3.8",
+ "em-table": "0.3.9",
"ember-cli-htmlbars": "^1.0.1",
"ember-cli-less": "^1.4.0",
"phantomjs": "^1.9.19"
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/adapters/am-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/adapters/am-test.js b/tez-ui2/src/main/webapp/tests/unit/adapters/am-test.js
index a452467..676656b 100644
--- a/tez-ui2/src/main/webapp/tests/unit/adapters/am-test.js
+++ b/tez-ui2/src/main/webapp/tests/unit/adapters/am-test.js
@@ -28,4 +28,23 @@ test('Basic creation test', function(assert) {
assert.ok(adapter);
assert.equal(adapter.serverName, "am");
+
+ assert.ok(adapter.queryRecord);
+});
+
+test('queryRecord test', function(assert) {
+ let testStore = {},
+ testType = {},
+ testQuery = {},
+
+ adapter = this.subject({
+ query: function (store, type, query) {
+ assert.equal(store, testStore);
+ assert.equal(type, testType);
+ assert.equal(query, testQuery);
+ }
+ });
+
+ assert.expect(3);
+ adapter.queryRecord(testStore, testType, testQuery);
});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/adapters/app-rm-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/adapters/app-rm-test.js b/tez-ui2/src/main/webapp/tests/unit/adapters/app-rm-test.js
new file mode 100644
index 0000000..942b2db
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/adapters/app-rm-test.js
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('adapter:app-rm', 'Unit | Adapter | app rm', {
+ // Specify the other units that are required for this test.
+ // needs: ['serializer:foo']
+});
+
+test('Basic creation test', function(assert) {
+ let adapter = this.subject();
+ assert.ok(adapter);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/adapters/attempt-am-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/adapters/attempt-am-test.js b/tez-ui2/src/main/webapp/tests/unit/adapters/attempt-am-test.js
new file mode 100644
index 0000000..43c8e4a
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/adapters/attempt-am-test.js
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('adapter:attempt-am', 'Unit | Adapter | attempt am', {
+ // Specify the other units that are required for this test.
+ // needs: ['serializer:foo']
+});
+
+test('Basic creation test', function(assert) {
+ let adapter = this.subject();
+ assert.ok(adapter);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/adapters/dag-am-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/adapters/dag-am-test.js b/tez-ui2/src/main/webapp/tests/unit/adapters/dag-am-test.js
new file mode 100644
index 0000000..b0d3fa9
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/adapters/dag-am-test.js
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('adapter:dag-am', 'Unit | Adapter | dag am', {
+ // Specify the other units that are required for this test.
+ // needs: ['serializer:foo']
+});
+
+test('Basic creation test', function(assert) {
+ let adapter = this.subject();
+ assert.ok(adapter);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/adapters/task-am-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/adapters/task-am-test.js b/tez-ui2/src/main/webapp/tests/unit/adapters/task-am-test.js
new file mode 100644
index 0000000..a3eb98b
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/adapters/task-am-test.js
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('adapter:task-am', 'Unit | Adapter | task am', {
+ // Specify the other units that are required for this test.
+ // needs: ['serializer:foo']
+});
+
+test('Basic creation test', function(assert) {
+ let adapter = this.subject();
+ assert.ok(adapter);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/adapters/vertex-am-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/adapters/vertex-am-test.js b/tez-ui2/src/main/webapp/tests/unit/adapters/vertex-am-test.js
new file mode 100644
index 0000000..6e29aef
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/adapters/vertex-am-test.js
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('adapter:vertex-am', 'Unit | Adapter | vertex am', {
+ // Specify the other units that are required for this test.
+ // needs: ['serializer:foo']
+});
+
+test('Basic creation test', function(assert) {
+ let adapter = this.subject();
+ assert.ok(adapter);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/controllers/abstract-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/controllers/abstract-test.js b/tez-ui2/src/main/webapp/tests/unit/controllers/abstract-test.js
index 9cde1e7..9603b50 100644
--- a/tez-ui2/src/main/webapp/tests/unit/controllers/abstract-test.js
+++ b/tez-ui2/src/main/webapp/tests/unit/controllers/abstract-test.js
@@ -34,6 +34,7 @@ test('Basic creation test', function(assert) {
assert.ok(controller.name);
assert.ok(controller.crumbObserver);
assert.ok(controller.setBreadcrumbs);
+ assert.ok(controller.loaded);
});
test('init test', function(assert) {
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/controllers/app/dags-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/controllers/app/dags-test.js b/tez-ui2/src/main/webapp/tests/unit/controllers/app/dags-test.js
index 25afc63..402b629 100644
--- a/tez-ui2/src/main/webapp/tests/unit/controllers/app/dags-test.js
+++ b/tez-ui2/src/main/webapp/tests/unit/controllers/app/dags-test.js
@@ -28,7 +28,8 @@ moduleFor('controller:app/dags', 'Unit | Controller | app/dags', {
test('Basic creation test', function(assert) {
let controller = this.subject({
send: Ember.K,
- initVisibleColumns: Ember.K
+ initVisibleColumns: Ember.K,
+ getCounterColumns: Ember.K
});
assert.ok(controller);
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/tests/unit/controllers/counters-page-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/controllers/counters-page-test.js b/tez-ui2/src/main/webapp/tests/unit/controllers/counters-page-test.js
deleted file mode 100644
index 6faad2d..0000000
--- a/tez-ui2/src/main/webapp/tests/unit/controllers/counters-page-test.js
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import Ember from 'ember';
-
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('controller:counters-page', 'Unit | Controller | counters page', {
- // Specify the other units that are required for this test.
- // needs: ['controller:foo']
-});
-
-test('Basic creation test', function(assert) {
- let controller = this.subject({
- send: Ember.K,
- initVisibleColumns: Ember.K
- });
-
- assert.ok(controller);
- assert.ok(controller.columns);
- assert.ok(controller.counters);
-});
-
-test('counters test', function(assert) {
- let controller = this.subject({
- send: Ember.K,
- initVisibleColumns: Ember.K,
- model: {
- counterGroups: [{
- counterGroupName: "a.b.foo",
- counters: [{
- counterName: "Foo Name 1",
- counterValue: "Value 1"
- },{
- counterName: "Foo Name 2",
- counterValue: "Value 2"
- },{
- counterName: "Foo Name 3",
- counterValue: "Value 3"
- },]
- },{
- counterGroupName: "a.b.bar",
- counters: [{
- counterName: "Bar Name 1",
- counterValue: "Value 1"
- },{
- counterName: "Bar Name 2",
- counterValue: "Value 2"
- },{
- counterName: "Bar Name 3",
- counterValue: "Value 3"
- },]
- }]
- }
- });
-
- assert.equal(controller.get("counters.0.groupName"), "foo");
- assert.equal(controller.get("counters.0.counterName"), "Foo Name 1");
- assert.equal(controller.get("counters.0.counterValue"), "Value 1");
-
- assert.equal(controller.get("counters.1.groupName"), "foo");
- assert.equal(controller.get("counters.1.counterName"), "Foo Name 2");
- assert.equal(controller.get("counters.1.counterValue"), "Value 2");
-
- assert.equal(controller.get("counters.2.groupName"), "foo");
- assert.equal(controller.get("counters.2.counterName"), "Foo Name 3");
- assert.equal(controller.get("counters.2.counterValue"), "Value 3");
-
-
- assert.equal(controller.get("counters.3.groupName"), "bar");
- assert.equal(controller.get("counters.3.counterName"), "Bar Name 1");
- assert.equal(controller.get("counters.3.counterValue"), "Value 1");
-
- assert.equal(controller.get("counters.4.groupName"), "bar");
- assert.equal(controller.get("counters.4.counterName"), "Bar Name 2");
- assert.equal(controller.get("counters.4.counterValue"), "Value 2");
-
- assert.equal(controller.get("counters.5.groupName"), "bar");
- assert.equal(controller.get("counters.5.counterName"), "Bar Name 3");
- assert.equal(controller.get("counters.5.counterValue"), "Value 3");
-});
-
[3/3] tez git commit: TEZ-3060. Tez UI 2: Activate auto-refresh (sree)
Posted by sr...@apache.org.
TEZ-3060. Tez UI 2: Activate auto-refresh (sree)
Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/6f366403
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/6f366403
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/6f366403
Branch: refs/heads/TEZ-2980
Commit: 6f366403d1a83ce34b3a546b42ce67be48ea9299
Parents: 852247b
Author: Sreenath Somarajapuram <sr...@apache.org>
Authored: Thu Jan 28 23:41:36 2016 +0530
Committer: Sreenath Somarajapuram <sr...@apache.org>
Committed: Thu Jan 28 23:41:36 2016 +0530
----------------------------------------------------------------------
TEZ-2980-CHANGES.txt | 1 +
tez-ui2/src/main/webapp/app/adapters/am.js | 4 +-
tez-ui2/src/main/webapp/app/adapters/app-rm.js | 22 +++
.../src/main/webapp/app/adapters/attempt-am.js | 22 +++
tez-ui2/src/main/webapp/app/adapters/dag-am.js | 22 +++
tez-ui2/src/main/webapp/app/adapters/loader.js | 2 +-
tez-ui2/src/main/webapp/app/adapters/task-am.js | 22 +++
.../src/main/webapp/app/adapters/vertex-am.js | 22 +++
.../main/webapp/app/components/tab-n-refresh.js | 7 +-
.../src/main/webapp/app/controllers/abstract.js | 7 +-
tez-ui2/src/main/webapp/app/controllers/app.js | 4 +-
.../main/webapp/app/controllers/app/configs.js | 4 +-
.../src/main/webapp/app/controllers/app/dags.js | 7 +-
.../src/main/webapp/app/controllers/attempt.js | 4 +-
.../webapp/app/controllers/attempt/counters.js | 4 +-
.../webapp/app/controllers/counters-page.js | 63 ---------
.../webapp/app/controllers/counters-table.js | 74 ++++++++++
tez-ui2/src/main/webapp/app/controllers/dag.js | 4 +-
.../main/webapp/app/controllers/dag/attempts.js | 7 +-
.../main/webapp/app/controllers/dag/counters.js | 4 +-
.../main/webapp/app/controllers/dag/tasks.js | 7 +-
.../main/webapp/app/controllers/dag/vertices.js | 7 +-
tez-ui2/src/main/webapp/app/controllers/dags.js | 7 +-
.../main/webapp/app/controllers/multi-table.js | 37 +++++
tez-ui2/src/main/webapp/app/controllers/page.js | 9 +-
.../src/main/webapp/app/controllers/parent.js | 30 ++++
.../main/webapp/app/controllers/table-page.js | 135 ------------------
.../src/main/webapp/app/controllers/table.js | 138 +++++++++++++++++++
tez-ui2/src/main/webapp/app/controllers/task.js | 6 +-
.../webapp/app/controllers/task/attempts.js | 7 +-
.../webapp/app/controllers/task/counters.js | 4 +-
.../src/main/webapp/app/controllers/vertex.js | 6 +-
.../webapp/app/controllers/vertex/attempts.js | 7 +-
.../webapp/app/controllers/vertex/counters.js | 4 +-
.../main/webapp/app/controllers/vertex/tasks.js | 7 +-
tez-ui2/src/main/webapp/app/entities/am.js | 58 ++++++++
.../src/main/webapp/app/entities/attempt-am.js | 23 ++++
tez-ui2/src/main/webapp/app/entities/entity.js | 138 ++++++++++++++-----
tez-ui2/src/main/webapp/app/entities/task-am.js | 23 ++++
.../src/main/webapp/app/entities/vertex-am.js | 23 ++++
.../main/webapp/app/initializers/entities.js | 1 +
.../webapp/app/mixins/auto-counter-column.js | 14 +-
tez-ui2/src/main/webapp/app/models/abstract.js | 21 +++
tez-ui2/src/main/webapp/app/models/ahs-app.js | 2 -
.../src/main/webapp/app/models/am-timeline.js | 46 +++++++
tez-ui2/src/main/webapp/app/models/am.js | 31 +++++
tez-ui2/src/main/webapp/app/models/app-rm.js | 22 +++
tez-ui2/src/main/webapp/app/models/app.js | 16 ---
.../src/main/webapp/app/models/attempt-am.js | 22 +++
tez-ui2/src/main/webapp/app/models/attempt.js | 53 +++----
tez-ui2/src/main/webapp/app/models/dag-am.js | 22 +++
tez-ui2/src/main/webapp/app/models/dag.js | 39 +++---
tez-ui2/src/main/webapp/app/models/rm.js | 26 ++++
tez-ui2/src/main/webapp/app/models/task-am.js | 22 +++
tez-ui2/src/main/webapp/app/models/task.js | 48 +++----
tez-ui2/src/main/webapp/app/models/timeline.js | 11 +-
tez-ui2/src/main/webapp/app/models/vertex-am.js | 22 +++
tez-ui2/src/main/webapp/app/models/vertex.js | 37 ++---
tez-ui2/src/main/webapp/app/router.js | 2 +
tez-ui2/src/main/webapp/app/routes/abstract.js | 7 +-
.../src/main/webapp/app/routes/am-pollster.js | 88 ++++++++++++
.../src/main/webapp/app/routes/app/configs.js | 6 +-
tez-ui2/src/main/webapp/app/routes/app/dags.js | 4 +-
tez-ui2/src/main/webapp/app/routes/app/index.js | 8 +-
.../src/main/webapp/app/routes/application.js | 5 +
tez-ui2/src/main/webapp/app/routes/attempt.js | 2 +-
.../main/webapp/app/routes/attempt/counters.js | 4 +-
.../src/main/webapp/app/routes/attempt/index.js | 4 +-
.../src/main/webapp/app/routes/dag/attempts.js | 4 +-
.../src/main/webapp/app/routes/dag/counters.js | 4 +-
tez-ui2/src/main/webapp/app/routes/dag/index.js | 4 +-
tez-ui2/src/main/webapp/app/routes/dag/tasks.js | 4 +-
.../src/main/webapp/app/routes/dag/vertices.js | 4 +-
tez-ui2/src/main/webapp/app/routes/dags.js | 6 +-
.../main/webapp/app/routes/multi-am-pollster.js | 35 +++++
tez-ui2/src/main/webapp/app/routes/pollster.js | 65 +++++++++
.../webapp/app/routes/single-am-pollster.js | 34 +++++
tez-ui2/src/main/webapp/app/routes/task.js | 2 +-
.../src/main/webapp/app/routes/task/attempts.js | 4 +-
.../src/main/webapp/app/routes/task/counters.js | 4 +-
.../src/main/webapp/app/routes/task/index.js | 4 +-
.../main/webapp/app/routes/vertex/attempts.js | 4 +-
.../main/webapp/app/routes/vertex/counters.js | 4 +-
.../src/main/webapp/app/routes/vertex/index.js | 4 +-
.../src/main/webapp/app/routes/vertex/tasks.js | 4 +-
tez-ui2/src/main/webapp/app/serializers/am.js | 41 ++++++
.../src/main/webapp/app/serializers/app-rm.js | 33 +++++
.../main/webapp/app/serializers/attempt-am.js | 23 ++++
.../src/main/webapp/app/serializers/dag-am.js | 28 ++++
.../src/main/webapp/app/serializers/loader.js | 1 +
tez-ui2/src/main/webapp/app/serializers/rm.js | 28 ++++
.../src/main/webapp/app/serializers/task-am.js | 23 ++++
.../src/main/webapp/app/serializers/timeline.js | 4 +-
.../main/webapp/app/serializers/vertex-am.js | 23 ++++
tez-ui2/src/main/webapp/app/services/hosts.js | 4 +
tez-ui2/src/main/webapp/app/services/loader.js | 79 +++++------
.../src/main/webapp/app/services/pollster.js | 83 +++++++++++
tez-ui2/src/main/webapp/app/templates/app.hbs | 2 +-
.../src/main/webapp/app/templates/app/dags.hbs | 4 +-
.../src/main/webapp/app/templates/attempt.hbs | 2 +-
.../webapp/app/templates/attempt/counters.hbs | 2 +-
.../main/webapp/app/templates/attempt/index.hbs | 8 +-
.../app/templates/components/tab-n-refresh.hbs | 6 +-
tez-ui2/src/main/webapp/app/templates/dag.hbs | 2 +-
.../main/webapp/app/templates/dag/attempts.hbs | 4 +-
.../main/webapp/app/templates/dag/counters.hbs | 2 +-
.../src/main/webapp/app/templates/dag/index.hbs | 4 +
.../src/main/webapp/app/templates/dag/tasks.hbs | 4 +-
.../main/webapp/app/templates/dag/vertices.hbs | 4 +-
tez-ui2/src/main/webapp/app/templates/dags.hbs | 4 +-
tez-ui2/src/main/webapp/app/templates/task.hbs | 2 +-
.../main/webapp/app/templates/task/attempts.hbs | 4 +-
.../main/webapp/app/templates/task/counters.hbs | 2 +-
.../main/webapp/app/templates/task/index.hbs | 8 +-
.../src/main/webapp/app/templates/vertex.hbs | 2 +-
.../webapp/app/templates/vertex/attempts.hbs | 4 +-
.../webapp/app/templates/vertex/counters.hbs | 2 +-
.../main/webapp/app/templates/vertex/index.hbs | 4 +
.../main/webapp/app/templates/vertex/tasks.hbs | 4 +-
.../app/utils/counter-column-definition.js | 2 +-
.../src/main/webapp/config/default-app-conf.js | 13 +-
tez-ui2/src/main/webapp/package.json | 2 +-
.../main/webapp/tests/unit/adapters/am-test.js | 19 +++
.../webapp/tests/unit/adapters/app-rm-test.js | 29 ++++
.../tests/unit/adapters/attempt-am-test.js | 29 ++++
.../webapp/tests/unit/adapters/dag-am-test.js | 29 ++++
.../webapp/tests/unit/adapters/task-am-test.js | 29 ++++
.../tests/unit/adapters/vertex-am-test.js | 29 ++++
.../tests/unit/controllers/abstract-test.js | 1 +
.../tests/unit/controllers/app/dags-test.js | 3 +-
.../unit/controllers/counters-page-test.js | 97 -------------
.../unit/controllers/counters-table-test.js | 91 ++++++++++++
.../tests/unit/controllers/dag/attempts-test.js | 5 +-
.../tests/unit/controllers/dag/tasks-test.js | 5 +-
.../tests/unit/controllers/dag/vertices-test.js | 5 +-
.../tests/unit/controllers/multi-table-test.js | 40 ++++++
.../tests/unit/controllers/parent-test.js | 36 +++++
.../tests/unit/controllers/table-page-test.js | 64 ---------
.../webapp/tests/unit/controllers/table-test.js | 64 +++++++++
.../unit/controllers/task/attempts-test.js | 5 +-
.../unit/controllers/vertex/attempts-test.js | 5 +-
.../tests/unit/controllers/vertex/tasks-test.js | 5 +-
.../main/webapp/tests/unit/entities/am-test.js | 33 +++++
.../tests/unit/entities/attempt-am-test.js | 31 +++++
.../webapp/tests/unit/entities/entity-test.js | 95 +++----------
.../webapp/tests/unit/entities/task-am-test.js | 31 +++++
.../tests/unit/entities/vertex-am-test.js | 31 +++++
.../unit/mixins/auto-counter-column-test.js | 32 +++--
.../webapp/tests/unit/models/abstract-test.js | 5 +
.../webapp/tests/unit/models/ahs-app-test.js | 2 +
.../main/webapp/tests/unit/models/am-test.js | 31 +++++
.../tests/unit/models/am-timeline-test.js | 34 +++++
.../webapp/tests/unit/models/app-rm-test.js | 30 ++++
.../webapp/tests/unit/models/attempt-am-test.js | 30 ++++
.../webapp/tests/unit/models/attempt-test.js | 17 ++-
.../webapp/tests/unit/models/dag-am-test.js | 30 ++++
.../main/webapp/tests/unit/models/dag-test.js | 1 +
.../main/webapp/tests/unit/models/rm-test.js | 30 ++++
.../webapp/tests/unit/models/task-am-test.js | 30 ++++
.../main/webapp/tests/unit/models/task-test.js | 12 +-
.../webapp/tests/unit/models/timeline-test.js | 16 +--
.../webapp/tests/unit/models/vertex-am-test.js | 30 ++++
.../webapp/tests/unit/models/vertex-test.js | 22 ++-
.../tests/unit/routes/am-pollster-test.js | 34 +++++
.../tests/unit/routes/multi-am-pollster-test.js | 32 +++++
.../webapp/tests/unit/routes/pollster-test.js | 39 ++++++
.../unit/routes/single-am-pollster-test.js | 32 +++++
.../tests/unit/routes/vertex/tasks-test.js | 7 +-
.../webapp/tests/unit/serializers/am-test.js | 30 ++++
.../tests/unit/serializers/app-rm-test.js | 30 ++++
.../tests/unit/serializers/attempt-am-test.js | 31 +++++
.../tests/unit/serializers/dag-am-test.js | 30 ++++
.../webapp/tests/unit/serializers/rm-test.js | 30 ++++
.../tests/unit/serializers/task-am-test.js | 31 +++++
.../tests/unit/serializers/vertex-am-test.js | 31 +++++
.../webapp/tests/unit/services/loader-test.js | 74 ++++------
.../webapp/tests/unit/services/pollster-test.js | 29 ++++
.../utils/counter-column-definition-test.js | 4 +-
178 files changed, 3009 insertions(+), 842 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/TEZ-2980-CHANGES.txt
----------------------------------------------------------------------
diff --git a/TEZ-2980-CHANGES.txt b/TEZ-2980-CHANGES.txt
index f5660a5..60eb715 100644
--- a/TEZ-2980-CHANGES.txt
+++ b/TEZ-2980-CHANGES.txt
@@ -26,3 +26,4 @@ ALL CHANGES:
TEZ-3064. Tez UI 2: Add All DAGs filters
TEZ-3059. Tez UI 2: Make refresh functional
TEZ-3070. Tez UI 2: Jenkins build is failing
+ TEZ-3060. Tez UI 2: Activate auto-refresh
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/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 f80cdd5..85f3d27 100644
--- a/tez-ui2/src/main/webapp/app/adapters/am.js
+++ b/tez-ui2/src/main/webapp/app/adapters/am.js
@@ -21,5 +21,7 @@ import AbstractAdapter from './abstract';
export default AbstractAdapter.extend({
serverName: "am",
- // Any am specific adapter changes must be added here
+ queryRecord: function(store, type, query) {
+ return this.query(store, type, query);
+ },
});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/adapters/app-rm.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/adapters/app-rm.js b/tez-ui2/src/main/webapp/app/adapters/app-rm.js
new file mode 100644
index 0000000..b61e391
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/adapters/app-rm.js
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import RMAdapter from './rm';
+
+export default RMAdapter.extend({
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/adapters/attempt-am.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/adapters/attempt-am.js b/tez-ui2/src/main/webapp/app/adapters/attempt-am.js
new file mode 100644
index 0000000..39cd2a4
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/adapters/attempt-am.js
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import AMAdapter from './am';
+
+export default AMAdapter.extend({
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/adapters/dag-am.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/adapters/dag-am.js b/tez-ui2/src/main/webapp/app/adapters/dag-am.js
new file mode 100644
index 0000000..39cd2a4
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/adapters/dag-am.js
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import AMAdapter from './am';
+
+export default AMAdapter.extend({
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/adapters/loader.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/adapters/loader.js b/tez-ui2/src/main/webapp/app/adapters/loader.js
index d4b502c..f63bd07 100644
--- a/tez-ui2/src/main/webapp/app/adapters/loader.js
+++ b/tez-ui2/src/main/webapp/app/adapters/loader.js
@@ -25,7 +25,7 @@ export default DS.RESTAdapter.extend({
_isLoader: true,
buildURL: function(modelName, id, snapshot, requestType, query, params) {
- var url = this._super(modelName, id, snapshot, null, query);
+ var url = this._super(modelName, id, snapshot, requestType, query);
return params ? MoreString.fmt(url, params) : url;
},
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/adapters/task-am.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/adapters/task-am.js b/tez-ui2/src/main/webapp/app/adapters/task-am.js
new file mode 100644
index 0000000..39cd2a4
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/adapters/task-am.js
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import AMAdapter from './am';
+
+export default AMAdapter.extend({
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/adapters/vertex-am.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/adapters/vertex-am.js b/tez-ui2/src/main/webapp/app/adapters/vertex-am.js
new file mode 100644
index 0000000..39cd2a4
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/adapters/vertex-am.js
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import AMAdapter from './am';
+
+export default AMAdapter.extend({
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/components/tab-n-refresh.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/components/tab-n-refresh.js b/tez-ui2/src/main/webapp/app/components/tab-n-refresh.js
index 75bac20..6ac6454 100644
--- a/tez-ui2/src/main/webapp/app/components/tab-n-refresh.js
+++ b/tez-ui2/src/main/webapp/app/components/tab-n-refresh.js
@@ -24,13 +24,18 @@ export default Ember.Component.extend({
this.setApplication();
},
- autoRefreshEnabled: true,
+ autoRefreshEnabled: false,
+ autoRefreshVisible: true,
setApplication: function () {
var application = this.get("targetObject.container").lookup('controller:application');
this.set("application", application);
},
+ autoRefreshObserver: Ember.observer("autoRefreshEnabled", function () {
+ this.get('targetObject').send('autoRefreshChanged', this.get("autoRefreshEnabled"));
+ }),
+
normalizedTabs: Ember.computed("tabs", "application.currentPath", function () {
var tabs = this.get("tabs") || [],
activeRouteName = this.get("application.currentPath");
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/controllers/abstract.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/controllers/abstract.js b/tez-ui2/src/main/webapp/app/controllers/abstract.js
index 816e7d1..863a63f 100644
--- a/tez-ui2/src/main/webapp/app/controllers/abstract.js
+++ b/tez-ui2/src/main/webapp/app/controllers/abstract.js
@@ -24,14 +24,19 @@ export default Ember.Controller.extend(NameMixin, {
// Must be set by inheriting classes
breadcrumbs: null,
- // Must be set from route
+ // Must be set from abstract route
loadTime: null,
+ isLoading: false,
init: function () {
this._super();
Ember.run.later(this, "setBreadcrumbs");
},
+ loaded: Ember.computed("model", "isLoading", function () {
+ return this.get("model") && !this.get("isLoading");
+ }),
+
crumbObserver: Ember.observer("breadcrumbs", function () {
Ember.run.later(this, "setBreadcrumbs");
}),
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/controllers/app.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/controllers/app.js b/tez-ui2/src/main/webapp/app/controllers/app.js
index 8333220..f379e80 100644
--- a/tez-ui2/src/main/webapp/app/controllers/app.js
+++ b/tez-ui2/src/main/webapp/app/controllers/app.js
@@ -18,9 +18,9 @@
import Ember from 'ember';
-import AbstractController from './abstract';
+import ParentController from './parent';
-export default AbstractController.extend({
+export default ParentController.extend({
breadcrumbs: Ember.computed("model.appID", "model.app.name", function () {
var name = this.get("model.app.name") || this.get("model.appID");
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/controllers/app/configs.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/controllers/app/configs.js b/tez-ui2/src/main/webapp/app/controllers/app/configs.js
index 517d43b..838abc1 100644
--- a/tez-ui2/src/main/webapp/app/controllers/app/configs.js
+++ b/tez-ui2/src/main/webapp/app/controllers/app/configs.js
@@ -19,12 +19,12 @@
import Ember from 'ember';
-import TablePageController from '../table-page';
+import TableController from '../table';
import ColumnDefinition from 'em-table/utils/column-definition';
var MoreObject = more.Object;
-export default TablePageController.extend({
+export default TableController.extend({
searchText: "tez",
breadcrumbs: [{
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/controllers/app/dags.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/controllers/app/dags.js b/tez-ui2/src/main/webapp/app/controllers/app/dags.js
index 547c4ee..b3e855a 100644
--- a/tez-ui2/src/main/webapp/app/controllers/app/dags.js
+++ b/tez-ui2/src/main/webapp/app/controllers/app/dags.js
@@ -16,10 +16,10 @@
* limitations under the License.
*/
-import TablePageController from '../table-page';
+import MultiTableController from '../multi-table';
import ColumnDefinition from 'em-table/utils/column-definition';
-export default TablePageController.extend({
+export default MultiTableController.extend({
breadcrumbs: [{
text: "DAGs",
routeName: "app.dags",
@@ -49,7 +49,8 @@ export default TablePageController.extend({
id: 'status',
headerTitle: 'Status',
contentPath: 'status',
- cellComponentName: 'em-table-status-cell'
+ cellComponentName: 'em-table-status-cell',
+ observePath: true
},{
id: 'progress',
headerTitle: 'Progress',
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/controllers/attempt.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/controllers/attempt.js b/tez-ui2/src/main/webapp/app/controllers/attempt.js
index 64c8a67..b10fc7f 100644
--- a/tez-ui2/src/main/webapp/app/controllers/attempt.js
+++ b/tez-ui2/src/main/webapp/app/controllers/attempt.js
@@ -18,9 +18,9 @@
import Ember from 'ember';
-import AbstractController from './abstract';
+import ParentController from './parent';
-export default AbstractController.extend({
+export default ParentController.extend({
breadcrumbs: Ember.computed("model.dag", function () {
var dagName = this.get("model.dag.name"),
vertexName = this.get("model.vertexName"),
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/controllers/attempt/counters.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/controllers/attempt/counters.js b/tez-ui2/src/main/webapp/app/controllers/attempt/counters.js
index 9442838..1a93c80 100644
--- a/tez-ui2/src/main/webapp/app/controllers/attempt/counters.js
+++ b/tez-ui2/src/main/webapp/app/controllers/attempt/counters.js
@@ -16,9 +16,9 @@
* limitations under the License.
*/
-import CountersPageController from '../counters-page';
+import CountersTableController from '../counters-table';
-export default CountersPageController.extend({
+export default CountersTableController.extend({
breadcrumbs: [{
text: "Attempt Counters",
routeName: "attempt.counters",
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/controllers/counters-page.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/controllers/counters-page.js b/tez-ui2/src/main/webapp/app/controllers/counters-page.js
deleted file mode 100644
index ef22ef1..0000000
--- a/tez-ui2/src/main/webapp/app/controllers/counters-page.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import Ember from 'ember';
-
-import TablePageController from './table-page';
-import ColumnDefinition from 'em-table/utils/column-definition';
-
-export default TablePageController.extend({
- columns: ColumnDefinition.make([{
- id: 'groupName',
- headerTitle: 'Group Name',
- contentPath: 'groupName',
- }, {
- id: 'counterName',
- headerTitle: 'Counter Name',
- contentPath: 'counterName',
- }, {
- id: 'counterValue',
- headerTitle: 'Counter Value',
- contentPath: 'counterValue',
- }]),
-
- counters: Ember.computed("model.counterGroups", function () {
- var counterGroups = this.get("model.counterGroups"),
- counterRows = [];
-
- if(counterGroups) {
- counterGroups.forEach(function (group) {
- var counterGroupName = group.counterGroupName,
- counters = group.counters;
-
- if(counters) {
- counterGroupName = counterGroupName.substr(counterGroupName.lastIndexOf('.') + 1);
- counters.forEach(function (counter) {
- counterRows.push(Ember.Object.create({
- groupName: counterGroupName,
- counterName: counter.counterName,
- counterValue: counter.counterValue
- }));
- });
- }
- });
- }
-
- return Ember.A(counterRows);
- })
-});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/controllers/counters-table.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/controllers/counters-table.js b/tez-ui2/src/main/webapp/app/controllers/counters-table.js
new file mode 100644
index 0000000..42361b4
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/controllers/counters-table.js
@@ -0,0 +1,74 @@
+/*global more*/
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import Ember from 'ember';
+
+import TableController from './table';
+import ColumnDefinition from 'em-table/utils/column-definition';
+
+var MoreObject = more.Object;
+
+export default TableController.extend({
+ counters: Ember.A(),
+ countersCount: 0, // Because Ember.Array doesn't handle length well
+
+ columns: ColumnDefinition.make([{
+ id: 'groupName',
+ headerTitle: 'Group Name',
+ contentPath: 'groupName',
+ }, {
+ id: 'counterName',
+ headerTitle: 'Counter Name',
+ contentPath: 'counterName',
+ }, {
+ id: 'counterValue',
+ headerTitle: 'Counter Value',
+ contentPath: 'counterValue',
+ observePath: true
+ }]),
+
+ _countersObserver: Ember.observer("model.counterGroupsHash", function () {
+ var counterGroupsHash = this.get("model.counterGroupsHash"),
+ counters = this.get("counters"),
+ counterIndex = 0;
+
+ if(counterGroupsHash) {
+ MoreObject.forEach(counterGroupsHash, function (groupName, countersHash) {
+ if(countersHash) {
+ MoreObject.forEach(countersHash, function (counterName, counterValue) {
+ let counterRow = counters.get(counterIndex);
+ if(!counterRow) {
+ counterRow = Ember.Object.create();
+ counters.push(counterRow);
+ }
+
+ counterRow.setProperties({
+ groupName: groupName,
+ counterName: counterName,
+ counterValue: counterValue
+ });
+ counterIndex++;
+ });
+ }
+ });
+ }
+
+ this.set("countersCount", counterIndex);
+ })
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/controllers/dag.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/controllers/dag.js b/tez-ui2/src/main/webapp/app/controllers/dag.js
index 14f9df6..f2b04d1 100644
--- a/tez-ui2/src/main/webapp/app/controllers/dag.js
+++ b/tez-ui2/src/main/webapp/app/controllers/dag.js
@@ -18,9 +18,9 @@
import Ember from 'ember';
-import AbstractController from './abstract';
+import ParentController from './parent';
-export default AbstractController.extend({
+export default ParentController.extend({
breadcrumbs: Ember.computed("model", function () {
var name = this.get("model.name");
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/controllers/dag/attempts.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/controllers/dag/attempts.js b/tez-ui2/src/main/webapp/app/controllers/dag/attempts.js
index d9cb9e9..94bca3e 100644
--- a/tez-ui2/src/main/webapp/app/controllers/dag/attempts.js
+++ b/tez-ui2/src/main/webapp/app/controllers/dag/attempts.js
@@ -16,10 +16,10 @@
* limitations under the License.
*/
-import TablePageController from '../table-page';
+import MultiTableController from '../multi-table';
import ColumnDefinition from 'em-table/utils/column-definition';
-export default TablePageController.extend({
+export default MultiTableController.extend({
breadcrumbs: [{
text: "All Task Attempts",
routeName: "dag.attempts",
@@ -65,7 +65,8 @@ export default TablePageController.extend({
id: 'status',
headerTitle: 'Status',
contentPath: 'status',
- cellComponentName: 'em-table-status-cell'
+ cellComponentName: 'em-table-status-cell',
+ observePath: true
},{
id: 'progress',
headerTitle: 'Progress',
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/controllers/dag/counters.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/controllers/dag/counters.js b/tez-ui2/src/main/webapp/app/controllers/dag/counters.js
index c4fbea6..c54fd7e 100644
--- a/tez-ui2/src/main/webapp/app/controllers/dag/counters.js
+++ b/tez-ui2/src/main/webapp/app/controllers/dag/counters.js
@@ -16,9 +16,9 @@
* limitations under the License.
*/
-import CountersPageController from '../counters-page';
+import CountersTableController from '../counters-table';
-export default CountersPageController.extend({
+export default CountersTableController.extend({
breadcrumbs: [{
text: "DAG Counters",
routeName: "dag.counters",
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/controllers/dag/tasks.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/controllers/dag/tasks.js b/tez-ui2/src/main/webapp/app/controllers/dag/tasks.js
index 1a5c776..58e0163 100644
--- a/tez-ui2/src/main/webapp/app/controllers/dag/tasks.js
+++ b/tez-ui2/src/main/webapp/app/controllers/dag/tasks.js
@@ -16,10 +16,10 @@
* limitations under the License.
*/
-import TablePageController from '../table-page';
+import MultiTableController from '../multi-table';
import ColumnDefinition from 'em-table/utils/column-definition';
-export default TablePageController.extend({
+export default MultiTableController.extend({
breadcrumbs: [{
text: "All Tasks",
routeName: "dag.tasks",
@@ -53,7 +53,8 @@ export default TablePageController.extend({
id: 'status',
headerTitle: 'Status',
contentPath: 'status',
- cellComponentName: 'em-table-status-cell'
+ cellComponentName: 'em-table-status-cell',
+ observePath: true
},{
id: 'progress',
headerTitle: 'Progress',
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/controllers/dag/vertices.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/controllers/dag/vertices.js b/tez-ui2/src/main/webapp/app/controllers/dag/vertices.js
index b20a558..1b9f136 100644
--- a/tez-ui2/src/main/webapp/app/controllers/dag/vertices.js
+++ b/tez-ui2/src/main/webapp/app/controllers/dag/vertices.js
@@ -16,10 +16,10 @@
* limitations under the License.
*/
-import TablePageController from '../table-page';
+import MultiTableController from '../multi-table';
import ColumnDefinition from 'em-table/utils/column-definition';
-export default TablePageController.extend({
+export default MultiTableController.extend({
breadcrumbs: [{
text: "All Vertices",
routeName: "dag.vertices",
@@ -45,7 +45,8 @@ export default TablePageController.extend({
id: 'status',
headerTitle: 'Status',
contentPath: 'status',
- cellComponentName: 'em-table-status-cell'
+ cellComponentName: 'em-table-status-cell',
+ observePath: true
},{
id: 'progress',
headerTitle: 'Progress',
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/controllers/dags.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/controllers/dags.js b/tez-ui2/src/main/webapp/app/controllers/dags.js
index d35d8f7..021a1e0 100644
--- a/tez-ui2/src/main/webapp/app/controllers/dags.js
+++ b/tez-ui2/src/main/webapp/app/controllers/dags.js
@@ -18,11 +18,11 @@
import Ember from 'ember';
-import TablePageController from './table-page';
+import TableController from './table';
import ColumnDefinition from 'em-table/utils/column-definition';
import TableDefinition from 'em-table/utils/table-definition';
-export default TablePageController.extend({
+export default TableController.extend({
queryParams: ["dagName", "dagID", "submitter", "status", "appID", "contextID", "pageNo"],
dagName: "",
@@ -75,7 +75,8 @@ export default TablePageController.extend({
id: 'status',
headerTitle: 'Status',
contentPath: 'status',
- cellComponentName: 'em-table-status-cell'
+ cellComponentName: 'em-table-status-cell',
+ observePath: true
},{
id: 'progress',
headerTitle: 'Progress',
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/controllers/multi-table.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/controllers/multi-table.js b/tez-ui2/src/main/webapp/app/controllers/multi-table.js
new file mode 100644
index 0000000..3a11830
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/controllers/multi-table.js
@@ -0,0 +1,37 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import Ember from 'ember';
+
+import TableController from './table';
+import CounterColumnDefinition from '../utils/counter-column-definition';
+
+export default TableController.extend({
+
+ _visibleColumnsObserver: Ember.on("init", Ember.observer("visibleColumns", function () {
+ Ember.run.later(this, "sendCountersChanged");
+ })),
+
+ sendCountersChanged: function () {
+ var visibleCounters = this.get("visibleColumns").filter(function (definition) {
+ return definition instanceof CounterColumnDefinition;
+ });
+ this.send("countersToPollChanged", visibleCounters);
+ }
+
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/controllers/page.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/controllers/page.js b/tez-ui2/src/main/webapp/app/controllers/page.js
index 84882a8..14ad6b5 100644
--- a/tez-ui2/src/main/webapp/app/controllers/page.js
+++ b/tez-ui2/src/main/webapp/app/controllers/page.js
@@ -16,15 +16,8 @@
* limitations under the License.
*/
-import Ember from 'ember';
-
import AbstractController from './abstract';
export default AbstractController.extend({
- // Must be set from route
- isLoading: false,
-
- loaded: Ember.computed("model", "isLoading", function () {
- return this.get("model") && !this.get("isLoading");
- }),
+ // Any page specific
});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/controllers/parent.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/controllers/parent.js b/tez-ui2/src/main/webapp/app/controllers/parent.js
new file mode 100644
index 0000000..089ed77
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/controllers/parent.js
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import Ember from 'ember';
+
+import AbstractController from './abstract';
+
+export default AbstractController.extend({
+ polling: Ember.inject.service("pollster"),
+ actions: {
+ autoRefreshChanged: function (state) {
+ this.get("polling").set("active", state);
+ }
+ }
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/controllers/table-page.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/controllers/table-page.js b/tez-ui2/src/main/webapp/app/controllers/table-page.js
deleted file mode 100644
index 12f4715..0000000
--- a/tez-ui2/src/main/webapp/app/controllers/table-page.js
+++ /dev/null
@@ -1,135 +0,0 @@
-/*global more*/
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import Ember from 'ember';
-
-import PageController from './page';
-import TableDefinition from 'em-table/utils/table-definition';
-import isIOCounter from '../utils/misc';
-
-import CounterColumnDefinition from '../utils/counter-column-definition';
-
-var MoreObject = more.Object;
-
-export default PageController.extend({
- queryParams: ["rowCount", "searchText", "sortColumnId", "sortOrder", "pageNo"],
- rowCount: 10,
- searchText: "",
- sortColumnId: "",
- sortOrder: "",
- pageNo: 1,
-
- columns: [],
-
- headerComponentNames: ['em-table-search-ui', 'table-controls', 'em-table-pagination-ui'],
-
- visibleColumnIDs: {},
- columnSelectorTitle: 'Column Selector',
- columnSelectorMessage: "",
-
- definition: Ember.computed(function () {
- return TableDefinition.create({
- rowCount: this.get("rowCount"),
- searchText: this.get("searchText"),
- sortColumnId: this.get("sortColumnId"),
- sortOrder: this.get("sortOrder"),
- pageNo: this.get("pageNo")
- });
- }),
-
- storageID: Ember.computed("name", function () {
- return this.get("name") + ":visibleColumnIDs";
- }),
-
- initVisibleColumns: Ember.on("init", Ember.observer("columns", function () { //To reset on entity change
- var visibleColumnIDs = this.get("localStorage").get(this.get("storageID")) || {};
-
- this.get('columns').forEach(function (config) {
- if(visibleColumnIDs[config.id] !== false) {
- visibleColumnIDs[config.id] = true;
- }
- });
-
- this.set('visibleColumnIDs', visibleColumnIDs);
- })),
-
- allColumns: Ember.computed("columns", function () {
- var columns = this.get("columns"),
- counters = this.getCounterColumns();
-
- return columns.concat(CounterColumnDefinition.make(counters));
- }),
-
- visibleColumns: Ember.computed('visibleColumnIDs', 'allColumns', function() {
- var visibleColumnIDs = this.visibleColumnIDs;
- return this.get('allColumns').filter(function (column) {
- return visibleColumnIDs[column.get("id")];
- });
- }),
-
- getCounterColumns: function () {
- return this.get('env.app.tables.defaultColumns.counters');
- },
-
- actions: {
- searchChanged: function (searchText) {
- this.set("searchText", searchText);
- },
- sortChanged: function (sortColumnId, sortOrder) {
- this.setProperties({
- sortColumnId,
- sortOrder
- });
- },
- rowsChanged: function (rowCount) {
- // Change to rows action in em-table
- this.set("rowCount", rowCount);
- },
- pageChanged: function (pageNum) {
- this.set("pageNo", pageNum);
- },
-
- // Column selection actions
- openColumnSelector: function () {
- this.send("openModal", "column-selector", {
- title: this.get('columnSelectorTitle'),
- targetObject: this,
- content: {
- message: this.get('columnSelectorMessage'),
- columns: this.get('allColumns'),
- visibleColumnIDs: this.get('visibleColumnIDs')
- }
- });
- },
- columnsSelected: function (visibleColumnIDs) {
- var columnIDs = {};
-
- MoreObject.forEach(visibleColumnIDs, function (key, value) {
- if(!isIOCounter(key)) {
- columnIDs[key] = value;
- }
- });
-
- if(!MoreObject.equals(columnIDs, this.get("visibleColumnIDs"))) {
- this.get("localStorage").set(this.get("storageID"), columnIDs);
- this.set('visibleColumnIDs', columnIDs);
- }
- }
- }
-});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/controllers/table.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/controllers/table.js b/tez-ui2/src/main/webapp/app/controllers/table.js
new file mode 100644
index 0000000..0891e8d
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/controllers/table.js
@@ -0,0 +1,138 @@
+/*global more*/
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import Ember from 'ember';
+
+import AbstractController from './abstract';
+import TableDefinition from 'em-table/utils/table-definition';
+import isIOCounter from '../utils/misc';
+
+import CounterColumnDefinition from '../utils/counter-column-definition';
+
+var MoreObject = more.Object;
+
+export default AbstractController.extend({
+ queryParams: ["rowCount", "searchText", "sortColumnId", "sortOrder", "pageNo"],
+ rowCount: 10,
+ searchText: "",
+ sortColumnId: "",
+ sortOrder: "",
+ pageNo: 1,
+
+ columns: [],
+
+ headerComponentNames: ['em-table-search-ui', 'table-controls', 'em-table-pagination-ui'],
+
+ visibleColumnIDs: {},
+ columnSelectorTitle: 'Column Selector',
+ columnSelectorMessage: "",
+
+ definition: Ember.computed(function () {
+ return TableDefinition.create({
+ rowCount: this.get("rowCount"),
+ searchText: this.get("searchText"),
+ sortColumnId: this.get("sortColumnId"),
+ sortOrder: this.get("sortOrder"),
+ pageNo: this.get("pageNo")
+ });
+ }),
+
+ storageID: Ember.computed("name", function () {
+ return this.get("name") + ":visibleColumnIDs";
+ }),
+
+ initVisibleColumns: Ember.on("init", Ember.observer("columns", function () { //To reset on entity change
+ var visibleColumnIDs = this.get("localStorage").get(this.get("storageID")) || {};
+
+ this.get('columns').forEach(function (config) {
+ if(visibleColumnIDs[config.id] !== false) {
+ visibleColumnIDs[config.id] = true;
+ }
+ });
+
+ this.set('visibleColumnIDs', visibleColumnIDs);
+ })),
+
+ allColumns: Ember.computed("columns", function () {
+ var columns = this.get("columns"),
+ counters = this.getCounterColumns();
+
+ return columns.concat(CounterColumnDefinition.make(counters));
+ }),
+
+ visibleColumns: Ember.computed('visibleColumnIDs', 'allColumns', function() {
+ var visibleColumnIDs = this.visibleColumnIDs;
+ return this.get('allColumns').filter(function (column) {
+ return visibleColumnIDs[column.get("id")];
+ });
+ }),
+
+ getCounterColumns: function () {
+ return this.get('env.app.tables.defaultColumns.counters');
+ },
+
+ actions: {
+ searchChanged: function (searchText) {
+ this.set("searchText", searchText);
+ },
+ sortChanged: function (sortColumnId, sortOrder) {
+ this.setProperties({
+ sortColumnId,
+ sortOrder
+ });
+ },
+ rowCountChanged: function (rowCount) {
+ this.set("rowCount", rowCount);
+ },
+ pageChanged: function (pageNum) {
+ this.set("pageNo", pageNum);
+ },
+
+ rowsChanged: function (rows) {
+ this.send("setPollingRecords", rows);
+ },
+
+ // Column selection actions
+ openColumnSelector: function () {
+ this.send("openModal", "column-selector", {
+ title: this.get('columnSelectorTitle'),
+ targetObject: this,
+ content: {
+ message: this.get('columnSelectorMessage'),
+ columns: this.get('allColumns'),
+ visibleColumnIDs: this.get('visibleColumnIDs')
+ }
+ });
+ },
+ columnsSelected: function (visibleColumnIDs) {
+ var columnIDs = {};
+
+ MoreObject.forEach(visibleColumnIDs, function (key, value) {
+ if(!isIOCounter(key)) {
+ columnIDs[key] = value;
+ }
+ });
+
+ if(!MoreObject.equals(columnIDs, this.get("visibleColumnIDs"))) {
+ this.get("localStorage").set(this.get("storageID"), columnIDs);
+ this.set('visibleColumnIDs', columnIDs);
+ }
+ }
+ }
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/controllers/task.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/controllers/task.js b/tez-ui2/src/main/webapp/app/controllers/task.js
index 2092162..ffd4ffe 100644
--- a/tez-ui2/src/main/webapp/app/controllers/task.js
+++ b/tez-ui2/src/main/webapp/app/controllers/task.js
@@ -18,12 +18,12 @@
import Ember from 'ember';
-import AbstractController from './abstract';
+import ParentController from './parent';
-export default AbstractController.extend({
+export default ParentController.extend({
breadcrumbs: Ember.computed("model.dag", function () {
var dagName = this.get("model.dag.name"),
- vertexName = this.get("model.vertexName"),
+ vertexName = this.get("model.vertexName") || this.get("model.vertexIndex"),
taskIndex = this.get("model.index");
return [{
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/controllers/task/attempts.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/controllers/task/attempts.js b/tez-ui2/src/main/webapp/app/controllers/task/attempts.js
index d7bec55..472d04f 100644
--- a/tez-ui2/src/main/webapp/app/controllers/task/attempts.js
+++ b/tez-ui2/src/main/webapp/app/controllers/task/attempts.js
@@ -16,12 +16,12 @@
* limitations under the License.
*/
-import TablePageController from '../table-page';
+import MultiTableController from '../multi-table';
import ColumnDefinition from 'em-table/utils/column-definition';
import AutoCounterColumn from '../../mixins/auto-counter-column';
-export default TablePageController.extend(AutoCounterColumn, {
+export default MultiTableController.extend(AutoCounterColumn, {
breadcrumbs: [{
text: "Task Attempts",
routeName: "task.attempts",
@@ -43,7 +43,8 @@ export default TablePageController.extend(AutoCounterColumn, {
id: 'status',
headerTitle: 'Status',
contentPath: 'status',
- cellComponentName: 'em-table-status-cell'
+ cellComponentName: 'em-table-status-cell',
+ observePath: true
},{
id: 'progress',
headerTitle: 'Progress',
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/controllers/task/counters.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/controllers/task/counters.js b/tez-ui2/src/main/webapp/app/controllers/task/counters.js
index b9c00e3..4aa071c 100644
--- a/tez-ui2/src/main/webapp/app/controllers/task/counters.js
+++ b/tez-ui2/src/main/webapp/app/controllers/task/counters.js
@@ -16,9 +16,9 @@
* limitations under the License.
*/
-import CountersPageController from '../counters-page';
+import CountersTableController from '../counters-table';
-export default CountersPageController.extend({
+export default CountersTableController.extend({
breadcrumbs: [{
text: "Task Counters",
routeName: "task.counters",
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/controllers/vertex.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/controllers/vertex.js b/tez-ui2/src/main/webapp/app/controllers/vertex.js
index 5543924..78f5db9 100644
--- a/tez-ui2/src/main/webapp/app/controllers/vertex.js
+++ b/tez-ui2/src/main/webapp/app/controllers/vertex.js
@@ -18,12 +18,12 @@
import Ember from 'ember';
-import AbstractController from './abstract';
+import ParentController from './parent';
-export default AbstractController.extend({
+export default ParentController.extend({
breadcrumbs: Ember.computed("model.dag", function () {
var dagName = this.get("model.dag.name"),
- vertexName = this.get("model.name");
+ vertexName = this.get("model.name") || this.get("model.index");
return [{
text: `DAG [ ${dagName} ]`,
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/controllers/vertex/attempts.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/controllers/vertex/attempts.js b/tez-ui2/src/main/webapp/app/controllers/vertex/attempts.js
index b0fb983..34a067f 100644
--- a/tez-ui2/src/main/webapp/app/controllers/vertex/attempts.js
+++ b/tez-ui2/src/main/webapp/app/controllers/vertex/attempts.js
@@ -16,12 +16,12 @@
* limitations under the License.
*/
-import TablePageController from '../table-page';
+import MultiTableController from '../multi-table';
import ColumnDefinition from 'em-table/utils/column-definition';
import AutoCounterColumn from '../../mixins/auto-counter-column';
-export default TablePageController.extend(AutoCounterColumn, {
+export default MultiTableController.extend(AutoCounterColumn, {
breadcrumbs: [{
text: "Task Attempts",
routeName: "vertex.attempts",
@@ -55,7 +55,8 @@ export default TablePageController.extend(AutoCounterColumn, {
id: 'status',
headerTitle: 'Status',
contentPath: 'status',
- cellComponentName: 'em-table-status-cell'
+ cellComponentName: 'em-table-status-cell',
+ observePath: true
},{
id: 'progress',
headerTitle: 'Progress',
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/controllers/vertex/counters.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/controllers/vertex/counters.js b/tez-ui2/src/main/webapp/app/controllers/vertex/counters.js
index 245ae1b..1213728 100644
--- a/tez-ui2/src/main/webapp/app/controllers/vertex/counters.js
+++ b/tez-ui2/src/main/webapp/app/controllers/vertex/counters.js
@@ -16,9 +16,9 @@
* limitations under the License.
*/
-import CountersPageController from '../counters-page';
+import CountersTableController from '../counters-table';
-export default CountersPageController.extend({
+export default CountersTableController.extend({
breadcrumbs: [{
text: "Vertex Counters",
routeName: "vertex.counters",
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/controllers/vertex/tasks.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/controllers/vertex/tasks.js b/tez-ui2/src/main/webapp/app/controllers/vertex/tasks.js
index 350d246..ea02d61 100644
--- a/tez-ui2/src/main/webapp/app/controllers/vertex/tasks.js
+++ b/tez-ui2/src/main/webapp/app/controllers/vertex/tasks.js
@@ -16,12 +16,12 @@
* limitations under the License.
*/
-import TablePageController from '../table-page';
+import MultiTableController from '../multi-table';
import ColumnDefinition from 'em-table/utils/column-definition';
import AutoCounterColumn from '../../mixins/auto-counter-column';
-export default TablePageController.extend(AutoCounterColumn, {
+export default MultiTableController.extend(AutoCounterColumn, {
breadcrumbs: [{
text: "Tasks",
routeName: "vertex.tasks",
@@ -43,7 +43,8 @@ export default TablePageController.extend(AutoCounterColumn, {
id: 'status',
headerTitle: 'Status',
contentPath: 'status',
- cellComponentName: 'em-table-status-cell'
+ cellComponentName: 'em-table-status-cell',
+ observePath: true
},{
id: 'progress',
headerTitle: 'Progress',
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/entities/am.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/entities/am.js b/tez-ui2/src/main/webapp/app/entities/am.js
new file mode 100644
index 0000000..56d061d
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/entities/am.js
@@ -0,0 +1,58 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import Ember from 'ember';
+
+import Entity from './entity';
+
+export default Entity.extend({
+
+ idsToJoin: null,
+ deferred: null,
+
+ resetJoiner: Ember.on("init", function () {
+ this.set("idsToJoin", []);
+ this.set("deferred", Ember.RSVP.defer());
+ }),
+
+ queryRecord: function (loader, id, options, query, urlParams) {
+ this.get("idsToJoin").push(query[this.get("queryPropertyToJoin")]);
+
+ // Yup, only the last query would be taken by design
+ Ember.run.once(this, "queryJoinedRecords", loader, options, query, urlParams);
+
+ return this.get("deferred.promise").then(function (recordHash) {
+ return recordHash[id];
+ });
+ },
+
+ queryJoinedRecords: function (loader, options, query, urlParams) {
+ var deferred = this.get("deferred");
+
+ query[this.get("queryPropertyToJoin")] = this.get("idsToJoin").join(",");
+ this.query(loader, query, options, urlParams).then(function (records) {
+ deferred.resolve(records.reduce(function (recordHash, record) {
+ recordHash[record.get("entityID")] = record;
+ return recordHash;
+ }, {}));
+ }, function (error) {
+ deferred.reject(error);
+ }).finally(this.resetJoiner.bind(this));
+ }
+
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/entities/attempt-am.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/entities/attempt-am.js b/tez-ui2/src/main/webapp/app/entities/attempt-am.js
new file mode 100644
index 0000000..077c494
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/entities/attempt-am.js
@@ -0,0 +1,23 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import AMEntity from './am';
+
+export default AMEntity.extend({
+ queryPropertyToJoin: "attemptID",
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/entities/entity.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/entities/entity.js b/tez-ui2/src/main/webapp/app/entities/entity.js
index 9cad7b7..8a10dee 100644
--- a/tez-ui2/src/main/webapp/app/entities/entity.js
+++ b/tez-ui2/src/main/webapp/app/entities/entity.js
@@ -18,61 +18,133 @@
*/
import Ember from 'ember';
+import NameMixin from '../mixins/name';
var MoreObject = more.Object;
-export default Ember.Object.extend({
-
- loadRelations: function (loader, model, options, urlParams) {
- var needsPromise = this.loadNeeds(loader, model, options, urlParams);
+var Entity = Ember.Object.extend(NameMixin, {
+
+ queryRecord: function (loader, id, options, query, urlParams) {
+ var that = this;
+ return this.get('store').queryRecord(this.get("name"), {
+ id: id,
+ nameSpace: loader.get('nameSpace'),
+ params: query,
+ urlParams: urlParams
+ }).then(function (record) {
+ return that._loadAllNeeds(loader, record, options, urlParams);
+ });
+ },
- if(needsPromise) {
- return needsPromise.then(function () {
- return model;
+ query: function (loader, query, options, urlParams) {
+ var that = this;
+ return this.get('store').query(this.get("name"), {
+ nameSpace: loader.get('nameSpace'),
+ params: query,
+ urlParams: urlParams
+ }).then(function (records) {
+ return Ember.RSVP.all(records.map(function (record) {
+ return that._loadAllNeeds(loader, record, options, urlParams);
+ })).then(function () {
+ return records;
});
- }
-
- return model;
+ });
},
- normalizeNeed: function(name, options) {
+ normalizeNeed: function(name, needOptions, parentModel, queryParams, urlParams) {
var need = {
name: name,
type: name,
- idKey: options,
- lazy: false,
- silent: false
- };
+ idKey: needOptions,
+
+ loadType: "", // Possible values lazy, demand
+ silent: false,
+
+ //urlParams
+ //queryParams
+ },
+ overrides = {};
+
+ if(typeof needOptions === 'object') {
+ Ember.assert(`idKey not defined for need '${name}'!`, needOptions.idKey);
+
+ if(MoreObject.isFunction(needOptions.urlParams)) {
+ overrides.urlParams = needOptions.urlParams.call(needOptions, parentModel);
+ }
+ if(MoreObject.isFunction(needOptions.queryParams)) {
+ overrides.queryParams = needOptions.queryParams.call(needOptions, parentModel);
+ }
+
+ overrides = Ember.Object.create({}, needOptions, overrides);
+ }
+
+ if(queryParams) {
+ overrides.queryParams = Ember.$.extend({}, overrides.queryParams, queryParams);
+ }
+ if(urlParams) {
+ overrides.urlParams = Ember.$.extend({}, overrides.urlParams, urlParams);
+ }
+
+ return Ember.Object.create(need, overrides);
+ },
+
+ _loadNeed: function (loader, parentModel, needOptions, options) {
+ var needLoader = loader.queryRecord(
+ needOptions.type,
+ parentModel.get(needOptions.idKey),
+ options,
+ needOptions.queryParams,
+ needOptions.urlParams
+ );
+
+ needLoader.then(function (model) {
+ parentModel.set(needOptions.name, model);
+ });
+
+ if(needOptions.silent) {
+ needLoader = needLoader.catch(function () {
+ parentModel.set(needOptions.name, null);
+ });
+ }
+
+ return needLoader;
+ },
+
+ loadNeed: function (loader, parentModel, needName, options, queryParams, urlParams) {
+ var needOptions = parentModel.get(`needs.${needName}`);
+ Ember.assert(`Need '${needName}' not defined in model!`, needOptions);
+
+ needOptions = this.normalizeNeed(needName, needOptions, parentModel, queryParams, urlParams);
+ return this._loadNeed(loader, parentModel, needOptions, options);
+ },
- if(typeof options === 'object') {
- return Ember.Object.create(need, options);
+ _loadAllNeeds: function (loader, model, options/*, urlParams*/) {
+ var needsPromise = this.loadAllNeeds(loader, model, options);
+
+ if(needsPromise) {
+ return needsPromise.then(function () {
+ return model;
+ });
}
- return Ember.Object.create(need);
+ return model;
},
- loadNeeds: function (loader, parentModel, options, urlParams) {
+ loadAllNeeds: function (loader, parentModel, options, queryParams, urlParams) {
var needLoaders = [],
that = this,
needs = parentModel.get("needs");
if(needs) {
MoreObject.forEach(needs, function (name, needOptions) {
- var need = that.normalizeNeed(name, needOptions),
- needLoader = loader.queryRecord(need.type, parentModel.get(need.idKey), null, options, urlParams);
-
- needLoader.then(function (model) {
- parentModel.set(need.name, model);
- });
+ needOptions = that.normalizeNeed(name, needOptions, parentModel, queryParams, urlParams);
- if(need.silent) {
- needLoader = needLoader.catch(function () {
- parentModel.set(need.name, null);
- });
- }
+ if(needOptions.loadType !== "demand") {
+ let needLoader = that._loadNeed(loader, parentModel, needOptions, options);
- if(!need.lazy) {
- needLoaders.push(needLoader);
+ if(needOptions.loadType !== "lazy") {
+ needLoaders.push(needLoader);
+ }
}
});
}
@@ -83,3 +155,5 @@ export default Ember.Object.extend({
},
});
+
+export default Entity;
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/entities/task-am.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/entities/task-am.js b/tez-ui2/src/main/webapp/app/entities/task-am.js
new file mode 100644
index 0000000..0e41239
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/entities/task-am.js
@@ -0,0 +1,23 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import AMEntity from './am';
+
+export default AMEntity.extend({
+ queryPropertyToJoin: "taskID",
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/entities/vertex-am.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/entities/vertex-am.js b/tez-ui2/src/main/webapp/app/entities/vertex-am.js
new file mode 100644
index 0000000..15a26da
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/entities/vertex-am.js
@@ -0,0 +1,23 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import AMEntity from './am';
+
+export default AMEntity.extend({
+ queryPropertyToJoin: "vertexID",
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/initializers/entities.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/initializers/entities.js b/tez-ui2/src/main/webapp/app/initializers/entities.js
index 86d796c..b5afd31 100644
--- a/tez-ui2/src/main/webapp/app/initializers/entities.js
+++ b/tez-ui2/src/main/webapp/app/initializers/entities.js
@@ -20,6 +20,7 @@ import registerWithContainer from "ember-cli-auto-register/register";
export function initialize(application) {
registerWithContainer("entity", application);
+ application.inject('entitie', 'store', 'service:store');
}
export default {
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/mixins/auto-counter-column.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/mixins/auto-counter-column.js b/tez-ui2/src/main/webapp/app/mixins/auto-counter-column.js
index 7820e4a..0504d4b 100644
--- a/tez-ui2/src/main/webapp/app/mixins/auto-counter-column.js
+++ b/tez-ui2/src/main/webapp/app/mixins/auto-counter-column.js
@@ -39,16 +39,16 @@ export default Ember.Mixin.create({
if(records) {
records.forEach(function (record) {
- let counterGroups = Ember.get(record, 'counterGroups');
+ let counterGroupsHash = Ember.get(record, 'counterGroupsHash');
- if(counterGroups) {
- counterGroups.forEach(function (group) {
+ if(counterGroupsHash) {
+ MoreObject.forEach(counterGroupsHash, function (groupName, countersHash) {
var groupHash =
- counterHash[group.counterGroupName] =
- counterHash[group.counterGroupName] || {};
+ counterHash[groupName] =
+ counterHash[groupName] || {};
- group.counters.forEach(function (counter) {
- groupHash[counter.counterName] = counter.counterName;
+ MoreObject.forEach(countersHash, function (counterName) {
+ groupHash[counterName] = counterName;
});
});
}
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/models/abstract.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/models/abstract.js b/tez-ui2/src/main/webapp/app/models/abstract.js
index cf6ea8a..24bcbd3 100644
--- a/tez-ui2/src/main/webapp/app/models/abstract.js
+++ b/tez-ui2/src/main/webapp/app/models/abstract.js
@@ -16,6 +16,7 @@
* limitations under the License.
*/
+import Ember from 'ember';
import DS from 'ember-data';
export default DS.Model.extend({
@@ -36,4 +37,24 @@ export default DS.Model.extend({
didLoad: function () {
this.refreshLoadTime();
},
+
+ entityID: DS.attr("string"),
+
+ index: Ember.computed("entityID", function () {
+ var id = this.get("entityID") || "";
+ return id.substr(id.lastIndexOf('_') + 1);
+ }),
+
+ status: DS.attr("string"),
+ isComplete: Ember.computed("status", function () {
+ switch(this.get("status")) {
+ case "SUCCEEDED":
+ case "FINISHED":
+ case "FAILED":
+ case "KILLED":
+ return true;
+ }
+ return false;
+ }),
+
});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/models/ahs-app.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/models/ahs-app.js b/tez-ui2/src/main/webapp/app/models/ahs-app.js
index ce087eb31..c18bed9 100644
--- a/tez-ui2/src/main/webapp/app/models/ahs-app.js
+++ b/tez-ui2/src/main/webapp/app/models/ahs-app.js
@@ -22,8 +22,6 @@ import DS from 'ember-data';
import AbstractModel from './abstract';
export default AbstractModel.extend({
- entityID: DS.attr('string'),
-
attemptID: DS.attr('string'),
name: DS.attr('string'),
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/models/am-timeline.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/models/am-timeline.js b/tez-ui2/src/main/webapp/app/models/am-timeline.js
new file mode 100644
index 0000000..bfd03b3
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/models/am-timeline.js
@@ -0,0 +1,46 @@
+/*global more*/
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import Ember from 'ember';
+import DS from 'ember-data';
+
+import TimelineModel from './timeline';
+
+var MoreObject = more.Object;
+
+// For all AM related entities that can be updated from AM
+export default TimelineModel.extend({
+
+ am: DS.attr("object"), // Represents data from am
+
+ status: Ember.computed("am.status", "atsStatus", "app.status", "app.finalStatus", function () {
+ return this.get("am.status") || this._super();
+ }),
+
+ progress: Ember.computed("am.progress", "status", function () {
+ var progress = this.get("am.progress");
+ return MoreObject.isNumber(progress) ? progress : this._super();
+ }),
+
+ counterGroupsHash: Ember.computed("am.counterGroupsHash", "_counterGroups", function () {
+ var amCounters = this.get("am.counterGroupsHash"),
+ atsCounters = this._super();
+ return amCounters ? Ember.$.extend({}, atsCounters, amCounters) : atsCounters;
+ })
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/models/am.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/models/am.js b/tez-ui2/src/main/webapp/app/models/am.js
new file mode 100644
index 0000000..46ec75e
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/models/am.js
@@ -0,0 +1,31 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import DS from 'ember-data';
+
+import AbstractModel from './abstract';
+
+export default AbstractModel.extend({
+
+ entityID: DS.attr("string"),
+
+ status: DS.attr("string"),
+ progress: DS.attr("number"),
+
+ counterGroupsHash: DS.attr("object")
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/models/app-rm.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/models/app-rm.js b/tez-ui2/src/main/webapp/app/models/app-rm.js
new file mode 100644
index 0000000..34bf6b3
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/models/app-rm.js
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import RMModel from './rm';
+
+export default RMModel.extend({
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/models/app.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/models/app.js b/tez-ui2/src/main/webapp/app/models/app.js
index 82ffffc..6dcedd1 100644
--- a/tez-ui2/src/main/webapp/app/models/app.js
+++ b/tez-ui2/src/main/webapp/app/models/app.js
@@ -20,22 +20,6 @@ import Ember from 'ember';
import DS from 'ember-data';
import TimelineModel from './timeline';
-/*
- Inherited properties
-
- entityID - String
- appID - Computed from entityID
-
- status - String
- progress - Computed from status
-
- startTime - Number
- endTime - Number
- duration - Computed from start & end times
-
- counterGroups - Array
- counterHash - Computed from counterGroups
-*/
export default TimelineModel.extend({
appID: Ember.computed("entityID", function () {
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/models/attempt-am.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/models/attempt-am.js b/tez-ui2/src/main/webapp/app/models/attempt-am.js
new file mode 100644
index 0000000..55722b6
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/models/attempt-am.js
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import AMModel from './am';
+
+export default AMModel.extend({
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/models/attempt.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/models/attempt.js b/tez-ui2/src/main/webapp/app/models/attempt.js
index eb99169..5f865a0 100644
--- a/tez-ui2/src/main/webapp/app/models/attempt.js
+++ b/tez-ui2/src/main/webapp/app/models/attempt.js
@@ -19,45 +19,48 @@
import Ember from 'ember';
import DS from 'ember-data';
-import TimelineModel from './timeline';
-/*
- Inherited properties
+import AMTimelineModel from './am-timeline';
- entityID - String
- appID - Computed from entityID
-
- status - String
- progress - Computed from status
-
- startTime - Number
- endTime - Number
- duration - Computed from start & end times
-
- counterGroups - Array
- counterHash - Computed from counterGroups
-*/
-
-export default TimelineModel.extend({
+export default AMTimelineModel.extend({
needs: {
dag: {
type: "dag",
idKey: "dagID",
silent: true
+ },
+ am: {
+ type: "attemptAm",
+ idKey: "entityID",
+ loadType: "demand",
+ queryParams: function (model) {
+ var vertexIndex = parseInt(model.get("vertexIndex")),
+ taskIndex = parseInt(model.get("taskIndex")),
+ attemptIndex = parseInt(model.get("index"));
+ return {
+ attemptID: `${vertexIndex}_${taskIndex}_${attemptIndex}`,
+ dagID: parseInt(model.get("dag.index")),
+ counters: "*"
+ };
+ },
+ urlParams: function (model) {
+ return {
+ app_id: model.get("appID")
+ };
+ }
}
},
- index: Ember.computed("entityID", function () {
- var idParts = this.get("entityID").split("_");
- return idParts[Math.max(idParts.length - 1, 1)];
- }),
-
taskID: DS.attr('string'),
taskIndex: Ember.computed("taskID", function () {
- var idParts = this.get("taskID").split("_");
- return idParts.slice(Math.max(idParts.length - 2, 1)).join("_");
+ var id = this.get("taskID") || "";
+ return id.substr(id.lastIndexOf('_') + 1);
}),
vertexID: DS.attr('string'),
+ vertexIndex: Ember.computed("vertexID", function () {
+ var id = this.get("vertexID") || "";
+ return id.substr(id.lastIndexOf('_') + 1);
+ }),
vertexName: Ember.computed("vertexID", "dag", function () {
var vertexID = this.get("vertexID");
return this.get(`dag.vertexIdNameMap.${vertexID}`);
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/models/dag-am.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/models/dag-am.js b/tez-ui2/src/main/webapp/app/models/dag-am.js
new file mode 100644
index 0000000..55722b6
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/models/dag-am.js
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import AMModel from './am';
+
+export default AMModel.extend({
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/models/dag.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/models/dag.js b/tez-ui2/src/main/webapp/app/models/dag.js
index e0a4b55..bb4c5df 100644
--- a/tez-ui2/src/main/webapp/app/models/dag.js
+++ b/tez-ui2/src/main/webapp/app/models/dag.js
@@ -19,25 +19,28 @@
import Ember from 'ember';
import DS from 'ember-data';
-import TimelineModel from './timeline';
-/*
- Inherited properties
+import AMTimelineModel from './am-timeline';
+
+export default AMTimelineModel.extend({
+ needs: {
+ am: {
+ type: "dagAm",
+ idKey: "entityID",
+ loadType: "demand",
+ queryParams: function (model) {
+ return {
+ dagID: parseInt(model.get("index")),
+ counters: "*"
+ };
+ },
+ urlParams: function (model) {
+ return {
+ app_id: model.get("appID")
+ };
+ }
+ }
+ },
- entityID - String
- appID - Computed from entityID
-
- status - String
- progress - Computed from status
-
- startTime - Number
- endTime - Number
- duration - Computed from start & end times
-
- counterGroups - Array
- counterHash - Computed from counterGroups
-*/
-
-export default TimelineModel.extend({
name: DS.attr("string"),
submitter: DS.attr("string"),
http://git-wip-us.apache.org/repos/asf/tez/blob/6f366403/tez-ui2/src/main/webapp/app/models/rm.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/app/models/rm.js b/tez-ui2/src/main/webapp/app/models/rm.js
new file mode 100644
index 0000000..d35ba23
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/models/rm.js
@@ -0,0 +1,26 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import DS from 'ember-data';
+
+import AbstractModel from './abstract';
+
+export default AbstractModel.extend({
+ entityID: DS.attr("string"),
+ status: DS.attr("string"),
+});