Merge branch 'master' into refactor/filters

This commit is contained in:
Frank Elsinga 2026-01-17 13:20:45 +01:00 committed by GitHub
commit 2edf731c9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 35 additions and 16 deletions

View File

@ -1,5 +1,9 @@
name: Auto Test
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-server
cancel-in-progress: true
on:
push:
branches: [master, 1.23.X, 3.0.0]

View File

@ -5,7 +5,7 @@ const { escape } = require("html-escaper");
* Returns a string that represents the javascript that is required to insert the Plausible Analytics script
* into a webpage.
* @param {string} scriptUrl the Plausible Analytics script url.
* @param {string} domainsToMonitor Domains to track seperated by a ',' to add Plausible Analytics script.
* @param {string} domainsToMonitor Domains to track separated by a ',' to add Plausible Analytics script.
* @returns {string} HTML script tags to inject into page
*/
function getPlausibleAnalyticsScript(scriptUrl, domainsToMonitor) {

View File

@ -30,10 +30,13 @@ async function getRdapServer(tld) {
return null;
}
for (const service of rdapList["services"]) {
const [tlds, urls] = service;
if (tlds.includes(tld)) {
return urls[0];
const services = rdapList["services"] ?? [];
const rootTld = tld?.split(".").pop();
if (rootTld) {
for (const [tlds, urls] of services) {
if (tlds.includes(rootTld)) {
return urls[0];
}
}
}
log.debug("rdap", `No RDAP server found for TLD ${tld}`);
@ -173,16 +176,18 @@ class DomainExpiry extends BeanModel {
});
}
const rdap = await getRdapServer(tld.publicSuffix);
const publicSuffix = tld.publicSuffix;
const rootTld = publicSuffix.split(".").pop();
const rdap = await getRdapServer(publicSuffix);
if (!rdap) {
throw new TranslatableError("domain_expiry_unsupported_unsupported_tld_no_rdap_endpoint", {
publicSuffix: tld.publicSuffix,
publicSuffix,
});
}
return {
domain: tld.domain,
tld: tld.publicSuffix,
tld: rootTld,
};
}

View File

@ -1,5 +1,5 @@
<template>
<div class="shadow-box mb-3" :style="boxStyle">
<div class="shadow-box mb-3 p-0" :style="boxStyle">
<div class="list-header">
<!-- Line 1: Checkbox + Status + Tags + Search Bar -->
<div class="filter-row">
@ -7,7 +7,7 @@
<a v-if="searchText != ''" class="search-icon" @click="clearSearchText">
<font-awesome-icon icon="times" />
</a>
<form>
<form @submit.prevent>
<input
v-model="searchText"
class="form-control search-input"
@ -89,7 +89,7 @@
</div>
<div
ref="monitorList"
class="monitor-list"
class="monitor-list px-2"
:class="{ scrollbar: scrollbar }"
:style="monitorListStyle"
data-testid="monitor-list"
@ -536,7 +536,6 @@ export default {
.list-header {
border-bottom: 1px solid #dee2e6;
border-radius: 10px 10px 0 0;
margin: -10px;
margin-bottom: 10px;
padding: 10px;
display: flex;
@ -696,7 +695,6 @@ export default {
@media (max-width: 770px) {
.list-header {
margin: -20px;
margin-bottom: 10px;
padding: 20px;
}

View File

@ -24,12 +24,12 @@
<router-link :to="monitorURL(monitor.id)" class="item" :class="{ disabled: !monitor.active }">
<div class="row">
<div
class="col-9 col-xl-6 small-padding"
class="col-9 col-xl-6 small-padding d-flex align-items-center"
:class="{
'monitor-item': $root.userHeartbeatBar == 'bottom' || $root.userHeartbeatBar == 'none',
}"
>
<div class="info">
<div class="info d-flex align-items-center gap-2">
<Uptime :monitor="monitor" type="24" :pill="true" />
<span v-if="hasChildren" class="collapse-padding" @click.prevent="changeCollapsed">
<font-awesome-icon
@ -383,6 +383,7 @@ export default {
/* We don't want the padding change due to the border animated */
.item {
padding: 12px 15px;
transition: none !important;
}

View File

@ -2755,7 +2755,7 @@ message HealthCheckResponse {
this.monitor.jsonPath = "$";
}
// Set default condition for for jsonPathOperator
// Set default condition for jsonPathOperator
if (!this.monitor.jsonPathOperator) {
this.monitor.jsonPathOperator = "==";
}

View File

@ -157,6 +157,17 @@ describe("Domain Expiry", () => {
assert.strictEqual(supportInfo.tld, "com");
});
test("supports multi-level public suffix via RDAP fallback (e.g. com.br)", async () => {
const monitor = {
type: "http",
url: "https://record.com.br",
domainExpiryNotification: true,
};
const supportInfo = await DomainExpiry.checkSupport(monitor);
assert.strictEqual(supportInfo.domain, "record.com.br");
assert.strictEqual(supportInfo.tld, "br");
});
test("handles complex subdomain correctly", async () => {
const monitor = {
type: "http",