From 2222aade5d3d26b1434b9a83df603537965109ff Mon Sep 17 00:00:00 2001 From: Mishalabdullah Date: Sun, 5 May 2024 23:11:53 +0530 Subject: [PATCH] updated yaml script --- onix-gui/GUI/app/api/install-layer2/route.js | 16 ++++++++++++++-- onix-gui/GUI/app/yaml-gen/install-yaml/page.js | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/onix-gui/GUI/app/api/install-layer2/route.js b/onix-gui/GUI/app/api/install-layer2/route.js index c795226..bf7d47a 100644 --- a/onix-gui/GUI/app/api/install-layer2/route.js +++ b/onix-gui/GUI/app/api/install-layer2/route.js @@ -28,11 +28,23 @@ export async function POST(req) { try { await executeShellCommand( - `docker exec ${containerName} wget -P /usr/src/app/schemas/ ${fileURL}` + `docker exec ${ + containerName + "-client" + } wget -P /usr/src/app/schemas/ ${fileURL}` + ); + } catch (error) { + console.error(`exec error: ${error}`); + } + + try { + await executeShellCommand( + `docker exec ${ + containerName + "-network" + } wget -P /usr/src/app/schemas/ ${fileURL}` ); return NextResponse.json({ status: 200 }); } catch (error) { console.error(`exec error: ${error}`); return NextResponse.json({ status: 500 }); } -} +} \ No newline at end of file diff --git a/onix-gui/GUI/app/yaml-gen/install-yaml/page.js b/onix-gui/GUI/app/yaml-gen/install-yaml/page.js index fa97491..b6b1129 100644 --- a/onix-gui/GUI/app/yaml-gen/install-yaml/page.js +++ b/onix-gui/GUI/app/yaml-gen/install-yaml/page.js @@ -18,7 +18,7 @@ export default function InstallYaml() { const [yamlUrl, setYamlUrl] = useState(""); const [checked, setChecked] = useState(false); - const container = checked ? "bpp-network" : "bap-network"; + const container = checked ? "bpp" : "bap"; const handleRegistryUrlChange = (event) => { setYamlUrl(event.target.value);