from django.contrib import admin

from assets.models.assets import OperatingSystem, AssetListGroup, Asset, AssetManufacturer
from core.mixins import JsonWidgetMixin


class AssetAdmin(JsonWidgetMixin, admin.ModelAdmin):
    list_display = ('ip', 'os', 'name', 'status')
    list_display_links = ('name',)
    list_filter = ('os',)


admin.site.register(OperatingSystem)
admin.site.register(AssetListGroup)
admin.site.register(Asset, AssetAdmin)
admin.site.register(AssetManufacturer)
