2023-04-02 11:09:43 +02:00
|
|
|
from fastapi import HTTPException, status
|
|
|
|
|
|
2022-10-03 20:22:00 +02:00
|
|
|
from app.apps.impl.apps_base import AppsBase
|
2022-09-10 22:14:37 +02:00
|
|
|
|
|
|
|
|
|
2023-04-02 11:09:43 +02:00
|
|
|
class _NotImplemented(HTTPException):
|
|
|
|
|
def __init__(self):
|
|
|
|
|
super().__init__(
|
|
|
|
|
status_code=status.HTTP_501_NOT_IMPLEMENTED,
|
|
|
|
|
detail="Not available in native python mode.",
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
2022-09-11 18:32:39 +02:00
|
|
|
class NativePythonApps(AppsBase):
|
|
|
|
|
async def get_app_status_single(self, app_id: str):
|
2023-04-02 11:09:43 +02:00
|
|
|
raise _NotImplemented()
|
2022-09-11 18:32:39 +02:00
|
|
|
|
|
|
|
|
async def get_app_status(self):
|
2025-02-16 20:35:21 +01:00
|
|
|
# TODO: revert me before merge to main
|
|
|
|
|
return [
|
|
|
|
|
{
|
|
|
|
|
"id": "btcpayserver",
|
|
|
|
|
"version": "v1.12.5",
|
|
|
|
|
"installed": False,
|
|
|
|
|
"status": "offline",
|
|
|
|
|
"error": "",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"id": "lnbits",
|
|
|
|
|
"version": "0.11.3",
|
|
|
|
|
"installed": False,
|
|
|
|
|
"status": "offline",
|
|
|
|
|
"error": "",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"id": "rtl",
|
|
|
|
|
"version": "v0.14.1",
|
|
|
|
|
"installed": False,
|
|
|
|
|
"status": "offline",
|
|
|
|
|
"error": "",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"id": "electrs",
|
|
|
|
|
"installed": True,
|
|
|
|
|
"configured": False,
|
|
|
|
|
"status": "online",
|
|
|
|
|
"localIP": "",
|
|
|
|
|
"httpPort": "",
|
|
|
|
|
"httpsPort": "",
|
|
|
|
|
"httpsForced": False,
|
|
|
|
|
"httpsSelfsigned": False,
|
|
|
|
|
"hiddenService": "",
|
|
|
|
|
"address": "http://:",
|
|
|
|
|
"authMethod": "none",
|
|
|
|
|
"details": {},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"id": "btc-rpc-explorer",
|
|
|
|
|
"version": "v3.4.0",
|
|
|
|
|
"installed": False,
|
|
|
|
|
"status": "offline",
|
|
|
|
|
"error": "",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"id": "mempool",
|
|
|
|
|
"version": "v2.5.0",
|
|
|
|
|
"installed": False,
|
|
|
|
|
"status": "offline",
|
|
|
|
|
"error": "",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"id": "jam",
|
|
|
|
|
"version": "0.2.0",
|
|
|
|
|
"installed": False,
|
|
|
|
|
"status": "offline",
|
|
|
|
|
"error": "",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"id": "thunderhub",
|
|
|
|
|
"version": "v0.13.30",
|
|
|
|
|
"installed": False,
|
|
|
|
|
"status": "offline",
|
|
|
|
|
"error": "",
|
|
|
|
|
},
|
|
|
|
|
]
|
2022-09-11 18:32:39 +02:00
|
|
|
|
2024-02-18 12:10:35 +01:00
|
|
|
async def get_app_status_advanced(self, app_id: str):
|
|
|
|
|
raise _NotImplemented()
|
|
|
|
|
|
2022-09-11 18:32:39 +02:00
|
|
|
async def get_app_status_sub(self):
|
2023-04-02 11:09:43 +02:00
|
|
|
raise _NotImplemented()
|
2022-09-11 18:32:39 +02:00
|
|
|
|
|
|
|
|
async def install_app_sub(self, app_id: str):
|
2023-04-02 11:09:43 +02:00
|
|
|
raise _NotImplemented()
|
2022-09-11 18:32:39 +02:00
|
|
|
|
|
|
|
|
async def uninstall_app_sub(self, app_id: str, delete_data: bool):
|
2023-04-02 11:09:43 +02:00
|
|
|
raise _NotImplemented()
|