Commit graph

12 commits

Author SHA1 Message Date
Christopher Horndasch
91b7eb2462 "Speicher & Traffic" statt "Server" (admin/server.php, weiter nur Entwickler und Administratoren): Die Seite zeigt nur noch die Lumina-Website und ist neu gestaltet - Kennzahlen oben (Website belegt, Zuwachs in 7/30 Tagen, Traffic heute, frei auf dem Server), Aufteilungsbalken "Woraus die Website besteht" (Karten-Daten, Uploads, Datenbank, Git-Verlauf, Bilder/Stile/Skripte, Programmcode; feste Farbe je Teil, SERVER_STATS_PARTS), Upload-Ordner und groesste Tabellen als Listen mit Balken, Traffic der Website (Heute, Gestern, 7 Tage, Monat; Saeulen der letzten 30 Tage mit Datenvolumen und Aufrufen, Werte als Tabelle aufklappbar) und ein Balken "Platz auf dem Server" (Website, Uebriges, frei). Entfallen: Aufteilung nach anderen Projekten, Verzeichnisliste des Servers, Docker, vnstat. Der Traffic kommt aus einem Protokoll von Caddy nur fuer lumina-ascendens.de, das je Aufruf nur Zeitpunkt, Statuscode und Datenmenge enthaelt (keine IP-Adresse, keine Adresse der Seite, kein Browser); includes/server_stats_collect.php liest davon nur, was seit dem letzten Lauf dazukam, und fuehrt Tagessummen (auch ueber einen Dateiwechsel von Caddy hinweg). Verlauf der Website-Groesse je Tag fuer den Zuwachs. config.example.php: server_stats.traffic_log statt groups/interface
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-29 18:25:24 +01:00
Christopher Horndasch
9ddc20634b Server-Uebersicht fuer Entwickler und Administratoren (admin/server.php, Menue "Server"): Speicherplatz des ganzen Servers (frei, belegt, Zuwachs in 7/30 Tagen, Schaetzung wie lange er reicht; Warnung ab 80 %, rot ab 90 %), wofuer er verbraucht wird (Bereiche wie Uploads, Datenbank, Backups, Docker, Logs; groesste Verzeichnisse zum Aufklappen; Hinweis bei grossem Docker-Build-Cache) und das Datenvolumen je Tag und Monat (empfangen/gesendet, aus vnstat; ohne vnstat nur seit dem letzten Neustart). Anlass: Am 29.11. war die Platte voll (85 GB Docker-Build-Cache), die Datenbank konnte nicht mehr schreiben. Die Zahlen sammelt includes/server_stats_collect.php als root per systemd-Timer (nur Kommandozeile; Einrichtung im Kopf der Datei) und legt sie als JSON ab - die Website (www-data) liest nur diese Datei (includes/server_stats.php). Kein vergebbares Recht: nur is_admin und Entwickler, alle anderen sehen die 404-Seite. config.example.php: optionaler Abschnitt server_stats (Datei, weitere Bereiche, Netzwerkkarte)
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-29 17:34:34 +01:00
Christopher Horndasch
51352d19a1 Leistung: Website haengt nicht mehr, wenn ein Bot langsam antwortet - Ursache der Langsamphasen war /api/premades des Bots (fragte je Abruf ~15 Namen einzeln bei Discord nach und lief ins Tempolimit, 5-15 s statt Millisekunden; im Bot behoben: Namensspeicher in api.py). Website: Seitenaufrufe (GET) geben die Sitzung fuer die Dauer einer Bot-Anfrage frei und oeffnen sie danach wieder (curl_exec_unlocked() in includes/functions.php; POST behaelt die Sperre gegen Doppelklicks, Cookie und Cache-Kopfzeilen bleiben unveraendert) - bisher warteten alle weiteren Aufrufe derselben Person mit, bis der PHP-Pool voll war. Premade-Liste fuer die Live-Abfragen 15 s gemerkt (fetch_premades_cached(): live_updates.php, raids_live.php; Seiten und Aktionen holen weiter frisch, Aenderungen ueber die Website loeschen den Stand, bei Bot-Ausfall gilt er bis 5 min weiter) - die Premade-Seite fragte den Bot beim Aufbau doppelt. Verbindungs-Timeout 3 s fuer Bot-Anfragen, Dashboard und Raid-Seite warten hoechstens 5 s auf die Premades, fetch_raid_by_id() sucht erst in den aktiven Raids statt immer das ganze Archiv zu laden. config.example.php: Bot auf demselben Server direkt ansprechen (live_url). Patchnote
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-23 20:06:25 +01:00
Maaxxs
74fdf2bbf8 Elyos Allianz: Raids, Kanäle und Rollen kommen von Siel
Neue Raids der Elyos Allianz postet Siel (config.php: siel_api), die Website holt die Raids
beider Bots und schickt Anfragen zu einem Raid an den Bot, der ihn gepostet hat. Kanäle und
Rollen des Servers der Elyos Allianz liefert Siel. Premades nur noch bei Legions-Raids.
Ohne siel_api-Block bleibt alles wie vorher bei Nezekan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 07:58:44 +02:00
Maaxxs
17ccd3e26f Discord bot as overview: everything is managed on the website, raid signup in one click
The bot (Aion2_RaidPlaner, deployed 2026-09-25) has no slash commands any more. Raids,
premades, events, activity checks and reports are created and managed only here; in Discord
members sign up for raids, answer invitations and activity checks and report players.

- Raid signup works the same in Discord and here: the bot assigns the group (perform_signup),
  the website only sends the wish (raid_signup(..., $wish)) and shows the reason when it did
  not fit (locked, role full, raid full). raid_wish_is_sensible() and the role constants are
  gone. Declining ("Abmelden") now keeps the player under "Abgemeldet" (raid_decline, new bot
  endpoint .../decline) like in Discord; the raid card shows "Du hast dich abgemeldet" with
  "Doch anmelden". Class input is checked against AION_CLASSES.
- The Discord message shows the raid lead and the Lumipunkte: raid_create_action/raid_edit_action
  send lead_id/lead_name/points_text, raid_sync_extras() on raids.php pushes them for raids
  where the bot is missing them (at most 3 per page view, follows changed raid IDs).
- bot_api.php?action=member: main class (profile choice) and whether the person has an
  (active) account - the bot preselects the class and hints that Lumipunkte need an account.
- New page Verwaltung -> Discord-Bot (admin/bot.php, includes/discord_bot.php, permission
  bot.manage, on update granted to groups with raids.manage; schema 53): raid, log and report
  channel, post the premade overview (updates itself) and the report panel (the bot replaces
  the previous one), resync all raid messages (reposted raids move their settings via
  raid_rename_id). Audit area "Discord-Bot", sidebar entry with a new bot icon.
- Reports: after picking a player in the filter, delete all of their reports at once
  (DELETE /api/reports/user/{id}), which also lifts the auto-mute.
- Calendar and raid logs no longer count declined players as signed up / on the bench.
- Texts that mentioned bot commands (events, activity check, config example, README) updated;
  privacy policy mentions the main-class lookup and that declines stay visible. Patch notes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 03:15:55 +02:00
Maaxxs
fe1561f4f7 Raids: attendance list, automatic points on archive, reminder callback
Each raid gets an attendance list for raids.manage (present, absent, excused)
with quick actions, members added by hand and a "checked" mark with who and
when. The contribution form can now select a raid's present members for
points or its absent members for a deduction.

Raids can carry points for present members and a deduction for absent ones
(raid_settings). When a raid is archived - on the website or via the button
in Discord, detected on the next raid or contribution page view - the site
awards them once: by attendance if a list exists, otherwise to everyone in a
group without deduction, and not at all if points were already given for
that raid. Settings, attendance and awards follow a raid_id change when the
API re-posts a deleted message.

bot_api.php lets the bot ask which signed-up members have raids.manage when a
raid starts (shared key in config.php bot_callback.key); the bot then sends
them a DM with a link to the list. The bot side lives in the separate bot
repository (cogs/attendance.py).

Also fixes contribution_awards.raid_id being too small for Discord IDs (it
is widened automatically) and raid IDs losing precision in the contribution
form's JavaScript, which kept the raid preselection from ever matching.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 09:52:34 +02:00
Maaxxs
3b7ee9bb8a Rename site brand from Aion2 Gilde to Lumina Ascendens
Updates every remaining "Aion2 Gilde" reference (page title, logo alt
text, homepage heading, README, schema header, example config) to the
actual site name shown in the logo wordmark.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-20 01:38:55 +02:00
Maaxxs
40d8bec259 Add raid creation from the website and handle auto-repost on save
The bot API now lets the website create raids without knowing a
Discord channel: POST /api/raids accepts guild_id and resolves the
target channel via the server's /set_raidchannel default. Adds a
"+ Neuer Raid" panel on raids.php (raids.manage only) with the same
title/date/max slots/gearscore grid and requirements textarea as the
edit form, plus the group-name row editor reused without its lock
toggle (data-locks="0" on .group-editor, since creation doesn't
support locked_groups) - one shared component instead of a second
implementation. Needs raids_api.guild_id in config.php, documented in
README.md.

Also updates the editor's "Speichern" flow for the API's other
change: PATCH /api/raids/{id} now auto-reposts the Discord message
(via sync_raid_message) if it was deleted manually, returning the new
raid_id. update_raid() now returns the API response instead of
discarding it, and raid_edit_action.php surfaces a distinct message
when the id changed - the page reload right after already picks up
the new id either way, since it re-fetches the raid list fresh.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-19 08:09:20 +02:00
Maaxxs
8c703f0e1f Add Discord account linking and raid signup/management from the website
- Class name on raid signups now shows only as an icon tooltip instead
  of trailing text (falls back to text when no icon matches).
- Discord OAuth2 linking (discord_login.php/discord_callback.php,
  includes/discord.php): members connect their Discord account from
  the dashboard, storing discord_id/discord_username so raid signups
  can be attributed to their real Discord identity. Needs a Discord
  application's client_id/client_secret in config.php.
- raids.php gets self-service signup/withdraw controls (class + group
  picker, upsert semantics) for members with a linked Discord account,
  plus archive/restore controls gated behind a new raids.manage
  permission. New action scripts raid_signup.php, raid_unsignup.php,
  raid_archive.php, raid_restore.php call the corresponding
  includes/raids_api.php functions.
- Archive/restore already work today (verified live against the bot's
  API - archived and restored the one active raid, signups intact).
  Signup/withdraw are fully wired on the website side but need two new
  bot-side endpoints (POST .../signup, DELETE .../signup/{user_id})
  that don't exist yet - contract documented in the README.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-18 13:25:41 +02:00
Maaxxs
620ef68015 Add a Raids page fed by the guild's external raids API
New raids.php shows upcoming raids (date, requirements, gearscore,
groups and their signups) pulled from https://api.maaxxs-coding.de/api/raids
via includes/raids_api.php (cURL + X-API-Key header), gated behind a
new raids.view permission so it fits the existing permission-group
model. Fresh installs seed raids.view onto Mitglied automatically;
existing installs need to add it once via the Berechtigungsgruppen UI
(documented in the README). API/network failures show a friendly
error instead of crashing the page.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-18 12:44:17 +02:00
Maaxxs
77bb1b3ff5 Use real German umlauts instead of ASCII transliterations
Every "oe/ae/ue" spelling throughout the UI text and comments (fuer,
loeschen, koennen, ...) was my own typo, not an encoding bug - the
charset fix in the last commit was unrelated. Replaced all of them
with proper ö/ä/ü across every PHP file and the README.

Also fix table rows rendering inconsistently: `.actions` and the
status badges were applying `display:flex` directly to a <td>, which
fights the table layout model and renders unreliably across browsers.
Moved the flex layout into a wrapper <div> inside each cell instead,
and restyled row-level delete buttons as plain text links so they
match the height of the "Bearbeiten" link exactly. Tables also get a
horizontal-scroll wrapper so narrow viewports scroll instead of
squeezing cell content.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-18 07:16:15 +02:00
Maaxxs
4871d29afa Add member/admin dashboard with login, user management, and permission groups
Provides PHP/MySQL-based auth (sessions, CSRF), a permission-and-role
system (permission groups with per-permission keys), and an admin-only
user management area. Homepage left as a placeholder for later.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-18 05:49:47 +02:00