Index: arms/html/reqStatus/content-container.html =================================================================== diff -u -r5339d30f2209bcdadd3493518c3d92577438b82f -rdee89ebf68d1ad4acef8d5be29ca5f2f335ae90d --- arms/html/reqStatus/content-container.html (.../content-container.html) (revision 5339d30f2209bcdadd3493518c3d92577438b82f) +++ arms/html/reqStatus/content-container.html (.../content-container.html) (revision dee89ebf68d1ad4acef8d5be29ca5f2f335ae90d) @@ -869,7 +869,7 @@
-+
삭제된 ALM 이슈 목록을 확인하실 수 있습니다.
Index: reference/jquery-plugins/select2-4.0.13/src/scss/theme/default/layout.scss =================================================================== diff -u -rb55f04f1bafc30de22f6a5a60afe66df68cd023b -rdee89ebf68d1ad4acef8d5be29ca5f2f335ae90d --- reference/jquery-plugins/select2-4.0.13/src/scss/theme/default/layout.scss (.../layout.scss) (revision b55f04f1bafc30de22f6a5a60afe66df68cd023b) +++ reference/jquery-plugins/select2-4.0.13/src/scss/theme/default/layout.scss (.../layout.scss) (revision dee89ebf68d1ad4acef8d5be29ca5f2f335ae90d) @@ -1200,12 +1200,12 @@ $("body") .find("[aria-controls='" + jQueryElementStr + "']") .css("width", "50px"); - $(".dataTables_filter input[type=search]").css("width", "100px"); + $(".dataTables_filter input[type=search]").css("width", "150px"); $("select[name=" + jQueryElementStr + "]").css("width", "50px"); $.fn.dataTable.ext.errMode = function (settings, helpPage, message) { console.log(message); - jError("Notification : Ajax Error, retry plz !!!!!!!"); + jError("Notification : Ajax Error, retry plz !"); }; return tempDataTable; Index: arms/js/reqStatus.js =================================================================== diff -u -r5339d30f2209bcdadd3493518c3d92577438b82f -rdee89ebf68d1ad4acef8d5be29ca5f2f335ae90d --- arms/js/reqStatus.js (.../reqStatus.js) (revision 5339d30f2209bcdadd3493518c3d92577438b82f) +++ arms/js/reqStatus.js (.../reqStatus.js) (revision dee89ebf68d1ad4acef8d5be29ca5f2f335ae90d) @@ -12,6 +12,8 @@ var pdServiceListData; var versionListData; +var jiraServerTypeMap; + function execDocReady() { @@ -99,9 +101,10 @@ //버전 멀티 셀렉트 박스 이니시에이터 makeVersionMultiSelectBox(); + getServerTypeMap(); + reqIssueAndItsSubtasksEvent(); - deletedIssueTableEvent() // 스크립트 실행 로직을 이곳에 추가합니다. $("#progress_status").slimScroll({ @@ -938,11 +941,11 @@ + "pdServiceVersions=" + selectedRow.pdServiceVersions + "&jiraServerId=" + selectedRow.jiraServerId + "&issueKey=" + selectedRow.issueKey; - getReqIssueAndItsSubtakss(endPointUrl); // 데이터테이블 그리기 + getReqIssueAndItsSubtasks(endPointUrl); // 데이터테이블 그리기 }); } -function getReqIssueAndItsSubtakss(endPointUrl) { +function getReqIssueAndItsSubtasks(endPointUrl) { var columnList = [ { @@ -983,7 +986,15 @@ if (isEmpty(data) || data === "unknown") { return "
해당 데이터는 2일 후 완전히 삭제되어 통계에 포함되지 않습니다.N/A"; } else { - return "" + data + ""; + let serverType = getServerType(row.jira_server_id); + let alm_link = makeALMIssueLink(serverType, row.self, data); + + return ("" + data + + $("") + .append($('')) + .attr("onclick", alm_link ? `window.open('${alm_link}', '_blank')` : "#") + .prop("outerHTML") + + ""); } return data; }, @@ -1356,4 +1367,63 @@ ); } +function getServerTypeMap() { + $.ajax({ + url: "/auth-user/api/arms/jiraServerPure/serverTypeMap.do", // 클라이언트가 HTTP 요청을 보낼 서버의 URL 주소 + method: "GET", + dataType: "json", // 서버에서 보내줄 데이터의 타입 + success: function(response) { + console.log(response); + jiraServerTypeMap = response; + } + }); +} +var getServerType = function (server_id) { + console.log("[ reqStatus :: getServerType ] :: server_id => " + server_id); + if (jiraServerTypeMap.hasOwnProperty(server_id)) { + let value = jiraServerTypeMap[server_id]; + console.log("[ reqStatus :: getServerType ] :: value => " + value); + return value; + } else { + return "NO-TYPE"; + } +}; + + +var makeALMIssueLink = function (server_type, self_link, issue_key) { + let alm_link =""; + switch (server_type) { + case "클라우드" : // 지라 + // "https://ABCDEFG.ABCDEFG.net/rest/api/3/issue/10187" => "https://ABCDEFG.ABCDEFG.net" + let match_jc = self_link.match(/^(https?:\/\/[^\/]+)/); + if (match_jc) { + match_jc[1]; + alm_link = match_jc[1]+"/browse/"+issue_key; + } else { + console.log("makeALMIssueLink[JIRA_CLOUD] :: 링크 형식이 올바르지 않습니다. " + + "link => " + self_link +", issue_key => " +issue_key); + } + break; + case "온프레미스": // 지라 + // "http://www.313.co.kr/jira/rest/api/latest/issue/24708" => "www.313.co.kr/jira" + let match_jop = self_link.match(/^(https?:\/\/)?(www\.[^\/]+\/jira)/); + if (match_jop) { + match_jop[1]; + alm_link = match_jop[1]+"/browse/"+issue_key; + } else { + console.log("makeALMIssueLink[JIRA_ON_PREMISE] :: 링크 형식이 올바르지 않습니다. " + + "link => " + self_link + ", issue_key => " +issue_key); + } + break; + case "레드마인_온프레미스": + alm_link = self_link.replace(/\.json$/, ""); + break; + case "NO-TYPE" : + console.log("makeALMIssueLink[NO-TYPE] :: 서버 타입이 없습니다. link => " + self_link +", issue_key => " +issue_key); + alm_link = ""; + break; + } + console.log(alm_link); + return alm_link; +} \ No newline at end of file