diff --git a/src/app/api/applications/route.ts b/src/app/api/applications/route.ts index e014d16..85d40a9 100644 --- a/src/app/api/applications/route.ts +++ b/src/app/api/applications/route.ts @@ -2,7 +2,7 @@ import { NextRequest, NextResponse } from "next/server"; import testAuth from "../auth"; import { StatusCodes } from "http-status-codes"; import { - deployNewApp, + installApp, getApplications, removeApp, } from "@/core/server/application"; @@ -44,7 +44,7 @@ export async function POST(req: NextRequest): Promise { ); } - const res = await deployNewApp(name, repo, nodeId); + const res = await installApp(name, repo, nodeId); return NextResponse.json({ message: "ok", diff --git a/src/app/applications/page.tsx b/src/app/applications/page.tsx index cfa56f6..0882281 100644 --- a/src/app/applications/page.tsx +++ b/src/app/applications/page.tsx @@ -4,9 +4,9 @@ import { DashboardLayout } from "@/components/dashboard/DashboardLayout"; import { Card, CardContent } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; -import { Play, Square, MoreVertical, Plus } from "lucide-react"; +import { Play, Square, MoreVertical, Plus, Rocket } from "lucide-react"; import { Progress } from "@/components/ui/progress"; -import DeployApplication from "@/components/dialogs/DeployApplication"; +import InstallApplicationDialog from "@/components/dialogs/InstallApplication"; import { useEffect, useState } from "react"; import { ImageApp } from "@/lib/types"; import { getApplications, removeApp } from "@/core/application"; @@ -34,7 +34,7 @@ export default function ApplicationsPage() { return ( {/* Header */}
@@ -45,12 +45,12 @@ export default function ApplicationsPage() {
- + - +
@@ -137,7 +137,7 @@ export default function ApplicationsPage() { ) : ( )} { - console.log(await deployNewApp(name, repo, node)); + console.log(await installApp(name, repo, node)); }; return ( @@ -45,7 +45,7 @@ export default function DeployApplication({ - Deploy Application + Install Application
diff --git a/src/core/application.ts b/src/core/application.ts index 42e9a0f..515d696 100644 --- a/src/core/application.ts +++ b/src/core/application.ts @@ -5,7 +5,7 @@ import { getNodes } from "./node"; import axios from "axios"; import { Env, EnvVariable, ImageApp } from "@/lib/types"; -export async function deployNewApp(name: string, repo: string, nodeId: string) { +export async function installApp(name: string, repo: string, nodeId: string) { if (await verifySession()) { throw new Error("Unauthorized"); } diff --git a/src/core/server/application.ts b/src/core/server/application.ts index 14a5e0d..e858f93 100644 --- a/src/core/server/application.ts +++ b/src/core/server/application.ts @@ -77,7 +77,7 @@ export async function getApplications(): Promise { return apps; } -export async function deployNewApp(name: string, repo: string, nodeId: string) { +export async function installApp(name: string, repo: string, nodeId: string) { // Create app ID const appId = `app_${randomUUID()}`; const appDir = path.join(DATA_DIR, appId);