MeshDD-Bot/static/scheduler.html
ppfeiffer 6bfb1595e4 feat: v0.3.3 - Send messages from dashboard, scheduler message type, modern UI
Add message sending from web dashboard with channel selector, new POST /api/send
endpoint, scheduler support for free-text messages (type field), and modernized
dashboard layout with glassmorphism navbar, gradient stat cards, chat bubbles.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 17:40:00 +01:00

122 lines
6 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/bootstrap@5.3.3/dist/css/bootstrap.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>
<!-- Navbar -->
<nav class="navbar navbar-expand-sm bg-body-tertiary border-bottom">
<div class="container-fluid">
<a class="navbar-brand" href="/">
<i class="bi bi-broadcast-pin text-info me-2"></i>MeshDD-Bot
</a>
<div class="d-flex align-items-center gap-3">
<a href="/" class="btn btn-outline-info btn-sm">
<i class="bi bi-speedometer2 me-1"></i>Dashboard
</a>
<a href="/map" target="_blank" class="btn btn-outline-info btn-sm">
<i class="bi bi-map me-1"></i>Karte
</a>
<button class="btn btn-outline-secondary btn-sm" id="themeToggle" title="Theme wechseln">
<i class="bi bi-sun-fill" id="themeIcon"></i>
</button>
</div>
</div>
</nav>
<div class="container-fluid py-3">
<div class="d-flex justify-content-between align-items-center mb-3">
<h5 class="mb-0"><i class="bi bi-clock-history me-2 text-info"></i>Scheduler</h5>
<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">
<div class="card-body p-0 table-responsive">
<table class="table table-hover table-sm 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>
</div>
<!-- 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>
<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>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<script src="/static/js/scheduler.js"></script>
</body>
</html>