SPZSB00301_배치로그사용자팝업.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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. <fromdt/>
  57. <offset/>
  58. <pagesize/>
  59. <prgmexecno/>
  60. <enddt/>
  61. <prgmuid/>
  62. <modulenm/>
  63. <prgmid/>
  64. <autorepeat>1</autorepeat>
  65. <execrnm/>
  66. </send>
  67. <init>
  68. <prgmlist>
  69. <prgmitem>
  70. <label/>
  71. <value/>
  72. </prgmitem>
  73. </prgmlist>
  74. <statuslist>
  75. <status>
  76. <label>실행중</label>
  77. <value>S</value>
  78. </status>
  79. <status>
  80. <label>정상종료</label>
  81. <value>E</value>
  82. </status>
  83. <status>
  84. <label>에러발생</label>
  85. <value>F</value>
  86. </status>
  87. <status>
  88. <label>에러발생</label>
  89. <value>W</value>
  90. </status>
  91. <status>
  92. <label>에러발생</label>
  93. <value>X</value>
  94. </status>
  95. </statuslist>
  96. </init>
  97. <hidden>
  98. <list>
  99. <batprgm>
  100. <rowno/>
  101. <bizabbr/>
  102. <modulenm/>
  103. <prgmid/>
  104. <prgmnm/>
  105. <useyn/>
  106. <fstrgstrid/>
  107. <fstrgstdt/>
  108. <lastupdtrid/>
  109. <lastupdtdt/>
  110. <status/>
  111. </batprgm>
  112. </list>
  113. <result>
  114. <resultref>/root/hidden/userinfo</resultref>
  115. </result>
  116. <userinfo/>
  117. </hidden>
  118. </root>
  119. </instance>
  120. <script type="javascript" ev:event="xforms-ready">
  121. <![CDATA[
  122. fInitialize();
  123. model.refresh();
  124. ]]>
  125. </script>
  126. <submission id="TRZSB00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/temp" resultref="/root/init/prgmlist"/>
  127. <script type="javascript" ev:event="xforms-model-construct-done">
  128. <![CDATA[
  129. model.removeNodeset("/root/main/list");
  130. ]]>
  131. </script>
  132. <submission id="TRZSB00202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list"/>
  133. <submission id="TRZSB00203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/loginfo"/>
  134. <submission id="TRZSB00204" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/loginfo/logmsg"/>
  135. <submission id="TRZSB00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list"/>
  136. <submission id="TRZSB00302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list"/>
  137. <submission id="TRZSB00303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/loginfo"/>
  138. <bind id="prcsstat" ref="/root/main/list/batlog/prcsstat" readonly="true()"/>
  139. <submission id="TRZSB00206" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/prgmlist"/>
  140. </model>
  141. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  142. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  143. <script type="javascript">
  144. <![CDATA[
  145. var gRepeatTimerID = ""; // 자동 조회용 타이머
  146. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  147. function fInitialize() {
  148. var execrid = model.getValue("/root/send/execrid");
  149. if (execrid == "") {
  150. model.setValue("/root/send/execrid",getUserId());
  151. }
  152. var prgmuid = model.getValue("/root/send/prgmuid");
  153. if (prgmuid == "") {
  154. cmb_batprgm.select(0);
  155. }
  156. var fromdt = model.getValue("/root/send/fromdt");
  157. if (fromdt == "") {
  158. model.setValue("/root/send/fromdt",getCurrentDate()-1);
  159. }
  160. var enddt = model.getValue("/root/send/enddt");
  161. if (enddt == "") {
  162. model.setValue("/root/send/enddt",getCurrentDate());
  163. }
  164. model.resetInstanceNode("/root/main/loginfo");
  165. model.removeNodeset("/root/main/logdetail");
  166. // 실행자를 선택할 수 있는 컨트롤을 보여주거나, 로그인한 사용자를 기준으로 자동으로 리스트 조회를 시작한다.
  167. var usersrch = model.getValue("/root/send/usersrch");
  168. if (usersrch == "true") {
  169. fSetUserSelectVisible();
  170. } else {
  171. fGetLogList(); // 리스트 조회
  172. }
  173. // 자동조회 설정
  174. fSetAutoRepeat();
  175. }
  176. // 사용자가 실행한 적이 있는 배치 목록 조회
  177. function fGetBatchList() {
  178. model.setValue("/root/send/prgmuid","");
  179. submit("TRZSB00206");
  180. }
  181. function fSetUserSelectVisible() {
  182. // 실행자명
  183. caption2.attribute("left") = "5";
  184. caption2.attribute("top") = "8";
  185. caption2.visible = true;
  186. ipt_exernm.attribute("left") = "96";
  187. ipt_exernm.attribute("top") = "8";
  188. ipt_exernm.attribute("width") = "70";
  189. ipt_exernm.visible = true;
  190. // 프로그램명
  191. caption59.attribute("left") = "176";
  192. caption59.attribute("top") = "8";
  193. cmb_batprgm.attribute("left") = "280";
  194. cmb_batprgm.attribute("width") = "200";
  195. // 시작일자
  196. caption10.attribute("left") = "492";
  197. ipt_fromdt.attribute("left") = "582";
  198. ipt_fromdt.attribute("width") = "85";
  199. // 종료일자
  200. caption1.attribute("left") = "676";
  201. ipt_todt.attribute("left") = "768";
  202. ipt_todt.attribute("width") = "85";
  203. }
  204. function fSetAutoRepeat() {
  205. var autoRepeat = model.getValue("/root/send/autorepeat");
  206. if(autoRepeat == "true"){
  207. autoRepeat = "1";
  208. }
  209. if (autoRepeat == "1") { // 자동조회 on 상태
  210. if (gRepeatTimerID == "") {
  211. gRepeatTimerID = window.setInterval("fGetLogList()",5000);
  212. }
  213. } else { // 자동조회 off 상태
  214. if (gRepeatTimerID != "") {
  215. window.clearInterval(gRepeatTimerID);
  216. gRepeatTimerID = "";
  217. }
  218. }
  219. }
  220. function fGetLogList() {
  221. var prgmuid = model.getValue("/root/send/prgmuid");
  222. var uidsplit = prgmuid.split(".");
  223. model.makeValue("/root/send/modulenm",uidsplit[0]);
  224. model.makeValue("/root/send/prgmid",uidsplit[1]);
  225. submit("TRZSB00302");
  226. }
  227. // 배치 로그 상세 정보를 조회하여 화면 하단 항목으로 보여준다.
  228. function fGetLogInfo() {
  229. if (submit("TRZSB00203")) {
  230. model.makeValue("/root/main/loginfo/curresultfile",model.getValue("/root/main/loginfo/resultfile/filepath"));
  231. var lines = model.getValue("/root/main/loginfo/lines");
  232. var pagesize = model.getValue("/root/send/pagesize");
  233. // page combo 설정
  234. var pages = Math.floor((lines/pagesize)+1);
  235. if (lines%pagesize == 0) {
  236. pages = pages -1;
  237. }
  238. for(var i=0;i<pages;i++) {
  239. model.makeNode("/root/main/loginfo/pages["+(i+1)+"]");
  240. model.makeValue("/root/main/loginfo/pages["+(i+1)+"]/label",(i+1)+"/"+pages);
  241. model.makeValue("/root/main/loginfo/pages["+(i+1)+"]/value",i+1);
  242. }
  243. model.makeValue("/root/main/loginfo/currentpage",1);
  244. model.makeValue("/root/send/offset",0);
  245. }
  246. }
  247. // 배치 로그 메시지의 페이지 단위 조회를 수행한다.
  248. function fGetLogMessage() {
  249. var pagesize = model.getValue("/root/send/pagesize");
  250. var curpage = model.getValue("/root/main/loginfo/currentpage");
  251. model.makeValue("/root/send/offset",(curpage-1)*pagesize);
  252. submit("TRZSB00204");
  253. }
  254. function fOpenResultFilePopup() {
  255. var curRow = grd_batlog.row;
  256. if ( curRow > 0 ) {
  257. // 실행결과 파일 다운로드
  258. modal("SPZSB00302", "", "400", "400" ,"SPZSB00302", "/root/main/list/batlog["+curRow+"]/prgmexecno", "/root/send/prgmexecno");
  259. model.refresh();
  260. }
  261. }
  262. function fOpenLogDetailPopup() {
  263. var curRow = grd_batlog.row;
  264. if (curRow > 0) {
  265. // 로그 상세 조회 팝업
  266. modal("SPZSB00303", "", "400", "400" ,"SPZSB00303", "/root/main/list/batlog["+curRow+"]/prgmexecno", "/root/send/prgmexecno");
  267. }
  268. }
  269. ]]>
  270. </script>
  271. </xhtml:head>
  272. <xhtml:body pagewidth="970" pageheight="585" guideline="1,966;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  273. <group id="group1" style="left:0px; top:0px; width:950px; height:15px; ">
  274. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">배치 로그 조회 팝업</caption>
  275. </group>
  276. <group id="group5" scroll="auto" style="left:0px; top:20px; width:950px; height:530px; ">
  277. <group id="group6" style="left:0px; top:10px; width:950px; height:35px; vertical-align:top; ">
  278. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:950px; height:35px; "/>
  279. <line id="line18" class="line_4" style="x1:865px; y1:6px; x2:865px; y2:28px; border-left-style:solid; "/>
  280. <caption id="caption59" class="search_name" style="left:5px; top:8px; width:100px; height:17px; ">프로그램명 :</caption>
  281. <button id="btn_select" class="btn1_letter2" style="left:880px; top:6px; width:56px; height:22px; ">
  282. <caption>조회</caption>
  283. <script type="javascript" ev:event="DOMActivate">
  284. <![CDATA[
  285. fGetLogList();
  286. ]]>
  287. </script>
  288. </button>
  289. <caption id="caption10" class="search_name" style="left:385px; top:8px; width:90px; height:17px; ">시작일자 :</caption>
  290. <input id="ipt_fromdt" ref="/root/send/fromdt" class="input_search" inputtype="date" style="left:471px; top:8px; width:140px; height:19px; ">
  291. <script type="javascript" ev:event="xforms-value-changed">
  292. <![CDATA[
  293. fGetBatchList();
  294. ]]>
  295. </script>
  296. </input>
  297. <select1 id="cmb_batprgm" ref="/root/send/prgmuid" class="combo_search" appearance="minimal" style="left:106px; top:7px; width:265px; height:19px; ">
  298. <choices>
  299. <itemset nodeset="/root/init/prgmlist/prgmitem">
  300. <label ref="label"/>
  301. <value ref="value"/>
  302. </itemset>
  303. </choices>
  304. </select1>
  305. <caption id="caption1" class="search_name" style="left:630px; top:9px; width:100px; height:17px; ">종료일자 :</caption>
  306. <input id="ipt_todt" ref="/root/send/enddt" class="input_search" inputtype="date" style="left:715px; top:8px; width:140px; height:19px; ">
  307. <script type="javascript" ev:event="xforms-value-changed">
  308. <![CDATA[
  309. fGetBatchList();
  310. ]]>
  311. </script>
  312. </input>
  313. <caption id="caption2" class="search_name" visibility="hidden" style="left:145px; top:8px; width:90px; height:17px; ">실행자명 :</caption>
  314. <input id="ipt_exernm" ref="/root/send/execrnm" visibility="hidden" inputtype="button" style="left:230px; top:7px; width:100px; height:19px; ">
  315. <script type="javascript" ev:event="onclick">
  316. <![CDATA[
  317. setParameter("search_condition", "userid");
  318. setParameter("search_term", getUserId());
  319. setParameter("resultref", "/root/hidden/userinfo");
  320. modal("SPZSU10100");
  321. var userinfo = model.getValue("/root/hidden/userinfo");
  322. var userinfos = userinfo.split("|");
  323. model.setValue("/root/send/execrid", userinfos[2]);
  324. model.setValue("/root/send/execrnm", userinfos[3]);
  325. model.refresh();
  326. ]]>
  327. </script>
  328. </input>
  329. </group>
  330. <caption id="caption48" class="tit_2" style="left:5px; top:55px; width:131px; height:14px; ">배치 로그 목록</caption>
  331. <line id="line20" class="line_1" style="x1:0px; y1:70px; x2:950px; y2:70px; "/>
  332. <datagrid id="grd_batlog" nodeset="/root/main/list/batlog" visibility="visible" caption="프로그램명^실행상태^실행상태^시작시간^종료시간^실행자^노드명^처리건수^정상건수^오류건수^생성파일수^생성파일수^모듈명^프로그램ID^파라메터^배치실행번호" colsep="^" colwidth="290, 55, 21, 120, 120, 76, 80, 75, 75, 80, 57, 16, 100, 100, 100, 100" dataheight="23" datatype="xml" defaultrows="0" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" style="left:0px; top:75px; width:950px; height:450px; ">
  333. <col ref="prgmnm"/>
  334. <col ref="prcsstat" type="combo" style="border-right-width:0px; ">
  335. <choices>
  336. <itemset nodeset="/root/init/statuslist/status">
  337. <label ref="label"/>
  338. <value ref="value"/>
  339. </itemset>
  340. </choices>
  341. </col>
  342. <col type="inputbutton"/>
  343. <col ref="fromdt" format="yyyy-mm-dd hh:nn:ss"/>
  344. <col ref="enddt" format="yyyy-mm-dd hh:nn:ss" style="left:446px; top:23px; width:126px; height:23px; "/>
  345. <col ref="execrid" visibility="hidden" style="text-align:right; "/>
  346. <col ref="execnode" visibility="hidden" style="text-align:right; "/>
  347. <col ref="prcscnt" style="text-align:right; "/>
  348. <col ref="sucscnt" style="text-align:right; "/>
  349. <col ref="failcnt" style="text-align:right; "/>
  350. <col ref="cnt" style="text-align:right; border-right-width:0px; "/>
  351. <col type="inputbutton" visibility="visible"/>
  352. <col ref="modulenm" visibility="hidden"/>
  353. <col ref="prgmid" visibility="hidden"/>
  354. <col ref="paramcnts" visibility="hidden"/>
  355. <col ref="prgmexecno" visibility="hidden"/>
  356. <script type="javascript" ev:event="onbuttonclick">
  357. <![CDATA[
  358. var cur_col = grd_batlog.col;
  359. if (cur_col == 3) { // 로그 조회
  360. fOpenLogDetailPopup();
  361. } else if (cur_col == 12) { // 결과 파일 조회
  362. fOpenResultFilePopup();
  363. }
  364. ]]>
  365. </script>
  366. </datagrid>
  367. <select id="checkbox1" ref="/root/send/autorepeat" overflow="visible" appearance="full" style="left:875px; top:50px; width:70px; height:15px; border-style:none; ">
  368. <choices>
  369. <item>
  370. <label>자동조회</label>
  371. <value>1</value>
  372. </item>
  373. </choices>
  374. <script type="javascript" ev:event="xforms-value-changed">
  375. <![CDATA[
  376. fSetAutoRepeat();
  377. ]]>
  378. </script>
  379. </select>
  380. </group>
  381. </xhtml:body>
  382. </xhtml:html>