You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by db...@apache.org on 2017/02/10 09:43:38 UTC

ambari git commit: AMBARI-19950. Hive View 2.0: Restrict user to change the bucket while editing a clustered table. (dipayanb)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 9fb94ade5 -> cd31e0ccf


AMBARI-19950. Hive View 2.0: Restrict user to change the bucket while editing a clustered table. (dipayanb)


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

Branch: refs/heads/branch-2.5
Commit: cd31e0ccf21001b7add6e7283ccf719de7b25c80
Parents: 9fb94ad
Author: Dipayan Bhowmick <di...@gmail.com>
Authored: Fri Feb 10 15:13:26 2017 +0530
Committer: Dipayan Bhowmick <di...@gmail.com>
Committed: Fri Feb 10 15:13:26 2017 +0530

----------------------------------------------------------------------
 .../main/resources/ui/app/components/table-advanced-settings.js | 5 +++++
 .../ui/app/templates/components/table-advanced-settings.hbs     | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/cd31e0cc/contrib/views/hive20/src/main/resources/ui/app/components/table-advanced-settings.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/components/table-advanced-settings.js b/contrib/views/hive20/src/main/resources/ui/app/components/table-advanced-settings.js
index 99a9bb6..5e58cd8 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/components/table-advanced-settings.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/components/table-advanced-settings.js
@@ -31,6 +31,7 @@ export default Ember.Component.extend({
   errors: [],
   editMode: false,
   disableTransactionInput: false,
+  disableNumBucketsInput: false,
 
   settings: {},
 
@@ -72,6 +73,10 @@ export default Ember.Component.extend({
     if(!Ember.isEmpty(this.get('settings.transactional')) && this.get('settings.transactional') && this.get('editMode')) {
       this.set('disableTransactionInput', true);
     }
+
+    if(!Ember.isEmpty(this.get('settings.numBuckets')) && this.get('settings.numBuckets') && this.get('editMode')) {
+      this.set('disableNumBucketsInput', true);
+    }
   },
 
   locationInputObserver: Ember.observer('showLocationInput', function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/cd31e0cc/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-advanced-settings.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-advanced-settings.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-advanced-settings.hbs
index f7a92ce..4aca56d 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-advanced-settings.hbs
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-advanced-settings.hbs
@@ -39,7 +39,7 @@
           <label class="col-md-2 control-label">Number of buckets</label>
           <div class="col-md-6">
             <div class="{{if hasNumBucketError 'has-error'}}">
-              {{input type="number" class="form-control" value=settings.numBuckets}}
+              {{input type="number" class="form-control" value=settings.numBuckets disabled=disableNumBucketsInput}}
               {{#if hasNumBucketError}}
                 <span class="help-block">{{numBucketErrorText}}</span>
               {{/if}}