diff --git a/src/client/components/monitor/MonitorBadgeView.tsx b/src/client/components/monitor/MonitorBadgeView.tsx
index 9116a99..b3d2f67 100644
--- a/src/client/components/monitor/MonitorBadgeView.tsx
+++ b/src/client/components/monitor/MonitorBadgeView.tsx
@@ -6,8 +6,9 @@ import copy from 'copy-to-clipboard';
export const MonitorBadgeView: React.FC<{
workspaceId: string;
monitorId: string;
+ monitorName?: string;
}> = React.memo((props) => {
- const { workspaceId, monitorId } = props;
+ const { workspaceId, monitorId, monitorName = '' } = props;
const [showDetail, setShowDetail] = useState(false);
@@ -48,11 +49,13 @@ export const MonitorBadgeView: React.FC<{
`}
+ value={`
`}
addonAfter={
handleCopy(`
`)}
+ onClick={() =>
+ handleCopy(`
`)
+ }
>
Copy
@@ -61,11 +64,11 @@ export const MonitorBadgeView: React.FC<{
handleCopy(`![](${url})`)}
+ onClick={() => handleCopy(`![${monitorName}](${url})`)}
>
Copy
diff --git a/src/client/components/monitor/MonitorInfo.tsx b/src/client/components/monitor/MonitorInfo.tsx
index b58dac8..1174406 100644
--- a/src/client/components/monitor/MonitorInfo.tsx
+++ b/src/client/components/monitor/MonitorInfo.tsx
@@ -238,6 +238,7 @@ export const MonitorInfo: React.FC = React.memo((props) => {
diff --git a/src/server/model/monitor/provider/http.ts b/src/server/model/monitor/provider/http.ts
index 593f791..242c532 100644
--- a/src/server/model/monitor/provider/http.ts
+++ b/src/server/model/monitor/provider/http.ts
@@ -2,7 +2,6 @@ import { MonitorProvider } from './type';
import axios, { AxiosRequestConfig, AxiosResponse } from 'axios';
import { logger } from '../../../utils/logger';
import dayjs from 'dayjs';
-import { prisma } from '../../_client';
import https from 'https';
import { saveMonitorStatus } from './_utils';