api monitors

This commit is contained in:
IGNY8 VPS (Salman)
2025-11-15 11:31:49 +00:00
parent 069e0a24d8
commit 133d63813a
14 changed files with 613 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ import PageMeta from '../../components/common/PageMeta';
import { useToast } from '../../components/ui/toast/ToastContainer';
import { fetchAPI } from '../../services/api';
import { Card } from '../../components/ui/card';
import ApiStatusMonitor from '../../components/debug/ApiStatusMonitor';
export default function AISettings() {
const toast = useToast();
@@ -42,6 +43,14 @@ export default function AISettings() {
<p className="text-gray-600 dark:text-gray-400">AI settings management interface coming soon.</p>
</Card>
)}
{/* API Status Monitor - Only shows when debug toggle is enabled */}
<ApiStatusMonitor
title="System"
endpoints={[
{ name: 'Get AI Settings', method: 'GET', endpoint: '/v1/system/settings/ai/' },
]}
/>
</div>
);
}

View File

@@ -3,6 +3,7 @@ import PageMeta from '../../components/common/PageMeta';
import { useToast } from '../../components/ui/toast/ToastContainer';
import { fetchAPI } from '../../services/api';
import { Card } from '../../components/ui/card';
import ApiStatusMonitor from '../../components/debug/ApiStatusMonitor';
export default function AccountSettings() {
const toast = useToast();
@@ -42,6 +43,14 @@ export default function AccountSettings() {
<p className="text-gray-600 dark:text-gray-400">Account settings management interface coming soon.</p>
</Card>
)}
{/* API Status Monitor - Only shows when debug toggle is enabled */}
<ApiStatusMonitor
title="System"
endpoints={[
{ name: 'Get Account Settings', method: 'GET', endpoint: '/v1/system/settings/account/' },
]}
/>
</div>
);
}

View File

@@ -14,6 +14,7 @@ import SelectDropdown from '../../components/form/SelectDropdown';
import { useToast } from '../../components/ui/toast/ToastContainer';
import Alert from '../../components/ui/alert/Alert';
import { fetchAPI } from '../../services/api';
import ApiStatusMonitor from '../../components/debug/ApiStatusMonitor';
// OpenAI Icon SVG
const OpenAIIcon = () => (
@@ -1165,6 +1166,16 @@ export default function Integration() {
/>
</>
)}
{/* API Status Monitor - Only shows when debug toggle is enabled */}
<ApiStatusMonitor
title="System"
endpoints={[
{ name: 'Get Integration Settings', method: 'GET', endpoint: '/v1/system/settings/integrations/openai/' },
{ name: 'Get Image Generation Settings', method: 'GET', endpoint: '/v1/system/integrations/image_generation/' },
{ name: 'Get System Status', method: 'GET', endpoint: '/v1/system/status/' },
]}
/>
</>
);
}

View File

@@ -19,6 +19,7 @@ import {
Sector,
} from '../../services/api';
import Badge from '../../components/ui/badge/Badge';
import ApiStatusMonitor from '../../components/debug/ApiStatusMonitor';
// Site Icon SVG
const SiteIcon = () => (
@@ -591,6 +592,16 @@ export default function Sites() {
/>
)}
</div>
{/* API Status Monitor - Only shows when debug toggle is enabled */}
<ApiStatusMonitor
title="Auth"
endpoints={[
{ name: 'List Sites', method: 'GET', endpoint: '/v1/auth/sites/' },
{ name: 'Get Industries', method: 'GET', endpoint: '/v1/auth/industries/' },
{ name: 'Get Seed Keywords', method: 'GET', endpoint: '/v1/auth/seed-keywords/' },
]}
/>
</>
);
}

View File

@@ -2,6 +2,7 @@ import { useState, useEffect } from "react";
import PageMeta from "../../components/common/PageMeta";
import ComponentCard from "../../components/common/ComponentCard";
import { fetchAPI } from "../../services/api";
import ApiStatusMonitor from "../../components/debug/ApiStatusMonitor";
interface SystemStatus {
timestamp: string;
@@ -318,6 +319,14 @@ export default function Status() {
Last updated: {new Date(status.timestamp).toLocaleString()}
</div>
</div>
{/* API Status Monitor - Only shows when debug toggle is enabled */}
<ApiStatusMonitor
title="System"
endpoints={[
{ name: 'Get System Status', method: 'GET', endpoint: '/v1/system/status/' },
]}
/>
</>
);
}

View File

@@ -3,6 +3,7 @@ import PageMeta from '../../components/common/PageMeta';
import { useToast } from '../../components/ui/toast/ToastContainer';
import { fetchAPI } from '../../services/api';
import { Card } from '../../components/ui/card';
import ApiStatusMonitor from '../../components/debug/ApiStatusMonitor';
export default function SystemSettings() {
const toast = useToast();
@@ -42,6 +43,14 @@ export default function SystemSettings() {
<p className="text-gray-600 dark:text-gray-400">System settings management interface coming soon.</p>
</Card>
)}
{/* API Status Monitor - Only shows when debug toggle is enabled */}
<ApiStatusMonitor
title="System"
endpoints={[
{ name: 'Get System Settings', method: 'GET', endpoint: '/v1/system/settings/system/' },
]}
/>
</div>
);
}