TEZ-3043. Tez UI 2: Create configurations page (sree)
Project: http://git-wip-us.apache.org/repos/asf/tez/repo Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/90ac7cc5 Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/90ac7cc5 Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/90ac7cc5 Branch: refs/heads/master Commit: 90ac7cc5dd4c64099ff00a8fd4e8466f20543f36 Parents: a3a4637 Author: Sreenath Somarajapuram <s...@apache.org> Authored: Tue Jan 19 16:07:26 2016 +0530 Committer: Sreenath Somarajapuram <s...@apache.org> Committed: Thu Feb 25 03:32:16 2016 +0530 ---------------------------------------------------------------------- TEZ-2980-CHANGES.txt | 1 + tez-ui2/src/main/webapp/app/controllers/app.js | 3 + .../main/webapp/app/controllers/app/configs.js | 60 ++++++++++++++++++++ tez-ui2/src/main/webapp/app/models/app.js | 2 + tez-ui2/src/main/webapp/app/router.js | 1 + .../src/main/webapp/app/routes/app/configs.js | 33 +++++++++++ tez-ui2/src/main/webapp/app/serializers/app.js | 2 + .../main/webapp/app/templates/app/configs.hbs | 34 +++++++++++ .../main/webapp/tests/unit/adapters/app-test.js | 2 +- .../tests/unit/controllers/app/configs-test.js | 39 +++++++++++++ .../tests/unit/controllers/app/dags-test.js | 2 +- .../tests/unit/controllers/app/index-test.js | 2 +- .../tests/unit/controllers/attempt-test.js | 2 +- .../unit/controllers/attempt/counters-test.js | 2 +- .../unit/controllers/attempt/index-test.js | 2 +- .../tests/unit/controllers/dag/counters-test.js | 2 +- .../webapp/tests/unit/controllers/task-test.js | 2 +- .../unit/controllers/task/attempts-test.js | 2 +- .../unit/controllers/task/counters-test.js | 2 +- .../tests/unit/controllers/task/index-test.js | 2 +- .../unit/controllers/vertex/counters-test.js | 2 +- .../main/webapp/tests/unit/models/app-test.js | 2 +- .../tests/unit/routes/app/configs-test.js | 45 +++++++++++++++ .../webapp/tests/unit/routes/app/dags-test.js | 2 +- .../webapp/tests/unit/routes/app/index-test.js | 2 +- .../webapp/tests/unit/routes/attempt-test.js | 2 +- .../tests/unit/routes/attempt/counters-test.js | 2 +- .../tests/unit/routes/attempt/index-test.js | 2 +- .../tests/unit/routes/dag/counters-test.js | 2 +- .../main/webapp/tests/unit/routes/task-test.js | 2 +- .../tests/unit/routes/task/attempts-test.js | 2 +- .../tests/unit/routes/task/counters-test.js | 2 +- .../webapp/tests/unit/routes/task/index-test.js | 2 +- .../tests/unit/routes/vertex/counters-test.js | 2 +- .../webapp/tests/unit/serializers/app-test.js | 2 +- 35 files changed, 245 insertions(+), 25 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/TEZ-2980-CHANGES.txt ---------------------------------------------------------------------- diff --git a/TEZ-2980-CHANGES.txt b/TEZ-2980-CHANGES.txt index a79198e..c1fd7ae 100644 --- a/TEZ-2980-CHANGES.txt +++ b/TEZ-2980-CHANGES.txt @@ -20,3 +20,4 @@ ALL CHANGES: 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 + TEZ-3043. Tez UI 2: Create configurations page http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/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 95159c5..8333220 100644 --- a/tez-ui2/src/main/webapp/app/controllers/app.js +++ b/tez-ui2/src/main/webapp/app/controllers/app.js @@ -37,5 +37,8 @@ export default AbstractController.extend({ }, { text: "DAGs", routeName: "app.dags" + }, { + text: "Configurations", + routeName: "app.configs" }] }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/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 new file mode 100644 index 0000000..517d43b --- /dev/null +++ b/tez-ui2/src/main/webapp/app/controllers/app/configs.js @@ -0,0 +1,60 @@ +/*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 TablePageController from '../table-page'; +import ColumnDefinition from 'em-table/utils/column-definition'; + +var MoreObject = more.Object; + +export default TablePageController.extend({ + searchText: "tez", + + breadcrumbs: [{ + text: "Configurations", + routeName: "app.configs", + }], + + columns: ColumnDefinition.make([{ + id: 'configName', + headerTitle: 'Configuration Name', + contentPath: 'configName', + }, { + id: 'configValue', + headerTitle: 'Configuration Value', + contentPath: 'configValue', + }]), + + configs: Ember.computed("model.configs", function () { + var configs = this.get("model.configs"), + configRows = []; + + if(configs) { + MoreObject.forEach(configs, function (key, value) { + configRows.push(Ember.Object.create({ + configName: key, + configValue: value + })); + }); + } + + return Ember.A(configRows); + }) +}); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/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 42fa1c5..82ffffc 100644 --- a/tez-ui2/src/main/webapp/app/models/app.js +++ b/tez-ui2/src/main/webapp/app/models/app.js @@ -49,4 +49,6 @@ export default TimelineModel.extend({ buildTime: DS.attr("string"), tezRevision: DS.attr("string"), tezVersion: DS.attr("string"), + + configs: DS.attr("object"), }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/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 0193672..4e8cb0b 100644 --- a/tez-ui2/src/main/webapp/app/router.js +++ b/tez-ui2/src/main/webapp/app/router.js @@ -45,6 +45,7 @@ Router.map(function() { }); this.route('app', {path: '/app/:app_id'}, function () { this.route('dags'); + this.route('configs'); }); }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/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 new file mode 100644 index 0000000..b6768fa --- /dev/null +++ b/tez-ui2/src/main/webapp/app/routes/app/configs.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: "Application Details", + + setupController: function (controller, model) { + this._super(controller, model); + Ember.run.later(this, "startCrumbBubble"); + }, + + load: function (/*value, query*/) { + return this.get("loader").queryRecord('app', this.modelFor("app").id); + }, +}); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/tez-ui2/src/main/webapp/app/serializers/app.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/serializers/app.js b/tez-ui2/src/main/webapp/app/serializers/app.js index 86d8fa0..0d05c6c 100644 --- a/tez-ui2/src/main/webapp/app/serializers/app.js +++ b/tez-ui2/src/main/webapp/app/serializers/app.js @@ -26,5 +26,7 @@ export default TimelineSerializer.extend({ buildTime: 'otherinfo.tezVersion.buildTime', tezRevision: 'otherinfo.tezVersion.revision', tezVersion: 'otherinfo.tezVersion.version', + + configs: 'otherinfo.config', } }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/tez-ui2/src/main/webapp/app/templates/app/configs.hbs ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/templates/app/configs.hbs b/tez-ui2/src/main/webapp/app/templates/app/configs.hbs new file mode 100644 index 0000000..8617c81 --- /dev/null +++ b/tez-ui2/src/main/webapp/app/templates/app/configs.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=configs + + rowCount=configs.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/90ac7cc5/tez-ui2/src/main/webapp/tests/unit/adapters/app-test.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/tests/unit/adapters/app-test.js b/tez-ui2/src/main/webapp/tests/unit/adapters/app-test.js index dd2db50..08d2c44 100644 --- a/tez-ui2/src/main/webapp/tests/unit/adapters/app-test.js +++ b/tez-ui2/src/main/webapp/tests/unit/adapters/app-test.js @@ -18,7 +18,7 @@ import { moduleFor, test } from 'ember-qunit'; -moduleFor('adapter:app', 'Unit | Adapter | dag', { +moduleFor('adapter:app', 'Unit | Adapter | app', { // Specify the other units that are required for this test. // needs: ['serializer:foo'] }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/tez-ui2/src/main/webapp/tests/unit/controllers/app/configs-test.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/tests/unit/controllers/app/configs-test.js b/tez-ui2/src/main/webapp/tests/unit/controllers/app/configs-test.js new file mode 100644 index 0000000..c04e5c2 --- /dev/null +++ b/tez-ui2/src/main/webapp/tests/unit/controllers/app/configs-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 Ember from 'ember'; + +import { moduleFor, test } from 'ember-qunit'; + +moduleFor('controller:app/configs', 'Unit | Controller | app/configs', { + // 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); + assert.ok(controller.columns); + assert.ok(controller.configs); + + assert.ok(controller.get("searchText"), "tez"); +}); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/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 10ba8a3..c3e5c2b 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 @@ -20,7 +20,7 @@ import Ember from 'ember'; import { moduleFor, test } from 'ember-qunit'; -moduleFor('controller:app/dags', 'Unit | Controller | vertex/attempts', { +moduleFor('controller:app/dags', 'Unit | Controller | app/dags', { // Specify the other units that are required for this test. // needs: ['controller:foo'] }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/tez-ui2/src/main/webapp/tests/unit/controllers/app/index-test.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/tests/unit/controllers/app/index-test.js b/tez-ui2/src/main/webapp/tests/unit/controllers/app/index-test.js index c2004ba..641a415 100644 --- a/tez-ui2/src/main/webapp/tests/unit/controllers/app/index-test.js +++ b/tez-ui2/src/main/webapp/tests/unit/controllers/app/index-test.js @@ -20,7 +20,7 @@ import Ember from 'ember'; import { moduleFor, test } from 'ember-qunit'; -moduleFor('controller:app/index', 'Unit | Controller | vertex/index', { +moduleFor('controller:app/index', 'Unit | Controller | app/index', { // Specify the other units that are required for this test. // needs: ['controller:foo'] }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/tez-ui2/src/main/webapp/tests/unit/controllers/attempt-test.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/tests/unit/controllers/attempt-test.js b/tez-ui2/src/main/webapp/tests/unit/controllers/attempt-test.js index 32c6347..9408204 100644 --- a/tez-ui2/src/main/webapp/tests/unit/controllers/attempt-test.js +++ b/tez-ui2/src/main/webapp/tests/unit/controllers/attempt-test.js @@ -20,7 +20,7 @@ import Ember from 'ember'; import { moduleFor, test } from 'ember-qunit'; -moduleFor('controller:attempt', 'Unit | Controller | vertex', { +moduleFor('controller:attempt', 'Unit | Controller | attempt', { // Specify the other units that are required for this test. // needs: ['controller:foo'] }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/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 index 0231fa6..9b94804 100644 --- 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 @@ -20,7 +20,7 @@ import Ember from 'ember'; import { moduleFor, test } from 'ember-qunit'; -moduleFor('controller:attempt/counters', 'Unit | Controller | vertex/index', { +moduleFor('controller:attempt/counters', 'Unit | Controller | attempt/counters', { // Specify the other units that are required for this test. // needs: ['controller:foo'] }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/tez-ui2/src/main/webapp/tests/unit/controllers/attempt/index-test.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/tests/unit/controllers/attempt/index-test.js b/tez-ui2/src/main/webapp/tests/unit/controllers/attempt/index-test.js index b20e402..00e2c9e 100644 --- a/tez-ui2/src/main/webapp/tests/unit/controllers/attempt/index-test.js +++ b/tez-ui2/src/main/webapp/tests/unit/controllers/attempt/index-test.js @@ -20,7 +20,7 @@ import Ember from 'ember'; import { moduleFor, test } from 'ember-qunit'; -moduleFor('controller:attempt/index', 'Unit | Controller | vertex/index', { +moduleFor('controller:attempt/index', 'Unit | Controller | attempt/index', { // Specify the other units that are required for this test. // needs: ['controller:foo'] }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/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 index 982bea0..a90df3c 100644 --- 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 @@ -20,7 +20,7 @@ import Ember from 'ember'; import { moduleFor, test } from 'ember-qunit'; -moduleFor('controller:dag/counters', 'Unit | Controller | vertex/index', { +moduleFor('controller:dag/counters', 'Unit | Controller | dag/counters', { // Specify the other units that are required for this test. // needs: ['controller:foo'] }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/tez-ui2/src/main/webapp/tests/unit/controllers/task-test.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/tests/unit/controllers/task-test.js b/tez-ui2/src/main/webapp/tests/unit/controllers/task-test.js index f59817e..0a5bed1 100644 --- a/tez-ui2/src/main/webapp/tests/unit/controllers/task-test.js +++ b/tez-ui2/src/main/webapp/tests/unit/controllers/task-test.js @@ -20,7 +20,7 @@ import Ember from 'ember'; import { moduleFor, test } from 'ember-qunit'; -moduleFor('controller:task', 'Unit | Controller | vertex', { +moduleFor('controller:task', 'Unit | Controller | task', { // Specify the other units that are required for this test. // needs: ['controller:foo'] }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/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 bf389da..fb9439f 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 @@ -20,7 +20,7 @@ import Ember from 'ember'; import { moduleFor, test } from 'ember-qunit'; -moduleFor('controller:task/attempts', 'Unit | Controller | vertex/attempts', { +moduleFor('controller:task/attempts', 'Unit | Controller | task/attempts', { // Specify the other units that are required for this test. // needs: ['controller:foo'] }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/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 index e4f2532..fb453f7 100644 --- 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 @@ -20,7 +20,7 @@ import Ember from 'ember'; import { moduleFor, test } from 'ember-qunit'; -moduleFor('controller:task/counters', 'Unit | Controller | vertex/index', { +moduleFor('controller:task/counters', 'Unit | Controller | task/counters', { // Specify the other units that are required for this test. // needs: ['controller:foo'] }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/tez-ui2/src/main/webapp/tests/unit/controllers/task/index-test.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/tests/unit/controllers/task/index-test.js b/tez-ui2/src/main/webapp/tests/unit/controllers/task/index-test.js index e3014ae..a229ee9 100644 --- a/tez-ui2/src/main/webapp/tests/unit/controllers/task/index-test.js +++ b/tez-ui2/src/main/webapp/tests/unit/controllers/task/index-test.js @@ -20,7 +20,7 @@ import Ember from 'ember'; import { moduleFor, test } from 'ember-qunit'; -moduleFor('controller:task/index', 'Unit | Controller | vertex/index', { +moduleFor('controller:task/index', 'Unit | Controller | task/index', { // Specify the other units that are required for this test. // needs: ['controller:foo'] }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/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 index 83d946c..cc73e6c 100644 --- 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 @@ -20,7 +20,7 @@ import Ember from 'ember'; import { moduleFor, test } from 'ember-qunit'; -moduleFor('controller:vertex/counters', 'Unit | Controller | vertex/index', { +moduleFor('controller:vertex/counters', 'Unit | Controller | vertex/counters', { // Specify the other units that are required for this test. // needs: ['controller:foo'] }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/tez-ui2/src/main/webapp/tests/unit/models/app-test.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/tests/unit/models/app-test.js b/tez-ui2/src/main/webapp/tests/unit/models/app-test.js index e0fb7f0..06d7386 100644 --- a/tez-ui2/src/main/webapp/tests/unit/models/app-test.js +++ b/tez-ui2/src/main/webapp/tests/unit/models/app-test.js @@ -18,7 +18,7 @@ import { moduleForModel, test } from 'ember-qunit'; -moduleForModel('app', 'Unit | Model | task', { +moduleForModel('app', 'Unit | Model | app', { // Specify the other units that are required for this test. needs: [] }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/tez-ui2/src/main/webapp/tests/unit/routes/app/configs-test.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/tests/unit/routes/app/configs-test.js b/tez-ui2/src/main/webapp/tests/unit/routes/app/configs-test.js new file mode 100644 index 0000000..9ca6a7a --- /dev/null +++ b/tez-ui2/src/main/webapp/tests/unit/routes/app/configs-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:app/configs', 'Unit | Route | app/configs', { + // 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/90ac7cc5/tez-ui2/src/main/webapp/tests/unit/routes/app/dags-test.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/tests/unit/routes/app/dags-test.js b/tez-ui2/src/main/webapp/tests/unit/routes/app/dags-test.js index 05c1436..f7ac141 100644 --- a/tez-ui2/src/main/webapp/tests/unit/routes/app/dags-test.js +++ b/tez-ui2/src/main/webapp/tests/unit/routes/app/dags-test.js @@ -18,7 +18,7 @@ import { moduleFor, test } from 'ember-qunit'; -moduleFor('route:app/dags', 'Unit | Route | vertex/attempts', { +moduleFor('route:app/dags', 'Unit | Route | app/dags', { // Specify the other units that are required for this test. // needs: ['controller:foo'] }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/tez-ui2/src/main/webapp/tests/unit/routes/app/index-test.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/tests/unit/routes/app/index-test.js b/tez-ui2/src/main/webapp/tests/unit/routes/app/index-test.js index 83697f4..2ea4415 100644 --- a/tez-ui2/src/main/webapp/tests/unit/routes/app/index-test.js +++ b/tez-ui2/src/main/webapp/tests/unit/routes/app/index-test.js @@ -18,7 +18,7 @@ import { moduleFor, test } from 'ember-qunit'; -moduleFor('route:app/index', 'Unit | Route | vertex/index', { +moduleFor('route:app/index', 'Unit | Route | app/index', { // Specify the other units that are required for this test. // needs: ['controller:foo'] }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/tez-ui2/src/main/webapp/tests/unit/routes/attempt-test.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/tests/unit/routes/attempt-test.js b/tez-ui2/src/main/webapp/tests/unit/routes/attempt-test.js index dbfe590..a5eb447 100644 --- a/tez-ui2/src/main/webapp/tests/unit/routes/attempt-test.js +++ b/tez-ui2/src/main/webapp/tests/unit/routes/attempt-test.js @@ -18,7 +18,7 @@ import { moduleFor, test } from 'ember-qunit'; -moduleFor('route:attempt', 'Unit | Route | vertex', { +moduleFor('route:attempt', 'Unit | Route | attempt', { // Specify the other units that are required for this test. // needs: ['controller:foo'] }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/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 index 5a65685..32d808d 100644 --- 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 @@ -18,7 +18,7 @@ import { moduleFor, test } from 'ember-qunit'; -moduleFor('route:attempt/counters', 'Unit | Route | vertex/index', { +moduleFor('route:attempt/counters', 'Unit | Route | attempt/counters', { // Specify the other units that are required for this test. // needs: ['controller:foo'] }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/tez-ui2/src/main/webapp/tests/unit/routes/attempt/index-test.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/tests/unit/routes/attempt/index-test.js b/tez-ui2/src/main/webapp/tests/unit/routes/attempt/index-test.js index 8576090..b0e3d2f 100644 --- a/tez-ui2/src/main/webapp/tests/unit/routes/attempt/index-test.js +++ b/tez-ui2/src/main/webapp/tests/unit/routes/attempt/index-test.js @@ -18,7 +18,7 @@ import { moduleFor, test } from 'ember-qunit'; -moduleFor('route:attempt/index', 'Unit | Route | vertex/index', { +moduleFor('route:attempt/index', 'Unit | Route | attempt/index', { // Specify the other units that are required for this test. // needs: ['controller:foo'] }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/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 index 24940b2..41ca35c 100644 --- 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 @@ -18,7 +18,7 @@ import { moduleFor, test } from 'ember-qunit'; -moduleFor('route:dag/counters', 'Unit | Route | dag/index', { +moduleFor('route:dag/counters', 'Unit | Route | dag/counters', { // Specify the other units that are required for this test. // needs: ['controller:foo'] }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/tez-ui2/src/main/webapp/tests/unit/routes/task-test.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/tests/unit/routes/task-test.js b/tez-ui2/src/main/webapp/tests/unit/routes/task-test.js index af802b8..9252a3e 100644 --- a/tez-ui2/src/main/webapp/tests/unit/routes/task-test.js +++ b/tez-ui2/src/main/webapp/tests/unit/routes/task-test.js @@ -18,7 +18,7 @@ import { moduleFor, test } from 'ember-qunit'; -moduleFor('route:task', 'Unit | Route | vertex', { +moduleFor('route:task', 'Unit | Route | task', { // Specify the other units that are required for this test. // needs: ['controller:foo'] }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/tez-ui2/src/main/webapp/tests/unit/routes/task/attempts-test.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/tests/unit/routes/task/attempts-test.js b/tez-ui2/src/main/webapp/tests/unit/routes/task/attempts-test.js index 1209012..2c139b7 100644 --- a/tez-ui2/src/main/webapp/tests/unit/routes/task/attempts-test.js +++ b/tez-ui2/src/main/webapp/tests/unit/routes/task/attempts-test.js @@ -18,7 +18,7 @@ import { moduleFor, test } from 'ember-qunit'; -moduleFor('route:task/attempts', 'Unit | Route | vertex/attempts', { +moduleFor('route:task/attempts', 'Unit | Route | task/attempts', { // Specify the other units that are required for this test. // needs: ['controller:foo'] }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/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 index 472a635..fafb2a0 100644 --- 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 @@ -18,7 +18,7 @@ import { moduleFor, test } from 'ember-qunit'; -moduleFor('route:task/counters', 'Unit | Route | vertex/index', { +moduleFor('route:task/counters', 'Unit | Route | task/counters', { // Specify the other units that are required for this test. // needs: ['controller:foo'] }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/tez-ui2/src/main/webapp/tests/unit/routes/task/index-test.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/tests/unit/routes/task/index-test.js b/tez-ui2/src/main/webapp/tests/unit/routes/task/index-test.js index 8f4f6b9..603a8d6 100644 --- a/tez-ui2/src/main/webapp/tests/unit/routes/task/index-test.js +++ b/tez-ui2/src/main/webapp/tests/unit/routes/task/index-test.js @@ -18,7 +18,7 @@ import { moduleFor, test } from 'ember-qunit'; -moduleFor('route:task/index', 'Unit | Route | vertex/index', { +moduleFor('route:task/index', 'Unit | Route | task/index', { // Specify the other units that are required for this test. // needs: ['controller:foo'] }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/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 index ec33b8a..6f76c1c 100644 --- 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 @@ -18,7 +18,7 @@ import { moduleFor, test } from 'ember-qunit'; -moduleFor('route:vertex/counters', 'Unit | Route | vertex/index', { +moduleFor('route:vertex/counters', 'Unit | Route | vertex/counters', { // Specify the other units that are required for this test. // needs: ['controller:foo'] }); http://git-wip-us.apache.org/repos/asf/tez/blob/90ac7cc5/tez-ui2/src/main/webapp/tests/unit/serializers/app-test.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/tests/unit/serializers/app-test.js b/tez-ui2/src/main/webapp/tests/unit/serializers/app-test.js index fc79ae9..ec6b6b4 100644 --- a/tez-ui2/src/main/webapp/tests/unit/serializers/app-test.js +++ b/tez-ui2/src/main/webapp/tests/unit/serializers/app-test.js @@ -18,7 +18,7 @@ import { moduleFor, test } from 'ember-qunit'; -moduleFor('serializer:task', 'Unit | Serializer | task', { +moduleFor('serializer:app', 'Unit | Serializer | app', { // Specify the other units that are required for this test. // needs: ['serializer:task'] });