feat: script jobs scheduler and manager page for Fortigate, UniFi and Grandstream scripts
This commit is contained in:
@@ -326,3 +326,40 @@ class JobRunResponse(BaseModel):
|
||||
error_summary: Optional[str]
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
# --- Script Jobs Schemas ---
|
||||
class ScriptJobRunResponse(BaseModel):
|
||||
id: int
|
||||
script_job_id: int
|
||||
started_at: datetime
|
||||
completed_at: Optional[datetime]
|
||||
status: str
|
||||
duration_seconds: float
|
||||
log_output: Optional[str]
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
class ScriptJobResponse(BaseModel):
|
||||
id: int
|
||||
name: str
|
||||
script_type: str
|
||||
script_path: str
|
||||
schedule_cron: str
|
||||
is_active: bool
|
||||
created_at: datetime
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
class ScriptJobCreate(BaseModel):
|
||||
name: str
|
||||
script_type: str
|
||||
script_path: str
|
||||
schedule_cron: str
|
||||
is_active: bool = True
|
||||
|
||||
class ScriptJobUpdate(BaseModel):
|
||||
name: Optional[str] = None
|
||||
script_type: Optional[str] = None
|
||||
script_path: Optional[str] = None
|
||||
schedule_cron: Optional[str] = None
|
||||
is_active: Optional[bool] = None
|
||||
|
||||
Reference in New Issue
Block a user