remote-desktop-dashboard 2.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. remote_desktop_dashboard-2.0.1/.gitignore +18 -0
  2. remote_desktop_dashboard-2.0.1/LICENSE +21 -0
  3. remote_desktop_dashboard-2.0.1/PKG-INFO +156 -0
  4. remote_desktop_dashboard-2.0.1/README.md +115 -0
  5. remote_desktop_dashboard-2.0.1/alembic/env.py +46 -0
  6. remote_desktop_dashboard-2.0.1/alembic/script.py.mako +25 -0
  7. remote_desktop_dashboard-2.0.1/alembic/versions/001_initial_machines.py +48 -0
  8. remote_desktop_dashboard-2.0.1/alembic/versions/002_machine_locks.py +39 -0
  9. remote_desktop_dashboard-2.0.1/alembic.ini +42 -0
  10. remote_desktop_dashboard-2.0.1/data/machines.example.json +12 -0
  11. remote_desktop_dashboard-2.0.1/pyproject.toml +79 -0
  12. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/__init__.py +3 -0
  13. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/__main__.py +4 -0
  14. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/agent/__init__.py +1 -0
  15. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/agent/cli.py +77 -0
  16. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/agent/monitor.py +294 -0
  17. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/agent/reporter.py +41 -0
  18. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/api/__init__.py +3 -0
  19. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/api/deps.py +16 -0
  20. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/api/routes.py +200 -0
  21. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/api/websocket.py +37 -0
  22. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/cli.py +97 -0
  23. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/config.py +45 -0
  24. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/crud/__init__.py +3 -0
  25. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/crud/lock.py +118 -0
  26. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/crud/machine.py +102 -0
  27. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/database.py +40 -0
  28. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/main.py +54 -0
  29. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/models/__init__.py +3 -0
  30. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/models/machine.py +48 -0
  31. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/schemas/__init__.py +13 -0
  32. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/schemas/machine.py +116 -0
  33. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/services/connection_manager.py +38 -0
  34. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/services/dashboard.py +46 -0
  35. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/services/rdp_launch.py +94 -0
  36. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/static/css/dashboard.css +338 -0
  37. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/static/index.html +45 -0
  38. remote_desktop_dashboard-2.0.1/src/remote_desktop_dashboard/static/js/dashboard.js +403 -0
@@ -0,0 +1,18 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *$py.class
4
+ *.egg-info/
5
+ .eggs/
6
+ dist/
7
+ build/
8
+ *.egg
9
+ .env
10
+ .venv/
11
+ venv/
12
+ atc_dashboard.db
13
+ *.db
14
+ .pytest_cache/
15
+ .coverage
16
+ htmlcov/
17
+ .mypy_cache/
18
+ .ruff_cache/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ATC Operations
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,156 @@
1
+ Metadata-Version: 2.4
2
+ Name: remote-desktop-dashboard
3
+ Version: 2.0.1
4
+ Summary: Remote Desktop Dashboard — monitor machines and connect via Microsoft Windows App
5
+ Project-URL: Homepage, https://github.com/your-org/remote-desktop-dashboard
6
+ Project-URL: Documentation, https://github.com/your-org/remote-desktop-dashboard#readme
7
+ Project-URL: Repository, https://github.com/your-org/remote-desktop-dashboard
8
+ Author: Operations
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Keywords: dashboard,fastapi,monitoring,rdp,remote-desktop,windows
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Web Environment
14
+ Classifier: Framework :: FastAPI
15
+ Classifier: Intended Audience :: System Administrators
16
+ Classifier: Operating System :: Microsoft :: Windows
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: System :: Monitoring
22
+ Requires-Python: >=3.10
23
+ Requires-Dist: alembic>=1.14.0
24
+ Requires-Dist: fastapi>=0.115.0
25
+ Requires-Dist: httpx>=0.28.0
26
+ Requires-Dist: psutil>=6.1.0
27
+ Requires-Dist: pydantic-settings>=2.6.0
28
+ Requires-Dist: pydantic>=2.10.0
29
+ Requires-Dist: python-multipart>=0.0.17
30
+ Requires-Dist: pywin32>=308; sys_platform == 'win32'
31
+ Requires-Dist: sqlalchemy>=2.0.36
32
+ Requires-Dist: uvicorn[standard]>=0.32.0
33
+ Requires-Dist: wmi>=1.5.1; sys_platform == 'win32'
34
+ Provides-Extra: dev
35
+ Requires-Dist: httpx>=0.28.0; extra == 'dev'
36
+ Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
37
+ Requires-Dist: pytest>=8.3.0; extra == 'dev'
38
+ Provides-Extra: postgres
39
+ Requires-Dist: psycopg2-binary>=2.9.10; extra == 'postgres'
40
+ Description-Content-Type: text/markdown
41
+
42
+ # Remote Desktop Dashboard
43
+
44
+ Browser-based dashboard to **monitor** and **connect** to ATC1–ATC10 machines. Replaces the legacy Remote Desktop Connection workflow with live status, machine locking, and one-click access via the [Microsoft Windows App](https://apps.microsoft.com/detail/9N1F85V9T8BN) — **no `.rdp` file download**.
45
+
46
+ ## Features
47
+
48
+ - Live machine status (online/offline, users, MobaXterm, ETGui, cameras, COM tools)
49
+ - **Connect** opens Windows App directly (`ms-rd:` / `rdp://` protocol — credential prompt in Windows)
50
+ - **Machine lock**: when you connect, the machine is reserved under your name; **Release** or auto-timeout frees it
51
+ - WebSocket live dashboard updates
52
+ - Windows monitoring agent on each machine
53
+
54
+ ## Architecture
55
+
56
+ ```
57
+ Browser ──Connect (protocol URI)──► Windows App ──RDP──► ATC machine
58
+ │ ▲
59
+ └── REST + WebSocket ◄──► Dashboard server ◄── agent reports
60
+ ```
61
+
62
+ | Command | Purpose |
63
+ |---------|---------|
64
+ | `remote-desktop-dashboard` | Start server |
65
+ | `rdd-agent` | Windows monitoring agent |
66
+ | `remote-desktop-dashboard-seed` | Add machines to DB |
67
+
68
+ ## Quick start
69
+
70
+ ```powershell
71
+ pip install -e .
72
+ remote-desktop-dashboard-seed --file data\machines.example.json
73
+ remote-desktop-dashboard
74
+ ```
75
+
76
+ Open **http://127.0.0.1:8080/**
77
+
78
+ 1. Enter **Your name** (used for locking).
79
+ 2. Optionally enter **Windows login** (`DOMAIN\user`) — password is entered in Windows App.
80
+ 3. Click **Connect** on a machine.
81
+
82
+ ### Windows App setup
83
+
84
+ 1. Install [Windows App from Microsoft Store](https://apps.microsoft.com/detail/9N1F85V9T8BN).
85
+ 2. Set it as the default app for Remote Desktop / `rdp://` links (Windows Settings → Apps → Default apps).
86
+ 3. When the browser asks to open a link, choose **Windows App** and allow the protocol.
87
+
88
+ ## Machine locking
89
+
90
+ | Action | Behavior |
91
+ |--------|----------|
92
+ | **Connect** | Locks machine under your name, opens Windows App |
93
+ | **Release** | Frees the machine for others |
94
+ | **Heartbeat** | Sent every 60s while you hold the lock |
95
+ | **Auto-release** | After ~7 min without heartbeat (`RDD_LOCK_TIMEOUT_SECONDS` + grace) |
96
+ | **Leave page** | Sends release beacon for your locks |
97
+
98
+ If someone else holds the lock, Connect is disabled and you see **In use: *name***.
99
+
100
+ ## Configuration
101
+
102
+ | Variable | Default | Description |
103
+ |----------|---------|-------------|
104
+ | `RDD_DATABASE_URL` | `sqlite:///./remote_desktop_dashboard.db` | Database |
105
+ | `RDD_HOST` / `RDD_PORT` | `0.0.0.0` / `8080` | Server bind |
106
+ | `RDD_LOCK_TIMEOUT_SECONDS` | `300` | Lock idle timeout |
107
+ | `RDD_USE_WINDOWS_APP` | `true` | Prefer `ms-rd:` over `rdp://` |
108
+ | `RDD_RDP_PORT` | `3389` | RDP port |
109
+ | `RDD_RDP_DEFAULT_DOMAIN` | *(empty)* | Prepended to username |
110
+ | `RDD_MACHINE_NAME` | — | Agent: ATC1…ATC10 |
111
+ | `RDD_SERVER_URL` | `http://127.0.0.1:8080` | Agent target |
112
+
113
+ ## Insert machines (ATC1–ATC10)
114
+
115
+ ```powershell
116
+ copy data\machines.example.json data\machines.json
117
+ # edit hostnames and IPs
118
+ remote-desktop-dashboard-seed --file data\machines.json
119
+ ```
120
+
121
+ ## Agent on each ATC machine
122
+
123
+ ```powershell
124
+ set RDD_MACHINE_NAME=ATC1
125
+ set RDD_SERVER_URL=http://YOUR_SERVER:8080
126
+ rdd-agent --interval 30
127
+ ```
128
+
129
+ ## API (connect & lock)
130
+
131
+ ```http
132
+ POST /api/v1/machines/ATC1/connect
133
+ {"operator": "Alice", "rdp_username": "DOMAIN\\alice", "use_hostname": true}
134
+
135
+ POST /api/v1/machines/ATC1/lock/heartbeat
136
+ {"operator": "Alice"}
137
+
138
+ POST /api/v1/machines/ATC1/lock/release
139
+ {"operator": "Alice"}
140
+ ```
141
+
142
+ Response includes `launch_uri` (Windows App) and `fallback_uri` (`rdp://`).
143
+
144
+ ## Publish to PyPI
145
+
146
+ ```powershell
147
+ pip install build twine
148
+ python -m build
149
+ python -m twine upload dist/*
150
+ pip install remote-desktop-dashboard
151
+ remote-desktop-dashboard
152
+ ```
153
+
154
+ ## License
155
+
156
+ MIT
@@ -0,0 +1,115 @@
1
+ # Remote Desktop Dashboard
2
+
3
+ Browser-based dashboard to **monitor** and **connect** to ATC1–ATC10 machines. Replaces the legacy Remote Desktop Connection workflow with live status, machine locking, and one-click access via the [Microsoft Windows App](https://apps.microsoft.com/detail/9N1F85V9T8BN) — **no `.rdp` file download**.
4
+
5
+ ## Features
6
+
7
+ - Live machine status (online/offline, users, MobaXterm, ETGui, cameras, COM tools)
8
+ - **Connect** opens Windows App directly (`ms-rd:` / `rdp://` protocol — credential prompt in Windows)
9
+ - **Machine lock**: when you connect, the machine is reserved under your name; **Release** or auto-timeout frees it
10
+ - WebSocket live dashboard updates
11
+ - Windows monitoring agent on each machine
12
+
13
+ ## Architecture
14
+
15
+ ```
16
+ Browser ──Connect (protocol URI)──► Windows App ──RDP──► ATC machine
17
+ │ ▲
18
+ └── REST + WebSocket ◄──► Dashboard server ◄── agent reports
19
+ ```
20
+
21
+ | Command | Purpose |
22
+ |---------|---------|
23
+ | `remote-desktop-dashboard` | Start server |
24
+ | `rdd-agent` | Windows monitoring agent |
25
+ | `remote-desktop-dashboard-seed` | Add machines to DB |
26
+
27
+ ## Quick start
28
+
29
+ ```powershell
30
+ pip install -e .
31
+ remote-desktop-dashboard-seed --file data\machines.example.json
32
+ remote-desktop-dashboard
33
+ ```
34
+
35
+ Open **http://127.0.0.1:8080/**
36
+
37
+ 1. Enter **Your name** (used for locking).
38
+ 2. Optionally enter **Windows login** (`DOMAIN\user`) — password is entered in Windows App.
39
+ 3. Click **Connect** on a machine.
40
+
41
+ ### Windows App setup
42
+
43
+ 1. Install [Windows App from Microsoft Store](https://apps.microsoft.com/detail/9N1F85V9T8BN).
44
+ 2. Set it as the default app for Remote Desktop / `rdp://` links (Windows Settings → Apps → Default apps).
45
+ 3. When the browser asks to open a link, choose **Windows App** and allow the protocol.
46
+
47
+ ## Machine locking
48
+
49
+ | Action | Behavior |
50
+ |--------|----------|
51
+ | **Connect** | Locks machine under your name, opens Windows App |
52
+ | **Release** | Frees the machine for others |
53
+ | **Heartbeat** | Sent every 60s while you hold the lock |
54
+ | **Auto-release** | After ~7 min without heartbeat (`RDD_LOCK_TIMEOUT_SECONDS` + grace) |
55
+ | **Leave page** | Sends release beacon for your locks |
56
+
57
+ If someone else holds the lock, Connect is disabled and you see **In use: *name***.
58
+
59
+ ## Configuration
60
+
61
+ | Variable | Default | Description |
62
+ |----------|---------|-------------|
63
+ | `RDD_DATABASE_URL` | `sqlite:///./remote_desktop_dashboard.db` | Database |
64
+ | `RDD_HOST` / `RDD_PORT` | `0.0.0.0` / `8080` | Server bind |
65
+ | `RDD_LOCK_TIMEOUT_SECONDS` | `300` | Lock idle timeout |
66
+ | `RDD_USE_WINDOWS_APP` | `true` | Prefer `ms-rd:` over `rdp://` |
67
+ | `RDD_RDP_PORT` | `3389` | RDP port |
68
+ | `RDD_RDP_DEFAULT_DOMAIN` | *(empty)* | Prepended to username |
69
+ | `RDD_MACHINE_NAME` | — | Agent: ATC1…ATC10 |
70
+ | `RDD_SERVER_URL` | `http://127.0.0.1:8080` | Agent target |
71
+
72
+ ## Insert machines (ATC1–ATC10)
73
+
74
+ ```powershell
75
+ copy data\machines.example.json data\machines.json
76
+ # edit hostnames and IPs
77
+ remote-desktop-dashboard-seed --file data\machines.json
78
+ ```
79
+
80
+ ## Agent on each ATC machine
81
+
82
+ ```powershell
83
+ set RDD_MACHINE_NAME=ATC1
84
+ set RDD_SERVER_URL=http://YOUR_SERVER:8080
85
+ rdd-agent --interval 30
86
+ ```
87
+
88
+ ## API (connect & lock)
89
+
90
+ ```http
91
+ POST /api/v1/machines/ATC1/connect
92
+ {"operator": "Alice", "rdp_username": "DOMAIN\\alice", "use_hostname": true}
93
+
94
+ POST /api/v1/machines/ATC1/lock/heartbeat
95
+ {"operator": "Alice"}
96
+
97
+ POST /api/v1/machines/ATC1/lock/release
98
+ {"operator": "Alice"}
99
+ ```
100
+
101
+ Response includes `launch_uri` (Windows App) and `fallback_uri` (`rdp://`).
102
+
103
+ ## Publish to PyPI
104
+
105
+ ```powershell
106
+ pip install build twine
107
+ python -m build
108
+ python -m twine upload dist/*
109
+ pip install remote-desktop-dashboard
110
+ remote-desktop-dashboard
111
+ ```
112
+
113
+ ## License
114
+
115
+ MIT
@@ -0,0 +1,46 @@
1
+ from logging.config import fileConfig
2
+
3
+ from alembic import context
4
+ from sqlalchemy import engine_from_config, pool
5
+
6
+ from remote_desktop_dashboard.config import get_settings
7
+ from remote_desktop_dashboard.database import Base
8
+ from remote_desktop_dashboard import models # noqa: F401
9
+
10
+ config = context.config
11
+ if config.config_file_name is not None:
12
+ fileConfig(config.config_file_name)
13
+
14
+ target_metadata = Base.metadata
15
+ settings = get_settings()
16
+ config.set_main_option("sqlalchemy.url", settings.database_url)
17
+
18
+
19
+ def run_migrations_offline() -> None:
20
+ url = config.get_main_option("sqlalchemy.url")
21
+ context.configure(
22
+ url=url,
23
+ target_metadata=target_metadata,
24
+ literal_binds=True,
25
+ dialect_opts={"paramstyle": "named"},
26
+ )
27
+ with context.begin_transaction():
28
+ context.run_migrations()
29
+
30
+
31
+ def run_migrations_online() -> None:
32
+ connectable = engine_from_config(
33
+ config.get_section(config.config_ini_section, {}),
34
+ prefix="sqlalchemy.",
35
+ poolclass=pool.NullPool,
36
+ )
37
+ with connectable.connect() as connection:
38
+ context.configure(connection=connection, target_metadata=target_metadata)
39
+ with context.begin_transaction():
40
+ context.run_migrations()
41
+
42
+
43
+ if context.is_offline_mode():
44
+ run_migrations_offline()
45
+ else:
46
+ run_migrations_online()
@@ -0,0 +1,25 @@
1
+ """${message}
2
+
3
+ Revision ID: ${up_revision}
4
+ Revises: ${down_revision | comma,n}
5
+ Create Date: ${create_date}
6
+
7
+ """
8
+ from typing import Sequence, Union
9
+
10
+ from alembic import op
11
+ import sqlalchemy as sa
12
+ ${imports if imports else ""}
13
+
14
+ revision: str = ${repr(up_revision)}
15
+ down_revision: Union[str, None] = ${repr(down_revision)}
16
+ branch_labels: Union[str, Sequence[str], None] = ${repr(branch_labels)}
17
+ depends_on: Union[str, Sequence[str], None] = ${repr(depends_on)}
18
+
19
+
20
+ def upgrade() -> None:
21
+ ${upgrades if upgrades else "pass"}
22
+
23
+
24
+ def downgrade() -> None:
25
+ ${downgrades if downgrades else "pass"}
@@ -0,0 +1,48 @@
1
+ """Initial machines table
2
+
3
+ Revision ID: 001
4
+ Revises:
5
+ Create Date: 2026-05-15
6
+
7
+ """
8
+
9
+ from typing import Sequence, Union
10
+
11
+ import sqlalchemy as sa
12
+ from alembic import op
13
+
14
+ revision: str = "001"
15
+ down_revision: Union[str, None] = None
16
+ branch_labels: Union[str, Sequence[str], None] = None
17
+ depends_on: Union[str, Sequence[str], None] = None
18
+
19
+
20
+ def upgrade() -> None:
21
+ op.create_table(
22
+ "machines",
23
+ sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
24
+ sa.Column("name", sa.String(length=32), nullable=False),
25
+ sa.Column("hostname", sa.String(length=255), nullable=False),
26
+ sa.Column("ip_address", sa.String(length=45), nullable=False),
27
+ sa.Column("is_online", sa.Boolean(), nullable=False, server_default="0"),
28
+ sa.Column("last_seen", sa.DateTime(timezone=True), nullable=True),
29
+ sa.Column("local_user", sa.String(length=128), nullable=True),
30
+ sa.Column("rdp_users", sa.Text(), nullable=False, server_default="[]"),
31
+ sa.Column("windows_app_users", sa.Text(), nullable=False, server_default="[]"),
32
+ sa.Column("mobaxterm_user", sa.String(length=128), nullable=True),
33
+ sa.Column("com_port_user", sa.String(length=128), nullable=True),
34
+ sa.Column("etgui_user", sa.String(length=128), nullable=True),
35
+ sa.Column("camera_user", sa.String(length=128), nullable=True),
36
+ sa.Column("camera_tools", sa.Text(), nullable=False, server_default="[]"),
37
+ sa.Column("agent_version", sa.String(length=32), nullable=True),
38
+ sa.Column("raw_report", sa.Text(), nullable=True),
39
+ sa.Column("created_at", sa.DateTime(timezone=True), server_default=sa.text("(CURRENT_TIMESTAMP)"), nullable=False),
40
+ sa.Column("updated_at", sa.DateTime(timezone=True), server_default=sa.text("(CURRENT_TIMESTAMP)"), nullable=False),
41
+ sa.PrimaryKeyConstraint("id"),
42
+ )
43
+ op.create_index(op.f("ix_machines_name"), "machines", ["name"], unique=True)
44
+
45
+
46
+ def downgrade() -> None:
47
+ op.drop_index(op.f("ix_machines_name"), table_name="machines")
48
+ op.drop_table("machines")
@@ -0,0 +1,39 @@
1
+ """Add dashboard session lock columns
2
+
3
+ Revision ID: 002
4
+ Revises: 001
5
+ Create Date: 2026-05-15
6
+
7
+ """
8
+
9
+ from typing import Sequence, Union
10
+
11
+ import sqlalchemy as sa
12
+ from alembic import op
13
+
14
+ revision: str = "002"
15
+ down_revision: Union[str, None] = "001"
16
+ branch_labels: Union[str, Sequence[str], None] = None
17
+ depends_on: Union[str, Sequence[str], None] = None
18
+
19
+
20
+ def upgrade() -> None:
21
+ with op.batch_alter_table("machines") as batch_op:
22
+ batch_op.add_column(sa.Column("locked_by", sa.String(length=128), nullable=True))
23
+ batch_op.add_column(sa.Column("locked_at", sa.DateTime(timezone=True), nullable=True))
24
+ batch_op.add_column(
25
+ sa.Column("lock_heartbeat_at", sa.DateTime(timezone=True), nullable=True)
26
+ )
27
+ batch_op.add_column(
28
+ sa.Column("lock_rdp_username", sa.String(length=256), nullable=True)
29
+ )
30
+ batch_op.create_index("ix_machines_locked_by", ["locked_by"], unique=False)
31
+
32
+
33
+ def downgrade() -> None:
34
+ with op.batch_alter_table("machines") as batch_op:
35
+ batch_op.drop_index("ix_machines_locked_by")
36
+ batch_op.drop_column("lock_rdp_username")
37
+ batch_op.drop_column("lock_heartbeat_at")
38
+ batch_op.drop_column("locked_at")
39
+ batch_op.drop_column("locked_by")
@@ -0,0 +1,42 @@
1
+ [alembic]
2
+ script_location = alembic
3
+ prepend_sys_path = .
4
+ version_path_separator = os
5
+
6
+ sqlalchemy.url = sqlite:///./remote_desktop_dashboard.db
7
+
8
+ [post_write_hooks]
9
+
10
+ [loggers]
11
+ keys = root,sqlalchemy,alembic
12
+
13
+ [handlers]
14
+ keys = console
15
+
16
+ [formatters]
17
+ keys = generic
18
+
19
+ [logger_root]
20
+ level = WARN
21
+ handlers = console
22
+ qualname =
23
+
24
+ [logger_sqlalchemy]
25
+ level = WARN
26
+ handlers =
27
+ qualname = sqlalchemy.engine
28
+
29
+ [logger_alembic]
30
+ level = INFO
31
+ handlers =
32
+ qualname = alembic
33
+
34
+ [handler_console]
35
+ class = StreamHandler
36
+ args = (sys.stderr,)
37
+ level = NOTSET
38
+ formatter = generic
39
+
40
+ [formatter_generic]
41
+ format = %(levelname)-5.5s [%(name)s] %(message)s
42
+ datefmt = %H:%M:%S
@@ -0,0 +1,12 @@
1
+ [
2
+ {"name": "ATC1", "hostname": "atc1.example.local", "ip_address": "192.168.1.101"},
3
+ {"name": "ATC2", "hostname": "atc2.example.local", "ip_address": "192.168.1.102"},
4
+ {"name": "ATC3", "hostname": "atc3.example.local", "ip_address": "192.168.1.103"},
5
+ {"name": "ATC4", "hostname": "atc4.example.local", "ip_address": "192.168.1.104"},
6
+ {"name": "ATC5", "hostname": "atc5.example.local", "ip_address": "192.168.1.105"},
7
+ {"name": "ATC6", "hostname": "atc6.example.local", "ip_address": "192.168.1.106"},
8
+ {"name": "ATC7", "hostname": "atc7.example.local", "ip_address": "192.168.1.107"},
9
+ {"name": "ATC8", "hostname": "atc8.example.local", "ip_address": "192.168.1.108"},
10
+ {"name": "ATC9", "hostname": "atc9.example.local", "ip_address": "192.168.1.109"},
11
+ {"name": "ATC10", "hostname": "atc10.example.local", "ip_address": "192.168.1.110"}
12
+ ]
@@ -0,0 +1,79 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "remote-desktop-dashboard"
7
+ version = "2.0.1"
8
+ description = "Remote Desktop Dashboard — monitor machines and connect via Microsoft Windows App"
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ requires-python = ">=3.10"
12
+ authors = [
13
+ { name = "Operations" },
14
+ ]
15
+ keywords = ["remote-desktop", "dashboard", "monitoring", "windows", "fastapi", "rdp"]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Environment :: Web Environment",
19
+ "Framework :: FastAPI",
20
+ "Intended Audience :: System Administrators",
21
+ "Operating System :: Microsoft :: Windows",
22
+ "Programming Language :: Python :: 3",
23
+ "Programming Language :: Python :: 3.10",
24
+ "Programming Language :: Python :: 3.11",
25
+ "Programming Language :: Python :: 3.12",
26
+ "Topic :: System :: Monitoring",
27
+ ]
28
+ dependencies = [
29
+ "fastapi>=0.115.0",
30
+ "uvicorn[standard]>=0.32.0",
31
+ "sqlalchemy>=2.0.36",
32
+ "alembic>=1.14.0",
33
+ "pydantic>=2.10.0",
34
+ "pydantic-settings>=2.6.0",
35
+ "python-multipart>=0.0.17",
36
+ "httpx>=0.28.0",
37
+ "psutil>=6.1.0",
38
+ "pywin32>=308; sys_platform == 'win32'",
39
+ "wmi>=1.5.1; sys_platform == 'win32'",
40
+ ]
41
+
42
+ [project.optional-dependencies]
43
+ postgres = ["psycopg2-binary>=2.9.10"]
44
+ dev = [
45
+ "pytest>=8.3.0",
46
+ "pytest-asyncio>=0.24.0",
47
+ "httpx>=0.28.0",
48
+ ]
49
+
50
+ [project.scripts]
51
+ remote-desktop-dashboard = "remote_desktop_dashboard.cli:run_server"
52
+ rdd-agent = "remote_desktop_dashboard.agent.cli:run_agent"
53
+ remote-desktop-dashboard-seed = "remote_desktop_dashboard.cli:seed_machines"
54
+
55
+ [project.urls]
56
+ Homepage = "https://github.com/your-org/remote-desktop-dashboard"
57
+ Documentation = "https://github.com/your-org/remote-desktop-dashboard#readme"
58
+ Repository = "https://github.com/your-org/remote-desktop-dashboard"
59
+
60
+ [tool.hatch.metadata]
61
+ allow-ambiguous-licenses = true
62
+
63
+ [tool.hatch.build.targets.wheel]
64
+ packages = ["src/remote_desktop_dashboard"]
65
+ core-metadata-version = "2.3"
66
+
67
+ [tool.hatch.build.targets.sdist]
68
+ only-include = [
69
+ "src/remote_desktop_dashboard",
70
+ "alembic",
71
+ "alembic.ini",
72
+ "README.md",
73
+ "LICENSE",
74
+ "data",
75
+ ]
76
+
77
+ [tool.pytest.ini_options]
78
+ asyncio_mode = "auto"
79
+ testpaths = ["tests"]
@@ -0,0 +1,3 @@
1
+ """Remote Desktop Dashboard — monitor and connect to machines via Windows App."""
2
+
3
+ __version__ = "2.0.1"
@@ -0,0 +1,4 @@
1
+ from remote_desktop_dashboard.cli import run_server
2
+
3
+ if __name__ == "__main__":
4
+ run_server()
@@ -0,0 +1 @@
1
+ """Windows monitoring agent for ATC machines."""