make RR readonly-aware
Scott Baker [Fri, 23 May 2014 19:47:57 +0000 (12:47 -0700)]
planetstack/requestrouter/admin.py

index a8fd254..36e5fc6 100644 (file)
@@ -20,7 +20,9 @@ class RequestRouterServiceAdmin(SingletonAdmin):
     fieldsets = [(None, {'fields': ['name','enabled','versionNumber', 'description','behindNat','defaultTTL','defaultAction','lastResortAction','maxAnswers'], 'classes':['suit-tab suit-tab-general']})]
     inlines = [SliceInline,ServiceAttrAsTabInline]
 
+    user_readonly_fields = ["name", "enabled", "versionNumber", "description", "behindNat", "defaultTTL", "defaultAction", "lastResortAction", "maxAnswers"]
     user_readonly_inlines = [SliceROInline, ServiceAttrAsTabROInline]
+
     suit_form_tabs =(('general', 'Request Router Service Details'),
         ('slices','Slices'),
         ('serviceattrs','Additional Attributes'),
@@ -33,6 +35,8 @@ class ServiceMapAdmin(ReadOnlyAwareAdmin):
     list_display = ("name", "owner", "slice", "prefix")
     fieldsets = [(None, {'fields': ['name','owner','slice', 'prefix','siteMap','accessMap'], 'classes':['suit-tab suit-tab-general']})]
 
+    user_readonly_fields = ["name", "owner", "slice", "prefix", "siteMap", "accessMap"]
+
     suit_form_tabs =(('general', 'Service Map Details'),
     )