| 42 | } |
| 43 | |
| 44 | function DeviceQueue(props: IProps) { |
| 45 | const [refreshCounter, setRefreshCounter] = useState<number>(0); |
| 46 | const [isEncrypted, setIsEncrypted] = useState<boolean>(false); |
| 47 | const [form] = Form.useForm<FormRules>(); |
| 48 | |
| 49 | const columns: ColumnsType<DeviceQueueItem.AsObject> = [ |
| 50 | { |
| 51 | title: "ID", |
| 52 | dataIndex: "id", |
| 53 | key: "id", |
| 54 | width: 350, |
| 55 | }, |
| 56 | { |
| 57 | title: "Pending", |
| 58 | dataIndex: "isPending", |
| 59 | key: "isPending", |
| 60 | width: 100, |
| 61 | render: (text, record) => { |
| 62 | if (record.isPending) { |
| 63 | return "yes"; |
| 64 | } else { |
| 65 | return "no"; |
| 66 | } |
| 67 | }, |
| 68 | }, |
| 69 | { |
| 70 | title: "Encrypted", |
| 71 | dataIndex: "isEncrypted", |
| 72 | key: "isEncrypted", |
| 73 | width: 100, |
| 74 | render: (text, record) => { |
| 75 | if (record.isEncrypted) { |
| 76 | return "yes"; |
| 77 | } else { |
| 78 | return "no"; |
| 79 | } |
| 80 | }, |
| 81 | }, |
| 82 | { |
| 83 | title: "Frame-counter", |
| 84 | dataIndex: "fCntDown", |
| 85 | key: "fCntDown", |
| 86 | width: 200, |
| 87 | render: (text, record) => { |
| 88 | if (record.isPending === true || record.isEncrypted === true) { |
| 89 | return record.fCntDown; |
| 90 | } else { |
| 91 | return ""; |
| 92 | } |
| 93 | }, |
| 94 | }, |
| 95 | { |
| 96 | title: "Confirmed", |
| 97 | dataIndex: "confirmed", |
| 98 | key: "confirmed", |
| 99 | width: 100, |
| 100 | render: (text, record) => { |
| 101 | if (record.confirmed) { |