Implement Owner Panel features and maintenance mode handling
- Introduced the Owner Panel with new routes and UI components for managing guilds, user blacklists, feature flags, and bot presence. - Added maintenance mode functionality to prevent non-owner users from executing commands during maintenance periods. - Enhanced localization with new keys for Owner Panel features in both English and German. - Updated job processing to include a presence refresh job, ensuring the bot's status is regularly updated. - Improved environment configuration to support owner user IDs for access control.
This commit is contained in:
30
apps/webui/src/app/owner/jobs/page.tsx
Normal file
30
apps/webui/src/app/owner/jobs/page.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import { JobsManager } from '@/components/owner/owner-forms';
|
||||
import { getLocale, t } from '@/lib/i18n';
|
||||
import { getAllQueueStats } from '@/lib/owner-jobs';
|
||||
import { prisma } from '@/lib/prisma';
|
||||
|
||||
export default async function OwnerJobsPage() {
|
||||
const locale = await getLocale();
|
||||
const [queues, migrations] = await Promise.all([
|
||||
getAllQueueStats(),
|
||||
prisma.$queryRaw<Array<{ migration_name: string; finished_at: Date | null }>>`
|
||||
SELECT migration_name, finished_at FROM "_prisma_migrations" ORDER BY finished_at DESC NULLS LAST
|
||||
`
|
||||
]);
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<div>
|
||||
<h1 className="text-2xl font-semibold">{t(locale, 'owner.jobs.title')}</h1>
|
||||
<p className="text-sm text-muted-foreground">{t(locale, 'owner.jobs.subtitle')}</p>
|
||||
</div>
|
||||
<JobsManager
|
||||
initialQueues={queues}
|
||||
initialMigrations={migrations.map((row) => ({
|
||||
name: row.migration_name,
|
||||
finishedAt: row.finished_at?.toISOString() ?? null
|
||||
}))}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user