mirror of
https://github.com/norohind/SquadsActivityMonitor.git
synced 2025-04-13 13:27:13 +03:00
Normal index page
This commit is contained in:
parent
68ce518bf8
commit
7a2a9ab969
@ -47,6 +47,8 @@
|
||||
<td><a href="/leaderboard/trade/platform/xbox">TRADE</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<a>In order to access to api, add /api/ to any endpoint</a>
|
||||
<a>In order to access to api, add /api/ prefix to any endpoint url<br>
|
||||
Author contact: a31#6403 (discord), a31@demb.design (email)<br>
|
||||
<a href="https://github.com/norohind/SquadsActivityMonitor">Source code</a></a>
|
||||
</body>
|
||||
</html>
|
18
utils.py
18
utils.py
@ -141,15 +141,6 @@ def _get_bearer() -> str:
|
||||
return bearer
|
||||
|
||||
|
||||
def build_index_page(app: falcon.App, index_path: str) -> None:
|
||||
with open(index_path, 'w', encoding='utf-8') as index_file: # kinda documentation on main page
|
||||
from falcon import inspect
|
||||
app_info = inspect.inspect_app(app)
|
||||
app_info_str = app_info.__str__().replace('\n', '<br>')
|
||||
|
||||
index_file.write(index_template.format(body=app_info_str))
|
||||
|
||||
|
||||
def measure(function: callable):
|
||||
"""
|
||||
Decorator to measure function (method) execution time
|
||||
@ -204,8 +195,13 @@ activity_table_html_template = """<!DOCTYPE HTML>
|
||||
<link type="text/css" rel="stylesheet" href="/js/table_styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="table0div">
|
||||
</div>
|
||||
<div id="table0div">
|
||||
</div>
|
||||
<div id=footer0div>
|
||||
<footer>
|
||||
<a href="/">Main page</a>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>"""
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user