mirror of
https://github.com/simon987/sist2.git
synced 2025-12-13 15:29:04 +00:00
Add sist2-admin, update Dockerfile & docker-compose
This commit is contained in:
29
sist2-admin/sist2_admin/web.py
Normal file
29
sist2-admin/sist2_admin/web.py
Normal file
@@ -0,0 +1,29 @@
|
||||
import os.path
|
||||
from typing import List
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from sist2 import WebOptions
|
||||
|
||||
|
||||
class Sist2Frontend(BaseModel):
|
||||
name: str
|
||||
jobs: List[str]
|
||||
web_options: WebOptions
|
||||
running: bool = False
|
||||
|
||||
auto_start: bool = False
|
||||
enable_monitoring: bool = True
|
||||
extra_query_args: str = ""
|
||||
custom_url: str = None
|
||||
|
||||
def get_log_path(self, log_folder: str):
|
||||
return os.path.join(log_folder, f"frontend-{self.name}.log")
|
||||
|
||||
@staticmethod
|
||||
def create_default(name: str):
|
||||
return Sist2Frontend(
|
||||
name=name,
|
||||
web_options=WebOptions(),
|
||||
jobs=[]
|
||||
)
|
||||
Reference in New Issue
Block a user