Skip to content

Commit

Permalink
feat(information_management): Ability to link Knowledge Base article …
Browse files Browse the repository at this point in the history
…to a Operating System

ref: #331 #426 #427 closes #429
  • Loading branch information
jon-nfc committed Dec 21, 2024
1 parent dcc525b commit 4b4c534
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/itam/models/operating_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ class Meta:
}
]
},
{
"name": "Knowledge Base",
"slug": "kb_articles",
"sections": [
{
"layout": "table",
"field": "knowledge_base",
}
]
},
{
"name": "Tickets",
"slug": "ticket",
Expand Down
8 changes: 8 additions & 0 deletions app/itam/serializers/operating_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ def get_url(self, item) -> dict:
}
),
'installations': reverse("v2:_api_v2_operating_system_installs-list", request=self._context['view'].request, kwargs={'operating_system_id': item.pk}),
'knowledge_base': reverse(
"v2:_api_v2_model_kb-list",
request=self._context['view'].request,
kwargs={
'model': self.Meta.model._meta.model_name,
'model_pk': item.pk
}
),
'notes': reverse("v2:_api_v2_operating_system_notes-list", request=self._context['view'].request, kwargs={'operating_system_id': item.pk}),
'tickets': reverse(
"v2:_api_v2_item_tickets-list",
Expand Down

0 comments on commit 4b4c534

Please sign in to comment.