yangdx
commited on
Commit
·
8f246d3
1
Parent(s):
872fd57
Fix linting
Browse files
lightrag/kg/postgres_impl.py
CHANGED
@@ -1103,7 +1103,8 @@ class PGGraphStorage(BaseGraphStorage):
|
|
1103 |
try:
|
1104 |
d[k] = (
|
1105 |
json.loads(v)
|
1106 |
-
if isinstance(v, str)
|
|
|
1107 |
else v
|
1108 |
)
|
1109 |
except json.JSONDecodeError:
|
|
|
1103 |
try:
|
1104 |
d[k] = (
|
1105 |
json.loads(v)
|
1106 |
+
if isinstance(v, str)
|
1107 |
+
and (v.startswith("{") or v.startswith("["))
|
1108 |
else v
|
1109 |
)
|
1110 |
except json.JSONDecodeError:
|
lightrag_webui/src/components/status/StatusDialog.tsx
CHANGED
@@ -16,7 +16,7 @@ interface StatusDialogProps {
|
|
16 |
|
17 |
const StatusDialog = ({ open, onOpenChange, status }: StatusDialogProps) => {
|
18 |
const { t } = useTranslation()
|
19 |
-
|
20 |
return (
|
21 |
<Dialog open={open} onOpenChange={onOpenChange}>
|
22 |
<DialogContent className="sm:max-w-[500px]">
|
|
|
16 |
|
17 |
const StatusDialog = ({ open, onOpenChange, status }: StatusDialogProps) => {
|
18 |
const { t } = useTranslation()
|
19 |
+
|
20 |
return (
|
21 |
<Dialog open={open} onOpenChange={onOpenChange}>
|
22 |
<DialogContent className="sm:max-w-[500px]">
|
lightrag_webui/src/components/status/StatusIndicator.tsx
CHANGED
@@ -21,7 +21,7 @@ const StatusIndicator = () => {
|
|
21 |
|
22 |
return (
|
23 |
<div className="fixed right-4 bottom-4 flex items-center gap-2 opacity-80 select-none">
|
24 |
-
<div
|
25 |
className="flex cursor-pointer items-center gap-2"
|
26 |
onClick={() => setDialogOpen(true)}
|
27 |
>
|
@@ -39,11 +39,11 @@ const StatusIndicator = () => {
|
|
39 |
{health ? t('graphPanel.statusIndicator.connected') : t('graphPanel.statusIndicator.disconnected')}
|
40 |
</span>
|
41 |
</div>
|
42 |
-
|
43 |
-
<StatusDialog
|
44 |
-
open={dialogOpen}
|
45 |
-
onOpenChange={setDialogOpen}
|
46 |
-
status={status}
|
47 |
/>
|
48 |
</div>
|
49 |
)
|
|
|
21 |
|
22 |
return (
|
23 |
<div className="fixed right-4 bottom-4 flex items-center gap-2 opacity-80 select-none">
|
24 |
+
<div
|
25 |
className="flex cursor-pointer items-center gap-2"
|
26 |
onClick={() => setDialogOpen(true)}
|
27 |
>
|
|
|
39 |
{health ? t('graphPanel.statusIndicator.connected') : t('graphPanel.statusIndicator.disconnected')}
|
40 |
</span>
|
41 |
</div>
|
42 |
+
|
43 |
+
<StatusDialog
|
44 |
+
open={dialogOpen}
|
45 |
+
onOpenChange={setDialogOpen}
|
46 |
+
status={status}
|
47 |
/>
|
48 |
</div>
|
49 |
)
|