Skip to content

Commit b0add93

Browse files
committed
updated cluster_string datattype ACG
1 parent 92bfb5b commit b0add93

5 files changed

Lines changed: 24 additions & 8 deletions

File tree

ACGen/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ class ClusterTemplate(models.Model):
2020
id = models.AutoField(primary_key=True)
2121
cluster_name = models.CharField(max_length=255, unique=True)
2222
cluster_config = models.TextField(null=True,blank=True)
23-
cluster_string = models.CharField(null=True, blank=True)
23+
cluster_string = models.TextField(null=True, blank=True)
24+
cluster_version = models.CharField(max_length=255, null=True, blank=True)
2425
block_type = models.CharField(max_length=255)
2526
uploaded_by = models.CharField(max_length=255)
2627
uploaded_at = models.DateTimeField(auto_now_add=True)

IOLGen/admin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ class ProjectAdmin(ImportExportModelAdmin, admin.ModelAdmin):
3333

3434
@admin.register(Module)
3535
class ModuleAdmin(ImportExportModelAdmin, admin.ModelAdmin):
36-
list_display = ('id', 'module', 'created_by', 'created_at')
37-
search_fields = ('module', 'created_by')
38-
list_filter = ('created_at',)
36+
list_display = ('id', 'module', 'segment', 'created_by', 'created_at')
37+
search_fields = ('module', 'created_by', 'segment')
38+
list_filter = ('segment','module')
3939

4040
@admin.register(IOList)
4141
class IOListAdmin(ImportExportModelAdmin, admin.ModelAdmin):

IOLGen/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class ProjectsView(TemplateView):
5151

5252
@login_required
5353
def get_project_list(request):
54-
projects = Project.objects.all()
54+
projects = Project.objects.all().order_by('created_at').reverse()
5555
context = {}
5656
context['projects'] = projects # type: ignore
5757
return render(request, 'IOLGen/partials/projectTable.html', {'projects': projects})

templates/IOLGen/partials/projectTable.html

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,25 @@
1111
<tr>
1212
<td>{{ project.name }}</td>
1313
<td>{{ project.description }}</td>
14-
<td>{{ project.segments }}</td>
14+
<td>
15+
{% for segment in project.segments.all %}
16+
{{ segment.name }}{% if not forloop.last %}, {% endif %}
17+
{% empty %}
18+
<em>No segments</em>
19+
{% endfor %}
20+
</td>
1521
<td>{{ project.created_by }}</td>
1622
<td>{{ project.created_at }}</td>
17-
<td><button class='btn'><svg class="bi bi-pencil" width="32" height="32"><use xlink:href="#pencil"></svg></button></td>
18-
<td><button class='btn'><svg class="bi bi-trash3" width="32" height="32"><use xlink:href="#trash3"></svg></button></td>
23+
<td>
24+
<button class='btn'>
25+
<i class="bi bi-pencil" style="font-size: 32px;"></i>
26+
</button>
27+
</td>
28+
<td>
29+
<button class='btn'>
30+
<i class="bi bi-trash3" style="font-size: 32px;"></i>
31+
</button>
32+
</td>
1933
</tr>
2034
{% endfor %}
2135
</tbody>

templates/base.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
<link rel="stylesheet" href="{% static 'base/base.css' %}">
1212
<!-- Bootstrap CDN for CSS -->
13+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
1314
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.5/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-SgOJa3DmI69IUzQ2PVdRZhwQ+dy64/BUtbMJw1MZ8t5HZApcHrRKUc4W0kG879m7" crossorigin="anonymous">
1415
{% block styles %}{% endblock %}
1516
</head>

0 commit comments

Comments
 (0)