Index: arms/html/searchEngine/content-container.html
===================================================================
diff -u -r41f0377168da94c9ba89d59bc44e655db0d0d31e -r376a8ea83b170ab4d1deb4223f8625f84dd876f7
--- arms/html/searchEngine/content-container.html (.../content-container.html) (revision 41f0377168da94c9ba89d59bc44e655db0d0d31e)
+++ arms/html/searchEngine/content-container.html (.../content-container.html) (revision 376a8ea83b170ab4d1deb4223f8625f84dd876f7)
@@ -41,7 +41,11 @@
{
- let rangeDate = SearchApiModule.getRangeDate();
+ searchRangeType = rangeTypeId; // 검색 레인지 타입아이디
+ SearchApiModule.setRangeDateAsync(rangeTypeId).then(() => {
+ let rangeDate = SearchApiModule.getRangeDate();
+ console.log(rangeDate["start-date"]);
+ console.log(rangeDate["end-date"]);
+
+ let start = (rangeDate["start-date"] ? new Date(rangeDate["start-date"]).toLocaleString('ko-KR', {timeZone: 'Asia/Seoul'}) : "");
+ let end = (rangeDate["end-date"] ? new Date(rangeDate["end-date"]).toLocaleString('ko-KR', {timeZone: 'Asia/Seoul'}) : "");
+ let rangeText = start+ " ~ " + end;
+
+ $("#filter_list").html("");
+ $("#filter_list").append(
+ `
${rangeText}`
+ );
+ if(searchString) {
search_with_date(searchString, rangeDate);
- let start = (rangeDate["start-date"] ? new Date(rangeDate["end-date"]).toLocaleString('ko-KR', {timeZone: 'Asia/Seoul'}) : "");
- let end = (rangeDate["end-date"] ? new Date(rangeDate["end-date"]).toLocaleString('ko-KR', {timeZone: 'Asia/Seoul'}) : "");
- let rangeText = start+ " ~ " + end;
+ }
+ }).catch((error) => {
+ console.error("[searchEngine :: 날짜검색 이벤트리스너] :: 검색 오류 발생 =>", error);
+ });
+ console.log(rangeTypeId);
- $("#filter_list").html("");
- $("#filter_list").append(
- `
${rangeText}`
- );
- }).catch((error) => {
- console.error("[searchEngine :: 날짜검색 이벤트리스너] :: 검색 오류 발생 =>", error);
- });
- console.log(rangeTypeId);
- }
});
+ $("#date-range-group .dropdown-menu li:last").on("click", function (event) {
+ var rangeTypeId = $(event.target).closest("a").attr("id");
+ var rangeText = $("#"+rangeTypeId).text();
+ $("#date-range").text(rangeText); // 드롭다운 타이틀 변경
+
+ $("#date_timepicker_start").val("");
+ $("#date_timepicker_end").val("");
+ });
}
/////////////////////////
@@ -319,4 +334,70 @@
requestPage = 0;
}
search(search_section, requestPage, SearchApiModule.getRangeDate());
+}
+////////////////////////////
+// 검색날짜 기간 설정 세팅
+////////////////////////////
+function datetTimePicker() {
+ $('#date_timepicker_start').datetimepicker({
+ format: 'Y-m-d', // 날짜 및 시간 형식 지정
+ formatDate:'Y/m/d',
+ timepicker: false,
+ theme:'dark',
+ lang: "kr",
+ onSelectTime: function (current_time, $input) {
+ $('#date_timepicker_end').datetimepicker('setOptions', { minDate: current_time });
+ },
+ onShow: function(ct){
+ this.setOptions({
+ maxDate: $('#date_timepicker_end').val() ? $('#date_timepicker_end').val() : false
+ });
+ }
+ });
+ $('#date_timepicker_end').datetimepicker({
+ format: 'Y-m-d', // 날짜 및 시간 형식 지정
+ formatDate:'Y/m/d',
+ timepicker: false,
+ theme:'dark',
+ lang: "kr",
+ onSelectTime: function (current_time, $input) {
+ $('#date_timepicker_start').datetimepicker('setOptions', { maxDate: current_time });
+ },
+ onShow: function(ct){
+ this.setOptions({
+ minDate: $('#date_timepicker_start').val() ? $('#date_timepicker_start').val() : false
+ });
+ }
+ });
+}
+
+////////////////////////////
+// 검색날짜 기간 설정 모달 -
+////////////////////////////
+function customRangeSetting() {
+ console.log("[searchEngine :: customRangeSetting] :: 실행");
+ searchRangeType = "custom-range";
+ SearchApiModule.setRangeDateAsync("custom-range").then(() => {
+ let rangeDate = SearchApiModule.getRangeDate();
+ let start = (rangeDate["start-date"] ? new Date(rangeDate["start-date"]).toLocaleString('ko-KR', {timeZone: 'Asia/Seoul'}) : "");
+ let end = (rangeDate["end-date"] ? new Date(rangeDate["end-date"]).toLocaleString('ko-KR', {timeZone: 'Asia/Seoul'}) : "");
+ let rangeText = start+ " ~ " + end;
+ $("#filter_list").html("");
+ $("#filter_list").append(
+ `
${rangeText}`
+ );
+ if(!searchString) {
+ let searchTerm = $("#search-input").val();
+ if(searchTerm && searchTerm.trim()) {
+ let 검색어 = searchTerm.trim();
+ searchString = 검색어;
+ }
+ }
+ if(searchString) {
+ console.log("[searchEngine :: customRangeSetting] :: searchString => " + searchString);
+ search_with_date(searchString, rangeDate);
+ }
+ }).catch((error) => {
+ console.error("[searchEngine :: 날짜검색 이벤트리스너] :: 검색 오류 발생 =>", error);
+ });
}
\ No newline at end of file
Index: arms/js/searchEngine/searchApiModule.js
===================================================================
diff -u -r41f0377168da94c9ba89d59bc44e655db0d0d31e -r376a8ea83b170ab4d1deb4223f8625f84dd876f7
--- arms/js/searchEngine/searchApiModule.js (.../searchApiModule.js) (revision 41f0377168da94c9ba89d59bc44e655db0d0d31e)
+++ arms/js/searchEngine/searchApiModule.js (.../searchApiModule.js) (revision 376a8ea83b170ab4d1deb4223f8625f84dd876f7)
@@ -18,10 +18,9 @@
console.log("[searchApiModule :: setRangeDate] :: today.ISOString => " + today.toISOString());
switch (rangeTypeId) {
- case "custom-range" : //일단 올타임으로 설정.
- //custom-range 일 경우만 end-date설정
- searchRagneDate["start-date"] = null; // 변경필요.
- searchRagneDate["end-date"] = today_ISOString; // 변경필요.
+ case "custom-range" :
+ searchRagneDate["start-date"] = $("#date_timepicker_start").val();
+ searchRagneDate["end-date"] = ($("#date_timepicker_end").val() === null ? today.toISOString() : $("#date_timepicker_end").val());
break;
case "all-time":
searchRagneDate["start-date"] = null;
@@ -176,7 +175,7 @@
let highlightFields_string = (highlight_stringify === "" ? " - " : highlight_stringify);
let timestamp_kst = new Date(content["content"]["timestamp"]).toLocaleString('ko-KR',{timeZone: 'Asia/Seoul'});
$("#jiraissue_section .search_result_group .search_result_items").append(
- `
+ `
@@ -225,7 +224,7 @@
let highlightFields_string = (highlight_stringify === "" ? content["content"]["log"] : highlight_stringify);
let timestamp_kst = new Date(content["content"]["timestamp"]).toLocaleString('ko-KR',{timeZone: 'Asia/Seoul'});
$("#log_section .search_result_group .search_result_items").append(
- `