...
|
...
|
@@ -22,8 +22,9 @@ const TABLE = { |
|
|
const DB_NAME = 'web-apm';
|
|
|
|
|
|
const APP_NAME = {
|
|
|
pc: 1,
|
|
|
h5: 2
|
|
|
default: 0,
|
|
|
pc: 'yohobuy-node',
|
|
|
h5: 'yohobuywap-node'
|
|
|
};
|
|
|
|
|
|
const APP_NAME2 = {
|
...
|
...
|
@@ -192,7 +193,7 @@ const profile_service = { |
|
|
const errorModel = new ErrorModel(ctx);
|
|
|
const result = await errorModel.getList(app, start, length);
|
|
|
|
|
|
return {cde: 200, data: result};
|
|
|
return result;
|
|
|
}
|
|
|
};
|
|
|
|
...
|
...
|
@@ -201,7 +202,7 @@ const profile_controller = { |
|
|
await ctx.render('action/profile_server');
|
|
|
},
|
|
|
async server_mean_report_json(ctx) {
|
|
|
const app = APP_NAME[ctx.query.app] || 0;
|
|
|
const app = APP_NAME[ctx.query.app] || APP_NAME.default;
|
|
|
const start = parseInt(ctx.query.start) || 0;
|
|
|
const length = parseInt(ctx.query.length) || 10;
|
|
|
const draw = ctx.query.draw;
|
...
|
...
|
@@ -213,7 +214,7 @@ const profile_controller = { |
|
|
await ctx.render('action/profile_error');
|
|
|
},
|
|
|
async error_report_json(ctx) {
|
|
|
const app = APP_NAME[(ctx.query.app)] || 0;
|
|
|
const app = APP_NAME[(ctx.query.app)] || APP_NAME.default;
|
|
|
const start = parseInt(ctx.query.start) || 0;
|
|
|
const length = parseInt(ctx.query.length) || 10;
|
|
|
const draw = ctx.query.draw;
|
...
|
...
|
|