SMZSB00201_배치로그관리.xrw 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>배치 로그 관리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <bizabbr/>
  11. <selectcond/>
  12. <list>
  13. <batlog>
  14. <prgmnm/>
  15. <prcsstat/>
  16. <fromdt/>
  17. <enddt/>
  18. <execrid/>
  19. <execnode/>
  20. <prcscnt/>
  21. <sucscnt/>
  22. <failcnt/>
  23. <modulenm/>
  24. <prgmid/>
  25. <paramcnts/>
  26. <prgmexecno/>
  27. </batlog>
  28. </list>
  29. <loginfo>
  30. <prgmnm/>
  31. <modulenm/>
  32. <prgmid/>
  33. <fromdt/>
  34. <enddt/>
  35. <prcsstat/>
  36. <prcscnt/>
  37. <sucscnt/>
  38. <failcnt/>
  39. <paramcnts/>
  40. <prgmexecno/>
  41. <curresultfile/>
  42. <logmsg/>
  43. <resultfile>
  44. <filepath/>
  45. </resultfile>
  46. <lines/>
  47. <pages>
  48. <label/>
  49. <value/>
  50. </pages>
  51. <currentpage/>
  52. </loginfo>
  53. </main>
  54. <send>
  55. <execrid/>
  56. <prgmnm/>
  57. <fromdt/>
  58. <offset/>
  59. <pagesize/>
  60. <prgmexecno/>
  61. <modulenm/>
  62. <prgmid/>
  63. <prgmuid/>
  64. <runstat/>
  65. </send>
  66. <init>
  67. <prgmlist>
  68. <prgmitem>
  69. <label/>
  70. <value/>
  71. </prgmitem>
  72. </prgmlist>
  73. <statuslist>
  74. <status>
  75. <label>실행중</label>
  76. <value>S</value>
  77. </status>
  78. <status>
  79. <label>정상종료</label>
  80. <value>E</value>
  81. </status>
  82. <status>
  83. <label>에러발생</label>
  84. <value>F</value>
  85. </status>
  86. <status>
  87. <label>관심에러</label>
  88. <value>W</value>
  89. </status>
  90. <status>
  91. <label>중요에러</label>
  92. <value>X</value>
  93. </status>
  94. </statuslist>
  95. </init>
  96. <hidden>
  97. <list>
  98. <batprgm>
  99. <rowno/>
  100. <bizabbr/>
  101. <modulenm/>
  102. <prgmid/>
  103. <prgmnm/>
  104. <useyn/>
  105. <fstrgstrid/>
  106. <fstrgstdt/>
  107. <lastupdtrid/>
  108. <lastupdtdt/>
  109. <status/>
  110. </batprgm>
  111. </list>
  112. </hidden>
  113. </root>
  114. </instance>
  115. <script type="javascript" ev:event="xforms-ready">
  116. <![CDATA[
  117. fInitialize();
  118. model.refresh();
  119. ]]>
  120. </script>
  121. <submission id="TRZSB00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/temp" resultref="/root/init/prgmlist"/>
  122. <script type="javascript" ev:event="xforms-model-construct-done">
  123. <![CDATA[
  124. submit("TRZSB00201");
  125. model.refresh();
  126. ]]>
  127. </script>
  128. <submission id="TRZSB00202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list"/>
  129. <submission id="TRZSB00203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/loginfo"/>
  130. <submission id="TRZSB00204" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/loginfo/logmsg"/>
  131. <bind id="prcsstat" ref="/root/main/list/batlog/prcsstat" readonly="true()"/>
  132. </model>
  133. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  134. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  135. <script type="javascript">
  136. <![CDATA[
  137. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  138. function fInitialize() {
  139. model.removeNodeset("/root/main/list");
  140. model.resetInstanceNode("/root/main/loginfo");
  141. model.removeNodeset("/root/main/logdetail");
  142. model.resetInstanceNode("/root/send");
  143. model.makeValue("/root/send/pagesize","100");
  144. model.setValue("/root/send/execrid",getUserId());
  145. model.setValue("/root/send/fromdt",getCurrentDate());
  146. btn_reload.disabled = true;
  147. }
  148. // 배치 로그 상세 정보를 조회하여 화면 하단 항목으로 보여준다.
  149. function fGetLogInfo() {
  150. if (submit("TRZSB00203")) {
  151. model.makeValue("/root/main/loginfo/curresultfile",model.getValue("/root/main/loginfo/resultfile/filepath"));
  152. var lines = model.getValue("/root/main/loginfo/lines");
  153. var pagesize = model.getValue("/root/send/pagesize");
  154. // page combo 설정
  155. var pages = Math.floor((lines/pagesize)+1);
  156. if (lines%pagesize == 0) {
  157. pages = pages -1;
  158. }
  159. for(var i=0;i<pages;i++) {
  160. model.makeNode("/root/main/loginfo/pages["+(i+1)+"]");
  161. model.makeValue("/root/main/loginfo/pages["+(i+1)+"]/label",(i+1)+"/"+pages);
  162. model.makeValue("/root/main/loginfo/pages["+(i+1)+"]/value",i+1);
  163. }
  164. model.makeValue("/root/main/loginfo/currentpage",1);
  165. model.makeValue("/root/send/offset",0);
  166. }
  167. }
  168. // 배치 로그 메시지의 페이지 단위 조회를 수행한다.
  169. function fGetLogMessage() {
  170. var pagesize = model.getValue("/root/send/pagesize");
  171. var curpage = model.getValue("/root/main/loginfo/currentpage");
  172. model.makeValue("/root/send/offset",(curpage-1)*pagesize);
  173. submit("TRZSB00204");
  174. }
  175. ]]>
  176. </script>
  177. </xhtml:head>
  178. <xhtml:body guideline="1,1242;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  179. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  180. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">배치 로그 관리</caption>
  181. </group>
  182. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  183. <line id="line32" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  184. <button id="btn_init" class="btn4_letter3" style="left:1126px; top:3px; width:68px; height:22px; ">
  185. <caption>초기화</caption>
  186. <script type="javascript" ev:event="DOMActivate">
  187. <![CDATA[
  188. fInitialize();
  189. model.refresh();
  190. ]]>
  191. </script>
  192. </button>
  193. </group>
  194. <group id="group5" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
  195. <line id="line15" class="line_2" style="x1:0px; y1:715px; x2:615px; y2:716px; "/>
  196. <line id="line16" class="line_2" style="x1:0px; y1:625px; x2:615px; y2:625px; "/>
  197. <line id="line17" class="line_2" style="x1:0px; y1:601px; x2:615px; y2:600px; "/>
  198. <group id="group6" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  199. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  200. <caption id="caption21" class="search_name" style="left:16px; top:8px; width:125px; height:17px; ">실행자 ID :</caption>
  201. <line id="line18" class="line_4" style="x1:1106px; y1:7px; x2:1106px; y2:29px; border-left-style:solid; "/>
  202. <caption id="caption59" class="search_name" style="left:230px; top:8px; width:100px; height:17px; ">프로그램명 :</caption>
  203. <button id="btn_select" class="btn1_letter2" style="left:1122px; top:7px; width:56px; height:22px; ">
  204. <caption>조회</caption>
  205. <script type="javascript" ev:event="DOMActivate">
  206. <![CDATA[
  207. var prgmuid = model.getValue("/root/send/prgmuid");
  208. if (prgmuid == "") {
  209. model.makeValue("/root/send/modulenm","");
  210. model.makeValue("/root/send/prgmid","");
  211. } else {
  212. var uidsplit = prgmuid.split(".");
  213. model.makeValue("/root/send/modulenm",uidsplit[0]);
  214. model.makeValue("/root/send/prgmid",uidsplit[1]);
  215. }
  216. submit("TRZSB00202");
  217. ]]>
  218. </script>
  219. </button>
  220. <input id="ipt_execrid" ref="/root/send/execrid" class="input_search" imemode="alpha" _chartype="upper" style="left:110px; top:8px; width:115px; height:19px; "/>
  221. <caption id="caption10" class="search_name" style="left:840px; top:8px; width:100px; height:17px; ">시작일자 :</caption>
  222. <input id="input1" ref="/root/send/fromdt" class="input_search" inputtype="date" style="left:930px; top:8px; width:140px; height:19px; "/>
  223. <select1 id="cmb_batprgm" ref="/root/send/prgmuid" class="combo_search" appearance="minimal" style="left:335px; top:8px; width:300px; height:19px; ">
  224. <choices>
  225. <itemset nodeset="/root/init/prgmlist/prgmitem">
  226. <label ref="label"/>
  227. <value ref="value"/>
  228. </itemset>
  229. </choices>
  230. </select1>
  231. <caption id="caption12" class="search_name" style="left:645px; top:8px; width:100px; height:17px; ">실행상태 :</caption>
  232. <select1 id="cmb_runstat" ref="/root/send/runstat" class="combo_search" appearance="minimal" style="left:735px; top:8px; width:95px; height:19px; ">
  233. <choices>
  234. <itemset nodeset="/root/init/statuslist/status">
  235. <label ref="label"/>
  236. <value ref="value"/>
  237. </itemset>
  238. </choices>
  239. </select1>
  240. </group>
  241. <caption id="caption22" class="tit_2" style="left:5px; top:559px; width:136px; height:13px; ">배치 로그 상세 정보</caption>
  242. <line id="line19" class="line_1" style="x1:0px; y1:574px; x2:1194px; y2:574px; "/>
  243. <caption id="caption34" class="cell_1" style="left:0px; top:603px; width:80px; height:23px; vertical-align:middle; ">모듈명</caption>
  244. <caption id="caption42" class="cell_1" style="left:0px; top:579px; width:80px; height:23px; vertical-align:middle; ">프로그램 명</caption>
  245. <caption id="caption47" class="cell_1" style="left:0px; top:677px; width:80px; height:38px; vertical-align:middle; ">매개변수</caption>
  246. <caption id="caption48" class="tit_2" style="left:5px; top:55px; width:131px; height:14px; ">배치 로그 목록</caption>
  247. <line id="line20" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
  248. <line id="line23" class="line_2" style="x1:856px; y1:221px; x2:1194px; y2:221px; "/>
  249. <line id="line24" class="line_3" style="x1:0px; y1:740px; x2:1194px; y2:740px; "/>
  250. <caption id="caption35" class="cell_1" style="left:288px; top:603px; width:100px; height:23px; vertical-align:middle; ">프로그램 ID</caption>
  251. <datagrid id="grd_batlog" nodeset="/root/main/list/batlog" visibility="visible" caption="프로그램명^실행상태^시작시간^종료시간^실행자^노드명^처리건수^정상건수^오류건수^모듈명^프로그램ID^파라메터^배치실행번호" colsep="^" colwidth="239, 60, 127, 126, 76, 80, 80, 80, 80, 100, 100, 100, 100" dataheight="23" datatype="xml" defaultrows="0" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:0px; top:75px; width:1194px; height:475px; ">
  252. <col ref="prgmnm"/>
  253. <col ref="prcsstat" type="combo">
  254. <choices>
  255. <itemset nodeset="/root/init/statuslist/status">
  256. <label ref="label"/>
  257. <value ref="value"/>
  258. </itemset>
  259. </choices>
  260. </col>
  261. <col ref="fromdt" format="yyyy-mm-dd hh:nn:ss"/>
  262. <col ref="enddt" format="yyyy-mm-dd hh:nn:ss" style="left:446px; top:23px; width:126px; height:23px; "/>
  263. <col ref="execrid" style="text-align:right; "/>
  264. <col ref="execnode" style="text-align:right; "/>
  265. <col ref="prcscnt" style="text-align:right; "/>
  266. <col ref="sucscnt" style="text-align:right; "/>
  267. <col ref="failcnt" style="text-align:right; "/>
  268. <col ref="modulenm"/>
  269. <col ref="prgmid"/>
  270. <col ref="paramcnts" visibility="hidden"/>
  271. <col ref="prgmexecno" visibility="hidden"/>
  272. <script type="javascript" ev:event="ondblclick">
  273. <![CDATA[
  274. var curRow = grd_batlog.row;
  275. if ( curRow > 0 ) {
  276. // 상제 정보 조회
  277. model.makeValue("/root/send/prgmexecno",model.getValue("/root/main/list/batlog["+curRow+"]/prgmexecno"));
  278. fGetLogInfo();
  279. btn_reload.disabled = false;
  280. model.refresh();
  281. // 선택한 열에 대한 요약정보를 클립보드에 복사
  282. if(!isNull(model.getValue("/root/main/list/batlog["+curRow+"]/enddt"))) {
  283. var strBatLog = '';
  284. strBatLog = getStrDate(model.getValue("/root/main/list/batlog["+curRow+"]/fromdt"));
  285. strBatLog += ' ~ ' + getStrDate(model.getValue("/root/main/list/batlog["+curRow+"]/enddt"));
  286. strBatLog += ' 처리건수 : ' + model.getValue("/root/main/list/batlog["+curRow+"]/prcscnt");
  287. strBatLog += ' 정상건수 : ' + model.getValue("/root/main/list/batlog["+curRow+"]/sucscnt");
  288. strBatLog += ' 오류건수 : ' + model.getValue("/root/main/list/batlog["+curRow+"]/failcnt");
  289. window.clipBoardData = strBatLog;
  290. }
  291. }
  292. ]]>
  293. </script>
  294. </datagrid>
  295. <textarea id="tar_exeparamcnts" ref="/root/main/loginfo/paramcnts" style="left:83px; top:678px; width:529px; height:36px; "/>
  296. <caption id="caption1" class="cell_1" style="left:0px; top:627px; width:80px; height:23px; vertical-align:middle; ">시작시간</caption>
  297. <caption id="caption2" class="cell_1" style="left:205px; top:627px; width:80px; height:23px; vertical-align:middle; ">종료시간</caption>
  298. <caption id="caption3" class="cell_1" style="left:0px; top:652px; width:80px; height:23px; vertical-align:middle; ">총 처리건수</caption>
  299. <caption id="caption4" class="cell_1" style="left:205px; top:652px; width:80px; height:23px; vertical-align:middle; ">정상건수</caption>
  300. <caption id="caption5" class="cell_1" style="left:410px; top:652px; width:80px; height:23px; vertical-align:middle; ">오류건수</caption>
  301. <caption id="caption7" class="cell_1" style="left:410px; top:627px; width:80px; height:23px; vertical-align:middle; ">완료여부</caption>
  302. <caption id="caption8" class="cell_1" style="left:616px; top:579px; width:74px; height:161px; vertical-align:middle; ">로그 메시지</caption>
  303. <textarea id="textarea1" ref="/root/main/loginfo/logmsg" scroll="vertical" style="left:692px; top:580px; width:501px; height:136px; word-wrap:letter; "/>
  304. <caption id="caption9" class="cell_1" style="left:0px; top:717px; width:80px; height:23px; vertical-align:middle; ">결과 파일</caption>
  305. <line id="line1" class="line_2" style="x1:0px; y1:650px; x2:615px; y2:650px; "/>
  306. <line id="line2" class="line_2" style="x1:0px; y1:675px; x2:615px; y2:675px; "/>
  307. <button id="btn_download" class="btn2_letter4" style="left:549px; top:719px; width:64px; height:19px; ">
  308. <caption>내려받기</caption>
  309. <script type="javascript" ev:event="DOMActivate">
  310. <![CDATA[
  311. var filepath = model.getValue("/root/main/loginfo/curresultfile");
  312. if (filepath != "") {
  313. var filenm = filepath.split(/\/|\\/); // / 또는 \ 로 split 하여 마지막 항목을 default 파일 명으로 사용한다.
  314. var len = filenm.length;
  315. filenm = filenm[len-1];
  316. var localfile = window.fileDialog("save","|",false,filenm,"","All Files(*.*)|*.*");
  317. if (localfile != "") {
  318. download("TRZSB00205", "&filepath="+filepath, localfile);
  319. //model.download(encodeURI(getActionURL("TRZSB00205")+"&filepath="+filepath),localfile);
  320. }
  321. }
  322. ]]>
  323. </script>
  324. </button>
  325. <output id="opt_prgmnm" ref="/root/main/loginfo/prgmnm" class="output_fix" appearance="input" style="left:82px; top:580px; width:530px; height:19px; "/>
  326. <output id="opt_modulenm" ref="/root/main/loginfo/modulenm" class="output_fix" appearance="input" style="left:82px; top:604px; width:203px; height:19px; "/>
  327. <output id="opt_prgmid" ref="/root/main/loginfo/prgmid" class="output_fix" appearance="input" style="left:390px; top:604px; width:222px; height:19px; "/>
  328. <output id="opt_fromdt" ref="/root/main/loginfo/fromdt" class="output_fix" format="yyyy-mm-dd hh:nn:ss" appearance="input" style="left:82px; top:629px; width:120px; height:19px; "/>
  329. <output id="opt_enddt" ref="/root/main/loginfo/enddt" class="output_fix" format="yyyy-mm-dd hh:nn:ss" appearance="input" style="left:287px; top:629px; width:120px; height:19px; "/>
  330. <output id="opt_prcscnt" ref="/root/main/loginfo/prcscnt" class="output_fix" appearance="input" style="left:82px; top:654px; width:120px; height:19px; "/>
  331. <output id="opt_sucscnt" ref="/root/main/loginfo/sucscnt" class="output_fix" appearance="input" style="left:287px; top:654px; width:120px; height:19px; "/>
  332. <output id="opt_failcnt" ref="/root/main/loginfo/failcnt" class="output_fix" appearance="input" style="left:492px; top:654px; width:120px; height:19px; "/>
  333. <select1 id="cmb_resultfile" ref="/root/main/loginfo/curresultfile" class="combo_search" appearance="minimal" style="left:83px; top:719px; width:462px; height:19px; ">
  334. <choices>
  335. <itemset nodeset="/root/main/loginfo/resultfile">
  336. <label ref="filepath"/>
  337. <value ref="filepath"/>
  338. </itemset>
  339. </choices>
  340. </select1>
  341. <button id="btn_reload" class="btn2_letter4" style="left:1126px; top:554px; width:64px; height:19px; ">
  342. <caption>새로고침</caption>
  343. <script type="javascript" ev:event="DOMActivate">
  344. <![CDATA[
  345. fGetLogInfo();
  346. model.refresh();
  347. ]]>
  348. </script>
  349. </button>
  350. <caption id="caption11" style="left:695px; top:720px; width:65px; height:20px; ">총 라인수 :</caption>
  351. <caption id="cap_lines" ref="/root/main/loginfo/lines" style="left:760px; top:719px; width:100px; height:20px; "/>
  352. <select1 id="cmb_page" ref="/root/main/loginfo/currentpage" appearance="minimal" style="left:1060px; top:719px; width:100px; height:19px; ">
  353. <choices>
  354. <itemset nodeset="/root/main/loginfo/pages">
  355. <label ref="label"/>
  356. <value ref="value"/>
  357. </itemset>
  358. </choices>
  359. <script type="javascript" ev:event="xforms-value-changed">
  360. <![CDATA[
  361. fGetLogMessage();
  362. ]]>
  363. </script>
  364. </select1>
  365. <button id="btn_next" class="icon_right" style="left:1164px; top:719px; width:26px; height:19px; ">
  366. <caption/>
  367. <script type="javascript" ev:event="DOMActivate">
  368. <![CDATA[
  369. var pages = cmb_page.length;
  370. //alert(pages);
  371. //alert(cmb_page.value);
  372. if (cmb_page.value< pages) {
  373. model.makeValue("/root/main/loginfo/currentpage",1+parseInt(cmb_page.value));
  374. fGetLogMessage();
  375. cmb_page.refresh();
  376. }
  377. ]]>
  378. </script>
  379. </button>
  380. <button id="btn_prev" class="icon_left" style="left:1030px; top:719px; width:26px; height:19px; ">
  381. <caption/>
  382. <script type="javascript" ev:event="DOMActivate">
  383. <![CDATA[
  384. var pages = cmb_page.length;
  385. //alert(pages);
  386. //alert(cmb_page.value);
  387. if (cmb_page.value > 1) {
  388. model.makeValue("/root/main/loginfo/currentpage",parseInt(cmb_page.value)-1);
  389. fGetLogMessage();
  390. cmb_page.refresh();
  391. }
  392. ]]>
  393. </script>
  394. </button>
  395. <select1 id="cmb_prcsstat" ref="/root/main/loginfo/prcsstat" disabled="true" appearance="minimal" style="left:492px; top:629px; width:120px; height:19px; ">
  396. <choices>
  397. <itemset nodeset="/root/init/statuslist/status">
  398. <label ref="label"/>
  399. <value ref="value"/>
  400. </itemset>
  401. </choices>
  402. </select1>
  403. <caption id="caption13" style="left:120px; top:50px; width:542px; height:20px; font-size:8pt; color:#ff0000; ">* 해당열을 더블클릭하면 "시작시간, 종료시간, 처리건수, 정상건수, 오류건수" 가 클립보드로 복사됩니다.</caption>
  404. </group>
  405. </xhtml:body>
  406. </xhtml:html>