Repository: ambari Updated Branches: refs/heads/branch-2.5 7152be6e5 -> b24585f62
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/b24585f6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b24585f6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b24585f6 Branch: refs/heads/branch-2.5 Commit: b24585f62f852ba1491e623bf241908bc54424f1 Parents: 7152be6 Author: pallavkul <[email protected]> Authored: Thu Feb 23 11:40:28 2017 +0530 Committer: pallavkul <[email protected]> Committed: Thu Feb 23 11:42:21 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/b24585f6/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/b24585f6/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'}}
