From a09671036dd8b34a4c95262fb6284d6c326b8971 Mon Sep 17 00:00:00 2001 From: PxlLoewe <72106766+PxlLoewe@users.noreply.github.com> Date: Sat, 26 Jul 2025 11:24:45 -0700 Subject: [PATCH 1/2] =?UTF-8?q?entferne=20ADMIN=5FHELIPORT=20und=20ADMIN?= =?UTF-8?q?=5FEVENT=20berechtigung=20f=C3=BCr=20CGs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(app)/admin/user/[id]/_components/forms.tsx | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/apps/hub/app/(app)/admin/user/[id]/_components/forms.tsx b/apps/hub/app/(app)/admin/user/[id]/_components/forms.tsx index 209aaf8f..f0844bec 100644 --- a/apps/hub/app/(app)/admin/user/[id]/_components/forms.tsx +++ b/apps/hub/app/(app)/admin/user/[id]/_components/forms.tsx @@ -189,20 +189,9 @@ export const ProfileForm: React.FC = ({ user }: ProfileFormPro type="button" className="btn btn-sm btn-outline" onClick={() => - form.setValue( - "permissions", - [ - "LOGIN_NEXTCLOUD", - "PILOT", - "DISPO", - "AUDIO", - "ADMIN_EVENT", - "ADMIN_HELIPORT", - ], - { - shouldDirty: true, - }, - ) + form.setValue("permissions", ["LOGIN_NEXTCLOUD", "PILOT", "DISPO", "AUDIO"], { + shouldDirty: true, + }) } onSubmit={() => false} > From b9a4f5e8d3ecb5c3e8234724f084293a70b685de Mon Sep 17 00:00:00 2001 From: PxlLoewe <72106766+PxlLoewe@users.noreply.github.com> Date: Sat, 26 Jul 2025 12:33:41 -0700 Subject: [PATCH 2/2] added http service to prometheus, fixes sound Bug --- apps/dispatch/app/_components/Audio/Audio.tsx | 1 + apps/dispatch/app/_components/Audio/useSounds.ts | 2 +- apps/dispatch/app/_store/audioStore.ts | 14 ++++++++++---- ...d_sepura.mp3 => connection_stopped_sepura.mp3} | Bin packages/prometheus/prometheus.prod.yml | 7 +++++++ 5 files changed, 19 insertions(+), 5 deletions(-) rename apps/dispatch/public/sounds/{connection_stoped_sepura.mp3 => connection_stopped_sepura.mp3} (100%) diff --git a/apps/dispatch/app/_components/Audio/Audio.tsx b/apps/dispatch/app/_components/Audio/Audio.tsx index 8b908570..8b1372b7 100644 --- a/apps/dispatch/app/_components/Audio/Audio.tsx +++ b/apps/dispatch/app/_components/Audio/Audio.tsx @@ -39,6 +39,7 @@ export const Audio = () => { removeMessage, } = useAudioStore(); const [selectedRoom, setSelectedRoom] = useState("LST_01"); + useSounds({ isReceiving: speakingParticipants.length > 0, isTransmitting: isTalking, diff --git a/apps/dispatch/app/_components/Audio/useSounds.ts b/apps/dispatch/app/_components/Audio/useSounds.ts index c70247da..ae621157 100644 --- a/apps/dispatch/app/_components/Audio/useSounds.ts +++ b/apps/dispatch/app/_components/Audio/useSounds.ts @@ -27,7 +27,7 @@ export const useSounds = ({ useEffect(() => { if (!window) return; connectionStart.current = new Audio("/sounds/connection_started_sepura.mp3"); - connectionEnd.current = new Audio("/sounds/connection_stoped_sepura.mp3"); + connectionEnd.current = new Audio("/sounds/connection_stopped_sepura.mp3"); ownCallStarted.current = new Audio("/sounds/call_end_sepura.wav"); foreignCallStop.current = new Audio("/sounds/call_end_sepura.wav"); foreignCallBlocked.current = new Audio("/sounds/call_blocked_sepura.wav"); diff --git a/apps/dispatch/app/_store/audioStore.ts b/apps/dispatch/app/_store/audioStore.ts index c0aaefe1..7ce25c64 100644 --- a/apps/dispatch/app/_store/audioStore.ts +++ b/apps/dispatch/app/_store/audioStore.ts @@ -251,10 +251,16 @@ export const useAudioStore = create((set, get) => ({ ); }); - set({ - remoteParticipants: room.numParticipants === 0 ? 0 : room.numParticipants - 1, // Unreliable and delayed - speakingParticipants, - }); + if (oldSpeakingParticipants.length !== speakingParticipants.length) { + set({ + remoteParticipants: room.numParticipants === 0 ? 0 : room.numParticipants - 1, // Unreliable and delayed + speakingParticipants, + }); + } else { + set({ + remoteParticipants: room.numParticipants === 0 ? 0 : room.numParticipants - 1, // Unreliable and delayed + }); + } }, 500); } catch (error: Error | unknown) { console.error("Error occured: ", error); diff --git a/apps/dispatch/public/sounds/connection_stoped_sepura.mp3 b/apps/dispatch/public/sounds/connection_stopped_sepura.mp3 similarity index 100% rename from apps/dispatch/public/sounds/connection_stoped_sepura.mp3 rename to apps/dispatch/public/sounds/connection_stopped_sepura.mp3 diff --git a/packages/prometheus/prometheus.prod.yml b/packages/prometheus/prometheus.prod.yml index d2004309..9f14a493 100644 --- a/packages/prometheus/prometheus.prod.yml +++ b/packages/prometheus/prometheus.prod.yml @@ -20,3 +20,10 @@ scrape_configs: - job_name: "traefik" static_configs: - targets: ["traefik:8080"] # Traefik dashboard endpoint + - job_name: "Node Exporter" + static_configs: + - targets: + [ + "http://148.251.0.86:9100/metrics", + "http://148.251.0.86:9115/probe?target=https://virtualairrescue.com&module=http_2xx", + ]