diff --git a/agent.md b/agent.md
index 4d4c490..7ceeea8 100644
--- a/agent.md
+++ b/agent.md
@@ -107,6 +107,7 @@ There are three selectable data sources:
- Supplier/manufacturer website settings such as source URL, search templates, fallback mode, browser engine, headless mode, wait time, notes and enabled/priority flags belong in Local scrape DB, not in the product catalog database.
- The Settings modal should expose an `Open Adminer` action beside `Local scrape DB`; it opens the local Adminer URL from `ADMINER_URL` / `databaseTool.url` for inspecting local MariaDB databases.
- Start Adminer only through `npm run adminer`; the script downloads the ignored local `tools/adminer/adminer.php` file when missing and runs it on the configured local Adminer URL. Adminer requires local PHP CLI.
+- Adminer login help may show non-secret local connection fields such as system, host, port, database and user, but must never render or print the actual password. Show password source as `.env DB_PASSWORD` instead.
- It must never be used as a fallback for catalog reads. When selected in the UI, existing catalog reads continue using Local 9bplus DB until dedicated scrape-storage endpoints are added.
- The schema is versioned in `sql/local-scrape-db.sql` and can be created with `npm run db:create-scrape`.
- Existing legacy mapping rows from `Local 9bplus DB` can be copied into Local scrape DB with `npm run db:migrate-mapping-to-scrape`.
diff --git a/public/app.js b/public/app.js
index 9a2540d..c9af3fc 100644
--- a/public/app.js
+++ b/public/app.js
@@ -51,6 +51,9 @@ const localDbInputs = document.querySelectorAll("#localDbFields input");
const testLocalDbButton = document.querySelector("#testLocalDbButton");
const localDbTestResult = document.querySelector("#localDbTestResult");
const openDbGateButton = document.querySelector("#openDbGateButton");
+const adminerServerValue = document.querySelector("#adminerServerValue");
+const adminerUserValue = document.querySelector("#adminerUserValue");
+const adminerDatabaseValue = document.querySelector("#adminerDatabaseValue");
const lightContrastSelect = document.querySelector("#lightContrastSelect");
const darkContrastSelect = document.querySelector("#darkContrastSelect");
const catalogScreen = document.querySelector(".catalog-screen");
@@ -1012,6 +1015,7 @@ function loadDatabaseMode() {
}
syncDatabasePermissions(mode);
syncLocalDbFields(mode);
+ syncAdminerLoginHint();
renderDatabaseModeNote(mode);
refreshDatabaseStatusLabel();
}
@@ -1029,6 +1033,16 @@ function saveLocalDbSettings() {
for (const input of localDbInputs)
settings[input.id] = input.value;
localStorage.setItem("catalog-maker:local-db-settings", JSON.stringify(settings));
+ syncAdminerLoginHint();
+}
+function syncAdminerLoginHint() {
+ const host = document.querySelector("#localDbHost")?.value || "127.0.0.1";
+ const port = document.querySelector("#localDbPort")?.value || "3306";
+ const user = document.querySelector("#localDbUser")?.value || "root";
+ const catalogDb = document.querySelector("#localDbName")?.value || "9bplus";
+ adminerServerValue.textContent = `${host}:${port}`;
+ adminerUserValue.textContent = user;
+ adminerDatabaseValue.textContent = `${catalogDb} / catalog_scrape`;
}
async function testLocalDbConnection() {
saveLocalDbSettings();
diff --git a/public/app.ts b/public/app.ts
index 905ee4a..71ee18b 100644
--- a/public/app.ts
+++ b/public/app.ts
@@ -51,6 +51,9 @@ const localDbInputs = document.querySelectorAll("#localDbFields input");
const testLocalDbButton = document.querySelector("#testLocalDbButton");
const localDbTestResult = document.querySelector("#localDbTestResult");
const openDbGateButton = document.querySelector("#openDbGateButton");
+const adminerServerValue = document.querySelector("#adminerServerValue");
+const adminerUserValue = document.querySelector("#adminerUserValue");
+const adminerDatabaseValue = document.querySelector("#adminerDatabaseValue");
const lightContrastSelect = document.querySelector("#lightContrastSelect");
const darkContrastSelect = document.querySelector("#darkContrastSelect");
const catalogScreen = document.querySelector(".catalog-screen");
@@ -1105,6 +1108,7 @@ function loadDatabaseMode() {
}
syncDatabasePermissions(mode);
syncLocalDbFields(mode);
+ syncAdminerLoginHint();
renderDatabaseModeNote(mode);
refreshDatabaseStatusLabel();
}
@@ -1123,6 +1127,17 @@ function saveLocalDbSettings() {
const settings = {};
for (const input of localDbInputs) settings[input.id] = input.value;
localStorage.setItem("catalog-maker:local-db-settings", JSON.stringify(settings));
+ syncAdminerLoginHint();
+}
+
+function syncAdminerLoginHint() {
+ const host = document.querySelector("#localDbHost")?.value || "127.0.0.1";
+ const port = document.querySelector("#localDbPort")?.value || "3306";
+ const user = document.querySelector("#localDbUser")?.value || "root";
+ const catalogDb = document.querySelector("#localDbName")?.value || "9bplus";
+ adminerServerValue.textContent = `${host}:${port}`;
+ adminerUserValue.textContent = user;
+ adminerDatabaseValue.textContent = `${catalogDb} / catalog_scrape`;
}
async function testLocalDbConnection() {
diff --git a/public/index.html b/public/index.html
index 65b6358..1c599e7 100644
--- a/public/index.html
+++ b/public/index.html
@@ -205,6 +205,13 @@
Connection not tested.
Local 9bplus database selected.
+
+
SystemMySQL
+
Server127.0.0.1:3306
+
Userroot
+
PasswordDB_PASSWORD in .env
+
Database9bplus / catalog_scrape
+