<%--
  Created by IntelliJ IDEA.
  User: Mong
  Date: 2023-02-02
  Time: PM 3:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>API NODE</title>
    <%@ include file="/WEB-INF/jsp/adm/include/topLinkTag.jsp" %>
</head>
<body>

<h1>ICOMSYS ADMIN</h1>
<h1>API NODE</h1>
<div class="skip_navigation">
    <ul>
        <li>
            <a href="#Content" class="go_content">본문 바로가기</a>
        </li>
        <li>
            <a href="#Gnb">메뉴 바로가기</a>
        </li>
    </ul>
</div>

<header id="header">
    <%@ include file="/WEB-INF/jsp/adm/include/header.jsp" %>
</header>
<c:import url="/adm/menu/getLnbMenu.do"/>
<script src="<c:url value='/js/adm/rcp/conversation/apiNodeEdit.js' />"></script>
<script src="<c:url value='/js/adm/rcp/conversation/common.js' />"></script>
<script type="text/javascript">


</script>

<section id="Content" class="bot_common">
    <div class="location">
        <ul>
            <li class="home"><a href="#">HOME</a></li>
            <li><a href="#">대화관리</a></li>
            <li><a href="#">API노드관리</a></li>
        </ul>
    </div>

    <!-- TODO: 래부터 신규 컨텐츠 마크업 입니다. -->
<form name="apiDataForm" id="apiDataForm">
    <div class="sub_cont">
        <div class="tbl">
            <table class="search block">
                <colgroup>
                    <col width="140px">
                    <col width="auto">
                    <col width="140px">
                    <col width="auto">
                </colgroup>
                <tbody>
                <tr>
                    <th class="tl">시나리오그룹</th>
                    <td class="tl">
                        <div class="sel_box">
                            <select id="serviceGroup" class="wide">
                            </select>
                        </div>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
        <div class="cont_box">
            <div class="box_title">
                <div class="fl">
                    <h2 id="apiNodeTitle" class="mt12">API Node 편집</h2>
                </div>
            </div>

            <div class="tbl">
                <table class="edit hght">
                    <colgroup>
                        <col width="150px">
                        <col width="auto">
                    </colgroup>
                    <tbody>
                    <tr>
                        <th class="tl">API Node명 </th>
                        <td>
                            <div class="ipt_box">
                                <input id="APINodeName" type="text" value="" name="apiNodeName" class="">
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <th class="tl">URL</th>
                        <td>
                            <div class="ipt_box type-flex">
                                <div class="sel_box">
                                    <select id="urlSelect" class="" name="urlType">
                                        <option value="GET">GET</option>
                                        <option value="POST">POST</option>
                                    </select>
                                </div>
                                <input id="APINodeUrl" type="text" value="http://" name="URL">
                            </div>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>

        <div class="cont_box" id="apiNodeGetEdit">
            <div class="box_title">
                <div class="fl">
                    <h2 class="mt12">API Node Parameter 설정</h2>
                </div>
            </div>

            <div class="dashedline createTrInputWrapper">
                <div class="box_title sub">
                    <div class="fl">
                        <h2 class="mt12">Header</h2>
                    </div>
                    <div class="fr">
                        <a href="#" class="btn btn-sm createTrInputAdd api-header">+추가</a>
                    </div>
                </div>
                <div class="tbl">
                    <table id="headerTable" class="edit hght">
                        <colgroup>
                            <col width="auto">
                            <col width="auto">
                            <col width="40%">
                        </colgroup>
                        <tbody class="createTrInput">
                        <tr>
                            <td>
                                <div class="ipt_box">
                                    <input type="text" placeholder="key" name="header[0][key]">
                                </div>
                            </td>
                            <td>
                                <div class="ipt_box">
                                    <input type="text" placeholder="value" name="header[0][value]">
                                </div>
                            </td>
                            <td>
                                <div class="ipt_box type-flex">
                                    <input type="text" placeholder="Description" name="header[0][desc]">
                                </div>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>

        </div>

        <div class="cont_box">
            <div class="dashedline first createTrInputWrapper">
                <div class="box_title sub">
                    <div class="fl">
                        <h2 class="mt12">Query Parameter</h2>
                    </div>
                    <div class="fr">
                        <a href="#" class="btn btn-sm createTrInputAdd api-param">+추가</a>
                    </div>
                </div>
                <div class="tbl">
                    <table id="paramTable" class="edit hght">
                        <colgroup>
                            <col width="auto">
                            <col width="auto">
                            <col width="40%">
                        </colgroup>
                        <tbody class="createTrInput">
                        <tr>
                            <td>
                                <div class="ipt_box">
                                    <input type="text" placeholder="key" name="param[0][key]">
                                </div>
                            </td>
                            <td>
                                <div class="ipt_box">
                                    <input type="text" placeholder="value" name="param[0][value]">
                                </div>
                            </td>
                            <td>
                                <div class="ipt_box type-flex">
                                    <input type="text" placeholder="Description" name="param[0][desc]">
                                </div>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>

        <div class="cont_box" id="apiPostBodyContents" style="display: none">
            <div class="dashedline first createTrInputWrapper">
                <div class="box_title sub">
                    <div class="fl">
                        <h2 class="mt12">Body</h2>
                    </div>
                </div>
                <div class="tbl">
                    <table id="bodyTable" class="edit hght">
                        <colgroup>
                            <col width="auto">
                        </colgroup>
                        <tbody>
                        <tr>
                            <td>
                                <div class="ipt_box">
                                    <textarea name="body" id="apiBody" cols="30" rows="10"></textarea>
                                </div>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>

        <div class="cont_box">
            <div class="box_title">
                <div class="fl">
                    <h2 class="mt12">API Node 변수 설정</h2>
                </div>
            </div>

            <div class="dashedline createTrInputWrapper">

                <div class="box_title sub">
                    <div class="fl">
                        <h2 class="mt12">Request</h2>
                    </div>
                    <div class="fr">
                        <a href="#" class="btn btn-sm createTrInputAdd api-request">+추가</a>
                    </div>
                </div>
                <div class="tbl">
                    <table id="reqTable" class="edit hght">
                        <colgroup>
                            <col width="auto">
                            <col width="auto">
                            <col width="40%">
                        </colgroup>
                        <tbody class="createTrInput">
                        <tr>
                            <td colspan="2">
                                <div class="ipt_box">
                                    <input type="text" placeholder="value" name="request[0][value]">
                                </div>
                            </td>
                            <td>
                                <div class="ipt_box type-flex">
                                    <input type="text" placeholder="Description" name="request[0][desc]">
                                </div>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>

            </div>

            <div class="dashedline createTrInputWrapper">
                <div class="box_title sub">
                    <div class="fl">
                        <h2 class="mt12">Response</h2>
                    </div>
                    <div class="fr">
                        <a href="#" class="btn btn-sm createTrInputAdd api-response">+추가</a>
                    </div>
                </div>
                <div class="tbl">
                    <table id="resTable" class="edit hght">
                        <colgroup>
                            <col width="auto">
                            <col width="auto">
                            <col width="40%">
                        </colgroup>
                        <tbody class="createTrInput">
                        <tr>
                            <td>
                                <div class="ipt_box">
                                    <input type="text" placeholder="value" name="response[0][key]">
                                </div>
                            </td>
                            <td>
                                <div class="ipt_box">
                                    <input type="text" placeholder="value" name="response[0][value]">
                                </div>
                            </td>
                            <td>
                                <div class="ipt_box type-flex">
                                    <input type="text" placeholder="Description" name="response[0][desc]">
                                </div>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>

        <div class="cont_box">
            <div class="btn_wrap fr">
                <a id="btnCancel" href="#" class="btn basic grey">취소</a>
                <a id="btnSave" href="#" class="btn basic">저장</a>
            </div>
        </div>
    </div>
</form>
<input type="hidden" id="apiUrl" value="<c:out value="${url}"/>"/>
<input type="hidden" id="apiSeq" value="<c:out value="${seq}"/>"/>
<input type="hidden" id="apiServiceGroup" value="<c:out value="${serviceGroup}"/>"/>

</section>
</body>
</html>
