mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
addHealthCheck instead of additionalHealthChecks for Daemons (#2962)
* addHealthCheck on Daemons * fix bug that prevents domains without protocols from being deleted * fixes from testing * version bump * add sdk version to UI * fix useEntrypoint * fix dependency health check error display * minor fixes * beta.29 * fixes from testing * beta.30 * set /etc/os-release (#2918) * remove check-monitor from kiosk (#2059) * add units for progress (#2693) * use new progress type * alpha.7 * fix up pwa stuff * fix wormhole-squashfs and prune boot (#2964) * don't exit on expected errors * use bash --------- Co-authored-by: Matt Hill <mattnine@protonmail.com>
This commit is contained in:
@@ -70,9 +70,7 @@ pub fn wifi<C: Context>() -> ParentHandler<C> {
|
||||
"get",
|
||||
from_fn_async(get)
|
||||
.with_display_serializable()
|
||||
.with_custom_display_fn(|handle, result| {
|
||||
Ok(display_wifi_info(handle.params, result))
|
||||
})
|
||||
.with_custom_display_fn(|handle, result| display_wifi_info(handle.params, result))
|
||||
.with_about("List wifi info")
|
||||
.with_call_remote::<CliContext>(),
|
||||
)
|
||||
@@ -134,7 +132,7 @@ pub fn available<C: Context>() -> ParentHandler<C> {
|
||||
"get",
|
||||
from_fn_async(get_available)
|
||||
.with_display_serializable()
|
||||
.with_custom_display_fn(|handle, result| Ok(display_wifi_list(handle.params, result)))
|
||||
.with_custom_display_fn(|handle, result| display_wifi_list(handle.params, result))
|
||||
.with_about("List available wifi networks")
|
||||
.with_call_remote::<CliContext>(),
|
||||
)
|
||||
@@ -363,7 +361,7 @@ pub struct WifiListOut {
|
||||
security: Vec<String>,
|
||||
}
|
||||
pub type WifiList = HashMap<Ssid, WifiListInfoLow>;
|
||||
fn display_wifi_info(params: WithIoFormat<Empty>, info: WifiListInfo) {
|
||||
fn display_wifi_info(params: WithIoFormat<Empty>, info: WifiListInfo) -> Result<(), Error> {
|
||||
use prettytable::*;
|
||||
|
||||
if let Some(format) = params.format {
|
||||
@@ -424,10 +422,11 @@ fn display_wifi_info(params: WithIoFormat<Empty>, info: WifiListInfo) {
|
||||
]);
|
||||
}
|
||||
|
||||
table_global.print_tty(false).unwrap();
|
||||
table_global.print_tty(false)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn display_wifi_list(params: WithIoFormat<Empty>, info: Vec<WifiListOut>) {
|
||||
fn display_wifi_list(params: WithIoFormat<Empty>, info: Vec<WifiListOut>) -> Result<(), Error> {
|
||||
use prettytable::*;
|
||||
|
||||
if let Some(format) = params.format {
|
||||
@@ -448,7 +447,8 @@ fn display_wifi_list(params: WithIoFormat<Empty>, info: Vec<WifiListOut>) {
|
||||
]);
|
||||
}
|
||||
|
||||
table_global.print_tty(false).unwrap();
|
||||
table_global.print_tty(false)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
// #[command(display(display_wifi_info))]
|
||||
|
||||
Reference in New Issue
Block a user