Index: arms/html/analysisTime/content-container.html =================================================================== diff -u -raf3d9d0295fb80bbf94148a66804acfc4a1fac05 -r3b62135a4361c89b52b3e058537f747335059b8b --- arms/html/analysisTime/content-container.html (.../content-container.html) (revision af3d9d0295fb80bbf94148a66804acfc4a1fac05) +++ arms/html/analysisTime/content-container.html (.../content-container.html) (revision 3b62135a4361c89b52b3e058537f747335059b8b) @@ -1106,7 +1106,7 @@ class="gradient_middle_border" style="width: 100%; margin-top: 8px"> -
+
Index: arms/js/analysisTime.js =================================================================== diff -u -raf3d9d0295fb80bbf94148a66804acfc4a1fac05 -r3b62135a4361c89b52b3e058537f747335059b8b --- arms/js/analysisTime.js (.../analysisTime.js) (revision af3d9d0295fb80bbf94148a66804acfc4a1fac05) +++ arms/js/analysisTime.js (.../analysisTime.js) (revision 3b62135a4361c89b52b3e058537f747335059b8b) @@ -225,7 +225,7 @@ // getRelationJiraIssueByPdServiceAndVersions(selectedPdServiceId, selectedVersionId); // vertical timeline chart - verticalTimeLineChart(selectedPdServiceId, selectedVersionId, 1); + //verticalTimeLineChart(selectedPdServiceId, selectedVersionId, 1); // detail timeline chart //detailTimeLineChart(selectedPdServiceId, selectedVersionId); @@ -288,7 +288,7 @@ // getRelationJiraIssueByPdServiceAndVersions(selectedPdServiceId, selectedVersionId); // vertical timeline chart - verticalTimeLineChart(selectedPdServiceId, selectedVersionId, 1); + //verticalTimeLineChart(selectedPdServiceId, selectedVersionId, 1); // detail timeline chart //detailTimeLineChart(selectedPdServiceId, selectedVersionId); // timeline chart @@ -1689,58 +1689,35 @@ } } -function verticalTimeLineChart(pdServiceLink, pdServiceVersions, week) { +function verticalTimeLineChart(data) { - const url = new UrlBuilder() - .setBaseUrl("/auth-user/api/arms/analysis/time/weekly-updated-issue-search") - .addQueryParam("pdServiceLink", pdServiceLink) - .addQueryParam("pdServiceVersionLinks", pdServiceVersions) - .addQueryParam("isReqType", "ISSUE") - .addQueryParam("크기", 1000) - .addQueryParam("하위크기", 1000) - .addQueryParam("baseWeek", week) - .addQueryParam("sortField", "updated") - .build(); + let contentSet = {}; // 객체로 선언 - $.ajax({ - url: url, - type: "GET", - contentType: "application/json;charset=UTF-8", - dataType: "json", - progress: true, - statusCode: { - 200: function (data) { + let items = Object.values(data).reduce((acc, versionData) => { + versionData.forEach(item => { + if (!contentSet[item.summary]) { // 중복 체크 + contentSet[item.summary] = { + title: convertVersionIdToTitle(item.pdServiceVersion), + content: item.summary, + type: [item.key], + date: formatDateTime(item.updated) + }; + } else { + contentSet[item.summary].type.push(item.key); + contentSet[item.summary].type.sort(); + } + }); - let contentSet = {}; // 객체로 선언 + return acc; + }, []); - let items = Object.values(data).reduce((acc, versionData) => { - versionData.forEach(item => { - if (!contentSet[item.summary]) { // 중복 체크 - contentSet[item.summary] = { - title: convertVersionIdToTitle(item.pdServiceVersion), - content: item.summary, - type: [item.key], - date: formatDateTime(item.updated) - }; - } else { - contentSet[item.summary].type.push(item.key); - contentSet[item.summary].type.sort(); - } - }); + items = Object.values(contentSet).map(item => ({ + ...item, + type: item.type.join(' | ') + })); - return acc; - }, []); + makeVerticalTimeline(items); - items = Object.values(contentSet).map(item => ({ - ...item, - type: item.type.join(' | ') - })); - - makeVerticalTimeline(pdServiceLink, pdServiceVersions, week, items); - } - } - }); - // mock data /* makeVerticalTimeline([ @@ -1772,23 +1749,21 @@ */ } -function makeVerticalTimeline(pdServiceLink, pdServiceVersions, week, data) { +function makeVerticalTimeline(data) { - // 날짜 세팅 - const { from, to } = getFromToDates(week); - $("#timeline_start_date").val(from); - $("#timeline_end_date").val(to); - // 데이터 세팅 const $container = document.querySelector(".timeline-container"); $container.innerHTML = ''; - const upIcon = document.createElement("i"); - upIcon.className = "fa fa-chevron-up vertical-chevron-up"; - $container.append(upIcon); + // const upIcon = document.createElement("i"); + // upIcon.className = "fa fa-chevron-up vertical-chevron-up"; + // $container.append(upIcon); if (data.length == 0) { - $container.innerHTML += "

데이터가 없습니다.

"; + $container.innerHTML += + "

데이터가 없습니다.

"; } else { const $ul = document.createElement("ul"); @@ -1812,41 +1787,27 @@ $container.append($ul); } - const downIcon = document.createElement("i"); - downIcon.className = "fa fa-chevron-down vertical-chevron-down"; - if (week != 1) { - $container.append(downIcon); - } + // const downIcon = document.createElement("i"); + // downIcon.className = "fa fa-chevron-down vertical-chevron-down"; + // $container.append(downIcon); // 버튼 클릭 이벤트 - $('.fa-chevron-up').on('click', function() { - verticalTimeLineChart(pdServiceLink, pdServiceVersions, week+1); - }); - - $('.fa-chevron-down').on('click', function() { - if (week - 1 > 0) { - verticalTimeLineChart(pdServiceLink, pdServiceVersions, week-1); - } - }); + // $('.fa-chevron-up').on('click', function() { + // verticalTimeLineChart(pdServiceLink, pdServiceVersions, week+1); + // }); + // + // $('.fa-chevron-down').on('click', function() { + // if (week - 1 > 0) { + // verticalTimeLineChart(pdServiceLink, pdServiceVersions, week-1); + // } + // }); } function formatDateTime(dateTime) { var date = dateTime.split('T')[0]; return date; } -function getFromToDates(week) { - const fromDate = new Date(); - fromDate.setDate(fromDate.getDate() - week * 7); - const from = fromDate.toISOString().split('T')[0]; - - const toDate = new Date(); - toDate.setDate(toDate.getDate() - (week - 1) * 7); - const to = toDate.toISOString().split('T')[0]; - - return { from, to }; -} - async function timeLineChart(pdServiceLink, pdServiceVersionLinks) { let deadline = await waitForGlobalDeadline(); @@ -1861,7 +1822,7 @@ .addQueryParam("pdServiceLink", pdServiceLink) .addQueryParam("pdServiceVersionLinks", pdServiceVersionLinks) .addQueryParam("일자기준", "updated") - .addQueryParam("메인그룹필드", "isReq") + .addQueryParam("isReqType", "ISSUE") .addQueryParam("시작일", startDate) .addQueryParam("종료일", endDate) .addQueryParam("sortField", "updated") @@ -1893,7 +1854,7 @@ 200: function (data) { console.log("[ analysisTime :: TimeLineData ] :: = "); console.log(data); - + verticalTimeLineChart(data); } } });