diff --git a/src/dashboard-front/bk.config.js b/src/dashboard-front/bk.config.js
index 593e45ec1..cb11bb11d 100644
--- a/src/dashboard-front/bk.config.js
+++ b/src/dashboard-front/bk.config.js
@@ -1,4 +1,5 @@
const mockServer = require('./mock-server');
+const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin')
// const { DefinePlugin } = require('webpack');
module.exports = {
@@ -23,12 +24,10 @@ module.exports = {
};
},
- // chainWebpack: config => {
- // config
- // .plugin('feature-flags')
- // .use(DefinePlugin, [{
- // "__VUE_PROD_DEVTOOLS__": true,
- // }]);
- // return config
- // }
+ chainWebpack: config => {
+ config
+ .plugin('monaco')
+ .use(new MonacoWebpackPlugin());
+ return config
+ }
};
diff --git a/src/dashboard-front/package.json b/src/dashboard-front/package.json
index 91db675bd..d54de83f0 100644
--- a/src/dashboard-front/package.json
+++ b/src/dashboard-front/package.json
@@ -48,6 +48,7 @@
"mitt": "^3.0.1",
"moment": "^2.29.4",
"monaco-editor": "^0.44.0",
+ "monaco-editor-webpack-plugin": "^7.0.0",
"pinia": "^2.0.23",
"request": "^2.88.2",
"semver": "^7.6.0",
diff --git a/src/dashboard-front/src/components/ag-editor.vue b/src/dashboard-front/src/components/ag-editor.vue
index 086958dad..3361d6837 100644
--- a/src/dashboard-front/src/components/ag-editor.vue
+++ b/src/dashboard-front/src/components/ag-editor.vue
@@ -1,6 +1,11 @@
-
diff --git a/src/dashboard-front/src/http/online-test.ts b/src/dashboard-front/src/http/online-test.ts
index 8c655e6e2..3a5023727 100644
--- a/src/dashboard-front/src/http/online-test.ts
+++ b/src/dashboard-front/src/http/online-test.ts
@@ -46,3 +46,10 @@ export const getUserAuthType = () => fetch.get(`${BK_DASHBOARD_URL}/settings/use
* @returns
*/
export const resourceSchema = (gatewayId: number, stageId: number, resourceId: number) => fetch.get(`${BK_DASHBOARD_URL}/gateways/${gatewayId}/releases/stages/${stageId}/resources/${resourceId}/schema/`);
+
+/**
+ * 在线调试历史记录列表
+ * @param apigwId 网关id
+ * @returns
+ */
+export const getTestHistories = (apigwId: number, data: any) => fetch.get(`${BK_DASHBOARD_URL}/gateways/${apigwId}/tests/histories/?${json2Query(data)}`);
diff --git a/src/dashboard-front/src/http/report.ts b/src/dashboard-front/src/http/report.ts
index f10f05b66..d17f2f3df 100644
--- a/src/dashboard-front/src/http/report.ts
+++ b/src/dashboard-front/src/http/report.ts
@@ -1,5 +1,5 @@
import fetch from './fetch';
-import { json2Query } from '@/common/util';
+import { json2Query, blobDownLoad } from '@/common/util';
const { BK_DASHBOARD_URL } = window;
@@ -20,3 +20,13 @@ export const getApigwStages = (apigwId: number, params: any) => fetch.get(`${BK_
* @param apigwId 网关id
*/
export const getApigwResources = (apigwId: number, params: any) => fetch.get(`${BK_DASHBOARD_URL}/gateways/${apigwId}/resources/?${json2Query(params)}`);
+
+/**
+ * 日志导出
+ * @param apigwId 网关id
+ * @param data 导出参数
+ */
+export const exportLogs = async (apigwId: number, data: any) => {
+ const res = await fetch.get(`${BK_DASHBOARD_URL}/gateways/${apigwId}/logs/export/`, data, { responseType: 'blob' });
+ return blobDownLoad(res);
+};
diff --git a/src/dashboard-front/src/language/lang.ts b/src/dashboard-front/src/language/lang.ts
index 26855fc6a..80d4298e7 100644
--- a/src/dashboard-front/src/language/lang.ts
+++ b/src/dashboard-front/src/language/lang.ts
@@ -1300,6 +1300,12 @@ const lang: ILANG = {
'查看日志': ['View logs'],
'发布人': ['Releaser'],
'发布资源': ['Release resource'],
+ '响应状态码': ['Response status code'],
+ '调用时间': ['Call time'],
+ '请求记录': ['Request record'],
+ '检索项:': ['Search terms:'],
+ '清除': ['Clear away'],
+ '下载日志': ['Download log'],
'下架': ['Unpublish'],
'今天': ['Today'],
'近7天': ['Last 7 days'],
diff --git a/src/dashboard-front/src/views/online-debug/components/doc.vue b/src/dashboard-front/src/views/online-debug/components/doc.vue
index 461a86f4e..eae5ab7ba 100644
--- a/src/dashboard-front/src/views/online-debug/components/doc.vue
+++ b/src/dashboard-front/src/views/online-debug/components/doc.vue
@@ -58,7 +58,7 @@
-
{{ t('SDK使用样例') }}
-
-
+ -->
@@ -91,6 +90,8 @@