From c4ca8e2acbfe6b768932e403a2c910b189919bcd Mon Sep 17 00:00:00 2001 From: Adam Stachowicz Date: Wed, 21 Jul 2021 00:41:38 +0200 Subject: [PATCH 1/4] More info in server logs --- server/model/monitor.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index 162772875..f81f6e00e 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -48,8 +48,6 @@ class Monitor extends BeanModel { let previousBeat = null; const beat = async () => { - console.log(`Monitor ${this.id}: Heartbeat`) - if (! previousBeat) { previousBeat = await R.findOne("heartbeat", " monitor_id = ? ORDER BY time DESC", [ this.id @@ -145,6 +143,12 @@ class Monitor extends BeanModel { bean.important = false; } + if (bean.status === 1) { + console.info(`Monitor #${this.id} '${this.name}': Successful Response: ${bean.ping} ms | Interval: ${this.interval} seconds | Type: ${this.type}`) + } else { + console.warn(`Monitor #${this.id} '${this.name}': Failing: ${bean.msg} | Type: ${this.type}`) + } + io.to(this.user_id).emit("heartbeat", bean.toJSON()); await R.store(bean) From fd90458e77d3389502b720df8289b55a560b05a8 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Wed, 21 Jul 2021 16:25:58 +0800 Subject: [PATCH 2/4] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 34 ++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..cea1fc16e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,34 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - Uptime Kuma Version: + - Using Docker?: Yes/No + - OS: + - Browser: + + +**Additional context** +Add any other context about the problem here. From 32345fcbe9f758a9242e92df89b64572b971776d Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Wed, 21 Jul 2021 16:28:31 +0800 Subject: [PATCH 3/4] Update issue templates --- ...ssion--tab-if-you-want-to-ask-or-share-something.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/--please-go-to--discussion--tab-if-you-want-to-ask-or-share-something.md diff --git a/.github/ISSUE_TEMPLATE/--please-go-to--discussion--tab-if-you-want-to-ask-or-share-something.md b/.github/ISSUE_TEMPLATE/--please-go-to--discussion--tab-if-you-want-to-ask-or-share-something.md new file mode 100644 index 000000000..45a2e2876 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/--please-go-to--discussion--tab-if-you-want-to-ask-or-share-something.md @@ -0,0 +1,10 @@ +--- +name: ⚠ Please go to "Discussion" Tab if you want to ask or share something +about: BUG REPORT ONLY HERE +title: '' +labels: '' +assignees: '' + +--- + +BUG REPORT ONLY HERE From c00612c1a918c7f61e751dfaf239468a6fc1b30f Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Wed, 21 Jul 2021 16:29:15 +0800 Subject: [PATCH 4/4] Update --please-go-to--discussion--tab-if-you-want-to-ask-or-share-something.md --- ...to--discussion--tab-if-you-want-to-ask-or-share-something.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/--please-go-to--discussion--tab-if-you-want-to-ask-or-share-something.md b/.github/ISSUE_TEMPLATE/--please-go-to--discussion--tab-if-you-want-to-ask-or-share-something.md index 45a2e2876..eb8623709 100644 --- a/.github/ISSUE_TEMPLATE/--please-go-to--discussion--tab-if-you-want-to-ask-or-share-something.md +++ b/.github/ISSUE_TEMPLATE/--please-go-to--discussion--tab-if-you-want-to-ask-or-share-something.md @@ -1,5 +1,5 @@ --- -name: ⚠ Please go to "Discussion" Tab if you want to ask or share something +name: ⚠ Please go to "Discussions" Tab if you want to ask or share something about: BUG REPORT ONLY HERE title: '' labels: ''