123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
- <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">
- <xhtml:head>
- <xhtml:title>배치 로그 관리</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <bizabbr/>
- <selectcond/>
- <list>
- <batlog>
- <prgmnm/>
- <prcsstat/>
- <fromdt/>
- <enddt/>
- <execrid/>
- <execnode/>
- <prcscnt/>
- <sucscnt/>
- <failcnt/>
- <modulenm/>
- <prgmid/>
- <paramcnts/>
- <prgmexecno/>
- </batlog>
- </list>
- <loginfo>
- <prgmnm/>
- <modulenm/>
- <prgmid/>
- <fromdt/>
- <enddt/>
- <prcsstat/>
- <prcscnt/>
- <sucscnt/>
- <failcnt/>
- <paramcnts/>
- <prgmexecno/>
- <curresultfile/>
- <logmsg/>
- <resultfile>
- <filepath/>
- </resultfile>
- <lines/>
- <pages>
- <label/>
- <value/>
- </pages>
- <currentpage/>
- </loginfo>
- </main>
- <send>
- <execrid/>
- <fromdt/>
- <offset/>
- <pagesize/>
- <prgmexecno/>
- <enddt/>
- <prgmuid/>
- <modulenm/>
- <prgmid/>
- <autorepeat>1</autorepeat>
- <execrnm/>
- </send>
- <init>
- <prgmlist>
- <prgmitem>
- <label/>
- <value/>
- </prgmitem>
- </prgmlist>
- <statuslist>
- <status>
- <label>실행중</label>
- <value>S</value>
- </status>
- <status>
- <label>정상종료</label>
- <value>E</value>
- </status>
- <status>
- <label>에러발생</label>
- <value>F</value>
- </status>
- <status>
- <label>에러발생</label>
- <value>W</value>
- </status>
- <status>
- <label>에러발생</label>
- <value>X</value>
- </status>
- </statuslist>
- </init>
- <hidden>
- <list>
- <batprgm>
- <rowno/>
- <bizabbr/>
- <modulenm/>
- <prgmid/>
- <prgmnm/>
- <useyn/>
- <fstrgstrid/>
- <fstrgstdt/>
- <lastupdtrid/>
- <lastupdtdt/>
- <status/>
- </batprgm>
- </list>
- <result>
- <resultref>/root/hidden/userinfo</resultref>
- </result>
- <userinfo/>
- </hidden>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInitialize();
- model.refresh();
- ]]>
- </script>
- <submission id="TRZSB00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/temp" resultref="/root/init/prgmlist"/>
- <script type="javascript" ev:event="xforms-model-construct-done">
- <![CDATA[
- model.removeNodeset("/root/main/list");
- ]]>
- </script>
- <submission id="TRZSB00202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list"/>
- <submission id="TRZSB00203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/loginfo"/>
- <submission id="TRZSB00204" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/loginfo/logmsg"/>
- <submission id="TRZSB00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list"/>
- <submission id="TRZSB00302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list"/>
- <submission id="TRZSB00303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/loginfo"/>
- <bind id="prcsstat" ref="/root/main/list/batlog/prcsstat" readonly="true()"/>
- <submission id="TRZSB00206" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/prgmlist"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript">
- <![CDATA[
-
- var gRepeatTimerID = ""; // 자동 조회용 타이머
-
- // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
- function fInitialize() {
-
- var execrid = model.getValue("/root/send/execrid");
- if (execrid == "") {
- model.setValue("/root/send/execrid",getUserId());
- }
-
- var prgmuid = model.getValue("/root/send/prgmuid");
- if (prgmuid == "") {
- cmb_batprgm.select(0);
- }
-
- var fromdt = model.getValue("/root/send/fromdt");
- if (fromdt == "") {
- model.setValue("/root/send/fromdt",getCurrentDate()-1);
- }
- var enddt = model.getValue("/root/send/enddt");
- if (enddt == "") {
- model.setValue("/root/send/enddt",getCurrentDate());
- }
-
- model.resetInstanceNode("/root/main/loginfo");
- model.removeNodeset("/root/main/logdetail");
-
- // 실행자를 선택할 수 있는 컨트롤을 보여주거나, 로그인한 사용자를 기준으로 자동으로 리스트 조회를 시작한다.
- var usersrch = model.getValue("/root/send/usersrch");
- if (usersrch == "true") {
- fSetUserSelectVisible();
- } else {
- fGetLogList(); // 리스트 조회
- }
- // 자동조회 설정
- fSetAutoRepeat();
-
- }
-
- // 사용자가 실행한 적이 있는 배치 목록 조회
- function fGetBatchList() {
- model.setValue("/root/send/prgmuid","");
- submit("TRZSB00206");
- }
-
- function fSetUserSelectVisible() {
- // 실행자명
- caption2.attribute("left") = "5";
- caption2.attribute("top") = "8";
- caption2.visible = true;
- ipt_exernm.attribute("left") = "96";
- ipt_exernm.attribute("top") = "8";
- ipt_exernm.attribute("width") = "70";
- ipt_exernm.visible = true;
-
- // 프로그램명
- caption59.attribute("left") = "176";
- caption59.attribute("top") = "8";
- cmb_batprgm.attribute("left") = "280";
- cmb_batprgm.attribute("width") = "200";
-
- // 시작일자
- caption10.attribute("left") = "492";
- ipt_fromdt.attribute("left") = "582";
- ipt_fromdt.attribute("width") = "85";
-
- // 종료일자
- caption1.attribute("left") = "676";
- ipt_todt.attribute("left") = "768";
- ipt_todt.attribute("width") = "85";
- }
-
- function fSetAutoRepeat() {
- var autoRepeat = model.getValue("/root/send/autorepeat");
-
- if(autoRepeat == "true"){
- autoRepeat = "1";
- }
-
- if (autoRepeat == "1") { // 자동조회 on 상태
- if (gRepeatTimerID == "") {
- gRepeatTimerID = window.setInterval("fGetLogList()",5000);
- }
- } else { // 자동조회 off 상태
- if (gRepeatTimerID != "") {
- window.clearInterval(gRepeatTimerID);
- gRepeatTimerID = "";
- }
- }
- }
-
- function fGetLogList() {
- var prgmuid = model.getValue("/root/send/prgmuid");
- var uidsplit = prgmuid.split(".");
- model.makeValue("/root/send/modulenm",uidsplit[0]);
- model.makeValue("/root/send/prgmid",uidsplit[1]);
- submit("TRZSB00302");
- }
- // 배치 로그 상세 정보를 조회하여 화면 하단 항목으로 보여준다.
- function fGetLogInfo() {
- if (submit("TRZSB00203")) {
- model.makeValue("/root/main/loginfo/curresultfile",model.getValue("/root/main/loginfo/resultfile/filepath"));
- var lines = model.getValue("/root/main/loginfo/lines");
- var pagesize = model.getValue("/root/send/pagesize");
- // page combo 설정
- var pages = Math.floor((lines/pagesize)+1);
- if (lines%pagesize == 0) {
- pages = pages -1;
- }
- for(var i=0;i<pages;i++) {
- model.makeNode("/root/main/loginfo/pages["+(i+1)+"]");
- model.makeValue("/root/main/loginfo/pages["+(i+1)+"]/label",(i+1)+"/"+pages);
- model.makeValue("/root/main/loginfo/pages["+(i+1)+"]/value",i+1);
- }
- model.makeValue("/root/main/loginfo/currentpage",1);
- model.makeValue("/root/send/offset",0);
- }
- }
- // 배치 로그 메시지의 페이지 단위 조회를 수행한다.
- function fGetLogMessage() {
- var pagesize = model.getValue("/root/send/pagesize");
- var curpage = model.getValue("/root/main/loginfo/currentpage");
- model.makeValue("/root/send/offset",(curpage-1)*pagesize);
-
- submit("TRZSB00204");
- }
-
- function fOpenResultFilePopup() {
- var curRow = grd_batlog.row;
- if ( curRow > 0 ) {
- // 실행결과 파일 다운로드
- modal("SPZSB00302", "", "400", "400" ,"SPZSB00302", "/root/main/list/batlog["+curRow+"]/prgmexecno", "/root/send/prgmexecno");
- model.refresh();
- }
- }
-
- function fOpenLogDetailPopup() {
- var curRow = grd_batlog.row;
- if (curRow > 0) {
- // 로그 상세 조회 팝업
- modal("SPZSB00303", "", "400", "400" ,"SPZSB00303", "/root/main/list/batlog["+curRow+"]/prgmexecno", "/root/send/prgmexecno");
- }
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="970" pageheight="585" guideline="1,966;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:950px; height:15px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">배치 로그 조회 팝업</caption>
- </group>
- <group id="group5" scroll="auto" style="left:0px; top:20px; width:950px; height:530px; ">
- <group id="group6" style="left:0px; top:10px; width:950px; height:35px; vertical-align:top; ">
- <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:950px; height:35px; "/>
- <line id="line18" class="line_4" style="x1:865px; y1:6px; x2:865px; y2:28px; border-left-style:solid; "/>
- <caption id="caption59" class="search_name" style="left:5px; top:8px; width:100px; height:17px; ">프로그램명 :</caption>
- <button id="btn_select" class="btn1_letter2" style="left:880px; top:6px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fGetLogList();
- ]]>
- </script>
- </button>
- <caption id="caption10" class="search_name" style="left:385px; top:8px; width:90px; height:17px; ">시작일자 :</caption>
- <input id="ipt_fromdt" ref="/root/send/fromdt" class="input_search" inputtype="date" style="left:471px; top:8px; width:140px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fGetBatchList();
- ]]>
- </script>
- </input>
- <select1 id="cmb_batprgm" ref="/root/send/prgmuid" class="combo_search" appearance="minimal" style="left:106px; top:7px; width:265px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/prgmlist/prgmitem">
- <label ref="label"/>
- <value ref="value"/>
- </itemset>
- </choices>
- </select1>
- <caption id="caption1" class="search_name" style="left:630px; top:9px; width:100px; height:17px; ">종료일자 :</caption>
- <input id="ipt_todt" ref="/root/send/enddt" class="input_search" inputtype="date" style="left:715px; top:8px; width:140px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fGetBatchList();
- ]]>
- </script>
- </input>
- <caption id="caption2" class="search_name" visibility="hidden" style="left:145px; top:8px; width:90px; height:17px; ">실행자명 :</caption>
- <input id="ipt_exernm" ref="/root/send/execrnm" visibility="hidden" inputtype="button" style="left:230px; top:7px; width:100px; height:19px; ">
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- setParameter("search_condition", "userid");
- setParameter("search_term", getUserId());
- setParameter("resultref", "/root/hidden/userinfo");
- modal("SPZSU10100");
- var userinfo = model.getValue("/root/hidden/userinfo");
- var userinfos = userinfo.split("|");
- model.setValue("/root/send/execrid", userinfos[2]);
- model.setValue("/root/send/execrnm", userinfos[3]);
-
- model.refresh();
- ]]>
- </script>
- </input>
- </group>
- <caption id="caption48" class="tit_2" style="left:5px; top:55px; width:131px; height:14px; ">배치 로그 목록</caption>
- <line id="line20" class="line_1" style="x1:0px; y1:70px; x2:950px; y2:70px; "/>
- <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; ">
- <col ref="prgmnm"/>
- <col ref="prcsstat" type="combo" style="border-right-width:0px; ">
- <choices>
- <itemset nodeset="/root/init/statuslist/status">
- <label ref="label"/>
- <value ref="value"/>
- </itemset>
- </choices>
- </col>
- <col type="inputbutton"/>
- <col ref="fromdt" format="yyyy-mm-dd hh:nn:ss"/>
- <col ref="enddt" format="yyyy-mm-dd hh:nn:ss" style="left:446px; top:23px; width:126px; height:23px; "/>
- <col ref="execrid" visibility="hidden" style="text-align:right; "/>
- <col ref="execnode" visibility="hidden" style="text-align:right; "/>
- <col ref="prcscnt" style="text-align:right; "/>
- <col ref="sucscnt" style="text-align:right; "/>
- <col ref="failcnt" style="text-align:right; "/>
- <col ref="cnt" style="text-align:right; border-right-width:0px; "/>
- <col type="inputbutton" visibility="visible"/>
- <col ref="modulenm" visibility="hidden"/>
- <col ref="prgmid" visibility="hidden"/>
- <col ref="paramcnts" visibility="hidden"/>
- <col ref="prgmexecno" visibility="hidden"/>
- <script type="javascript" ev:event="onbuttonclick">
- <![CDATA[
- var cur_col = grd_batlog.col;
-
- if (cur_col == 3) { // 로그 조회
- fOpenLogDetailPopup();
- } else if (cur_col == 12) { // 결과 파일 조회
- fOpenResultFilePopup();
- }
- ]]>
- </script>
- </datagrid>
- <select id="checkbox1" ref="/root/send/autorepeat" overflow="visible" appearance="full" style="left:875px; top:50px; width:70px; height:15px; border-style:none; ">
- <choices>
- <item>
- <label>자동조회</label>
- <value>1</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fSetAutoRepeat();
- ]]>
- </script>
- </select>
- </group>
- </xhtml:body>
- </xhtml:html>
|