reformat
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
from fastapi import FastAPI
|
from fastapi import FastAPI
|
||||||
|
from fastapi.middleware.cors import CORSMiddleware
|
||||||
from fastapi.routing import APIRoute
|
from fastapi.routing import APIRoute
|
||||||
from fastapi.staticfiles import StaticFiles
|
from fastapi.staticfiles import StaticFiles
|
||||||
from fastapi.middleware.cors import CORSMiddleware
|
|
||||||
|
|
||||||
from .assets import asset_path
|
from .assets import asset_path
|
||||||
from .routers import health, machines, root, vms
|
from .routers import health, machines, root, vms
|
||||||
@@ -10,6 +10,7 @@ origins = [
|
|||||||
"http://localhost:3000",
|
"http://localhost:3000",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def setup_app() -> FastAPI:
|
def setup_app() -> FastAPI:
|
||||||
app = FastAPI()
|
app = FastAPI()
|
||||||
app.add_middleware(
|
app.add_middleware(
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ def start_server(args: argparse.Namespace) -> None:
|
|||||||
with ExitStack() as stack:
|
with ExitStack() as stack:
|
||||||
headers: list[tuple[str, str]] = []
|
headers: list[tuple[str, str]] = []
|
||||||
if args.dev:
|
if args.dev:
|
||||||
# stack.enter_context(spawn_node_dev_server(args.dev_host, args.dev_port))
|
stack.enter_context(spawn_node_dev_server(args.dev_host, args.dev_port))
|
||||||
|
|
||||||
open_url = f"http://{args.dev_host}:{args.dev_port}"
|
open_url = f"http://{args.dev_host}:{args.dev_port}"
|
||||||
host = args.dev_host
|
host = args.dev_host
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ export function CustomConfig(props: FormStepContentProps) {
|
|||||||
}
|
}
|
||||||
return acc;
|
return acc;
|
||||||
}, {}),
|
}, {}),
|
||||||
[schema]
|
[schema],
|
||||||
);
|
);
|
||||||
|
|
||||||
return isLoading ? (
|
return isLoading ? (
|
||||||
@@ -124,7 +124,7 @@ function PureCustomConfig(props: PureCustomConfigProps) {
|
|||||||
message: "invalid config",
|
message: "invalid config",
|
||||||
});
|
});
|
||||||
toast.error(
|
toast.error(
|
||||||
"Configuration is invalid. Please check the highlighted fields for details."
|
"Configuration is invalid. Please check the highlighted fields for details.",
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
formHooks.clearErrors("config");
|
formHooks.clearErrors("config");
|
||||||
|
|||||||
Reference in New Issue
Block a user