blob: 1eeb4260f5ec5da4dae16e7389d0e84b0b48cf9d [file] [log] [blame]
Scott Bakerd219e1e2014-05-20 12:04:25 -07001from django.contrib import admin
2
3from nagios.models import *
4from django import forms
5from django.utils.safestring import mark_safe
6from django.contrib.auth.admin import UserAdmin
7from django.contrib.admin.widgets import FilteredSelectMultiple
8from django.contrib.auth.forms import ReadOnlyPasswordHashField
9from django.contrib.auth.signals import user_logged_in
10from django.utils import timezone
11from django.contrib.contenttypes import generic
12from suit.widgets import LinkedSelect
13from core.admin import SingletonAdmin,SliceInline,ServiceAttrAsTabInline, SliceROInline,ServiceAttrAsTabROInline, ReadOnlyAwareAdmin
14
15class NagiosServiceAdmin(SingletonAdmin):
16 model = NagiosService
17 verbose_name = "Nagios Service"
18 verbose_name_plural = "Nagios 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
23 user_readonly_inlines = [SliceROInline, ServiceAttrAsTabROInline]
24 suit_form_tabs =(('general', 'Nagios Service Details'),
25 ('slices','Slices'),
26 ('serviceattrs','Additional Attributes'),
27 )
28
29admin.site.register(NagiosService, NagiosServiceAdmin)
30