From cf2ca71deecc218c1977de12bfa7d88cffc6f208 Mon Sep 17 00:00:00 2001 From: "sur.la.route" Date: Tue, 14 Jun 2022 07:42:53 -0500 Subject: [PATCH 1/5] prevent null workstation #'s from passing.. to axios-ntlm --- server/model/monitor.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index 7c269fe2..63fd3711 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -279,12 +279,18 @@ class Monitor extends BeanModel { if (this.auth_method === "ntlm") { options.httpsAgent.keepAlive = true; - res = await httpNtlm(options, { + let ntlmOptions = + { username: this.basic_auth_user, password: this.basic_auth_pass, domain: this.authDomain, - workstation: this.authWorkstation, - }); + } + + if (this.authWorkstation) { + ntlmOptions.workstation= this.authWorkstation; + } + + res = await httpNtlm(options, ntlmOptions); } else { res = await axiosClient.request(options); From 6995a2998015c86046434ced4b835a60c9d4ae16 Mon Sep 17 00:00:00 2001 From: "sur.la.route" Date: Tue, 14 Jun 2022 07:45:04 -0500 Subject: [PATCH 2/5] workstation field should be text, not password --- src/pages/EditMonitor.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/EditMonitor.vue b/src/pages/EditMonitor.vue index bf0b5655..1d902b1e 100644 --- a/src/pages/EditMonitor.vue +++ b/src/pages/EditMonitor.vue @@ -404,7 +404,7 @@
- +
From 98f3c126e5febd7777cf361d8e771a8aa594177c Mon Sep 17 00:00:00 2001 From: Christopher Pickering Date: Tue, 14 Jun 2022 07:58:35 -0500 Subject: [PATCH 3/5] passed lint --- server/model/monitor.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index 63fd3711..77487530 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -279,15 +279,14 @@ class Monitor extends BeanModel { if (this.auth_method === "ntlm") { options.httpsAgent.keepAlive = true; - let ntlmOptions = - { + let ntlmOptions = { username: this.basic_auth_user, password: this.basic_auth_pass, domain: this.authDomain, - } + }; if (this.authWorkstation) { - ntlmOptions.workstation= this.authWorkstation; + ntlmOptions.workstation = this.authWorkstation; } res = await httpNtlm(options, ntlmOptions); From 660005b143b6a79ee15624b090474049980595d8 Mon Sep 17 00:00:00 2001 From: Christopher Pickering Date: Tue, 14 Jun 2022 08:49:36 -0500 Subject: [PATCH 4/5] cleaned up code --- package-lock.json | 4 ++-- server/model/monitor.js | 11 +++-------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 24f4cca4..87342813 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "uptime-kuma", - "version": "1.16.1", + "version": "1.17.0-beta.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "uptime-kuma", - "version": "1.16.1", + "version": "1.17.0-beta.0", "license": "MIT", "dependencies": { "@fortawesome/fontawesome-svg-core": "~1.2.36", diff --git a/server/model/monitor.js b/server/model/monitor.js index 77487530..3e026fb6 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -279,17 +279,12 @@ class Monitor extends BeanModel { if (this.auth_method === "ntlm") { options.httpsAgent.keepAlive = true; - let ntlmOptions = { + res = await httpNtlm(options, { username: this.basic_auth_user, password: this.basic_auth_pass, domain: this.authDomain, - }; - - if (this.authWorkstation) { - ntlmOptions.workstation = this.authWorkstation; - } - - res = await httpNtlm(options, ntlmOptions); + workstation: this.authWorkstation ? this.authWorkstation : undefined + }); } else { res = await axiosClient.request(options); From 62acd2edb1507f6979d8e9df1c2f86d6ad1d3e8b Mon Sep 17 00:00:00 2001 From: Nelson Chan Date: Tue, 14 Jun 2022 22:43:44 +0800 Subject: [PATCH 5/5] Fix: misc. layout fix on mobile --- src/assets/app.scss | 6 ++++++ src/components/MonitorList.vue | 18 +++++++++++++++--- src/pages/List.vue | 10 +++++++++- src/router.js | 8 ++++---- 4 files changed, 34 insertions(+), 8 deletions(-) diff --git a/src/assets/app.scss b/src/assets/app.scss index 93ff3ff3..5adc76fa 100644 --- a/src/assets/app.scss +++ b/src/assets/app.scss @@ -363,6 +363,12 @@ textarea.form-control { overflow-y: auto; height: calc(100% - 65px); } + + @media (max-width: 770px) { + &.scrollbar { + height: calc(100% - 40px); + } + } .item { display: block; diff --git a/src/components/MonitorList.vue b/src/components/MonitorList.vue index 7aeadd1e..c4e621f9 100644 --- a/src/components/MonitorList.vue +++ b/src/components/MonitorList.vue @@ -69,10 +69,22 @@ export default { }; }, computed: { + /** + * Improve the sticky appearance of the list by increasing its + * height as user scrolls down. + * Not used on mobile. + */ boxStyle() { - return { - height: `calc(100vh - 160px + ${this.windowTop}px)`, - }; + if (window.innerWidth > 550) { + return { + height: `calc(100vh - 160px + ${this.windowTop}px)`, + }; + } else { + return { + height: "calc(100vh - 160px)", + }; + } + }, sortedMonitorList() { diff --git a/src/pages/List.vue b/src/pages/List.vue index 9cbf3f2f..dd2d4605 100644 --- a/src/pages/List.vue +++ b/src/pages/List.vue @@ -1,6 +1,6 @@ @@ -14,3 +14,11 @@ export default { }; + diff --git a/src/router.js b/src/router.js index 179dbe18..72619477 100644 --- a/src/router.js +++ b/src/router.js @@ -65,12 +65,12 @@ const routes = [ path: "/add", component: EditMonitor, }, - { - path: "/list", - component: List, - }, ], }, + { + path: "/list", + component: List, + }, { path: "/settings", component: Settings,