Compare commits

..

2 Commits

Author SHA1 Message Date
oliver ea38cf998a Update app.js 2026-06-10 20:36:27 -03:00
oliver 701f4e8e3e disable 2026-06-10 20:34:06 -03:00
+37 -4
View File
@@ -444,7 +444,7 @@ function populateDemoShell() {
document.getElementById("user-email-label").textContent = "preview";
renderComment("My AI Assistant");
// Agent tab
// Agent tab (first agent — hermes — has BACKUP & SSH, second agent — bell — does not)
document.getElementById("agent-tabs-bar").innerHTML = `
<button class="agent-tab active">
<span class="agent-tab-dot"></span>
@@ -462,6 +462,10 @@ function populateDemoShell() {
hide("no-agents");
document.getElementById("agent-panel").style.display = "flex";
// Backups — hide the + button to demo a non-BACKUP agent
const makeBtn = document.getElementById("make-backup-btn");
if (makeBtn) makeBtn.style.display = "none";
// API Keys
const keysDot = document.getElementById("keys-status-dot");
keysDot.className = "contract-dot contract-dot--green";
@@ -494,9 +498,9 @@ function populateDemoShell() {
<span class="server-info-label">Dashboard</span>
<span class="server-info-val"><a href="#" class="server-info-link" onclick="return false">hermes.derez.ai</a></span>
</div>
<div class="server-info-row server-info-row--copy" title="Click to copy">
<div class="server-info-row">
<span class="server-info-label">SSH Access</span>
<span class="server-info-val server-info-copyval">ssh root@hermes.derez.ai -p 2201</span>
<span class="server-info-val"><a class="server-info-link" href="#" onclick="event.preventDefault();openBillingPortal()">Upgrade</a></span>
</div>
<div class="server-info-row">
<span class="server-info-label">Created</span>
@@ -741,6 +745,17 @@ function renderAgentInfo(info) {
const port = stripQuotes(info.ssh_port);
const sshCmd = `ssh root@${activeUUID}.derez.ai -p ${port}`;
// Check SSH flag from agents list
const agent = agents.find((a) => (a.UUID || a.uuid) === activeUUID);
const hasSSH =
agent &&
!(
agent.SSH === null ||
agent.SSH === undefined ||
agent.SSH === "null" ||
agent.SSH === false
);
const rows = [
`<div class="server-info-row">
<span class="server-info-label">Agent Type</span>
@@ -754,9 +769,14 @@ function renderAgentInfo(info) {
: escHtml(domain)
}</span>
</div>`,
`<div class="server-info-row server-info-row--copy" onclick="copySSHAccess()" title="Click to copy">
hasSSH
? `<div class="server-info-row server-info-row--copy" onclick="copySSHAccess()" title="Click to copy">
<span class="server-info-label">SSH Access</span>
<span class="server-info-val server-info-copyval">${escHtml(sshCmd)}</span>
</div>`
: `<div class="server-info-row">
<span class="server-info-label">SSH Access</span>
<span class="server-info-val"><a class="server-info-link" href="#" onclick="event.preventDefault();openBillingPortal()">Upgrade</a></span>
</div>`,
`<div class="server-info-row">
<span class="server-info-label">Created</span>
@@ -1388,6 +1408,19 @@ async function loadBackups(uuid) {
const body = document.getElementById("backups-body");
body.innerHTML = '<div class="loading-row"><div class="spinner"></div></div>';
// Check BACKUP flag from agents list
const agent = agents.find((a) => (a.UUID || a.uuid) === uuid);
const hasBackup =
agent &&
!(
agent.BACKUP === null ||
agent.BACKUP === undefined ||
agent.BACKUP === "null" ||
agent.BACKUP === false
);
const btn = document.getElementById("make-backup-btn");
if (btn) btn.style.display = hasBackup ? "" : "none";
try {
const _backupsUrl = `${BACKUP_URL}?uuid=${encodeURIComponent(uuid)}`;
dbg("→ List Backups", _backupsUrl);