diff --git a/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp b/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp index 9701b31..1e402a2 100644 --- a/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp +++ b/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp @@ -101,16 +101,31 @@ standardMessageItems: [], inboundResponseStandardMessageItems: [], fromResponseAdapter: '', + toResponseAdapter: '', inboundResponseHttpMethod: '', inboundResponseRestPath: '', - syncAsyncType: 'sync' + outboundResponseHttpMethod: '', + outboundResponseRestPath: '', + syncAsyncType: 'sync', + wordType: '1', + requestType:'S' }, // 컴퓨티드 프로퍼티 get showInboundResponse() { return this.apiInterface.syncAsyncType === 'asyncSync'; }, + + // 컴퓨티드 프로퍼티 + get showOutboundResponse() { + return this.apiInterface.syncAsyncType === 'syncAsync'; + }, })); + + // 요청/응답 disable 처리. + Alpine.store('formState', { + isReqResDisabled: false + }); }); // Alpine 컴포넌트 접근을 위한 유틸리티 함수 @@ -136,6 +151,7 @@ new makeOptions("ADPTRBZWKGROUPNAME","ADPTRBZWKGROUPDESC").setObj($("select[name=fromAdapter]")).setFormat(codeName3OptionFormat).setNoValueInclude(true).setAttr('std','ADPTRMSGPTRNCD').setData(json.fromList).rendering(); new makeOptions("ADPTRBZWKGROUPNAME","ADPTRBZWKGROUPDESC").setObj($("select[name=fromResponseAdapter]")).setFormat(codeName3OptionFormat).setNoValueInclude(true).setData(json.toList).rendering(); new makeOptions("ADPTRBZWKGROUPNAME","ADPTRBZWKGROUPDESC").setObj($("select[name=toAdapter]")).setFormat(codeName3OptionFormat).setNoValueInclude(true).setData(json.toList).rendering(); + new makeOptions("ADPTRBZWKGROUPNAME","ADPTRBZWKGROUPDESC").setObj($("select[name=toResponseAdapter]")).setFormat(codeName3OptionFormat).setNoValueInclude(true).setData(json.fromList).rendering(); //if(key == "") setSearchable(selectName); // 콤보에 searchable 설정 if (typeof callback === 'function') { @@ -196,27 +212,33 @@ // 어댑터 설정 정보 객체에 인바운드 응답 관련 설정 추가 const adapterConfig = { - inbound: { - ioType: 'inbound', - methodSelectId: '#inboundHttpMethod', - restPathInputId: '#inboundRestPath', - adapterUrlId: '#fromAdapterUrl', - }, - outbound: { - ioType: 'outbound', - methodSelectId: '#outboundHttpMethod', - restPathInputId: '#outboundRestPath', - adapterUrlId: '#toAdapterUrl', - standardOptionsId: '#standardOutboundOptions', - commonFieldId: '#commonFieldPart' - }, - inboundResponse: { - methodSelectId: '#inboundResponseHttpMethod', - restPathInputId: '#inboundResponseRestPath', - adapterUrlId: '#fromResponseAdapterUrl', - standardOptionsId: '#inboundResponseRestPart', - commonFieldId: '#inboundResponseCommonFieldPart' - } + inbound: { + ioType: 'inbound', + methodSelectId: '#inboundHttpMethod', + restPathInputId: '#inboundRestPath', + adapterUrlId: '#fromAdapterUrl', + }, + outbound: { + ioType: 'outbound', + methodSelectId: '#outboundHttpMethod', + restPathInputId: '#outboundRestPath', + adapterUrlId: '#toAdapterUrl', + standardOptionsId: '#standardOutboundOptions', + commonFieldId: '#commonFieldPart' + }, + inboundResponse: { + methodSelectId: '#inboundResponseHttpMethod', + restPathInputId: '#inboundResponseRestPath', + adapterUrlId: '#fromResponseAdapterUrl', + standardOptionsId: '#inboundResponseRestPart', + commonFieldId: '#inboundResponseCommonFieldPart' + }, + outboundResponse: { + methodSelectId: '#outboundResponseHttpMethod', + restPathInputId: '#outboundResponseRestPath', + adapterUrlId: '#toResponseAdapterUrl', + standardOptionsId: '#outboundResponseRestPart' + } }; // 어댑터 선택 변경 시 호출되는 함수 수정 @@ -373,9 +395,13 @@ $("select[name=authType]" ).val(data["authType"]); } $("select[name=fromResponseAdapter]" ).val(data["fromResponseAdapter"]);//fromResponseAdapter + + $("select[name=toResponseAdapter]" ).val(data["toResponseAdapter"]);//toResponseAdapter + $('#inboundHttpMethod').val(data.inboundHttpMethod); $('#outboundHttpMethod').val(data.outboundHttpMethod); $('#inboundResponseHttpMethod').val(data.inboundResponseHttpMethod); + $('#outboundResponseHttpMethod').val(data.outboundResponseHttpMethod); $('#svcLogLvelNo').val(data.svcLogLvelNo); if(data['inboundRequestLayout']!=null && data['outboundRequestLayout']!=null){ @@ -420,6 +446,12 @@ const inOutType = data['eaiSvcName'].slice(-1); $('#inOutType').val(inOutType); + $("input[name=btnRadioReqRes][value='" + sendRecvType + "']").prop("checked", true); + Alpine.store('formState').isReqResDisabled = true; + $("input[name=btnRadioInOut][value='" + inOutType + "']").prop("checked", true); + $("input[name=btnRadioInOut]").prop("disabled", true); + + $('#eaiBzwkDstcd').attr("readonly", "readonly"); $('#eaiSvcName').attr("readonly", "readonly"); $('#sendRecvType').attr("readonly", "readonly"); @@ -439,6 +471,7 @@ $('#cloneOrgInterfaceIdDesc').text(eaiSvcName); $("#fromResponseAdapter").change(); + $("#toResponseAdapter").change(); }, error:function(e){ alert(e.responseText); @@ -1057,6 +1090,14 @@ } }); + $("#toResponseAdapter").change(function() { + const alpineData = getApiInterface(); + if (alpineData.syncAsyncType === 'syncAsync') { + const adapterGroupName = $(this).val(); + adapterSelectChange('outboundResponse', adapterGroupName); + } + }); + $('#outboundRestPath').on('input', function() { checkTagVariableUrl(); }); @@ -1283,10 +1324,10 @@