fix-broker-VP-dots
This commit is contained in:
parent
e2f5026591
commit
0d8cf8a7e5
@ -137,13 +137,10 @@ ob_start();
|
||||
<button class="btn btn-danger btn-sm" data-uid="<?= h($uid) ?>" data-act="delete">✕</button>
|
||||
</td>
|
||||
<td style="text-align:center">
|
||||
<div style="font-size:10px;color:var(--muted);margin-bottom:3px"><?= $isVps?'VPS':($isPmx?'PMX':'—') ?></div>
|
||||
<span title="VPS" data-uid="<?= h($uid) ?>" data-act="switch_pair" data-pair="0"
|
||||
style="cursor:pointer;display:inline-block;width:10px;height:10px;border-radius:50%;margin:0 3px;
|
||||
background:<?= $isVps?'#3fb950':'#333' ?>;<?= $isVps?'box-shadow:0 0 5px #3fb950;':'' ?>"></span>
|
||||
style="cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;font-size:9px;font-weight:700;margin:0 3px;background:<?= $isVps?'#3fb950':'#333' ?>;color:<?= $isVps?'#0d1117':'#666' ?>;<?= $isVps?'box-shadow:0 0 5px #3fb950;':'' ?>">V</span>
|
||||
<span title="Proxmox" data-uid="<?= h($uid) ?>" data-act="switch_pair" data-pair="1"
|
||||
style="cursor:pointer;display:inline-block;width:10px;height:10px;border-radius:50%;margin:0 3px;
|
||||
background:<?= $isPmx?'#3fb950':'#333' ?>;<?= $isPmx?'box-shadow:0 0 5px #3fb950;':'' ?>"></span>
|
||||
style="cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;font-size:9px;font-weight:700;margin:0 3px;background:<?= $isPmx?'#3fb950':'#333' ?>;color:<?= $isPmx?'#0d1117':'#666' ?>;<?= $isPmx?'box-shadow:0 0 5px #3fb950;':'' ?>">P</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
|
||||
10
esp_vps.php
10
esp_vps.php
@ -94,9 +94,11 @@ ob_start();
|
||||
<button class="btn btn-secondary btn-sm" data-uid="<?= h($uid) ?>" data-act="cmd" data-cmd="REBOOT">Reboot</button>
|
||||
<button class="btn btn-danger btn-sm" data-uid="<?= h($uid) ?>" data-act="delete">✕</button>
|
||||
</td>
|
||||
<td style="white-space:nowrap">
|
||||
<button class="btn btn-secondary btn-sm" data-uid="<?= h($uid) ?>" data-act="switch_pair" data-pair="0"><?= $isVps?$dot:'' ?>→ VPS</button>
|
||||
<button class="btn btn-secondary btn-sm" data-uid="<?= h($uid) ?>" data-act="switch_pair" data-pair="1"><?= $isPmx?$dot:'' ?>→ Proxmox</button>
|
||||
<td style="text-align:center">
|
||||
<span title="VPS" data-uid="<?= h($uid) ?>" data-act="switch_pair" data-pair="0"
|
||||
style="cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;font-size:9px;font-weight:700;margin:0 3px;background:<?= $isVps?'#3fb950':'#333' ?>;color:<?= $isVps?'#0d1117':'#666' ?>;<?= $isVps?'box-shadow:0 0 5px #3fb950;':'' ?>">V</span>
|
||||
<span title="Proxmox" data-uid="<?= h($uid) ?>" data-act="switch_pair" data-pair="1"
|
||||
style="cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;font-size:9px;font-weight:700;margin:0 3px;background:<?= $isPmx?'#3fb950':'#333' ?>;color:<?= $isPmx?'#0d1117':'#666' ?>;<?= $isPmx?'box-shadow:0 0 5px #3fb950;':'' ?>">P</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
@ -114,7 +116,7 @@ function act(uid, action, extra){
|
||||
fetch('/esp_vps.php',{method:'POST',body:fd}).then(()=>location.reload());
|
||||
}
|
||||
document.addEventListener('click',function(e){
|
||||
const b=e.target.closest('button[data-act]'); if(!b) return;
|
||||
const b=e.target.closest('[data-act]'); if(!b) return;
|
||||
if(b.dataset.act==='delete' && !confirm('Remover '+b.dataset.uid+'?')) return;
|
||||
const extra={};
|
||||
if(b.dataset.pair!==undefined) extra.pair=b.dataset.pair;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user