Pass username/port to initial push monitor deployment
All checks were successful
Build and Push Container / build (push) Successful in 30s

- Update create_from_suggestion to accept username and port
- Pass scan's username/port when creating suggested monitors
- Fixes first deploy using wrong username

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Debian
2026-01-05 10:13:18 +00:00
parent 6865f3c9a4
commit 7ecb6e396e
2 changed files with 13 additions and 2 deletions

View File

@@ -153,7 +153,13 @@ class MonitorService:
self.created_monitors.extend(created)
return created
def create_from_suggestion(self, suggestion: MonitorSuggestion, hostname: str) -> dict:
def create_from_suggestion(
self,
suggestion: MonitorSuggestion,
hostname: str,
username: str = "root",
port: int = 22,
) -> dict:
"""
Create a monitor from a Claude suggestion.
In production mode, this executes automatically.
@@ -208,6 +214,8 @@ class MonitorService:
push_token=push_token,
monitor_id=monitor_id,
interval_minutes=max(1, suggestion.interval // 60),
username=username,
port=port,
)
response["deployment"] = deploy_result
else: