- Scheduler Nachrichten: Template-Variablen {time}, {date}, {datetime},
{weekday}, {nodes}, {nodes_24h} serverseitig aufgelöst
- Scheduler UI: klickbare Variablen-Badges beim Nachrichtenfeld-Modus
- Footer auf allen Seiten: © MeshDD / PPfeiffer · vX.Y.Z · MM/YYYY
- Fix: WS-Verbindungen vor runner.cleanup() explizit geschlossen
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
138 lines
7 KiB
HTML
138 lines
7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="de" data-bs-theme="dark">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>MeshDD-Bot Scheduler</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/@tabler/core@1.4.0/dist/css/tabler.min.css" rel="stylesheet">
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="/static/css/style.css">
|
|
</head>
|
|
<body class="antialiased">
|
|
<!-- Top Navbar -->
|
|
<nav class="top-navbar d-flex align-items-center px-3">
|
|
<button class="btn btn-link text-body p-0 me-2 d-lg-none" id="sidebarToggle">
|
|
<i class="bi bi-list fs-5"></i>
|
|
</button>
|
|
<span class="fw-bold me-auto">
|
|
<i class="bi bi-broadcast-pin text-info me-1"></i>MeshDD-Bot
|
|
<small class="text-body-secondary fw-normal" id="versionLabel"></small>
|
|
</span>
|
|
<div class="d-flex align-items-center gap-2">
|
|
<span id="userMenu" class="d-none">
|
|
<small class="text-body-secondary me-1"><i class="bi bi-person-fill me-1"></i><span id="userName"></span></small>
|
|
<a href="/auth/logout" class="btn btn-sm btn-outline-secondary py-0 px-1" title="Abmelden">
|
|
<i class="bi bi-box-arrow-right" style="font-size:.75rem"></i>
|
|
</a>
|
|
</span>
|
|
<a href="/login" id="loginBtn" class="btn btn-sm btn-outline-info py-0 px-1 d-none">
|
|
<i class="bi bi-person" style="font-size:.75rem"></i> Login
|
|
</a>
|
|
<button class="btn btn-sm btn-outline-secondary py-0 px-1" id="themeToggle" title="Theme wechseln">
|
|
<i class="bi bi-sun-fill" id="themeIcon" style="font-size:.75rem"></i>
|
|
</button>
|
|
</div>
|
|
</nav>
|
|
|
|
<aside class="sidebar" id="sidebar"></aside>
|
|
<div class="sidebar-backdrop" id="sidebarBackdrop"></div>
|
|
|
|
<!-- Content -->
|
|
<main class="content-wrapper">
|
|
<div class="d-flex justify-content-between align-items-center mb-2">
|
|
<h6 class="mb-0"><i class="bi bi-clock-history me-1 text-info"></i>Scheduler</h6>
|
|
<button class="btn btn-info btn-sm" id="btnAddJob">
|
|
<i class="bi bi-plus-lg me-1"></i>Neuer Job
|
|
</button>
|
|
</div>
|
|
|
|
<div class="card card-outline card-info">
|
|
<div class="card-body p-0 table-responsive">
|
|
<table class="table table-hover table-sm table-striped mb-0 align-middle">
|
|
<thead class="table-dark">
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Beschreibung</th>
|
|
<th>Typ</th>
|
|
<th>Kommando / Nachricht</th>
|
|
<th>Cron</th>
|
|
<th class="text-center">Kanal</th>
|
|
<th class="text-center">Status</th>
|
|
<th class="text-end">Aktionen</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="jobsTable">
|
|
<tr><td colspan="8" class="text-center text-body-secondary py-3">Lade Jobs...</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
|
|
<!-- Job Modal -->
|
|
<div class="modal fade" id="jobModal" tabindex="-1">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title" id="jobModalTitle">Neuer Job</h5>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<form id="jobForm">
|
|
<input type="hidden" id="jobOriginalName">
|
|
<div class="mb-3">
|
|
<label for="jobName" class="form-label">Name</label>
|
|
<input type="text" class="form-control" id="jobName" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="jobDescription" class="form-label">Beschreibung</label>
|
|
<input type="text" class="form-control" id="jobDescription">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="jobType" class="form-label">Typ</label>
|
|
<select class="form-select" id="jobType">
|
|
<option value="command">Kommando</option>
|
|
<option value="message">Nachricht</option>
|
|
</select>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="jobCommand" class="form-label" id="jobCommandLabel">Kommando</label>
|
|
<input type="text" class="form-control" id="jobCommand" placeholder="/weather" required>
|
|
<div id="varHints" class="d-none mt-1">
|
|
<small class="text-body-secondary me-1">Variablen:</small>
|
|
<span id="varBadges"></span>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-8 mb-3">
|
|
<label for="jobCron" class="form-label">Cron-Ausdruck</label>
|
|
<input type="text" class="form-control" id="jobCron" placeholder="0 7 * * *" required>
|
|
<div class="form-text">Min Std Tag Mon Wtag (z.B. */5 * * * * = alle 5 Min)</div>
|
|
</div>
|
|
<div class="col-4 mb-3">
|
|
<label for="jobChannel" class="form-label">Kanal</label>
|
|
<input type="number" class="form-control" id="jobChannel" value="0" min="0" required>
|
|
</div>
|
|
</div>
|
|
<div class="form-check form-switch mb-3">
|
|
<input class="form-check-input" type="checkbox" id="jobEnabled">
|
|
<label class="form-check-label" for="jobEnabled">Aktiviert</label>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary btn-sm" data-bs-dismiss="modal">Abbrechen</button>
|
|
<button type="button" class="btn btn-info btn-sm" id="btnSaveJob">Speichern</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<footer id="pageFooter" class="page-footer"></footer>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
|
<script src="/static/js/app.js"></script>
|
|
<script src="/static/js/scheduler.js"></script>
|
|
</body>
|
|
</html>
|