Skip to content

Commit 8eed7f0

Browse files
committed
Show transceiver errors in wicket UI
- Make all transceiver data results rather than options - Report errors in the `wicket` UI for each piece of data we failed to read - Fixes #8110
1 parent de2847f commit 8eed7f0

File tree

3 files changed

+180
-174
lines changed

3 files changed

+180
-174
lines changed

wicket-common/src/inventory.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,13 @@ pub struct Transceiver {
9999
/// The port in which the transceiver sits.
100100
pub port: String,
101101
/// The general status of the transceiver, such as presence and faults.
102-
pub status: Option<ExtendedStatus>,
102+
pub status: Result<ExtendedStatus, String>,
103103
/// Information about the power state of the transceiver.
104-
pub power: Option<PowerMode>,
104+
pub power: Result<PowerMode, String>,
105105
/// Details about the vendor, part number, and serial number.
106-
pub vendor: Option<VendorInfo>,
106+
pub vendor: Result<VendorInfo, String>,
107107
/// Status of the transceiver's machinery for carrying data, the "datapath".
108-
pub datapath: Option<Datapath>,
108+
pub datapath: Result<Datapath, String>,
109109
/// Environmental monitoring data, such as temperature or optical power.
110-
pub monitors: Option<Monitors>,
110+
pub monitors: Result<Monitors, String>,
111111
}

0 commit comments

Comments
 (0)