mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-12 02:39:17 +00:00
Compare commits
No commits in common. "c63e1dc78abb06264bab7c01dedb2b534258b118" and "9148ea1dff8082157298327e7e887f56dcfacb1e" have entirely different histories.
c63e1dc78a
...
9148ea1dff
@ -25,18 +25,12 @@ Do not break established syntax in this file, as it is automatically updated by
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- Fix Wallos Update [@MickLesk](https://github.com/MickLesk) ([#339](https://github.com/community-scripts/ProxmoxVE/pull/339))
|
||||
- Linkwarden: Move Secret Key above in install.sh [@MickLesk](https://github.com/MickLesk) ([#356](https://github.com/community-scripts/ProxmoxVE/pull/356))
|
||||
- Linkwarden: add gnupg to installed dependencies [@erfansamandarian](https://github.com/erfansamandarian) ([#349](https://github.com/community-scripts/ProxmoxVE/pull/349))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- Add *Arr Suite category for Website [@MickLesk](https://github.com/MickLesk) ([#370](https://github.com/community-scripts/ProxmoxVE/pull/370))
|
||||
- Refactor Buttons component to use a ButtonLink for cleaner code, simplifying the source URL generation and layout [@BramSuurdje](https://github.com/BramSuurdje) ([#371](https://github.com/community-scripts/ProxmoxVE/pull/371))
|
||||
- Fix Wallos Update [@MickLesk](https://github.com/MickLesk) ([#339](https://github.com/community-scripts/ProxmoxVE/pull/339))
|
||||
|
||||
### 🧰 Maintenance
|
||||
|
||||
- [github]: add new Frontend_Report / Issue_Report & optimize config.yml [@MickLesk](https://github.com/MickLesk) ([#226](https://github.com/community-scripts/ProxmoxVE/pull/226))
|
||||
- [chore] Update FUNDING.yml [@MickLesk](https://github.com/MickLesk) ([#352](https://github.com/community-scripts/ProxmoxVE/pull/352))
|
||||
|
||||
## 2024-11-18
|
||||
|
@ -5,53 +5,45 @@ import { BookOpenText, Code, Globe } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
|
||||
const generateSourceUrl = (slug: string, type: string) => {
|
||||
const baseUrl = `https://raw.githubusercontent.com/community-scripts/${basePath}/main`;
|
||||
return type === "ct"
|
||||
? `${baseUrl}/install/${slug}-install.sh`
|
||||
: `${baseUrl}/${type}/${slug}.sh`;
|
||||
if (type === "ct") {
|
||||
return `https://raw.githubusercontent.com/community-scripts/${basePath}/main/install/${slug}-install.sh`;
|
||||
} else {
|
||||
return `https://raw.githubusercontent.com/community-scripts/${basePath}/main/${type}/${slug}.sh`;
|
||||
}
|
||||
};
|
||||
|
||||
interface ButtonLinkProps {
|
||||
href: string;
|
||||
icon: React.ReactNode;
|
||||
text: string;
|
||||
}
|
||||
|
||||
const ButtonLink = ({ href, icon, text }: ButtonLinkProps) => (
|
||||
export default function Buttons({ item }: { item: Script }) {
|
||||
return (
|
||||
<div className="flex flex-wrap justify-end gap-2">
|
||||
{item.website && (
|
||||
<Button variant="secondary" asChild>
|
||||
<Link target="_blank" href={href}>
|
||||
<Link target="_blank" href={item.website}>
|
||||
<span className="flex items-center gap-2">
|
||||
{icon}
|
||||
{text}
|
||||
<Globe className="h-4 w-4" /> Website
|
||||
</span>
|
||||
</Link>
|
||||
</Button>
|
||||
);
|
||||
|
||||
export default function Buttons({ item }: { item: Script }) {
|
||||
const buttons = [
|
||||
item.website && {
|
||||
href: item.website,
|
||||
icon: <Globe className="h-4 w-4" />,
|
||||
text: "Website",
|
||||
},
|
||||
item.documentation && {
|
||||
href: item.documentation,
|
||||
icon: <BookOpenText className="h-4 w-4" />,
|
||||
text: "Documentation",
|
||||
},
|
||||
)}
|
||||
{item.documentation && (
|
||||
<Button variant="secondary" asChild>
|
||||
<Link target="_blank" href={item.documentation}>
|
||||
<span className="flex items-center gap-2">
|
||||
<BookOpenText className="h-4 w-4" />
|
||||
Documentation
|
||||
</span>
|
||||
</Link>
|
||||
</Button>
|
||||
)}
|
||||
{
|
||||
href: generateSourceUrl(item.slug, item.type),
|
||||
icon: <Code className="h-4 w-4" />,
|
||||
text: "Source Code",
|
||||
},
|
||||
].filter(Boolean) as ButtonLinkProps[];
|
||||
|
||||
return (
|
||||
<div className="flex flex-wrap justify-end gap-2">
|
||||
{buttons.map((props, index) => (
|
||||
<ButtonLink key={index} {...props} />
|
||||
))}
|
||||
<Button variant="secondary" asChild>
|
||||
<Link target="_blank" href={generateSourceUrl(item.slug, item.type)}>
|
||||
<span className="flex items-center gap-2">
|
||||
<Code className="h-4 w-4" />
|
||||
Source Code
|
||||
</span>
|
||||
</Link>
|
||||
</Button>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -4,39 +4,55 @@ import { Separator } from "@/components/ui/separator";
|
||||
import { Script } from "@/lib/types";
|
||||
|
||||
export default function DefaultPassword({ item }: { item: Script }) {
|
||||
const { username, password } = item.default_credentials;
|
||||
const hasDefaultLogin = username && password;
|
||||
|
||||
if (!hasDefaultLogin) return null;
|
||||
|
||||
const copyCredential = (type: "username" | "password") => {
|
||||
handleCopy(type, item.default_credentials[type] ?? "");
|
||||
};
|
||||
const hasDefaultLogin =
|
||||
item.default_credentials.username && item.default_credentials.password;
|
||||
|
||||
return (
|
||||
<div>
|
||||
{hasDefaultLogin && (
|
||||
<div className="mt-4 rounded-lg border bg-accent/50">
|
||||
<div className="flex gap-3 px-4 py-2">
|
||||
<h2 className="text-lg font-semibold">Default Login Credentials</h2>
|
||||
</div>
|
||||
<Separator className="w-full" />
|
||||
<Separator className="w-full"></Separator>
|
||||
<div className="flex flex-col gap-2 p-4">
|
||||
<p className="mb-2 text-sm">
|
||||
You can use the following credentials to login to the {item.name}{" "}
|
||||
{item.type}.
|
||||
You can use the following credentials to login to the {""}
|
||||
{item.name} {item.type}.
|
||||
</p>
|
||||
{["username", "password"].map((type) => (
|
||||
<div key={type} className="text-sm">
|
||||
{type.charAt(0).toUpperCase() + type.slice(1)}:{" "}
|
||||
<div className="text-sm">
|
||||
Username:{" "}
|
||||
<Button
|
||||
variant="secondary"
|
||||
size="null"
|
||||
onClick={() => copyCredential(type as "username" | "password")}
|
||||
variant={"secondary"}
|
||||
size={"null"}
|
||||
onClick={() =>
|
||||
handleCopy(
|
||||
"username",
|
||||
item.default_credentials.username ?? "",
|
||||
)
|
||||
}
|
||||
>
|
||||
{item.default_credentials[type as "username" | "password"]}
|
||||
{item.default_credentials.username}
|
||||
</Button>
|
||||
</div>
|
||||
))}
|
||||
<div className="text-sm">
|
||||
Password:{" "}
|
||||
<Button
|
||||
variant={"secondary"}
|
||||
size={"null"}
|
||||
onClick={() =>
|
||||
handleCopy(
|
||||
"password",
|
||||
item.default_credentials.password ?? "",
|
||||
)
|
||||
}
|
||||
>
|
||||
{item.default_credentials.password}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -1,50 +1,56 @@
|
||||
import { Script } from "@/lib/types";
|
||||
|
||||
export default function DefaultSettings({ item }: { item: Script }) {
|
||||
const getDisplayValueFromRAM = (ram: number) =>
|
||||
ram >= 1024 ? `${Math.floor(ram / 1024)}GB` : `${ram}MB`;
|
||||
|
||||
const ResourceDisplay = ({
|
||||
settings,
|
||||
title,
|
||||
}: {
|
||||
settings: (typeof item.install_methods)[0];
|
||||
title: string;
|
||||
}) => {
|
||||
const { cpu, ram, hdd } = settings.resources;
|
||||
return (
|
||||
<div>
|
||||
<h2 className="text-md font-semibold">{title}</h2>
|
||||
<p className="text-sm text-muted-foreground">CPU: {cpu}vCPU</p>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
RAM: {getDisplayValueFromRAM(ram ?? 0)}
|
||||
</p>
|
||||
<p className="text-sm text-muted-foreground">HDD: {hdd}GB</p>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const defaultSettings = item.install_methods.find(
|
||||
(method) => method.type === "default",
|
||||
);
|
||||
|
||||
const defaultSettingsAvailable =
|
||||
defaultSettings?.resources.cpu ||
|
||||
defaultSettings?.resources.ram ||
|
||||
defaultSettings?.resources.hdd;
|
||||
|
||||
const defaultAlpineSettings = item.install_methods.find(
|
||||
(method) => method.type === "alpine",
|
||||
);
|
||||
|
||||
const hasDefaultSettings =
|
||||
defaultSettings?.resources &&
|
||||
Object.values(defaultSettings.resources).some(Boolean);
|
||||
const getDisplayValueFromRAM = (ram: number) => {
|
||||
if (ram >= 1024) {
|
||||
return (ram / 1024).toFixed(0) + "GB";
|
||||
}
|
||||
return ram + "MB";
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
{hasDefaultSettings && (
|
||||
<ResourceDisplay settings={defaultSettings} title="Default settings" />
|
||||
{defaultSettingsAvailable && (
|
||||
<div>
|
||||
<h2 className="text-md font-semibold">Default settings</h2>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
CPU: {defaultSettings?.resources.cpu}vCPU
|
||||
</p>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
RAM: {getDisplayValueFromRAM(defaultSettings?.resources.ram ?? 0)}
|
||||
</p>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
HDD: {defaultSettings?.resources.hdd}GB
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
{defaultAlpineSettings && (
|
||||
<ResourceDisplay
|
||||
settings={defaultAlpineSettings}
|
||||
title="Default Alpine settings"
|
||||
/>
|
||||
<div>
|
||||
<h2 className="text-md font-semibold">Default Alpine settings</h2>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
CPU: {defaultAlpineSettings?.resources.cpu}vCPU
|
||||
</p>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
RAM:{" "}
|
||||
{getDisplayValueFromRAM(defaultAlpineSettings?.resources.ram ?? 0)}
|
||||
</p>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
HDD: {defaultAlpineSettings?.resources.hdd}GB
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "Autobrr",
|
||||
"slug": "autobrr",
|
||||
"categories": [
|
||||
18
|
||||
16
|
||||
],
|
||||
"date_created": "2024-05-02",
|
||||
"type": "ct",
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "Bazarr",
|
||||
"slug": "bazarr",
|
||||
"categories": [
|
||||
18
|
||||
12
|
||||
],
|
||||
"date_created": "2024-05-02",
|
||||
"type": "ct",
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "Homarr",
|
||||
"slug": "homarr",
|
||||
"categories": [
|
||||
18
|
||||
15
|
||||
],
|
||||
"date_created": "2024-05-02",
|
||||
"type": "ct",
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "Lidarr",
|
||||
"slug": "lidarr",
|
||||
"categories": [
|
||||
18
|
||||
12
|
||||
],
|
||||
"date_created": "2024-05-02",
|
||||
"type": "ct",
|
||||
|
@ -3,22 +3,21 @@
|
||||
[
|
||||
{"name": "Proxmox VE Tools", "id": 1, "sort_order": 1.0},
|
||||
{"name": "AdBlocker - DNS", "id": 13, "sort_order": 2.0},
|
||||
{"name": "*Arr Suite", "id": 18, "sort_order": 3.0},
|
||||
{"name": "Automation", "id": 3, "sort_order": 4.0},
|
||||
{"name": "Dashboards", "id": 15, "sort_order": 5.0},
|
||||
{"name": "Database", "id": 5, "sort_order": 6.0},
|
||||
{"name": "Docker - Kubernetes", "id": 8, "sort_order": 7.0},
|
||||
{"name": "Document - Notes", "id": 14, "sort_order": 8.0},
|
||||
{"name": "File - Code", "id": 16, "sort_order": 9.0},
|
||||
{"name": "Home Assistant", "id": 2, "sort_order": 10.0},
|
||||
{"name": "Media - Photo", "id": 12, "sort_order": 11.0},
|
||||
{"name": "Monitoring - Analytics", "id": 7, "sort_order": 12.0},
|
||||
{"name": "MQTT", "id": 4, "sort_order": 13.0},
|
||||
{"name": "NVR - DVR", "id": 17, "sort_order": 14.0},
|
||||
{"name": "Operating System", "id": 9, "sort_order": 15.0},
|
||||
{"name": "Server - Networking", "id": 11, "sort_order": 16.0},
|
||||
{"name": "TurnKey", "id": 10, "sort_order": 17.0},
|
||||
{"name": "Matter/Zigbee/ZWave", "id": 6, "sort_order": 18.0},
|
||||
{"name": "Automation", "id": 3, "sort_order": 3.0},
|
||||
{"name": "Dashboards", "id": 15, "sort_order": 4.0},
|
||||
{"name": "Database", "id": 5, "sort_order": 5.0},
|
||||
{"name": "Docker - Kubernetes", "id": 8, "sort_order": 6.0},
|
||||
{"name": "Document - Notes", "id": 14, "sort_order": 7.0},
|
||||
{"name": "File - Code", "id": 16, "sort_order": 8.0},
|
||||
{"name": "Home Assistant", "id": 2, "sort_order": 9.0},
|
||||
{"name": "Media - Photo", "id": 12, "sort_order": 10.0},
|
||||
{"name": "Monitoring - Analytics", "id": 7, "sort_order": 11.0},
|
||||
{"name": "MQTT", "id": 4, "sort_order": 12.0},
|
||||
{"name": "NVR - DVR", "id": 17, "sort_order": 13.0},
|
||||
{"name": "Operating System", "id": 9, "sort_order": 14.0},
|
||||
{"name": "Server - Networking", "id": 11, "sort_order": 15.0},
|
||||
{"name": "TurnKey", "id": 10, "sort_order": 16.0},
|
||||
{"name": "Zigbee - Zwave", "id": 6, "sort_order": 17.0},
|
||||
{"name": "Miscellaneous", "id": 0, "sort_order": 99.0}
|
||||
]
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "Notifiarr",
|
||||
"slug": "notifiarr",
|
||||
"categories": [
|
||||
18
|
||||
7
|
||||
],
|
||||
"date_created": "2024-06-12",
|
||||
"type": "ct",
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "Prowlarr",
|
||||
"slug": "prowlarr",
|
||||
"categories": [
|
||||
18
|
||||
12
|
||||
],
|
||||
"date_created": "2024-05-02",
|
||||
"type": "ct",
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "Radarr",
|
||||
"slug": "radarr",
|
||||
"categories": [
|
||||
18
|
||||
12
|
||||
],
|
||||
"date_created": "2024-05-02",
|
||||
"type": "ct",
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "Readarr",
|
||||
"slug": "readarr",
|
||||
"categories": [
|
||||
18
|
||||
12
|
||||
],
|
||||
"date_created": "2024-05-02",
|
||||
"type": "ct",
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "Recyclarr",
|
||||
"slug": "recyclarr",
|
||||
"categories": [
|
||||
18
|
||||
12
|
||||
],
|
||||
"date_created": "2024-11-15",
|
||||
"type": "ct",
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "Sonarr",
|
||||
"slug": "sonarr",
|
||||
"categories": [
|
||||
18
|
||||
12
|
||||
],
|
||||
"date_created": "2024-05-02",
|
||||
"type": "ct",
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "Tdarr",
|
||||
"slug": "tdarr",
|
||||
"categories": [
|
||||
18
|
||||
12
|
||||
],
|
||||
"date_created": "2024-05-02",
|
||||
"type": "ct",
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "Whisparr",
|
||||
"slug": "whisparr",
|
||||
"categories": [
|
||||
18
|
||||
12
|
||||
],
|
||||
"date_created": "2024-05-02",
|
||||
"type": "ct",
|
||||
|
Loading…
Reference in New Issue
Block a user