Add Discord Bot project type with process control, config editor, and log viewer
- DiscordBotProject: new project type (discord-bot), auto-detects from main.py + cogs/ - botcontrol API: start/stop/restart/status via sudo systemctl - botconfig API: atomic read/write of config.json; CRUD for streamers, RSS feeds, Mastodon accounts, and LinkedIn pages; tokens masked in GET responses - botlogs API: tail log file (path via project_settings.bot_log_file) - Tab partials: _tab_bot (process control), _tab_botconfig (structured editor), _tab_logs (log viewer with auto-refresh) - view.php: register bot/botconfig/logs tabs with labels, icons, and groups - app.js: bot control panel, config editor with account/page dropdowns in RSS modal, Mastodon accounts CRUD, LinkedIn pages CRUD; audit labels/icons for all new actions - CLAUDE.md: document Discord Bot integration, sudoers requirement, API actions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a2a1f356ba
commit
bf3ae2351d
10 changed files with 1025 additions and 0 deletions
|
|
@ -39,6 +39,8 @@ $tabLabels = [
|
|||
'run' => 'Run', 'themes' => 'Themes',
|
||||
'plugins' => 'Plugins', 'git' => 'Git',
|
||||
'notes' => 'Notes', 'settings' => 'Settings',
|
||||
'bot' => 'Bot', 'botconfig' => 'Config',
|
||||
'logs' => 'Logs',
|
||||
];
|
||||
$tabIcons = [
|
||||
'dashboard' => 'bi-grid-1x2', 'analytics' => 'bi-graph-up',
|
||||
|
|
@ -47,9 +49,12 @@ $tabIcons = [
|
|||
'run' => 'bi-terminal', 'themes' => 'bi-palette',
|
||||
'plugins' => 'bi-puzzle', 'git' => 'bi-git',
|
||||
'notes' => 'bi-sticky', 'settings' => 'bi-gear',
|
||||
'bot' => 'bi-robot', 'botconfig' => 'bi-sliders2',
|
||||
'logs' => 'bi-journal-text',
|
||||
];
|
||||
$tabGroups = [
|
||||
['dashboard', 'analytics'],
|
||||
['bot', 'botconfig', 'logs'],
|
||||
['posts', 'config', 'files', 'media'],
|
||||
['run', 'themes', 'plugins', 'git'],
|
||||
['notes', 'settings'],
|
||||
|
|
@ -256,6 +261,15 @@ $tabGroups = [
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<?php elseif ($tab === 'bot'): ?>
|
||||
<?php include ROOT . '/views/project/_tab_bot.php'; ?>
|
||||
|
||||
<?php elseif ($tab === 'botconfig'): ?>
|
||||
<?php include ROOT . '/views/project/_tab_botconfig.php'; ?>
|
||||
|
||||
<?php elseif ($tab === 'logs'): ?>
|
||||
<?php include ROOT . '/views/project/_tab_logs.php'; ?>
|
||||
|
||||
<?php elseif ($tab === 'git'): ?>
|
||||
<?php include ROOT . '/views/project/_tab_git.php'; ?>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue