diff --git a/internal/web/actions/default/servers/addPortPopup.go b/internal/web/actions/default/servers/addPortPopup.go index 7a8464d3..cdb1f54f 100644 --- a/internal/web/actions/default/servers/addPortPopup.go +++ b/internal/web/actions/default/servers/addPortPopup.go @@ -26,7 +26,7 @@ func (this *AddPortPopupAction) RunGet(params struct { }) { this.Data["from"] = params.From - protocols := serverconfigs.AllServerProtocolsForType(params.ServerType) + protocols := serverconfigs.FindAllServerProtocolsForType(params.ServerType) if len(params.Protocol) > 0 { result := []maps.Map{} for _, p := range protocols { diff --git a/web/public/js/components/common/network-addresses-box.js b/web/public/js/components/common/network-addresses-box.js index 875a68e3..551ae4c9 100644 --- a/web/public/js/components/common/network-addresses-box.js +++ b/web/public/js/components/common/network-addresses-box.js @@ -1,5 +1,5 @@ Vue.component("network-addresses-box", { - props: ["v-server-type", "v-addresses", "v-protocol", "v-name", "v-from", "v-support-range"], + props: ["v-server-type", "v-addresses", "v-protocol", "v-name", "v-from", "v-support-range", "v-url"], data: function () { let addresses = this.vAddresses if (addresses == null) { @@ -41,7 +41,13 @@ Vue.component("network-addresses-box", { addAddr: function () { let that = this window.UPDATING_ADDR = null - teaweb.popup("/servers/addPortPopup?serverType=" + this.vServerType + "&protocol=" + this.protocol + "&from=" + this.from + "&supportRange=" + (this.supportRange() ? 1 : 0), { + + let url = this.vUrl + if (url == null) { + url = "/servers/addPortPopup" + } + + teaweb.popup(url + "?serverType=" + this.vServerType + "&protocol=" + this.protocol + "&from=" + this.from + "&supportRange=" + (this.supportRange() ? 1 : 0), { height: "18em", callback: function (resp) { var addr = resp.data.address @@ -72,7 +78,13 @@ Vue.component("network-addresses-box", { updateAddr: function (index, addr) { let that = this window.UPDATING_ADDR = addr - teaweb.popup("/servers/addPortPopup?serverType=" + this.vServerType + "&protocol=" + this.protocol + "&from=" + this.from + "&supportRange=" + (this.supportRange() ? 1 : 0), { + + let url = this.vUrl + if (url == null) { + url = "/servers/addPortPopup" + } + + teaweb.popup(url + "?serverType=" + this.vServerType + "&protocol=" + this.protocol + "&from=" + this.from + "&supportRange=" + (this.supportRange() ? 1 : 0), { height: "18em", callback: function (resp) { var addr = resp.data.address