Files
RoleForge/app/templates/cluster-provisioning.xhtml
Sergey Antropoff 1d2301fb09 first commit
2026-04-30 08:59:31 +03:00

60 lines
3.1 KiB
HTML

{% extends "base.xhtml" %}
{% from "macros/page-hero.xhtml" import page_hero %}
{% block content %}
{% set prov_titles = {
"k3s": "Cluster options",
"group-all": "Group vars",
"group-addons": "Addons",
"group-vault": "Vault yml",
"inventory": "Inventory",
"host-vars": "Host vars",
"addons-enable": "Addons enable"
} %}
{% set prov_title = prov_titles.get(provisioning_sub, "Cluster provisioning") %}
{{ page_hero("Provisioning", prov_title, "Provisioning settings for this section.") }}
<pre id="cluster-detail-output" class="form-output hidden" data-cluster-id="{{ cluster_id }}"></pre>
<section class="card" id="cluster-provisioning-section">
<h2>{{ prov_title }}</h2>
<form id="cluster-provisioning-form" class="form-modern" data-cluster-id="{{ cluster_id }}">
<div class="prov-sec prov-sec--k3s" data-provision="k3s">
<h3 class="h3">Cluster options</h3>
<div id="cluster-provisioning-wizard" class="schema-grid"></div>
</div>
<div class="prov-sec prov-sec--gvh" data-provision="group">
<div id="cluster-provisioning-gv" class="schema-grid schema-grid--provisioning-yaml"></div>
</div>
<div class="prov-sec prov-sec--host" data-provision="host">
<h3 class="h3" style="margin-top:1rem">host_vars</h3>
<div id="host-vars-hint-wrap" class="provisioning-host-hint" aria-label=""></div>
<p class="small-note">One YAML block per host. Use the button to add another host key.</p>
<div id="cluster-provisioning-hostvars" class="stack-hostvars"></div>
<button type="button" id="cluster-add-hostvar-btn" class="btn-muted" style="margin-bottom:0.75rem">Add host_vars entry</button>
</div>
<div class="prov-sec prov-sec--nodes" data-provision="nodes">
<h3 class="h3" style="margin-top:0.5rem">Nodes (inventory from DB)</h3>
<div class="table-wrap" style="overflow-x:auto">
<table class="data-table" id="cluster-nodes-table">
<thead><tr><th>Name</th><th>Role</th><th>Status</th><th>IP</th><th></th></tr></thead>
<tbody id="cluster-nodes-tbody"></tbody>
</table>
</div>
<div class="form-actions form-actions-start" style="margin-top:8px">
<button type="button" id="cluster-add-node-btn" class="btn-muted">Add node</button>
</div>
</div>
<div class="prov-sec prov-sec--addonen" data-provision="addonen">
<h3 class="h3">Add-ons enable</h3>
<p class="small-note" style="margin:0 0 8px">Enable add-ons for this cluster.</p>
<div id="cluster-addons-enable-list" class="addons-enable-list" aria-live="polite"></div>
</div>
<div class="form-actions prov-sec prov-sec--actions" style="margin-top:1rem" data-provision="actions">
<button type="submit" id="cluster-provisioning-save">Save provisioning</button>
<button type="button" class="btn-muted" id="cluster-dryrun-btn">Dry-run (saved)</button>
<button type="button" class="btn-muted" id="cluster-molecule-btn">Molecule (saved)</button>
<button type="button" id="cluster-bootstrap-btn">Run install (bootstrap)</button>
</div>
</form>
<pre id="cluster-provisioning-output" class="form-output"></pre>
</section>
{% endblock %}