diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 0c17e04e..3c376134 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -715,16 +715,22 @@ DOWNLIST(){ else echo -e "${idsCL[LightGreen]}Current List of Items Down...${idsCL[Default]}" DIVIDER false yellow 95 - echo -e "${idsCL[Yellow]}Service/Host Host Down_Time${idsCL[Default]}" + [ "${1}" == "ignore" ] && ignsel=" " || ignsel="" + echo -e "${idsCL[Yellow]}${ignsel}Service/Host Host Down_Time${idsCL[Default]}" DIVIDER false yellow 95 - cw=50; cw2=65 + cw=50; cw2=65; is=1; for downitem in ${DOWN_LIST}; do ditem=${downitem##*/} ditem=${ditem//.down} host=${ditem%%~*} item=${ditem#*~} - + if [ "${1}" == "ignore" ]; then + if [ ${is} -lt 10 ] && ignsel=" ${is})" || ignsel="${is})" + else + ignsel="" + fi + if [[ $ditem == *"~"* ]] && [ "${NM_SERVICE_DESC[${item}]}" != "" ]; then itemname=${NM_SERVICE_DESC[${item}]} elif [[ $ditem == *"~"* ]] && [ "${NM_DOCKER_DESC[${item}]}" != "" ]; then @@ -749,7 +755,7 @@ DOWNLIST(){ c=0; spc2='' spc1=${cw2}-${#itemname}-${#host}-${spc1} until [ $c = ${spc1} ]; do spc2="${spc2} "; c=`expr $c + 1`; done - echo -e "${idsST[Bold]}${idsCL[Red]}${itemname}${spc}${host}${spc2}$(SHOW_TIME ${toterrtime})${idsST[Reset]}${idsCL[Default]}" + echo -e "${ignsel}${idsST[Bold]}${idsCL[Red]}${itemname}${spc}${host}${spc2}$(SHOW_TIME ${toterrtime})${idsST[Reset]}${idsCL[Default]}" DIVIDER false darkGray 90 done fi