From 3cd2fabaea5ff3d007041ec590846d59cff19c24 Mon Sep 17 00:00:00 2001 From: tygao Date: Fri, 1 Sep 2023 08:57:17 +0800 Subject: [PATCH] feat: update ui component and use fallback (#254) Signed-off-by: tygao --- .../preview_panel/connector_details.tsx | 26 ++++++------------- public/components/preview_panel/index.tsx | 20 +++----------- 2 files changed, 12 insertions(+), 34 deletions(-) diff --git a/public/components/preview_panel/connector_details.tsx b/public/components/preview_panel/connector_details.tsx index 0d48f881..fe699b32 100644 --- a/public/components/preview_panel/connector_details.tsx +++ b/public/components/preview_panel/connector_details.tsx @@ -24,22 +24,14 @@ export const ConnectorDetails = (props: { name?: string; id?: string; descriptio

Connector details

- + - - -
Connector name
-
-
- {name} + Connector name + {name ? name : '-'}
- - -
Connector ID
-
-
+ Connector ID {id ? ( @@ -50,12 +42,10 @@ export const ConnectorDetails = (props: { name?: string; id?: string; descriptio
- - -
Connector description
-
-
- {description} + Connector description + + {description ? description : '-'} +
); diff --git a/public/components/preview_panel/index.tsx b/public/components/preview_panel/index.tsx index 406dda5e..e41e56c1 100644 --- a/public/components/preview_panel/index.tsx +++ b/public/components/preview_panel/index.tsx @@ -116,35 +116,23 @@ export const PreviewPanel = ({ onClose, model }: Props) => { - + - - -
Status
-
-
+ Status {respondingStatus.overall}
- - -
Source
-
-
+ Source {connector ? 'External' : 'Local'}
- - -
Model ID
-
-
+ Model ID