Commit 3bc5d8da authored by 智勇's avatar 智勇

update detail Object

parent 762f254b
......@@ -485,10 +485,18 @@ exports.restart_system = async function () {
}
try {
this.logger.info(
"namespace:", this.request.body.namespace,
" microservice_name:", this.request.body.system_name,
" active:", "restart_microservice",
" user:", this.user);
{
namespace: this.request.body.namespace,
active: "restart_microservice",
microservice_name: this.request.body.system_name,
user: `${this.user.name}`,
user_mail: `${this.user.mail}`,
}
// "namespace:", this.request.body.namespace,
// " microservice_name:", this.request.body.system_name,
// " active:", "restart_microservice",
// " user:", this.user);
)
} catch (error) {
console.log(this.logger)
}
......@@ -511,10 +519,18 @@ exports.delete_system = async function () {
}
try {
this.logger.info(
"namespace:", this.request.body.namespace,
" name:", this.request.body.system_name,
" active:", "delete_microservice",
" user:", this.user);
{
namespace: this.request.body.namespace,
active: "delete_microservice",
microservice_name: this.request.body.system_name,
user: `${this.user.name}`,
user_mail: `${this.user.mail}`,
}
// "namespace:", this.request.body.namespace,
// " name:", this.request.body.system_name,
// " active:", "delete_microservice",
// " user:", this.user
);
} catch (error) {
}
......@@ -766,9 +782,17 @@ exports.create_system = async function () {
this.body = res;
try {
this.logger.info(
"namespace:", temp,
" active:", "create_microservice",
" user:", this.user);
{
namespace: this.request.body.namespace,
active: "create_microservice",
microservice_name: this.request.body.name,
// user: `${this.user.name}`,
// user_mail: `${this.user.mail}`,
}
// "namespace:", temp,
// " active:", "create_microservice",
// " user:", this.user
);
} catch (error) {
}
......@@ -791,9 +815,9 @@ exports.update_system = async function () {
try {
this.logger.info(
{
namespace: req.namespace,
namespace: this.request.body.namespace,
active: "update_microservice",
microservice_name: req.namespace,
microservice_name: this.request.body.name,
user: `${this.user.name}`,
user_mail: `${this.user.mail}`,
detail: temp
......@@ -803,7 +827,7 @@ exports.update_system = async function () {
// " user:", this.user
);
} catch (error) {
console.log(error)
}
return
......@@ -930,6 +954,13 @@ exports.reload_mq = async function () {
this.body = { code: "0000" };
try {
this.logger.info(
// {
// namespace: req.name_space,
// active: "reset_binlog",
// microservice_name: "",
// user: `${this.user.name}`,
// user_mail: `${this.user.mail}`,
// }
"namespace:", this.request.body.host,
" active:", "reload_mq",
" user:", this.user
......
......@@ -28,7 +28,7 @@ exports.get = async function () {
exports.get_log = async function () {
await this.bindDefault();
let item = await this.mongo("statisticslog").getLog(this.request.body);
let item = await this.mongo("statisticslog").getLog(this.request.body, { create_time: -1 });
this.body = item
return
}
\ No newline at end of file
......@@ -23,7 +23,7 @@ var StatisticsSchema = new Schema({
microservice_name: String,
user: String,
user_mail: String,
detail: String,
detail: Object,
create_time: Date
});
......@@ -40,7 +40,7 @@ var logger = {
microservice_name: "",
user: "",
user_mail: "",
detail: "",
detail: undefined,
create_time: new Date()
}
if (typeof args[0] === "string") {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment