Files
devplacepy/devplacepy/templates/containers.html
T
retoor 6ceca3d0d4 docs: document server-side rendering pipeline, response timing middleware, and Telegram pairing API
- Add comprehensive documentation for backend content rendering in AGENTS.md, detailing the new `render_content` and `render_title` Jinja globals built on mistune with media processing, emoji shortcodes, and XSS protection
- Document the `X-Response-Time` header and bottom-left render time indicator in README.md
- Update bot token pricing documentation to clarify fallback vs gateway cost headers
- Add `email_accounts` to soft-delete tables and `idx_users_role` composite index in database schema
- Implement `telegram_pairings` and `telegram_links` table creation with column migration and indexes
- Add `/profile/{username}/telegram` endpoint to docs API with request/unpair actions
- Register `TelegramService` in main.py lifespan and add `response_timing` middleware emitting `X-Response-Time` header
- Introduce `TelegramPairForm` model and `guard_public_host_sync` synchronous host validation function
2026-06-18 22:09:34 +00:00

88 lines
3.7 KiB
HTML

{% extends "base.html" %}
{% from "_macros.html" import modal %}
{% block extra_head %}
<link rel="stylesheet" href="{{ static_url('/static/css/containers.css') }}">
{% endblock %}
{% block content %}
<h1 class="sr-only">Container manager</h1>
<div class="cm-page" id="container-manager"
data-slug="{{ project['slug'] or project['uid'] }}"
data-title="{{ project['title'] }}">
<div class="cm-header">
<a href="/projects/{{ project['slug'] or project['uid'] }}" class="back-link">&larr; {{ render_title(project['title']) }}</a>
<a href="/admin/containers" class="cm-header-link">All containers &rarr;</a>
</div>
<div class="cm-body">
<section class="card cm-col cm-instances">
<div class="cm-col-head">
<h2>Instances</h2>
<button type="button" class="btn btn-primary" data-modal="cm-new-instance-modal">New</button>
</div>
<p class="cm-hint">Every instance runs the shared <code>ppy</code> image with this project's files mounted at <code>/app</code>.</p>
<ul class="cm-list" id="cm-instance-list"></ul>
</section>
</div>
<script type="application/json" id="cm-data">{{ {"instances": instances} | tojson }}</script>
</div>
{% call modal('cm-new-instance-modal', 'New instance') %}
<form id="cm-new-instance-form" class="cm-modal-form">
<div class="auth-field auth-field-gap">
<label for="cm-inst-new-name">Name</label>
<input type="text" id="cm-inst-new-name" name="name" required maxlength="64" placeholder="my-service">
</div>
<div class="auth-field auth-field-gap">
<label for="cm-inst-new-boot">Boot command</label>
<input type="text" id="cm-inst-new-boot" name="boot_command" placeholder="Optional, e.g. python app.py">
</div>
<div class="grid-2col">
<div class="auth-field">
<label for="cm-inst-new-policy">Restart policy</label>
<select id="cm-inst-new-policy" name="restart_policy">
<option value="never">never</option>
<option value="on-failure">on-failure</option>
<option value="always">always</option>
<option value="unless-stopped">unless-stopped</option>
</select>
</div>
<div class="auth-field">
<label for="cm-inst-new-ports">Ports</label>
<input type="text" id="cm-inst-new-ports" name="ports" placeholder="8080 or 8080:80">
</div>
</div>
<div class="grid-2col">
<div class="auth-field">
<label for="cm-inst-new-ingress">Ingress slug</label>
<input type="text" id="cm-inst-new-ingress" name="ingress_slug" placeholder="Optional, /p/&lt;slug&gt;">
</div>
<div class="auth-field">
<label for="cm-inst-new-ingress-port">Ingress port</label>
<input type="number" id="cm-inst-new-ingress-port" name="ingress_port" min="1" placeholder="container port">
</div>
</div>
<div class="auth-field auth-field-gap">
<label class="topic-label">
<input type="checkbox" id="cm-inst-new-autostart" name="autostart" value="true" checked> Start immediately
</label>
</div>
<div class="modal-footer">
<button type="button" class="modal-close btn btn-secondary">Cancel</button>
<button type="submit" class="btn btn-primary">Create</button>
</div>
</form>
{% endcall %}
{% endblock %}
{% block extra_js %}
<script type="module">
import { ContainerManager } from "{{ static_url('/static/js/ContainerManager.js') }}";
const root = document.getElementById("container-manager");
if (root) {
const manager = new ContainerManager(root);
manager.init();
window.app.containers = manager;
}
</script>
{% endblock %}