Tianji
@@ -35,7 +35,7 @@ export const Layout: React.FC = React.memo(() => {
-
diff --git a/src/client/pages/Monitor.tsx b/src/client/pages/Monitor.tsx
index 21ce495..f275708 100644
--- a/src/client/pages/Monitor.tsx
+++ b/src/client/pages/Monitor.tsx
@@ -1,6 +1,91 @@
+import { Tag } from 'antd';
+import clsx from 'clsx';
import React from 'react';
+import { HealthBar } from '../components/HealthBar';
+
+interface MonitorInfo {
+ name: string;
+ dayOnlineRate: number;
+ monthOnlineRate: number;
+ certificateExpiredTo: string;
+ detectFrequency: number; // second
+ response: number;
+ avgResponse: number; // 24hour
+ tags: { label: string; color: string }[];
+}
+
+const demoMonitors = [
+ {
+ name: 'Tianji',
+ dayOnlineRate: 1,
+ monthOnlineRate: 0.8,
+ certificateExpiredTo: '2023-9-2 15:49:56',
+ detectFrequency: 300,
+ response: 592,
+ avgResponse: 846,
+ tags: [{ label: 'Core', color: 'red' }],
+ },
+];
export const Monitor: React.FC = React.memo(() => {
- return
Monitor
;
+ return (
+
+ );
});
Monitor.displayName = 'Monitor';
+
+const MonitorList: React.FC = React.memo(() => {
+ const selectedMonitorName = 'Tianji1';
+
+ return (
+
+ {demoMonitors.map((monitor) => (
+
+
+
+ {monitor.monthOnlineRate * 100}%
+
+
+
+
{monitor.name}
+
+ {monitor.tags.map((tag) => (
+
+ {tag.label}
+
+ ))}
+
+
+
+
+ ({
+ status: 'health',
+ }))}
+ />
+
+
+ ))}
+
+ );
+});
+MonitorList.displayName = 'MonitorList';
diff --git a/src/client/pages/Website.tsx b/src/client/pages/Website.tsx
index 9333afe..96d7f69 100644
--- a/src/client/pages/Website.tsx
+++ b/src/client/pages/Website.tsx
@@ -57,7 +57,7 @@ interface WebsiteInfoRecordType {
domain: string;
}
-export const WebsiteList: React.FC = React.memo(() => {
+const WebsiteList: React.FC = React.memo(() => {
const dataSource: WebsiteInfoRecordType[] = [
{
name: 'tianji',