init
Some checks failed
Build And Test / build-and-push (push) Failing after 53s

This commit is contained in:
2024-12-13 17:12:03 +09:00
parent a27be94b19
commit ea11832a53
695 changed files with 71766 additions and 1 deletions

View File

@ -0,0 +1,17 @@
{% extends "components/base.html" %}
{% block main_area %}
<h1>Create Ansible Job</h1>
<form method="POST">
{% csrf_token %}
<label for="id_name">Name:</label>
{{ form.name }}
<label for="id_inventory_content">Inventory content:</label>
{{ form.inventory_content }}
<label for="id_playbook_content">Playbook content:</label>
{{ form.playbook_content }}
<button type="submit" class="btn btn-primary">Create</button>
</form>
{% endblock %}

View File

@ -0,0 +1,11 @@
{% extends "components/base.html" %}
{% block main_area %}
<h1>Edit Ansible Job</h1>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<button type="submit" class="btn btn-primary">Save Changes</button>
<a href="{% url 'ansible_manager:job_list' %}" class="btn btn-secondary">Cancel</a>
</form>
{% endblock %}

View File

@ -0,0 +1,12 @@
{% extends "components/base.html" %}
{% block main_area %}
<h1>Job Details: {{ job.name }}</h1>
<p><strong>Status:</strong> {{ job.status }}</p>
<p><strong>Created At:</strong> {{ job.created_at }}</p>
<p><strong>Updated At:</strong> {{ job.updated_at }}</p>
<h3>Result:</h3>
<pre>{{ job.result|escape|linebreaksbr|default:"No result yet." }}</pre>
<a href="{% url 'ansible_manager:job_list' %}" class="btn btn-secondary">Back to List</a>
{% endblock %}

View File

@ -0,0 +1,36 @@
{% extends "components/base.html" %}
{% block main_area %}
<h1>Ansible Jobs</h1>
<table class="table table-striped">
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Status</th>
<th>Created</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for job in jobs %}
<tr>
<td>{{ forloop.counter }}</td>
<td>{{ job.name }}</td>
<td>{{ job.status }}</td>
<td>{{ job.created_at }}</td>
<td>
<a href="{% url 'ansible_manager:job_detail' job.id %}" class="btn btn-info">View</a>
<a href="{% url 'ansible_manager:run_job' job.id %}" class="btn btn-success">Run</a>
<a href="{% url 'ansible_manager:edit_job' job.id %}" class="btn btn-warning">Edit</a>
<a href="{% url 'ansible_manager:delete_job' job.id %}" class="btn btn-danger">Delete</a>
</td>
</tr>
{% empty %}
<tr>
<td colspan="5">No jobs available.</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{% url 'ansible_manager:create_job' %}" class="btn btn-primary">Create New Job</a>
{% endblock %}