mirror of
https://github.com/myronblair/web-dashboard
synced 2026-07-28 04:03:36 -05:00
Add Install Commands card: copy-to-clipboard JARVIS agent + FusionPBX installer one-liners
Both are plain text buttons (not links) so they never navigate/click through, just copy to clipboard. JARVIS command intentionally omits the registration key (site is password-protected, but kept the same interactive-prompt pattern used for the public install scripts anyway) -- it prompts for the key when run.
This commit is contained in:
+53
@@ -128,6 +128,31 @@
|
||||
}
|
||||
.link-item:hover .arrow { opacity: 1; }
|
||||
|
||||
.copy-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
padding: 0.6rem 1rem;
|
||||
color: var(--text);
|
||||
font-size: 0.9rem;
|
||||
transition: background 0.15s;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
background: none;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
font-family: inherit;
|
||||
}
|
||||
.copy-item:hover { background: var(--surface2); }
|
||||
.copy-item .copy-icon {
|
||||
color: var(--muted);
|
||||
font-size: 0.7rem;
|
||||
opacity: 0;
|
||||
transition: opacity 0.15s;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.copy-item:hover .copy-icon { opacity: 1; }
|
||||
|
||||
.dot-blue { background: var(--accent); }
|
||||
.dot-purple { background: var(--accent2); }
|
||||
.dot-green { background: var(--green); }
|
||||
@@ -220,6 +245,22 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- INSTALL COMMANDS (copy to clipboard, not clickable links) -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="icon icon-cyan">📋</div>
|
||||
<h2>Install Commands</h2>
|
||||
</div>
|
||||
<div class="links">
|
||||
<button type="button" class="copy-item" onclick="copyCmd(this, 'curl -sSL http://jarvis.orbishosting.com/agent/install.sh | bash -s -- $(hostname) linux')">
|
||||
<span class="dot dot-orange"></span><span class="name">JARVIS Agent</span><span class="sub">Linux install one-liner — prompts for registration key, run as root</span><span class="copy-icon">copy</span>
|
||||
</button>
|
||||
<button type="button" class="copy-item" onclick="copyCmd(this, 'apt update && apt install -y git && git clone https://github.com/fusionpbx/fusionpbx-install.sh.git && cd fusionpbx-install.sh/debian && ./install.sh')">
|
||||
<span class="dot dot-purple"></span><span class="name">FusionPBX Full Installer</span><span class="sub">Official latest-version install script — Debian 12, run as root</span><span class="copy-icon">copy</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- BACKUP STATUS -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
@@ -701,6 +742,18 @@
|
||||
}
|
||||
tick(); setInterval(tick, 1000);
|
||||
|
||||
// ── Install Commands card: copy-to-clipboard, never auto-navigates ──
|
||||
function copyCmd(btn, text) {
|
||||
navigator.clipboard.writeText(text).then(() => {
|
||||
const iconEl = btn.querySelector('.copy-icon');
|
||||
const prev = iconEl.textContent;
|
||||
iconEl.textContent = 'copied!';
|
||||
iconEl.style.opacity = '1';
|
||||
setTimeout(() => { iconEl.textContent = prev; iconEl.style.opacity = ''; }, 1500);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// ── Backup Status card — reads daily-refreshed JSON from MSP360 collector ──
|
||||
async function loadBackupStatus() {
|
||||
const el = document.getElementById('backup-status-list');
|
||||
|
||||
Reference in New Issue
Block a user