mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-27 16:54:04 +00:00
Apply suggestions from @Saibamen
Co-authored-by: Adam Stachowicz <saibamenppl@gmail.com>
This commit is contained in:
parent
54aa68ec58
commit
8b463e70df
1 changed files with 6 additions and 6 deletions
|
@ -974,10 +974,10 @@ let indexHTML = fs.readFileSync("./dist/index.html").toString();
|
||||||
for (let i = 0; i < monitorListData.length; i++) {
|
for (let i = 0; i < monitorListData.length; i++) {
|
||||||
if ((importHandle == "skip" && monitorNameListString.includes(monitorListData[i].name) == false) || importHandle == "keep" || importHandle == "overwrite") {
|
if ((importHandle == "skip" && monitorNameListString.includes(monitorListData[i].name) == false) || importHandle == "keep" || importHandle == "overwrite") {
|
||||||
|
|
||||||
|
let retryInterval = 0;
|
||||||
|
|
||||||
if (backupData.version.includes("1.7")) {
|
if (backupData.version.includes("1.7")) {
|
||||||
var retryInterval = monitorListData[i].retryInterval;
|
retryInterval = monitorListData[i].retryInterval;
|
||||||
} else {
|
|
||||||
var retryInterval = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let monitor = {
|
let monitor = {
|
||||||
|
@ -1019,15 +1019,15 @@ let indexHTML = fs.readFileSync("./dist/index.html").toString();
|
||||||
monitorListData[i].tags[o].name,
|
monitorListData[i].tags[o].name,
|
||||||
])
|
])
|
||||||
|
|
||||||
|
let tagId = tag.id
|
||||||
|
|
||||||
if (! tag) {
|
if (! tag) {
|
||||||
let beanTag = R.dispense("tag")
|
let beanTag = R.dispense("tag")
|
||||||
beanTag.name = monitorListData[i].tags[o].name
|
beanTag.name = monitorListData[i].tags[o].name
|
||||||
beanTag.color = monitorListData[i].tags[o].color
|
beanTag.color = monitorListData[i].tags[o].color
|
||||||
await R.store(beanTag)
|
await R.store(beanTag)
|
||||||
|
|
||||||
var tagId = beanTag.id
|
tagId = beanTag.id
|
||||||
} else {
|
|
||||||
var tagId = tag.id
|
|
||||||
}
|
}
|
||||||
|
|
||||||
await R.exec("INSERT INTO monitor_tag (tag_id, monitor_id, value) VALUES (?, ?, ?)", [
|
await R.exec("INSERT INTO monitor_tag (tag_id, monitor_id, value) VALUES (?, ?, ?)", [
|
||||||
|
|
Loading…
Reference in a new issue