Index: arms/html/analysisResource/content-container.html
===================================================================
diff -u -rb1f2c9bb9dd8fa02a52db9fba726ef4464a26da9 -r76bdf2a3d21da046a0045f84be1194f7fb4d34f5
--- arms/html/analysisResource/content-container.html (.../content-container.html) (revision b1f2c9bb9dd8fa02a52db9fba726ef4464a26da9)
+++ arms/html/analysisResource/content-container.html (.../content-container.html) (revision 76bdf2a3d21da046a0045f84be1194f7fb4d34f5)
@@ -573,46 +573,46 @@
제품 버전 별 작업자
-
제품 및 버전에 투입된 작업자 (Top 5)
+
+
+
요구사항 관여도 트리맵
+
+
+
+
+
+
작업자별 업무 상세는 아래 체크박스
@@ -1644,3 +1678,7 @@
+
+
\ No newline at end of file
Index: arms/html/analysisResource/modal/content-modal.html
===================================================================
diff -u
--- arms/html/analysisResource/modal/content-modal.html (revision 0)
+++ arms/html/analysisResource/modal/content-modal.html (revision 76bdf2a3d21da046a0045f84be1194f7fb4d34f5)
@@ -0,0 +1,363 @@
+
+
+
+
\ No newline at end of file
Index: arms/js/analysisResource.js
===================================================================
diff -u -rbb25676959dd44d369d5846ff74d5634dcedc9e1 -r76bdf2a3d21da046a0045f84be1194f7fb4d34f5
--- arms/js/analysisResource.js (.../analysisResource.js) (revision bb25676959dd44d369d5846ff74d5634dcedc9e1)
+++ arms/js/analysisResource.js (.../analysisResource.js) (revision 76bdf2a3d21da046a0045f84be1194f7fb4d34f5)
@@ -18,7 +18,8 @@
function execDocReady() {
var pluginGroups = [
- [ "../reference/light-blue/lib/vendor/jquery.ui.widget.js",
+ [
+ "../reference/light-blue/lib/vendor/jquery.ui.widget.js",
"../reference/light-blue/lib/vendor/http_blueimp.github.io_JavaScript-Templates_js_tmpl.js",
"../reference/light-blue/lib/vendor/http_blueimp.github.io_JavaScript-Load-Image_js_load-image.js",
"../reference/light-blue/lib/vendor/http_blueimp.github.io_JavaScript-Canvas-to-Blob_js_canvas-to-blob.js",
@@ -33,16 +34,17 @@
// Apache Echarts
"../reference/jquery-plugins/echarts-5.4.3/dist/echarts.min.js",
],
-
- [ "../reference/jquery-plugins/select2-4.0.2/dist/css/select2_lightblue4.css",
+ [
+ "../reference/jquery-plugins/select2-4.0.2/dist/css/select2_lightblue4.css",
"../reference/jquery-plugins/lou-multi-select-0.9.12/css/multiselect-lightblue4.css",
"../reference/jquery-plugins/multiple-select-1.5.2/dist/multiple-select-bluelight.css",
"../reference/jquery-plugins/select2-4.0.2/dist/js/select2.min.js",
"../reference/jquery-plugins/lou-multi-select-0.9.12/js/jquery.quicksearch.js",
"../reference/jquery-plugins/lou-multi-select-0.9.12/js/jquery.multi-select.js",
- "../reference/jquery-plugins/multiple-select-1.5.2/dist/multiple-select.min.js"],
-
- [ "../reference/jquery-plugins/datetimepicker-2.5.20/build/jquery.datetimepicker.min.css",
+ "../reference/jquery-plugins/multiple-select-1.5.2/dist/multiple-select.min.js"
+ ],
+ [
+ "../reference/jquery-plugins/datetimepicker-2.5.20/build/jquery.datetimepicker.min.css",
"../reference/light-blue/lib/bootstrap-datepicker.js",
"../reference/jquery-plugins/datetimepicker-2.5.20/build/jquery.datetimepicker.full.min.js",
"../reference/lightblue4/docs/lib/widgster/widgster.js",
@@ -53,19 +55,21 @@
"./js/common/chart/others/treemap.js",
// 제품-버전-투입인력 차트
"../reference/jquery-plugins/d3-sankey-v0.12.3/d3-sankey.min.js",
+ "./js/common/chart/d3/sankey.js",
// 최상단 메뉴
- "js/analysis/topmenu/topMenuApi.js",
+ "./js/analysis/topmenu/topMenuApi.js",
"./js/common/chart/eCharts/basicRadar.js"
],
[
- "js/common/table.js",
- "js/analysis/api/resourceApi.js",
- "js/analysis/table/workerStatusTable.js",
+ "./js/common/table.js",
+ "./js/analysis/api/resourceApi.js",
+ "./js/analysis/table/workerStatusTable.js",
"./js/common/chart/eCharts/horizontalBarChart.js",
- "./js/common/chart/eCharts/simplePie.js",
+ "./js/common/chart/eCharts/simplePie.js"
],
- [ "../reference/jquery-plugins/dataTables-1.10.16/media/css/jquery.dataTables_lightblue4.css",
+ [
+ "../reference/jquery-plugins/dataTables-1.10.16/media/css/jquery.dataTables_lightblue4.css",
"../reference/jquery-plugins/dataTables-1.10.16/extensions/Responsive/css/responsive.dataTables_lightblue4.css",
"../reference/jquery-plugins/dataTables-1.10.16/extensions/Select/css/select.dataTables_lightblue4.css",
"../reference/jquery-plugins/dataTables-1.10.16/media/js/jquery.dataTables.min.js",
@@ -77,8 +81,7 @@
"../reference/jquery-plugins/dataTables-1.10.16/extensions/Buttons/js/buttons.print.js",
"../reference/jquery-plugins/dataTables-1.10.16/extensions/Buttons/js/jszip.min.js",
"../reference/jquery-plugins/jQCloud-2.0.3/dist/jqcloud.js",
- "../reference/jquery-plugins/jQCloud-2.0.3/dist/jqcloud.css",
- "./js/common/chart/d3/sankey.js"
+ "../reference/jquery-plugins/jQCloud-2.0.3/dist/jqcloud.css"
]
// 추가적인 플러그인 그룹들을 이곳에 추가하면 됩니다.
];
@@ -111,6 +114,9 @@
//버전 멀티 셀렉트 박스 이니시에이터
makeVersionMultiSelectBox();
+
+ // 전체보기 관련 이벤트 세팅
+ 전체보기_관련_이벤트();
//데이터테이블초기화
table = initTable();
@@ -127,7 +133,6 @@
}
-
// 우하단 StackedHorizontalBar
function stackedHorizontalBar(){
// 0 or ""
@@ -347,9 +352,9 @@
});
} // end makePdServiceSelectBox()
-////////////////////
-//버전 멀티 셀렉트 박스
-////////////////////
+////////////////////////////////////////////////////////////
+//버전 멀티 셀렉트 박스 (버전 옵션 선택 시)
+////////////////////////////////////////////////////////////
function makeVersionMultiSelectBox() {
//버전 선택시 셀렉트 박스 이니시에이터
$(".multiple-select").multipleSelect({
@@ -382,7 +387,8 @@
drawResource(selectedPdServiceId, selectedVersionId);
// 샌키
- drawProductToManSankeyChart($("#selected_pdService").val(), selectedVersionId);
+ drawProductToManSankeyChart($("#selected_pdService").val(), selectedVersionId , "chart-product-manpower",5);
+ $("#btn_modal_sankey").click();
drawManRequirementTreeMapChart($("#selected_pdService").val(), selectedVersionId);
stackedHorizontalBar();
wordCloud();
@@ -395,45 +401,9 @@
});
}
-function wordCloud() {
- $('#tag-cloud').jQCloud('destroy');
-
- const url = new UrlBuilder()
- .setBaseUrl(`/auth-admin/api/arms/analysis/resource/aggregation/flat`)
- .addQueryParam('pdServiceLink', selectedPdServiceId)
- .addQueryParam('pdServiceVersionLinks', selectedVersionId)
- .addQueryParam('메인그룹필드', "assignee.assignee_accountId.keyword")
- .addQueryParam('하위그룹필드들', "assignee.assignee_displayName.keyword")
- .addQueryParam('크기', 1000)
- .addQueryParam('하위크기', 1000)
- .addQueryParam('컨텐츠보기여부', true)
- .addQueryParam("isReqType", "ISSUE")
- .build();
-
- $.ajax({
- url: url,
- type: "GET",
- contentType: "application/json;charset=UTF-8",
- dataType: "json",
- progress: true,
- async: false,
- statusCode: {
- 200: function (apiResponse) {
- const data = apiResponse.response;
- let words = data['검색결과']["group_by_assignee.assignee_accountId.keyword"].map(item => ({
- text: item["하위검색결과"]["group_by_assignee.assignee_displayName.keyword"][0]["필드명"],
- weight: item["하위검색결과"]["group_by_assignee.assignee_displayName.keyword"][0]["개수"]
- }));
-
- $('#tag-cloud').jQCloud(words);
- }
- }
- });
-
-
-
-}
-
+////////////////////////////////////////////////////////////
+// 제품서비스 - 버전 데이터 바인딩 (제품 선택 시)
+////////////////////////////////////////////////////////////
function bind_VersionData_By_PdService() {
$(".multiple-select option").remove();
$.ajax({
@@ -465,7 +435,7 @@
// 작업자별 상태 - dataTable
drawResource(selectedPdServiceId, selectedVersionId);
- drawProductToManSankeyChart(selectedPdServiceId, selectedVersionId);
+ drawProductToManSankeyChart(selectedPdServiceId, selectedVersionId, "chart-product-manpower", 5);
drawManRequirementTreeMapChart(selectedPdServiceId, selectedVersionId);
stackedHorizontalBar();
wordCloud();
@@ -483,6 +453,99 @@
});
}
+////////////////////////////////////////////////////////////////////////////////////////
+// 전체보기 클릭 및 모달 동작 이벤트
+////////////////////////////////////////////////////////////////////////////////////////
+function 전체보기_관련_이벤트() {
+ // 테스트용
+ $("#btn_modal_sankey").on("click", function() {
+ let serId = 22;
+ let verList = [33,35,36,37,46,55,59,61,74];
+ let verListSplit = verList.join(",");
+ let tarId = "modal_chart";
+ drawProductToManSankeyChart(serId, verListSplit, tarId, 10000);
+ });
+
+ // 모달이 띄워졌을 때 동작.
+ $('#analysis_modal_sankey').on('shown.bs.modal', function () {
+ // let serId = 22; let verList = [33,35,36,37,46,55,59,61,74]; let verListSplit = verList.join(",");
+ let tarId = "modal_chart";
+ if (selectedVersionId) {
+ drawProductToManSankeyChart(selectedPdServiceId, selectedVersionId, tarId, 10000);
+ } else {
+ jError("서비스 및 버전을 설정 후 선택해주세요.");
+ }
+
+ });
+
+ $('a[data-toggle="tab"]').on("shown.bs.tab", function (e) {
+ var target = $(e.target).attr("href"); // activated tab
+ console.log(target);
+
+ if(target === "#chart_data") {
+ let tarId = "modal_chart";
+ if (selectedVersionId) {
+ drawProductToManSankeyChart(selectedPdServiceId, selectedVersionId, tarId, 10000);
+ } else {
+ jError("서비스 및 버전을 설정 후 선택해주세요.");
+ }
+ } else if (target === "#excel_data") {
+
+ } else if (target === "#option_toggle") {
+ $(".option_tab").removeClass("active");
+ e.preventDefault();
+ if ($(".modal-body-main").hasClass("col-lg-12")) {
+ $(".modal-body-main").removeClass("col-lg-12").addClass("col-lg-9");
+ $(".modal-body-option").removeClass("hidden");
+ } else {
+ $(".modal-body-main").removeClass("col-lg-9").addClass("col-lg-12");
+ $(".modal-body-option").addClass("hidden");
+ }
+
+ }
+ });
+}
+
+/////////////////////////////////////////
+// wordCloud
+/////////////////////////////////////////
+function wordCloud() {
+ $('#tag-cloud').jQCloud('destroy');
+
+ const url = new UrlBuilder()
+ .setBaseUrl(`/auth-admin/api/arms/analysis/resource/aggregation/flat`)
+ .addQueryParam('pdServiceLink', selectedPdServiceId)
+ .addQueryParam('pdServiceVersionLinks', selectedVersionId)
+ .addQueryParam('메인그룹필드', "assignee.assignee_accountId.keyword")
+ .addQueryParam('하위그룹필드들', "assignee.assignee_displayName.keyword")
+ .addQueryParam('크기', 1000)
+ .addQueryParam('하위크기', 1000)
+ .addQueryParam('컨텐츠보기여부', true)
+ .addQueryParam("isReqType", "ISSUE")
+ .build();
+
+ $.ajax({
+ url: url,
+ type: "GET",
+ contentType: "application/json;charset=UTF-8",
+ dataType: "json",
+ progress: true,
+ async: false,
+ statusCode: {
+ 200: function (apiResponse) {
+ const data = apiResponse.response;
+ let words = data['검색결과']["group_by_assignee.assignee_accountId.keyword"].map(item => ({
+ text: item["하위검색결과"]["group_by_assignee.assignee_displayName.keyword"][0]["필드명"],
+ weight: item["하위검색결과"]["group_by_assignee.assignee_displayName.keyword"][0]["개수"]
+ }));
+
+ $('#tag-cloud').jQCloud(words);
+ }
+ }
+ });
+
+}
+
// 데이터 테이블 구성 이후 꼭 구현해야 할 메소드 : 열 클릭시 이벤트
function dataTableClick(tempDataTable, selectedData) {
console.log(selectedData);
Index: arms/js/common/chart/d3/sankey.js
===================================================================
diff -u -rbb25676959dd44d369d5846ff74d5634dcedc9e1 -r76bdf2a3d21da046a0045f84be1194f7fb4d34f5
--- arms/js/common/chart/d3/sankey.js (.../sankey.js) (revision bb25676959dd44d369d5846ff74d5634dcedc9e1)
+++ arms/js/common/chart/d3/sankey.js (.../sankey.js) (revision 76bdf2a3d21da046a0045f84be1194f7fb4d34f5)
@@ -1,15 +1,27 @@
-var SankeyChart = (function ($) {
+var SankeyChart = (
+ function ($) {
"use strict";
+ var target = {
+ "$targetId": "", // jQuery :: $ + targetId
+ "targetId" : "" // targetId :: 차트를 그릴 element id
+ };
+
+ var setTarget = function (targetElementId) {
+ target.$targetId = "#" + targetElementId;
+ target.targetId = targetElementId;
+ };
+
var initSvg = function () {
var margin = { top: 10, right: 10, bottom: 10, left: 10 };
- var width = document.getElementById("chart-product-manpower").offsetWidth;
- var height = document.getElementById("chart-product-manpower").offsetHeight - margin.top - margin.bottom;
+ var width = document.getElementById(target.targetId).offsetWidth;
+ var height = document.getElementById(target.targetId).offsetHeight - margin.top - margin.bottom;
+
var vx = width + margin.left + margin.right;
var vy = height + margin.top + margin.bottom;
return d3
- .select("#chart-product-manpower") // 그려지는 위치
+ .select(target.$targetId) // 그려지는 위치
.append("svg")
.attr("viewBox", "0 0 " + vx + " " + vy)
.attr("width", width)
@@ -20,7 +32,7 @@
var drawEmptyChart = function () {
var margin = { top: 10, right: 10, bottom: 10, left: 10 };
- var width = document.getElementById("chart-product-manpower").offsetWidth - margin.left - margin.right;
+ var width = document.getElementById(target.targetId).offsetWidth - margin.left - margin.right;
var height = 500 - margin.top - margin.bottom;
initSvg()
@@ -33,9 +45,12 @@
.attr("y", height / 2);
};
- var loadChart = function (data) {
+ var loadChart = function (data, targetElementId) {
+ if(targetElementId) {
+ setTarget(targetElementId);
+ }
var margin = { top: 10, right: 10, bottom: 10, left: 10 };
- var width = document.getElementById("chart-product-manpower").offsetWidth - margin.left - margin.right;
+ var width = document.getElementById(target.targetId).offsetWidth - margin.left - margin.right;
var height = 500 - margin.top - margin.bottom;
var formatNumber = d3.format(",.0f");
@@ -211,9 +226,11 @@
////////////////////////////////////////////////////////////////////////////////////////
// 제품-버전-투입인력 차트 생성
////////////////////////////////////////////////////////////////////////////////////////
-function drawProductToManSankeyChart(pdServiceLink, pdServiceVersionLinks) {
+function drawProductToManSankeyChart(pdServiceLink, pdServiceVersionLinks, targetId, 하위크기) {
+ let $target = "#"+targetId;
+
function removeSankeyChart() {
- const svgElement = d3.select("#chart-product-manpower").select("svg");
+ const svgElement = d3.select($target).select("svg");
if (!svgElement.empty()) {
svgElement.remove();
}
@@ -226,7 +243,7 @@
.addQueryParam('메인그룹필드', "pdServiceVersions")
.addQueryParam('하위그룹필드들', "assignee.assignee_accountId.keyword,assignee.assignee_displayName.keyword")
.addQueryParam('크기', pdServiceVersionLinks.split(",").length)
- .addQueryParam('하위크기', 5)
+ .addQueryParam('하위크기', 하위크기)
.addQueryParam("isReqType", "ISSUE")
.addQueryParam('컨텐츠보기여부', true)
.build();
@@ -241,7 +258,7 @@
200: function (apiResponse) {
removeSankeyChart();
const data = apiResponse.response;
- SankeyChart.loadChart(data);
+ SankeyChart.loadChart(data, targetId);
}
}
});