You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2017/02/24 14:19:38 UTC
[31/50] ambari git commit: AMBARI-20127. Hive 2: "insert udf" opens
empty drop down (pallavkul)
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 <pa...@gmail.com>
Authored: Thu Feb 23 11:40:28 2017 +0530
Committer: pallavkul <pa...@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'}}