Skip to content

Commit

Permalink
Merge pull request #608 from furlongm/modules
Browse files Browse the repository at this point in the history
update module string and table
  • Loading branch information
furlongm authored Aug 8, 2024
2 parents fd72a18 + 3355202 commit c838677
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion modules/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Meta:
ordering = ('name', 'stream',)

def __str__(self):
return f'{self.name}-{self.stream}'
return f'{self.name}-{self.stream}-{self.version}-{self.version}-{self.context}'

def get_absolute_url(self):
return reverse('modules:module_detail', args=[str(self.id)])
12 changes: 8 additions & 4 deletions modules/templates/modules/module_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
<table class="table table-striped table-bordered table-hover table-condensed table-responsive">
<thead>
<tr>
<th class="col-sm-auto">Module</th>
<th class="col-sm-auto">ID</th>
<th class="col-sm-auto">Name</th>
<th class="col-sm-auto">Stream</th>
<th class="col-sm-auto">Version</th>
<th class="col-sm-auto">Context</th>
<th class="col-sm-auto">Repo</th>
<th class="col-sm-auto">Packages</th>
<th class="col-md-auto">Enabled on Hosts</th>
Expand All @@ -12,8 +14,10 @@
<tbody>
{% for module in object_list %}
<tr>
<td><a href="{{ module.get_absolute_url }}">{{ module }}</a></td>
<td>{{ module.id }}</td>
<td><a href="{{ module.get_absolute_url }}">{{ module.name }}</a></td>
<td>{{ module.stream }}</td>
<td>{{ module.version }}</td>
<td>{{ module.context }}</td>
<td><a href="{{ module.repo.get_absolute_url }}">{{ module.repo }}</a></td>
<td>{{ module.packages.count }}</td>
<td>{{ module.host_set.count }}</td>
Expand Down

0 comments on commit c838677

Please sign in to comment.