Index: arms/html/jiraServer/content-container.html =================================================================== diff -u -rf47841caee051f736d124c781b9ff6db15d09145 -r25aa871f575c8c86cde6ee64632a2a4f7c73f173 --- arms/html/jiraServer/content-container.html (.../content-container.html) (revision f47841caee051f736d124c781b9ff6db15d09145) +++ arms/html/jiraServer/content-container.html (.../content-container.html) (revision 25aa871f575c8c86cde6ee64632a2a4f7c73f173) @@ -1617,3 +1617,181 @@ + + \ No newline at end of file Index: arms/js/jiraServer.js =================================================================== diff -u -rf47841caee051f736d124c781b9ff6db15d09145 -r25aa871f575c8c86cde6ee64632a2a4f7c73f173 --- arms/js/jiraServer.js (.../jiraServer.js) (revision f47841caee051f736d124c781b9ff6db15d09145) +++ arms/js/jiraServer.js (.../jiraServer.js) (revision 25aa871f575c8c86cde6ee64632a2a4f7c73f173) @@ -15,6 +15,7 @@ var dataTableRef; // 데이터테이블 참조 변수 +var serverDataList; // 서버 전체 맵 //////////////// //Document Ready @@ -135,6 +136,12 @@ 200: function (data) { /////////////////// insert Card /////////////////////// var obj = data.response; + serverDataList = {}; + for (var k in data.response) { + let serverData = data.response[k]; + serverDataList[serverData.c_id] = serverData; + } + draw_card_deck(obj); } }, @@ -280,13 +287,9 @@ } else{ // 상세보기, 편집하기, 지라프로젝트, 이슈 우선순위, 이슈 상태, 삭제하기 $("#type_tab").hide(); // 이슈 유형 슴김 - $("#resolution_tab").hide(); // 해결책 숨기기 - $("li a[href='#related_project'] strong").text("레드마인 프로젝트"); - - $("#status_tab").removeClass("hidden").show(); $("#cloudIssueTypeInfo").removeClass("hidden"); @@ -428,8 +431,6 @@ ); } - - function dataTableDrawCallback(tableInfo) { console.log("[ jiraServer :: dataTableDrawCallback ] :: selectedTab -> " + selectedTab); console.log("[ jiraServer :: dataTableDrawCallback ] :: tableInfo"); @@ -509,11 +510,13 @@ $("#extend_editview_jira_server_connect_id").val($("#editview_jira_server_connect_id").val()); $("#extend_editview_jira_pass_token").val($("#editview_jira_pass_token").val()); - if ( $("#editview_jira_server_type").find(".active input").val() === "클라우드") { + if ($("#editview_jira_server_type").find(".active input").val() === "클라우드") { $("#extend_editview_jira_server_type_option1").parent().click(); - }else if(( $("#editview_jira_server_type").find(".active input").val() === "온프레미스") ) { + } + else if (($("#editview_jira_server_type").find(".active input").val() === "온프레미스") ) { $("#extend_editview_jira_server_type_option2").parent().click(); - }else{ + } + else{ $("#extend_editview_jira_server_type_option3").parent().click(); } }); @@ -536,11 +539,13 @@ $("#extend_editview_jira_server_connect_id").val($("#editview_jira_server_connect_id").val()); $("#extend_editview_jira_pass_token").val($("#editview_jira_pass_token").val()); - if ( $("#editview_jira_server_type").find(".active input").val() === "클라우드") { + if ($("#editview_jira_server_type").find(".active input").val() === "클라우드") { $("#extend_editview_jira_server_type_option1").parent().click(); - } else if($("#editview_jira_server_type").find(".active input").val() === "온프레미스"){ + } + else if ($("#editview_jira_server_type").find(".active input").val() === "온프레미스"){ $("#extend_editview_jira_server_type_option2").parent().click(); - } else{ + } + else{ $("#extend_editview_jira_server_type_option3").parent().click(); } @@ -1549,8 +1554,6 @@ var chk_result = ""; var cardIndex = ""; - - if (jiraServerType === "온프레미스") { $.ajax({ url: "/auth-user/api/arms/jiraServer/getJiraIssueType.do", @@ -1627,12 +1630,20 @@ chk_result = chk_issue_type_whether_issue_can_be_created(issueTypeList); if (chk_result !== "true") { projectIdList.push(arr[i].c_id); } } - dic.projectId = projectIdList; + dic.projectId = projectIdList; if (dic.projectId.length !== 0) { //이슈 타입의 기본값 설정이 없음 or arms-requirement 가 아님 - ribbonHtmlData += `
`; + ribbonHtmlData += `
+ +
`; + // ribbonHtmlData += `
`; $(ribbonSelector).append(ribbonHtmlData); } else { - ribbonHtmlData += `
Ready
`; + /*ribbonHtmlData += `
Ready
`;*/ + ribbonHtmlData += `
Ready
`; $(ribbonSelector).append(ribbonHtmlData); } } @@ -1646,5 +1657,147 @@ } }); } + /*if (jiraServerType ==="레드마인_온프레미스") { + $.ajax({ + url: "/auth-user/api/arms/jiraServer/getJiraProject.do", + type:"GET", + data: { c_id: jiraServerId }, + contentType: "application/json;charset=UTF-8", + dataType: "json", // 서버에서 보내줄 데이터의 타입 + progress: true, + statusCode: { + 200: function (data) { + $(".loader").addClass("hide"); + + cardIndex = index; + resultList = data.response; // 프로젝트 엔티티 목록(+이슈유형, 이슈상태 있음) + var arr = []; + arr = resultList; + var issueTypeList = []; + + var ribbonSelector = ".ribbon-"+cardIndex; + var ribbonHtmlData = ``; + + var projectIdList = []; + var dic = {serverId : "" , projectId : ""}; + dic.serverId = jiraServerId; + for(var i = 0; i < arr.length ; i++) { + issueTypeList = arr[i].jiraIssueTypeEntities; // 이슈타입들의 목록 + chk_result = chk_issue_type_whether_issue_can_be_created(issueTypeList); + if (chk_result !== "true") { projectIdList.push(arr[i].c_id); } + } + dic.projectId = projectIdList; + if (dic.projectId.length !== 0) { //이슈 타입의 기본값 설정이 없음 or arms-requirement 가 아님 + ribbonHtmlData += `
+ +
`; + // ribbonHtmlData += `
`; + $(ribbonSelector).append(ribbonHtmlData); + } else { + ribbonHtmlData += `
Ready
`; + /!*ribbonHtmlData += `
Ready
`;*!/ + $(ribbonSelector).append(ribbonHtmlData); + } + } + }, + error: function (e) { + if(jiraServerId === undefined || jiraServerId === "") { + jError("클라우드 지라 프로젝트 조회 중 에러가 발생했습니다. (지라(서버) 아이디 없음)"); + } else { + jError("클라우드 지라 프로젝트 조회 중 에러가 발생했습니다."); + } + } + }); + }*/ return resultList; +} + +function notReaadyModalPopup(jiraServerId) { + $("#select_server_name").text(serverDataList[jiraServerId].c_title); + $("#not_ready_modal").modal("show"); + + var columnList = [ + { + name: "c_jira_name", + title:"프로젝트 이름", + data: "c_jira_name", + className: "dt-body-left", + visible: true + }, + { title:"프로젝트 키", + data: "c_jira_key", + className: "dt-body-left", + defaultContent: "
N/A
" + }, + { title:"프로젝트 아이디", + data: "c_desc", + className: "dt-body-left", + defaultContent: "
N/A
" + }, + { + title:"선택된 이슈유형", + data: "jiraIssueTypeEntities", + className: "dt-body-left", + defaultContent: "
N/A
" + }, + { name: "c_id", title: "c_id", data: "c_id", visible: false }, + ]; + var columnDefList =[]; + var columnDefList_cloud = [ + { + targets: 3, + searchable: true, + orderable: true, + render: function (data, type, row,meta) { + let isCheck = null; + + for (const rowInfo of data) { + if (rowInfo.c_check === "true") { + isCheck = rowInfo.c_issue_type_name+"["+rowInfo.c_issue_type_id+"]"; + break; + } + } + + if(isEmpty(isCheck)) { + return "
N/A
"; + } + else { + return `
+ ${isCheck} +
`; + } + return data; + } + } + ]; + columnDefList = columnDefList_cloud; + var rowsGroupList = null; //그룹을 안쓰려면 null 처리 + var jquerySelector = "#modal_project_table"; // 장소 + var ajaxUrl = "/auth-user/api/arms/jiraServer/getJiraProjectPure.do?c_id=" + jiraServerId; + var jsonRoot = "response"; + + var selectList = {}; + var orderList = [[1, "asc"]]; + var buttonList = []; + var isServerSide = false; + + dataTableRef = dataTable_build( + jquerySelector, + ajaxUrl, + jsonRoot, + columnList, + rowsGroupList, + columnDefList, + selectList, + orderList, + buttonList, + isServerSide + ); + + $('#modal_project_table tbody').off('click', 'tr'); + } \ No newline at end of file