diff --git a/package-lock.json b/package-lock.json
index 79e2f18..d46565d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -43,7 +43,7 @@
"mui-tel-input": "^7.0.0",
"notistack": "^3.0.1",
"openweathermap-ts": "^1.2.10",
- "protobuf-ts": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#staging",
+ "protobuf-ts": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#terminal_dashboard_changes",
"query-string": "^9.2.1",
"react": "^18.3.1",
"react-beautiful-dnd": "^13.1.1",
@@ -11967,7 +11967,7 @@
},
"node_modules/protobuf-ts": {
"version": "1.0.0",
- "resolved": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#1c00e059fe16126e85c50581786b7510759920d7",
+ "resolved": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#bfe8ce6f4ee17a178304e17718a8911b060b2e69",
"dependencies": {
"protobufjs": "^6.8.8"
}
diff --git a/package.json b/package.json
index 90ac71b..5f7818c 100644
--- a/package.json
+++ b/package.json
@@ -55,7 +55,7 @@
"mui-tel-input": "^7.0.0",
"notistack": "^3.0.1",
"openweathermap-ts": "^1.2.10",
- "protobuf-ts": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#staging",
+ "protobuf-ts": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#terminal_dashboard_changes",
"query-string": "^9.2.1",
"react": "^18.3.1",
"react-beautiful-dnd": "^13.1.1",
diff --git a/src/gate/GateList.tsx b/src/gate/GateList.tsx
index 2cdec52..5910808 100644
--- a/src/gate/GateList.tsx
+++ b/src/gate/GateList.tsx
@@ -1,5 +1,5 @@
import { Gate } from "models/Gate";
-import { Box, Card, IconButton, List, ListItem, ListItemText, Theme, Typography } from "@mui/material";
+import { Box, Card, IconButton, List, ListItem, ListItemText, Theme, Tooltip, Typography } from "@mui/material";
import React, { useCallback, useEffect, useState } from "react";
import { useNavigate } from "react-router-dom";
import { useMobile } from "hooks";
@@ -20,6 +20,7 @@ import { quack } from "protobuf-ts/quack";
import { getTemperatureUnit } from "utils";
import { teal } from "@mui/material/colors";
import { react } from "@babel/types";
+import { getDeviceStateHelper } from "pbHelpers/DeviceState";
interface Props {
//gates: Gate[];
@@ -42,6 +43,12 @@ const useStyles = makeStyles((theme: Theme) => ({
gateCard: {
marginBottom: 10,
paddingLeft: 15
+ },
+ cellContainer: {
+ margin: theme.spacing(1),
+ marginLeft: theme.spacing(2),
+ display: "flex",
+ width: theme.spacing(10)
}
}));
@@ -100,13 +107,33 @@ export default function GateList(props: Props) {
const displayPCAStatus = (state: pond.PCAState) => {
switch(state){
case pond.PCAState.PCA_STATE_IN_BOUNDS:
- return
+ return (
+
+
+ PCA in threshold
+
+ )
case pond.PCAState.PCA_STATE_OUT_BOUNDS:
- return
+ return (
+
+
+ PCA out of threshold
+
+ )
case pond.PCAState.PCA_STATE_OFF:
- return
+ return (
+
+
+ PCA off
+
+ )
default:
- return
+ return (
+
+
+ PCA device not found
+
+ )
}
}
@@ -166,7 +193,7 @@ export default function GateList(props: Props) {
const conditionDisplay = (gate: Gate) => {
let display = ""
if(gate.status.pcaState === pond.PCAState.PCA_STATE_OFF){
- display = "Inactive"
+ display = "PCA Off"
} else if (gate.status.pcaState === pond.PCAState.PCA_STATE_UNKNOWN){
display = "--"
} else { //the pca is currently active calulate the delta temp (outlet - ambient)
@@ -241,6 +268,19 @@ export default function GateList(props: Props) {
)
},
+ {
+ title: "Device State",
+ // cellStyle: {width: 100000},
+ // sortKey: "state",
+ render: gate => {
+ const deviceStateHelper = getDeviceStateHelper(gate.status.pcaDeviceState);
+ return (
+
+ {deviceStateHelper.icon}
+
+ )
+ }
+ },
{
title: "PCA Status",
render: gate => {
@@ -324,6 +364,7 @@ export default function GateList(props: Props) {
}
const gutter = (gate: Gate) => {
+ const deviceStateHelper = getDeviceStateHelper(gate.status.pcaDeviceState)
return(
@@ -334,6 +375,12 @@ export default function GateList(props: Props) {
Delta Temperature:
{conditionDisplay(gate)}
+
+ Device State:
+
+ {deviceStateHelper.icon}
+
+
{/* taking these out for now because we are not sure if the customer wants them */}
{/*
Estimated Temp:
diff --git a/src/pbHelpers/ComponentTypes/DragerGasDongle.ts b/src/pbHelpers/ComponentTypes/DragerGasDongle.ts
index dd28f75..648b01d 100644
--- a/src/pbHelpers/ComponentTypes/DragerGasDongle.ts
+++ b/src/pbHelpers/ComponentTypes/DragerGasDongle.ts
@@ -92,6 +92,11 @@ export function dragerGasDongle(subtype: number = 0): ComponentTypeExtension {
key: quack.DragerGasDongleSubtype.DRAGER_GAS_DONGLE_SUBTYPE_LEL,
value: "DRAGER_GAS_DONGLE_SUBTYPE_LEL",
friendlyName: "Drager Gas LEL"
+ },
+ {
+ key: quack.DragerGasDongleSubtype.DRAGER_GAS_DONGLE_SUBTYPE_AMMONIA,
+ value: "DRAGER_GAS_DONGLE_SUBTYPE_AMMONIA",
+ friendlyName: "Drager Gas Ammonia"
}
],
friendlyName: "Drager Gas",