diff --git a/README.md b/README.md
index 2691a17..8b5d4e7 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
diff --git a/cmd/dashboard/controller/member_api.go b/cmd/dashboard/controller/member_api.go
index 5bf15fc..e3480c1 100644
--- a/cmd/dashboard/controller/member_api.go
+++ b/cmd/dashboard/controller/member_api.go
@@ -6,6 +6,7 @@ import (
"fmt"
"net/http"
"strconv"
+ "strings"
"time"
"github.com/gin-gonic/gin"
@@ -205,7 +206,7 @@ func (ma *memberAPI) addOrEditMonitor(c *gin.Context) {
err := c.ShouldBindJSON(&mf)
if err == nil {
m.Name = mf.Name
- m.Target = mf.Target
+ m.Target = strings.TrimSpace(mf.Target)
m.Type = mf.Type
m.ID = mf.ID
m.SkipServersRaw = mf.SkipServersRaw
diff --git a/resource/static/main.js b/resource/static/main.js
index 82ad95b..30343fd 100644
--- a/resource/static/main.js
+++ b/resource/static/main.js
@@ -60,8 +60,11 @@ function showFormModal(modelSelector, formID, URL, getData) {
if (item.name.endsWith("ServersRaw")) {
if (item.value.length > 2) {
- obj[item.name] =
- "[" + item.value.substr(3, item.value.length - 1) + "]";
+ obj[item.name] = JSON.stringify(
+ [...item.value.matchAll(/\d+/gm)].map((k) =>
+ parseInt(k[0])
+ )
+ );
}
}
diff --git a/resource/template/common/footer.html b/resource/template/common/footer.html
index 52824af..4f594c6 100644
--- a/resource/template/common/footer.html
+++ b/resource/template/common/footer.html
@@ -9,7 +9,7 @@
-
+