Surface runtime health in menu
This commit is contained in:
@@ -63,9 +63,10 @@ bootstrap() {
|
||||
}
|
||||
|
||||
render_main_menu() {
|
||||
local status persist count width line
|
||||
local status persist runtime count width line
|
||||
status=$(env_status_summary)
|
||||
count=$(storage_count)
|
||||
runtime=$(rules_runtime_mark)
|
||||
if persist_available; then
|
||||
persist='[✓]'
|
||||
else
|
||||
@@ -77,7 +78,7 @@ render_main_menu() {
|
||||
box_top "${width}"
|
||||
box_line "${width}" "${IPF_APP_NAME}"
|
||||
box_separator "${width}"
|
||||
box_line "${width}" "状态: ${status} 规则数: ${count} 持久化: ${persist}"
|
||||
box_line "${width}" "状态: ${status} 规则数: ${count} 持久化: ${persist} 运行态: ${runtime}"
|
||||
box_separator "${width}"
|
||||
for line in "${MENU_LINES[@]}"; do
|
||||
box_line "${width}" "${line}"
|
||||
@@ -85,7 +86,7 @@ render_main_menu() {
|
||||
box_bottom "${width}"
|
||||
else
|
||||
printf '%s\n' "${IPF_APP_NAME}"
|
||||
printf '状态: %s | 规则数: %s | 持久化: %s\n' "${status}" "${count}" "${persist}"
|
||||
printf '状态: %s | 规则数: %s | 持久化: %s | 运行态: %s\n' "${status}" "${count}" "${persist}" "${runtime}"
|
||||
printf '%s\n' "${MENU_LINES[@]}"
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user