diff --git a/backend/.env.example b/backend/.env.example index 5d80214..973d2d5 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -1,6 +1,7 @@ # All these should be set in the GitHub Repository actions and secrets at https://github.com/NTNU-SmallSat-Lab/outreach-website/settings/variables/actions # Any changes done here will not be reflected in the production environment # All variables named toBeGenerated should be generated with the command `openssl rand -base64 32` +# All variables named toGetFromServer are available at the path /root/website_secrets/secrets on the smallsat02 server HOST=0.0.0.0 PORT=1337 STRAPI_URL="https://hypso.space/strapi/" diff --git a/backend/src/api/grafana/controllers/grafana.js b/backend/src/api/grafana/controllers/grafana.js index fc76138..160d28e 100644 --- a/backend/src/api/grafana/controllers/grafana.js +++ b/backend/src/api/grafana/controllers/grafana.js @@ -93,7 +93,7 @@ module.exports = { } else if (i === 11) { name = "BP 4"; } else if (i >= 12 && i <= 13) { - name = `Ext. Board ${i - 10}`; + name = `Ext. Board ${i - 11}`; } } return name; diff --git a/frontend/src/app/satellites/[satelliteSlug]/_infoSat/satTelemetry.tsx b/frontend/src/app/satellites/[satelliteSlug]/_infoSat/satTelemetry.tsx index 09182bb..7950a1c 100644 --- a/frontend/src/app/satellites/[satelliteSlug]/_infoSat/satTelemetry.tsx +++ b/frontend/src/app/satellites/[satelliteSlug]/_infoSat/satTelemetry.tsx @@ -90,10 +90,10 @@ export default function SatTelemetry({ batteryVoltageData[1][index] / 1000, ], ); + { /* Battery Current Data */ } - const batteryCurrentData = [data?.battCurrIn, data?.battCurrOut].filter( (curr) => curr, ); // Filter out any undefined values @@ -114,7 +114,6 @@ export default function SatTelemetry({ { /* Temperature Panel Data */ } - const checkLine = (data: number[]) => { return data.every((index) => data[index] === data[0]); }; @@ -127,12 +126,13 @@ export default function SatTelemetry({ for (let i = 0; i <= 13; i++) { if (satName === "HYPSO-1" && (i === 12 || i === 13)) continue; + // HYPSO-1 has no Ext. Board if (satName === "HYPSO-2" && i === 10) continue; // Skip panel 10 for HYPSO-2 const tempData = data?.[`tempPanelData${i}`]; console.log(`tempPanelData${i}`, checkLine(tempData?.array[1])); - // Check if tempData is defined and has + // Check if tempData is defined and has no uncoherent data if (tempData && !checkLine(tempData.array[1])) { tempPanelChart.push({ name: tempData.name || `Panel ${i}`, diff --git a/frontend/src/app/satellites/[satelliteSlug]/page.tsx b/frontend/src/app/satellites/[satelliteSlug]/page.tsx index 03c91d6..c8e9471 100644 --- a/frontend/src/app/satellites/[satelliteSlug]/page.tsx +++ b/frontend/src/app/satellites/[satelliteSlug]/page.tsx @@ -124,6 +124,7 @@ export default async function SatelliteInfoPage({ ) : null ) : null} + {/* Related projects */}