Index: reference/jquery-plugins/select2-4.0.13/src/scss/theme/default/layout.scss =================================================================== diff -u -raecefeabc79f6e368b3817187af7954ff86ece24 -rd7b807f3e200ee4ea332afe59b6112c561d486ea --- reference/jquery-plugins/select2-4.0.13/src/scss/theme/default/layout.scss (.../layout.scss) (revision aecefeabc79f6e368b3817187af7954ff86ece24) +++ reference/jquery-plugins/select2-4.0.13/src/scss/theme/default/layout.scss (.../layout.scss) (revision d7b807f3e200ee4ea332afe59b6112c561d486ea) @@ -175,16 +175,71 @@ }); } -// --- jstree 설정 -- // +// --- dataTable build 설정 --- // +function dataTableBuild(jQueryElementID, serviceNameForURL, columnList, rowsGroupList = null){ + + console.log("dataTableBuild :: jQueryElementID -> " + jQueryElementID + ", serviceNameForURL -> " + serviceNameForURL); + console.log("dataTableBuild :: columnList -> " + columnList + ", rowsGroupList -> " + rowsGroupList); + + console.log("dataTableBuild :: href: " + $(location).attr("href")); + console.log("dataTableBuild :: protocol: " + $(location).attr("protocol")); + console.log("dataTableBuild :: host: " + $(location).attr("host")); + console.log("dataTableBuild :: pathname: " + $(location).attr("pathname")); + console.log("dataTableBuild :: search: " + $(location).attr("search")); + console.log("dataTableBuild :: hostname: " + $(location).attr("hostname")); + console.log("dataTableBuild :: port: " + $(location).attr("port")); + + var authCheckURL = "/auth-user"; + + var tempDataTable = $(jQueryElementID).DataTable({ + ajax: { + url: authCheckURL + "/api/arms/" + serviceNameForURL +"/getMonitor.do", + dataSrc: "", + }, + destroy: true, + processing: true, + responsive: false, + columns: columnList, + rowsGroup: rowsGroupList, + columnDefs: [ + { + targets: -1, + className: "dt-body-left", + }, + ], + }); + + $(jQueryElementID + " tbody").on("click", "tr", function () { + + if ($(this).hasClass("selected")) { + $(this).removeClass("selected"); + } else { + tempDataTable.$("tr.selected").removeClass("selected"); + $(this).addClass("selected"); + } + + $("#versionContents").html(""); + var data = tempDataTable.row(this).data(); + selectId = data.c_id; + selectName = data.c_title; + console.log(data.c_id); + dataLoad(data.c_id, data.c_title); + }); +} + +// --- jstree build 설정 -- // function jsTreeBuild(jQueryElementID, serviceNameForURL) { - console.log("href: " + $(location).attr("href")); - console.log("protocol: " + $(location).attr("protocol")); - console.log("host: " + $(location).attr("host")); - console.log("pathname: " + $(location).attr("pathname")); - console.log("search: " + $(location).attr("search")); - console.log("hostname: " + $(location).attr("hostname")); - console.log("port: " + $(location).attr("port")); + console.log("jsTreeBuild :: jQueryElementID -> " + jQueryElementID + ", serviceNameForURL -> "+ serviceNameForURL); + + console.log("jsTreeBuild :: href: " + $(location).attr("href")); + console.log("jsTreeBuild :: protocol: " + $(location).attr("protocol")); + console.log("jsTreeBuild :: host: " + $(location).attr("host")); + console.log("jsTreeBuild :: pathname: " + $(location).attr("pathname")); + console.log("jsTreeBuild :: search: " + $(location).attr("search")); + console.log("jsTreeBuild :: hostname: " + $(location).attr("hostname")); + console.log("jsTreeBuild :: port: " + $(location).attr("port")); + var authCheckURL = "/auth-user"; $(jQueryElementID) Index: arms/js/pdServiceVersion.js =================================================================== diff -u -rd4cc210eef3c63f46a7de2e7f2d96b3099520225 -rd7b807f3e200ee4ea332afe59b6112c561d486ea --- arms/js/pdServiceVersion.js (.../pdServiceVersion.js) (revision d4cc210eef3c63f46a7de2e7f2d96b3099520225) +++ arms/js/pdServiceVersion.js (.../pdServiceVersion.js) (revision d7b807f3e200ee4ea332afe59b6112c561d486ea) @@ -13,7 +13,13 @@ // --- 데이터 테이블 설정 --- // $(function () { - jstreeDataTableReload(); + var columnList = [ + { data: "c_id" }, + { data: "c_title" }, + ]; + dataTableBuild("#pdserviceTable","pdservice", columnList); + + //datatable 좌상단 datarow combobox style $(".dataTables_length").find("select:eq(0)").addClass("darkBack"); $(".dataTables_length").find("select:eq(0)").css("min-height", "30px"); //min-height: 30px;