From f35e7a589cc3e4f76de6943b4a556b1cadaa07b7 Mon Sep 17 00:00:00 2001 From: powerkimhub Date: Wed, 21 Jul 2021 04:45:48 +0000 Subject: [PATCH] Some AdminWeb call from not browser but server --- api-runtime/rest-runtime/admin-web/AdminWeb.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api-runtime/rest-runtime/admin-web/AdminWeb.go b/api-runtime/rest-runtime/admin-web/AdminWeb.go index 61f788d39..2e04ad473 100644 --- a/api-runtime/rest-runtime/admin-web/AdminWeb.go +++ b/api-runtime/rest-runtime/admin-web/AdminWeb.go @@ -303,7 +303,7 @@ func makeKeyPairSelect_html(onchangeFunctionName string, strList []string, id st func getResourceList_JsonByte(resourceName string) ([]byte, error) { // cr.ServicePort = ":1024" - url := "http://" + cr.ServiceIPorName + cr.ServicePort + "/spider/" + resourceName + url := "http://" + "localhost" + cr.ServerPort + "/spider/" + resourceName // get object list res, err := http.Get(url) @@ -320,7 +320,7 @@ func getResourceList_JsonByte(resourceName string) ([]byte, error) { func getResourceList_with_Connection_JsonByte(connConfig string, resourceName string) ([]byte, error) { // cr.ServicePort = ":1024" - url := "http://" + cr.ServiceIPorName + cr.ServicePort + "/spider/" + resourceName + url := "http://" + "localhost" + cr.ServerPort + "/spider/" + resourceName // get object list var reqBody struct { Value string `json:"ConnectionName"` @@ -350,7 +350,7 @@ func getResourceList_with_Connection_JsonByte(connConfig string, resourceName st func getAllResourceList_with_Connection_JsonByte(connConfig string, resourceName string) ([]byte, error) { // cr.ServicePort = ":1024" - url := "http://" + cr.ServiceIPorName + cr.ServicePort + "/spider/all" + resourceName + url := "http://" + "localhost" + cr.ServerPort + "/spider/all" + resourceName // get object list var reqBody struct { Value string `json:"ConnectionName"` @@ -380,7 +380,7 @@ func getAllResourceList_with_Connection_JsonByte(connConfig string, resourceName func getResource_JsonByte(resourceName string, name string) ([]byte, error) { // cr.ServicePort = ":1024" - url := "http://" + cr.ServiceIPorName + cr.ServicePort + "/spider/" + resourceName + "/" + name + url := "http://" + "localhost" + cr.ServerPort + "/spider/" + resourceName + "/" + name // get object list res, err := http.Get(url) @@ -397,7 +397,7 @@ func getResource_JsonByte(resourceName string, name string) ([]byte, error) { func getResource_with_Connection_JsonByte(connConfig string, resourceName string, name string) ([]byte, error) { // cr.ServicePort = ":1024" - url := "http://" + cr.ServiceIPorName + cr.ServicePort + "/spider/" + resourceName + "/" + name + url := "http://" + "localhost" + cr.ServerPort + "/spider/" + resourceName + "/" + name // get object list var reqBody struct { Value string `json:"ConnectionName"`