Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,9 @@ sendTo('sql.0', 'getEnabledDPs', {}, function (result) {
-->

## Changelog
### **WORK IN PROGRESS**
* (@GermanBluefox) Fixed "Test connection" reporting a failure for a working configuration: the request was built as a text template that could produce invalid JSON, and it left out `dbname`, `doNotCreateDatabase` and the docker settings (#355)

### **WORK IN PROGRESS**
* (@GermanBluefox) "Record changes only" now compares the value instead of the controller's last-change timestamp, so an alias with a read converter no longer stores a row per source change (#295)

Expand Down
3 changes: 2 additions & 1 deletion admin/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,6 @@
"Root password": "Root-Passwort",
"Root URL": "Root-URL",
"Defines the root URL, useful when PhpMyAdmin is behind a reverse proxy.": "Legt die Root-URL fest, nützlich wenn phpMyAdmin hinter einem Reverse-Proxy läuft.",
"Statistics": "Statistik"
"Statistics": "Statistik",
"The test request arrived without a configuration": "Die Testanfrage kam ohne Konfiguration an"
}
3 changes: 2 additions & 1 deletion admin/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,6 @@
"Root password": "Root password",
"Root URL": "Root URL",
"Defines the root URL, useful when PhpMyAdmin is behind a reverse proxy.": "Defines the root URL, useful when PhpMyAdmin is behind a reverse proxy.",
"Statistics": "Statistics"
"Statistics": "Statistics",
"The test request arrived without a configuration": "The test request arrived without a configuration"
}
3 changes: 2 additions & 1 deletion admin/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,6 @@
"Root password": "Contraseña de root",
"Root URL": "URL raíz",
"Defines the root URL, useful when PhpMyAdmin is behind a reverse proxy.": "Define la URL raíz, útil cuando phpMyAdmin está detrás de un proxy inverso.",
"Statistics": "Estadísticas"
"Statistics": "Estadísticas",
"The test request arrived without a configuration": "La solicitud de prueba llegó sin configuración"
}
3 changes: 2 additions & 1 deletion admin/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,6 @@
"Root password": "Mot de passe root",
"Root URL": "URL racine",
"Defines the root URL, useful when PhpMyAdmin is behind a reverse proxy.": "Définit l’URL racine, utile lorsque phpMyAdmin est derrière un proxy inverse.",
"Statistics": "Statistiques"
"Statistics": "Statistiques",
"The test request arrived without a configuration": "La demande de test est arrivée sans configuration"
}
3 changes: 2 additions & 1 deletion admin/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,6 @@
"Root password": "Password di root",
"Root URL": "URL radice",
"Defines the root URL, useful when PhpMyAdmin is behind a reverse proxy.": "Definisce l’URL radice, utile quando phpMyAdmin si trova dietro un reverse proxy.",
"Statistics": "Statistiche"
"Statistics": "Statistiche",
"The test request arrived without a configuration": "La richiesta di test è arrivata senza configurazione"
}
3 changes: 2 additions & 1 deletion admin/i18n/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,6 @@
"Root password": "Root-wachtwoord",
"Root URL": "Root-URL",
"Defines the root URL, useful when PhpMyAdmin is behind a reverse proxy.": "Bepaalt de root-URL, handig wanneer phpMyAdmin achter een reverse proxy draait.",
"Statistics": "Statistieken"
"Statistics": "Statistieken",
"The test request arrived without a configuration": "Het testverzoek kwam aan zonder configuratie"
}
3 changes: 2 additions & 1 deletion admin/i18n/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,6 @@
"Root password": "Hasło roota",
"Root URL": "Główny adres URL",
"Defines the root URL, useful when PhpMyAdmin is behind a reverse proxy.": "Określa główny adres URL, przydatne gdy phpMyAdmin działa za reverse proxy.",
"Statistics": "Statystyki"
"Statistics": "Statystyki",
"The test request arrived without a configuration": "Żądanie testu dotarło bez konfiguracji"
}
3 changes: 2 additions & 1 deletion admin/i18n/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,6 @@
"Root password": "Palavra-passe de root",
"Root URL": "URL raiz",
"Defines the root URL, useful when PhpMyAdmin is behind a reverse proxy.": "Define o URL raiz, útil quando o phpMyAdmin está atrás de um proxy inverso.",
"Statistics": "Estatísticas"
"Statistics": "Estatísticas",
"The test request arrived without a configuration": "O pedido de teste chegou sem configuração"
}
3 changes: 2 additions & 1 deletion admin/i18n/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,6 @@
"Root password": "Пароль root",
"Root URL": "Корневой URL",
"Defines the root URL, useful when PhpMyAdmin is behind a reverse proxy.": "Задаёт корневой URL, полезно, когда phpMyAdmin находится за обратным прокси.",
"Statistics": "Статистика"
"Statistics": "Статистика",
"The test request arrived without a configuration": "Запрос на проверку пришёл без конфигурации"
}
3 changes: 2 additions & 1 deletion admin/i18n/zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,6 @@
"Root password": "Root 密码",
"Root URL": "根 URL",
"Defines the root URL, useful when PhpMyAdmin is behind a reverse proxy.": "定义根 URL,当 phpMyAdmin 位于反向代理之后时很有用。",
"Statistics": "统计"
"Statistics": "统计",
"The test request arrived without a configuration": "测试请求未附带配置"
}
5 changes: 3 additions & 2 deletions admin/jsonConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,12 @@
"disabled": "!_alive",
"type": "sendTo",
"error": {
"connect timeout": "Connection timeout"
"connect timeout": "Connection timeout",
"The test request arrived without a configuration": "The test request arrived without a configuration"
},
"icon": "data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUxMiIgdmlld0JveD0iMCAwIDMyIDMyIiB3aWR0aD0iNTEyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPg0KICAgIDxwYXRoIGZpbGw9ImN1cnJlbnRDb2xvciIgZD0ibTIyLjk4NSAxMy42OTJoLS4wMTl2LTEuNzQ2YS44MjIuODIyIDAgMCAwIDAtLjEzOSAxIDEgMCAwIDAgLS4wMTEtLjE0N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jYyOCAwIDAgMCAtNi41NjEgMHoiLz4NCiAgICA8ZWxsaXBzZSBmaWxsPSJjdXJyZW50Q29sb3IiIGN4PSIyMi45ODUiIGN5PSIyNC44NDMiIHJ4PSIxLjY2NyIgcnk9IjEuNjc0Ii8+DQogICAgPHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtMjcuOTc5IDE5Ljc2OGE3LjA0NSA3LjA0NSAwIDAgMCAtOS45ODggMCAxIDEgMCAxIDAgMS40MTcgMS40MTIgNS4wNDUgNS4wNDUgMCAwIDEgNy4xNTQgMCAxIDEgMCAxIDAgMS40MTctMS40MTJ6Ii8+DQo8L3N2Zz4=",
"command": "test",
"jsonData": "{\"config\": {\"dbtype\": \"${data.dbtype}\", \"port\": \"${data.port}\", \"host\": \"${data.host}\", \"user\": \"${data.user}\", \"fileName\": \"${data.fileName}\", \"password\": \"${data.password}\", \"encrypt\": ${data.encrypt}, \"rejectUnauthorized\": ${data.rejectUnauthorized}}}",
"jsonData": "{\"config\": {\"dbtype\": ${JSON.stringify(data.dbtype || '')}, \"host\": ${JSON.stringify(data.host || '')}, \"port\": ${JSON.stringify(data.port || 0)}, \"user\": ${JSON.stringify(data.user || '')}, \"password\": ${JSON.stringify(data.password || '')}, \"dbname\": ${JSON.stringify(data.dbname || '')}, \"fileName\": ${JSON.stringify(data.fileName || '')}, \"encrypt\": ${JSON.stringify(!!data.encrypt)}, \"rejectUnauthorized\": ${JSON.stringify(!!data.rejectUnauthorized)}, \"doNotCreateDatabase\": ${JSON.stringify(!!data.doNotCreateDatabase)}, \"dockerMysql\": ${JSON.stringify(data.dockerMysql || null)}}}",
"label": "Test connection"
},

Expand Down
5 changes: 4 additions & 1 deletion build/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/main.js.map

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1008,8 +1008,16 @@ export class SqlAdapter extends Adapter {

async testConnection(msg: ioBroker.Message): Promise<void> {
if (!msg?.message?.config) {
// Not a database problem: the request reached us without any settings. The admin builds
// the payload from a template and drops it silently when the result does not parse, so
// "invalid config" sent people looking at settings that were fine (#355).
if (msg.callback) {
this.sendTo(msg.from, msg.command, { error: 'invalid config' }, msg.callback);
this.sendTo(
msg.from,
msg.command,
{ error: 'The test request arrived without a configuration' },
msg.callback,
);
}
return;
}
Expand Down
Loading