Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Projets-INFO4
20-21
18
chirpstack-monitoring
Commits
f24a78af
Commit
f24a78af
authored
Apr 06, 2021
by
Antoine Blanquet
Browse files
Update generate_devices_reports separating with get_devices
parent
906b582b
Changes
3
Hide whitespace changes
Inline
Side-by-side
reports/generate_devices_report.sh
0 → 100755
View file @
f24a78af
#!/bin/bash
# -------------------------------------------------
# Description: Generate HTML report of devices
# List Command: x
# Usage: runned by get_devices.sh
# Create by: CampusIoT Dev Team, 2021 - Copyright (C) CampusIoT, - All Rights Reserved
# -------------------------------------------------
# Milestone: Version 2021
# -------------------------------------------------
# Bug:
# -------------------------------------------------
# DATA REPOSITORY
DATA_DEV_FOLDER
=
"data/devices/"
DATA_HTML_FOLDER
=
"data/generated_files/"
devices_html
=
"
${
DATA_HTML_FOLDER
}
.devices.html"
echo
'<html><head><title>CampusIoT LNS :: Devices</title></head><body style="font-family:verdana;"><h1>CampusIoT LNS :: Devices</h1>'
>
${
devices_html
}
TODAY
=
$(
date
+
"%Y-%m-%d"
)
echo
'<p>generated at '
>>
${
devices_html
}
date
+
"%Y-%m-%d %T %Z"
>>
${
devices_html
}
echo
' - '
>>
${
devices_html
}
TZ
=
GMT
date
+
"%Y-%m-%d %T %Z"
>>
${
devices_html
}
echo
'</p>'
>>
${
devices_html
}
echo
'<h2>Active devices</h2>'
>>
${
devices_html
}
jq
--raw-output
-f
devices_to_html.jq
${
DATA_DEV_FOLDER
}
.devices.json |
grep
$TODAY
>>
${
devices_html
}
echo
'<h2>Passive devices</h2>'
>>
${
devices_html
}
jq
--raw-output
-f
devices_to_html.jq
${
DATA_DEV_FOLDER
}
.devices.json |
grep
-v
$TODAY
>>
${
devices_html
}
echo
'</body></html>'
>>
${
devices_html
}
\ No newline at end of file
reports/generate_gateways_report.sh
View file @
f24a78af
...
...
@@ -6,7 +6,7 @@
# Usage: runned by get_gateways.sh
# Create by: CampusIoT Dev Team, 2021 - Copyright (C) CampusIoT, - All Rights Reserved
# -------------------------------------------------
#
Version: 1.0
#
Milestone: Version 2021
# -------------------------------------------------
# Bug:
# -------------------------------------------------
...
...
reports/get_devices.sh
View file @
f24a78af
...
...
@@ -104,26 +104,10 @@ sed -i "/"totalCount"/c $replacement" ${DATA_DEV_FOLDER}.devices.json
# --header "$AUTH" ${URL}'/api/devices?limit=9999&offset=0' \
# > .devices.json
echo
"generate devices.html"
./generate_devices_report.sh
$TODAY
echo
'<html><head><title>CampusIoT LNS :: Devices</title></head><body style="font-family:verdana;"><h1>CampusIoT LNS :: Devices</h1>'
>
${
devices_html
}
TODAY
=
$(
date
+
"%Y-%m-%d"
)
echo
'<p>generated at '
>>
${
devices_html
}
date
+
"%Y-%m-%d %T %Z"
>>
${
devices_html
}
echo
' - '
>>
${
devices_html
}
TZ
=
GMT
date
+
"%Y-%m-%d %T %Z"
>>
${
devices_html
}
echo
'</p>'
>>
${
devices_html
}
echo
'<h2>Active devices</h2>'
>>
${
devices_html
}
jq
--raw-output
-f
devices_to_html.jq
${
DATA_DEV_FOLDER
}
.devices.json |
grep
$TODAY
>>
${
devices_html
}
echo
'<h2>Passive devices</h2>'
>>
${
devices_html
}
jq
--raw-output
-f
devices_to_html.jq
${
DATA_DEV_FOLDER
}
.devices.json |
grep
-v
$TODAY
>>
${
devices_html
}
echo
'</body></html>'
>>
${
devices_html
}
./get_id_devices_change.sh
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment