Przeglądaj źródła

Revert "HUE-7018 [jb] disable_killing_jobs option is not supported in the new job browser"

This reverts commit c45dcde804c8ae8c9ff77d0ec10c736caefcdeef.
Ying Chen 8 lat temu
rodzic
commit
eee7a04

+ 0 - 2
apps/jobbrowser/src/jobbrowser/api2.py

@@ -23,7 +23,6 @@ from desktop.lib.i18n import smart_unicode
 from desktop.lib.django_util import JsonResponse
 
 from jobbrowser.apis.base_api import get_api
-from jobbrowser.conf import DISABLE_KILLING_JOBS
 
 
 LOG = logging.getLogger(__name__)
@@ -55,7 +54,6 @@ def jobs(request):
 
   jobs = get_api(request.user, interface).apps(filters)
 
-  response['disable_killing_jobs'] = DISABLE_KILLING_JOBS.get();
   response['apps'] = jobs['apps']
   response['total'] = jobs.get('total')
   response['status'] = 0

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

@@ -944,7 +944,7 @@ ${ commonheader("Job Browser", "jobbrowser", user, request) | n,unicode }
     <!-- /ko -->
 
     <!-- ko if: hasKill -->
-    <button class="btn btn-danger disable-feedback" title="${_('Stop selected')}" data-bind="visible: ! disableKillingJobs(), click: function() { control('kill'); }, enable: killEnabled">
+    <button class="btn btn-danger disable-feedback" title="${_('Stop selected')}" data-bind="click: function() { control('kill'); }, enable: killEnabled">
       ## TODO confirmation
       <i class="fa fa-times"></i> <!-- ko ifnot: $root.isMini -->${_('Kill')}<!-- /ko -->
     </button>
@@ -1991,7 +1991,6 @@ ${ commonheader("Job Browser", "jobbrowser", user, request) | n,unicode }
 
       self.apps = ko.observableArray().extend({ rateLimit: 50 });
       self.totalApps = ko.observable(null);
-      self.disableKillingJobs = ko.observable(true);
       self.isCoordinator = ko.observable(false);
 
       self.loadingJobs = ko.observable(false);
@@ -2150,7 +2149,6 @@ ${ commonheader("Job Browser", "jobbrowser", user, request) | n,unicode }
           }
           self.apps(apps);
           self.totalApps(data.total);
-          self.disableKillingJobs(data.disable_killing_jobs);
         }).always(function () {
           self.loadingJobs(false);
         });