Add more details to report

This commit is contained in:
Michael Boelen 2016-08-13 11:18:34 +02:00
parent 1ae7028982
commit a928d57804
1 changed files with 10 additions and 1 deletions

View File

@ -138,12 +138,21 @@
echo " ${YELLOW}Suggestions${NORMAL} (${TOTAL_SUGGESTIONS}):"
echo " ${WHITE}----------------------------${NORMAL}"
for SUGGESTION in ${SSUGGESTIONS}; do
SOLUTION=""
SHOWSUGGESTION=`echo ${SUGGESTION} | sed 's/!space!/ /g' | sed 's/^.* Suggestion: //' | sed 's/\[details:\(.*\)\] \[solution:\(.*\)\]//' | sed 's/test://'`
ADDLINK=`echo ${SUGGESTION} | sed 's/!space!/ /g' | sed 's/^.* Suggestion: \(.*\)\[test://' | sed 's/\]\(.*\)]//'`
DETAILS=`echo ${SUGGESTION} | sed 's/!space!/ /g' | sed 's/^.* Suggestion: \(.*\)\[details://' | sed 's/\]\(.*\)]//'`
SUGGESTION_PIECES=$(echo ${SUGGESTION} | sed 's/\[/ [/g')
for PIECE in ${SUGGESTION_PIECES}; do
if [ -z "${SOLUTION}" ]; then
SEARCH=$(echo ${PIECE} | grep "^\[solution:")
if [ $? -eq 0 ]; then SOLUTION=$(echo ${SEARCH} | sed 's/!space!/ /g' | sed 's/solution://' | sed 's/text://' | tr -d '[]'); fi
fi
done
IS_CUSTOM=`echo ${ADDLINK} | grep "^CUST"`
echo " ${YELLOW}*${NORMAL} ${SHOWSUGGESTION}"
if [ ! "${DETAILS}" = "-" ]; then echo " - Details: ${CYAN}${DETAILS}${NORMAL}"; fi
if [ ! "${DETAILS}" = "-" ]; then echo " - Details : ${CYAN}${DETAILS}${NORMAL}"; fi
if [ ${SHOW_REPORT_SOLUTION} -eq 1 -a ! "${SOLUTION}" = "-" ]; then echo " - Solution : ${SOLUTION}"; fi
if [ "${IS_CUSTOM}" = "" ]; then
echo " ${GRAY}${CONTROL_URL_PROTOCOL}://${CONTROL_URL_PREPEND}${ADDLINK}${CONTROL_URL_APPEND}${NORMAL}"
else