Compare commits

..

4 Commits

Author SHA1 Message Date
Jamie Curnow
f35671db21 Fix #4837 for those with older config 2025-11-05 10:56:23 +10:00
Jamie Curnow
a3a0614948 Fix #4828 showing incorrect certicificate value 2025-11-05 10:21:55 +10:00
Jamie Curnow
06b67ed4bc Remove user name column from audit log
All checks were successful
Close stale issues and PRs / stale (push) Successful in 20s
2025-11-04 14:57:10 +10:00
Jamie Curnow
4a0e27572e Fix missing translation for renew cert dialog 2025-11-04 14:54:02 +10:00
6 changed files with 27 additions and 12 deletions

View File

@@ -25,6 +25,12 @@ const configure = () => {
if (configData?.database) { if (configData?.database) {
logger.info(`Using configuration from file: ${filename}`); logger.info(`Using configuration from file: ${filename}`);
// Migrate those who have "mysql" engine to "mysql2"
if (configData.database.engine === "mysql") {
configData.database.engine = mysqlEngine;
}
instance = configData; instance = configData;
instance.keys = getKeys(); instance.keys = getKeys();
return; return;
@@ -33,12 +39,12 @@ const configure = () => {
const toBool = (v) => /^(1|true|yes|on)$/i.test((v || '').trim()); const toBool = (v) => /^(1|true|yes|on)$/i.test((v || '').trim());
const envMysqlHost = process.env.DB_MYSQL_HOST || null; const envMysqlHost = process.env.DB_MYSQL_HOST || null;
const envMysqlUser = process.env.DB_MYSQL_USER || null; const envMysqlUser = process.env.DB_MYSQL_USER || null;
const envMysqlName = process.env.DB_MYSQL_NAME || null; const envMysqlName = process.env.DB_MYSQL_NAME || null;
const envMysqlSSL = toBool(process.env.DB_MYSQL_SSL); const envMysqlSSL = toBool(process.env.DB_MYSQL_SSL);
const envMysqlSSLRejectUnauthorized = process.env.DB_MYSQL_SSL_REJECT_UNAUTHORIZED === undefined ? true : toBool(process.env.DB_MYSQL_SSL_REJECT_UNAUTHORIZED); const envMysqlSSLRejectUnauthorized = process.env.DB_MYSQL_SSL_REJECT_UNAUTHORIZED === undefined ? true : toBool(process.env.DB_MYSQL_SSL_REJECT_UNAUTHORIZED);
const envMysqlSSLVerifyIdentity = process.env.DB_MYSQL_SSL_VERIFY_IDENTITY === undefined ? true : toBool(process.env.DB_MYSQL_SSL_VERIFY_IDENTITY); const envMysqlSSLVerifyIdentity = process.env.DB_MYSQL_SSL_VERIFY_IDENTITY === undefined ? true : toBool(process.env.DB_MYSQL_SSL_VERIFY_IDENTITY);
if (envMysqlHost && envMysqlUser && envMysqlName) { if (envMysqlHost && envMysqlUser && envMysqlName) {
// we have enough mysql creds to go with mysql // we have enough mysql creds to go with mysql
logger.info("Using MySQL configuration"); logger.info("Using MySQL configuration");

View File

@@ -5,5 +5,14 @@ interface Props {
certificate?: Certificate; certificate?: Certificate;
} }
export function CertificateFormatter({ certificate }: Props) { export function CertificateFormatter({ certificate }: Props) {
return <T id={certificate ? "lets-encrypt" : "http-only"} />; let translation = "http-only";
if (certificate) {
translation = certificate.provider;
if (translation === "letsencrypt") {
translation = "lets-encrypt";
} else if (translation === "other") {
translation = "certificates.custom";
}
}
return <T id={translation} />;
} }

View File

@@ -32,6 +32,7 @@
"certificate.none.subtitle.for-http": "This host will not use HTTPS", "certificate.none.subtitle.for-http": "This host will not use HTTPS",
"certificate.none.title": "None", "certificate.none.title": "None",
"certificate.not-in-use": "Not Used", "certificate.not-in-use": "Not Used",
"certificate.renew": "Renew Certificate",
"certificates": "Certificates", "certificates": "Certificates",
"certificates.custom": "Custom Certificate", "certificates.custom": "Custom Certificate",
"certificates.custom.warning": "Key files protected with a passphrase are not supported.", "certificates.custom.warning": "Key files protected with a passphrase are not supported.",

View File

@@ -98,6 +98,9 @@
"certificate.not-in-use": { "certificate.not-in-use": {
"defaultMessage": "Not Used" "defaultMessage": "Not Used"
}, },
"certificate.renew": {
"defaultMessage": "Renew Certificate"
},
"certificates": { "certificates": {
"defaultMessage": "Certificates" "defaultMessage": "Certificates"
}, },

View File

@@ -47,7 +47,7 @@ const RenewCertificateModal = EasyModal.create(({ id, visible, remove }: Props)
<Modal show={visible} onHide={isSubmitting ? undefined : remove}> <Modal show={visible} onHide={isSubmitting ? undefined : remove}>
<Modal.Header closeButton={!isSubmitting}> <Modal.Header closeButton={!isSubmitting}>
<Modal.Title> <Modal.Title>
<T id="renew-certificate" /> <T id="certificate.renew" />
</Modal.Title> </Modal.Title>
</Modal.Header> </Modal.Header>
<Modal.Body> <Modal.Body>

View File

@@ -24,10 +24,6 @@ export default function Table({ data, isFetching, onSelectItem }: Props) {
className: "w-1", className: "w-1",
}, },
}), }),
columnHelper.accessor((row: AuditLog) => row.user?.name, {
id: "user.name",
header: intl.formatMessage({ id: "column.name" }),
}),
columnHelper.accessor((row: AuditLog) => row, { columnHelper.accessor((row: AuditLog) => row, {
id: "objectType", id: "objectType",
header: intl.formatMessage({ id: "column.event" }), header: intl.formatMessage({ id: "column.event" }),