Merge branch 'master' into refactor/filters
This commit is contained in:
commit
2edf731c9b
4
.github/workflows/auto-test.yml
vendored
4
.github/workflows/auto-test.yml
vendored
@ -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]
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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 = "==";
|
||||
}
|
||||
|
||||
@ -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",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user