dlog_detail.jsp 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <%@ include file="../common/header.jsp"%>
  2. <%
  3. int i=0;
  4. %>
  5. <script type="text/javascript" language="javascript">
  6. <!--
  7. function doBack(){
  8. document.forms.dlog.action.value="list";
  9. document.forms.dlog.submit();
  10. }
  11. function doCopyToClipboard(text){
  12. if(window.clipboardData)
  13. {
  14. window.clipboardData.setData('text',text);
  15. }
  16. else
  17. {
  18. var clipboarddiv=document.getElementById('divclipboardswf');
  19. if(clipboarddiv==null)
  20. {
  21. clipboarddiv=document.createElement('div');
  22. clipboarddiv.setAttribute("name", "divclipboardswf");
  23. clipboarddiv.setAttribute("id", "divclipboardswf");
  24. document.body.appendChild(clipboarddiv);
  25. }
  26. clipboarddiv.innerHTML='<embed src="clipboard.swf" FlashVars="clipboard='+
  27. encodeURIComponent(text)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';
  28. }
  29. alert('The text is copied to your clipboard...');
  30. return false;
  31. }
  32. function toggle(obj) {
  33. var el = document.getElementById(obj);
  34. if (el.style.display != "none") {
  35. el.style.display = "none";
  36. } else {
  37. el.style.display = "";
  38. }
  39. }
  40. // untuk load Raw
  41. var lastId = "";
  42. function doLoadRaw(id,j) {
  43. var test = 'result_'+j;
  44. var form = document.forms.dlog;
  45. try {
  46. if (id.length > 0) {
  47. if(id == lastId) {
  48. toggle(test);
  49. }
  50. else {
  51. document.getElementById(test).style.display = "";
  52. var cacheTime = new Date();
  53. var cacheTimeTs = cacheTime.getTime();
  54. var req = createXMLHttpRequest();
  55. var url = "dlog.do?action=doLoadRaw&id=" +id;
  56. req.open("GET", url);
  57. req.onreadystatechange = function() {
  58. if (req.readyState == 4) {
  59. document.getElementById(test).innerHTML="";
  60. var response = req.responseXML;
  61. if (response) {
  62. var xmlRoot = response.getElementsByTagName("dlog")[0];
  63. if (xmlRoot) {
  64. document.getElementById(test).innerHTML = "<table width='100%' border='0' cellspacing='1' cellpadding='2'><tr><td width='20%' align='left' valign='top'>Raw</td><td width='1%' align='left' valign='top'>:</td><td width='29%' align='left' valign='top'> " + (xmlRoot.getElementsByTagName("raw")[0].childNodes[0].nodeValue == "null" ? "" : xmlRoot.getElementsByTagName("raw")[0].childNodes[0].nodeValue )+"</td></tr></table>" ;
  65. }
  66. }
  67. } else {
  68. document.getElementById(test).innerHTML="&nbsp;<b>Please Wait, loading data...</b>";
  69. }
  70. }
  71. req.send(null);
  72. }
  73. lastId = id;
  74. } else {
  75. }
  76. } catch(e) {
  77. alert(e);
  78. }
  79. }
  80. //akhir load raw
  81. -->
  82. </script>
  83. <!-- CONTENT -->
  84. <form name="dlog" method="post" action="dlog.do">
  85. <input type="hidden" name="action" value ="">
  86. <input type="hidden" name="clear" value ="">
  87. <!--td valign="top" width="80%"-->
  88. <logic:notEmpty name="listDlog">
  89. <table width="100%" border="0" cellspacing="1" cellpadding="2">
  90. <logic:iterate id="element_List" name="listDlog">
  91. <logic:iterate id="element_List2" name="element_List">
  92. <logic:equal name="element_List2" property="key" value="Id">
  93. <input type="hidden" id="idRaw_<%=++i%>" value="<%=((java.util.Map.Entry)element_List2).getValue()%>"/>
  94. </logic:equal>
  95. <!--Untuk RAW-->
  96. <logic:notEqual name="element_List2" property="key" value="Raw_Codex">
  97. <logic:notEqual name="element_List2" property="key" value="!type">
  98. <logic:notEqual name="element_List2" property="key" value="!remainingPos">
  99. <logic:notEqual name="element_List2" property="key" value="!remaining">
  100. <logic:notEqual name="element_List2" property="key" value="!raw">
  101. <logic:notEqual name="element_List2" property="key" value="!codex">
  102. <logic:notEqual name="element_List2" property="key" value="!parseCodex">
  103. <tr align = "left">
  104. <td width="28%" valign="top"><bean:write name="element_List2" property="key"/></td>
  105. <td width="2%" valign="top">:</td>
  106. <td width="70%" valign="top">
  107. <logic:notEmpty name="element_List2" property="key">
  108. <logic:equal name="element_List2" property="key" value="Raw">
  109. <tr><td colspan="3"><PRE class="brush: c-sharp;"><%=(((java.util.Map.Entry)element_List2).getValue()) %></PRE></td></tr>
  110. </logic:equal>
  111. <logic:equal name="element_List2" property="key" value="Timestamp">
  112. <bean:write name="element_List2" property="value.time" format="yyyy-MM-dd HH:mm:ss.SSS"/>
  113. </logic:equal>
  114. <logic:equal name="element_List2" property="key" value="Request Time">
  115. <bean:write name="element_List2" property="value.time" format="yyyy-MM-dd HH:mm:ss.SSS"/>
  116. </logic:equal>
  117. <logic:equal name="element_List2" property="key" value="Broker Log">
  118. <PRE><%=(((java.util.Map.Entry)element_List2).getValue()) %></PRE>
  119. </logic:equal>
  120. <logic:notEqual name="element_List2" property="key" value="Broker Log">
  121. <logic:notEqual name="element_List2" property="key" value="Timestamp">
  122. <logic:notEqual name="element_List2" property="key" value="Request Time">
  123. <logic:notEqual name="element_List2" property="key" value="Raw">
  124. <%= id.co.hanoman.config.Util.print(((java.util.Map.Entry)element_List2).getValue()).replaceAll(" ", "&nbsp;") %>
  125. </logic:notEqual>
  126. </logic:notEqual>
  127. </logic:notEqual>
  128. </logic:notEqual>
  129. </logic:notEmpty>
  130. </td>
  131. </tr>
  132. </logic:notEqual>
  133. </logic:notEqual>
  134. </logic:notEqual>
  135. </logic:notEqual>
  136. </logic:notEqual>
  137. </logic:notEqual>
  138. </logic:notEqual>
  139. <!--End RAW-->
  140. </logic:iterate>
  141. <tr>
  142. <td colspan="3">
  143. <input type="button" onclick="doLoadRaw(document.getElementById('idRaw_<%=i%>').value,<%=i%>)" value="Detail Raw" />
  144. </td>
  145. </tr>
  146. <tr>
  147. <td colspan="3">
  148. <div id="result_<%=i%>" style="OVERFLOW: auto; height:50px; WIDTH:500px;" DESIGNTIMEDRAGDROP="157"></div>
  149. </td>
  150. </tr>
  151. <tr><td colspan="3"><hr class="titlePage"></hr></td></tr>
  152. </logic:iterate>
  153. </table>
  154. </logic:notEmpty>
  155. <table>
  156. <tr>
  157. <td>&nbsp;</td>
  158. <td>&nbsp;</td>
  159. <td>
  160. <input type="button" value=<bean:message key="button.back" /> onclick="doBack();">
  161. </td>
  162. <td>&nbsp;</td>
  163. <td>&nbsp;</td>
  164. <td>&nbsp;</td>
  165. </tr>
  166. <tr>
  167. <td>&nbsp;</td>
  168. <td>&nbsp;</td>
  169. <td>&nbsp;</td>
  170. <td>&nbsp;</td>
  171. <td>&nbsp;</td>
  172. <td>&nbsp;</td>
  173. </tr>
  174. </table>
  175. </form>
  176. <!-- END CONTENT -->
  177. <%@ include file="../common/footer.jsp"%>