do the same for RR and Syndicate
diff --git a/xos/requestrouter/admin.py b/xos/requestrouter/admin.py
index d470b29..d5d3d19 100644
--- a/xos/requestrouter/admin.py
+++ b/xos/requestrouter/admin.py
@@ -12,6 +12,21 @@
from suit.widgets import LinkedSelect
from core.admin import ServiceAppAdmin,SliceInline,ServiceAttrAsTabInline, ReadOnlyAwareAdmin
+class RequestRouterAdmin(ReadOnlyAwareAdmin):
+ # Change the application breadcrumb to point to an RR Service if one is
+ # defined
+
+ change_form_template = "admin/change_form_bc.html"
+ change_list_template = "admin/change_list_bc.html"
+ custom_app_breadcrumb_name = "Request Router"
+ @property
+ def custom_app_breadcrumb_url(self):
+ services = RequestRouterService.objects.all()
+ if len(services)==1:
+ return "/admin/requestrouter/requestrouterservice/%s/" % services[0].id
+ else:
+ return "/admin/requestrouter/requestrouterservice/"
+
class RequestRouterServiceAdmin(ServiceAppAdmin):
model = RequestRouterService
verbose_name = "Request Router Service"
@@ -30,7 +45,7 @@
suit_form_includes = (('rradmin.html', 'top', 'administration'),)
-class ServiceMapAdmin(ReadOnlyAwareAdmin):
+class ServiceMapAdmin(RequestRouterAdmin):
model = ServiceMap
verbose_name = "Service Map"
verbose_name_plural = "Service Map"
diff --git a/xos/syndicate_storage/admin.py b/xos/syndicate_storage/admin.py
index fcc06f1..66e07dd 100644
--- a/xos/syndicate_storage/admin.py
+++ b/xos/syndicate_storage/admin.py
@@ -14,6 +14,21 @@
from suit.widgets import LinkedSelect
from django.core.exceptions import ValidationError, ObjectDoesNotExist
+class SyndicateAdmin(ReadOnlyAwareAdmin):
+ # Change the application breadcrumb to point to an RR Service if one is
+ # defined
+
+ change_form_template = "admin/change_form_bc.html"
+ change_list_template = "admin/change_list_bc.html"
+ custom_app_breadcrumb_name = "Syndicate_Storage"
+ @property
+ def custom_app_breadcrumb_url(self):
+ services = SyndicateService.objects.all()
+ if len(services)==1:
+ return "/admin/syndicate_storage/syndicateservice/%s/" % services[0].id
+ else:
+ return "/admin/syncdicate_storage/syndicateservice/"
+
class SyndicateServiceAdmin(ServiceAppAdmin):
model = SyndicateService
verbose_name = "Syndicate Storage"
@@ -103,7 +118,7 @@
readonly_fields = ['credentials_blob']
-class VolumeAdmin(ReadOnlyAwareAdmin):
+class VolumeAdmin(SyndicateAdmin):
model = Volume
def get_readonly_fields(self, request, obj=None ):