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
Sebastian Böhm
Edge-IoT Simulator
Commits
eb8cec42
Commit
eb8cec42
authored
Dec 09, 2021
by
Sebastian Böhm
Browse files
add device info endpoint
parent
37cd6d95
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
eb8cec42
...
...
@@ -142,3 +142,6 @@ dmypy.json
cython_debug/
# End of https://www.toptal.com/developers/gitignore/api/python
# SQLite db
*.db
\ No newline at end of file
edge_iot_simulator/web/app.py
View file @
eb8cec42
import
os
import
json
import
threading
import
logging
...
...
@@ -90,6 +91,10 @@ class WebApp(threading.Thread):
cpu_load_svc
.
delete_cpu_load_job_by_id
(
id
)
return
Response
(
status
=
200
)
@
app
.
route
(
"/device-info"
)
def
get_device_info
():
return
json
.
dumps
({
"device-info"
:
os
.
getenv
(
'MQTT_CLIENT_ID'
)})
return
app
def
run
(
self
):
...
...
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