mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-06-14 16:42:35 +02:00
Merge branch 'louislam:master' into master
This commit is contained in:
commit
60019a4229
10 changed files with 252 additions and 37 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "uptime-kuma",
|
"name": "uptime-kuma",
|
||||||
"version": "1.10.0",
|
"version": "1.10.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -30,13 +30,13 @@
|
||||||
"build-docker": "npm run build-docker-debian && npm run build-docker-alpine",
|
"build-docker": "npm run build-docker-debian && npm run build-docker-alpine",
|
||||||
"build-docker-alpine-base": "docker buildx build -f docker/alpine-base.dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:base-alpine . --push",
|
"build-docker-alpine-base": "docker buildx build -f docker/alpine-base.dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:base-alpine . --push",
|
||||||
"build-docker-debian-base": "docker buildx build -f docker/debian-base.dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:base-debian . --push",
|
"build-docker-debian-base": "docker buildx build -f docker/debian-base.dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:base-debian . --push",
|
||||||
"build-docker-alpine": "docker buildx build -f docker/dockerfile-alpine --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:alpine -t louislam/uptime-kuma:1-alpine -t louislam/uptime-kuma:1.10.0-alpine --target release . --push",
|
"build-docker-alpine": "docker buildx build -f docker/dockerfile-alpine --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:alpine -t louislam/uptime-kuma:1-alpine -t louislam/uptime-kuma:1.10.1-alpine --target release . --push",
|
||||||
"build-docker-debian": "docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma -t louislam/uptime-kuma:1 -t louislam/uptime-kuma:1.10.0 -t louislam/uptime-kuma:debian -t louislam/uptime-kuma:1-debian -t louislam/uptime-kuma:1.10.0-debian --target release . --push",
|
"build-docker-debian": "docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma -t louislam/uptime-kuma:1 -t louislam/uptime-kuma:1.10.1 -t louislam/uptime-kuma:debian -t louislam/uptime-kuma:1-debian -t louislam/uptime-kuma:1.10.1-debian --target release . --push",
|
||||||
"build-docker-nightly": "docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:nightly --target nightly . --push",
|
"build-docker-nightly": "docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:nightly --target nightly . --push",
|
||||||
"build-docker-nightly-alpine": "docker buildx build -f docker/dockerfile-alpine --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:nightly-alpine --target nightly . --push",
|
"build-docker-nightly-alpine": "docker buildx build -f docker/dockerfile-alpine --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:nightly-alpine --target nightly . --push",
|
||||||
"build-docker-nightly-amd64": "docker buildx build -f docker/dockerfile --platform linux/amd64 -t louislam/uptime-kuma:nightly-amd64 --target nightly . --push --progress plain",
|
"build-docker-nightly-amd64": "docker buildx build -f docker/dockerfile --platform linux/amd64 -t louislam/uptime-kuma:nightly-amd64 --target nightly . --push --progress plain",
|
||||||
"upload-artifacts": "docker buildx build -f docker/dockerfile --platform linux/amd64 -t louislam/uptime-kuma:upload-artifact --build-arg GITHUB_TOKEN --target upload-artifact . --progress plain",
|
"upload-artifacts": "docker buildx build -f docker/dockerfile --platform linux/amd64 -t louislam/uptime-kuma:upload-artifact --build-arg GITHUB_TOKEN --target upload-artifact . --progress plain",
|
||||||
"setup": "git checkout 1.10.0 && npm ci --production && npm run download-dist",
|
"setup": "git checkout 1.10.1 && npm ci --production && npm run download-dist",
|
||||||
"download-dist": "node extra/download-dist.js",
|
"download-dist": "node extra/download-dist.js",
|
||||||
"update-version": "node extra/update-version.js",
|
"update-version": "node extra/update-version.js",
|
||||||
"mark-as-nightly": "node extra/mark-as-nightly.js",
|
"mark-as-nightly": "node extra/mark-as-nightly.js",
|
||||||
|
|
|
@ -141,6 +141,7 @@ class Monitor extends BeanModel {
|
||||||
// Do not do any queries/high loading things before the "bean.ping"
|
// Do not do any queries/high loading things before the "bean.ping"
|
||||||
let startTime = dayjs().valueOf();
|
let startTime = dayjs().valueOf();
|
||||||
|
|
||||||
|
debug(`[${this.name}] Prepare Options for axios`);
|
||||||
const options = {
|
const options = {
|
||||||
url: this.url,
|
url: this.url,
|
||||||
method: (this.method || "get").toLowerCase(),
|
method: (this.method || "get").toLowerCase(),
|
||||||
|
@ -160,6 +161,8 @@ class Monitor extends BeanModel {
|
||||||
return checkStatusCode(status, this.getAcceptedStatuscodes());
|
return checkStatusCode(status, this.getAcceptedStatuscodes());
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
debug(`[${this.name}] Axios Request`);
|
||||||
let res = await axios.request(options);
|
let res = await axios.request(options);
|
||||||
bean.msg = `${res.status} - ${res.statusText}`;
|
bean.msg = `${res.status} - ${res.statusText}`;
|
||||||
bean.ping = dayjs().valueOf() - startTime;
|
bean.ping = dayjs().valueOf() - startTime;
|
||||||
|
@ -167,12 +170,13 @@ class Monitor extends BeanModel {
|
||||||
// Check certificate if https is used
|
// Check certificate if https is used
|
||||||
let certInfoStartTime = dayjs().valueOf();
|
let certInfoStartTime = dayjs().valueOf();
|
||||||
if (this.getUrl()?.protocol === "https:") {
|
if (this.getUrl()?.protocol === "https:") {
|
||||||
|
debug(`[${this.name}] Check cert`);
|
||||||
try {
|
try {
|
||||||
let tlsInfoObject = checkCertificate(res);
|
let tlsInfoObject = checkCertificate(res);
|
||||||
tlsInfo = await this.updateTlsInfo(tlsInfoObject);
|
tlsInfo = await this.updateTlsInfo(tlsInfoObject);
|
||||||
|
|
||||||
if (!this.getIgnoreTls()) {
|
if (!this.getIgnoreTls()) {
|
||||||
debug("call sendCertNotification");
|
debug(`[${this.name}] call sendCertNotification`);
|
||||||
await this.sendCertNotification(tlsInfoObject);
|
await this.sendCertNotification(tlsInfoObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -351,15 +355,19 @@ class Monitor extends BeanModel {
|
||||||
|
|
||||||
let beatInterval = this.interval;
|
let beatInterval = this.interval;
|
||||||
|
|
||||||
|
debug(`[${this.name}] Check isImportant`);
|
||||||
let isImportant = Monitor.isImportantBeat(isFirstBeat, previousBeat?.status, bean.status);
|
let isImportant = Monitor.isImportantBeat(isFirstBeat, previousBeat?.status, bean.status);
|
||||||
|
|
||||||
// Mark as important if status changed, ignore pending pings,
|
// Mark as important if status changed, ignore pending pings,
|
||||||
// Don't notify if disrupted changes to up
|
// Don't notify if disrupted changes to up
|
||||||
if (isImportant) {
|
if (isImportant) {
|
||||||
bean.important = true;
|
bean.important = true;
|
||||||
|
|
||||||
|
debug(`[${this.name}] sendNotification`);
|
||||||
await Monitor.sendNotification(isFirstBeat, this, bean);
|
await Monitor.sendNotification(isFirstBeat, this, bean);
|
||||||
|
|
||||||
// Clear Status Page Cache
|
// Clear Status Page Cache
|
||||||
|
debug(`[${this.name}] apicache clear`);
|
||||||
apicache.clear();
|
apicache.clear();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -377,10 +385,14 @@ class Monitor extends BeanModel {
|
||||||
console.warn(`Monitor #${this.id} '${this.name}': Failing: ${bean.msg} | Interval: ${beatInterval} seconds | Type: ${this.type}`);
|
console.warn(`Monitor #${this.id} '${this.name}': Failing: ${bean.msg} | Interval: ${beatInterval} seconds | Type: ${this.type}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
debug(`[${this.name}] Send to socket`);
|
||||||
io.to(this.user_id).emit("heartbeat", bean.toJSON());
|
io.to(this.user_id).emit("heartbeat", bean.toJSON());
|
||||||
Monitor.sendStats(io, this.id, this.user_id);
|
Monitor.sendStats(io, this.id, this.user_id);
|
||||||
|
|
||||||
|
debug(`[${this.name}] Store`);
|
||||||
await R.store(bean);
|
await R.store(bean);
|
||||||
|
|
||||||
|
debug(`[${this.name}] prometheus.update`);
|
||||||
prometheus.update(bean, tlsInfo);
|
prometheus.update(bean, tlsInfo);
|
||||||
|
|
||||||
previousBeat = bean;
|
previousBeat = bean;
|
||||||
|
@ -394,7 +406,10 @@ class Monitor extends BeanModel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
debug(`[${this.name}] SetTimeout for next check.`);
|
||||||
this.heartbeatInterval = setTimeout(safeBeat, beatInterval * 1000);
|
this.heartbeatInterval = setTimeout(safeBeat, beatInterval * 1000);
|
||||||
|
} else {
|
||||||
|
console.log(`[${this.name}] isStop = true, no next check.`);
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -101,6 +101,10 @@ router.get("/api/status-page/config", async (_request, response) => {
|
||||||
config.statusPagePublished = true;
|
config.statusPagePublished = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! config.statusPageTags) {
|
||||||
|
config.statusPageTags = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (! config.title) {
|
if (! config.title) {
|
||||||
config.title = "Uptime Kuma";
|
config.title = "Uptime Kuma";
|
||||||
}
|
}
|
||||||
|
@ -140,10 +144,25 @@ router.get("/api/status-page/monitor-list", cache("5 minutes"), async (_request,
|
||||||
try {
|
try {
|
||||||
await checkPublished();
|
await checkPublished();
|
||||||
const publicGroupList = [];
|
const publicGroupList = [];
|
||||||
let list = await R.find("group", " public = 1 ORDER BY weight ");
|
const tagsVisible = (await getSettings("statusPage")).statusPageTags;
|
||||||
|
const list = await R.find("group", " public = 1 ORDER BY weight ");
|
||||||
for (let groupBean of list) {
|
for (let groupBean of list) {
|
||||||
publicGroupList.push(await groupBean.toPublicJSON());
|
let monitorGroup = await groupBean.toPublicJSON();
|
||||||
|
if (tagsVisible) {
|
||||||
|
monitorGroup.monitorList = await Promise.all(monitorGroup.monitorList.map(async (monitor) => {
|
||||||
|
// Includes tags as an array in response, allows for tags to be displayed on public status page
|
||||||
|
const tags = await R.getAll(
|
||||||
|
`SELECT monitor_tag.monitor_id, monitor_tag.value, tag.name, tag.color
|
||||||
|
FROM monitor_tag
|
||||||
|
JOIN tag
|
||||||
|
ON monitor_tag.tag_id = tag.id
|
||||||
|
WHERE monitor_tag.monitor_id = ?`, [monitor.id]
|
||||||
|
);
|
||||||
|
return {...monitor, tags: tags}
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
publicGroupList.push(monitorGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
response.json(publicGroupList);
|
response.json(publicGroupList);
|
||||||
|
|
|
@ -201,8 +201,13 @@ const getDaysRemaining = (validFrom, validTo) => {
|
||||||
// param: info - the chain obtained from getPeerCertificate()
|
// param: info - the chain obtained from getPeerCertificate()
|
||||||
const parseCertificateInfo = function (info) {
|
const parseCertificateInfo = function (info) {
|
||||||
let link = info;
|
let link = info;
|
||||||
|
let i = 0;
|
||||||
|
|
||||||
|
const existingList = {};
|
||||||
|
|
||||||
while (link) {
|
while (link) {
|
||||||
|
debug(`[${i}] ${link.fingerprint}`);
|
||||||
|
|
||||||
if (!link.valid_from || !link.valid_to) {
|
if (!link.valid_from || !link.valid_to) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -210,15 +215,24 @@ const parseCertificateInfo = function (info) {
|
||||||
link.validFor = link.subjectaltname?.replace(/DNS:|IP Address:/g, "").split(", ");
|
link.validFor = link.subjectaltname?.replace(/DNS:|IP Address:/g, "").split(", ");
|
||||||
link.daysRemaining = getDaysRemaining(new Date(), link.validTo);
|
link.daysRemaining = getDaysRemaining(new Date(), link.validTo);
|
||||||
|
|
||||||
|
existingList[link.fingerprint] = true;
|
||||||
|
|
||||||
// Move up the chain until loop is encountered
|
// Move up the chain until loop is encountered
|
||||||
if (link.issuerCertificate == null) {
|
if (link.issuerCertificate == null) {
|
||||||
break;
|
break;
|
||||||
} else if (link.fingerprint == link.issuerCertificate.fingerprint) {
|
} else if (link.issuerCertificate.fingerprint in existingList) {
|
||||||
|
debug(`[Last] ${link.issuerCertificate.fingerprint}`);
|
||||||
link.issuerCertificate = null;
|
link.issuerCertificate = null;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
link = link.issuerCertificate;
|
link = link.issuerCertificate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Should be no use, but just in case.
|
||||||
|
if (i > 500) {
|
||||||
|
throw new Error("Dead loop occurred in parseCertificateInfo");
|
||||||
|
}
|
||||||
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
|
@ -228,6 +242,7 @@ exports.checkCertificate = function (res) {
|
||||||
const info = res.request.res.socket.getPeerCertificate(true);
|
const info = res.request.res.socket.getPeerCertificate(true);
|
||||||
const valid = res.request.res.socket.authorized || false;
|
const valid = res.request.res.socket.authorized || false;
|
||||||
|
|
||||||
|
debug("Parsing Certificate Info");
|
||||||
const parsedInfo = parseCertificateInfo(info);
|
const parsedInfo = parseCertificateInfo(info);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -346,6 +346,10 @@ textarea.form-control {
|
||||||
&.active {
|
&.active {
|
||||||
background-color: #cdf8f4;
|
background-color: #cdf8f4;
|
||||||
}
|
}
|
||||||
|
.tags {
|
||||||
|
// Removes margin to line up tags list with uptime percentage
|
||||||
|
margin-left: -0.25rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,9 @@
|
||||||
<Uptime :monitor="monitor.element" type="24" :pill="true" />
|
<Uptime :monitor="monitor.element" type="24" :pill="true" />
|
||||||
{{ monitor.element.name }}
|
{{ monitor.element.name }}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="tags">
|
||||||
|
<Tag v-for="tag in monitor.element.tags" :key="tag" :item="tag" :size="'sm'" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div :key="$root.userHeartbeatBar" class="col-3 col-md-4">
|
<div :key="$root.userHeartbeatBar" class="col-3 col-md-4">
|
||||||
<HeartbeatBar size="small" :monitor-id="monitor.element.id" />
|
<HeartbeatBar size="small" :monitor-id="monitor.element.id" />
|
||||||
|
@ -59,12 +62,14 @@
|
||||||
import Draggable from "vuedraggable";
|
import Draggable from "vuedraggable";
|
||||||
import HeartbeatBar from "./HeartbeatBar.vue";
|
import HeartbeatBar from "./HeartbeatBar.vue";
|
||||||
import Uptime from "./Uptime.vue";
|
import Uptime from "./Uptime.vue";
|
||||||
|
import Tag from "./Tag.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
Draggable,
|
Draggable,
|
||||||
HeartbeatBar,
|
HeartbeatBar,
|
||||||
Uptime,
|
Uptime,
|
||||||
|
Tag,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
editMode: {
|
editMode: {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<span :class="className">{{ uptime }}</span>
|
<span :class="className" :title="24 + $t('-hour')">{{ uptime }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -2,15 +2,14 @@ export default {
|
||||||
languageName: "Hrvatski",
|
languageName: "Hrvatski",
|
||||||
checkEverySecond: "Provjera svake {0} sekunde",
|
checkEverySecond: "Provjera svake {0} sekunde",
|
||||||
retryCheckEverySecond: "Ponovni pokušaj svake {0} sekunde",
|
retryCheckEverySecond: "Ponovni pokušaj svake {0} sekunde",
|
||||||
retriesDescription: "Broj ponovnih pokušaja prije nego će se servis označiti kao DOWN te poslati obavijest",
|
retriesDescription: "Broj ponovnih pokušaja prije nego će se servis označiti kao nedostupan te poslati obavijest",
|
||||||
ignoreTLSError: "Ignoriraj TLS/SSL pogreške za HTTPS web stranice",
|
ignoreTLSError: "Ignoriraj TLS/SSL pogreške za HTTPS web stranice",
|
||||||
upsideDownModeDescription: "Preokreni logiku statusa. Ako je usluga dostupna, smatra se da je DOWN.",
|
upsideDownModeDescription: "Preokreni logiku statusa. Ako se primi pozitivan odgovor, smatra se da je usluga nedostupna.",
|
||||||
maxRedirectDescription: "Maksimalan broj preusmjeravanja. Postaviti na 0 kako bi se preusmjeravanja onemogućila.",
|
maxRedirectDescription: "Maksimalan broj preusmjeravanja. Postaviti na 0 kako bi se preusmjeravanja onemogućila.",
|
||||||
acceptedStatusCodesDescription: "Odaberite statusne kodove koji se smatraju uspješnim odgovorom.",
|
acceptedStatusCodesDescription: "Odaberite statusne kodove koji se smatraju uspješnim odgovorom.",
|
||||||
passwordNotMatchMsg: "Lozinke se ne poklapaju.",
|
passwordNotMatchMsg: "Lozinke se ne poklapaju.",
|
||||||
notificationDescription: "Obavijesti će funkcionirati samo ako su dodijeljene monitoru.",
|
notificationDescription: "Obavijesti će funkcionirati samo ako su dodijeljene monitoru.",
|
||||||
keywordDescription: "Ključna riječ za pretragu kao običan HTML ili u JSON formatu. Pretraga je case-sensitive.",
|
keywordDescription: "Ključna riječ za pretragu, u obliku običnog HTML-a ili u JSON formatu. Pretraga je osjetljiva na velika i mala slova.",
|
||||||
pauseDashboardHome: "Pauziraj",
|
|
||||||
deleteMonitorMsg: "Jeste li sigurni da želite izbrisati monitor?",
|
deleteMonitorMsg: "Jeste li sigurni da želite izbrisati monitor?",
|
||||||
deleteNotificationMsg: "Jeste li sigurni da želite izbrisati ovu obavijest za sve monitore?",
|
deleteNotificationMsg: "Jeste li sigurni da želite izbrisati ovu obavijest za sve monitore?",
|
||||||
resoverserverDescription: "Cloudflare je zadani DNS poslužitelj. Možete to promijeniti u bilo kojem trenutku.",
|
resoverserverDescription: "Cloudflare je zadani DNS poslužitelj. Možete to promijeniti u bilo kojem trenutku.",
|
||||||
|
@ -25,7 +24,7 @@ export default {
|
||||||
twoFAVerifyLabel: "Unesite svoj 2FA token:",
|
twoFAVerifyLabel: "Unesite svoj 2FA token:",
|
||||||
tokenValidSettingsMsg: "Token je važeći! Sada možete spremiti postavke dvofaktorske autentikacije.",
|
tokenValidSettingsMsg: "Token je važeći! Sada možete spremiti postavke dvofaktorske autentikacije.",
|
||||||
confirmEnableTwoFAMsg: "Želite li omogućiti dvofaktorsku autentikaciju?",
|
confirmEnableTwoFAMsg: "Želite li omogućiti dvofaktorsku autentikaciju?",
|
||||||
confirmDisableTwoFAMsg: "Are you sure you want to disable dvofaktorsku autentikaciju?",
|
confirmDisableTwoFAMsg: "Jeste li sigurni da želite onemogućiti dvofaktorsku autentikaciju?",
|
||||||
Settings: "Postavke",
|
Settings: "Postavke",
|
||||||
Dashboard: "Kontrolna ploča",
|
Dashboard: "Kontrolna ploča",
|
||||||
"New Update": "Novo ažuriranje",
|
"New Update": "Novo ažuriranje",
|
||||||
|
@ -44,17 +43,18 @@ export default {
|
||||||
Down: "Nedostupno",
|
Down: "Nedostupno",
|
||||||
Pending: "U tijeku",
|
Pending: "U tijeku",
|
||||||
Unknown: "Nepoznato",
|
Unknown: "Nepoznato",
|
||||||
Pause: "Pauzirano",
|
pauseDashboardHome: "Pauzirano",
|
||||||
Name: "Naziv monitora",
|
Name: "Naziv",
|
||||||
Status: "Status",
|
Status: "Status",
|
||||||
DateTime: "Vremenska oznaka",
|
DateTime: "Vremenska oznaka",
|
||||||
Message: "Izvještaj",
|
Message: "Izvještaj",
|
||||||
"No important events": "Nema važnih događaja",
|
"No important events": "Nema važnih događaja",
|
||||||
|
Pause: "Pauziraj",
|
||||||
Resume: "Nastavi",
|
Resume: "Nastavi",
|
||||||
Edit: "Uredi",
|
Edit: "Uredi",
|
||||||
Delete: "Obriši",
|
Delete: "Obriši",
|
||||||
Current: "Trenutno",
|
Current: "Trenutno",
|
||||||
Uptime: "Uptime",
|
Uptime: "Dostupnost",
|
||||||
"Cert Exp.": "Istek cert.",
|
"Cert Exp.": "Istek cert.",
|
||||||
days: "dana",
|
days: "dana",
|
||||||
day: "dan",
|
day: "dan",
|
||||||
|
@ -65,12 +65,12 @@ export default {
|
||||||
Ping: "Odziv",
|
Ping: "Odziv",
|
||||||
"Monitor Type": "Vrsta Monitora",
|
"Monitor Type": "Vrsta Monitora",
|
||||||
Keyword: "Ključna riječ",
|
Keyword: "Ključna riječ",
|
||||||
"Friendly Name": "Lijep naziv",
|
"Friendly Name": "Prilagođen naziv",
|
||||||
URL: "URL",
|
URL: "URL",
|
||||||
Hostname: "Domaćin",
|
Hostname: "Domaćin",
|
||||||
Port: "Port",
|
Port: "Port",
|
||||||
"Heartbeat Interval": "Interval provjere",
|
"Heartbeat Interval": "Interval provjere",
|
||||||
Retries: "Ponovnih pokušaja",
|
Retries: "Broj ponovnih pokušaja",
|
||||||
"Heartbeat Retry Interval": "Interval ponovnih pokušaja",
|
"Heartbeat Retry Interval": "Interval ponovnih pokušaja",
|
||||||
Advanced: "Napredne postavke",
|
Advanced: "Napredne postavke",
|
||||||
"Upside Down Mode": "Obrnuti način",
|
"Upside Down Mode": "Obrnuti način",
|
||||||
|
@ -86,14 +86,14 @@ export default {
|
||||||
Light: "Svijetli način",
|
Light: "Svijetli način",
|
||||||
Dark: "Tamni način",
|
Dark: "Tamni način",
|
||||||
Auto: "Automatski",
|
Auto: "Automatski",
|
||||||
"Theme - Heartbeat Bar": "Tema - Statusna traka",
|
"Theme - Heartbeat Bar": "Tema za traku dostupnosti",
|
||||||
Normal: "Normalno",
|
Normal: "Normalno",
|
||||||
Bottom: "Ispod",
|
Bottom: "Ispod",
|
||||||
None: "Isključeno",
|
None: "Isključeno",
|
||||||
Timezone: "Vremenska zona",
|
Timezone: "Vremenska zona",
|
||||||
"Search Engine Visibility": "Vidljivost pretraživačima",
|
"Search Engine Visibility": "Vidljivost tražilicama",
|
||||||
"Allow indexing": "Dopusti indeksiranje",
|
"Allow indexing": "Dopusti indeksiranje",
|
||||||
"Discourage search engines from indexing site": "Sprječavanje indeksiranja stranice",
|
"Discourage search engines from indexing site": "Sprječavanje indeksiranja",
|
||||||
"Change Password": "Promjena lozinke",
|
"Change Password": "Promjena lozinke",
|
||||||
"Current Password": "Trenutna lozinka",
|
"Current Password": "Trenutna lozinka",
|
||||||
"New Password": "Nova lozinka",
|
"New Password": "Nova lozinka",
|
||||||
|
@ -103,7 +103,7 @@ export default {
|
||||||
"Enable Auth": "Omogući autentikaciju",
|
"Enable Auth": "Omogući autentikaciju",
|
||||||
Logout: "Odjava",
|
Logout: "Odjava",
|
||||||
Leave: "Poništi",
|
Leave: "Poništi",
|
||||||
"I understand, please disable": "Razumijem, onemogući",
|
"I understand, please disable": "Razumijem, svejedno onemogući",
|
||||||
Confirm: "Potvrda",
|
Confirm: "Potvrda",
|
||||||
Yes: "Da",
|
Yes: "Da",
|
||||||
No: "Ne",
|
No: "Ne",
|
||||||
|
@ -112,10 +112,10 @@ export default {
|
||||||
"Remember me": "Zapamti me",
|
"Remember me": "Zapamti me",
|
||||||
Login: "Prijava",
|
Login: "Prijava",
|
||||||
"No Monitors, please": "Nema monitora, ",
|
"No Monitors, please": "Nema monitora, ",
|
||||||
"add one": "dodaj jednog",
|
"add one": "dodaj jedan",
|
||||||
"Notification Type": "Tip obavijesti",
|
"Notification Type": "Tip obavijesti",
|
||||||
Email: "E-pošta",
|
Email: "E-pošta",
|
||||||
Test: "Test",
|
Test: "Testiraj",
|
||||||
"Certificate Info": "Informacije o certifikatu",
|
"Certificate Info": "Informacije o certifikatu",
|
||||||
"Resolver Server": "DNS poslužitelj",
|
"Resolver Server": "DNS poslužitelj",
|
||||||
"Resource Record Type": "Vrsta DNS zapisa",
|
"Resource Record Type": "Vrsta DNS zapisa",
|
||||||
|
@ -130,14 +130,14 @@ export default {
|
||||||
notAvailableShort: "N/A",
|
notAvailableShort: "N/A",
|
||||||
"Default enabled": "Omogući za nove monitore",
|
"Default enabled": "Omogući za nove monitore",
|
||||||
"Apply on all existing monitors": "Primijeni na postojeće monitore",
|
"Apply on all existing monitors": "Primijeni na postojeće monitore",
|
||||||
Create: "Create",
|
Create: "Kreiraj",
|
||||||
"Clear Data": "Clear Data",
|
"Clear Data": "Obriši podatke",
|
||||||
Events: "Events",
|
Events: "Događaji",
|
||||||
Heartbeats: "Provjere",
|
Heartbeats: "Provjere",
|
||||||
"Auto Get": "Automatski dohvat",
|
"Auto Get": "Automatski dohvat",
|
||||||
backupDescription: "Moguće je napraviti sigurnosnu kopiju svih monitora i obavijesti koja će biti spremljena kao JSON datoteka.",
|
backupDescription: "Moguće je napraviti sigurnosnu kopiju svih monitora i obavijesti koja će biti spremljena kao JSON datoteka.",
|
||||||
backupDescription2: "Napomena: povijest i podaci o događajima nisu uključeni u sigurnosnu kopiju.",
|
backupDescription2: "Napomena: povijest i podaci o događajima nisu uključeni u sigurnosnu kopiju.",
|
||||||
backupDescription3: "Osjetljivi podaci poput tokena za obavijesti jesu uključeni u sigurnosnu kopiju. Zato je potrebno čuvati izvoz na sigurnom mjestu.",
|
backupDescription3: "Osjetljivi podaci poput tokena za obavijesti uključeni su u sigurnosnu kopiju. Zato je potrebno čuvati izvoz na sigurnom mjestu.",
|
||||||
alertNoFile: "Datoteka za uvoz nije odabrana.",
|
alertNoFile: "Datoteka za uvoz nije odabrana.",
|
||||||
alertWrongFileType: "Datoteka za uvoz nije u JSON formatu.",
|
alertWrongFileType: "Datoteka za uvoz nije u JSON formatu.",
|
||||||
"Clear all statistics": "Obriši sve statistike",
|
"Clear all statistics": "Obriši sve statistike",
|
||||||
|
@ -152,7 +152,7 @@ export default {
|
||||||
"2FA Settings": "Postavke 2FA",
|
"2FA Settings": "Postavke 2FA",
|
||||||
"Two Factor Authentication": "Dvofaktorska autentikacija",
|
"Two Factor Authentication": "Dvofaktorska autentikacija",
|
||||||
Active: "Aktivna",
|
Active: "Aktivna",
|
||||||
Inactive: "Neaktivna",
|
Inactive: "Neaktivno",
|
||||||
Token: "Token",
|
Token: "Token",
|
||||||
"Show URI": "Pokaži URI",
|
"Show URI": "Pokaži URI",
|
||||||
Tags: "Oznake",
|
Tags: "Oznake",
|
||||||
|
@ -172,7 +172,7 @@ export default {
|
||||||
"Search...": "Pretraga...",
|
"Search...": "Pretraga...",
|
||||||
"Avg. Ping": "Prosječni odziv",
|
"Avg. Ping": "Prosječni odziv",
|
||||||
"Avg. Response": "Prosječni odgovor",
|
"Avg. Response": "Prosječni odgovor",
|
||||||
"Entry Page": "Entry Page",
|
"Entry Page": "Početna stranica",
|
||||||
statusPageNothing: "Ovdje nema ničega, dodajte grupu ili monitor.",
|
statusPageNothing: "Ovdje nema ničega, dodajte grupu ili monitor.",
|
||||||
"No Services": "Nema usluga",
|
"No Services": "Nema usluga",
|
||||||
"All Systems Operational": "Svi sustavi su operativni",
|
"All Systems Operational": "Svi sustavi su operativni",
|
||||||
|
@ -183,7 +183,7 @@ export default {
|
||||||
"Edit Status Page": "Uredi Statusnu stranicu",
|
"Edit Status Page": "Uredi Statusnu stranicu",
|
||||||
"Go to Dashboard": "Na Kontrolnu ploču",
|
"Go to Dashboard": "Na Kontrolnu ploču",
|
||||||
"Status Page": "Statusna stranica",
|
"Status Page": "Statusna stranica",
|
||||||
defaultNotificationName: "Moja {notification} obavijest ({number})",
|
defaultNotificationName: "Moja {number}. {notification} obavijest",
|
||||||
here: "ovdje",
|
here: "ovdje",
|
||||||
Required: "Potrebno",
|
Required: "Potrebno",
|
||||||
telegram: "Telegram",
|
telegram: "Telegram",
|
||||||
|
@ -195,11 +195,11 @@ export default {
|
||||||
"YOUR BOT TOKEN HERE": "OVDJE IDE TOKEN BOTA",
|
"YOUR BOT TOKEN HERE": "OVDJE IDE TOKEN BOTA",
|
||||||
chatIDNotFound: "ID razgovora nije pronađen; prvo morate poslati poruku botu",
|
chatIDNotFound: "ID razgovora nije pronađen; prvo morate poslati poruku botu",
|
||||||
webhook: "Webhook",
|
webhook: "Webhook",
|
||||||
"Post URL": "Post URL",
|
"Post URL": "URL Post zahtjeva",
|
||||||
"Content Type": "Tip sadržaja (Content Type)",
|
"Content Type": "Tip sadržaja (Content Type)",
|
||||||
webhookJsonDesc: "{0} je dobra opcija za moderne HTTP poslužitelje poput Express.js-a",
|
webhookJsonDesc: "{0} je dobra opcija za moderne HTTP poslužitelje poput Express.js-a",
|
||||||
webhookFormDataDesc: "{multipart} je moguća alternativa za PHP, samo je potrebno parsirati JSON koristeći {decodeFunction}",
|
webhookFormDataDesc: "{multipart} je moguća alternativa za PHP, samo je potrebno parsirati JSON koristeći {decodeFunction}",
|
||||||
smtp: "E-pošta (SMTP)",
|
smtp: "E-mail (SMTP)",
|
||||||
secureOptionNone: "Bez sigurnosti / STARTTLS (25, 587)",
|
secureOptionNone: "Bez sigurnosti / STARTTLS (25, 587)",
|
||||||
secureOptionTLS: "TLS (465)",
|
secureOptionTLS: "TLS (465)",
|
||||||
"Ignore TLS Error": "Ignoriraj greške TLS-a",
|
"Ignore TLS Error": "Ignoriraj greške TLS-a",
|
||||||
|
@ -215,7 +215,7 @@ export default {
|
||||||
"Prefix Custom Message": "Prefiks prilagođene poruke",
|
"Prefix Custom Message": "Prefiks prilagođene poruke",
|
||||||
"Hello @everyone is...": "Pozdrav {'@'}everyone...",
|
"Hello @everyone is...": "Pozdrav {'@'}everyone...",
|
||||||
teams: "Microsoft Teams",
|
teams: "Microsoft Teams",
|
||||||
"Webhook URL": "URL Teams webhooka",
|
"Webhook URL": "URL webhooka",
|
||||||
wayToGetTeamsURL: "Više informacija o Teams webhookovima možete pročitati {0}.",
|
wayToGetTeamsURL: "Više informacija o Teams webhookovima možete pročitati {0}.",
|
||||||
signal: "Signal",
|
signal: "Signal",
|
||||||
Number: "Broj",
|
Number: "Broj",
|
||||||
|
@ -242,7 +242,7 @@ export default {
|
||||||
promosms: "PromoSMS",
|
promosms: "PromoSMS",
|
||||||
clicksendsms: "ClickSend SMS",
|
clicksendsms: "ClickSend SMS",
|
||||||
lunasea: "LunaSea",
|
lunasea: "LunaSea",
|
||||||
apprise: "Apprise (Support 50+ Notification services)",
|
apprise: "Apprise (Podržava preko 50 usluga za obavijesti)",
|
||||||
pushbullet: "Pushbullet",
|
pushbullet: "Pushbullet",
|
||||||
line: "LINE",
|
line: "LINE",
|
||||||
mattermost: "Mattermost",
|
mattermost: "Mattermost",
|
||||||
|
@ -307,4 +307,5 @@ export default {
|
||||||
"Showing {from} to {to} of {count} records": "Prikaz zapisa {from}-{to} od sveukupno {count}",
|
"Showing {from} to {to} of {count} records": "Prikaz zapisa {from}-{to} od sveukupno {count}",
|
||||||
steamApiKeyDescription: "Za praćenje Steam poslužitelja za igru, potrebno je imati Steam Web-API ključ. Možete registrirati vlastiti ključ ovdje: ",
|
steamApiKeyDescription: "Za praćenje Steam poslužitelja za igru, potrebno je imati Steam Web-API ključ. Možete registrirati vlastiti ključ ovdje: ",
|
||||||
"Current User": "Trenutni korisnik",
|
"Current User": "Trenutni korisnik",
|
||||||
|
recent: "Nedavno",
|
||||||
};
|
};
|
||||||
|
|
|
@ -77,6 +77,17 @@
|
||||||
<font-awesome-icon icon="save" />
|
<font-awesome-icon icon="save" />
|
||||||
{{ $t("Switch to Dark Theme") }}
|
{{ $t("Switch to Dark Theme") }}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<button class="btn btn-secondary me-2" @click="changeTagsVisibilty(!tagsVisible)">
|
||||||
|
<template v-if="tagsVisible">
|
||||||
|
<font-awesome-icon icon="eye-slash" />
|
||||||
|
{{ $t("Hide Tags") }}
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<font-awesome-icon icon="eye" />
|
||||||
|
{{ $t("Show Tags") }}
|
||||||
|
</template>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -292,6 +303,10 @@ export default {
|
||||||
return this.config.statusPageTheme;
|
return this.config.statusPageTheme;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
tagsVisible() {
|
||||||
|
return this.config.statusPageTags
|
||||||
|
},
|
||||||
|
|
||||||
logoClass() {
|
logoClass() {
|
||||||
if (this.editMode) {
|
if (this.editMode) {
|
||||||
return {
|
return {
|
||||||
|
@ -472,6 +487,25 @@ export default {
|
||||||
changeTheme(name) {
|
changeTheme(name) {
|
||||||
this.config.statusPageTheme = name;
|
this.config.statusPageTheme = name;
|
||||||
},
|
},
|
||||||
|
changeTagsVisibilty(newState) {
|
||||||
|
this.config.statusPageTags = newState;
|
||||||
|
|
||||||
|
// On load, the status page will not include tags if it's not enabled for security reasons
|
||||||
|
// Which means if we enable tags, it won't show in the UI until saved
|
||||||
|
// So we have this to enhance UX and load in the tags from the authenticated source instantly
|
||||||
|
this.$root.publicGroupList = this.$root.publicGroupList.map((group) => {
|
||||||
|
return {
|
||||||
|
...group,
|
||||||
|
monitorList: group.monitorList.map((monitor) => {
|
||||||
|
// We only include the tags if visible so we can reuse the logic to hide the tags on disable
|
||||||
|
return {
|
||||||
|
...monitor,
|
||||||
|
tags: newState ? this.$root.monitorList[monitor.id].tags : []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Crop Success
|
* Crop Success
|
||||||
|
|
|
@ -1,4 +1,125 @@
|
||||||
const { genSecret, sleep } = require("../src/util");
|
const { genSecret, sleep } = require("../src/util");
|
||||||
|
const utilServerRewire = require("../server/util-server");
|
||||||
|
|
||||||
|
describe("Test parseCertificateInfo", () => {
|
||||||
|
it("should handle undefined", async () => {
|
||||||
|
const parseCertificateInfo = utilServerRewire.__get__("parseCertificateInfo");
|
||||||
|
const info = parseCertificateInfo(undefined);
|
||||||
|
expect(info).toEqual(undefined);
|
||||||
|
}, 5000);
|
||||||
|
|
||||||
|
it("should handle normal cert chain", async () => {
|
||||||
|
const parseCertificateInfo = utilServerRewire.__get__("parseCertificateInfo");
|
||||||
|
|
||||||
|
const chain1 = {
|
||||||
|
fingerprint: "CF:2C:F3:6A:FE:6B:10:EC:44:77:C8:95:BB:96:2E:06:1F:0E:15:DA",
|
||||||
|
valid_from: "Oct 22 12:00:00 2013 GMT",
|
||||||
|
valid_to: "Oct 22 12:00:00 2028 GMT",
|
||||||
|
subjectaltname: "DNS:www.example.org, DNS:example.com, DNS:example.edu, DNS:example.net, DNS:example.org, DNS:www.example.com, DNS:www.example.edu, DNS:www.example.net",
|
||||||
|
};
|
||||||
|
|
||||||
|
const chain2 = {
|
||||||
|
fingerprint: "A0:31:C4:67:82:E6:E6:C6:62:C2:C8:7C:76:DA:9A:A6:2C:CA:BD:8E",
|
||||||
|
valid_from: "Oct 22 12:00:00 2013 GMT",
|
||||||
|
valid_to: "Oct 22 12:00:00 2028 GMT",
|
||||||
|
subjectaltname: "DNS:www.example.org, DNS:example.com, DNS:example.edu, DNS:example.net, DNS:example.org, DNS:www.example.com, DNS:www.example.edu, DNS:www.example.net",
|
||||||
|
};
|
||||||
|
|
||||||
|
const chain3 = {
|
||||||
|
fingerprint: "5F:B7:EE:06:33:E2:59:DB:AD:0C:4C:9A:E6:D3:8F:1A:61:C7:DC:25",
|
||||||
|
valid_from: "Oct 22 12:00:00 2013 GMT",
|
||||||
|
valid_to: "Oct 22 12:00:00 2028 GMT",
|
||||||
|
subjectaltname: "DNS:www.example.org, DNS:example.com, DNS:example.edu, DNS:example.net, DNS:example.org, DNS:www.example.com, DNS:www.example.edu, DNS:www.example.net",
|
||||||
|
};
|
||||||
|
|
||||||
|
chain1.issuerCertificate = chain2;
|
||||||
|
chain2.issuerCertificate = chain3;
|
||||||
|
chain3.issuerCertificate = chain3;
|
||||||
|
|
||||||
|
const info = parseCertificateInfo(chain1);
|
||||||
|
expect(chain1).toEqual(info);
|
||||||
|
}, 5000);
|
||||||
|
|
||||||
|
it("should handle cert chain with strange circle", async () => {
|
||||||
|
const parseCertificateInfo = utilServerRewire.__get__("parseCertificateInfo");
|
||||||
|
|
||||||
|
const chain1 = {
|
||||||
|
fingerprint: "CF:2C:F3:6A:FE:6B:10:EC:44:77:C8:95:BB:96:2E:06:1F:0E:15:DA",
|
||||||
|
valid_from: "Oct 22 12:00:00 2013 GMT",
|
||||||
|
valid_to: "Oct 22 12:00:00 2028 GMT",
|
||||||
|
subjectaltname: "DNS:www.example.org, DNS:example.com, DNS:example.edu, DNS:example.net, DNS:example.org, DNS:www.example.com, DNS:www.example.edu, DNS:www.example.net",
|
||||||
|
};
|
||||||
|
|
||||||
|
const chain2 = {
|
||||||
|
fingerprint: "A0:31:C4:67:82:E6:E6:C6:62:C2:C8:7C:76:DA:9A:A6:2C:CA:BD:8E",
|
||||||
|
valid_from: "Oct 22 12:00:00 2013 GMT",
|
||||||
|
valid_to: "Oct 22 12:00:00 2028 GMT",
|
||||||
|
subjectaltname: "DNS:www.example.org, DNS:example.com, DNS:example.edu, DNS:example.net, DNS:example.org, DNS:www.example.com, DNS:www.example.edu, DNS:www.example.net",
|
||||||
|
};
|
||||||
|
|
||||||
|
const chain3 = {
|
||||||
|
fingerprint: "5F:B7:EE:06:33:E2:59:DB:AD:0C:4C:9A:E6:D3:8F:1A:61:C7:DC:25",
|
||||||
|
valid_from: "Oct 22 12:00:00 2013 GMT",
|
||||||
|
valid_to: "Oct 22 12:00:00 2028 GMT",
|
||||||
|
subjectaltname: "DNS:www.example.org, DNS:example.com, DNS:example.edu, DNS:example.net, DNS:example.org, DNS:www.example.com, DNS:www.example.edu, DNS:www.example.net",
|
||||||
|
};
|
||||||
|
|
||||||
|
const chain4 = {
|
||||||
|
fingerprint: "haha",
|
||||||
|
valid_from: "Oct 22 12:00:00 2013 GMT",
|
||||||
|
valid_to: "Oct 22 12:00:00 2028 GMT",
|
||||||
|
subjectaltname: "DNS:www.example.org, DNS:example.com, DNS:example.edu, DNS:example.net, DNS:example.org, DNS:www.example.com, DNS:www.example.edu, DNS:www.example.net",
|
||||||
|
};
|
||||||
|
|
||||||
|
chain1.issuerCertificate = chain2;
|
||||||
|
chain2.issuerCertificate = chain3;
|
||||||
|
chain3.issuerCertificate = chain4;
|
||||||
|
chain4.issuerCertificate = chain2;
|
||||||
|
|
||||||
|
const info = parseCertificateInfo(chain1);
|
||||||
|
expect(chain1).toEqual(info);
|
||||||
|
}, 5000);
|
||||||
|
|
||||||
|
it("should handle cert chain with last undefined (should be happen in real, but just in case)", async () => {
|
||||||
|
const parseCertificateInfo = utilServerRewire.__get__("parseCertificateInfo");
|
||||||
|
|
||||||
|
const chain1 = {
|
||||||
|
fingerprint: "CF:2C:F3:6A:FE:6B:10:EC:44:77:C8:95:BB:96:2E:06:1F:0E:15:DA",
|
||||||
|
valid_from: "Oct 22 12:00:00 2013 GMT",
|
||||||
|
valid_to: "Oct 22 12:00:00 2028 GMT",
|
||||||
|
subjectaltname: "DNS:www.example.org, DNS:example.com, DNS:example.edu, DNS:example.net, DNS:example.org, DNS:www.example.com, DNS:www.example.edu, DNS:www.example.net",
|
||||||
|
};
|
||||||
|
|
||||||
|
const chain2 = {
|
||||||
|
fingerprint: "A0:31:C4:67:82:E6:E6:C6:62:C2:C8:7C:76:DA:9A:A6:2C:CA:BD:8E",
|
||||||
|
valid_from: "Oct 22 12:00:00 2013 GMT",
|
||||||
|
valid_to: "Oct 22 12:00:00 2028 GMT",
|
||||||
|
subjectaltname: "DNS:www.example.org, DNS:example.com, DNS:example.edu, DNS:example.net, DNS:example.org, DNS:www.example.com, DNS:www.example.edu, DNS:www.example.net",
|
||||||
|
};
|
||||||
|
|
||||||
|
const chain3 = {
|
||||||
|
fingerprint: "5F:B7:EE:06:33:E2:59:DB:AD:0C:4C:9A:E6:D3:8F:1A:61:C7:DC:25",
|
||||||
|
valid_from: "Oct 22 12:00:00 2013 GMT",
|
||||||
|
valid_to: "Oct 22 12:00:00 2028 GMT",
|
||||||
|
subjectaltname: "DNS:www.example.org, DNS:example.com, DNS:example.edu, DNS:example.net, DNS:example.org, DNS:www.example.com, DNS:www.example.edu, DNS:www.example.net",
|
||||||
|
};
|
||||||
|
|
||||||
|
const chain4 = {
|
||||||
|
fingerprint: "haha",
|
||||||
|
valid_from: "Oct 22 12:00:00 2013 GMT",
|
||||||
|
valid_to: "Oct 22 12:00:00 2028 GMT",
|
||||||
|
subjectaltname: "DNS:www.example.org, DNS:example.com, DNS:example.edu, DNS:example.net, DNS:example.org, DNS:www.example.com, DNS:www.example.edu, DNS:www.example.net",
|
||||||
|
};
|
||||||
|
|
||||||
|
chain1.issuerCertificate = chain2;
|
||||||
|
chain2.issuerCertificate = chain3;
|
||||||
|
chain3.issuerCertificate = chain4;
|
||||||
|
chain4.issuerCertificate = undefined;
|
||||||
|
|
||||||
|
const info = parseCertificateInfo(chain1);
|
||||||
|
expect(chain1).toEqual(info);
|
||||||
|
}, 5000);
|
||||||
|
});
|
||||||
|
|
||||||
describe("Test genSecret", () => {
|
describe("Test genSecret", () => {
|
||||||
|
|
||||||
|
@ -42,3 +163,4 @@ describe("Test reset-password", () => {
|
||||||
await require("../extra/reset-password").main();
|
await require("../extra/reset-password").main();
|
||||||
}, 120000);
|
}, 120000);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue