Repository: ambari
Updated Branches:
  refs/heads/trunk 8e549208c -> 15f763e24


AMBARI-20138. HiveView2.0: Settings page is case sensitive. (dipayanb)


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

Branch: refs/heads/trunk
Commit: 15f763e24ac46e6748d56bd422a5ee12f0f0874e
Parents: 8e54920
Author: Dipayan Bhowmick <[email protected]>
Authored: Fri Feb 24 22:09:50 2017 +0530
Committer: Dipayan Bhowmick <[email protected]>
Committed: Fri Feb 24 22:11:21 2017 +0530

----------------------------------------------------------------------
 .../src/main/resources/ui/app/components/edit-setting-item.js   | 2 +-
 .../views/hive20/src/main/resources/ui/app/routes/settings.js   | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/15f763e2/contrib/views/hive20/src/main/resources/ui/app/components/edit-setting-item.js
----------------------------------------------------------------------
diff --git 
a/contrib/views/hive20/src/main/resources/ui/app/components/edit-setting-item.js
 
b/contrib/views/hive20/src/main/resources/ui/app/components/edit-setting-item.js
index 4bc8787..161c17c 100644
--- 
a/contrib/views/hive20/src/main/resources/ui/app/components/edit-setting-item.js
+++ 
b/contrib/views/hive20/src/main/resources/ui/app/components/edit-setting-item.js
@@ -52,7 +52,7 @@ export default Ember.Component.extend({
       return {valid: true};
     }
 
-    if (setting.get('values') && 
setting.get('values').mapBy('value').contains(value)) {
+    if (setting.get('values') && 
setting.get('values').mapBy('value').contains(value.toLowerCase())) {
       return {valid: true};
     } else if (setting.get('values')) {
       error = `Value should be in 
(${setting.get('values').mapBy('value').join(', ')})`;

http://git-wip-us.apache.org/repos/asf/ambari/blob/15f763e2/contrib/views/hive20/src/main/resources/ui/app/routes/settings.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/settings.js 
b/contrib/views/hive20/src/main/resources/ui/app/routes/settings.js
index affc126..f45881b 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/routes/settings.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/routes/settings.js
@@ -63,6 +63,11 @@ export default Ember.Route.extend(UILoggerMixin, {
       return setting.destroyRecord().then(data => {
         let model = this.get('controller.model');
         model.removeObject(data);
+        let hiveParameters = this.controller.get('hiveParameters');
+        let existingHiveParams = hiveParameters.findBy('name', 
setting.get('key'));
+        if(existingHiveParams) {
+          existingHiveParams.set('disabled', false);
+        }
       }, err => {
         this.get('logger').danger(`Failed to delete setting with key: 
'${setting.get('key')}`, this.extractError(err));
       })

Reply via email to