tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject tez git commit: TEZ-3530. Tez UI: Add query details page, and link the page from All Queries table (sree)
Date Wed, 18 Jan 2017 12:51:57 GMT
Repository: tez
Updated Branches:
  refs/heads/master 22e4fe19d -> 90b9af3d8


TEZ-3530. Tez UI: Add query details page, and link the page from All Queries table (sree)


Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/90b9af3d
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/90b9af3d
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/90b9af3d

Branch: refs/heads/master
Commit: 90b9af3d8831eef8428d3a45faeebf5372b8fc93
Parents: 22e4fe1
Author: Sreenath Somarajapuram <sree@apache.org>
Authored: Wed Jan 18 18:22:19 2017 +0530
Committer: Sreenath Somarajapuram <sree@apache.org>
Committed: Wed Jan 18 18:22:19 2017 +0530

----------------------------------------------------------------------
 CHANGES.txt                                     |   1 +
 .../main/webapp/app/components/caller-info.js   |   2 +
 .../main/webapp/app/controllers/home/queries.js |   1 +
 tez-ui/src/main/webapp/app/controllers/query.js |  38 ++++++
 .../main/webapp/app/controllers/query/index.js  |  22 ++++
 tez-ui/src/main/webapp/app/entities/entity.js   |  12 +-
 tez-ui/src/main/webapp/app/router.js            |   3 +
 tez-ui/src/main/webapp/app/routes/query.js      |  38 ++++++
 .../src/main/webapp/app/routes/query/index.js   |  35 ++++++
 .../app/templates/components/caller-info.hbs    |   6 +-
 tez-ui/src/main/webapp/app/templates/query.hbs  |  20 +++
 .../main/webapp/app/templates/query/index.hbs   | 126 +++++++++++++++++++
 .../webapp/tests/unit/controllers/query-test.js |  51 ++++++++
 .../tests/unit/controllers/query/index-test.js  |  33 +++++
 .../main/webapp/tests/unit/routes/query-test.js |  35 ++++++
 .../tests/unit/routes/query/index-test.js       |  35 ++++++
 16 files changed, 453 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/90b9af3d/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 9eb7a55..9947cea 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -164,6 +164,7 @@ ALL CHANGES:
   TEZ-3570. Tez UI: Wait for sometime before tooltips are displayed
   TEZ-3504. Tez UI: Duration is displaying invalid values when start or end time is invalid
   TEZ-3529. Tez UI: Add 'All Queries' table in the landing page along 'All DAGs' page
+  TEZ-3530. Tez UI: Add query details page, and link the page from All Queries table
 
 Release 0.8.5: Unreleased
 

http://git-wip-us.apache.org/repos/asf/tez/blob/90b9af3d/tez-ui/src/main/webapp/app/components/caller-info.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/components/caller-info.js b/tez-ui/src/main/webapp/app/components/caller-info.js
index f050ffa..79697a9 100644
--- a/tez-ui/src/main/webapp/app/components/caller-info.js
+++ b/tez-ui/src/main/webapp/app/components/caller-info.js
@@ -26,6 +26,8 @@ export default Ember.Component.extend({
   type: null,
   info: null,
 
+  title: null,
+
   codeMirror: null,
 
   classNames: ['caller-info'],

http://git-wip-us.apache.org/repos/asf/tez/blob/90b9af3d/tez-ui/src/main/webapp/app/controllers/home/queries.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/controllers/home/queries.js b/tez-ui/src/main/webapp/app/controllers/home/queries.js
index 53d284c..a79abed 100644
--- a/tez-ui/src/main/webapp/app/controllers/home/queries.js
+++ b/tez-ui/src/main/webapp/app/controllers/home/queries.js
@@ -71,6 +71,7 @@ export default TableController.extend({
     cellComponentName: 'em-table-linked-cell',
     getCellContent: function (row) {
       return {
+        routeName: "query",
         model: row.get("entityID"),
         text: row.get("entityID")
       };

http://git-wip-us.apache.org/repos/asf/tez/blob/90b9af3d/tez-ui/src/main/webapp/app/controllers/query.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/controllers/query.js b/tez-ui/src/main/webapp/app/controllers/query.js
new file mode 100644
index 0000000..f872994
--- /dev/null
+++ b/tez-ui/src/main/webapp/app/controllers/query.js
@@ -0,0 +1,38 @@
+/**
+ * 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 ParentController from './parent';
+
+export default ParentController.extend({
+  breadcrumbs: Ember.computed("model", function () {
+    var ID = this.get("model.entityID");
+
+    return [{
+      text: `Query [ ${ID} ]`,
+      routeName: "query.index",
+      model: ID
+    }];
+  }),
+
+  tabs: [{
+    text: "Query Details",
+    routeName: "query.index"
+  }]
+});

http://git-wip-us.apache.org/repos/asf/tez/blob/90b9af3d/tez-ui/src/main/webapp/app/controllers/query/index.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/controllers/query/index.js b/tez-ui/src/main/webapp/app/controllers/query/index.js
new file mode 100644
index 0000000..9745328
--- /dev/null
+++ b/tez-ui/src/main/webapp/app/controllers/query/index.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 PageController from '../page';
+
+export default PageController.extend({
+});

http://git-wip-us.apache.org/repos/asf/tez/blob/90b9af3d/tez-ui/src/main/webapp/app/entities/entity.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/entities/entity.js b/tez-ui/src/main/webapp/app/entities/entity.js
index 36cbd8c..80a836e 100644
--- a/tez-ui/src/main/webapp/app/entities/entity.js
+++ b/tez-ui/src/main/webapp/app/entities/entity.js
@@ -128,8 +128,10 @@ var Entity = Ember.Object.extend(NameMixin, {
     }
 
     needLoader = needLoader.then(function (model) {
-      parentModel.set(needOptions.name, model);
-      parentModel.refreshLoadTime();
+      if(!parentModel.get("isDeleted")) {
+        parentModel.set(needOptions.name, model);
+        parentModel.refreshLoadTime();
+      }
       return model;
     });
 
@@ -139,8 +141,10 @@ var Entity = Ember.Object.extend(NameMixin, {
       }
 
       if(needOptions.silent) {
-        parentModel.set(needOptions.name, null);
-        parentModel.refreshLoadTime();
+        if(!parentModel.get("isDeleted")) {
+          parentModel.set(needOptions.name, null);
+          parentModel.refreshLoadTime();
+        }
       }
       else {
         throw(err);

http://git-wip-us.apache.org/repos/asf/tez/blob/90b9af3d/tez-ui/src/main/webapp/app/router.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/router.js b/tez-ui/src/main/webapp/app/router.js
index 0bbf842..856e7b3 100644
--- a/tez-ui/src/main/webapp/app/router.js
+++ b/tez-ui/src/main/webapp/app/router.js
@@ -49,6 +49,9 @@ Router.map(function() {
   this.route('attempt', {path: '/attempt/:attempt_id'}, function () {
     this.route('counters');
   });
+  this.route('query', {path: '/query/:query_id'}, function() {
+  });
+
   // Alias for backward compatibility with Tez UI V1
   this.route('app', {path: '/tez-app/:app_id'}, function () {});
   this.route('app', {path: '/app/:app_id'}, function () {

http://git-wip-us.apache.org/repos/asf/tez/blob/90b9af3d/tez-ui/src/main/webapp/app/routes/query.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/routes/query.js b/tez-ui/src/main/webapp/app/routes/query.js
new file mode 100644
index 0000000..918e0c5
--- /dev/null
+++ b/tez-ui/src/main/webapp/app/routes/query.js
@@ -0,0 +1,38 @@
+/**
+ * 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 AbstractRoute from './abstract';
+
+export default AbstractRoute.extend({
+  title: "Query",
+
+  loaderQueryParams: {
+    id: "query_id"
+  },
+
+  model: function (params) {
+    return this.get("loader").queryRecord('hive-query', this.queryFromParams(params).id).
+      catch(this.onLoadFailure.bind(this));
+  },
+
+  actions: {
+    setLoadTime: function (time) {
+      this.set("controller.loadTime", time);
+    }
+  }
+});

http://git-wip-us.apache.org/repos/asf/tez/blob/90b9af3d/tez-ui/src/main/webapp/app/routes/query/index.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/routes/query/index.js b/tez-ui/src/main/webapp/app/routes/query/index.js
new file mode 100644
index 0000000..a9386e6
--- /dev/null
+++ b/tez-ui/src/main/webapp/app/routes/query/index.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 SingleAmPollsterRoute from '../single-am-pollster';
+
+export default SingleAmPollsterRoute.extend({
+  title: "Query Details",
+
+  loaderNamespace: "query",
+
+  setupController: function (controller, model) {
+    this._super(controller, model);
+    Ember.run.later(this, "startCrumbBubble");
+  },
+
+  load: function (value, query, options) {
+    return this.get("loader").queryRecord('hive-query', this.modelFor("query").get("id"),
options);
+  },
+});

http://git-wip-us.apache.org/repos/asf/tez/blob/90b9af3d/tez-ui/src/main/webapp/app/templates/components/caller-info.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/components/caller-info.hbs b/tez-ui/src/main/webapp/app/templates/components/caller-info.hbs
index 72a52db..f156487 100644
--- a/tez-ui/src/main/webapp/app/templates/components/caller-info.hbs
+++ b/tez-ui/src/main/webapp/app/templates/components/caller-info.hbs
@@ -18,7 +18,11 @@
 
 <div class="panel panel-info">
   <div class="panel-heading">
-    Additional Info from {{type}}
+    {{#if title}}
+      {{title}}
+    {{else}}
+      Additional Info from {{type}}
+    {{/if}}
   </div>
   <textarea></textarea>
 </div>

http://git-wip-us.apache.org/repos/asf/tez/blob/90b9af3d/tez-ui/src/main/webapp/app/templates/query.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/query.hbs b/tez-ui/src/main/webapp/app/templates/query.hbs
new file mode 100644
index 0000000..2c28eeb
--- /dev/null
+++ b/tez-ui/src/main/webapp/app/templates/query.hbs
@@ -0,0 +1,20 @@
+{{!
+ * 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.
+}}
+
+{{tab-n-refresh tabs=tabs loadTime=loadTime autoRefreshVisible=false autoRefreshEnabled=polling.active}}
+{{outlet}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tez/blob/90b9af3d/tez-ui/src/main/webapp/app/templates/query/index.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/query/index.hbs b/tez-ui/src/main/webapp/app/templates/query/index.hbs
new file mode 100644
index 0000000..1cf2e36
--- /dev/null
+++ b/tez-ui/src/main/webapp/app/templates/query/index.hbs
@@ -0,0 +1,126 @@
+{{!
+ * 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}}
+  <table class='detail-list'>
+    <thead>
+      <tr>
+        <th colspan=2>Details</th>
+      </tr>
+    </thead>
+
+    <tbody>
+    <tr>
+      <td>Query ID</td>
+      <td>{{txt model.entityID}}</td>
+    </tr>
+    <tr>
+      <td>User</td>
+      <td>{{txt model.requestUser}}</td>
+    </tr>
+    <tr>
+      <td>Status</td>
+      <td>{{em-table-status-cell content=model.status}}</td>
+    </tr>
+    <tr>
+      <td>Start Time</td>
+      <td>{{date-formatter content=model.startTime}}</td>
+    </tr>
+    <tr>
+      <td>End Time</td>
+      <td>{{date-formatter content=model.endTime}}</td>
+    </tr>
+    <tr>
+      <td>Duration</td>
+      <td>{{txt model.duration type="duration"}}</td>
+    </tr>
+    <tr>
+      <td>Application ID</td>
+      <td>
+        {{#link-to 'app' model.dag.firstObject.appID class='ember-table-content'}}
+          {{model.dag.firstObject.appID}}
+        {{/link-to}}
+      </td>
+    </tr>
+    <tr>
+      <td>DAG ID</td>
+      <td>
+        {{#link-to 'dag' model.dag.firstObject.entityID class='ember-table-content'}}
+          {{model.dag.firstObject.entityID}}
+        {{/link-to}}
+      </td>
+    </tr>
+    <tr>
+      <td>Session ID</td>
+      <td>{{txt model.sessionID}}</td>
+    </tr>
+    <tr>
+      <td>Query Name</td>
+      <td>{{txt model.queryName}}</td>
+    </tr>
+    <tr>
+      <td>Thread Name</td>
+      <td>{{txt model.threadName}}</td>
+    </tr>
+    <tr>
+      <td>Queue</td>
+      <td>{{txt model.queue}}</td>
+    </tr>
+    </tbody>
+  </table>
+
+  <table class='detail-list'>
+    <thead>
+    <tr>
+      <th colspan=2>Hive Details</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    <tr>
+      <td>Tables Read</td>
+      <td>{{txt model.tablesRead}}</td>
+    </tr>
+    <tr>
+      <td>Tables Written</td>
+      <td>{{txt model.tablesWritten}}</td>
+    </tr>
+    <tr>
+      <td>Client Address</td>
+      <td>{{txt model.clientAddress}}</td>
+    </tr>
+    <tr>
+      <td>Execution Mode</td>
+      <td>{{txt model.executionMode}}</td>
+    </tr>
+    <tr>
+      <td>Hive Address</td>
+      <td>{{txt model.hiveAddress}}</td>
+    </tr>
+    <tr>
+      <td>Client Type</td>
+      <td>{{txt model.instanceType}}</td>
+    </tr>
+    </tbody>
+  </table>
+
+  {{caller-info title="Query Text" type="Hive" info=model.queryText}}
+
+{{else}}
+  {{partial "loading"}}
+{{/if}}

http://git-wip-us.apache.org/repos/asf/tez/blob/90b9af3d/tez-ui/src/main/webapp/tests/unit/controllers/query-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/unit/controllers/query-test.js b/tez-ui/src/main/webapp/tests/unit/controllers/query-test.js
new file mode 100644
index 0000000..cbc2c96
--- /dev/null
+++ b/tez-ui/src/main/webapp/tests/unit/controllers/query-test.js
@@ -0,0 +1,51 @@
+/**
+ * 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:query', 'Unit | Controller | query', {
+  // 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.tabs.length, 1);
+});
+
+test('breadcrumbs test', function(assert) {
+  let testID = "test_1",
+      controller = this.subject({
+        send: Ember.K,
+        initVisibleColumns: Ember.K,
+        model: Ember.Object.create({
+          entityID: testID
+        })
+      }),
+      breadcrumbs = controller.get("breadcrumbs");
+
+  assert.ok(breadcrumbs);
+  assert.ok(breadcrumbs.length, 1);
+  assert.ok(breadcrumbs[0].text, `Query [ ${testID} ]`);
+});

http://git-wip-us.apache.org/repos/asf/tez/blob/90b9af3d/tez-ui/src/main/webapp/tests/unit/controllers/query/index-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/unit/controllers/query/index-test.js b/tez-ui/src/main/webapp/tests/unit/controllers/query/index-test.js
new file mode 100644
index 0000000..0e5a998
--- /dev/null
+++ b/tez-ui/src/main/webapp/tests/unit/controllers/query/index-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 Ember from 'ember';
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('controller:query/index', 'Unit | Controller | query/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,
+    initVisibleColumns: Ember.K
+  });
+  assert.ok(controller);
+});

http://git-wip-us.apache.org/repos/asf/tez/blob/90b9af3d/tez-ui/src/main/webapp/tests/unit/routes/query-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/unit/routes/query-test.js b/tez-ui/src/main/webapp/tests/unit/routes/query-test.js
new file mode 100644
index 0000000..1292e30
--- /dev/null
+++ b/tez-ui/src/main/webapp/tests/unit/routes/query-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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('route:query', 'Unit | Route | query', {
+  // 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.loaderQueryParams);
+  assert.ok(route.model);
+  assert.ok(route.actions.setLoadTime);
+
+  assert.equal(route.get("title"), "Query");
+});

http://git-wip-us.apache.org/repos/asf/tez/blob/90b9af3d/tez-ui/src/main/webapp/tests/unit/routes/query/index-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/unit/routes/query/index-test.js b/tez-ui/src/main/webapp/tests/unit/routes/query/index-test.js
new file mode 100644
index 0000000..0e6f862
--- /dev/null
+++ b/tez-ui/src/main/webapp/tests/unit/routes/query/index-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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('route:query/index', 'Unit | Route | query/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.equal(route.get("title"), "Query Details");
+  assert.equal(route.get("loaderNamespace"), "query");
+
+  assert.ok(route.setupController);
+  assert.ok(route.load);
+});


Mime
View raw message