Index: arms/html/dashboard/content-container.html =================================================================== diff -u -r31504d5a20ab457573febff2284fc19d79b9367b -r5cd1497e26973be15fe1d8eb216be1cbb19cbe0e --- arms/html/dashboard/content-container.html (.../content-container.html) (revision 31504d5a20ab457573febff2284fc19d79b9367b) +++ arms/html/dashboard/content-container.html (.../content-container.html) (revision 5cd1497e26973be15fe1d8eb216be1cbb19cbe0e) @@ -500,15 +500,15 @@
-

제품의 이슈 상태

+

제품의 이슈 상태 현황

-

월 별 제품의 요구사항 및 이슈 상태

+

월 별 제품의 요구사항 및 이슈 상태 누적 현황

Index: arms/js/dashboard.js =================================================================== diff -u -rfbf2792499e8446386ab1b259e51d9a00c63e40f -r5cd1497e26973be15fe1d8eb216be1cbb19cbe0e --- arms/js/dashboard.js (.../dashboard.js) (revision fbf2792499e8446386ab1b259e51d9a00c63e40f) +++ arms/js/dashboard.js (.../dashboard.js) (revision 5cd1497e26973be15fe1d8eb216be1cbb19cbe0e) @@ -469,7 +469,7 @@ versionId, versionName, waveName; - + percent = 0.55; barWidth = 25; padRad = 0; @@ -1149,67 +1149,74 @@ }); } -function combinationChart() { - const monthlyData = { - "2020-01": { - "requirementCount": getRandomInt(0, 100), - "issueStatus": {"Open": getRandomInt(0, 100), "In Progress": getRandomInt(0, 100), "완료됨": getRandomInt(0, 100), "Backlog": getRandomInt(0, 100), "진행 중": getRandomInt(0, 100), "Closed": 1, "Resolved": 1} - }, - "2020-02": { - "requirementCount": getRandomInt(0, 100), - "issueStatus": {"Open": getRandomInt(0, 100), "In Progress": getRandomInt(0, 100), "완료됨": getRandomInt(0, 100), "Backlog": getRandomInt(0, 100), "진행 중": getRandomInt(0, 100), "Closed": 1, "Resolved": 1} - }, - "2020-03": { - "requirementCount": getRandomInt(0, 100), - "issueStatus": {"Open": getRandomInt(0, 100), "In Progress": getRandomInt(0, 100), "완료됨": getRandomInt(0, 100), "Backlog": getRandomInt(0, 100), "진행 중": getRandomInt(0, 100), "Closed": 1, "Resolved": 1} - }, - "2020-04": { - "requirementCount": getRandomInt(0, 100), - "issueStatus": {"Open": getRandomInt(0, 100), "In Progress": getRandomInt(0, 100), "완료됨": getRandomInt(0, 100), "Backlog": getRandomInt(0, 100), "진행 중": getRandomInt(0, 100), "Closed": 1, "Resolved": 1} - }, - }; +function combinationChart(pdServiceLink = 10, pdServiceVersionLinks = "10,11,12,13") { + $.ajax({ + url: "/auth-user/api/arms/dashboard/requirements-jira-issue-statuses", + type: "GET", + data: {"pdServiceLink": pdServiceLink, "pdServiceVersionLinks": pdServiceVersionLinks}, + contentType: "application/json;charset=UTF-8", + dataType: "json", + progress: true, + statusCode: { + 200: function (data) { + const issueStatusTypesSet = new Set(); + for (const month in data) { + for (const status in data[month].statuses) { + issueStatusTypesSet.add(status); + } + } + const issueStatusTypes = [...issueStatusTypesSet]; - const issueStatusTypes = ['Open', 'In Progress', '완료됨', 'Backlog', '진행 중', 'Closed', 'Resolved']; - let columnsData = []; + let columnsData = []; - issueStatusTypes.forEach((status) => { - const columnData = [status]; - Object.keys(monthlyData).forEach((month) => { - columnData.push(monthlyData[month].issueStatus[status] || 0); - }); - columnsData.push(columnData); - }); + issueStatusTypes.forEach((status) => { + const columnData = [status]; + for (const month in data) { + const count = data[month].statuses[status] || 0; + columnData.push(count); + } + columnsData.push(columnData); + }); - const requirementCounts = ['요구사항']; - Object.keys(monthlyData).forEach((month) => { - requirementCounts.push(monthlyData[month].requirementCount); + const requirementCounts = ['요구사항']; + for (const month in data) { + requirementCounts.push(data[month].totalRequirements); + } + columnsData.push(requirementCounts); + const chart = c3.generate({ + bindto: '#combination-chart', + data: { + x: 'x', + columns: [ + ['x', ...Object.keys(data)], + ...columnsData, + ], + type: 'bar', + types: { + '요구사항': 'area', + }, + }, + axis: { + x: { + type: 'category', + }, + }, + tooltip: { + format: { + title: function (index) { + const month = Object.keys(data)[index]; + const totalIssues = data[month].totalIssues; + return `${month} | Total : ${totalIssues}`; + }, + }, + } + }); + } + } }); - columnsData.push(requirementCounts); - - const chart = c3.generate({ - bindto: '#combination-chart', - data: { - x: 'x', - columns: [ - ['x', ...Object.keys(monthlyData)], - ...columnsData, - ], - type: 'bar', - types: { - '요구사항': 'area', - }, - }, - axis: { - x: { - type: 'category', - }, - }, - }); } -function getRandomInt(min, max) { - return Math.floor(Math.random() * (max - min + 1)) + min; -} + //mock var graphViewList = [ {