remove grafana
This commit is contained in:
@@ -249,6 +249,9 @@ router.post("/:id/validate-hpg", async (req, res) => {
|
||||
type: "hpg-validation",
|
||||
status: "failed",
|
||||
message: `HPG Validation fehlgeschlagen`,
|
||||
data: {
|
||||
mission,
|
||||
},
|
||||
} as NotificationPayload);
|
||||
}, 5000);
|
||||
} catch (error) {
|
||||
|
||||
@@ -62,6 +62,7 @@ export const handleConnectPilot =
|
||||
userId: userId,
|
||||
loginTime: new Date().toISOString(),
|
||||
stationId: parseInt(stationId),
|
||||
// TODO: remove this after testing
|
||||
posLat: 51.45,
|
||||
posLng: 9.77,
|
||||
posH145active: true,
|
||||
|
||||
@@ -39,21 +39,27 @@ export const ConnectionBtn = () => {
|
||||
<span className="mx-2 text-error">{connection.message}</span>
|
||||
)}
|
||||
|
||||
{connection.status === "disconnected" && (
|
||||
{connection.status == "connected" ? (
|
||||
<button
|
||||
className="btn btn-sm btn-soft btn-info "
|
||||
onClick={() => modalRef.current?.showModal()}
|
||||
className="btn btn-soft btn-error"
|
||||
type="submit"
|
||||
onSubmit={() => false}
|
||||
onClick={() => {
|
||||
connection.disconnect();
|
||||
}}
|
||||
>
|
||||
Verbinden
|
||||
Trennen
|
||||
</button>
|
||||
)}
|
||||
|
||||
{connection.status == "connected" && (
|
||||
) : (
|
||||
<button
|
||||
className="btn btn-soft btn-success"
|
||||
onClick={() => modalRef.current?.showModal()}
|
||||
type="submit"
|
||||
onSubmit={() => false}
|
||||
onClick={() => {
|
||||
modalRef.current?.showModal();
|
||||
}}
|
||||
className="btn btn-sm btn-soft btn-info"
|
||||
>
|
||||
Verbunden
|
||||
{connection.status == "disconnected" ? "Verbinden" : connection.status}
|
||||
</button>
|
||||
)}
|
||||
|
||||
@@ -62,9 +68,7 @@ export const ConnectionBtn = () => {
|
||||
{connection.status == "connected" ? (
|
||||
<h3 className="text-lg font-bold mb-5">
|
||||
Verbunden als{" "}
|
||||
<span className="text-info">
|
||||
<{connection.selectedStation?.bosCallsign}>
|
||||
</span>
|
||||
<span className="text-info"><{connection.selectedStation?.bosCallsign}></span>
|
||||
</h3>
|
||||
) : (
|
||||
<h3 className="text-lg font-bold mb-5">Als Pilot anmelden</h3>
|
||||
@@ -106,9 +110,7 @@ export const ConnectionBtn = () => {
|
||||
/>
|
||||
</label>
|
||||
{connection.status == "disconnected" && (
|
||||
<p className="fieldset-label">
|
||||
Du kannst diese Zeit später noch anpassen.
|
||||
</p>
|
||||
<p className="fieldset-label">Du kannst diese Zeit später noch anpassen.</p>
|
||||
)}
|
||||
</fieldset>
|
||||
<div className="modal-action flex justify-between w-full">
|
||||
@@ -132,8 +134,7 @@ export const ConnectionBtn = () => {
|
||||
onClick={() => {
|
||||
const selectedStation = stations?.find(
|
||||
(station) =>
|
||||
station.id ===
|
||||
parseInt(form.selectedStationId?.toString() || ""),
|
||||
station.id === parseInt(form.selectedStationId?.toString() || ""),
|
||||
);
|
||||
if (selectedStation) {
|
||||
connection.connect(
|
||||
@@ -147,9 +148,7 @@ export const ConnectionBtn = () => {
|
||||
}}
|
||||
className="btn btn-soft btn-info"
|
||||
>
|
||||
{connection.status == "disconnected"
|
||||
? "Verbinden"
|
||||
: connection.status}
|
||||
{connection.status == "disconnected" ? "Verbinden" : connection.status}
|
||||
</button>
|
||||
)}
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user