Quellcode durchsuchen

[compute] hide jobs, hive and impala tabs in job browser

We do not have YARN in that environment and so the jobs tab does not
work. And multiple Hive and Impala clusters so these tab do not work as
well.

For Hive, users can not depend on `Hive Queries` tab and for Impala on
`Impala Queries` tab.

This is a frontend only fix to hide the tabs relying on the config
already present in the javascript.

Change-Id: I562e23894057914824f15d76215e7942c5f68428
Amit Srivastava vor 2 Jahren
Ursprung
Commit
f35f6a121f
1 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
  1. 3 3
      apps/jobbrowser/src/jobbrowser/templates/job_browser.mako

+ 3 - 3
apps/jobbrowser/src/jobbrowser/templates/job_browser.mako

@@ -4018,7 +4018,7 @@ ${ commonheader("Job Browser", "jobbrowser", user, request) | n,unicode }
           return '${ ENABLE_HISTORY_V2.get() }' == 'True';
           return '${ ENABLE_HISTORY_V2.get() }' == 'True';
         };
         };
         var jobsInterfaceCondition = function () {
         var jobsInterfaceCondition = function () {
-          return self.appConfig() && self.appConfig()['browser'] && self.appConfig()['browser']['interpreter_names'].indexOf('yarn') != -1 && (!self.cluster() || self.cluster()['type'].indexOf('altus') == -1);
+          return !window.getLastKnownConfig().has_computes && self.appConfig() && self.appConfig()['browser'] && self.appConfig()['browser']['interpreter_names'].indexOf('yarn') != -1 && (!self.cluster() || self.cluster()['type'].indexOf('altus') == -1);
         };
         };
         var dataEngInterfaceCondition = function () {
         var dataEngInterfaceCondition = function () {
           return self.cluster() && self.cluster()['type'] == 'altus-de';
           return self.cluster() && self.cluster()['type'] == 'altus-de';
@@ -4045,10 +4045,10 @@ ${ commonheader("Job Browser", "jobbrowser", user, request) | n,unicode }
           return '${ is_mini }' == 'False' && self.appConfig() && self.appConfig()['editor'] && (self.appConfig()['editor']['interpreter_names'].indexOf('pyspark') != -1 || self.appConfig()['editor']['interpreter_names'].indexOf('sparksql') != -1);
           return '${ is_mini }' == 'False' && self.appConfig() && self.appConfig()['editor'] && (self.appConfig()['editor']['interpreter_names'].indexOf('pyspark') != -1 || self.appConfig()['editor']['interpreter_names'].indexOf('sparksql') != -1);
         };
         };
         var queryInterfaceCondition = function () {
         var queryInterfaceCondition = function () {
-          return '${ ENABLE_QUERY_BROWSER.get() }' == 'True' && self.appConfig() && self.appConfig()['editor'] && self.appConfig()['editor']['interpreter_names'].indexOf('impala') != -1 && (!self.cluster() || self.cluster()['type'].indexOf('altus') == -1);
+          return !window.getLastKnownConfig().has_computes && '${ ENABLE_QUERY_BROWSER.get() }' == 'True' && self.appConfig() && self.appConfig()['editor'] && self.appConfig()['editor']['interpreter_names'].indexOf('impala') != -1 && (!self.cluster() || self.cluster()['type'].indexOf('altus') == -1);
         };
         };
         var queryHiveInterfaceCondition = function () {
         var queryHiveInterfaceCondition = function () {
-          return '${ ENABLE_HIVE_QUERY_BROWSER.get() }' == 'True';
+          return !window.getLastKnownConfig().has_computes && '${ ENABLE_HIVE_QUERY_BROWSER.get() }' == 'True';
         };
         };
         var scheduleHiveInterfaceCondition = function () {
         var scheduleHiveInterfaceCondition = function () {
           return '${ ENABLE_QUERY_SCHEDULING.get() }' == 'True';
           return '${ ENABLE_QUERY_SCHEDULING.get() }' == 'True';