-
+
+
+
+
+
+
+ {{$t('api_test.request.processor.code_template')}}
+
+ {{template.title}}
+
+
+ {{$t('commons.reference_documentation')}}
+
+
+
+
@@ -35,8 +83,28 @@
}
.script-content {
- padding: 15px 0;
- height: 300px;
+ height: calc(100vh - 570px);
+ }
+
+ .script-index {
+ padding: 0 20px;
+ }
+
+ .script-index div:first-child {
+ font-weight: bold;
+ font-size: 15px;
+ }
+
+ .template-title {
+ margin-bottom: 5px;
+ }
+
+ .document-url {
+ margin-top: 10px;
+ }
+
+ .instructions-icon {
+ margin-left: 5px;
}
diff --git a/frontend/src/business/components/api/test/components/request/ApiHttpRequestForm.vue b/frontend/src/business/components/api/test/components/request/ApiHttpRequestForm.vue
index a3e8ff3c1f..363f807b5a 100644
--- a/frontend/src/business/components/api/test/components/request/ApiHttpRequestForm.vue
+++ b/frontend/src/business/components/api/test/components/request/ApiHttpRequestForm.vue
@@ -68,10 +68,10 @@
-
+
-
+
diff --git a/frontend/src/business/components/api/test/model/JMX.js b/frontend/src/business/components/api/test/model/JMX.js
index be589de537..a30245399b 100644
--- a/frontend/src/business/components/api/test/model/JMX.js
+++ b/frontend/src/business/components/api/test/model/JMX.js
@@ -423,10 +423,7 @@ export class BeanShellPreProcessor extends BeanShellProcessor {
}
export class BeanShellPostProcessor extends BeanShellProcessor {
- constructor(testName, script) {
- let processor = {
- script: script,
- };
+ constructor(testName, processor) {
super('BeanShellPostProcessor', 'TestBeanGUI', 'BeanShellPostProcessor', testName, processor)
}
}
diff --git a/frontend/src/business/components/api/test/model/ScenarioModel.js b/frontend/src/business/components/api/test/model/ScenarioModel.js
index c7df9181a4..a2f261f2a8 100644
--- a/frontend/src/business/components/api/test/model/ScenarioModel.js
+++ b/frontend/src/business/components/api/test/model/ScenarioModel.js
@@ -1,5 +1,5 @@
import {
- Arguments, BeanShellPreProcessor,
+ Arguments, BeanShellPostProcessor, BeanShellPreProcessor,
CookieManager,
DubboSample,
DurationAssertion,
@@ -906,7 +906,7 @@ class JMXGenerator {
httpSamplerProxy.put(new BeanShellPreProcessor(name, request.beanShellPreProcessor));
}
if (request.beanShellPostProcessor && request.beanShellPostProcessor.script) {
- httpSamplerProxy.put(new BeanShellPreProcessor(name, request.beanShellPostProcessor));
+ httpSamplerProxy.put(new BeanShellPostProcessor(name, request.beanShellPostProcessor));
}
}
diff --git a/frontend/src/business/components/common/components/MsInstructionsIcon.vue b/frontend/src/business/components/common/components/MsInstructionsIcon.vue
new file mode 100644
index 0000000000..75222bd071
--- /dev/null
+++ b/frontend/src/business/components/common/components/MsInstructionsIcon.vue
@@ -0,0 +1,53 @@
+
+
+
+ {{content}}
+
+
+
+
+
+
+
+
diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack
index 7e4d80cc2b..06fc0a321a 160000
--- a/frontend/src/business/components/xpack
+++ b/frontend/src/business/components/xpack
@@ -1 +1 @@
-Subproject commit 7e4d80cc2b870a8cac6dbb9fe6711ab6041faf6d
+Subproject commit 06fc0a321a9886419be5c607ddaa6b40efb5179b
diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js
index 5c051730da..876f38fa8c 100644
--- a/frontend/src/i18n/en-US.js
+++ b/frontend/src/i18n/en-US.js
@@ -108,6 +108,7 @@ export default {
formatErr: 'Format Error',
id: 'ID',
please_upload: 'Please upload file',
+ reference_documentation: "Reference documentation",
date: {
select_date: 'Select date',
start_date: 'Start date',
@@ -459,6 +460,17 @@ export default {
json_path_expression: "JSONPath expression",
xpath_expression: "XPath expression",
},
+ processor: {
+ pre_exec_script : "PreProcessor",
+ post_exec_script: "PostProcessor",
+ code_template: "Code template",
+ bean_shell_processor_tip: "Currently only BeanShell scripts are supported",
+ code_template_get_variable: "Get variable",
+ code_template_set_variable: "Set variable",
+ code_template_get_response_header: "Get response header",
+ code_template_get_response_code: "Get response code",
+ code_template_get_response_result: "Get response result"
+ },
dubbo: {
protocol: "protocol",
input_interface: "Please enter the interface",
@@ -816,5 +828,7 @@ export default {
modify: "Modify Quota",
edit_quota_title: "{0} quota",
workspace_quota_list: "Workspace quota list of {0}",
+ unlimited: "Unlimited",
+ clean: "Clean"
}
};
diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js
index d66e7aa1a0..312dee0e64 100644
--- a/frontend/src/i18n/zh-CN.js
+++ b/frontend/src/i18n/zh-CN.js
@@ -107,6 +107,7 @@ export default {
please_upload: '请上传文件',
formatErr: '格式错误',
please_save: '请先保存',
+ reference_documentation: "参考文档",
id: 'ID',
date: {
select_date: '选择日期',
@@ -460,6 +461,17 @@ export default {
json_path_expression: "JSONPath表达式",
xpath_expression: "XPath表达式",
},
+ processor: {
+ pre_exec_script : "预执行脚本",
+ post_exec_script: "后执行脚本",
+ code_template: "代码模版",
+ bean_shell_processor_tip: "仅支持 BeanShell 脚本",
+ code_template_get_variable: "获取变量",
+ code_template_set_variable: "设置变量",
+ code_template_get_response_header: "获取响应头",
+ code_template_get_response_code: "获取响应码",
+ code_template_get_response_result: "获取响应结果"
+ },
dubbo: {
protocol: "协议",
input_interface: "请输入Interface",
@@ -818,5 +830,7 @@ export default {
modify: "修改配额",
edit_quota_title: "{0}的配额",
workspace_quota_list: "{0}的工作空间配额列表",
+ unlimited: "无限制",
+ clean: "清空"
}
};
diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js
index 7ad2882d79..6ab426fbc4 100644
--- a/frontend/src/i18n/zh-TW.js
+++ b/frontend/src/i18n/zh-TW.js
@@ -105,6 +105,7 @@ export default {
formatErr: '格式錯誤',
please_save: '請先保存',
id: 'ID',
+ reference_documentation: "參考文檔",
please_upload: '請上傳文件',
date: {
select_date: '選擇日期',
@@ -459,6 +460,17 @@ export default {
json_path_expression: "JSONPath運算式",
xpath_expression: "XPath運算式",
},
+ processor: {
+ pre_exec_script : "預執行腳本",
+ post_exec_script: "後執行腳本",
+ code_template: "代碼模版",
+ bean_shell_processor_tip: "僅支持 BeanShell 腳本",
+ code_template_get_variable: "獲取變量",
+ code_template_set_variable: "設置變量",
+ code_template_get_response_header: "獲取響應頭",
+ code_template_get_response_code: "獲取響應碼",
+ code_template_get_response_result: "獲取響應結果"
+ },
dubbo: {
protocol: "協定",
input_interface: "請輸入Interface",
@@ -815,5 +827,7 @@ export default {
modify: "修改配額",
edit_quota_title: "{0}的配額",
workspace_quota_list: "{0}的工作空間配額列表",
+ unlimited: "無限制",
+ clean: "清空"
}
};