MeshDD-Bot/static/scheduler.html
ppfeiffer 0b68c0417d fix: v0.6.8 - Bugfixes: Node-Sync, Modal, Badge, CSS
- bot.py: pub.subscribe vor TCPInterface verschoben; Nodes beim Start
  wurden nicht geladen da connection.established/node.updated Events
  verpasst wurden. Fallback-Sync nach Konstruktor ergaenzt.
- HTML: tabler.min.js -> bootstrap.bundle.min.js; Tabler exportiert
  bootstrap nicht global, new bootstrap.Modal() schlug fehl.
- dashboard.js: badge-pill -> rounded-pill (Bootstrap 4 -> 5)
- style.css: --tblr-bg-body Typo -> --tblr-body-bg

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 16:01:49 +01:00

131 lines
6.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/@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
</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>
<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/app.js"></script>
<script src="/static/js/scheduler.js"></script>
</body>
</html>