ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsai...@apache.org
Subject ambari git commit: Revert "AMBARI-20139.Need to show data in sorted order in Hive view(Venkata Sairam)"
Date Sun, 30 Apr 2017 15:55:23 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 ca79dedff -> 8080f8384


Revert "AMBARI-20139.Need to show data in sorted order in Hive view(Venkata Sairam)"

This reverts commit ca79dedff9feb1a0f5eedd726b3d30ee875085ad.


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8080f838
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8080f838
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8080f838

Branch: refs/heads/branch-2.5
Commit: 8080f838475ea181d85761792211db13412d3d59
Parents: ca79ded
Author: Venkata Sairam <venkatasairam.lanka@gmail.com>
Authored: Sun Apr 30 21:22:59 2017 +0530
Committer: Venkata Sairam <venkatasairam.lanka@gmail.com>
Committed: Sun Apr 30 21:22:59 2017 +0530

----------------------------------------------------------------------
 .../resources/ui/app/components/jobs-browser.js | 18 +-------
 .../resources/ui/app/components/setting-list.js |  9 ----
 .../main/resources/ui/app/controllers/udfs.js   |  2 -
 .../resources/ui/app/routes/savedqueries.js     | 11 +----
 .../src/main/resources/ui/app/routes/udfs.js    | 10 +----
 .../src/main/resources/ui/app/styles/app.scss   |  4 --
 .../app/templates/components/jobs-browser.hbs   | 42 +++---------------
 .../app/templates/components/setting-list.hbs   |  8 +---
 .../resources/ui/app/templates/savedqueries.hbs | 46 +++++---------------
 .../main/resources/ui/app/templates/udfs.hbs    | 38 +++++-----------
 10 files changed, 33 insertions(+), 155 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8080f838/contrib/views/hive20/src/main/resources/ui/app/components/jobs-browser.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/components/jobs-browser.js b/contrib/views/hive20/src/main/resources/ui/app/components/jobs-browser.js
index 7e24843..be2771c 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/components/jobs-browser.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/components/jobs-browser.js
@@ -24,12 +24,7 @@ export default Ember.Component.extend({
   maxEndTime: null,
   statusFilter: null,
   titleFilter: null,
-  jobId: {'asc':true},
-  title: {'noSort':true},
-  status: {'noSort':true},
-  dateSubmitted: {'noSort':true},
-  duration: {'noSort':true},
-  sortProp:['id:desc'],
+
   sortedJobs: Ember.computed.sort('jobs', function (m1, m2) {
     if (m1.get('dateSubmitted') < m2.get('dateSubmitted')) {
       return 1;
@@ -47,7 +42,7 @@ export default Ember.Component.extend({
     }
   }),
 
-  filteredJobs: Ember.computed('titleFilteredJobs', 'statusFilter', 'sortProp', function
() {
+  filteredJobs: Ember.computed('titleFilteredJobs', 'statusFilter', function () {
     if (this.get('statusFilter')) {
       return  this.get('titleFilteredJobs').filter((entry) => entry.get('status').toLowerCase()
=== this.get('statusFilter'));
     } else {
@@ -55,8 +50,6 @@ export default Ember.Component.extend({
     }
   }),
 
-  filteredJobsSorted: Ember.computed.sort('filteredJobs', 'sortProp'),
-
   statusCounts: Ember.computed('titleFilteredJobs', function () {
     return this.get('titleFilteredJobs').reduce((acc, item, index) => {
       let status = item.get('status').toLowerCase();
@@ -71,13 +64,6 @@ export default Ember.Component.extend({
 
 
   actions: {
-    sort(sortProp, sortField, key) {
-      let perm = {};
-      perm[key] = true;
-      this.set(sortField, perm);
-      this.set('sortProp', [sortProp]);
-    },
-
     setDateRange(startDate, endDate) {
       this.sendAction('filterChanged', startDate, endDate);
     },

http://git-wip-us.apache.org/repos/asf/ambari/blob/8080f838/contrib/views/hive20/src/main/resources/ui/app/components/setting-list.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/components/setting-list.js b/contrib/views/hive20/src/main/resources/ui/app/components/setting-list.js
index c410a2a..72a83a3 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/components/setting-list.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/components/setting-list.js
@@ -20,16 +20,7 @@ import Ember from 'ember';
 
 export default Ember.Component.extend({
   settings: [],
-  settingsConf: {'noSort':true},
-  sortProp:['id:desc'],
-  settingsSorted: Ember.computed.sort('settings', 'sortProp'),
   actions: {
-    sort(sortProp, sortField, key) {
-      let perm = {};
-      perm[key] = true;
-      this.set(sortField, perm);
-      this.set('sortProp', [sortProp]);
-    },
     addNewSettings() {
       this.sendAction('newSettings');
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/8080f838/contrib/views/hive20/src/main/resources/ui/app/controllers/udfs.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/controllers/udfs.js b/contrib/views/hive20/src/main/resources/ui/app/controllers/udfs.js
index 98c4dc8..dc99fd1 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/controllers/udfs.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/controllers/udfs.js
@@ -19,6 +19,4 @@
 import Ember from 'ember';
 
 export default Ember.Controller.extend({
-   "sortProp": ['id:desc'],
-   sortedUDF : Ember.computed.sort("udflist", "sortProp")
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/8080f838/contrib/views/hive20/src/main/resources/ui/app/routes/savedqueries.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/savedqueries.js b/contrib/views/hive20/src/main/resources/ui/app/routes/savedqueries.js
index 463768e..e896348 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/routes/savedqueries.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/routes/savedqueries.js
@@ -34,19 +34,10 @@ export default Ember.Route.extend(UILoggerMixin, {
 
     controller.set('showDeleteSaveQueryModal', false);
     controller.set('selectedSavedQueryId', null);
-    controller.set('preview', {"noSort":true});
-    controller.set('title', {"noSort":true});
-    controller.set('dataBase', {"noSort":true});
-    controller.set('owner', {"noSort":true});
   },
 
   actions: {
-    sort(sortProp, sortField, key) {
-      let perm = {};
-      perm[key] = true;
-      this.get('controller').set(sortField, perm);
-      this.get('controller').set('sortProp', [sortProp]);
-    },
+
     deleteSavedQuery(){
       let queryId = this.get('controller').get('selectedSavedQueryId');
       let self = this;

http://git-wip-us.apache.org/repos/asf/ambari/blob/8080f838/contrib/views/hive20/src/main/resources/ui/app/routes/udfs.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/udfs.js b/contrib/views/hive20/src/main/resources/ui/app/routes/udfs.js
index 2e89793..68e06a9 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/routes/udfs.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/routes/udfs.js
@@ -44,18 +44,10 @@ export default Ember.Route.extend({
       fileResourceList.push({'name':'Add New File Resource', 'action':'addNewFileResource'});
       controller.set('fileResourceList', fileResourceList);
     });
-    controller.set('name', {'noSort':true});
-    controller.set('classname', {'noSort':true});
-    controller.set('owner', {'noSort':true});
   },
 
   actions:{
-    sort(sortProp, sortField, key) {
-      let perm = {};
-      perm[key] = true;
-      this.get('controller').set(sortField, perm);
-      this.get('controller').set('sortProp', [sortProp]);
-    },
+
     refreshUdfList(){
       this.get('store').findAll('udf').then((data) => {
         let udfList = [];

http://git-wip-us.apache.org/repos/asf/ambari/blob/8080f838/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss b/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss
index 83fac86..766157a 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss
+++ b/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss
@@ -1009,7 +1009,3 @@ rect.operator__box {
 .button-container {
   margin-top: 10px;
 }
-
-.sort-icon {
-  padding-left: 5px;
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/8080f838/contrib/views/hive20/src/main/resources/ui/app/templates/components/jobs-browser.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/jobs-browser.hbs
b/contrib/views/hive20/src/main/resources/ui/app/templates/components/jobs-browser.hbs
index d29ca73..338828e 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/jobs-browser.hbs
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/jobs-browser.hbs
@@ -54,46 +54,16 @@
     <table class="table table-striped">
       <thead>
         <tr>
-          <th width="10%">Job ID
-          <span class="sort-icon">
-            {{#if jobId.noSort}}<i class="fa fa-chevron-right" {{action "sort" "id" "jobId"
"desc"}}></i>{{/if}}
-            {{#if jobId.desc}}<i class="fa fa-chevron-down" {{action "sort" "id:desc"
"jobId" "asc"}}></i>{{/if}}
-            {{#if jobId.asc}}<i class="fa fa-chevron-up" {{action "sort" "''" "jobId"
"noSort"}}></i>{{/if}}
-          </span>
-          </th>
-          <th width="30%">Title
-          <span class="sort-icon">
-            {{#if title.noSort}}<i class="fa fa-chevron-right" {{action "sort" "title"
"title" "desc"}}></i>{{/if}}
-            {{#if title.desc}}<i class="fa fa-chevron-down" {{action "sort" "title:desc"
"title" "asc"}}></i>{{/if}}
-            {{#if title.asc}}<i class="fa fa-chevron-up" {{action "sort" "" "title" "noSort"}}></i>{{/if}}
-          </span>
-          </th>
-          <th width="10%">Status
-          <span class="sort-icon">
-            {{#if status.noSort}}<i class="fa fa-chevron-right" {{action "sort" "status"
"status" "desc"}}></i>{{/if}}
-            {{#if status.desc}}<i class="fa fa-chevron-down" {{action "sort" "status:desc"
"status" "asc"}}></i>{{/if}}
-            {{#if status.asc}}<i class="fa fa-chevron-up" {{action "sort" "" "status"
"noSort"}}></i>{{/if}}
-          </span>
-          </th>
-          <th width="25%">Start time
-          <span class="sort-icon">
-            {{#if dateSubmitted.noSort}}<i class="fa fa-chevron-right" {{action "sort"
"dateSubmitted" "dateSubmitted" "desc"}}></i>{{/if}}
-            {{#if dateSubmitted.desc}}<i class="fa fa-chevron-down" {{action "sort" "dateSubmitted:desc"
"dateSubmitted" "asc"}}></i>{{/if}}
-            {{#if dateSubmitted.asc}}<i class="fa fa-chevron-up" {{action "sort" "" "dateSubmitted"
"noSort"}}></i>{{/if}}
-          </span>
-          </th>
-          <th width="20%" >Duration(in seconds)
-          <span class="sort-icon">
-            {{#if duration.noSort}}<i class="fa fa-chevron-right" {{action "sort" "duration"
"duration" "desc"}}></i>{{/if}}
-            {{#if duration.desc}}<i class="fa fa-chevron-down" {{action "sort" "duration:desc"
"duration" "asc"}}></i>{{/if}}
-            {{#if duration.asc}}<i class="fa fa-chevron-up" {{action "sort" "" "duration"
"noSort"}}></i>{{/if}}
-          </span>
-          </th>
+          <th width="10%">Job ID</th>
+          <th width="30%">Title</th>
+          <th width="10%">Status</th>
+          <th width="25%">Start time</th>
+          <th width="20%" >Duration(in seconds)</th>
           <th>Action</th>
         </tr>
       </thead>
       <tbody>
-        {{#each filteredJobsSorted as |job| }}
+        {{#each filteredJobs as |job| }}
           {{job-item job=job}}
         {{/each}}
       </tbody>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8080f838/contrib/views/hive20/src/main/resources/ui/app/templates/components/setting-list.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/setting-list.hbs
b/contrib/views/hive20/src/main/resources/ui/app/templates/components/setting-list.hbs
index 5c91550..c3f9c76 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/setting-list.hbs
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/setting-list.hbs
@@ -19,17 +19,13 @@
 <table class="table table-bordered table-hover">
   <thead>
   <tr>
-    <th width="40%">KEY
-      {{#if settingsConf.noSort}}<i class="fa fa-chevron-right" {{action "sort" "key"
"settingsConf" "desc"}}></i>{{/if}}
-      {{#if settingsConf.desc}}<i class="fa fa-chevron-down" {{action "sort" "key:desc"
"settingsConf" "asc"}}></i>{{/if}}
-      {{#if settingsConf.asc}}<i class="fa fa-chevron-up" {{action "sort" "" "settingsConf"
"noSort"}}></i>{{/if}}
-    </th>
+    <th width="40%">KEY</th>
     <th width="40%">VALUE</th>
     <th width="20%">ACTIONS</th>
   </tr>
   </thead>
   <tbody>
-  {{#each settingsSorted as |setting|}}
+  {{#each settings as |setting|}}
     {{yield setting}}
   {{/each}}
   <tr class="new-settings text-center">

http://git-wip-us.apache.org/repos/asf/ambari/blob/8080f838/contrib/views/hive20/src/main/resources/ui/app/templates/savedqueries.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/savedqueries.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/savedqueries.hbs
index ca533e0..ce7315f 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/savedqueries.hbs
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/savedqueries.hbs
@@ -19,44 +19,20 @@
 <div class="row jobs-table">
   <div class="col-md-12">
 
-    {{#if sortedSavedQueries.length}}
+    {{#if savedQuerylist.length}}
 
-    <table class="table table-striped">
-      <thead>
-      <tr>
-        <th width="30%">Preview
-          <span class="sort-icon">
-            {{#if preview.noSort}}<i class="fa fa-chevron-right" {{action "sort" "shortQuery:asc"
"preview" "desc"}}></i>{{/if}}
-            {{#if preview.desc}}<i class="fa fa-chevron-down" {{action "sort" "shortQuery:desc"
"preview" "asc"}}></i>{{/if}}
-            {{#if preview.asc}}<i class="fa fa-chevron-up" {{action "sort" "" "preview"
"noSort"}}></i>{{/if}}
-          </span>
-        </th>
-        <th width="20%">Title
-          <span class="sort-icon">
-            {{#if title.noSort}}<i class="fa fa-chevron-right" {{action "sort" "title"
"title" "desc"}}></i>{{/if}}
-            {{#if title.desc}}<i class="fa fa-chevron-down" {{action "sort" "title:desc"
"title" "asc"}}></i>{{/if}}
-            {{#if title.asc}}<i class="fa fa-chevron-up" {{action "sort" "" "title" "noSort"}}></i>{{/if}}
-          </span>
-        </th>
-        <th width="20%">Database
-          <span class="sort-icon">
-            {{#if dataBase.noSort}}<i class="fa fa-chevron-right" {{action "sort" "dataBase"
"dataBase" "desc"}}></i>{{/if}}
-            {{#if dataBase.desc}}<i class="fa fa-chevron-down" {{action "sort" "dataBase:desc"
"dataBase" "asc"}}></i>{{/if}}
-            {{#if dataBase.asc}}<i class="fa fa-chevron-up" {{action "sort" "" "dataBase"
"noSort"}}></i>{{/if}}
-          </span>
-        </th>
-        <th width="20%">Owner
-          <span class="sort-icon">
-            {{#if owner.noSort}}<i class="fa fa-chevron-right" {{action "sort" "owner"
"owner" "desc"}}></i>{{/if}}
-            {{#if owner.desc}}<i class="fa fa-chevron-down" {{action "sort" "owner:desc"
"owner" "asc"}}></i>{{/if}}
-            {{#if owner.asc}}<i class="fa fa-chevron-up" {{action "sort" "" "owner" "noSort"}}></i>{{/if}}
-          </span>
-        </th>
-        <th width="10%">Action</th>
+      <table class="table table-striped">
+        <thead>
+        <tr>
+          <th width="30%">Preview</th>
+          <th width="20%">Title</th>
+          <th width="20%">Database</th>
+          <th width="20%">Owner</th>
+          <th width="10%">Action</th>
         </tr>
         </thead>
         <tbody>
-        {{#each sortedSavedQueries as |savedQuery| }}
+        {{#each savedQuerylist as |savedQuery| }}
           <tr>
             <td><a href="#" {{action "openAsWorksheet" savedQuery }} >{{savedQuery.shortQuery}}</a></td>
             <td class="break-word">{{savedQuery.title}}</td>
@@ -71,7 +47,7 @@
       </table>
     {{/if}}
 
-    {{#unless sortedSavedQueries.length}}
+    {{#unless savedQuerylist.length}}
       <div class="no-results">
         <div>There is no saved query.</div>
       </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8080f838/contrib/views/hive20/src/main/resources/ui/app/templates/udfs.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/udfs.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/udfs.hbs
index c4fe34c..f2efaca 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/udfs.hbs
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/udfs.hbs
@@ -25,36 +25,18 @@
 <div class="row jobs-table">
   <div class="col-md-12">
 
-    {{#if sortedUDF.length}}
+    {{#if udflist.length}}
       <table class="table table-striped">
         <thead>
         <tr>
-        <th width="20%">UDF Name
-          <span class="sort-icon">
-            {{#if name.noSort}}<i class="fa fa-chevron-right" {{action "sort" "name:asc"
"name" "desc"}}></i>{{/if}}
-            {{#if name.desc}}<i class="fa fa-chevron-down" {{action "sort" "name:desc"
"name" "asc"}}></i>{{/if}}
-            {{#if name.asc}}<i class="fa fa-chevron-up" {{action "sort" "" "name" "noSort"}}></i>{{/if}}
-          </span>
-        </th>
-        <th width="20%">UDF Class Name
-          <span class="sort-icon">
-            {{#if classname.noSort}}<i class="fa fa-chevron-right" {{action "sort" "classname:asc"
"classname" "desc"}}></i>{{/if}}
-            {{#if classname.desc}}<i class="fa fa-chevron-down" {{action "sort" "classname:desc"
"classname" "asc"}}></i>{{/if}}
-            {{#if classname.asc}}<i class="fa fa-chevron-up" {{action "sort" "" "classname"
"noSort"}}></i>{{/if}}
-          </span>
-        </th>
-        <th width="40%">Owner
-          <span class="sort-icon">
-            {{#if owner.noSort}}<i class="fa fa-chevron-right" {{action "sort" "owner:asc"
"owner" "desc"}}></i>{{/if}}
-            {{#if owner.desc}}<i class="fa fa-chevron-down" {{action "sort" "owner:desc"
"owner" "asc"}}></i>{{/if}}
-            {{#if owner.asc}}<i class="fa fa-chevron-up" {{action "sort" "" "owner" "noSort"}}></i>{{/if}}
-          </span>
-        </th>
-        <th width="20%" class="center">Action</th>
-      </tr>
-      </thead>
-      <tbody>
-        {{#each sortedUDF as |udf| }}
+          <th width="20%">UDF Name</th>
+          <th width="20%">UDF Class Name</th>
+          <th width="40%">Owner</th>
+          <th width="20%">Action</th>
+        </tr>
+        </thead>
+        <tbody>
+        {{#each udflist as |udf| }}
           {{udf-item
           udf=udf
           fileResourceList=fileResourceList
@@ -65,7 +47,7 @@
       </table>
     {{/if}}
 
-    {{#unless sortedUDF.length}}
+    {{#unless udflist.length}}
       <div class="no-results">
         <div>There is No UDF.</div>
       </div>


Mime
View raw message