wip
This commit is contained in:
parent
94ededdf69
commit
7dafc3c1e4
4 changed files with 178 additions and 52 deletions
|
@ -61,4 +61,58 @@
|
|||
deleteButton.disabled = confirmationInput.value !== subnetCidr;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<!-- Find where application documentation is displayed -->
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Applications in this Subnet</h3>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
{% for app in subnet.applications %}
|
||||
<div class="app-card mb-3">
|
||||
<div class="app-card-header d-flex justify-content-between align-items-center p-3">
|
||||
<span class="app-link">
|
||||
<strong>{{ app.name }}</strong>
|
||||
{% if app.server %}
|
||||
<span class="text-muted fs-sm">on {{ app.server.hostname }} ({{ app.server.ip_address }})</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
<a href="{{ url_for('dashboard.app_view', app_id=app.id) }}" class="btn btn-sm btn-primary">View</a>
|
||||
</div>
|
||||
{% if app.documentation %}
|
||||
<div class="app-card-body p-3">
|
||||
<div class="markdown-content">
|
||||
{{ app.documentation|markdown|safe }}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="app-card-body p-3 text-muted">
|
||||
No documentation available for this application.
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="app-card-footer p-2">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div class="usage-info">
|
||||
<small class="text-muted">Usage</small>
|
||||
<div class="progress" style="width: 100px; height: 6px;">
|
||||
<div class="progress-bar bg-primary" style="width: {{ app.host_usage if app.host_usage else 0 }}%"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="port-info">
|
||||
{% if app.ports %}
|
||||
<small class="text-muted">{{ app.ports|length }} ports</small>
|
||||
{% else %}
|
||||
<small class="text-muted">No ports</small>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="p-3 text-muted">
|
||||
No applications found in this subnet.
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue