Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions netbox_diode_plugin/reconciler/sdk/v1/reconciler_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions netbox_diode_plugin/reconciler/sdk/v1/reconciler_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
RECONCILED: _ClassVar[State]
FAILED: _ClassVar[State]
NO_CHANGES: _ClassVar[State]
IGNORED: _ClassVar[State]
UNSPECIFIED: State
QUEUED: State
RECONCILED: State
FAILED: State
NO_CHANGES: State
IGNORED: State

class IngestionDataSource(_message.Message):
__slots__ = ("name", "api_key")
Expand Down Expand Up @@ -86,12 +88,14 @@ class IngestionMetrics(_message.Message):
def __init__(self, total: _Optional[int] = ..., queued: _Optional[int] = ..., reconciled: _Optional[int] = ..., failed: _Optional[int] = ..., no_changes: _Optional[int] = ...) -> None: ...

class ChangeSet(_message.Message):
__slots__ = ("id", "data")
__slots__ = ("id", "data", "branch_id")
ID_FIELD_NUMBER: _ClassVar[int]
DATA_FIELD_NUMBER: _ClassVar[int]
BRANCH_ID_FIELD_NUMBER: _ClassVar[int]
id: str
data: bytes
def __init__(self, id: _Optional[str] = ..., data: _Optional[bytes] = ...) -> None: ...
branch_id: str
def __init__(self, id: _Optional[str] = ..., data: _Optional[bytes] = ..., branch_id: _Optional[str] = ...) -> None: ...

class IngestionLog(_message.Message):
__slots__ = ("id", "data_type", "state", "request_id", "ingestion_ts", "producer_app_name", "producer_app_version", "sdk_name", "sdk_version", "entity", "error", "change_set")
Expand Down
5 changes: 4 additions & 1 deletion netbox_diode_plugin/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ class IngestionStateColumn(tables.Column):
def render(self, value):
"""Renders the ingestion state as a human-readable string."""
if value:
state_name = reconciler_pb2.State.Name(value)
try:
state_name = reconciler_pb2.State.Name(value)
except ValueError:
state_name = reconciler_pb2.State.Name(reconciler_pb2.State.UNSPECIFIED)
return " ".join(state_name.title().split("_"))
return None

Expand Down
Loading