Update sqlpage app (#6982)

Rebuilt-from-PR: #6969
Source-PR: https://github.com/okxlin/appstore/pull/6969
Maintainer-workflow: appstore-pr-maintainer
This commit is contained in:
okxlin
2026-09-18 09:41:47 +08:00
committed by GitHub
parent fc1d0bd10d
commit 9bca7abb81
16 changed files with 68 additions and 92 deletions
@@ -1,5 +0,0 @@
create table todos(
id integer primary key,
title text not null,
created_at timestamp default current_timestamp
);
-3
View File
@@ -1,3 +0,0 @@
{
"database_url": "sqlite:///var/www/sqlpage.db?mode=rwc"
}
@@ -1,16 +0,0 @@
delete from todos
where id = $todo_id and $confirm = 'yes'
returning
'redirect' as component,
'/' as link;
select 'dynamic' as component, sqlpage.run_sql('shell.sql') as properties;
select
'alert' as component,
'red' as color,
'Confirm deletion' as title,
'Are you sure you want to delete the following todo item?\n\n> ' || title as description_md,
'?todo_id=' || $todo_id || '&confirm=yes' as link,
'Delete' as link_text
from todos where id = $todo_id;
@@ -1,20 +0,0 @@
select 'dynamic' as component, sqlpage.run_sql('shell.sql') as properties;
select 'list' as component,
'Todo' as title,
'No todo yet...' as empty_title;
select
title,
'todo_form.sql?todo_id=' || id as edit_link,
'delete.sql?todo_id=' || id as delete_link
from todos;
select
'button' as component,
'center' as justify;
select
'todo_form.sql' as link,
'green' as color,
'Add new todo' as title,
'circle-plus' as icon;
@@ -1,4 +0,0 @@
select 'shell' as component,
printf('Todo list (%d)', count(*)) as title,
'timeline' as menu_item
from todos;
@@ -1,12 +0,0 @@
select 'dynamic' as component, sqlpage.run_sql('shell.sql') as properties;
select 'timeline' as component;
select
title,
'todo_form.sql?todo_id=' || id as link,
created_at as date,
'calendar' as icon,
'green' as color,
printf('%d days ago', julianday('now') - julianday(created_at)) as description
from todos
order by created_at desc;
@@ -1,22 +0,0 @@
insert or replace into todos(id, title)
select $todo_id, :todo
where :todo is not null
returning
'redirect' as component,
'/' as link;
select 'dynamic' as component, sqlpage.run_sql('shell.sql') as properties;
select
'form' as component,
'Todo' as title,
case when $todo_id is null then
'Add new todo'
else
'Edit todo'
end as validate;
select
'Todo item' as label,
'todo' as name,
'What do you have to do?' as placeholder,
(select title from todos where id = $todo_id) as value;
@@ -8,12 +8,16 @@ additionalProperties:
label:
en: Bind Address
zh: 绑定地址
zh-Hant: 綁定位址
zh-hant: 綁定位址
ja: バインドアドレス
ko: 바인드 주소
ru: Адрес привязки
ms: Alamat ikatan
pt-br: Endereco de vinculacao
tr: Bağlama adresi
es-es: Dirección de enlace
fa: نشانی اتصال
lo: ທີ່ຢູ່ສຳລັບຜູກ
required: true
type: text
- default: 8080
@@ -24,12 +28,16 @@ additionalProperties:
label:
en: HTTP Port
zh: HTTP 端口
zh-Hant: HTTP 埠
zh-hant: HTTP 埠
ja: HTTP ポート
ko: HTTP 포트
ru: HTTP-порт
ms: Port HTTP
pt-br: Porta HTTP
tr: Puerto HTTP
es-es: Puerto HTTP
fa: درگاه HTTP
lo: ພອດ HTTP
required: true
rule: paramPort
type: number
@@ -41,12 +49,16 @@ additionalProperties:
label:
en: Runtime Environment
zh: 运行环境
zh-Hant: 執行環境
zh-hant: 執行環境
ja: 実行環境
ko: 실행 환경
ru: Среда выполнения
ms: Persekitaran masa jalan
pt-br: Ambiente de execucao
tr: Çalışma ortamı
es-es: Entorno de ejecución
fa: محیط اجرا
lo: ສະພາບແວດລ້ອມການໃຊ້ງານ
required: true
type: select
values:
@@ -62,12 +74,16 @@ additionalProperties:
label:
en: Log Level
zh: 日志级别
zh-Hant: 日誌級別
zh-hant: 日誌級別
ja: ログレベル
ko: 로그 수준
ru: Уровень журнала
ms: Tahap log
pt-br: Nivel de log
tr: Günlük düzeyi
es-es: Nivel de registro
fa: سطح گزارش
lo: ລະດັບບັນທຶກ
required: true
type: select
values:
@@ -87,12 +103,16 @@ additionalProperties:
label:
en: Compress Responses
zh: 压缩响应
zh-Hant: 壓縮回應
zh-hant: 壓縮回應
ja: レスポンスを圧縮
ko: 응답 압축
ru: Сжатие ответов
ms: Mampatkan respons
pt-br: Compactar respostas
tr: Yanıtları sıkıştır
es-es: Comprimir respuestas
fa: فشرده‌سازی پاسخ‌ها
lo: ບີບອັດຄຳຕອບ
required: true
type: select
values:
@@ -108,12 +128,16 @@ additionalProperties:
label:
en: Maximum Upload Size (bytes)
zh: 最大上传大小(字节)
zh-Hant: 最大上傳大小(位元組)
zh-hant: 最大上傳大小(位元組)
ja: 最大アップロードサイズ(バイト)
ko: 최대 업로드 크기(바이트)
ru: Максимальный размер загрузки (байт)
ms: Saiz muat naik maksimum (bait)
pt-br: Tamanho maximo de upload (bytes)
tr: Maksimum yükleme boyutu (bayt)
es-es: Tamaño máximo de carga (bytes)
fa: حداکثر اندازه بارگذاری (بایت)
lo: ຂະໜາດອັບໂຫຼດສູງສຸດ (ໄບຕ໌)
required: true
type: number
- default: ./data
@@ -124,12 +148,16 @@ additionalProperties:
label:
en: Website Data Directory
zh: 网站数据目录
zh-Hant: 網站資料目錄
zh-hant: 網站資料目錄
ja: Web サイトデータディレクトリ
ko: 웹사이트 데이터 디렉터리
ru: Каталог данных сайта
ms: Direktori data laman web
pt-br: Diretorio de dados do site
tr: Web sitesi veri dizini
es-es: Directorio de datos del sitio web
fa: شاخه داده‌های وب‌سایت
lo: ໄດເຣັກທໍຣີຂໍ້ມູນເວັບໄຊ
required: true
type: text
- default: Asia/Shanghai
@@ -140,11 +168,15 @@ additionalProperties:
label:
en: Timezone
zh: 时区
zh-Hant: 時區
zh-hant: 時區
ja: タイムゾーン
ko: 시간대
ru: Часовой пояс
ms: Zon waktu
pt-br: Fuso horário
tr: Saat dilimi
es-es: Zona horaria
fa: منطقه زمانی
lo: ເຂດເວລາ
required: true
type: text
@@ -1,6 +1,6 @@
services:
sqlpage:
image: "lovasoa/sqlpage:v0.46.2"
image: "lovasoa/sqlpage:v0.46.3@sha256:354c683a50f541be01d427b3b664f1d5b36c28739f45bfb809be14b99b6ff649"
container_name: ${CONTAINER_NAME}
restart: unless-stopped
user: "1000:1000"
+22
View File
@@ -0,0 +1,22 @@
# SQLPage
## Introduction
SQLPage turns SQL queries into dynamic web pages. The 1Panel package runs the
SQLPage server with its web root stored in the app data directory, so site
content remains available across container upgrades.
## Features
- Build pages and forms from SQL files.
- Serve site content from the persistent `APP_DATA_DIR` directory.
- Keep SQLPage configuration in the package's read-only `config` directory.
- Disable dangerous HTML, protocol, and command execution options by default.
## Usage
After installation, open the configured HTTP port in the 1Panel app details.
Place site SQL files in the app data directory and adjust `config/sqlpage.json`
when you need to change the server configuration. The package uses the
configured bind address, port, environment, log level, response compression,
upload limit, data directory, and timezone values from the install form.
+5 -1
View File
@@ -23,9 +23,13 @@ additionalProperties:
description:
en: A dynamic website builder powered entirely by SQL
zh: 完全由 SQL 驱动的动态网站构建器
zh-Hant: 完全由 SQL 驅動的動態網站建置工具
zh-hant: 完全由 SQL 驅動的動態網站建置工具
ja: SQL だけで動的な Web サイトを構築するツール
ko: SQL만으로 동적 웹사이트를 구축하는 도구
ru: Конструктор динамических сайтов, полностью управляемый SQL
ms: Pembina laman web dinamik yang dikuasakan sepenuhnya oleh SQL
pt-br: Construtor de sites dinamicos totalmente orientado por SQL
tr: SQL ile tamamen çalışan dinamik web sitesi oluşturucu
es-es: Generador de sitios web dinámicos impulsado completamente por SQL
fa: سازنده وب‌سایت پویا که کاملاً با SQL کار می‌کند
lo: ເຄື່ອງມືສ້າງເວັບໄຊແບບໄດນາມິກທີ່ຂັບເຄື່ອນດ້ວຍ SQL
Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB