mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-02 17:06:09 +00:00
fix(tags): the Tags page shows small tag badges as the other pages
Its badges were the full badge size; they are the tag badge every other page shows.
This commit is contained in:
parent
f6b1ee8985
commit
9e4dcbe6fc
2 changed files with 2 additions and 1 deletions
|
|
@ -24,7 +24,7 @@
|
|||
<tbody>
|
||||
{% for tag in tags %}
|
||||
<tr>
|
||||
<td><span class="badge text-bg-light border">{% bs_icon 'tag' %} {{ tag }}</span></td>
|
||||
<td>{% include 'common/tag_badge.html' with tag=tag.name %}</td>
|
||||
<td>{{ tag.vm_count }}</td>
|
||||
<td>{{ tag.host_count }}</td>
|
||||
<td class="text-end text-nowrap">
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ class TagAdminTests(TestCase):
|
|||
def test_the_list_counts_each_tag_s_vms_and_hosts(self):
|
||||
response = self.client.get(reverse("admin:tag_list"))
|
||||
self.assertEqual([(t.name, t.vm_count, t.host_count) for t in response.context["tags"]], [("prod", 1, 1)])
|
||||
self.assertContains(response, 'class="badge tag-badge') # as small as on the other pages
|
||||
|
||||
def test_a_rename_keeps_the_tag_on_its_vms_hosts_and_removed_vms(self):
|
||||
self.client.post(reverse("admin:tag_update", args=[self.prod.pk]), {"name": "Live"})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue