feat(console): CHV executor option in dispatch/env selectors + experimental note in detail/list
- DispatchSection: add cloud-hypervisor option (labelled experimental, default off); default stays docker; hint states a KVM-host CHV worker must claim the task (otherwise it stays queued; attachments are rejected by the backend at creation) and that the frontend only passes the executor value through, never bypassing the backend allowlist. - EnvSection: same option, because the backend env-create allowlist (local/docker/cloud-hypervisor) does allow it; note states env allowlist excludes cloud. - TaskListSection: add cloud-hypervisor to the executor filter so CHV tasks are findable; list rows already showed executor. - TaskDetailPanel: pure display note for cloud-hypervisor tasks (experimental, default off, no VM controls); detail already showed executor from the task API. - README: document the CHV console entry, experimental marking, and verbatim backend-error display. - Rebuilt cloud/console.html from src (tsc + vite single-file build); no backend change: executor is already returned by _task_to_dict.
This commit is contained in:
1 parent
445376743d
commit
036323e620
6 files changed
+29
-19
No files matched your search
@@ -31,10 +31,11 @@ export default function EnvSection() {
|
||||
<input type="text" placeholder="新环境名" value={name} onChange={(e) => setName(e.target.value)} />
|
||||
<input type="text" placeholder="分支(可选,空=默认分支)" value={branch} onChange={(e) => setBranch(e.target.value)} />
|
||||
<select aria-label="新环境执行器" value={executor} onChange={(e) => setExecutor(e.target.value)}>
|
||||
<option value="">执行器:不限</option><option value="local">local</option><option value="docker">docker</option>
|
||||
<option value="">执行器:不限</option><option value="local">local</option><option value="docker">docker</option><option value="cloud-hypervisor">cloud-hypervisor(实验,默认关闭)</option>
|
||||
</select>
|
||||
<button onClick={async () => { await ctx.createEnv(name, branch, executor); setName(""); setBranch(""); }}>新建环境</button>
|
||||
</Bar>
|
||||
{executor === "cloud-hypervisor" ? <div className="muted">实验执行器,默认关闭:环境创建白名单同样允许 cloud-hypervisor(后端环境接口 allowlist:local / docker / cloud-hypervisor,不含 cloud);仍需后端有 KVM 宿主上的 CHV worker 才会认领,否则任务排队。前端只传值,不绕过后端白名单。</div> : null}
|
||||
<span className="muted">{ctx.envMsg}</span>
|
||||
</Card>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user