Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable mithril signers section outside of main gLiveView views. #1796

Merged
merged 2 commits into from
Aug 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 56 additions & 56 deletions scripts/cnode-helper-scripts/gLiveView.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1452,66 +1452,66 @@ while true; do
closeRow
fi
fi
fi

if [[ "${MITHRIL_SIGNER_ENABLED}" == "Y" ]] ; then
# Mithril Signer Section
mithrilSignerVars
printf "${mithrildivider}\n" && ((line++))
get_metric_value() {
local metric_name="$1"
local metric_value
while IFS= read -r line; do
if [[ $line =~ ${metric_name}[[:space:]]+([0-9]+) ]]; then
metric_value="${BASH_REMATCH[1]}"
echo "$metric_value"
return
fi
done <<< "$mithrilSignerMetrics"
}
metrics=(
"runtime_cycle_total_since_startup"
"signer_registration_success_last_epoch"
"signer_registration_success_since_startup"
"signer_registration_total_since_startup"
"signature_registration_success_last_epoch"
"signature_registration_success_since_startup"
"signature_registration_total_since_startup"
)
cycle_total_VAL=$(get_metric_value "runtime_cycle_total_since_startup")
signer_reg_epoch_VAL=$(get_metric_value "signer_registration_success_last_epoch")
signer_reg_success_VAL=$(get_metric_value "signer_registration_success_since_startup")
signer_reg_total_VAL=$(get_metric_value "signer_registration_total_since_startup")
signatures_epoch_VAL=$(get_metric_value "signature_registration_success_last_epoch")
signatures_reg_success_VAL=$(get_metric_value "signature_registration_success_since_startup")
signatures_reg_total_VAL=$(get_metric_value "signature_registration_total_since_startup")
if [[ ${VERBOSE} = "Y" ]]; then
printf "${VL} Status : ${style_values_2}%-${three_col_1_value_width}s${NC}" "$signerServiceStatus"
printf " : Registered Epoch : ${style_values_1}%-${three_col_1_value_width}s${NC}" "$signer_reg_epoch_VAL"
closeRow
printf "${VL} Cycles : ${style_values_1}%-${three_col_1_value_width}s${NC}" "$cycle_total_VAL"
printf " : Signing in Epoch : ${style_values_2}%-${three_col_1_value_width}s${NC}" "$signatures_epoch_VAL"
closeRow
printf "${VL} Signatures : ${style_values_2}%-${three_col_1_value_width}s${NC}" "$signatures_reg_success_VAL"
printf " : Total Signatures : ${style_values_1}%-${three_col_1_value_width}s${NC}" "$signatures_reg_total_VAL"
closeRow
printf "${VL} Registered : ${style_values_1}%-${three_col_1_value_width}s${NC}" "$signer_reg_success_VAL"
printf " : Registered Total : ${style_values_1}%-${three_col_1_value_width}s${NC}" "$signer_reg_total_VAL"
closeRow
else
printf "${VL} Status : ${style_values_2}%-${three_col_1_value_width}s${NC}" "$signerServiceStatus"
printf " : Registered Epoch : ${style_values_1}%-${three_col_1_value_width}s${NC}" "$signer_reg_epoch_VAL"
closeRow
printf "${VL} Cycles : ${style_values_1}%-${three_col_1_value_width}s${NC}" "$cycle_total_VAL"
printf " : Signing in Epoch : ${style_values_2}%-${three_col_1_value_width}s${NC}" "$signatures_epoch_VAL"
closeRow
printf "${VL} Signatures : ${style_values_2}%-${three_col_1_value_width}s${NC}" "$signatures_reg_success_VAL"
printf " : Total Signatures : ${style_values_1}%-${three_col_1_value_width}s${NC}" "$signatures_reg_total_VAL"
closeRow
if [[ "${MITHRIL_SIGNER_ENABLED}" == "Y" ]]; then
# Mithril Signer Section
mithrilSignerVars
printf "${mithrildivider}\n" && ((line++))
get_metric_value() {
local metric_name="$1"
local metric_value
while IFS= read -r line; do
if [[ $line =~ ${metric_name}[[:space:]]+([0-9]+) ]]; then
metric_value="${BASH_REMATCH[1]}"
echo "$metric_value"
return
fi
done <<< "$mithrilSignerMetrics"
}
metrics=(
"runtime_cycle_total_since_startup"
"signer_registration_success_last_epoch"
"signer_registration_success_since_startup"
"signer_registration_total_since_startup"
"signature_registration_success_last_epoch"
"signature_registration_success_since_startup"
"signature_registration_total_since_startup"
)
cycle_total_VAL=$(get_metric_value "runtime_cycle_total_since_startup")
signer_reg_epoch_VAL=$(get_metric_value "signer_registration_success_last_epoch")
signer_reg_success_VAL=$(get_metric_value "signer_registration_success_since_startup")
signer_reg_total_VAL=$(get_metric_value "signer_registration_total_since_startup")
signatures_epoch_VAL=$(get_metric_value "signature_registration_success_last_epoch")
signatures_reg_success_VAL=$(get_metric_value "signature_registration_success_since_startup")
signatures_reg_total_VAL=$(get_metric_value "signature_registration_total_since_startup")
if [[ ${VERBOSE} = "Y" ]]; then
printf "${VL} Status : ${style_values_2}%-${three_col_1_value_width}s${NC}" "$signerServiceStatus"
printf " : Registered Epoch : ${style_values_1}%-${three_col_1_value_width}s${NC}" "$signer_reg_epoch_VAL"
closeRow
printf "${VL} Cycles : ${style_values_1}%-${three_col_1_value_width}s${NC}" "$cycle_total_VAL"
printf " : Signing in Epoch : ${style_values_2}%-${three_col_1_value_width}s${NC}" "$signatures_epoch_VAL"
closeRow
printf "${VL} Signatures : ${style_values_2}%-${three_col_1_value_width}s${NC}" "$signatures_reg_success_VAL"
printf " : Total Signatures : ${style_values_1}%-${three_col_1_value_width}s${NC}" "$signatures_reg_total_VAL"
closeRow
printf "${VL} Registered : ${style_values_1}%-${three_col_1_value_width}s${NC}" "$signer_reg_success_VAL"
printf " : Registered Total : ${style_values_1}%-${three_col_1_value_width}s${NC}" "$signer_reg_total_VAL"
closeRow
else
printf "${VL} Status : ${style_values_2}%-${three_col_1_value_width}s${NC}" "$signerServiceStatus"
printf " : Registered Epoch : ${style_values_1}%-${three_col_1_value_width}s${NC}" "$signer_reg_epoch_VAL"
closeRow
printf "${VL} Cycles : ${style_values_1}%-${three_col_1_value_width}s${NC}" "$cycle_total_VAL"
printf " : Signing in Epoch : ${style_values_2}%-${three_col_1_value_width}s${NC}" "$signatures_epoch_VAL"
closeRow
printf "${VL} Signatures : ${style_values_2}%-${three_col_1_value_width}s${NC}" "$signatures_reg_success_VAL"
printf " : Total Signatures : ${style_values_1}%-${three_col_1_value_width}s${NC}" "$signatures_reg_total_VAL"
closeRow
fi
fi
fi



[[ ${check_peers} = "true" ]] && check_peers=false && show_peers=true && clrScreen && continue

echo "${bdivider}" && ((line++))
Expand Down