|
|
@@ -98,6 +98,11 @@ ${ commonheader("Job Browser", "jobbrowser", user, request) | n,unicode }
|
|
|
</li>
|
|
|
<!-- /ko -->
|
|
|
</ul>
|
|
|
+ <span class="pull-right">
|
|
|
+ <!-- ko if: availableComputes().length > 1 -->
|
|
|
+ <div data-bind="component: { name: 'hue-drop-down', params: { value: compute, entries: availableComputes, labelAttribute: 'name', searchable: true, linkTitle: '${ _ko('Active clusters') }' } }"></div>
|
|
|
+ <!-- /ko -->
|
|
|
+ </span>
|
|
|
% if not hiveserver2_impersonation_enabled:
|
|
|
<div class="pull-right label label-warning" style="margin-top: 16px">${ _("Hive jobs are running as the 'hive' user") }</div>
|
|
|
% endif
|
|
|
@@ -2675,31 +2680,37 @@ ${ commonheader("Job Browser", "jobbrowser", user, request) | n,unicode }
|
|
|
self.clusterType = ko.observable();
|
|
|
self.isMini = ko.observable(false);
|
|
|
|
|
|
+ self.availableComputes = ko.observableArray();
|
|
|
+ self.compute = ko.observable();
|
|
|
+
|
|
|
+ ContextCatalog.getComputes({ sourceType: 'jobs' }).done(self.availableComputes);
|
|
|
+
|
|
|
self.availableInterfaces = ko.pureComputed(function () {
|
|
|
var jobsInterfaceCondition = function () {
|
|
|
- return self.appConfig() && self.appConfig()['browser'] && self.appConfig()['browser']['interpreter_names'].indexOf('yarn') != -1 && self.clusterType() != '${ ANALYTIC_DB }';
|
|
|
+ return self.appConfig() && self.appConfig()['browser'] && self.appConfig()['browser']['interpreter_names'].indexOf('yarn') != -1 && self.clusterType() != '${ ANALYTIC_DB }' && !(self.compute() && self.compute()['type'] == 'altus');
|
|
|
}
|
|
|
var dataEngInterfaceCondition = function () {
|
|
|
- return self.appConfig() && self.appConfig()['browser'] && self.appConfig()['browser']['interpreter_names'].indexOf('dataeng') != -1;
|
|
|
+ // return self.appConfig() && self.appConfig()['browser'] && self.appConfig()['browser']['interpreter_names'].indexOf('dataeng') != -1;
|
|
|
+ return self.compute() && self.compute()['type'] == 'altus';
|
|
|
}
|
|
|
var schedulerInterfaceCondition = function () {
|
|
|
- return '${ user.has_hue_permission(action="access", app="oozie") }' == 'True' && self.clusterType() != '${ ANALYTIC_DB }';
|
|
|
+ return '${ user.has_hue_permission(action="access", app="oozie") }' == 'True' && self.clusterType() != '${ ANALYTIC_DB }' && !(self.compute() && self.compute()['type'] == 'altus');
|
|
|
}
|
|
|
var livyInterfaceCondition = function () {
|
|
|
- return self.appConfig() && self.appConfig()['editor'] && self.appConfig()['editor']['interpreter_names'].indexOf('pyspark') != -1;
|
|
|
+ return self.appConfig() && self.appConfig()['editor'] && self.appConfig()['editor']['interpreter_names'].indexOf('pyspark') != -1 && !(self.compute() && self.compute()['type'] == 'altus');
|
|
|
}
|
|
|
var queryInterfaceCondition = function () {
|
|
|
- return '${ ENABLE_QUERY_BROWSER.get() }' == 'True' && self.appConfig() && self.appConfig()['editor'] && self.appConfig()['editor']['interpreter_names'].indexOf('impala') != -1;
|
|
|
+ return '${ ENABLE_QUERY_BROWSER.get() }' == 'True' && self.appConfig() && self.appConfig()['editor'] && self.appConfig()['editor']['interpreter_names'].indexOf('impala') != -1 && !(self.compute() && self.compute()['type'] == 'altus');
|
|
|
}
|
|
|
|
|
|
var interfaces = [
|
|
|
{'interface': 'jobs', 'label': '${ _ko('Jobs') }', 'condition': jobsInterfaceCondition},
|
|
|
{'interface': 'queries', 'label': '${ _ko('Queries') }', 'condition': queryInterfaceCondition},
|
|
|
- {'interface': 'dataeng-jobs', 'label': '${ _ko('Jobs') }', 'condition': dataEngInterfaceCondition},
|
|
|
{'interface': 'workflows', 'label': '${ _ko('Workflows') }', 'condition': schedulerInterfaceCondition},
|
|
|
{'interface': 'schedules', 'label': '${ _ko('Schedules') }', 'condition': schedulerInterfaceCondition},
|
|
|
{'interface': 'bundles', 'label': '${ _ko('Bundles') }', 'condition': schedulerInterfaceCondition},
|
|
|
{'interface': 'slas', 'label': '${ _ko('SLAs') }', 'condition': schedulerInterfaceCondition},
|
|
|
+ {'interface': 'dataeng-jobs', 'label': '${ _ko('Jobs') }', 'condition': dataEngInterfaceCondition},
|
|
|
{'interface': 'dataeng-clusters', 'label': '${ _ko('Clusters') }', 'condition': dataEngInterfaceCondition},
|
|
|
{'interface': 'livy-sessions', 'label': '${ _ko('Livy') }', 'condition': livyInterfaceCondition},
|
|
|
];
|