billing frontend for mariadb. setup as otb_billing for outsidethebox.top accounting. also involved with outsidethedb
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

100 lines
3.1 KiB

<!doctype html>
<html>
<head>
<title>Service Templates</title>
<link rel="icon" type="image/png" href="/static/favicon.png">
</head>
<body>
<h1>Service Templates</h1>
<p><a href="/">Home</a></p>
<p>
<a href="/services">Back to Services</a> |
<a href="/service-templates/new">Add Service Template</a>
</p>
<form method="get" action="/service-templates" style="margin-bottom: 16px; padding: 10px; border: 1px solid #ccc;">
<p style="margin: 0 0 10px 0;"><strong>Filters</strong></p>
<p style="margin: 0 0 10px 0;">
Service Type<br>
<select name="service_type">
<option value="" {% if not selected_type %}selected{% endif %}>All</option>
<option value="hosting" {% if selected_type == 'hosting' %}selected{% endif %}>hosting</option>
<option value="crypto_infra" {% if selected_type == 'crypto_infra' %}selected{% endif %}>crypto_infra</option>
<option value="saas" {% if selected_type == 'saas' %}selected{% endif %}>saas</option>
<option value="consulting" {% if selected_type == 'consulting' %}selected{% endif %}>consulting</option>
<option value="other" {% if selected_type == 'other' %}selected{% endif %}>other</option>
</select>
</p>
<p style="margin: 0 0 10px 0;">
Active<br>
<select name="is_active">
<option value="" {% if not selected_active %}selected{% endif %}>All</option>
<option value="1" {% if selected_active == '1' %}selected{% endif %}>yes</option>
<option value="0" {% if selected_active == '0' %}selected{% endif %}>no</option>
</select>
</p>
<p style="margin: 0;">
<button type="submit">Apply Filters</button>
<a href="/service-templates" style="margin-left: 10px;">Clear</a>
</p>
</form>
<p>
Showing <strong>{{ total_count }}</strong> template{% if total_count != 1 %}s{% endif %}
{% if selected_type %} | Type: <strong>{{ selected_type }}</strong>{% endif %}
{% if selected_active == '1' %} | Active: <strong>yes</strong>{% endif %}
{% if selected_active == '0' %} | Active: <strong>no</strong>{% endif %}
</p>
<table border="1" cellpadding="6">
<tr>
<th>ID</th>
<th>Template Name</th>
<th>Type</th>
<th>Cycle</th>
<th>Currency</th>
<th>Recurring</th>
<th>Setup</th>
<th>Used By</th>
<th>Active Used By</th>
<th>Active</th>
<th>Actions</th>
</tr>
{% for t in templates %}
<tr>
<td>{{ t.id }}</td>
<td>{{ t.template_name }}</td>
<td>{{ t.service_type }}</td>
<td>{{ t.billing_cycle }}</td>
<td>{{ t.currency_code }}</td>
<td>{{ t.recurring_amount|money(t.currency_code) }}</td>
<td>{{ t.setup_amount|money(t.currency_code) }}</td>
<td>{{ t.usage_count }}</td>
<td>{{ t.active_usage_count }}</td>
<td>{% if t.is_active %}yes{% else %}no{% endif %}</td>
<td>
<a href="/service-templates/edit/{{ t.id }}">Edit</a>
{% if t.is_active %}
| <a href="/services/new?template_id={{ t.id }}">Create Service</a>
{% endif %}
</td>
</tr>
{% endfor %}
{% if not templates %}
<tr>
<td colspan="11" style="text-align:center;">No service templates matched the selected filters.</td>
</tr>
{% endif %}
</table>
{% include "footer.html" %}
</body>
</html>