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. data.each(function (log) {
  201. var node = new Element("div", {"styles": this.css.logItemNode}).inject(this.screenInforAreaNode);
  202. if(log.logLevel){
  203. var lineLog = log.lineLog;
  204. var logTime = log.logTime.split("#")[0];
  205. lineLog = lineLog.replace(logTime,"");
  206. lineLog = lineLog.replace(log.logLevel,"");
  207. var typeNode = new Element("div",{
  208. "html" : log.logLevel,
  209. "title" : log.node,
  210. "style" : "float:left;margin:0 10px;width:50px;font-weight:500;"
  211. }).inject(node);
  212. var color = "#FF0000";
  213. switch (log.logLevel) {
  214. case "INFO" :
  215. color = "#5a86ff";
  216. break;
  217. case "PRINT" :
  218. color = "#ffd192";
  219. break;
  220. case "DEBUG" :
  221. color = "#d7ff3d";
  222. break;
  223. default :
  224. }
  225. typeNode.setStyle("color",color);
  226. var timeNode = new Element("div",{
  227. "html" : logTime,
  228. "style" : "float:left;margin:0 10px;width:180px;color:#6BC5FC"
  229. }).inject(node);
  230. }
  231. var contentNode = new Element("div",{
  232. "text" : log.lineLog,
  233. "style" : "margin-left:270px"
  234. }).inject(node);
  235. }.bind(this));
  236. },
  237. tiemShowSystemLog : function(){
  238. this.actions[this.method](this.tagId, function(json){
  239. this.showSystemLog(json.data);
  240. this.screenInforAreaNode.scrollTop = this.screenInforAreaNode.scrollHeight;
  241. }.bind(this));
  242. },
  243. showLog: function(data){
  244. if (data.length){
  245. var last = data[data.length-1];
  246. this.currentId = last.id;
  247. data.each(function(log){
  248. new MWF.xApplication.LogViewer.Log(log, this);
  249. }.bind(this));
  250. // switch (this.status){
  251. // case "prompt":
  252. // this.showPromptLog(data);
  253. // break;
  254. // case "unexpected":
  255. // this.showUnexpectedLog(data);
  256. // break;
  257. // case "warn":
  258. // this.showWarnLog(data);
  259. // break;
  260. // default:
  261. // this.showPromptLog(data);
  262. // }
  263. }else{
  264. this.logFinish = true;
  265. }
  266. this.checkLoadNext();
  267. },
  268. checkLoadNext: function(){
  269. if (!this.logFinish){
  270. var s = this.screenInforAreaNode.getScroll();
  271. var ssize = this.screenInforAreaNode.getScrollSize();
  272. var size = this.screenInforAreaNode.getSize();
  273. if (ssize.y-s.y-size.y<200){
  274. this.loadLog();
  275. }
  276. }
  277. },
  278. // showPromptLog: function(data){
  279. // data.each(function(log){
  280. // new MWF.xApplication.LogViewer.Log(log, this);
  281. // }.bind(this));
  282. // },
  283. begin: function(){
  284. this.beginButton.setStyle("background-image", "url("+"/x_component_Console/$Main/default/play_gray.png)");
  285. this.stopButton.setStyle("background-image", "url("+"/x_component_Console/$Main/default/stop.png)");
  286. this.status = "begin";
  287. },
  288. stop: function(){
  289. this.beginButton.setStyle("background-image", "url("+"/x_component_Console/$Main/default/play.png)");
  290. this.stopButton.setStyle("background-image", "url("+"/x_component_Console/$Main/default/stop_gray.png)");
  291. this.status = "stop";
  292. },
  293. loadScreen: function(){
  294. this.screenInforAreaNode = new Element("div", {"styles": this.css.screenInforAreaNode}).inject(this.screenNode);
  295. this.screenInforAreaNode.addEvent("scroll", function(){
  296. this.checkLoadNext();
  297. }.bind(this));
  298. //this.screenInforAreaNode = new Element("div", {"styles": this.css.screenInforAreaNode}).inject(this.screenScrollNode);
  299. // MWF.require("MWF.widget.ScrollBar", function(){
  300. // new MWF.widget.ScrollBar(this.screenScrollNode, {
  301. // "style":"xApp_console", "where": "before", "indent": false, "distance": 50, "friction": 6, "axis": {"x": false, "y": true},
  302. // "onScroll": function(y, x){
  303. // // var scrollSize = _self.listScrollAreaNode.getScrollSize();
  304. // // var clientSize = _self.listScrollAreaNode.getSize();
  305. // // var scrollHeight = scrollSize.y-clientSize.y;
  306. // // if (y+200>scrollHeight) {
  307. // // if (!_self.isElementLoaded) _self.listItemNext();
  308. // // }
  309. // }
  310. // });
  311. // }.bind(this));
  312. this.setScreenHeight();
  313. this.addEvent("resize", this.setScreenHeight.bind(this));
  314. },
  315. setScreenHeight: function(){
  316. var size = this.node.getSize();
  317. var toolbarSize = this.toolbarNode.getSize();
  318. var bottomSize = this.bottomNode.getSize();
  319. var y = size.y-toolbarSize.y-bottomSize.y;
  320. this.screenNode.setStyle("height", ""+y+"px");
  321. }
  322. });
  323. MWF.xApplication.LogViewer.Log = new Class({
  324. initialize: function(log, app){
  325. this.log = log;
  326. this.app = app;
  327. this.css = this.app.css;
  328. this.lp = this.app.lp;
  329. this.load();
  330. },
  331. load: function(){
  332. this.node = new Element("div", {"styles": this.css.logItemNode}).inject(this.app.screenInforAreaNode);
  333. var m = this.log.message.substr(0, this.log.message.indexOf("\n"));
  334. var message = m + ((this.log.person) ? "&nbsp;("+this.log.person+")": "");
  335. 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>" +
  336. "<span style='float: left;font-size: 14px; font-weight: bold; width: 160px; text-align: right'>"+this.log.occurTime+"</span>" +
  337. "<span style='float:left'>\t</span>" +
  338. "<span style='font-size: 14px; font-weight: bold;'>"+o2.common.encodeHtml(message)+"</span><br/>";
  339. if (this.log.exceptionClass){
  340. html += "<span style='float: left; width: 190px; text-align: right; color: #6BC5FC;'>ExceptionClass: </span>" +
  341. "<span style='float:left'>\t</span>" +
  342. "<span>"+o2.common.encodeHtml(this.log.exceptionClass)+"</span><br/>";
  343. }
  344. if (this.log.loggerName){
  345. html += "<span style='float: left; width: 190px; text-align: right; color: #6BC5FC;'>LoggerName: </span>" +
  346. "<span style='float:left'>\t</span>" +
  347. "<span>"+o2.common.encodeHtml(this.log.loggerName)+"</span><br/>";
  348. }
  349. if (this.log.stackTrace){
  350. var traces = this.log.stackTrace.split(/[\r\n\t]/g);
  351. html += "<span class='MWFLogStackTrace'><span style='float: left; width: 190px; text-align: right; color: #6BC5FC;'>StackTrace: </span>" +
  352. "<span style='float:left'>\t</span>";
  353. if (traces.length>1) {
  354. 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>";
  355. }
  356. html += "<span>"+o2.common.encodeHtml(traces[0])+"</span></span><br/>";
  357. // traces.each(function(trace, i){
  358. // if (i!==0){
  359. // html += "<span style='float: left; width: 190px; text-align: right; color: #6BC5FC;'>&nbsp;</span>" +
  360. // "<span>&nbsp;&nbsp;</span>" +
  361. // "<span>\t"+trace+"</span><br/>";
  362. // }
  363. // }.bind(this));
  364. }
  365. if (this.log.requestUrl){
  366. var request = ((this.log.requestMethod) ? this.log.requestMethod+"&nbsp;": "")+
  367. this.log.requestUrl+
  368. ((this.log.requestRemoteAddr) ? "&nbsp; From &nbsp;"+this.log.requestRemoteAddr : "");
  369. html += "<span class='MWFLogRequest'><span style='float: left; width: 190px; text-align: right; color: #6BC5FC;'>RequestInfor: </span>" +
  370. "<span style='float:left'>\t</span>";
  371. 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>";
  372. html += "<span>"+o2.common.encodeHtml(request)+"</span></span><br/>";
  373. }
  374. html += "</pre>";
  375. this.node.set("html", html);
  376. this.checkbox = this.node.getElement(".MWFLogCheckbox");
  377. this.traceNode = this.node.getElement(".MWFLogStackTrace");
  378. this.requestNode = this.node.getElement(".MWFLogRequest");
  379. this.traceActionNode = this.node.getElement(".MWFLogStackTraceAction");
  380. this.requestActionNode = this.node.getElement(".MWFLogRequestAction");
  381. this.setEvent();
  382. },
  383. setEvent: function(){
  384. this.node.addEvents({
  385. "mouseover": function(){ this.node.setStyles(this.css.logItemNode_over); }.bind(this),
  386. "mouseout": function(){ this.node.setStyles(this.css.logItemNode); }.bind(this)
  387. });
  388. if (this.checkbox){
  389. this.checkbox.addEvent("click", function(e){
  390. this.checkSelected();
  391. e.stopPropagation();
  392. }.bind(this))
  393. }
  394. if (this.traceActionNode){
  395. this.traceActionNode.addEvent("click", function(e){
  396. this.expandOrCollapseTrace();
  397. e.stopPropagation();
  398. }.bind(this))
  399. }
  400. if (this.requestActionNode){
  401. this.requestActionNode.addEvent("click", function(e){
  402. this.expandOrCollapseRequest();
  403. e.stopPropagation();
  404. }.bind(this))
  405. }
  406. },
  407. checkSelected: function(){
  408. var range = document.createRange();
  409. range.selectNode(this.node);
  410. var s = window.getSelection();
  411. s.selectAllChildren(this.node);
  412. },
  413. expandOrCollapseTrace: function(){
  414. if (this.log.stackTrace){
  415. if (!this.isTraceExpanded){
  416. this.expandedTrace();
  417. }else{
  418. this.collapseTrace();
  419. }
  420. }
  421. },
  422. expandedTrace: function(){
  423. if (!this.traceAllNode) this.createTraceAllNode();
  424. this.traceAllNode.setStyle("display", "inline");
  425. this.traceActionNode.setStyle("background-image", "url(/x_component_LogViewer/$Main/default/down.png)");
  426. this.isTraceExpanded = true;
  427. },
  428. collapseTrace: function(){
  429. if (this.traceAllNode){
  430. this.traceAllNode.destroy();
  431. this.traceAllNode = null;
  432. }
  433. this.traceActionNode.setStyle("background-image", "url(/x_component_LogViewer/$Main/default/right.png)");
  434. this.isTraceExpanded = false;
  435. },
  436. createTraceAllNode: function(){
  437. var brNode = this.traceNode.getNext();
  438. this.traceAllNode = new Element("span").inject(brNode, "after");
  439. var traces = this.log.stackTrace.split(/[\r\n\t]/g);
  440. var html = "";
  441. traces.each(function(t, i){
  442. if (i!==0){
  443. html += "<span style='float: left; width: 190px;'>\t</span>" +
  444. "<span>\t</span>" +
  445. "<span>\t"+t+"</span><br/>";
  446. }
  447. }.bind(this));
  448. this.traceAllNode.set("html", html);
  449. },
  450. expandOrCollapseRequest: function(){
  451. if (this.log.requestUrl){
  452. if (!this.isRequestExpanded){
  453. this.expandedRequest();
  454. }else{
  455. this.collapseRequest();
  456. }
  457. }
  458. },
  459. expandedRequest: function(){
  460. if (!this.requestAllNode) this.createRequestAllNode();
  461. this.requestAllNode.setStyle("display", "inline");
  462. this.requestActionNode.setStyle("background-image", "url(/x_component_LogViewer/$Main/default/down.png)");
  463. this.isRequestExpanded = true;
  464. },
  465. collapseRequest: function(){
  466. if (this.requestAllNode){
  467. this.requestAllNode.destroy();
  468. this.requestAllNode = null;
  469. }
  470. this.requestActionNode.setStyle("background-image", "url(/x_component_LogViewer/$Main/default/right.png)");
  471. this.isRequestExpanded = false;
  472. },
  473. createRequestAllNode: function(){
  474. var brNode = this.requestNode.getNext();
  475. this.requestAllNode = new Element("span").inject(brNode, "after");
  476. var html = "";
  477. html += "<span style='float: left; width: 190px;'>\t</span>" +
  478. "<span style='float: left;'>\t</span>" +
  479. "<span style='color: #6BC5FC; width: 108px;'>requestRemoteAddr: </span><span>"+(this.log.requestRemoteAddr || "&nbsp;")+"</span>&nbsp;&nbsp;" +
  480. "<span style='color: #6BC5FC; width: 108px;'>requestRemoteHost: </span><span>"+(this.log.requestRemoteHost || "&nbsp;")+"</span>&nbsp;&nbsp;" +
  481. "<span style='color: #6BC5FC; width: 108px;'>requestBodyLength: </span><span>"+(this.log.requestBodyLength || "&nbsp;")+"</span>" +
  482. "<br/>";
  483. // if (this.log.requestHead) html += "<span style='float: left; width: 190px;'>\t</span>" +
  484. // "<span style='float: left;'>\t</span>" +
  485. // "<span style='float: left; color: #6BC5FC; width: 108px;'>requestHead: </span><span style='word-break:break-all;'>"+this.log.requestHead+"</span><br/>";
  486. var headers = this.log.requestHead.split(/\n/g);
  487. headers.each(function(head, i){
  488. if (i===0){
  489. html += "<span style='float: left; width: 190px;'>\t</span>" +
  490. "<span style='float: left;'>\t</span>" +
  491. "<span style='float: left; color: #6BC5FC; width: 108px;'>requestHead: </span><span>"+head+"</span><br/>";
  492. }else{
  493. html += "<span style='float: left; width: 190px;'>\t</span>" +
  494. "<span style='float: left;'>\t</span>" +
  495. "<span style='float: left; color: #6BC5FC; width: 108px;'>\t</span><span>"+head+"</span><br/>";
  496. }
  497. }.bind(this));
  498. if (this.log.requestBody){
  499. var bodys = this.log.requestBody.split(/\n/g);
  500. bodys.each(function(body, i){
  501. if (i===0){
  502. html += "<span style='float: left; width: 190px;'>\t</span>" +
  503. "<span style='float: left;'>\t</span>" +
  504. "<span style='float: left; color: #6BC5FC; width: 108px;'>requestBody: </span><span>"+body+"</span><br/>";
  505. }else{
  506. html += "<span style='float: left; width: 190px;'>\t</span>" +
  507. "<span style='float: left;'>\t</span>" +
  508. "<span style='float: left; color: #6BC5FC; width: 108px;'>\t</span><span>"+body+"</span><br/>";
  509. }
  510. }.bind(this));
  511. }
  512. // requestHead
  513. // requestRemoteAddr
  514. // requestRemoteHost
  515. // requestBodyLength
  516. // requestBody
  517. this.requestAllNode.set("html", html);
  518. }
  519. });