Browse Source

AMBARI-25228 add a second HiveServer2Interactive Button Missing in Ambari UI is there is config group for Hive Service (asnaik) (#2907)

Akhil S Naik 6 years ago
parent
commit
f44e648f2f

+ 8 - 1
ambari-web/app/mixins/main/service/configs/hive_interactive_check.js

@@ -33,6 +33,13 @@ App.HiveInteractiveCheck = Em.Mixin.create({
   },
 
   onLoadHiveConfigs: function (data) {
-    this.set('enableHiveInteractive', data.items[0].configurations.findProperty('type', 'hive-interactive-env').properties['enable_hive_interactive'] === 'true');
+    var enableHiveInteractive = false;
+    data.items.forEach(function(item) {
+        var hiveInteractive = item.configurations.findProperty('type', 'hive-interactive-env');
+        if(hiveInteractive) {
+          enableHiveInteractive = hiveInteractive.properties['enable_hive_interactive'] === 'true';
+        }
+      });
+    this.set('enableHiveInteractive',enableHiveInteractive);
   }
 });