v0.31.7
This commit is contained in:
1 parent
4cc994b3bc
commit
79fd198949
48 files changed
+922
-202
No files matched your search
@@ -394,8 +394,12 @@
|
||||
if (agent.acl_profile_id === profile.id) users.push(`docker-agent:${agent.id}`);
|
||||
for (const assignment of agent.assignments || []) if (assignment.acl_profile_id === profile.id) users.push(`docker:${agent.id}/${assignment.hostname || assignment.service_key}`);
|
||||
}
|
||||
if (users.length) pieces.push(`${t("aclProfileAttached")}: ${users.join(", ")}`);
|
||||
box.append(el("p", pieces.filter(Boolean).join("\n"), "entity-details"));
|
||||
if (users.length) {
|
||||
const attached = el("details", undefined, "acl-profile-attached");
|
||||
attached.append(el("summary", `${t("aclProfileAttached")} (${users.length})`), el("p", users.join(", "), "entity-details"));
|
||||
box.append(attached);
|
||||
}
|
||||
const actions = el("div", undefined, "entity-actions"); actions.append(action(t("edit"), () => edit(profile)), action(t("remove"), async () => {
|
||||
if (users.length) { toast(`${t("aclProfileInUse")}: ${users.join(", ")}`, true); return; }
|
||||
if (!(await appConfirm(t("confirmDelete"), { danger: true }))) return; const next = structuredClone(envelope.config); next.acl_profiles = (next.acl_profiles || []).filter(item => item.id !== profile.id); if (await saveSection("acl-profiles", next.acl_profiles || [])) clear();
|
||||
|
||||
Reference in new issue
Block a user