167 lines
5.7 KiB
HTML
167 lines
5.7 KiB
HTML
{% extends "base.html" %}
|
|
{% block content %}
|
|
|
|
<div>
|
|
{{ macros.m_button_group([['globalSettingSaveBtn', '설정 저장']])}}
|
|
{{ macros.m_row_start('5') }}
|
|
{{ macros.m_row_end() }}
|
|
<nav>
|
|
{{ macros.m_tab_head_start() }}
|
|
{{ macros.m_tab_head2('normal', '일반', true) }}
|
|
{{ macros.m_tab_head2('test', '테스트', false) }}
|
|
{{ macros.m_tab_head_end() }}
|
|
</nav>
|
|
<div class="tab-content" id="nav-tabContent">
|
|
{{ macros.m_tab_content_start('normal', true) }}
|
|
<form id='setting' name='setting'>
|
|
{{ macros.setting_input_text_and_buttons('selenium_remote_url', 'Selenium Remote URL', [['selenium_go_btn', 'GO'], ['selenium_manual_go_btn', '매뉴얼']], value=arg['selenium_remote_url'], placeholder='예) http://127.0.0.1:4444/wd/hub', desc=['SJVA에서 Selenium이 필요한 경우 사용할 Remote URL', 'Docker 환경에서 필요하며, Native 환경에서는 실행파일이 SJVA Root/bin/플랫폼 안에 직접 넣어줘야합니다.', 'Native 환경에서도 이 값을 입력하는 경우는 이를 사용합니다.', 'Selenium 공식 Docker 이미지인 경우 /wd/hub를 붙여야합니다.']) }}
|
|
{{ macros.setting_input_textarea('selenium_remote_default_option', '기본 크롬 옵션(Remote)', value=arg['selenium_remote_default_option'], row='3', desc=['구분자 | 또는 엔터']) }}
|
|
{{ macros.setting_input_textarea('selenium_binary_default_option', '기본 크롬 옵션(Binary)', value=arg['selenium_binary_default_option'], row='3', desc=['구분자 | 또는 엔터']) }}
|
|
</form>
|
|
{{ macros.m_tab_content_end() }}
|
|
|
|
{{ macros.m_tab_content_start('test', false) }}
|
|
{{ macros.setting_input_text_and_buttons('tmp_go_url', '테스트 URL', [['selenium_test_btn', 'GO'], ['capture_btn', '화면표시'], ['cookie_btn', '쿠키정보']], value='https://search.daum.net/search?w=tv&q=%EB%82%98%EC%81%9C%20%EB%85%80%EC%84%9D%EB%93%A4%20%3A%20%EC%95%85%EC%9D%98%20%EB%8F%84%EC%8B%9C&irk=78543&irt=tv-program&DA=TVP') }}
|
|
{{ macros.setting_input_text_and_buttons('tmp_daum_capcha', '다음 캡챠', [['tmp_daum_capcha_btn', '캡챠 풀기']], value='') }}
|
|
<div id="image_div"></div>
|
|
{{ macros.m_tab_content_end() }}
|
|
</div><!--tab-content-->
|
|
</div> <!--전체-->
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
var package_name = "{{arg['package_name']}}";
|
|
var sub = "{{arg['sub'] }}";
|
|
|
|
$(document).ready(function(){
|
|
});
|
|
|
|
$("body").on('click', '#selenium_manual_go_btn', function(e){
|
|
e.preventDefault();
|
|
url = "https://soju6jan.com/archives/1380"
|
|
window.open(url, "_blank");
|
|
});
|
|
|
|
$("body").on('click', '#selenium_go_btn', function(e){
|
|
e.preventDefault();
|
|
url = document.getElementById('selenium_remote_url').value
|
|
window.open(url, "_blank");
|
|
});
|
|
|
|
$("body").on('click', '#selenium_test_btn', function(e){
|
|
e.preventDefault();
|
|
url = document.getElementById('tmp_go_url').value
|
|
$.ajax({
|
|
url: '/' + package_name + '/ajax/'+sub+'/selenium_test_go',
|
|
type: "POST",
|
|
cache: false,
|
|
data: {url:url},
|
|
dataType: "json",
|
|
success: function (ret) {
|
|
if (ret == 'success') {
|
|
$.notify('<strong>로딩하였습니다.</strong>', {
|
|
type: 'success'
|
|
});
|
|
} else {
|
|
$.notify('<strong>실패하였습니다.</strong>', {
|
|
type: 'warning'
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
$("body").on('click', '#capture_btn', function(e){
|
|
e.preventDefault();
|
|
url = document.getElementById('tmp_go_url').value
|
|
$.ajax({
|
|
url: '/' + package_name + '/ajax/'+sub+'/capture',
|
|
type: "POST",
|
|
cache: false,
|
|
data: {url:url},
|
|
dataType: "json",
|
|
success: function (data) {
|
|
if (data.ret == 'success') {
|
|
tmp = '<img src="' + data.data + '" class="img-fluid">'
|
|
document.getElementById("image_div").innerHTML = tmp;
|
|
} else {
|
|
$.notify('<strong>실패하였습니다.</strong>', {
|
|
type: 'warning'
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
//, ['full_capture_btn', '전체 캡처 이미지 다운']
|
|
$("body").on('click', '#full_capture_btn', function(e){
|
|
e.preventDefault();
|
|
url = document.getElementById('tmp_go_url').value
|
|
$.ajax({
|
|
url: '/' + package_name + '/ajax/'+sub+'/full_capture',
|
|
type: "POST",
|
|
cache: false,
|
|
data: {url:url},
|
|
dataType: "json",
|
|
success: function (data) {
|
|
if (data.ret == 'success') {
|
|
console.log('xxx')
|
|
tmp = '<img src="' + data.data + '" class="img-fluid">'
|
|
document.getElementById("image_div").innerHTML = tmp;
|
|
} else {
|
|
$.notify('<strong>실패하였습니다.</strong>', {
|
|
type: 'warning'
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
$("body").on('click', '#cookie_btn', function(e){
|
|
e.preventDefault();
|
|
url = document.getElementById('tmp_go_url').value
|
|
$.ajax({
|
|
url: '/' + package_name + '/ajax/'+sub+'/cookie',
|
|
type: "POST",
|
|
cache: false,
|
|
data: {url:url},
|
|
dataType: "json",
|
|
success: function (data) {
|
|
m_modal(data);
|
|
return;
|
|
if (data.ret == 'success') {
|
|
m_modal(data);
|
|
} else {
|
|
$.notify('<strong>실패하였습니다.</strong>', {
|
|
type: 'warning'
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
$("body").on('click', '#tmp_daum_capcha_btn', function(e){
|
|
e.preventDefault();
|
|
daum_capcha = document.getElementById('tmp_daum_capcha').value
|
|
$.ajax({
|
|
url: '/' + package_name + '/ajax/'+sub+'/daum_capcha',
|
|
type: "POST",
|
|
cache: false,
|
|
data: {daum_capcha:daum_capcha},
|
|
dataType: "json",
|
|
success: function (data) {
|
|
if (data.ret == 'success') {
|
|
$.notify('<strong>전달 하였습니다. 페이지 다시 로딩 & 쿠키 정보 확인하여 Site Daum에 입력하세요.</strong>', {
|
|
type: 'success'
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
</script>
|
|
{% endblock %}
|