Main.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585
  1. MWF.xApplication.LogViewer.Main = new Class({
  2. Extends: MWF.xApplication.Common.Main,
  3. Implements: [Options, Events],
  4. options: {
  5. "style": "default",
  6. "name": "LogViewer",
  7. "icon": "icon.png",
  8. "width": "800",
  9. "height": "600",
  10. "title": MWF.xApplication.LogViewer.LP.title
  11. },
  12. onQueryLoad: function(){
  13. this.lp = MWF.xApplication.LogViewer.LP;
  14. this.tagId = o2.uuid();
  15. },
  16. loadApplication: function(callback){
  17. if (!this.options.isRefresh){
  18. this.maxSize(function(){
  19. this.doLog();
  20. }.bind(this));
  21. }else{
  22. this.doLog();
  23. }
  24. if (callback) callback();
  25. },
  26. doLog: function(){
  27. this.status = "prompt";
  28. this.actions = MWF.Actions.get("x_program_center");
  29. this.node = new Element("div", {"styles": this.css.contentNode}).inject(this.content);
  30. this.toolbarNode = new Element("div", {"styles": this.css.toolbarNode}).inject(this.node);
  31. this.screenNode = new Element("div", {"styles": this.css.screenNode}).inject(this.node);
  32. this.bottomNode = new Element("div", {"styles": this.css.bottomNode}).inject(this.node);
  33. this.loadToolbar();
  34. this.loadScreen();
  35. this.initLog();
  36. this.loadLog();
  37. },
  38. initLog: function(){
  39. this.screenInforAreaNode.empty();
  40. this.date = this.dateSelect.options[this.dateSelect.selectedIndex];
  41. this.method = "listPromptErrorLog";
  42. this.count = 20;
  43. this.currentId = "(0)";
  44. //定时器
  45. },
  46. loadToolbar: function(){
  47. this.promptErrorButton = this.createTopButton("PromptError", "prompt.png", "prompt");
  48. this.unexpectedErrorButton = this.createTopButton("UnexpectedError", "unexpected.png", "unexpected");
  49. this.warnErrorButton = this.createTopButton("Warn", "warn.png", "warn");
  50. this.systemLogButton = this.createTopButton("SystemLog", "systemLog.png", "systemLog");
  51. this.dateSelect = new Element("select", {"styles": this.css.toolbarDateSelect}).inject(this.toolbarNode);
  52. new Element("option", {
  53. "value": "all",
  54. "selected": true,
  55. "text": this.lp.current
  56. }).inject(this.dateSelect);
  57. var d = new Date();
  58. var t = d.format("%Y-%m-%d");
  59. new Element("option", { "value": t, "text": t }).inject(this.dateSelect);
  60. for (var i=0; i<=7; i++){
  61. d = d.decrement("day", 1);
  62. t = d.format("%Y-%m-%d");
  63. new Element("option", { "value": t, "text": t }).inject(this.dateSelect);
  64. }
  65. this.dateSelect.addEvent("change", function(){
  66. this.initLog();
  67. this.loadLog();
  68. }.bind(this));
  69. // this.promptErrorButton.addEvent("click", function(){
  70. // this.showTypeLog("prompt");
  71. // }.bind(this));
  72. // this.unexpectedErrorButton.addEvent("click", function(){
  73. // this.showTypeLog("unexpected");
  74. // }.bind(this));
  75. // this.warnErrorButton.addEvent("click", function(){
  76. // this.showTypeLog("warn");
  77. // }.bind(this));
  78. this.clearBtn = new Element("button",{"text":"clear","style":"margin:10px;float:right"}).inject(this.toolbarNode);
  79. this.clearBtn.addEvent("click",function () {
  80. this.screenInforAreaNode.empty();
  81. this.tagId = o2.uuid();
  82. }.bind(this));
  83. this.stopBtn = new Element("button",{"text":"stop","style":"margin:10px;float:right"}).inject(this.toolbarNode);
  84. this.startBtn = new Element("button",{"text":"start","style":"margin:10px;display:none;;float:right"}).inject(this.toolbarNode);
  85. this.stopBtn.addEvent("click",function () {
  86. this.startBtn.show();
  87. this.stopBtn.hide();
  88. if(this.method==="listSystemLog"){
  89. $clear(this.timeDo);
  90. this.timeDo = null;
  91. }else {
  92. this.initLog();
  93. this.loadLog();
  94. }
  95. }.bind(this));
  96. this.startBtn.addEvent("click",function () {
  97. this.startBtn.hide();
  98. this.stopBtn.show();
  99. this.initLog();
  100. this.loadLog();
  101. }.bind(this));
  102. },
  103. showTypeLog: function(status){
  104. $clear(this.timeDo);
  105. this.timeDo = null;
  106. if (this.status!==status){
  107. switch (this.status){
  108. case "prompt":
  109. this.promptErrorButton.setStyles(this.css.toolbarButton);
  110. break;
  111. case "unexpected":
  112. this.unexpectedErrorButton.setStyles(this.css.toolbarButton);
  113. break;
  114. case "warn":
  115. this.warnErrorButton.setStyles(this.css.toolbarButton);
  116. break;
  117. case "systemLog":
  118. this.systemLogButton.setStyles(this.css.toolbarButton);
  119. break;
  120. }
  121. switch (status){
  122. case "prompt":
  123. this.promptErrorButton.setStyles(this.css.toolbarButton_down);
  124. this.status="prompt";
  125. break;
  126. case "unexpected":
  127. this.unexpectedErrorButton.setStyles(this.css.toolbarButton_down);
  128. this.status="unexpected";
  129. break;
  130. case "warn":
  131. this.warnErrorButton.setStyles(this.css.toolbarButton_down);
  132. this.status="warn";
  133. break;
  134. case "systemLog":
  135. this.systemLogButton.setStyles(this.css.toolbarButton_down);
  136. this.status="systemLog";
  137. break;
  138. default:
  139. this.promptErrorButton.setStyles(this.css.toolbarButton_down);
  140. this.status="prompt";
  141. }
  142. this.initLog();
  143. this.loadLog();
  144. }
  145. },
  146. createTopButton: function(text, img, status){
  147. var node = new Element("div", {"styles": this.css.toolbarButton}).inject(this.toolbarNode);
  148. var iconNode = new Element("div", {"styles": this.css.toolbarIconButton}).inject(node);
  149. var textNode = new Element("div", {"styles": this.css.toolbarTextButton, "text": text}).inject(node);
  150. iconNode.setStyle("background-image", "url("+"/x_component_LogViewer/$Main/default/"+img+")");
  151. if (status==this.status) node.setStyles(this.css.toolbarButton_down);
  152. var _self = this;
  153. node.addEvents({
  154. "mouseover": function(){if (_self.status != status) this.setStyles(_self.css.toolbarButton_over);},
  155. "mousedown": function(){if (_self.status != status) this.setStyles(_self.css.toolbarButton_down);},
  156. "mouseup": function(){if (_self.status != status) this.setStyles(_self.css.toolbarButton_over);},
  157. "mouseout": function(){if (_self.status != status) this.setStyles(_self.css.toolbarButton);},
  158. "click": function(){_self.showTypeLog(status);}.bind(this)
  159. });
  160. return node;
  161. },
  162. loadLog: function(){
  163. this.date = this.dateSelect.options[this.dateSelect.selectedIndex].value;
  164. switch (this.status){
  165. case "prompt":
  166. this.method = (this.date==="all") ? "listPromptErrorLog" : "listPromptErrorLogWithDate";
  167. break;
  168. case "unexpected":
  169. this.method = (this.date==="all") ? "listUnexpectedErrorLog" : "listUnexpectedErrorLogWithDate";
  170. break;
  171. case "warn":
  172. this.method = (this.date==="all") ? "listWarnLog" : "listWarnLogWithDate";
  173. break;
  174. case "systemLog":
  175. this.method = "listSystemLog";
  176. break;
  177. default:
  178. this.method = (this.date==="all") ? "listPromptErrorLog" : "listPromptErrorLogWithDate";
  179. }
  180. if(this.method==="listSystemLog"){
  181. this.actions[this.method](this.tagId, function(json){
  182. this.showSystemLog(json.data);
  183. }.bind(this));
  184. //添加定时器
  185. this.timeDo = this.tiemShowSystemLog.periodical(2000,this);
  186. }else{
  187. if (this.date==="all"){
  188. this.actions[this.method](this.currentId, this.count, function(json){
  189. this.showLog(json.data);
  190. }.bind(this));
  191. }else{
  192. var d = new Date().parse(this.date).format("%Y-%m-%d");
  193. this.actions[this.method](this.currentId, this.count, d, function(json){
  194. this.showLog(json.data);
  195. }.bind(this));
  196. }
  197. }
  198. },
  199. showSystemLog : function(data){
  200. this.logFinish = true;
  201. data.each(function (log) {
  202. var node = new Element("div", {"styles": this.css.logItemNode}).inject(this.screenInforAreaNode);
  203. if(log.logLevel){
  204. var lineLog = log.lineLog;
  205. var logTime = log.logTime.split("#")[0];
  206. lineLog = lineLog.replace(logTime,"");
  207. lineLog = lineLog.replace(log.logLevel,"");
  208. var typeNode = new Element("div",{
  209. "html" : log.logLevel,
  210. "title" : log.node,
  211. "style" : "float:left;margin:0 10px;width:50px;font-weight:500;"
  212. }).inject(node);
  213. var color = "#FF0000";
  214. switch (log.logLevel) {
  215. case "INFO" :
  216. color = "#5a86ff";
  217. break;
  218. case "PRINT" :
  219. color = "#ffd192";
  220. break;
  221. case "DEBUG" :
  222. color = "#d7ff3d";
  223. break;
  224. default :
  225. }
  226. typeNode.setStyle("color",color);
  227. var timeNode = new Element("div",{
  228. "html" : logTime,
  229. "style" : "float:left;margin:0 10px;width:180px;color:#6BC5FC"
  230. }).inject(node);
  231. }
  232. var contentNode = new Element("div",{
  233. "text" : log.lineLog,
  234. "style" : "margin-left:270px"
  235. }).inject(node);
  236. }.bind(this));
  237. },
  238. tiemShowSystemLog : function(){
  239. this.actions[this.method](this.tagId, function(json){
  240. this.showSystemLog(json.data);
  241. this.screenInforAreaNode.scrollTop = this.screenInforAreaNode.scrollHeight;
  242. }.bind(this));
  243. },
  244. showLog: function(data){
  245. if (data.length){
  246. var last = data[data.length-1];
  247. this.currentId = last.id;
  248. data.each(function(log){
  249. new MWF.xApplication.LogViewer.Log(log, this);
  250. }.bind(this));
  251. // switch (this.status){
  252. // case "prompt":
  253. // this.showPromptLog(data);
  254. // break;
  255. // case "unexpected":
  256. // this.showUnexpectedLog(data);
  257. // break;
  258. // case "warn":
  259. // this.showWarnLog(data);
  260. // break;
  261. // default:
  262. // this.showPromptLog(data);
  263. // }
  264. }else{
  265. this.logFinish = true;
  266. }
  267. this.checkLoadNext();
  268. },
  269. checkLoadNext: function(){
  270. if (!this.logFinish){
  271. var s = this.screenInforAreaNode.getScroll();
  272. var ssize = this.screenInforAreaNode.getScrollSize();
  273. var size = this.screenInforAreaNode.getSize();
  274. if (ssize.y-s.y-size.y<200){
  275. this.loadLog();
  276. }
  277. }
  278. },
  279. // showPromptLog: function(data){
  280. // data.each(function(log){
  281. // new MWF.xApplication.LogViewer.Log(log, this);
  282. // }.bind(this));
  283. // },
  284. begin: function(){
  285. this.beginButton.setStyle("background-image", "url("+"/x_component_Console/$Main/default/play_gray.png)");
  286. this.stopButton.setStyle("background-image", "url("+"/x_component_Console/$Main/default/stop.png)");
  287. this.status = "begin";
  288. },
  289. stop: function(){
  290. this.beginButton.setStyle("background-image", "url("+"/x_component_Console/$Main/default/play.png)");
  291. this.stopButton.setStyle("background-image", "url("+"/x_component_Console/$Main/default/stop_gray.png)");
  292. this.status = "stop";
  293. },
  294. loadScreen: function(){
  295. this.screenInforAreaNode = new Element("div", {"styles": this.css.screenInforAreaNode}).inject(this.screenNode);
  296. this.screenInforAreaNode.addEvent("scroll", function(){
  297. this.checkLoadNext();
  298. }.bind(this));
  299. //this.screenInforAreaNode = new Element("div", {"styles": this.css.screenInforAreaNode}).inject(this.screenScrollNode);
  300. // MWF.require("MWF.widget.ScrollBar", function(){
  301. // new MWF.widget.ScrollBar(this.screenScrollNode, {
  302. // "style":"xApp_console", "where": "before", "indent": false, "distance": 50, "friction": 6, "axis": {"x": false, "y": true},
  303. // "onScroll": function(y, x){
  304. // // var scrollSize = _self.listScrollAreaNode.getScrollSize();
  305. // // var clientSize = _self.listScrollAreaNode.getSize();
  306. // // var scrollHeight = scrollSize.y-clientSize.y;
  307. // // if (y+200>scrollHeight) {
  308. // // if (!_self.isElementLoaded) _self.listItemNext();
  309. // // }
  310. // }
  311. // });
  312. // }.bind(this));
  313. this.setScreenHeight();
  314. this.addEvent("resize", this.setScreenHeight.bind(this));
  315. },
  316. setScreenHeight: function(){
  317. var size = this.node.getSize();
  318. var toolbarSize = this.toolbarNode.getSize();
  319. var bottomSize = this.bottomNode.getSize();
  320. var y = size.y-toolbarSize.y-bottomSize.y;
  321. this.screenNode.setStyle("height", ""+y+"px");
  322. }
  323. });
  324. MWF.xApplication.LogViewer.Log = new Class({
  325. initialize: function(log, app){
  326. this.log = log;
  327. this.app = app;
  328. this.css = this.app.css;
  329. this.lp = this.app.lp;
  330. this.load();
  331. },
  332. load: function(){
  333. this.node = new Element("div", {"styles": this.css.logItemNode}).inject(this.app.screenInforAreaNode);
  334. var m = this.log.message.substr(0, this.log.message.indexOf("\n"));
  335. var message = m + ((this.log.person) ? "&nbsp;("+this.log.person+")": "");
  336. var html = "<pre><span class='MWFLogCheckbox' style='cursor: pointer;float: left; height: 20px; width: 30px; background: url(/x_component_LogViewer/$Main/default/check.png) no-repeat center center'></span>" +
  337. "<span style='float: left;font-size: 14px; font-weight: bold; width: 160px; text-align: right'>"+this.log.occurTime+"</span>" +
  338. "<span style='float:left'>\t</span>" +
  339. "<span style='font-size: 14px; font-weight: bold;'>"+o2.common.encodeHtml(message)+"</span><br/>";
  340. if (this.log.exceptionClass){
  341. html += "<span style='float: left; width: 190px; text-align: right; color: #6BC5FC;'>ExceptionClass: </span>" +
  342. "<span style='float:left'>\t</span>" +
  343. "<span>"+o2.common.encodeHtml(this.log.exceptionClass)+"</span><br/>";
  344. }
  345. if (this.log.loggerName){
  346. html += "<span style='float: left; width: 190px; text-align: right; color: #6BC5FC;'>LoggerName: </span>" +
  347. "<span style='float:left'>\t</span>" +
  348. "<span>"+o2.common.encodeHtml(this.log.loggerName)+"</span><br/>";
  349. }
  350. if (this.log.stackTrace){
  351. var traces = this.log.stackTrace.split(/[\r\n\t]/g);
  352. html += "<span class='MWFLogStackTrace'><span style='float: left; width: 190px; text-align: right; color: #6BC5FC;'>StackTrace: </span>" +
  353. "<span style='float:left'>\t</span>";
  354. if (traces.length>1) {
  355. html += "<span class='MWFLogStackTraceAction' style='float: left; cursor: pointer; height: 20px; width: 16px; background: url(/x_component_LogViewer/$Main/default/right.png) no-repeat left center'></span>";
  356. }
  357. html += "<span>"+o2.common.encodeHtml(traces[0])+"</span></span><br/>";
  358. // traces.each(function(trace, i){
  359. // if (i!==0){
  360. // html += "<span style='float: left; width: 190px; text-align: right; color: #6BC5FC;'>&nbsp;</span>" +
  361. // "<span>&nbsp;&nbsp;</span>" +
  362. // "<span>\t"+trace+"</span><br/>";
  363. // }
  364. // }.bind(this));
  365. }
  366. if (this.log.requestUrl){
  367. var request = ((this.log.requestMethod) ? this.log.requestMethod+"&nbsp;": "")+
  368. this.log.requestUrl+
  369. ((this.log.requestRemoteAddr) ? "&nbsp; From &nbsp;"+this.log.requestRemoteAddr : "");
  370. html += "<span class='MWFLogRequest'><span style='float: left; width: 190px; text-align: right; color: #6BC5FC;'>RequestInfor: </span>" +
  371. "<span style='float:left'>\t</span>";
  372. html += "<span class='MWFLogRequestAction' style='float: left;cursor: pointer; height: 20px; width: 16px; background: url(/x_component_LogViewer/$Main/default/right.png) no-repeat left center'></span>";
  373. html += "<span>"+o2.common.encodeHtml(request)+"</span></span><br/>";
  374. }
  375. html += "</pre>";
  376. this.node.set("html", html);
  377. this.checkbox = this.node.getElement(".MWFLogCheckbox");
  378. this.traceNode = this.node.getElement(".MWFLogStackTrace");
  379. this.requestNode = this.node.getElement(".MWFLogRequest");
  380. this.traceActionNode = this.node.getElement(".MWFLogStackTraceAction");
  381. this.requestActionNode = this.node.getElement(".MWFLogRequestAction");
  382. this.setEvent();
  383. },
  384. setEvent: function(){
  385. this.node.addEvents({
  386. "mouseover": function(){ this.node.setStyles(this.css.logItemNode_over); }.bind(this),
  387. "mouseout": function(){ this.node.setStyles(this.css.logItemNode); }.bind(this)
  388. });
  389. if (this.checkbox){
  390. this.checkbox.addEvent("click", function(e){
  391. this.checkSelected();
  392. e.stopPropagation();
  393. }.bind(this))
  394. }
  395. if (this.traceActionNode){
  396. this.traceActionNode.addEvent("click", function(e){
  397. this.expandOrCollapseTrace();
  398. e.stopPropagation();
  399. }.bind(this))
  400. }
  401. if (this.requestActionNode){
  402. this.requestActionNode.addEvent("click", function(e){
  403. this.expandOrCollapseRequest();
  404. e.stopPropagation();
  405. }.bind(this))
  406. }
  407. },
  408. checkSelected: function(){
  409. var range = document.createRange();
  410. range.selectNode(this.node);
  411. var s = window.getSelection();
  412. s.selectAllChildren(this.node);
  413. },
  414. expandOrCollapseTrace: function(){
  415. if (this.log.stackTrace){
  416. if (!this.isTraceExpanded){
  417. this.expandedTrace();
  418. }else{
  419. this.collapseTrace();
  420. }
  421. }
  422. },
  423. expandedTrace: function(){
  424. if (!this.traceAllNode) this.createTraceAllNode();
  425. this.traceAllNode.setStyle("display", "inline");
  426. this.traceActionNode.setStyle("background-image", "url(/x_component_LogViewer/$Main/default/down.png)");
  427. this.isTraceExpanded = true;
  428. },
  429. collapseTrace: function(){
  430. if (this.traceAllNode){
  431. this.traceAllNode.destroy();
  432. this.traceAllNode = null;
  433. }
  434. this.traceActionNode.setStyle("background-image", "url(/x_component_LogViewer/$Main/default/right.png)");
  435. this.isTraceExpanded = false;
  436. },
  437. createTraceAllNode: function(){
  438. var brNode = this.traceNode.getNext();
  439. this.traceAllNode = new Element("span").inject(brNode, "after");
  440. var traces = this.log.stackTrace.split(/[\r\n\t]/g);
  441. var html = "";
  442. traces.each(function(t, i){
  443. if (i!==0){
  444. html += "<span style='float: left; width: 190px;'>\t</span>" +
  445. "<span>\t</span>" +
  446. "<span>\t"+t+"</span><br/>";
  447. }
  448. }.bind(this));
  449. this.traceAllNode.set("html", html);
  450. },
  451. expandOrCollapseRequest: function(){
  452. if (this.log.requestUrl){
  453. if (!this.isRequestExpanded){
  454. this.expandedRequest();
  455. }else{
  456. this.collapseRequest();
  457. }
  458. }
  459. },
  460. expandedRequest: function(){
  461. if (!this.requestAllNode) this.createRequestAllNode();
  462. this.requestAllNode.setStyle("display", "inline");
  463. this.requestActionNode.setStyle("background-image", "url(/x_component_LogViewer/$Main/default/down.png)");
  464. this.isRequestExpanded = true;
  465. },
  466. collapseRequest: function(){
  467. if (this.requestAllNode){
  468. this.requestAllNode.destroy();
  469. this.requestAllNode = null;
  470. }
  471. this.requestActionNode.setStyle("background-image", "url(/x_component_LogViewer/$Main/default/right.png)");
  472. this.isRequestExpanded = false;
  473. },
  474. createRequestAllNode: function(){
  475. var brNode = this.requestNode.getNext();
  476. this.requestAllNode = new Element("span").inject(brNode, "after");
  477. var html = "";
  478. html += "<span style='float: left; width: 190px;'>\t</span>" +
  479. "<span style='float: left;'>\t</span>" +
  480. "<span style='color: #6BC5FC; width: 108px;'>requestRemoteAddr: </span><span>"+(this.log.requestRemoteAddr || "&nbsp;")+"</span>&nbsp;&nbsp;" +
  481. "<span style='color: #6BC5FC; width: 108px;'>requestRemoteHost: </span><span>"+(this.log.requestRemoteHost || "&nbsp;")+"</span>&nbsp;&nbsp;" +
  482. "<span style='color: #6BC5FC; width: 108px;'>requestBodyLength: </span><span>"+(this.log.requestBodyLength || "&nbsp;")+"</span>" +
  483. "<br/>";
  484. // if (this.log.requestHead) html += "<span style='float: left; width: 190px;'>\t</span>" +
  485. // "<span style='float: left;'>\t</span>" +
  486. // "<span style='float: left; color: #6BC5FC; width: 108px;'>requestHead: </span><span style='word-break:break-all;'>"+this.log.requestHead+"</span><br/>";
  487. var headers = this.log.requestHead.split(/\n/g);
  488. headers.each(function(head, i){
  489. if (i===0){
  490. html += "<span style='float: left; width: 190px;'>\t</span>" +
  491. "<span style='float: left;'>\t</span>" +
  492. "<span style='float: left; color: #6BC5FC; width: 108px;'>requestHead: </span><span>"+head+"</span><br/>";
  493. }else{
  494. html += "<span style='float: left; width: 190px;'>\t</span>" +
  495. "<span style='float: left;'>\t</span>" +
  496. "<span style='float: left; color: #6BC5FC; width: 108px;'>\t</span><span>"+head+"</span><br/>";
  497. }
  498. }.bind(this));
  499. if (this.log.requestBody){
  500. var bodys = this.log.requestBody.split(/\n/g);
  501. bodys.each(function(body, i){
  502. if (i===0){
  503. html += "<span style='float: left; width: 190px;'>\t</span>" +
  504. "<span style='float: left;'>\t</span>" +
  505. "<span style='float: left; color: #6BC5FC; width: 108px;'>requestBody: </span><span>"+body+"</span><br/>";
  506. }else{
  507. html += "<span style='float: left; width: 190px;'>\t</span>" +
  508. "<span style='float: left;'>\t</span>" +
  509. "<span style='float: left; color: #6BC5FC; width: 108px;'>\t</span><span>"+body+"</span><br/>";
  510. }
  511. }.bind(this));
  512. }
  513. // requestHead
  514. // requestRemoteAddr
  515. // requestRemoteHost
  516. // requestBodyLength
  517. // requestBody
  518. this.requestAllNode.set("html", html);
  519. }
  520. });