add video page

This commit is contained in:
2026-08-07 20:03:20 +05:30
parent d4847579e6
commit 296d6928ca
5 changed files with 72 additions and 5 deletions
Generated
+36 -1
View File
@@ -5,7 +5,7 @@
groups = ["default"]
strategy = ["inherit_metadata"]
lock_version = "4.5.0"
content_hash = "sha256:f61adc0c5e82bcf9e3b6ab15b27f0cb43326bd156b9b283d737db17585811f15"
content_hash = "sha256:f90b6c2a9829463907f3571b52fbf1ab6e3b3b2b6383c80226e43b0447e73104"
[[metadata.targets]]
requires_python = "==3.14.*"
@@ -254,6 +254,41 @@ files = [
{file = "pandas-3.0.3.tar.gz", hash = "sha256:696a4a00a2a2a35d4e5deb3fc946641b96c944f02230e4f76137fe35d806c4fc"},
]
[[package]]
name = "pillow"
version = "12.2.0"
requires_python = ">=3.10"
summary = "Python Imaging Library (fork)"
groups = ["default"]
files = [
{file = "pillow-12.2.0-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:3adc9215e8be0448ed6e814966ecf3d9952f0ea40eb14e89a102b87f450660d8"},
{file = "pillow-12.2.0-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:6a9adfc6d24b10f89588096364cc726174118c62130c817c2837c60cf08a392b"},
{file = "pillow-12.2.0-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:6a6e67ea2e6feda684ed370f9a1c52e7a243631c025ba42149a2cc5934dec295"},
{file = "pillow-12.2.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:2bb4a8d594eacdfc59d9e5ad972aa8afdd48d584ffd5f13a937a664c3e7db0ed"},
{file = "pillow-12.2.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:80b2da48193b2f33ed0c32c38140f9d3186583ce7d516526d462645fd98660ae"},
{file = "pillow-12.2.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:22db17c68434de69d8ecfc2fe821569195c0c373b25cccb9cbdacf2c6e53c601"},
{file = "pillow-12.2.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:7b14cc0106cd9aecda615dd6903840a058b4700fcb817687d0ee4fc8b6e389be"},
{file = "pillow-12.2.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8cbeb542b2ebc6fcdacabf8aca8c1a97c9b3ad3927d46b8723f9d4f033288a0f"},
{file = "pillow-12.2.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4bfd07bc812fbd20395212969e41931001fd59eb55a60658b0e5710872e95286"},
{file = "pillow-12.2.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:9aba9a17b623ef750a4d11b742cbafffeb48a869821252b30ee21b5e91392c50"},
{file = "pillow-12.2.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:deede7c263feb25dba4e82ea23058a235dcc2fe1f6021025dc71f2b618e26104"},
{file = "pillow-12.2.0-cp314-cp314-win32.whl", hash = "sha256:632ff19b2778e43162304d50da0181ce24ac5bb8180122cbe1bf4673428328c7"},
{file = "pillow-12.2.0-cp314-cp314-win_amd64.whl", hash = "sha256:4e6c62e9d237e9b65fac06857d511e90d8461a32adcc1b9065ea0c0fa3a28150"},
{file = "pillow-12.2.0-cp314-cp314-win_arm64.whl", hash = "sha256:b1c1fbd8a5a1af3412a0810d060a78b5136ec0836c8a4ef9aa11807f2a22f4e1"},
{file = "pillow-12.2.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:57850958fe9c751670e49b2cecf6294acc99e562531f4bd317fa5ddee2068463"},
{file = "pillow-12.2.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:d5d38f1411c0ed9f97bcb49b7bd59b6b7c314e0e27420e34d99d844b9ce3b6f3"},
{file = "pillow-12.2.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:5c0a9f29ca8e79f09de89293f82fc9b0270bb4af1d58bc98f540cc4aedf03166"},
{file = "pillow-12.2.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1610dd6c61621ae1cf811bef44d77e149ce3f7b95afe66a4512f8c59f25d9ebe"},
{file = "pillow-12.2.0-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0a34329707af4f73cf1782a36cd2289c0368880654a2c11f027bcee9052d35dd"},
{file = "pillow-12.2.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8e9c4f5b3c546fa3458a29ab22646c1c6c787ea8f5ef51300e5a60300736905e"},
{file = "pillow-12.2.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:fb043ee2f06b41473269765c2feae53fc2e2fbf96e5e22ca94fb5ad677856f06"},
{file = "pillow-12.2.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:f278f034eb75b4e8a13a54a876cc4a5ab39173d2cdd93a638e1b467fc545ac43"},
{file = "pillow-12.2.0-cp314-cp314t-win32.whl", hash = "sha256:6bb77b2dcb06b20f9f4b4a8454caa581cd4dd0643a08bacf821216a16d9c8354"},
{file = "pillow-12.2.0-cp314-cp314t-win_amd64.whl", hash = "sha256:6562ace0d3fb5f20ed7290f1f929cae41b25ae29528f2af1722966a0a02e2aa1"},
{file = "pillow-12.2.0-cp314-cp314t-win_arm64.whl", hash = "sha256:aa88ccfe4e32d362816319ed727a004423aab09c5cea43c01a4b435643fa34eb"},
{file = "pillow-12.2.0.tar.gz", hash = "sha256:a830b1a40919539d07806aa58e1b114df53ddd43213d9c8b75847eee6c0182b5"},
]
[[package]]
name = "pysocks"
version = "1.7.1"
+1 -1
View File
@@ -5,7 +5,7 @@ description = "Default template for PDM package"
authors = [
{name = "Alexander Rossmanith", email = ""},
]
dependencies = ["reolinkapi>=0.4.1", "pandas>=3.0.3", "flask>=3.1.3", "python-dotenv>=1.2.2"]
dependencies = ["reolinkapi>=0.4.1", "pandas>=3.0.3", "flask>=3.1.3", "python-dotenv>=1.2.2", "Pillow>=12.2.0"]
requires-python = "==3.14.*"
readme = "README.md"
license = {text = "MIT"}
+8
View File
@@ -48,6 +48,14 @@ def time() -> str:
return render_template("dashboard.html", current_page="time")
@app.route("/video")
def video() -> str:
"""
Render the video dashboard page.
"""
return render_template("video.html", current_page="video")
@app.route("/api/cameras")
def api_cameras() -> Response:
"""
+4 -3
View File
@@ -11,9 +11,10 @@
<body class="container">
<h1>Reocon Camera Dashboard</h1>
<nav class="dashboard-nav nav nav-pills nav-fill">
<a href="/" class="nav-link {% if current_page == 'home' %}active{% endif %}" id="home-tab2" data-bs-toggle="tab" type="button" role="tab" aria-selected="{{ 'true' if current_page == 'home' else 'false' }}">Home</a>
<a href="/network" class="nav-link {% if current_page == 'network' %}active{% endif %}" id="profile-tab2" data-bs-toggle="tab" type="button" role="tab" aria-selected="{{ 'true' if current_page == 'network' else 'false' }}">Network</a>
<a href="/time" class="nav-link {% if current_page == 'time' %}active{% endif %}" id="contact-tab2" data-bs-toggle="tab" type="button" role="tab" aria-selected="{{ 'true' if current_page == 'time' else 'false' }}">Time</a>
<a href="/" class="nav-link {% if current_page == 'home' %}active{% endif %}" data-bs-toggle="tab" type="button" role="tab" aria-selected="{{ 'true' if current_page == 'home' else 'false' }}">Home</a>
<a href="/network" class="nav-link {% if current_page == 'network' %}active{% endif %}" data-bs-toggle="tab" type="button" role="tab" aria-selected="{{ 'true' if current_page == 'network' else 'false' }}">Network</a>
<a href="/time" class="nav-link {% if current_page == 'time' %}active{% endif %}" data-bs-toggle="tab" type="button" role="tab" aria-selected="{{ 'true' if current_page == 'time' else 'false' }}">Time</a>
<a href="/video" class="nav-link {% if current_page == 'video' %}active{% endif %}" data-bs-toggle="tab" type="button" role="tab" aria-selected="{{ 'true' if current_page == 'video' else 'false' }}">Video</a>
</nav>
<div id="loading-status" class="alert alert-info py-2 mb-3" role="status">
+23
View File
@@ -0,0 +1,23 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Reocon Camera Dashboard</title>
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="{{ url_for('static', filename='dashboard.css') }}">
</head>
<body class="container">
<h1>Reocon Camera Dashboard</h1>
<nav class="dashboard-nav nav nav-pills nav-fill">
<a href="/" class="nav-link {% if current_page == 'home' %}active{% endif %}" data-bs-toggle="tab" type="button" role="tab" aria-selected="{{ 'true' if current_page == 'home' else 'false' }}">Home</a>
<a href="/network" class="nav-link {% if current_page == 'network' %}active{% endif %}" data-bs-toggle="tab" type="button" role="tab" aria-selected="{{ 'true' if current_page == 'network' else 'false' }}">Network</a>
<a href="/time" class="nav-link {% if current_page == 'time' %}active{% endif %}" data-bs-toggle="tab" type="button" role="tab" aria-selected="{{ 'true' if current_page == 'time' else 'false' }}">Time</a>
<a href="/video" class="nav-link {% if current_page == 'video' %}active{% endif %}" data-bs-toggle="tab" type="button" role="tab" aria-selected="{{ 'true' if current_page == 'video' else 'false' }}">Video</a>
</nav>
<script>
const currentPage = "{{ current_page }}";
</script>
</body>
</html>