fix: hooks order in PhotoGalleryManager for production build
This commit is contained in:
21
deploy/check-latest-fail.py
Normal file
21
deploy/check-latest-fail.py
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import paramiko, json, re
|
||||||
|
|
||||||
|
c = paramiko.SSHClient()
|
||||||
|
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||||
|
c.connect("10.10.0.10", username="localadministrator", password="Bbt9115xty9176!", timeout=20, allow_agent=False, look_for_keys=False)
|
||||||
|
|
||||||
|
_, o, e = c.exec_command(
|
||||||
|
"docker exec coolify-db psql -U coolify -d coolify -t -c "
|
||||||
|
"\"SELECT id,status,substring(logs from 1 for 8000) FROM application_deployment_queues ORDER BY id DESC LIMIT 1;\"",
|
||||||
|
timeout=60,
|
||||||
|
)
|
||||||
|
o.channel.recv_exit_status()
|
||||||
|
raw = (o.read() + e.read()).decode(errors="replace")
|
||||||
|
print(raw[-10000:])
|
||||||
|
# extract Failed to compile section
|
||||||
|
if "Failed to compile" in raw:
|
||||||
|
m = re.search(r"Failed to compile\.[\s\S]{0,2000}", raw)
|
||||||
|
if m:
|
||||||
|
print("\n--- ERROR ---\n", m.group(0)[:1500])
|
||||||
|
c.close()
|
||||||
21
deploy/check-latest-fail2.py
Normal file
21
deploy/check-latest-fail2.py
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import paramiko, json
|
||||||
|
|
||||||
|
c = paramiko.SSHClient()
|
||||||
|
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||||
|
c.connect("10.10.0.10", username="localadministrator", password="Bbt9115xty9176!", timeout=20, allow_agent=False, look_for_keys=False)
|
||||||
|
|
||||||
|
_, o, e = c.exec_command(
|
||||||
|
"docker exec coolify-db psql -U coolify -d coolify -t -A -c "
|
||||||
|
"\"SELECT logs FROM application_deployment_queues WHERE id=1120;\"",
|
||||||
|
timeout=120,
|
||||||
|
)
|
||||||
|
o.channel.recv_exit_status()
|
||||||
|
raw = (o.read() + e.read()).decode(errors="replace")
|
||||||
|
# find build errors
|
||||||
|
for needle in ["Failed to compile", "Type error", "ERROR:", "error TS", "not assignable"]:
|
||||||
|
idx = raw.rfind(needle)
|
||||||
|
if idx >= 0:
|
||||||
|
print(raw[idx:idx+2500])
|
||||||
|
print("\n---\n")
|
||||||
|
c.close()
|
||||||
@@ -89,10 +89,6 @@ export function CannedMessagesPanel({ compact, onSelect }: CannedMessagesPanelPr
|
|||||||
await refresh();
|
await refresh();
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!capabilities.canUseQuickReplies && !compact) {
|
|
||||||
return <GuestUpgradeBanner reason="chat" />;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (compact) {
|
if (compact) {
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-wrap gap-1.5 max-h-24 overflow-y-auto">
|
<div className="flex flex-wrap gap-1.5 max-h-24 overflow-y-auto">
|
||||||
@@ -114,6 +110,10 @@ export function CannedMessagesPanel({ compact, onSelect }: CannedMessagesPanelPr
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!capabilities.canUseQuickReplies) {
|
||||||
|
return <GuestUpgradeBanner reason="chat" />;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card>
|
<Card>
|
||||||
<CardHeader className="pb-3">
|
<CardHeader className="pb-3">
|
||||||
|
|||||||
@@ -42,9 +42,6 @@ export function PhotoGalleryManager({ onVerifyClick }: PhotoGalleryManagerProps)
|
|||||||
const [message, setMessage] = useState("");
|
const [message, setMessage] = useState("");
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
const fileRef = useRef<HTMLInputElement>(null);
|
const fileRef = useRef<HTMLInputElement>(null);
|
||||||
if (!capabilities.canUploadPhotos) {
|
|
||||||
return <GuestUpgradeBanner reason="media" />;
|
|
||||||
}
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let cancelled = false;
|
let cancelled = false;
|
||||||
@@ -116,6 +113,10 @@ export function PhotoGalleryManager({ onVerifyClick }: PhotoGalleryManagerProps)
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!capabilities.canUploadPhotos) {
|
||||||
|
return <GuestUpgradeBanner reason="media" />;
|
||||||
|
}
|
||||||
|
|
||||||
if (loading) {
|
if (loading) {
|
||||||
return <p className="text-sm text-muted-foreground">Loading gallery...</p>;
|
return <p className="text-sm text-muted-foreground">Loading gallery...</p>;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user