mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-02-16 02:03:25 +01:00
Compare commits
1 Commits
add-script
...
fetch-depl
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6049a1fe2b |
24
CHANGELOG.md
24
CHANGELOG.md
@@ -400,30 +400,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
|||||||
|
|
||||||
## 2026-02-07
|
## 2026-02-07
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
|
||||||
|
|
||||||
- #### 🐞 Bug Fixes
|
|
||||||
|
|
||||||
- NocoDB: pin to v0.301.1 [@MickLesk](https://github.com/MickLesk) ([#11655](https://github.com/community-scripts/ProxmoxVE/pull/11655))
|
|
||||||
- Pin Memos to v0.25.3 - last version with release binaries [@MickLesk](https://github.com/MickLesk) ([#11658](https://github.com/community-scripts/ProxmoxVE/pull/11658))
|
|
||||||
- Downgrade: OpenProject | NginxProxyManager | Semaphore to Debian 12 due to persistent SHA1 issues [@MickLesk](https://github.com/MickLesk) ([#11654](https://github.com/community-scripts/ProxmoxVE/pull/11654))
|
|
||||||
|
|
||||||
### 💾 Core
|
|
||||||
|
|
||||||
- #### ✨ New Features
|
|
||||||
|
|
||||||
- tools: fallback to previous release when asset is missing [@MickLesk](https://github.com/MickLesk) ([#11660](https://github.com/community-scripts/ProxmoxVE/pull/11660))
|
|
||||||
|
|
||||||
### 📚 Documentation
|
|
||||||
|
|
||||||
- fix(setup): correctly auto-detect username when using --full [@ls-root](https://github.com/ls-root) ([#11650](https://github.com/community-scripts/ProxmoxVE/pull/11650))
|
|
||||||
|
|
||||||
### 🌐 Website
|
|
||||||
|
|
||||||
- #### ✨ New Features
|
|
||||||
|
|
||||||
- feat(frontend): add JSON script import functionality [@ls-root](https://github.com/ls-root) ([#11563](https://github.com/community-scripts/ProxmoxVE/pull/11563))
|
|
||||||
|
|
||||||
## 2026-02-06
|
## 2026-02-06
|
||||||
|
|
||||||
### 🆕 New Scripts
|
### 🆕 New Scripts
|
||||||
|
|||||||
@@ -1,78 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: MickLesk (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/bluewave-labs/Checkmate
|
|
||||||
|
|
||||||
APP="Checkmate"
|
|
||||||
var_tags="${var_tags:-monitoring;uptime}"
|
|
||||||
var_cpu="${var_cpu:-2}"
|
|
||||||
var_ram="${var_ram:-4096}"
|
|
||||||
var_disk="${var_disk:-10}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
|
|
||||||
if [[ ! -d /opt/checkmate ]]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if check_for_gh_release "checkmate" "bluewave-labs/Checkmate"; then
|
|
||||||
msg_info "Stopping Services"
|
|
||||||
systemctl stop checkmate-server checkmate-client nginx
|
|
||||||
msg_ok "Stopped Services"
|
|
||||||
|
|
||||||
msg_info "Backing up Data"
|
|
||||||
cp /opt/checkmate/server/.env /opt/checkmate_server.env.bak
|
|
||||||
[ -f /opt/checkmate/client/.env.local ] && cp /opt/checkmate/client/.env.local /opt/checkmate_client.env.local.bak
|
|
||||||
msg_ok "Backed up Data"
|
|
||||||
|
|
||||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "checkmate" "bluewave-labs/Checkmate"
|
|
||||||
|
|
||||||
msg_info "Updating Checkmate Server"
|
|
||||||
cd /opt/checkmate/server
|
|
||||||
$STD npm install
|
|
||||||
if [ -f package.json ]; then
|
|
||||||
grep -q '"build"' package.json && $STD npm run build || true
|
|
||||||
fi
|
|
||||||
msg_ok "Updated Checkmate Server"
|
|
||||||
|
|
||||||
msg_info "Updating Checkmate Client"
|
|
||||||
cd /opt/checkmate/client
|
|
||||||
$STD npm install
|
|
||||||
VITE_APP_API_BASE_URL="/api/v1" UPTIME_APP_API_BASE_URL="/api/v1" VITE_APP_LOG_LEVEL="warn" $STD npm run build
|
|
||||||
msg_ok "Updated Checkmate Client"
|
|
||||||
|
|
||||||
msg_info "Restoring Data"
|
|
||||||
mv /opt/checkmate_server.env.bak /opt/checkmate/server/.env
|
|
||||||
[ -f /opt/checkmate_client.env.local.bak ] && mv /opt/checkmate_client.env.local.bak /opt/checkmate/client/.env.local
|
|
||||||
msg_ok "Restored Data"
|
|
||||||
|
|
||||||
msg_info "Starting Services"
|
|
||||||
systemctl start checkmate-server checkmate-client nginx
|
|
||||||
msg_ok "Started Services"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
fi
|
|
||||||
exit
|
|
||||||
}
|
|
||||||
|
|
||||||
start
|
|
||||||
build_container
|
|
||||||
description
|
|
||||||
|
|
||||||
msg_ok "Completed successfully!\n"
|
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
|
||||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
|
||||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"
|
|
||||||
@@ -27,12 +27,12 @@ function update_script() {
|
|||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
if check_for_gh_release "memos" "usememos/memos" "v0.25.3"; then
|
if check_for_gh_release "memos" "usememos/memos"; then
|
||||||
msg_info "Stopping service"
|
msg_info "Stopping service"
|
||||||
systemctl stop memos
|
systemctl stop memos
|
||||||
msg_ok "Service stopped"
|
msg_ok "Service stopped"
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "memos" "usememos/memos" "prebuild" "v0.25.3" "/opt/memos" "memos*linux_amd64.tar.gz"
|
fetch_and_deploy_gh_release "memos" "usememos/memos" "prebuild" "latest" "/opt/memos" "memos*linux_amd64.tar.gz"
|
||||||
|
|
||||||
msg_info "Starting service"
|
msg_info "Starting service"
|
||||||
systemctl start memos
|
systemctl start memos
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ var_cpu="${var_cpu:-2}"
|
|||||||
var_ram="${var_ram:-2048}"
|
var_ram="${var_ram:-2048}"
|
||||||
var_disk="${var_disk:-8}"
|
var_disk="${var_disk:-8}"
|
||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-12}"
|
var_version="${var_version:-13}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
|
|||||||
@@ -27,12 +27,12 @@ function update_script() {
|
|||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
if check_for_gh_release "nocodb" "nocodb/nocodb" "0.301.1"; then
|
if check_for_gh_release "nocodb" "nocodb/nocodb"; then
|
||||||
msg_info "Stopping Service"
|
msg_info "Stopping Service"
|
||||||
systemctl stop nocodb
|
systemctl stop nocodb
|
||||||
msg_ok "Stopped Service"
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "nocodb" "nocodb/nocodb" "singlefile" "0.301.1" "/opt/nocodb/" "Noco-linux-x64"
|
fetch_and_deploy_gh_release "nocodb" "nocodb/nocodb" "singlefile" "latest" "/opt/nocodb/" "Noco-linux-x64"
|
||||||
|
|
||||||
msg_info "Starting Service"
|
msg_info "Starting Service"
|
||||||
systemctl start nocodb
|
systemctl start nocodb
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ var_cpu="${var_cpu:-2}"
|
|||||||
var_ram="${var_ram:-4096}"
|
var_ram="${var_ram:-4096}"
|
||||||
var_disk="${var_disk:-8}"
|
var_disk="${var_disk:-8}"
|
||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-12}"
|
var_version="${var_version:-13}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ var_cpu="${var_cpu:-2}"
|
|||||||
var_ram="${var_ram:-2048}"
|
var_ram="${var_ram:-2048}"
|
||||||
var_disk="${var_disk:-4}"
|
var_disk="${var_disk:-4}"
|
||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-12}"
|
var_version="${var_version:-13}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
|
|||||||
@@ -237,6 +237,7 @@ if [[ $# -gt 0 ]]; then
|
|||||||
# Check for --full flag
|
# Check for --full flag
|
||||||
if [[ "$1" == "--full" ]]; then
|
if [[ "$1" == "--full" ]]; then
|
||||||
UPDATE_ALL=true
|
UPDATE_ALL=true
|
||||||
|
AUTO_DETECT=true
|
||||||
shift # Remove --full from arguments
|
shift # Remove --full from arguments
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -249,10 +250,8 @@ if [[ $# -gt 0 ]]; then
|
|||||||
REPO_NAME="$2"
|
REPO_NAME="$2"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
else
|
||||||
|
# Try auto-detection
|
||||||
# Try auto-detection
|
|
||||||
if [[ -z "$USERNAME" ]]; then
|
|
||||||
if username=$(detect_username); then
|
if username=$(detect_username); then
|
||||||
USERNAME="$username"
|
USERNAME="$username"
|
||||||
print_success "Detected GitHub username: $USERNAME"
|
print_success "Detected GitHub username: $USERNAME"
|
||||||
@@ -262,15 +261,14 @@ if [[ -z "$USERNAME" ]]; then
|
|||||||
echo " ./setup-fork.sh YOUR_USERNAME"
|
echo " ./setup-fork.sh YOUR_USERNAME"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
# Auto-detect repo name if needed
|
if repo_name=$(detect_repo_name); then
|
||||||
if repo_name=$(detect_repo_name); then
|
REPO_NAME="$repo_name"
|
||||||
REPO_NAME="$repo_name"
|
if [[ "$REPO_NAME" != "ProxmoxVE" ]]; then
|
||||||
if [[ "$REPO_NAME" != "ProxmoxVE" ]]; then
|
print_info "Detected custom repo name: $REPO_NAME"
|
||||||
print_info "Detected custom repo name: $REPO_NAME"
|
else
|
||||||
else
|
print_success "Using default repo name: ProxmoxVE"
|
||||||
print_success "Using default repo name: ProxmoxVE"
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -1,48 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Checkmate",
|
|
||||||
"slug": "checkmate",
|
|
||||||
"categories": [
|
|
||||||
9
|
|
||||||
],
|
|
||||||
"date_created": "2026-02-07",
|
|
||||||
"type": "ct",
|
|
||||||
"updateable": true,
|
|
||||||
"privileged": false,
|
|
||||||
"interface_port": 5173,
|
|
||||||
"documentation": "https://github.com/bluewave-labs/Checkmate#readme",
|
|
||||||
"website": "https://github.com/bluewave-labs/Checkmate",
|
|
||||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/checkmate.webp",
|
|
||||||
"config_path": "/opt/checkmate/server/.env",
|
|
||||||
"description": "Checkmate is an open source uptime and infrastructure monitoring application that helps you track the availability and performance of your services.",
|
|
||||||
"install_methods": [
|
|
||||||
{
|
|
||||||
"type": "default",
|
|
||||||
"script": "ct/checkmate.sh",
|
|
||||||
"resources": {
|
|
||||||
"cpu": 2,
|
|
||||||
"ram": 4096,
|
|
||||||
"hdd": 10,
|
|
||||||
"os": "Debian",
|
|
||||||
"version": "13"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"default_credentials": {
|
|
||||||
"username": null,
|
|
||||||
"password": null
|
|
||||||
},
|
|
||||||
"notes": [
|
|
||||||
{
|
|
||||||
"text": "Create your admin account on first login via the web interface.",
|
|
||||||
"type": "info"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"text": "Server API runs on port 52345, Client UI on port 5173.",
|
|
||||||
"type": "info"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"text": "For PageSpeed monitoring, add a Google PageSpeed API key to the server .env file.",
|
|
||||||
"type": "info"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"generated": "2026-02-07T18:08:02Z",
|
"generated": "2026-02-07T12:07:39Z",
|
||||||
"versions": [
|
"versions": [
|
||||||
{
|
{
|
||||||
"slug": "2fauth",
|
"slug": "2fauth",
|
||||||
@@ -774,16 +774,16 @@
|
|||||||
{
|
{
|
||||||
"slug": "memos",
|
"slug": "memos",
|
||||||
"repo": "usememos/memos",
|
"repo": "usememos/memos",
|
||||||
"version": "v0.25.3",
|
"version": "v0.26.0",
|
||||||
"pinned": true,
|
"pinned": false,
|
||||||
"date": "2025-11-25T00:00:00Z"
|
"date": "2026-01-31T15:28:09Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "metube",
|
"slug": "metube",
|
||||||
"repo": "alexta69/metube",
|
"repo": "alexta69/metube",
|
||||||
"version": "2026.02.07",
|
"version": "2026.02.06",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-02-07T16:24:37Z"
|
"date": "2026-02-06T14:20:34Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "miniflux",
|
"slug": "miniflux",
|
||||||
@@ -851,8 +851,8 @@
|
|||||||
{
|
{
|
||||||
"slug": "nocodb",
|
"slug": "nocodb",
|
||||||
"repo": "nocodb/nocodb",
|
"repo": "nocodb/nocodb",
|
||||||
"version": "0.301.1",
|
"version": "0.301.2",
|
||||||
"pinned": true,
|
"pinned": false,
|
||||||
"date": "2026-01-21T16:23:04Z"
|
"date": "2026-01-21T16:23:04Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1117,9 +1117,9 @@
|
|||||||
{
|
{
|
||||||
"slug": "pulse",
|
"slug": "pulse",
|
||||||
"repo": "rcourtman/Pulse",
|
"repo": "rcourtman/Pulse",
|
||||||
"version": "v5.1.3",
|
"version": "v5.1.2",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-02-07T14:59:29Z"
|
"date": "2026-02-05T00:18:57Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "pve-scripts-local",
|
"slug": "pve-scripts-local",
|
||||||
@@ -1432,9 +1432,9 @@
|
|||||||
{
|
{
|
||||||
"slug": "trip",
|
"slug": "trip",
|
||||||
"repo": "itskovacs/TRIP",
|
"repo": "itskovacs/TRIP",
|
||||||
"version": "1.39.0",
|
"version": "1.38.1",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-02-07T16:59:51Z"
|
"date": "2026-02-04T18:10:15Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "tududi",
|
"slug": "tududi",
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
"ram": 2048,
|
"ram": 2048,
|
||||||
"hdd": 8,
|
"hdd": 8,
|
||||||
"os": "debian",
|
"os": "debian",
|
||||||
"version": "12"
|
"version": "13"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
"ram": 4096,
|
"ram": 4096,
|
||||||
"hdd": 8,
|
"hdd": 8,
|
||||||
"os": "Debian",
|
"os": "Debian",
|
||||||
"version": "12"
|
"version": "13"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
"ram": 2048,
|
"ram": 2048,
|
||||||
"hdd": 4,
|
"hdd": 4,
|
||||||
"os": "debian",
|
"os": "debian",
|
||||||
"version": "12"
|
"version": "13"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -32,11 +32,6 @@ import Note from "./_components/note";
|
|||||||
import { githubGist, nord } from "react-syntax-highlighter/dist/esm/styles/hljs";
|
import { githubGist, nord } from "react-syntax-highlighter/dist/esm/styles/hljs";
|
||||||
import SyntaxHighlighter from "react-syntax-highlighter";
|
import SyntaxHighlighter from "react-syntax-highlighter";
|
||||||
import { ScriptItem } from "../scripts/_components/script-item";
|
import { ScriptItem } from "../scripts/_components/script-item";
|
||||||
import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuTrigger } from "@/components/ui/dropdown-menu";
|
|
||||||
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog";
|
|
||||||
import { search } from "@/components/command-menu";
|
|
||||||
import { basePath } from "@/config/site-config";
|
|
||||||
import Image from "next/image";
|
|
||||||
import { useTheme } from "next-themes";
|
import { useTheme } from "next-themes";
|
||||||
|
|
||||||
const initialScript: Script = {
|
const initialScript: Script = {
|
||||||
@@ -70,35 +65,8 @@ export default function JSONGenerator() {
|
|||||||
const [isValid, setIsValid] = useState(false);
|
const [isValid, setIsValid] = useState(false);
|
||||||
const [categories, setCategories] = useState<Category[]>([]);
|
const [categories, setCategories] = useState<Category[]>([]);
|
||||||
const [currentTab, setCurrentTab] = useState<"json" | "preview">("json");
|
const [currentTab, setCurrentTab] = useState<"json" | "preview">("json");
|
||||||
const [selectedCategory, setSelectedCategory] = useState<string>("");
|
|
||||||
const [searchQuery, setSearchQuery] = useState<string>("");
|
|
||||||
const [isImportDialogOpen, setIsImportDialogOpen] = useState(false);
|
|
||||||
const [zodErrors, setZodErrors] = useState<z.ZodError | null>(null);
|
const [zodErrors, setZodErrors] = useState<z.ZodError | null>(null);
|
||||||
|
|
||||||
const selectedCategoryObj = useMemo(
|
|
||||||
() => categories.find(cat => cat.id.toString() === selectedCategory),
|
|
||||||
[categories, selectedCategory]
|
|
||||||
);
|
|
||||||
|
|
||||||
const allScripts = useMemo(
|
|
||||||
() => categories.flatMap(cat => cat.scripts || []),
|
|
||||||
[categories]
|
|
||||||
);
|
|
||||||
|
|
||||||
const scripts = useMemo(() => {
|
|
||||||
const query = searchQuery.trim()
|
|
||||||
|
|
||||||
if (query) {
|
|
||||||
return search(allScripts, query)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (selectedCategoryObj) {
|
|
||||||
return selectedCategoryObj.scripts || []
|
|
||||||
}
|
|
||||||
|
|
||||||
return []
|
|
||||||
}, [allScripts, selectedCategoryObj, searchQuery]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetchCategories()
|
fetchCategories()
|
||||||
.then(setCategories)
|
.then(setCategories)
|
||||||
@@ -152,53 +120,6 @@ export default function JSONGenerator() {
|
|||||||
if (isValid) toast.success("Copied metadata to clipboard");
|
if (isValid) toast.success("Copied metadata to clipboard");
|
||||||
}, [script]);
|
}, [script]);
|
||||||
|
|
||||||
const importScript = (script: Script) => {
|
|
||||||
try {
|
|
||||||
const result = ScriptSchema.safeParse(script);
|
|
||||||
if (!result.success) {
|
|
||||||
setIsValid(false);
|
|
||||||
setZodErrors(result.error);
|
|
||||||
toast.error("Imported JSON is invalid according to the schema.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
setScript(result.data);
|
|
||||||
setIsValid(true);
|
|
||||||
setZodErrors(null);
|
|
||||||
toast.success("Imported JSON successfully");
|
|
||||||
} catch (error) {
|
|
||||||
toast.error("Failed to read or parse the JSON file.");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleFileImport = useCallback(() => {
|
|
||||||
const input = document.createElement("input");
|
|
||||||
input.type = "file";
|
|
||||||
input.accept = "application/json";
|
|
||||||
|
|
||||||
input.onchange = (e: Event) => {
|
|
||||||
const target = e.target as HTMLInputElement;
|
|
||||||
const file = target.files?.[0];
|
|
||||||
if (!file) return;
|
|
||||||
|
|
||||||
const reader = new FileReader();
|
|
||||||
reader.onload = (event) => {
|
|
||||||
try {
|
|
||||||
const content = event.target?.result as string;
|
|
||||||
const parsed = JSON.parse(content);
|
|
||||||
importScript(parsed);
|
|
||||||
toast.success("Imported JSON successfully");
|
|
||||||
} catch (error) {
|
|
||||||
toast.error("Failed to read the JSON file.");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
reader.readAsText(file);
|
|
||||||
};
|
|
||||||
|
|
||||||
input.click();
|
|
||||||
}, [setScript]);
|
|
||||||
|
|
||||||
const handleDownload = useCallback(() => {
|
const handleDownload = useCallback(() => {
|
||||||
if (isValid === false) {
|
if (isValid === false) {
|
||||||
toast.error("Cannot download invalid JSON");
|
toast.error("Cannot download invalid JSON");
|
||||||
@@ -256,94 +177,7 @@ export default function JSONGenerator() {
|
|||||||
return (
|
return (
|
||||||
<div className="flex h-screen mt-20">
|
<div className="flex h-screen mt-20">
|
||||||
<div className="w-1/2 p-4 overflow-y-auto">
|
<div className="w-1/2 p-4 overflow-y-auto">
|
||||||
<div className="flex justify-between items-center mb-4">
|
<h2 className="text-2xl font-bold mb-4">JSON Generator</h2>
|
||||||
<h2 className="text-2xl font-bold">JSON Generator</h2>
|
|
||||||
<DropdownMenu>
|
|
||||||
<DropdownMenuTrigger asChild>
|
|
||||||
<Button>Import</Button>
|
|
||||||
</DropdownMenuTrigger>
|
|
||||||
<DropdownMenuContent className="w-52" align="start">
|
|
||||||
<DropdownMenuGroup>
|
|
||||||
<DropdownMenuItem onSelect={handleFileImport}>Import local JSON file</DropdownMenuItem>
|
|
||||||
<Dialog
|
|
||||||
open={isImportDialogOpen}
|
|
||||||
onOpenChange={setIsImportDialogOpen}
|
|
||||||
>
|
|
||||||
<DialogTrigger asChild>
|
|
||||||
<DropdownMenuItem onSelect={(e) => e.preventDefault()}>
|
|
||||||
Import existing script
|
|
||||||
</DropdownMenuItem>
|
|
||||||
</DialogTrigger>
|
|
||||||
<DialogContent className="sm:max-w-md w-full">
|
|
||||||
<DialogHeader>
|
|
||||||
<DialogTitle>Import existing script</DialogTitle>
|
|
||||||
<DialogDescription>
|
|
||||||
Select one of the puplished scripts to import its metadata.
|
|
||||||
</DialogDescription>
|
|
||||||
|
|
||||||
</DialogHeader>
|
|
||||||
<div className="flex items-center gap-2">
|
|
||||||
<div className="grid flex-1 gap-2">
|
|
||||||
<Select
|
|
||||||
value={selectedCategory}
|
|
||||||
onValueChange={setSelectedCategory}
|
|
||||||
>
|
|
||||||
<SelectTrigger>
|
|
||||||
<SelectValue placeholder="Category" />
|
|
||||||
</SelectTrigger>
|
|
||||||
<SelectContent>
|
|
||||||
{categories.map((category) => (
|
|
||||||
<SelectItem key={category.id} value={category.id.toString()}>
|
|
||||||
{category.name}
|
|
||||||
</SelectItem>
|
|
||||||
))}
|
|
||||||
</SelectContent>
|
|
||||||
</Select>
|
|
||||||
<Input
|
|
||||||
placeholder="Search for a script..."
|
|
||||||
value={searchQuery}
|
|
||||||
onChange={(e) => setSearchQuery(e.target.value)}
|
|
||||||
/>
|
|
||||||
{!selectedCategory && !searchQuery ? (
|
|
||||||
<p className="text-muted-foreground text-sm text-center">
|
|
||||||
Select a category or search for a script
|
|
||||||
</p>
|
|
||||||
) : scripts.length === 0 ? (
|
|
||||||
<p className="text-muted-foreground text-sm text-center">
|
|
||||||
No scripts found
|
|
||||||
</p>
|
|
||||||
) : (
|
|
||||||
<div className="grid grid-cols-3 auto-rows-min h-64 overflow-y-auto gap-4">
|
|
||||||
{scripts.map(script => (
|
|
||||||
<div
|
|
||||||
key={script.slug}
|
|
||||||
className="p-2 border rounded cursor-pointer hover:bg-accent hover:text-accent-foreground"
|
|
||||||
onClick={() => {
|
|
||||||
importScript(script);
|
|
||||||
setIsImportDialogOpen(false);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Image
|
|
||||||
src={script.logo || `/${basePath}/logo.png`}
|
|
||||||
alt={script.name}
|
|
||||||
className="w-full h-12 object-contain mb-2"
|
|
||||||
width={16}
|
|
||||||
height={16}
|
|
||||||
unoptimized
|
|
||||||
/>
|
|
||||||
<p className="text-sm text-center">{script.name}</p>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</DialogContent>
|
|
||||||
</Dialog>
|
|
||||||
</DropdownMenuGroup>
|
|
||||||
</DropdownMenuContent>
|
|
||||||
</DropdownMenu>
|
|
||||||
</div>
|
|
||||||
<form className="space-y-4">
|
<form className="space-y-4">
|
||||||
<div className="grid grid-cols-2 gap-4">
|
<div className="grid grid-cols-2 gap-4">
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import { Button } from "./ui/button";
|
|||||||
import { Badge } from "./ui/badge";
|
import { Badge } from "./ui/badge";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
|
||||||
export function search(scripts: Script[], query: string): Script[] {
|
function search(scripts: Script[], query: string): Script[] {
|
||||||
const queryLower = query.toLowerCase().trim();
|
const queryLower = query.toLowerCase().trim();
|
||||||
const searchWords = queryLower.split(/\s+/).filter(Boolean);
|
const searchWords = queryLower.split(/\s+/).filter(Boolean);
|
||||||
|
|
||||||
|
|||||||
@@ -1,132 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: MickLesk (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/bluewave-labs/Checkmate
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
|
||||||
$STD apt install -y \
|
|
||||||
build-essential \
|
|
||||||
openssl \
|
|
||||||
nginx
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
MONGO_VERSION="8.0" setup_mongodb
|
|
||||||
NODE_VERSION="22" setup_nodejs
|
|
||||||
fetch_and_deploy_gh_release "checkmate" "bluewave-labs/Checkmate"
|
|
||||||
|
|
||||||
msg_info "Configuring Checkmate"
|
|
||||||
JWT_SECRET="$(openssl rand -hex 32)"
|
|
||||||
cat <<EOF >/opt/checkmate/server/.env
|
|
||||||
CLIENT_HOST="http://${LOCAL_IP}"
|
|
||||||
JWT_SECRET="${JWT_SECRET}"
|
|
||||||
DB_CONNECTION_STRING="mongodb://localhost:27017/checkmate_db"
|
|
||||||
TOKEN_TTL="99d"
|
|
||||||
ORIGIN="${LOCAL_IP}"
|
|
||||||
LOG_LEVEL="info"
|
|
||||||
SERVER_HOST=0.0.0.0
|
|
||||||
SERVER_PORT=52345
|
|
||||||
EOF
|
|
||||||
cat <<EOF >/opt/checkmate/client/.env.local
|
|
||||||
VITE_APP_API_BASE_URL="/api/v1"
|
|
||||||
UPTIME_APP_API_BASE_URL="/api/v1"
|
|
||||||
VITE_APP_LOG_LEVEL="warn"
|
|
||||||
EOF
|
|
||||||
msg_ok "Configured Checkmate"
|
|
||||||
|
|
||||||
msg_info "Installing Checkmate Server"
|
|
||||||
cd /opt/checkmate/server
|
|
||||||
$STD npm install
|
|
||||||
$STD npm run build
|
|
||||||
msg_ok "Installed Checkmate Server"
|
|
||||||
|
|
||||||
msg_info "Installing Checkmate Client"
|
|
||||||
cd /opt/checkmate/client
|
|
||||||
$STD npm install
|
|
||||||
VITE_APP_API_BASE_URL="/api/v1" UPTIME_APP_API_BASE_URL="/api/v1" VITE_APP_LOG_LEVEL="warn" $STD npm run build
|
|
||||||
msg_ok "Installed Checkmate Client"
|
|
||||||
|
|
||||||
msg_info "Creating Services"
|
|
||||||
cat <<EOF >/etc/systemd/system/checkmate-server.service
|
|
||||||
[Unit]
|
|
||||||
Description=Checkmate Server
|
|
||||||
After=network.target mongod.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
User=root
|
|
||||||
WorkingDirectory=/opt/checkmate/server
|
|
||||||
EnvironmentFile=/opt/checkmate/server/.env
|
|
||||||
ExecStart=/usr/bin/npm start
|
|
||||||
Restart=on-failure
|
|
||||||
RestartSec=5
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
cat <<EOF >/etc/systemd/system/checkmate-client.service
|
|
||||||
[Unit]
|
|
||||||
Description=Checkmate Client
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
User=root
|
|
||||||
WorkingDirectory=/opt/checkmate/client
|
|
||||||
ExecStart=/usr/bin/npm run preview -- --host 127.0.0.1 --port 5173
|
|
||||||
Restart=on-failure
|
|
||||||
RestartSec=5
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
$STD systemctl enable -q --now checkmate-server
|
|
||||||
$STD systemctl enable -q --now checkmate-client
|
|
||||||
msg_ok "Created Services"
|
|
||||||
|
|
||||||
msg_info "Configuring Nginx Reverse Proxy"
|
|
||||||
cat <<EOF >/etc/nginx/sites-available/checkmate
|
|
||||||
server {
|
|
||||||
listen 80 default_server;
|
|
||||||
server_name _;
|
|
||||||
|
|
||||||
client_max_body_size 100M;
|
|
||||||
|
|
||||||
# Client UI
|
|
||||||
location / {
|
|
||||||
proxy_pass http://127.0.0.1:5173;
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_set_header Upgrade \$http_upgrade;
|
|
||||||
proxy_set_header Connection "upgrade";
|
|
||||||
proxy_set_header Host \$host;
|
|
||||||
proxy_set_header X-Real-IP \$remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
|
||||||
}
|
|
||||||
|
|
||||||
# API Server
|
|
||||||
location /api/v1/ {
|
|
||||||
proxy_pass http://127.0.0.1:52345/api/v1/;
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_set_header Host \$host;
|
|
||||||
proxy_set_header X-Real-IP \$remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
ln -sf /etc/nginx/sites-available/checkmate /etc/nginx/sites-enabled/checkmate
|
|
||||||
rm -f /etc/nginx/sites-enabled/default
|
|
||||||
$STD systemctl reload nginx
|
|
||||||
msg_ok "Configured Nginx Reverse Proxy"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
cleanup_lxc
|
|
||||||
@@ -14,7 +14,7 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "memos" "usememos/memos" "prebuild" "v0.25.3" "/opt/memos" "memos*linux_amd64.tar.gz"
|
fetch_and_deploy_gh_release "memos" "usememos/memos" "prebuild" "latest" "/opt/memos" "memos*linux_amd64.tar.gz"
|
||||||
mkdir -p /opt/memos_data
|
mkdir -p /opt/memos_data
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "nocodb" "nocodb/nocodb" "singlefile" "0.301.1" "/opt/nocodb/" "Noco-linux-x64"
|
fetch_and_deploy_gh_release "nocodb" "nocodb/nocodb" "singlefile" "latest" "/opt/nocodb/" "Noco-linux-x64"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
cat <<EOF >/etc/systemd/system/nocodb.service
|
cat <<EOF >/etc/systemd/system/nocodb.service
|
||||||
|
|||||||
Reference in New Issue
Block a user