neutral/public/javascripts/server.js
Raphix b19243a8af
All checks were successful
Neutral/pipeline/head This commit looks good
Version 0.4.0 - Ajout des metrics
2023-11-28 21:05:44 +01:00

73 lines
1.9 KiB
JavaScript

servers.createWindow(async () => {
const View = new ViewWindow({
title: `<i class="fa fa-server"></i> Gestion des serveurs`,
width: "1000px",
height: "450px"
})
const serversList = new Array()
const alpha = new Server({
name: "Alpha",
description: "Serveur principal",
icon: "fa-solid fa-hourglass-start",
})
const omega = new Server({
name: "Omega",
description: "Serveur secondaire",
icon: "fa-solid fa-stop",
})
serversList.push(alpha.generateHTML())
serversList.push(omega.generateHTML())
View.setContent(`
<div class="servers">
${serversList.join("")}
</div>`)
await alpha.loadScript()
await omega.loadScript()
})
/**
<div class="servers-box">
<div class="servers-box-title">
<div class='servers-box-title-info'>
<i class="fa fa-server"></i>
<p>Alpha</p>
</div>
<button class="btn yellow"><span>Redémarrer</span></button>
</div>
<div class="servers-box-content">
<div class='servers-metrics'>
<div class='servers-metrics-box'>
<div>
<i class='fa-solid fa-memory'></i>
<p>RAM</p>
</div>
<p>1.5 Go / 2 Go</p>
</div>
<div class='servers-metrics-box'>
<div>
<i class='fa-solid fa-microchip'></i>
<p>CPU</p>
</div>
<p>1.5 Go / 2 Go</p>
</div>
<div class='servers-metrics-box'>
<div>
<i class='fa-solid fa-hdd'></i>
<p>DISK</p>
</div>
<p>1.5 Go / 2 Go</p>
</div>
</div>
</div>
</div>
*/