+
{value}
),
@@ -188,28 +187,17 @@ const SqlMonitoring: React.FC = () => {
disableFilters: true,
},
{
- Header: 'Execution Count',
+ Header: 'Count',
accessor: 'executionCount',
Cell: ({ value }: { value: number }) => {
const numValue = Number(value) || 0
return (
-
{numValue}
+
{numValue}
)
},
disableSortBy: true,
disableFilters: true,
},
- {
- Header: 'Timestamp',
- accessor: 'timestamp',
- Cell: ({ value }: { value: string }) => (
-
- {new Date(value).toLocaleString()}
-
- ),
- disableSortBy: true,
- disableFilters: true,
- },
],
[]
)
@@ -222,7 +210,7 @@ const SqlMonitoring: React.FC = () => {
accessor: 'severity',
Cell: ({ value }: { value: string }) => (
{
: 'badge-info'
}`}
>
- {value}
+ {value === 'Critical' ? '!' : value === 'Error' ? 'E' : value === 'Warning' ? 'W' : 'I'}
),
disableSortBy: true,
disableFilters: true,
},
- {
- Header: 'Type',
- accessor: 'type',
- disableSortBy: true,
- disableFilters: true,
- },
{
Header: 'Repository',
accessor: 'repository',
+ Cell: ({ value }: { value: string }) => (
+
+ {value}
+
+ ),
disableSortBy: true,
disableFilters: true,
},
{
Header: 'Method',
accessor: 'method',
+ Cell: ({ value }: { value: string }) => (
+
+ {value}
+
+ ),
disableSortBy: true,
disableFilters: true,
},
{
Header: 'Message',
accessor: 'message',
- disableSortBy: true,
- disableFilters: true,
- },
- {
- Header: 'Timestamp',
- accessor: 'timestamp',
+ Cell: ({ value }: { value: string }) => (
+
+ {value}
+
+ ),
disableSortBy: true,
disableFilters: true,
},
@@ -271,16 +262,16 @@ const SqlMonitoring: React.FC = () => {
)
return (
-
+
{/* Header */}
-
-
SQL Monitoring Dashboard
+
+
SQL Monitoring
@@ -289,73 +280,73 @@ const SqlMonitoring: React.FC = () => {
) : (
-
+
{/* Overview Cards */}
-
-
-
Total Tracked Queries
-
+
+
+
Total Queries
+
{statistics?.totalTrackedQueries || 0}
-
All time
+
All time
-
-
Active Queries
-
+
+
Active
+
{statistics?.activeQueries || 0}
-
Currently monitored
+
Currently monitored
-
-
Total Alerts
-
+
+
Alerts
+
{alerts?.length || 0}
-
All alerts
+
All alerts
-
-
Monitoring Status
-
+
+
Status
+
{health?.isEnabled ? 'Active' : 'Inactive'}
-
System status
+
System status
{/* Health Status */}
-
-
System Health
+
+
System Health
{health ? (
-
+
- Monitoring
-
- {health.isEnabled ? 'Enabled' : 'Disabled'}
+ Monitoring
+
+ {health.isEnabled ? 'On' : 'Off'}
- Logging
-
- {health.loggingEnabled ? 'Enabled' : 'Disabled'}
+ Logging
+
+ {health.loggingEnabled ? 'On' : 'Off'}
- Sentry
-
- {health.sentryEnabled ? 'Enabled' : 'Disabled'}
+ Sentry
+
+ {health.sentryEnabled ? 'On' : 'Off'}
- Loop Detection
-
- {health.loopDetectionEnabled ? 'Enabled' : 'Disabled'}
+ Loop Detection
+
+ {health.loopDetectionEnabled ? 'On' : 'Off'}
- Performance
-
- {health.performanceMonitoringEnabled ? 'Enabled' : 'Disabled'}
+ Performance
+
+ {health.performanceMonitoringEnabled ? 'On' : 'Off'}
@@ -372,14 +363,14 @@ const SqlMonitoring: React.FC = () => {
{/* Alerts Section */}
-
-
Recent Alerts
+
+
Recent Alerts
{alertsData.length === 0 ? (
-
-