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/02/24 23:35:00 UTC
[23/45] tez git commit: TEZ-3042. Tez UI 2: Create Counters pages
(sree)
TEZ-3042. Tez UI 2: Create Counters pages (sree)
Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/a3a4637a
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/a3a4637a
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/a3a4637a
Branch: refs/heads/TEZ-2980
Commit: a3a4637a73ab7a7ad189bb4870e8e152bd723ba3
Parents: a42b6f6
Author: Sreenath Somarajapuram <sr...@apache.org>
Authored: Tue Jan 19 14:38:20 2016 +0530
Committer: Sreenath Somarajapuram <sr...@apache.org>
Committed: Thu Feb 25 03:32:16 2016 +0530
----------------------------------------------------------------------
TEZ-2980-CHANGES.txt | 1 +
.../src/main/webapp/app/controllers/attempt.js | 3 +
.../webapp/app/controllers/attempt/counters.js | 26 ++++++
.../webapp/app/controllers/counters-page.js | 63 +++++++++++++
tez-ui2/src/main/webapp/app/controllers/dag.js | 3 +
.../main/webapp/app/controllers/dag/counters.js | 26 ++++++
tez-ui2/src/main/webapp/app/controllers/task.js | 3 +
.../webapp/app/controllers/task/counters.js | 26 ++++++
.../src/main/webapp/app/controllers/vertex.js | 3 +
.../webapp/app/controllers/vertex/counters.js | 26 ++++++
tez-ui2/src/main/webapp/app/router.js | 7 +-
.../main/webapp/app/routes/attempt/counters.js | 33 +++++++
.../src/main/webapp/app/routes/dag/counters.js | 34 +++++++
.../src/main/webapp/app/routes/task/counters.js | 33 +++++++
.../main/webapp/app/routes/vertex/counters.js | 33 +++++++
.../webapp/app/templates/attempt/counters.hbs | 34 +++++++
.../main/webapp/app/templates/dag/counters.hbs | 34 +++++++
.../main/webapp/app/templates/task/counters.hbs | 34 +++++++
.../webapp/app/templates/vertex/counters.hbs | 34 +++++++
.../unit/controllers/attempt/counters-test.js | 35 ++++++++
.../unit/controllers/counters-page-test.js | 95 ++++++++++++++++++++
.../tests/unit/controllers/dag/counters-test.js | 35 ++++++++
.../unit/controllers/task/counters-test.js | 35 ++++++++
.../unit/controllers/vertex/counters-test.js | 35 ++++++++
.../tests/unit/routes/attempt/counters-test.js | 45 ++++++++++
.../tests/unit/routes/dag/counters-test.js | 46 ++++++++++
.../tests/unit/routes/task/counters-test.js | 45 ++++++++++
.../tests/unit/routes/vertex/counters-test.js | 45 ++++++++++
28 files changed, 871 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/TEZ-2980-CHANGES.txt
----------------------------------------------------------------------
diff --git a/TEZ-2980-CHANGES.txt b/TEZ-2980-CHANGES.txt
index 65fdcb5..a79198e 100644
--- a/TEZ-2980-CHANGES.txt
+++ b/TEZ-2980-CHANGES.txt
@@ -19,3 +19,4 @@ ALL CHANGES:
TEZ-3041. Tez UI 2: Create Task & Attempt details page with sub tables
TEZ-3045. Tez UI 2: Create application details page with DAGs tab
TEZ-3048. Tez UI 2: Make PhantomJS a local dependency for build tests
+ TEZ-3042. Tez UI 2: Create Counters pages
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/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 f17e317..64c8a67 100644
--- a/tez-ui2/src/main/webapp/app/controllers/attempt.js
+++ b/tez-ui2/src/main/webapp/app/controllers/attempt.js
@@ -49,5 +49,8 @@ export default AbstractController.extend({
tabs: [{
text: "Attempt Details",
routeName: "attempt.index"
+ },{
+ text: "Attempt Counters",
+ routeName: "attempt.counters"
}]
});
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/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
new file mode 100644
index 0000000..9442838
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/controllers/attempt/counters.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 CountersPageController from '../counters-page';
+
+export default CountersPageController.extend({
+ breadcrumbs: [{
+ text: "Attempt Counters",
+ routeName: "attempt.counters",
+ }],
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/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
new file mode 100644
index 0000000..ef22ef1
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/controllers/counters-page.js
@@ -0,0 +1,63 @@
+/**
+ * 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/a3a4637a/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 732a0df..14f9df6 100644
--- a/tez-ui2/src/main/webapp/app/controllers/dag.js
+++ b/tez-ui2/src/main/webapp/app/controllers/dag.js
@@ -35,6 +35,9 @@ export default AbstractController.extend({
text: "DAG Details",
routeName: "dag.index"
}, {
+ text: "DAG Counters",
+ routeName: "dag.counters"
+ }, {
text: "All Vertices",
routeName: "dag.vertices"
}, {
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/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
new file mode 100644
index 0000000..c4fbea6
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/controllers/dag/counters.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 CountersPageController from '../counters-page';
+
+export default CountersPageController.extend({
+ breadcrumbs: [{
+ text: "DAG Counters",
+ routeName: "dag.counters",
+ }],
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/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 5b2510c..2092162 100644
--- a/tez-ui2/src/main/webapp/app/controllers/task.js
+++ b/tez-ui2/src/main/webapp/app/controllers/task.js
@@ -45,6 +45,9 @@ export default AbstractController.extend({
text: "Task Details",
routeName: "task.index"
}, {
+ text: "Task Counters",
+ routeName: "task.counters"
+ }, {
text: "Task Attempts",
routeName: "task.attempts"
}]
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/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
new file mode 100644
index 0000000..b9c00e3
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/controllers/task/counters.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 CountersPageController from '../counters-page';
+
+export default CountersPageController.extend({
+ breadcrumbs: [{
+ text: "Task Counters",
+ routeName: "task.counters",
+ }],
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/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 946eaa5..5543924 100644
--- a/tez-ui2/src/main/webapp/app/controllers/vertex.js
+++ b/tez-ui2/src/main/webapp/app/controllers/vertex.js
@@ -40,6 +40,9 @@ export default AbstractController.extend({
text: "Vertex Details",
routeName: "vertex.index"
}, {
+ text: "Vertex Counters",
+ routeName: "vertex.counters"
+ }, {
text: "Tasks",
routeName: "vertex.tasks"
}, {
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/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
new file mode 100644
index 0000000..245ae1b
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/controllers/vertex/counters.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 CountersPageController from '../counters-page';
+
+export default CountersPageController.extend({
+ breadcrumbs: [{
+ text: "Vertex Counters",
+ routeName: "vertex.counters",
+ }],
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/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 d619e42..0193672 100644
--- a/tez-ui2/src/main/webapp/app/router.js
+++ b/tez-ui2/src/main/webapp/app/router.js
@@ -29,15 +29,20 @@ Router.map(function() {
this.route('vertices');
this.route('tasks');
this.route('attempts');
+ this.route('counters');
});
this.route('vertex', {path: '/vertex/:vertex_id'}, function() {
this.route('tasks');
this.route('attempts');
+ this.route('counters');
});
this.route('task', {path: '/task/:task_id'}, function() {
this.route('attempts');
+ this.route('counters');
+ });
+ this.route('attempt', {path: '/attempt/:attempt_id'}, function () {
+ this.route('counters');
});
- this.route('attempt', {path: '/attempt/:attempt_id'}, function () {});
this.route('app', {path: '/app/:app_id'}, function () {
this.route('dags');
});
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/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
new file mode 100644
index 0000000..f88737d
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/routes/attempt/counters.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 AbstractRoute from '../abstract';
+
+export default AbstractRoute.extend({
+ title: "DAG Details",
+
+ setupController: function (controller, model) {
+ this._super(controller, model);
+ Ember.run.later(this, "startCrumbBubble");
+ },
+
+ load: function (/*value, query*/) {
+ return this.get("loader").queryRecord('attempt', this.modelFor("attempt").id);
+ },
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/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
new file mode 100644
index 0000000..90929d0
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/routes/dag/counters.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 AbstractRoute from '../abstract';
+
+export default AbstractRoute.extend({
+ title: "DAG Details",
+
+ setupController: function (controller, model) {
+ this._super(controller, model);
+ Ember.run.later(this, "startCrumbBubble");
+ },
+
+ load: function (/*value, query*/) {
+ return this.get("loader").queryRecord('dag', this.modelFor("dag").id);
+ },
+
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/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
new file mode 100644
index 0000000..fd76df9
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/routes/task/counters.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 AbstractRoute from '../abstract';
+
+export default AbstractRoute.extend({
+ title: "DAG Details",
+
+ setupController: function (controller, model) {
+ this._super(controller, model);
+ Ember.run.later(this, "startCrumbBubble");
+ },
+
+ load: function (/*value, query*/) {
+ return this.get("loader").queryRecord('task', this.modelFor("task").id);
+ },
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/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
new file mode 100644
index 0000000..d05e5f6
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/routes/vertex/counters.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 AbstractRoute from '../abstract';
+
+export default AbstractRoute.extend({
+ title: "DAG Details",
+
+ setupController: function (controller, model) {
+ this._super(controller, model);
+ Ember.run.later(this, "startCrumbBubble");
+ },
+
+ load: function (/*value, query*/) {
+ return this.get("loader").queryRecord('vertex', this.modelFor("vertex").id);
+ },
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/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
new file mode 100644
index 0000000..e590b36
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/templates/attempt/counters.hbs
@@ -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.
+}}
+
+{{#if loaded}}
+ {{em-table
+ columns=columns
+ rows=counters
+
+ rowCount=counters.length
+ definition=definition
+
+ enablePagination=false
+
+ searchAction="searchChanged"
+ sortAction="sortChanged"
+ }}
+{{else}}
+ {{partial "partials/loading-anim"}}
+{{/if}}
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/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
new file mode 100644
index 0000000..e590b36
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/templates/dag/counters.hbs
@@ -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.
+}}
+
+{{#if loaded}}
+ {{em-table
+ columns=columns
+ rows=counters
+
+ rowCount=counters.length
+ definition=definition
+
+ enablePagination=false
+
+ searchAction="searchChanged"
+ sortAction="sortChanged"
+ }}
+{{else}}
+ {{partial "partials/loading-anim"}}
+{{/if}}
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/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
new file mode 100644
index 0000000..e590b36
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/templates/task/counters.hbs
@@ -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.
+}}
+
+{{#if loaded}}
+ {{em-table
+ columns=columns
+ rows=counters
+
+ rowCount=counters.length
+ definition=definition
+
+ enablePagination=false
+
+ searchAction="searchChanged"
+ sortAction="sortChanged"
+ }}
+{{else}}
+ {{partial "partials/loading-anim"}}
+{{/if}}
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/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
new file mode 100644
index 0000000..e590b36
--- /dev/null
+++ b/tez-ui2/src/main/webapp/app/templates/vertex/counters.hbs
@@ -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.
+}}
+
+{{#if loaded}}
+ {{em-table
+ columns=columns
+ rows=counters
+
+ rowCount=counters.length
+ definition=definition
+
+ enablePagination=false
+
+ searchAction="searchChanged"
+ sortAction="sortChanged"
+ }}
+{{else}}
+ {{partial "partials/loading-anim"}}
+{{/if}}
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/tez-ui2/src/main/webapp/tests/unit/controllers/attempt/counters-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/controllers/attempt/counters-test.js b/tez-ui2/src/main/webapp/tests/unit/controllers/attempt/counters-test.js
new file mode 100644
index 0000000..0231fa6
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/controllers/attempt/counters-test.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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('controller:attempt/counters', 'Unit | Controller | vertex/index', {
+ // 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
+ });
+
+ assert.ok(controller);
+ assert.ok(controller.breadcrumbs);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/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
new file mode 100644
index 0000000..44a888e
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/controllers/counters-page-test.js
@@ -0,0 +1,95 @@
+/**
+ * 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
+ });
+
+ assert.ok(controller);
+ assert.ok(controller.columns);
+ assert.ok(controller.counters);
+});
+
+test('counters test', function(assert) {
+ let controller = this.subject({
+ send: 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");
+});
+
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/tez-ui2/src/main/webapp/tests/unit/controllers/dag/counters-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/controllers/dag/counters-test.js b/tez-ui2/src/main/webapp/tests/unit/controllers/dag/counters-test.js
new file mode 100644
index 0000000..982bea0
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/controllers/dag/counters-test.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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('controller:dag/counters', 'Unit | Controller | vertex/index', {
+ // 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
+ });
+
+ assert.ok(controller);
+ assert.ok(controller.breadcrumbs);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/tez-ui2/src/main/webapp/tests/unit/controllers/task/counters-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/controllers/task/counters-test.js b/tez-ui2/src/main/webapp/tests/unit/controllers/task/counters-test.js
new file mode 100644
index 0000000..e4f2532
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/controllers/task/counters-test.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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('controller:task/counters', 'Unit | Controller | vertex/index', {
+ // 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
+ });
+
+ assert.ok(controller);
+ assert.ok(controller.breadcrumbs);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/tez-ui2/src/main/webapp/tests/unit/controllers/vertex/counters-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/controllers/vertex/counters-test.js b/tez-ui2/src/main/webapp/tests/unit/controllers/vertex/counters-test.js
new file mode 100644
index 0000000..83d946c
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/controllers/vertex/counters-test.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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('controller:vertex/counters', 'Unit | Controller | vertex/index', {
+ // 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
+ });
+
+ assert.ok(controller);
+ assert.ok(controller.breadcrumbs);
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/tez-ui2/src/main/webapp/tests/unit/routes/attempt/counters-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/routes/attempt/counters-test.js b/tez-ui2/src/main/webapp/tests/unit/routes/attempt/counters-test.js
new file mode 100644
index 0000000..5a65685
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/routes/attempt/counters-test.js
@@ -0,0 +1,45 @@
+/**
+ * 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:attempt/counters', 'Unit | Route | vertex/index', {
+ // 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.title);
+ assert.ok(route.setupController);
+ assert.ok(route.load);
+});
+
+test('setupController test', function(assert) {
+ assert.expect(1);
+
+ let route = this.subject({
+ startCrumbBubble: function () {
+ assert.ok(true);
+ }
+ });
+
+ route.setupController({}, {});
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/tez-ui2/src/main/webapp/tests/unit/routes/dag/counters-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/routes/dag/counters-test.js b/tez-ui2/src/main/webapp/tests/unit/routes/dag/counters-test.js
new file mode 100644
index 0000000..24940b2
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/routes/dag/counters-test.js
@@ -0,0 +1,46 @@
+/**
+ * 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:dag/counters', 'Unit | Route | dag/index', {
+ // 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.title);
+ assert.ok(route.setupController);
+ assert.ok(route.load);
+});
+
+test('setupController test', function(assert) {
+ assert.expect(1);
+
+ let route = this.subject({
+ startCrumbBubble: function () {
+ assert.ok(true);
+ }
+ });
+
+ route.setupController({}, {});
+});
+
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/tez-ui2/src/main/webapp/tests/unit/routes/task/counters-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/routes/task/counters-test.js b/tez-ui2/src/main/webapp/tests/unit/routes/task/counters-test.js
new file mode 100644
index 0000000..472a635
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/routes/task/counters-test.js
@@ -0,0 +1,45 @@
+/**
+ * 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:task/counters', 'Unit | Route | vertex/index', {
+ // 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.title);
+ assert.ok(route.setupController);
+ assert.ok(route.load);
+});
+
+test('setupController test', function(assert) {
+ assert.expect(1);
+
+ let route = this.subject({
+ startCrumbBubble: function () {
+ assert.ok(true);
+ }
+ });
+
+ route.setupController({}, {});
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/a3a4637a/tez-ui2/src/main/webapp/tests/unit/routes/vertex/counters-test.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/tests/unit/routes/vertex/counters-test.js b/tez-ui2/src/main/webapp/tests/unit/routes/vertex/counters-test.js
new file mode 100644
index 0000000..ec33b8a
--- /dev/null
+++ b/tez-ui2/src/main/webapp/tests/unit/routes/vertex/counters-test.js
@@ -0,0 +1,45 @@
+/**
+ * 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:vertex/counters', 'Unit | Route | vertex/index', {
+ // 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.title);
+ assert.ok(route.setupController);
+ assert.ok(route.load);
+});
+
+test('setupController test', function(assert) {
+ assert.expect(1);
+
+ let route = this.subject({
+ startCrumbBubble: function () {
+ assert.ok(true);
+ }
+ });
+
+ route.setupController({}, {});
+});