refactor: clean up debug console logs in queue and setting templates
This commit is contained in:
@@ -27,15 +27,15 @@
|
|||||||
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
console.log(window.location.href)
|
// console.log(window.location.href)
|
||||||
var socket = io.connect(window.location.href);
|
var socket = io.connect(window.location.href);
|
||||||
console.log(socket)
|
// console.log(socket)
|
||||||
socket.on('on_start', (data) => {
|
socket.on('on_start', (data) => {
|
||||||
console.log('on_start().............')
|
// console.log('on_start().............')
|
||||||
console.log(data)
|
// console.log(data)
|
||||||
})
|
})
|
||||||
socket.on('start', function (data) {
|
socket.on('start', function (data) {
|
||||||
console.log('socket start()')
|
// console.log('socket start()')
|
||||||
on_start();
|
on_start();
|
||||||
});
|
});
|
||||||
socket.on('list_refresh', function (data) {
|
socket.on('list_refresh', function (data) {
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
data: {},
|
data: {},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
console.log("on_start():: ", data)
|
// console.log("on_start():: ", data)
|
||||||
current_list_length = data.length;
|
current_list_length = data.length;
|
||||||
make_download_list(data)
|
make_download_list(data)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,10 +35,10 @@
|
|||||||
{{ macros.setting_checkbox('ohli24_auto_mode_all', '에피소드 모두 받기', value=arg['ohli24_auto_mode_all'], desc=['On : 이전 에피소드를 모두 받습니다.', 'Off : 최신 에피소드만 받습니다.']) }}
|
{{ macros.setting_checkbox('ohli24_auto_mode_all', '에피소드 모두 받기', value=arg['ohli24_auto_mode_all'], desc=['On : 이전 에피소드를 모두 받습니다.', 'Off : 최신 에피소드만 받습니다.']) }}
|
||||||
{{ macros.m_tab_content_end() }}
|
{{ macros.m_tab_content_end() }}
|
||||||
|
|
||||||
{# {{ macros.m_tab_content_start('action', false) }}#}
|
{{ macros.m_tab_content_start('action', false) }}
|
||||||
{# {{ macros.setting_button([['global_one_execute_sub_btn', '1회 실행']], left='1회 실행' ) }}#}
|
{{ macros.setting_buttons([['global_one_execute_btn', '1회 실행']], left='1회 실행' ) }}
|
||||||
{# {{ macros.setting_button([['global_reset_db_sub_btn', 'DB 초기화']], left='DB정리' ) }}#}
|
{{ macros.setting_buttons([['global_reset_db_btn', 'DB 초기화']], left='DB정리' ) }}
|
||||||
{# {{ macros.m_tab_content_end() }}#}
|
{{ macros.m_tab_content_end() }}
|
||||||
|
|
||||||
</div><!--tab-content-->
|
</div><!--tab-content-->
|
||||||
</form>
|
</form>
|
||||||
@@ -65,5 +65,48 @@ $("body").on('click', '#go_btn', function(e){
|
|||||||
window.open(url, "_blank");
|
window.open(url, "_blank");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 1회 실행 버튼
|
||||||
|
$("body").on('click', '#global_one_execute_btn', function(e){
|
||||||
|
e.preventDefault();
|
||||||
|
$.ajax({
|
||||||
|
url: '/'+package_name+'/ajax/'+sub+'/immediately_execute',
|
||||||
|
type: "POST",
|
||||||
|
cache: false,
|
||||||
|
dataType: "json",
|
||||||
|
success: function(ret) {
|
||||||
|
if (ret.ret == 'success') {
|
||||||
|
notify('스케줄러 1회 실행을 시작합니다.', 'success');
|
||||||
|
} else {
|
||||||
|
notify(ret.msg || '실행 실패', 'danger');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
notify('에러: ' + error, 'danger');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// DB 초기화 버튼
|
||||||
|
$("body").on('click', '#global_reset_db_btn', function(e){
|
||||||
|
e.preventDefault();
|
||||||
|
if (!confirm('정말 DB를 초기화하시겠습니까?')) return;
|
||||||
|
$.ajax({
|
||||||
|
url: '/'+package_name+'/ajax/'+sub+'/reset_db',
|
||||||
|
type: "POST",
|
||||||
|
cache: false,
|
||||||
|
dataType: "json",
|
||||||
|
success: function(ret) {
|
||||||
|
if (ret.ret == 'success') {
|
||||||
|
notify('DB가 초기화되었습니다.', 'success');
|
||||||
|
} else {
|
||||||
|
notify(ret.msg || '초기화 실패', 'danger');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
notify('에러: ' + error, 'danger');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
Reference in New Issue
Block a user