Fix shown as percentage when no link present
[khatus.git] / x2 / src / awk / exe / bar.awk
index 9b7328c..0e81833 100644 (file)
@@ -182,6 +182,14 @@ function bar_make_status_net_wifi(interface,    src) {
     return cache_get_fmt_def(src, "status" Kfs interface, 10, "%s")
 }
 
+function bar_make_status_net_wifi_link(interface,    link) {
+    cache_get_fmt_def(link, "khatus_sensor_net_wifi_status", "link" Kfs interface, 10)
+    if (!link["is_expired"] && link["value"])
+        return sprintf("%d%%", link["value"])
+    else
+        return "--"
+}
+
 # -----------------------------------------------------------------------------
 # Bluetooth
 # -----------------------------------------------------------------------------
This page took 0.02146 seconds and 4 git commands to generate.