diff --git a/backend/src/main/java/io/metersphere/api/parse/old/JmeterDocumentParser.java b/backend/src/main/java/io/metersphere/api/parse/old/JmeterDocumentParser.java index c648df516b..f406b826d5 100644 --- a/backend/src/main/java/io/metersphere/api/parse/old/JmeterDocumentParser.java +++ b/backend/src/main/java/io/metersphere/api/parse/old/JmeterDocumentParser.java @@ -18,6 +18,8 @@ import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import java.io.ByteArrayInputStream; import java.io.StringWriter; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; import java.util.HashMap; import java.util.Map; @@ -26,7 +28,7 @@ public class JmeterDocumentParser { private final static String STRING_PROP = "stringProp"; private final static String ARGUMENTS = "Arguments"; private final static String COLLECTION_PROP = "collectionProp"; - private final static String HTTP_SAMPLER_PROXY = "MsHTTPSamplerProxy"; + private final static String HTTP_SAMPLER_PROXY = "HTTPSamplerProxy"; private final static String ELEMENT_PROP = "elementProp"; public static byte[] parse(byte[] source) { @@ -154,7 +156,14 @@ public class JmeterDocumentParser { if (!StringUtils.equals("?", u)) { u += "&"; } - u += k + "=" + ScriptEngineUtils.calculate(v); + v = ScriptEngineUtils.calculate(v); + // urlencoder + try { + v = URLEncoder.encode(v, "UTF-8"); + } catch (UnsupportedEncodingException e) { + LogUtil.error(e); + } + u += k + "=" + v; return u; }); ele.setTextContent(url + ((params != null && !params.equals("?")) ? params : "")); diff --git a/frontend/src/business/components/common/router/router.js b/frontend/src/business/components/common/router/router.js index a9f24d6ebb..f5821015c4 100644 --- a/frontend/src/business/components/common/router/router.js +++ b/frontend/src/business/components/common/router/router.js @@ -11,7 +11,7 @@ Vue.use(VueRouter); const router = new VueRouter({ routes: [ - {path: "/", redirect: '/track/home'}, + {path: "/", redirect: '/setting/personsetting'}, { path: "/sidebar", components: { diff --git a/frontend/src/business/components/performance/test/components/PerformanceBasicConfig.vue b/frontend/src/business/components/performance/test/components/PerformanceBasicConfig.vue index 79b7a6ae08..a88dcc6448 100644 --- a/frontend/src/business/components/performance/test/components/PerformanceBasicConfig.vue +++ b/frontend/src/business/components/performance/test/components/PerformanceBasicConfig.vue @@ -122,7 +122,7 @@ export default { this.fileList = JSON.parse(JSON.stringify(files)); this.tableData = JSON.parse(JSON.stringify(files)); this.tableData.map(f => { - f.size = f.size + ' Bytes'; + f.size = (f.size / 1024).toFixed(2) + ' KB'; }); }) },