Update status.inc

This commit is contained in:
2023-12-06 23:12:56 -06:00
parent b7dadcbdec
commit fac177b8f3

View File

@@ -801,7 +801,6 @@ STATUS_SCANTIMES(){
scantimes_total=0; scansfound=0
for scantime in "${scantimes[@]}"; do
[[ "${scantime}" = *"~"* ]] && scantime=${scantime#*~}
echo ${scantime}
scantimes_total=$(bc <<< "scale=2; ${scantimes_total}+${scantime}")
((scansfound++))
done
@@ -810,12 +809,12 @@ STATUS_SCANTIMES(){
cw=8
average_disp=$(SHOW_TIME ${average} s); c=0; spca=''; spc1=`expr ${cw} - ${#average_disp}`
until [ $c = ${spc1} ]; do spca="${spca} "; c=`expr $c + 1`; done
lastscantime_disp=$(SHOW_TIME ${lastscantime} s); c=0; spcb=''; spc1=`expr ${cw} - ${#lastscantime_disp}`
lastscantime_disp=$(SHOW_TIME ${lastscantime#*~} s); c=0; spcb=''; spc1=`expr ${cw} - ${#lastscantime_disp}`
until [ $c = ${spc1} ]; do spcb="${spcb} "; c=`expr $c + 1`; done
echo -en "\r\033[K"
echo -e "${idsCL[LightCyan]}Average for last '${scansfound}' : ${idsCL[LightGreen]}(${average}s)${spca}${idsCL[Green]}${average_disp}${idsCL[Default]}\n"
echo -e "${idsCL[LightCyan]}Last Scan Time : ${idsCL[LightGreen]}(${lastscantime}s)${spcb}${idsCL[Green]}${lastscantime_disp} ${idsCL[LightCyan]}- $(date -r ${NM_LOGFOLDER}/status-check.scantimes "+%m-%d-%Y %H:%M")${idsCL[Default]}\n"
echo -e "${idsCL[LightCyan]}Last Scan Time : ${idsCL[LightGreen]}(${lastscantime#*~}s)${spcb}${idsCL[Green]}${lastscantime_disp} ${idsCL[LightCyan]}- $(date -r ${NM_LOGFOLDER}/status-check.scantimes "+%m-%d-%Y %H:%M")${idsCL[Default]}\n"
if [ ${scansfound} -le 500 ]; then
echo -en "${idsCL[LightCyan]}List out these scan times? (y/N): ${idsCL[Default]}"
@@ -826,7 +825,12 @@ STATUS_SCANTIMES(){
last_scantimes=($(tail -n ${lastscansnum} ${NM_LOGFOLDER}/status-check.scantimes))
echo -e "${idsCL[LightCyan]}Last ${lastscansnum} Scan Times\n${idsCL[Green]}---------------------------------${idsCL[Default]}"
for scantime in "${last_scantimes[@]}"; do
[[ "${scantime}" = *"~"* ]] && dt=${scantime%~*} && scantime=${scantime#*~}
if [[ "${scantime}" = *"~"* ]]; then
dt=${scantime%~*}
scantime=${scantime#*~}
else
dt=" "
fi
echo -e "${idsCL[White]} ${dt} $(SHOW_TIME ${scantime} s) (${scantime}s)${idsCL[Default]}"
done
fi