Explorar o código

HUE-1176 [jb] Reload a page with a coordinator id and keep the breadcrumbs

Romain Rigaux %!s(int64=8) %!d(string=hai) anos
pai
achega
cac4893

+ 1 - 0
apps/jobbrowser/src/jobbrowser/apis/schedule_api.py

@@ -76,6 +76,7 @@ class ScheduleApi(Api):
     common['properties'] = json.loads(response.content)
     common['properties']['xml'] = ''
     common['properties']['properties'] = ''
+    common['properties']['bundle_id'] = coordinator.conf_dict.get('oozie.bundle.id')
 
     return common
 

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

@@ -1062,7 +1062,7 @@ ${ commonheader("Job Browser", "jobbrowser", user, request) | n,unicode }
         }
         else if (/oozie-oozi-C/.test(self.id())) {
           interface = 'schedules';
-        } 
+        }
         else if (/oozie-oozi-B/.test(self.id())) {
           interface = 'bundles';
         }
@@ -1097,6 +1097,11 @@ ${ commonheader("Job Browser", "jobbrowser", user, request) | n,unicode }
                 crumbs.push({'id': vm.job().properties['coordinator_id'](), 'name': vm.job().properties['coordinator_id'](), 'type': 'schedule'});
               }
             }
+            else if (/-oozie-oozi-C/.test(vm.job().id())) {
+              if (vm.job().properties['bundle_id']()) {
+                crumbs.push({'id': vm.job().properties['bundle_id'](), 'name': vm.job().properties['bundle_id'](), 'type': 'bundle'});
+              }
+            }
 
             crumbs.push({'id': vm.job().id(), 'name': vm.job().name(), 'type': vm.job().type()});
             vm.resetBreadcrumbs(crumbs);