-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Keep the change to the "Show Clickable Link" checkbox until entire dashboard is saved #5250
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have attached two comments below which seem somewhat suspicious
if (this.$parent.editMode && ignoreSendUrl && Object.keys(this.$root.monitorList).length) { | ||
return this.$root.monitorList[monitor.element.id].type === "http" || this.$root.monitorList[monitor.element.id].type === "keyword" || this.$root.monitorList[monitor.element.id].type === "json-query"; | ||
} | ||
return monitor.element.sendUrl && monitor.element.url && monitor.element.url !== "https://" && !this.editMode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this.editMode
because it's undefined.
@@ -48,14 +48,11 @@ class Monitor extends BeanModel { | |||
let obj = { | |||
id: this.id, | |||
name: this.name, | |||
sendUrl: this.sendUrl, | |||
sendUrl: !!this.sendUrl, | |||
url: this.url, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did you move url
up here?
There are cases where we don't want to expose this information
=> currently, this would leak that as far as I can see..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CommanderStorm
It's used in showLink()
. Should I have not deleted the following after all?
uptime-kuma/server/model/monitor.js
Lines 55 to 57 in 46d8744
if (this.sendUrl) { | |
obj.url = this.url; | |
} |
Leaving this if-statement causes the issue described in #3794 because when sendUrl
is false, the url
isn’t sent from database, and the result of showLink()
also becomes false.
https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#can-i-create-a-pull-request-for-uptime-kuma
Tick the checkbox if you understand [x]:
Description
Send
url
always because it's used inshowLink()
and fix theisClicable
status.Additional small changes:
isClickAble
->isClickable
.monitor
indata()
.I confirmed my fix by checking and unchecking the checkbox, and opening and closing the dialog with the following log output.
Fixes #3794
Type of change
Please delete any options that are not relevant.
Checklist
Screenshots (if any)
Please do not use any external image service. Instead, just paste in or drag and drop the image here, and it will be uploaded automatically.