lablink_allocator_service.routes.admin_pages¶
lablink_allocator_service.routes.admin_pages
¶
Admin HTML pages, all behind HTTP Basic auth.
Rendering only — every state change these pages trigger is posted to a JSON endpoint in another blueprint (provisioning, admin_sessions, schedules).
Attributes¶
bp = Blueprint('admin_pages', __name__)
module-attribute
¶
logger = logging.getLogger(__name__)
module-attribute
¶
Functions:¶
admin()
¶
Render the admin panel: entry links, pool counts, connection usage.
Source code in packages/allocator/src/lablink_allocator_service/routes/admin_pages.py
byo_onboarding()
¶
Render the ready-to-copy lablink client register command for BYO clients.
The register token rotates on each allocator restart, so this page is dynamic — re-render to get the current token. Behind admin Basic auth (same gate as the rest of /admin); no new privilege boundary.
The rendered flags depend on the configured connectivity, because
register_client rejects a shape that doesn't match it with a 400 (see
its expects_overlay/expects_tunnel checks) — a single lan_direct
command would be guaranteed-broken copy-paste on the other two modes.
Read off client_connectivity.name rather than
cfg.manual.connectivity so this page and that check can never disagree.
Source code in packages/allocator/src/lablink_allocator_service/routes/admin_pages.py
create_instances()
¶
Render the VM creation page (drives POST /api/launch).
delete_instances()
¶
Render the destroy-confirmation page (drives POST /destroy).
Source code in packages/allocator/src/lablink_allocator_service/routes/admin_pages.py
get_vm_logs(hostname)
¶
Get the logs for a specific VM.
Source code in packages/allocator/src/lablink_allocator_service/routes/admin_pages.py
scheduled_destruction_page()
¶
Render scheduled destruction management page.
Source code in packages/allocator/src/lablink_allocator_service/routes/admin_pages.py
view_instances()
¶
Render the instances table with per-VM session actions.
Source code in packages/allocator/src/lablink_allocator_service/routes/admin_pages.py
view_instances_fragment()
¶
Instances table as an HTML fragment, for the page's auto-refresh.