From 67dbb50d972f35cf0f44d8d33281943101f6265a Mon Sep 17 00:00:00 2001
From: Gabriel Viganotti
Date: Tue, 10 Dec 2024 15:34:53 -0300
Subject: [PATCH] feat: use a dash to mark an unknown node info value
---
src/nodes_list_view.rs | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/nodes_list_view.rs b/src/nodes_list_view.rs
index ebfd6e9..9bca621 100644
--- a/src/nodes_list_view.rs
+++ b/src/nodes_list_view.rs
@@ -227,13 +227,13 @@ fn NodeInstanceView(
let peer_id = move || {
info.read()
.short_peer_id()
- .unwrap_or_else(|| "unknown".to_string())
+ .unwrap_or_else(|| " -".to_string())
};
let rewards_addr = move || {
info.read()
.short_rewards_addr()
- .unwrap_or_else(|| "unknown".to_string())
+ .unwrap_or_else(|| " -".to_string())
};
let node_card_clicked = move || {
@@ -312,7 +312,7 @@ fn NodeInstanceView(
"Version: "
- {move || info.get().bin_version.unwrap_or_else(|| "unknown".to_string())}
+ {move || info.get().bin_version.unwrap_or_else(|| " -".to_string())}
@@ -321,7 +321,7 @@ fn NodeInstanceView(
{move || {
info.read()
.balance
- .map_or("unknown".to_string(), |v| v.to_string())
+ .map_or(" -".to_string(), |v| v.to_string())
}}
@@ -329,7 +329,7 @@ fn NodeInstanceView(
{move || {
info.read()
.rewards
- .map_or("unknown".to_string(), |v| v.to_string())
+ .map_or(" -".to_string(), |v| v.to_string())
}}
@@ -345,7 +345,7 @@ fn NodeInstanceView(
{move || {
info.read()
.port
- .map_or("unknown".to_string(), |v| v.to_string())
+ .map_or(" -".to_string(), |v| v.to_string())
}}
@@ -353,7 +353,7 @@ fn NodeInstanceView(
{move || {
info.read()
.metrics_port
- .map_or("unknown".to_string(), |v| v.to_string())
+ .map_or(" -".to_string(), |v| v.to_string())
}}
@@ -361,7 +361,7 @@ fn NodeInstanceView(
"Store cost: "
{move || {
- info.read().store_cost.map_or("unknown".to_string(), |v| v.to_string())
+ info.read().store_cost.map_or(" -".to_string(), |v| v.to_string())
}}
@@ -371,7 +371,7 @@ fn NodeInstanceView(
{move || {
info.read()
.records
- .map_or("unknown".to_string(), |v| v.to_string())
+ .map_or(" -".to_string(), |v| v.to_string())
}}
@@ -379,7 +379,7 @@ fn NodeInstanceView(
{move || {
info.read()
.relevant_records
- .map_or("unknown".to_string(), |v| v.to_string())
+ .map_or(" -".to_string(), |v| v.to_string())
}}
@@ -391,7 +391,7 @@ fn NodeInstanceView(
{move || {
info.read()
.connected_peers
- .map_or("unknown".to_string(), |v| v.to_string())
+ .map_or(" -".to_string(), |v| v.to_string())
}}
@@ -399,7 +399,7 @@ fn NodeInstanceView(
{move || {
info.read()
.shunned_count
- .map_or("unknown".to_string(), |v| v.to_string())
+ .map_or(" -".to_string(), |v| v.to_string())
}}
@@ -409,7 +409,7 @@ fn NodeInstanceView(
{move || {
info.read()
.kbuckets_peers
- .map_or("unknown".to_string(), |v| v.to_string())
+ .map_or(" -".to_string(), |v| v.to_string())
}}