Skip to content

Commit d79f975

Browse files
committed
classic copies of templates
1 parent 8df8d24 commit d79f975

4 files changed

Lines changed: 120 additions & 0 deletions

File tree

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
{% extends "base.html" %}
2+
{% load navigation_tags %}
3+
{% load authorization_tags %}
4+
{% block content %}
5+
{{ block.super }}
6+
<div class="row">
7+
<div class="col-md-12">
8+
<div class="panel panel-default">
9+
<div class="panel-heading tight">
10+
<h3 class="has-filters">
11+
CI/CD Infrastructure
12+
<div class="dropdown pull-right">
13+
{% if "dojo.add_cicdinfrastructure"|has_configuration_permission:request %}
14+
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu1"
15+
data-toggle="dropdown" aria-expanded="true" aria-label="CI/CD infrastructure options">
16+
<span class="fa-solid fa-server"></span>
17+
<span class="caret"></span>
18+
</button>
19+
<ul class="dropdown-menu dropdown-menu-right" role="menu"
20+
aria-labelledby="dropdownMenu1">
21+
<li role="presentation">
22+
<a href="{% url 'add_cicd_infrastructure' %}">
23+
<i class="fa-solid fa-plus"></i> Add CI/CD Infrastructure
24+
</a>
25+
</li>
26+
</ul>
27+
{% endif %}
28+
</div>
29+
</h3>
30+
</div>
31+
</div>
32+
{% if confs %}
33+
<div class="panel panel-default table-responsive">
34+
<table id="cicd_infrastructure"
35+
class="tablesorter-bootstrap table table-condensed table-striped">
36+
<thead>
37+
<tr>
38+
<th>Name</th>
39+
<th>Description</th>
40+
<th>URL</th>
41+
<th>Type</th>
42+
<th>Actions</th>
43+
</tr>
44+
</thead>
45+
<tbody>
46+
{% for conf in confs %}
47+
<tr>
48+
<td>
49+
{% if "dojo.change_cicdinfrastructure"|has_configuration_permission:request %}
50+
<a href="{% url 'edit_cicd_infrastructure' conf.id %}"><b>{{ conf.name }}</b></a>
51+
{% else %}
52+
{{ conf.name }}
53+
{% endif %}
54+
</td>
55+
<td>
56+
{% if conf.description %}{{ conf.description }}{% endif %}
57+
</td>
58+
<td>
59+
{% if conf.url %}{{ conf.url }}{% endif %}
60+
</td>
61+
<td>
62+
{{ conf.get_infrastructure_type_display }}
63+
</td>
64+
<td>
65+
{% if "dojo.delete_cicdinfrastructure"|has_configuration_permission:request %}
66+
<a href="{% url 'delete_cicd_infrastructure' conf.id %}" class="btn btn-xs" title="Delete">
67+
<i class="fa-solid fa-trash"></i>
68+
</a>
69+
{% endif %}
70+
</td>
71+
</tr>
72+
{% endfor %}
73+
</tbody>
74+
</table>
75+
</div>
76+
{% else %}
77+
<p class="text-center">No CI/CD infrastructure found.</p>
78+
{% endif %}
79+
</div>
80+
</div>
81+
{% endblock %}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{% extends "base.html" %}
2+
{% block content %}
3+
{{ block.super }}
4+
<h3>Delete CI/CD Infrastructure</h3>
5+
<p>Are you sure you want to delete <b>{{ conf.name }}</b>?</p>
6+
<p>Any engagements referencing this infrastructure will have the reference cleared.</p>
7+
<form method="post">{% csrf_token %}
8+
<div class="form-group">
9+
<a href="{% url 'cicd_infrastructure' %}" class="btn btn-default">Cancel</a>
10+
<input class="btn btn-danger" type="submit" value="Delete"/>
11+
</div>
12+
</form>
13+
{% endblock %}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{% extends "base.html" %}
2+
{% block content %}
3+
{{ block.super }}
4+
<h3>Edit CI/CD Infrastructure</h3>
5+
<form class="form-horizontal" method="post">{% csrf_token %}
6+
{% include "dojo/form_fields.html" with form=form %}
7+
<div class="form-group">
8+
<div class="col-sm-offset-2 col-sm-10">
9+
<input class="btn btn-primary" type="submit" value="Submit"/>
10+
</div>
11+
</div>
12+
</form>
13+
{% endblock %}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{% extends "base.html" %}
2+
{% block content %}
3+
{{ block.super }}
4+
<h3>Add CI/CD Infrastructure</h3>
5+
<form class="form-horizontal" action="{% url 'add_cicd_infrastructure' %}" method="post">{% csrf_token %}
6+
{% include "dojo/form_fields.html" with form=form %}
7+
<div class="form-group">
8+
<div class="col-sm-offset-2 col-sm-10">
9+
<input class="btn btn-primary" type="submit" value="Submit"/>
10+
</div>
11+
</div>
12+
</form>
13+
{% endblock %}

0 commit comments

Comments
 (0)