DweebUI/views/pages/dashboard.ejs
2023-10-15 15:11:58 -07:00

278 lines
16 KiB
Text

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"/>
<meta http-equiv="X-UA-Compatible" content="ie=edge"/>
<title>Dashboard.</title>
<!-- CSS files -->
<link href="./css/tabler.min.css?1684106062" rel="stylesheet"/>
<link href="./css/demo.min.css?1684106062" rel="stylesheet"/>
<link href="./css/meters.css" rel="stylesheet"/>
<style>
@import url('https://rsms.me/inter/inter.css');
:root {
--tblr-font-sans-serif: 'Inter Var', -apple-system, BlinkMacSystemFont, San Francisco, Segoe UI, Roboto, Helvetica Neue, sans-serif;
}
body {
font-feature-settings: "cv03", "cv04", "cv11";
}
</style>
</head>
<body >
<div class="page">
<!-- Navbar -->
<%- include('../partials/navbar.ejs') %>
<div class="page-wrapper">
<!-- Page header -->
<!-- Page body -->
<div class="page-body">
<div class="container-xl">
<div class="row row-deck row-cards">
<div class="col-12" id="cards">
<div class="row row-cards">
<div class="col-sm-6 col-lg-3">
<div class="card card-sm">
<div class="card-body">
<div class="row align-items-center">
<div class="col-auto">
<span class="bg-primary text-white avatar"><!-- Download SVG icon from http://tabler-icons.io/i/currency-dollar -->
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-cpu" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M5 5m0 1a1 1 0 0 1 1 -1h12a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-12a1 1 0 0 1 -1 -1z"></path><path d="M9 9h6v6h-6z"></path><path d="M3 10h2"></path><path d="M3 14h2"></path><path d="M10 3v2"></path><path d="M14 3v2"></path><path d="M21 10h-2"></path><path d="M21 14h-2"></path><path d="M14 21v-2"></path><path d="M10 21v-2"></path></svg>
</span>
</div>
<div class="col">
<div class="font-weight-medium">
<label id="cpu-text" class="cpu-text mb-1" for="cpu">CPU 0%</label>
</div>
<div id="cpu-bar" class="cpu-bar meter animate">
<span style="width: 25%"><span></span></span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-3">
<div class="card card-sm">
<div class="card-body">
<div class="row align-items-center">
<div class="col-auto">
<span class="bg-green text-white avatar"><!-- Download SVG icon from http://tabler-icons.io/i/shopping-cart -->
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-container" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M20 4v.01"></path> <path d="M20 20v.01"></path> <path d="M20 16v.01"></path> <path d="M20 12v.01"></path> <path d="M20 8v.01"></path> <path d="M8 4m0 1a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-6a1 1 0 0 1 -1 -1z"></path> <path d="M4 4v.01"></path> <path d="M4 20v.01"></path> <path d="M4 16v.01"></path> <path d="M4 12v.01"></path> <path d="M4 8v.01"></path> </svg>
</span>
</div>
<div class="col">
<div class="font-weight-medium">
<label id="ram-text" class="ram-text mb-1" for="ram">RAM 0%</label>
</div>
<div id="ram-bar" class="ram-bar meter animate orange">
<span style="width: 25%"><span></span></span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-3">
<div class="card card-sm">
<div class="card-body">
<div class="row align-items-center">
<div class="col-auto">
<span class="bg-twitter text-white avatar"><!-- Download SVG icon from http://tabler-icons.io/i/brand-twitter -->
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-arrows-left-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M21 17l-18 0"></path> <path d="M6 10l-3 -3l3 -3"></path> <path d="M3 7l18 0"></path> <path d="M18 20l3 -3l-3 -3"></path> </svg>
</span>
</div>
<div class="col">
<div class="font-weight-medium">
<label id="net-text" class="net-text mb-1" for="network">NET</label>
</div>
<div id="net-bar" class="meter animate blue">
<span style="width: 25%"><span></span></span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-3">
<div class="card card-sm">
<div class="card-body">
<div class="row align-items-center">
<div class="col-auto">
<span class="bg-facebook text-white avatar"><!-- Download SVG icon from http://tabler-icons.io/i/brand-facebook -->
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-database" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 6m-8 0a8 3 0 1 0 16 0a8 3 0 1 0 -16 0"></path> <path d="M4 6v6a8 3 0 0 0 16 0v-6"></path> <path d="M4 12v6a8 3 0 0 0 16 0v-6"></path></svg>
</span>
</div>
<div class="col">
<div class="font-weight-medium">
<label id="disk-text" class="disk-text mb-1" for="disk">Disk Space</label>
</div>
<div id="disk-bar" class="meter animate red">
<span style="width: 25%"><span></span></span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-12 mt-12">
<div class="card">
<div class="card-header">
<h3 class="card-title">Caddy Proxy Manager</h3>
<!-- create a button that is aligned to the right -->
<div class="card-options btn-list">
<a href="/refreshsites" class="btn">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-refresh" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"></path> <path d="M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"></path> </svg>
Re-Scan
</a>
<a href="#" class="btn" data-bs-toggle="modal" data-bs-target="#add-site">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-plus" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 5l0 14"></path> <path d="M5 12l14 0"></path> </svg>
Add Site
</a>
</div>
</div>
<div class="modal modal-blur fade" id="add-site" tabindex="-1" style="display: none;" aria-hidden="true">
<div class="modal-dialog modal-sm modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-body">
<form action="/addsite" id="addsite" method="POST">
<div class="mb-3">
<div class="form-label">Type</div>
<select class="form-select" name="type">
<option value="reverse_proxy">Reverse Proxy</option>
<option value="proxy">Proxy</option>
<option value="file_server">File Server</option>
</select>
</div>
<div class="mb-3">
<label class="form-label">Domain / Subdomain</label>
<input type="text" class="form-control" name="domain" placeholder="media.mydomainname.com">
</div>
<div class="mb-4">
<div class="row g-2">
<div class="col-8">
<label class="form-label">Hostname / Host IP</label>
<input type="text" class="form-control" name="host" placeholder="localhost">
</div>
<div class="col-4">
<label class="form-label">Port</label>
<input type="text" class="form-control" name="port" placeholder="8000">
</div>
</div>
</div>
<div class="mb-3">
<div class="divide-y">
<div>
<label class="row">
<span class="col" title="HTTP Strict Transport Security (HSTS) is a simple and widely supported standard to protect visitors by ensuring that their browsers always connect to a website over HTTPS.">HSTS</span>
<span class="col-auto">
<label class="form-check form-check-single form-switch">
<input class="form-check-input" type="checkbox" name="hsts" checked="" disabled="">
</label>
</span>
</label>
</div>
</div>
</div>
<div class="mb-3">
<div class="form-label">Container</div>
<select class="form-select" name="container" disabled="">
<option value="0" selected></option>
<option value="1">Jellyfin</option>
</select>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-link link-secondary me-auto" data-bs-dismiss="modal">Cancel</button>
<input type="submit" form="addsite" class="btn btn-success" value="Add"/>
</div>
</div>
</div>
</div>
<div class="table-responsive">
<form method="POST">
<table class="table card-table table-vcenter text-nowrap datatable">
<thead>
<tr>
<th class="w-1"><input class="form-check-input m-0 align-middle" name="select-all" type="checkbox" aria-label="Select all invoices"></th>
<th class="w-1">No. <!-- Download SVG icon from http://tabler-icons.io/i/chevron-up -->
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-sm icon-thick" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 15l6 -6l6 6" /></svg>
</th>
<th>Domain / Subdomain</th>
<th>Type</th>
<th>Host/IP</th>
<th>Port</th>
<th>HTTP/3</th>
<th>HSTS</th>
<th></th>
</tr>
</thead>
<tbody>
<%- include('../partials/site_list.ejs') %>
</tbody>
</table>
</div>
<div class="card-footer d-flex align-items-center">
<span class="dropdown">
<button class="btn dropdown-toggle align-text-top" data-bs-toggle="dropdown">Actions</button>
<div class="dropdown-menu dropdown-menu-end">
<button class="dropdown-item" type="submit" formaction="/enablesite">
Enable
</button>
<button class="dropdown-item" type="submit" formaction="/disablesite">
Disable
</button>
<button class="dropdown-item" type="submit" formaction="/removesite">
Delete
</button>
</div>
</span>
</form>
<p class="m-0 text-muted ms-auto">Imported: /home/docker/caddy/Caddyfile</p>
</div>
</div>
</div>
</div>
</div>
</div>
<%- include('../partials/footer.ejs') %>
</div>
</div>
<!-- Libs JS -->
<script src="./libs/apexcharts/dist/apexcharts.min.js?1684106062" defer></script>
<!-- Tabler Core -->
<script src="./js/tabler.min.js?1684106062" defer></script>
<script src="./js/demo.min.js?1684106062" defer></script>
<!-- Socket.io -->
<script src="/socket.io/socket.io.js"></script>
<script src="./js/main.js"></script>
</body>
</html>