1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-11 12:46:49 +00:00

fix(instances): a long VM name wraps on its page

The VM page's heading did not wrap a name without spaces: a 185-character
name made the page 2,600 px wide, even on a 1440 px screen, and pushed the
state badge off it. The heading now breaks the name and the badges wrap
below it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kk4h2TcUiaWmU5MUszYSea
This commit is contained in:
catborise 2026-11-10 09:04:19 +03:00
parent 8c87fe8d32
commit b91a9d6f28

View file

@ -19,9 +19,9 @@
{% if can_open_console and vdi_reachable %}data-vdi-url="{% url 'vdi_url' compute.id instance.name %}"{% endif %}>
<div class="card-body p-3">
<div class="d-flex flex-wrap justify-content-between align-items-start gap-2">
<div>
<div class="d-flex align-items-center gap-2">
<h1 class="h4 mb-0" id="vm-name">{{ instance.name }}</h1>
<div style="min-width: 0;">
<div class="d-flex flex-wrap align-items-center gap-2">
<h1 class="h4 mb-0 text-break" id="vm-name">{{ instance.name }}</h1>
{% vm_state instance.status as state %}
<span class="badge text-bg-{{ state.1 }}">{{ state.0 }}</span>
{% if instance.is_template %}<span class="badge text-bg-light border">{% trans "Template" %}</span>{% endif %}