Bläddra i källkod

HUE-2291 [oozie] Fix very long workflow GET url of coordinator page

Romain Rigaux 11 år sedan
förälder
incheckning
58e07bcd38

+ 2 - 2
apps/oozie/src/oozie/views/dashboard.py

@@ -262,7 +262,7 @@ def list_oozie_coordinator(request, job_id):
     except:
       pass
 
-  show_all_actions =request.GET.get('show_all_actions') == 'true'
+  show_all_actions = request.GET.get('show_all_actions') == 'true'
 
   if request.GET.get('format') == 'json':
     actions = massaged_coordinator_actions_for_json(oozie_coordinator, oozie_bundle)
@@ -689,11 +689,11 @@ def massaged_coordinator_actions_for_json(coordinator, oozie_bundle):
   actions = []
 
   related_job_ids = []
+  related_job_ids.append('coordinator_job_id=%s' % coordinator_id)
   if oozie_bundle is not None:
     related_job_ids.append('bundle_job_id=%s' %oozie_bundle.id)
 
   for action in coordinator_actions:
-    related_job_ids.append('coordinator_job_id=%s' % coordinator_id)
     massaged_action = {
       'id': action.id,
       'url': action.externalId and reverse('oozie:list_oozie_workflow', kwargs={'job_id': action.externalId}) + '?%s' % '&'.join(related_job_ids) or '',

+ 2 - 2
desktop/libs/liboozie/src/liboozie/types.py

@@ -275,13 +275,13 @@ class BundleAction(Action):
     return progress
 
 
-class Job(object):  
+class Job(object):
   MAX_LOG_SIZE = 3500 * 20 # 20 pages
 
   """
   Accessing log and definition will trigger Oozie API calls.
   """
-  def __init__(self, api, json_dict):    
+  def __init__(self, api, json_dict):
     for attr in self._ATTRS:
       setattr(self, attr, json_dict.get(attr))
     self._fixup()