Index: arms/html/analysisTime/content-container.html =================================================================== diff -u -rbfeaaf3eb5dcfe7126123f0d4939a9d428d4156e -r2b152c9e969885bc2a653f7594a162a3e32f51eb --- arms/html/analysisTime/content-container.html (.../content-container.html) (revision bfeaaf3eb5dcfe7126123f0d4939a9d428d4156e) +++ arms/html/analysisTime/content-container.html (.../content-container.html) (revision 2b152c9e969885bc2a653f7594a162a3e32f51eb) @@ -1083,7 +1083,7 @@ required="required" readonly /> Index: arms/js/analysisTime.js =================================================================== diff -u -r2ddfafed4da862bc4f7eab735f4d6805abcb6efa -r2b152c9e969885bc2a653f7594a162a3e32f51eb --- arms/js/analysisTime.js (.../analysisTime.js) (revision 2ddfafed4da862bc4f7eab735f4d6805abcb6efa) +++ arms/js/analysisTime.js (.../analysisTime.js) (revision 2b152c9e969885bc2a653f7594a162a3e32f51eb) @@ -226,8 +226,10 @@ // vertical timeline chart verticalTimeLineChart(selectedPdServiceId, selectedVersionId, 1); // detail timeline chart - detailTimeLineChart(selectedPdServiceId, selectedVersionId); + //detailTimeLineChart(selectedPdServiceId, selectedVersionId); + timeLineChart(selectedPdServiceId, selectedVersionId); + if (data.length > 0) { console.log("display 재설정."); } @@ -288,7 +290,10 @@ verticalTimeLineChart(selectedPdServiceId, selectedVersionId, 1); // detail timeline chart detailTimeLineChart(selectedPdServiceId, selectedVersionId); + // timeline chart + timeLineChart(selectedPdServiceId, selectedVersionId); + if (checked) { endPointUrl = "/T_ARMS_REQSTATUS_" + @@ -405,6 +410,54 @@ }, // onClose: onMultiStackChartDateEndChanged }); + + $('#timeline_start_date').datetimepicker({ + theme:'dark', + onShow: function(ct) { + this.setOptions({ + maxDate: $('#timeline_end_date').val()?$('#timeline_end_date').datetimepicker('getValue'):false + }) + }, + timepicker: false, + format: 'Y-m-d', + onSelectDate: function(ct, $i) { + var startDate = $('#timeline_start_date').datetimepicker('getValue'); + var endDate = $('#timeline_end_date').datetimepicker('getValue'); + var dayDifference = (endDate - startDate) / (1000 * 60 * 60 * 24); + + if (dayDifference > 31) { + alert('시작일과 종료일의 차이는 최대 30일입니다.'); + var newDate = new Date(endDate); + newDate.setDate(endDate.getDate() - 30); + $i.val(formatDate(newDate)); + } + } + }); + + $('#timeline_end_date').datetimepicker({ + theme:'dark', + onShow: function(ct) { + this.setOptions({ + minDate: $('#timeline_start_date').val()?$('#timeline_start_date').datetimepicker('getValue'):false, + maxDate: today + }) + }, + timepicker: false, + format: 'Y-m-d', + onSelectDate: function(ct, $i) { + var startDate = $('#timeline_start_date').datetimepicker('getValue'); + var endDate = $('#timeline_end_date').datetimepicker('getValue'); + var dayDifference = (endDate - startDate) / (1000 * 60 * 60 * 24); + + if (dayDifference > 31) { + alert('시작일과 종료일의 차이는 최대 30일입니다.'); + var newDate = new Date(startDate); + newDate.setDate(startDate.getDate() + 30); + $i.val(formatDate(newDate)); + } + }, + // onClose: onMultiStackChartDateEndChanged + }); } function baseDateReset() { @@ -1591,6 +1644,10 @@ $("#multi-stack-search").on("click", function (params) { dailyCreatedCountAndUpdatedStatusesMultiStackCombinationChart(selectedPdServiceId, selectedVersionId); }); + + $("#timeline-search").on("click", function (params) { + timeLineChart(selectedPdServiceId, selectedVersionId); + }); } function validateSearchDateWithChart(startDate, endDate) { @@ -1781,8 +1838,75 @@ return { from, to }; } -function detailTimeLineChart(pdServiceLink, pdServiceVersions) { +async function timeLineChart(pdServiceLink, pdServiceVersionLinks) { + let deadline = await waitForGlobalDeadline(); + let startDate = $("#timeline_start_date").val(); + let endDate = $("#timeline_end_date").val(); + + if (!validateSearchDateWithChart(startDate, endDate)) { + return; + } + const verticalUrl = new UrlBuilder() + .setBaseUrl("/auth-user/api/arms/analysis/time/standard-daily/updated-jira-issue") + .addQueryParam("pdServiceLink", pdServiceLink) + .addQueryParam("pdServiceVersionLinks", pdServiceVersionLinks) + .addQueryParam("일자기준", "updated") + .addQueryParam("메인그룹필드", "isReq") + .addQueryParam("시작일", startDate) + .addQueryParam("종료일", endDate) + .addQueryParam("sortField", "updated") + .addQueryParam("크기", 1000) + .addQueryParam("하위크기", 1000) + .addQueryParam("컨텐츠보기여부", true) + .build(); + + const detailUrl = new UrlBuilder() + .setBaseUrl("/auth-user/api/arms/analysis/time/standard-daily/updated-jira-issue") + .addQueryParam("pdServiceLink", pdServiceLink) + .addQueryParam("pdServiceVersionLinks", pdServiceVersionLinks) + .addQueryParam("일자기준", "updated") + .addQueryParam("시작일", startDate) + .addQueryParam("종료일", endDate) + .addQueryParam("sortField", "created") + .addQueryParam("크기", 1000) + .addQueryParam("하위크기", 1000) + .addQueryParam("컨텐츠보기여부", true) + .build(); + + $.ajax({ + url: verticalUrl, + type: "GET", + contentType: "application/json;charset=UTF-8", + dataType: "json", + progress: true, + statusCode: { + 200: function (data) { + console.log("[ analysisTime :: detailTimeLineData ] :: = "); + console.log(data); + detailTimeLineData(data); + } + } + }); + + $.ajax({ + url: detailUrl, + type: "GET", + contentType: "application/json;charset=UTF-8", + dataType: "json", + progress: true, + statusCode: { + 200: function (data) { + console.log("[ analysisTime :: timeLineChart ] :: = "); + console.log(data); + } + } + }); + +} + +/*function detailTimeLineChart(pdServiceLink, pdServiceVersions) { + const url = new UrlBuilder() .setBaseUrl("/auth-user/api/arms/analysis/time/weekly-updated-issue-search") .addQueryParam("pdServiceLink", pdServiceLink) @@ -1806,7 +1930,7 @@ } }); -} +}*/ function detailTimeLineData(data) { var sevenTimeLineDiv = document.getElementById("detailTimeLine");