Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit bcc77d22 authored by Kevin Yung's avatar Kevin Yung
Browse files

correction d'erreur sur les changements de states des gateways

parent 33dfbece
{"jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJjaGlycHN0YWNrLWFwcGxpY2F0aW9uLXNlcnZlciIsImV4cCI6MTYxNTM4NzM2NCwiaXNzIjoiY2hpcnBzdGFjay1hcHBsaWNhdGlvbi1zZXJ2ZXIiLCJuYmYiOjE2MTUzMDA5NjQsInN1YiI6InVzZXIiLCJ1c2VybmFtZSI6IkNoaXJwc3RhY2tNb25pdG9yaW5nIn0.H5mO2AL35i-0BK4YBTZTZ_5MHDKqq-7c7HPqexnKQOU"}
\ No newline at end of file
{"jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJjaGlycHN0YWNrLWFwcGxpY2F0aW9uLXNlcnZlciIsImV4cCI6MTYxNTkxMDIxMiwiaXNzIjoiY2hpcnBzdGFjay1hcHBsaWNhdGlvbi1zZXJ2ZXIiLCJuYmYiOjE2MTU4MjM4MTIsInN1YiI6InVzZXIiLCJ1c2VybmFtZSI6IkNoaXJwc3RhY2tNb25pdG9yaW5nIn0.WMcgbg-Mi4QecWM-MkZ4WImwycGyHuH2Rvqj1tXsGPo"}
\ No newline at end of file
......@@ -81,9 +81,11 @@ do
then
if [[ "${state[$i]}" == "active" ]]
then
replacement="<li style="color:green"><a href='https://lns.campusiot.imag.fr/#/organizations/6/gateways/7276ff0039030716'>7276ff0039030716</a>: KER_FEMTO_030716_P307 - (org 6) - 2021-03-07T19:14:43.804084Z</li>"
tmp=$(grep ${id[$i]} < .gateways.html)
replacement=${tmp/"<li>"/"<li style="color:green">"}
else
replacement="<li style="color:red"><a href='https://lns.campusiot.imag.fr/#/organizations/6/gateways/7276ff0039030716'>7276ff0039030716</a>: KER_FEMTO_030716_P307 - (org 6) - 2021-03-07T19:14:43.804084Z</li>"
tmp=$(grep ${id[$i]} < .gateways.html)
replacement=${tmp/"<li>"/"<li style="color:red">"}
fi
sed -i "/${id[$i]}/c $replacement" .gateways.html
fi
......
......@@ -15,5 +15,5 @@ CONTENT_TYPE="Content-type: text/html"
#mail -a "$CONTENT_TYPE" -s "$SUBJECT" -u monitoring $TO <.gateways.html
#mail -a "$CONTENT_TYPE" -s "$SUBJECT" -u monitoring $TO <.devices.html
#mailx -a "$CONTENT_TYPE" -s "$SUBJECT" <.gateways.html "$TO"
mail -s "Test" kevyung24@gmail.com
\ No newline at end of file
mailx -a "$CONTENT_TYPE" -s "$SUBJECT" <.gateways.html "$TO"
#mail -s "Test" kevyung24@gmail.com
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment