ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [16/50] ambari git commit: AMBARI-14060. Hive View Settings don't persist properly. (Pallav Kulshreshtha via Jaimin)
Date Tue, 01 Dec 2015 18:20:06 GMT
AMBARI-14060. Hive View Settings don't persist properly. (Pallav Kulshreshtha via Jaimin)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: b3cdc4e33cc03dba381f269e3b5cd80888bc82b1
Parents: d8a4225
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Sun Nov 29 20:18:24 2015 -0800
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Sun Nov 29 20:20:06 2015 -0800

----------------------------------------------------------------------
 .../hive-web/app/components/typeahead-widget.js | 15 ++++++++++++++
 .../ui/hive-web/app/templates/settings.hbs      | 21 +++++++++++---------
 .../ui/hive-web/app/utils/constants.js          |  5 +++++
 3 files changed, 32 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b3cdc4e3/contrib/views/hive/src/main/resources/ui/hive-web/app/components/typeahead-widget.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/components/typeahead-widget.js
b/contrib/views/hive/src/main/resources/ui/hive-web/app/components/typeahead-widget.js
index f9233a0..5bc0bda 100644
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/components/typeahead-widget.js
+++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/components/typeahead-widget.js
@@ -31,6 +31,21 @@ export default Typeahead.extend(Ember.I18n.TranslateableProperties, {
 
     if($('.selectize-input')) {$('.selectize-input').addClass( "mozBoxSizeFix" );}
 
+    var currentKeyName = this.get('safeValue');
+    var currentTypehead = $('*[keyname="' + currentKeyName +'"]');
+
+    if (currentTypehead.find($('.selectize-input')).has('.item').length == 0) {
+      currentTypehead.find($('.selectize-input')).addClass("has-options has-items ");
+
+      currentTypehead.find($('.selectized option:selected')).val(currentKeyName);
+      currentTypehead.find($('.selectized option:selected')).text(currentKeyName);
+
+      currentTypehead.find($('.selectize-input input')).css({'opacity': 0 , 'position': 'absolute'
, 'left': '-10000px'});
+
+      var itemHtml = '<div data-value=' + currentKeyName + ' class=item >' + currentKeyName
+ '</div>';
+      currentTypehead.find($('.selectize-input')).append( itemHtml );
+
+    }
   },
 
   removeExcludedObserver: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/b3cdc4e3/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/settings.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/settings.hbs
b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/settings.hbs
index 55b659a..c320a1c 100644
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/settings.hbs
+++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/settings.hbs
@@ -33,17 +33,20 @@
         <div class="form-group">
           <div class="input-group">
             <div class="input-group-addon">
-              {{typeahead-widget
-                  options=predefinedSettings
-                  excluded=excluded
-                  optionLabelPath="name"
-                  optionValuePath="name"
-                  selection=setting.key
-                  create="addKey"
-              }}
+
+              <div {{bind-attr keyname="setting.key.name"}} class="typeahead-container">
+                {{typeahead-widget
+                    options=predefinedSettings
+                    excluded=excluded
+                    optionLabelPath="name"
+                    optionValuePath="name"
+                    selection=setting.key
+                    safeValue = setting.key.name
+                    create="addKey"
+                }}
+              </div>
             </div>
             <div {{bind-attr class=":input-group-addon setting.valid::has-error"}}>
-
               <div class="setting-input-value">
                 {{#if setting.key.values}}
                   {{select-widget items=setting.key.values

http://git-wip-us.apache.org/repos/asf/ambari/blob/b3cdc4e3/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/constants.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/constants.js b/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/constants.js
index 199677d..4b9899a 100644
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/constants.js
+++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/constants.js
@@ -90,6 +90,7 @@ export default Ember.Object.create({
       name: 'hive.tez.container.size',
       validate: helpers.regexes.digits
     },
+
     {
       name: 'hive.prewarm.enabled',
       values: helpers.validationValues.bool
@@ -111,6 +112,10 @@ export default Ember.Object.create({
       values: helpers.validationValues.bool
     },
     {
+      name: 'hive.auto.convert.join',
+      values: helpers.validationValues.bool
+    },
+    {
       name: 'tez.am.resource.memory.mb',
       validate: helpers.regexes.digits
     },


Mime
View raw message