Renamed deploy app to instsall

This commit is contained in:
2026-01-01 17:55:37 +01:00
parent 4f7376b9b0
commit 579cd030f8
5 changed files with 15 additions and 15 deletions
+2 -2
View File
@@ -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<NextResponse> {
);
}
const res = await deployNewApp(name, repo, nodeId);
const res = await installApp(name, repo, nodeId);
return NextResponse.json({
message: "ok",
+7 -7
View File
@@ -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 (
<DashboardLayout
title="Applications"
subtitle="Manage deployed applications"
subtitle="Manage installed applications"
>
{/* Header */}
<div className="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-6">
@@ -45,12 +45,12 @@ export default function ApplicationsPage() {
</Badge>
</div>
<DeployApplication>
<InstallApplicationDialog>
<Button size="sm" className="gap-2 w-full sm:w-auto">
<Plus className="w-4 h-4" />
Deploy Application
Install Application
</Button>
</DeployApplication>
</InstallApplicationDialog>
</div>
<div className="space-y-3">
@@ -137,7 +137,7 @@ export default function ApplicationsPage() {
</Button>
) : (
<Button variant="ghost" size="icon-sm">
<Play className="w-3 h-3" />
<Rocket className="w-3 h-3" />
</Button>
)}
<RemoveDialog
@@ -16,9 +16,9 @@ import { Label } from "@/components/ui/label";
import { getLiveNodes } from "@/core/node";
import { Combobox } from "../ui/combobox";
import { Node, NodeLiveData } from "@/lib/types";
import { deployNewApp } from "@/core/application";
import { installApp } from "@/core/application";
export default function DeployApplication({
export default function InstallApplicationDialog({
children,
}: {
children: ReactNode;
@@ -36,7 +36,7 @@ export default function DeployApplication({
}, []);
const deploy = async () => {
console.log(await deployNewApp(name, repo, node));
console.log(await installApp(name, repo, node));
};
return (
@@ -45,7 +45,7 @@ export default function DeployApplication({
<DialogContent className="sm:max-w-106.25">
<DialogHeader>
<DialogTitle>Deploy Application</DialogTitle>
<DialogTitle>Install Application</DialogTitle>
</DialogHeader>
<div className="grid gap-4">
+1 -1
View File
@@ -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");
}
+1 -1
View File
@@ -77,7 +77,7 @@ export async function getApplications(): Promise<ImageApp[]> {
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);