Index: arms/js/analysis/api/resourceApi.js
===================================================================
diff -u -r126fb276ada1d9ccefb28c45df952d00a787f98a -r9417989facba42fb2010b87030b6d99f3ddf609e
--- arms/js/analysis/api/resourceApi.js (.../resourceApi.js) (revision 126fb276ada1d9ccefb28c45df952d00a787f98a)
+++ arms/js/analysis/api/resourceApi.js (.../resourceApi.js) (revision 9417989facba42fb2010b87030b6d99f3ddf609e)
@@ -60,7 +60,6 @@
url: "/auth-user/api/arms/analysis/resource/workerStatus/"+pdservice_id,
type: "GET",
data: { "서비스아이디" : pdservice_id,
- //"메인그룹필드" : "assignee.assignee_displayName.keyword",
"메인그룹필드" : "assignee.assignee_emailAddress.keyword",
"하위그룹필드들": "isReq,status.status_name.keyword",
"컨텐츠보기여부" : true,
@@ -74,9 +73,7 @@
200: function (data) {
console.log("=== === === 작업자 상태 집계 시작=== === ===")
console.log(data);
- let search_keys1 = data["검색결과"]["group_by_assignee.assignee_displayName.keyword"];
let search_keys2 = data["검색결과"]["group_by_assignee.assignee_emailAddress.keyword"];
- console.log(search_keys1);
console.log("=== === === 작업자 상태 집계 종료=== === ===")
//fetchedResourceData = data["검색결과"]["group_by_assignee.assignee_displayName.keyword"];
Index: arms/js/analysis/resource/chart/horizontalBarChart.js
===================================================================
diff -u
--- arms/js/analysis/resource/chart/horizontalBarChart.js (revision 0)
+++ arms/js/analysis/resource/chart/horizontalBarChart.js (revision 9417989facba42fb2010b87030b6d99f3ddf609e)
@@ -0,0 +1,93 @@
+
+function exampleHorizontalBarChart() {
+ var chartDom = document.getElementById('main');
+ var myChart = echarts.init(chartDom);
+ var option;
+
+ option = {
+ title: {
+ text: 'World Population'
+ },
+ tooltip: {
+ trigger: 'axis',
+ axisPointer: {
+ type: 'shadow'
+ }
+ },
+ legend: {},
+ grid: {
+ left: '3%',
+ right: '4%',
+ bottom: '3%',
+ containLabel: true
+ },
+ xAxis: {
+ type: 'value',
+ boundaryGap: [0, 0.03]
+ },
+ yAxis: {
+ type: 'category',
+ data: [
+ '우선순위-보류',
+ '우선순위-미비',
+ '우선순위-하',
+ '우선순위-중',
+ '우선순위-상',
+ '누적' // 총합을 넣자. total.
+ ]
+ },
+ series: [
+ {
+ name: '양형석', // 사람 넣고
+ type: 'bar',
+ data: [18203, 23489, 29034, 104970, 131744, 630230] // 각 하위목록별 값 넣고
+ },
+ {
+ name: '문용민',
+ type: 'bar',
+ data: [19325, 23438, 31000, 121594, 134141, 681807]
+ }
+ ]
+ };
+
+ option && myChart.setOption(option);
+}
+
+function drawHorizontalBarChart(target,yAxisDataArr,seriesArr) {
+ var chartDom = document.getElementById(target);
+ var myChart = echarts.init(chartDom);
+ var option;
+
+ option = {
+ title: {
+ text: ''
+ },
+ tooltip: {
+ trigger: 'axis',
+ axisPointer: {
+ type: 'shadow'
+ }
+ },
+ legend: {},
+ grid: {
+ left: '3%',
+ right: '4%',
+ bottom: '3%',
+ containLabel: true
+ },
+ xAxis: {
+ type: 'value',
+ boundaryGap: [0, 0.03]
+ },
+ yAxis: {
+ type: 'category',
+ data: yAxisDataArr
+ },
+ series: seriesArr
+ };
+
+ myChart.setOption(option);
+
+ return myChart;
+}
+
Index: arms/js/analysis/table/workerStatusTable.js
===================================================================
diff -u -rb26fb664c84317283a1963ffa0eaf28993ff8caf -r9417989facba42fb2010b87030b6d99f3ddf609e
--- arms/js/analysis/table/workerStatusTable.js (.../workerStatusTable.js) (revision b26fb664c84317283a1963ffa0eaf28993ff8caf)
+++ arms/js/analysis/table/workerStatusTable.js (.../workerStatusTable.js) (revision 9417989facba42fb2010b87030b6d99f3ddf609e)
@@ -168,7 +168,10 @@
} else {
var _render =
'
' +
- '
';
return _render;
}
Index: arms/js/analysisResource.js
===================================================================
diff -u -re54369317eccd233348a857109005cc3df7e1a26 -r9417989facba42fb2010b87030b6d99f3ddf609e
--- arms/js/analysisResource.js (.../analysisResource.js) (revision e54369317eccd233348a857109005cc3df7e1a26)
+++ arms/js/analysisResource.js (.../analysisResource.js) (revision 9417989facba42fb2010b87030b6d99f3ddf609e)
@@ -52,6 +52,7 @@
"js/analysis/api/resourceApi.js",
"js/analysis/table/workerStatusTable.js",
//"js/analysis/table/workerDetailInfoTable.js"
+ "js/analysis/resource/chart/horizontalBarChart.js"
],
[ "../reference/jquery-plugins/dataTables-1.10.16/media/css/jquery.dataTables_lightblue4.css",
@@ -559,3 +560,123 @@
}
});
}
+function refreshDetailChart() { // 차트8개 초기화
+ let req_targets = ["req-priority-bar","req-status-bar","req-issuetype-bar","req-resolution-bar"];
+ let sub_targets = ["subtask-priority-bar","subtask-status-bar","subtask-issuetype-bar","subtask-resolution-bar"];
+ req_targets.forEach((targetId) => { $("#"+targetId).html(""); });
+ sub_targets.forEach((targetId) => { $("#"+targetId).html(""); });
+}
+
+function getDetailCharts(pdservice_id, pdServiceVersionLinks, mailAddressList) {
+ let facDic = [
+ { "field" : "priority.priority_name.keyword", "reqId" : "req-priority-bar", "subId" :"subtask-priority-bar"},
+ { "field" : "status.status_name.keyword", "reqId" : "req-status-bar", "subId" :"subtask-status-bar"},
+ { "field" : "issuetype.issuetype_name.keyword", "reqId" : "req-issuetype-bar", "subId" :"subtask-issuetype-bar"},
+ { "field" : "resolution.resolution_name.keyword", "reqId" : "req-resolution-bar", "subId" :"subtask-resolution-bar"}
+ ];
+
+ facDic.forEach(
+ (target, index) => {
+ drawChartsPerPersion(pdservice_id,pdServiceVersionLinks,mailAddressList, target["field"], target["reqId"], target["subId"]);
+ }
+ )
+}
+
+function drawChartsPerPersion(pdservice_id, pdServiceVersionLinks, mailAddressList, targetField, targetReqId, targetSubtaskId) {
+ let _url = "/auth-user/api/arms/analysis/resource/normal-versionAndMail-filter/"+pdservice_id;
+ console.log('isReq,'+targetField);
+ $.ajax({
+ url: _url,
+ type: "GET",
+ data: { "서비스아이디" : pdservice_id,
+ "mailAddressList" : mailAddressList,
+ "메인그룹필드" : 'assignee.assignee_emailAddress.keyword',
+ "하위그룹필드들": 'isReq,'+targetField,
+ "컨텐츠보기여부" : true,
+ "크기" : 1000,
+ "하위크기": 1000,
+ "pdServiceVersionLinks" : pdServiceVersionLinks},
+ contentType: "application/json;charset=UTF-8",
+ dataType: "json",
+ progress: true,
+ statusCode: {
+ 200: function (data) {
+ console.log("=== === === getReqAndIssueDetailPerPersion 시작=== === ===")
+ console.log(data);
+ let set1 = new Set();
+ let set2 = new Set();
+
+ let yAxisDataArr_req =[];
+ let yAxisDataArr_subtask = [];
+
+ let seriesArr_req = [];
+ let seriesArr_subtask = [];
+ let dic_1 = {
+ name: "",
+ type: "bar",
+ data: []
+ };
+ let searchDepth1 = data["검색결과"]["group_by_assignee.assignee_emailAddress.keyword"];
+ if (searchDepth1.length !== 0) {
+ for (let i = 0; i
{
+ set1.add(target["필드명"]);
+ seriesDic_req["data"].push(target["개수"]);
+ });
+ }
+ }
+ if (searchDepth1_sub[j]["필드명"] === "false") { //연결이슈
+ let subTaskCnt = searchDepth1_sub[j]["개수"]; // 연결이슈 개수
+ if (subTaskCnt !== 0) {
+ let priorityArr = searchDepth1_sub[j]["하위검색결과"]["group_by_"+targetField];
+ priorityArr.forEach((target, index) => {
+ set2.add(target["필드명"]);
+ seriesDic_subtask["data"].push(target["개수"]);
+ });
+ }
+ }
+ }
+ }
+ seriesArr_req.push(seriesDic_req);
+ seriesArr_subtask.push(seriesDic_subtask);
+ }
+
+ }
+ //setToList
+ set1.forEach((e)=>{yAxisDataArr_req.push(e)});
+ set2.forEach((e)=>{yAxisDataArr_subtask.push(e)});
+ //drawChart
+ drawHorizontalBarChart(targetReqId,yAxisDataArr_req,seriesArr_req);
+ drawHorizontalBarChart(targetSubtaskId,yAxisDataArr_subtask,seriesArr_subtask);
+
+ }
+ }
+ });
+}
+
+function getIdFromMail (param) {
+ var full_str = param;
+ var indexOfAt = full_str.indexOf('@');
+ return full_str.substring(0,indexOfAt);
+}
\ No newline at end of file