Scott Baker | d219e1e | 2014-05-20 12:04:25 -0700 | [diff] [blame] | 1 | from django.contrib import admin |
| 2 | |
| 3 | from kairos.models import * |
| 4 | from django import forms |
| 5 | from django.utils.safestring import mark_safe |
| 6 | from django.contrib.auth.admin import UserAdmin |
| 7 | from django.contrib.admin.widgets import FilteredSelectMultiple |
| 8 | from django.contrib.auth.forms import ReadOnlyPasswordHashField |
| 9 | from django.contrib.auth.signals import user_logged_in |
| 10 | from django.utils import timezone |
| 11 | from django.contrib.contenttypes import generic |
| 12 | from suit.widgets import LinkedSelect |
Scott Baker | b27b62c | 2014-08-15 16:29:16 -0700 | [diff] [blame^] | 13 | from core.admin import SingletonAdmin,SliceInline,ServiceAttrAsTabInline, ReadOnlyAwareAdmin |
Scott Baker | d219e1e | 2014-05-20 12:04:25 -0700 | [diff] [blame] | 14 | |
| 15 | class KairosDBServiceAdmin(SingletonAdmin): |
| 16 | model = KairosDBService |
| 17 | verbose_name = "KairosDB Service" |
| 18 | verbose_name_plural = "KairosDB Service" |
| 19 | list_display = ("name","enabled") |
| 20 | fieldsets = [(None, {'fields': ['name','enabled','versionNumber', 'description'], 'classes':['suit-tab suit-tab-general']})] |
| 21 | inlines = [SliceInline,ServiceAttrAsTabInline] |
| 22 | |
Scott Baker | d219e1e | 2014-05-20 12:04:25 -0700 | [diff] [blame] | 23 | suit_form_tabs =(('general', 'KairosDB Service Details'), |
| 24 | ('slices','Slices'), |
| 25 | ('serviceattrs','Additional Attributes'), |
| 26 | ) |
| 27 | |
| 28 | admin.site.register(KairosDBService, KairosDBServiceAdmin) |
| 29 | |