123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- import django_tables2 as tables
- from dbsynce.models import *
- from dbsynce.models import *
- from django.contrib.auth import get_user_model
- from django.utils.html import format_html
- from django.utils.translation import gettext_lazy as _
- from dbsynce.lib.dicts import *
- class ProvidersLandingTable(tables.Table):
- id = tables.Column(
- verbose_name=_('ID'),
- attrs={
- "td": {"width": "5%"}
- }
- )
- gap = tables.Column(
- #verbose_name=_('Status'),
- attrs={
- 'th': {'scope': 'col'},
- "td": {"width": "20%"}
- }
- )
- service_status = tables.Column(
- attrs={
- 'th': {'scope': 'col'},
- "td": {"width": "20%"}
- }
- )
- default_location = tables.Column(
- attrs={
- 'th': {'scope': 'col'},
- "td": {"width": "20%"}
- }
- )
- resource = tables.LinkColumn(
- 'sharix_admin:resource_detail',
- args=[tables.A('resource.pk')],
- accessor='resource.resource_type',
- verbose_name=_('Resource'),
- attrs={
- 'th': {'scope': 'col'},
- "td": {"width": "20%"}
- }
- )
- class Meta:
- model = Provider
- attrs = {
- "class": "table table-layout-fixed"
- }
- exclude = (
- 'id_metaservice',
- 'requirements',
- 'status',
- 'location_type',
- 'default_location',
- 'is_global',
- 'is_visible',
- 'ticket_status',
- )
|