Skip to content

Commit

Permalink
remove conditional views from golden config overview
Browse files Browse the repository at this point in the history
  • Loading branch information
jtdub committed Dec 13, 2024
1 parent a21f35c commit 3113bf9
Showing 1 changed file with 13 additions and 18 deletions.
31 changes: 13 additions & 18 deletions nautobot_golden_config/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,24 +262,19 @@ class GoldenConfigTable(BaseTable):
text=lambda record: record.device.name,
verbose_name="Device",
)

if ENABLE_BACKUP:
backup_last_success_date = Column(
verbose_name="Backup Status", empty_values=(), order_by="backup_last_success_date"
)
if ENABLE_INTENDED:
intended_last_success_date = Column(
verbose_name="Intended Status",
empty_values=(),
order_by="intended_last_success_date",
)
if ENABLE_COMPLIANCE:
compliance_last_success_date = Column(
verbose_name="Compliance Status",
empty_values=(),
order_by="compliance_last_success_date",
)

backup_last_success_date = Column(
verbose_name="Backup Status", empty_values=(), order_by="backup_last_success_date"
)
intended_last_success_date = Column(
verbose_name="Intended Status",
empty_values=(),
order_by="intended_last_success_date",
)
compliance_last_success_date = Column(
verbose_name="Compliance Status",
empty_values=(),
order_by="compliance_last_success_date",
)
actions = TemplateColumn(
template_code=ALL_ACTIONS, verbose_name="Actions", extra_context=CONFIG_FEATURES, orderable=False
)
Expand Down

0 comments on commit 3113bf9

Please sign in to comment.