ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [31/50] ambari git commit: AMBARI-20127. Hive 2: "insert udf" opens empty drop down (pallavkul)
Date Fri, 24 Feb 2017 14:19:38 GMT
AMBARI-20127. Hive 2: "insert udf" opens empty drop down (pallavkul)


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

Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 03d0587e2e29d7f9b28844b7dfe2042813947dd6
Parents: 5186db0
Author: pallavkul <pallav.kul@gmail.com>
Authored: Thu Feb 23 11:40:28 2017 +0530
Committer: pallavkul <pallav.kul@gmail.com>
Committed: Thu Feb 23 11:40:28 2017 +0530

----------------------------------------------------------------------
 .../main/resources/ui/app/routes/queries/query.js   | 16 ++++++++++++++++
 .../resources/ui/app/templates/queries/query.hbs    |  4 +---
 2 files changed, 17 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/03d0587e/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js b/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js
index 64f38ab..5bed2c6 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js
@@ -54,6 +54,22 @@ export default Ember.Route.extend(UILoggerMixin, {
       this.controller.set('fileResourceList', fileResourceList);
     });
 
+    this.store.findAll('udf').then((data) => {
+      let allUDFList = [];
+      data.forEach(x => {
+        let localUDF = {'id': x.get('id'),
+          'name': x.get('name'),
+          'classname': x.get('classname'),
+          'fileResource': x.get('fileResource'),
+          'owner': x.get('owner')
+        };
+        allUDFList.push(localUDF);
+      });
+      this.controller.set('allUDFList', allUDFList);
+    });
+
+
+
     this.store.findAll('setting').then((data) => {
       let localStr = '';
       data.forEach(x => {

http://git-wip-us.apache.org/repos/asf/ambari/blob/03d0587e/contrib/views/hive20/src/main/resources/ui/app/templates/queries/query.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/queries/query.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/queries/query.hbs
index 4fd3ce201..9be3873 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/queries/query.hbs
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/queries/query.hbs
@@ -32,10 +32,8 @@
 
         <button class="btn btn-default" {{action "openWorksheetModal" }}>{{fa-icon
"save"}} Save As</button>
         <div class="btn-group">
-          <button class="btn btn-default" type="button" data-toggle="dropdown">Insert
UDF
+          <button class="btn btn-default" type="button" data-toggle="dropdown" disabled={{
not allUDFList.length }}>Insert UDF
             <span class="caret"></span></button>
-
-
             <ul class="dropdown-menu">
               {{#each fileResourceList as |fileResource|}}
                 {{fileresource-item fileResource=fileResource createQuery='createQuery'}}


Mime
View raw message