diff --git a/src/app.rs b/src/app.rs
index 56f54ec..9f1730d 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -327,7 +327,7 @@ impl AppEnvironment {
let tail = if is_html { "" } else { "" };
let row_begin = if is_html { "
" } else { "" };
let row_split = if is_html { " | " } else { ": " };
- let row_end = if is_html { " |
" } else { "" };
+ let row_end = if is_html { "" } else { "\n" };
let mut row_host = String::from("");
for v in self.get_hosts() {
if let Ok(saddr_iter) = v.to_socket_addrs() {
@@ -410,6 +410,10 @@ impl AppEnvironment {
for cmd in ref_x.cmds.iter() {
info!("load global command \"{}\" success", cmd.name());
}
+
+ for cmd in ref_x.events.iter() {
+ info!("load global event \"{}\" success", cmd.name());
+ }
}
}
diff --git a/src/wxwork_robot/project.rs b/src/wxwork_robot/project.rs
index c7af139..31aa410 100644
--- a/src/wxwork_robot/project.rs
+++ b/src/wxwork_robot/project.rs
@@ -128,22 +128,22 @@ impl WXWorkProject {
if let Some(kvs) = json.as_object() {
if let Some(cmds_json) = kvs.get("cmds") {
- proj_events = command::WXWorkCommand::parse(cmds_json);
+ proj_cmds = command::WXWorkCommand::parse(cmds_json);
} else {
- proj_events = Vec::new();
+ proj_cmds = Vec::new();
}
} else {
- proj_events = Vec::new();
+ proj_cmds = Vec::new();
}
if let Some(kvs) = json.as_object() {
if let Some(cmds_json) = kvs.get("events") {
- proj_cmds = command::WXWorkCommand::parse(cmds_json);
+ proj_events = command::WXWorkCommand::parse(cmds_json);
} else {
- proj_cmds = Vec::new();
+ proj_events = Vec::new();
}
} else {
- proj_cmds = Vec::new();
+ proj_events = Vec::new();
}
for cmd in proj_cmds.iter() {
@@ -153,6 +153,13 @@ impl WXWorkProject {
cmd.name()
);
}
+ for cmd in proj_events.iter() {
+ info!(
+ "project \"{}\" load event \"{}\" success",
+ proj_name,
+ cmd.name()
+ );
+ }
debug!("project \"{}\" with token(base64): \"{}\", aes key(base64): \"{}\" , env vars({}), load success.", proj_name, proj_token, proj_aes_key, envs_var_count);
}