update
This commit is contained in:
@@ -193,202 +193,14 @@ function streaming_kill(command, data={}) {
|
||||
// Global.. JS 파일로 뺄것
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// 사용 on / off
|
||||
$('#global_scheduler').change(function() {
|
||||
var ret = $(this).prop('checked');
|
||||
$.ajax({
|
||||
url: '/'+package_name+'/ajax/scheduler',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {scheduler : ret},
|
||||
dataType: "json",
|
||||
success: function (list) {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#global_scheduler_sub').change(function() {
|
||||
var ret = $(this).prop('checked');
|
||||
$.ajax({
|
||||
url: '/'+package_name+'/ajax/scheduler',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {scheduler : ret, sub:sub},
|
||||
dataType: "json",
|
||||
success: function (list) {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function global_setting_save_function() {
|
||||
var formData = getFormdata('#setting');
|
||||
$.ajax({
|
||||
url: '/'+package_name+'/ajax/setting_save',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: formData,
|
||||
dataType: "json",
|
||||
success: function (ret) {
|
||||
if (ret) {
|
||||
$.notify('<strong>설정을 저장하였습니다.</strong>', {
|
||||
type: 'success'
|
||||
});
|
||||
} else {
|
||||
$.notify('<strong>설정 저장에 실패하였습니다.</strong>', {
|
||||
type: 'warning'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$("#global_one_execute_btn").click(function(e) {
|
||||
//$("body").on('click', '#one_execute_btn', function(e){
|
||||
e.preventDefault();
|
||||
$.ajax({
|
||||
url: '/' + package_name + '/ajax/one_execute',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: function (ret) {
|
||||
if (ret=='scheduler' || ret=='thread') {
|
||||
$.notify('<strong>작업을 시작하였습니다. ('+ret+')</strong>', {
|
||||
type: 'success'
|
||||
});
|
||||
} else if (ret == 'is_running') {
|
||||
$.notify('<strong>작업중입니다.</strong>', {
|
||||
type: 'warning'
|
||||
});
|
||||
} else {
|
||||
$.notify('<strong>작업 시작에 실패하였습니다.</strong>', {
|
||||
type: 'warning'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#global_one_execute_sub_btn").click(function(e) {
|
||||
//$("body").on('click', '#one_execute_btn', function(e){
|
||||
e.preventDefault();
|
||||
$.ajax({
|
||||
url: '/' + package_name + '/ajax/one_execute',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {sub:sub},
|
||||
dataType: "json",
|
||||
success: function (ret) {
|
||||
if (ret=='scheduler' || ret=='thread') {
|
||||
$.notify('<strong>작업을 시작하였습니다. ('+ret+')</strong>', {
|
||||
type: 'success'
|
||||
});
|
||||
} else if (ret == 'is_running') {
|
||||
$.notify('<strong>작업중입니다.</strong>', {
|
||||
type: 'warning'
|
||||
});
|
||||
} else {
|
||||
$.notify('<strong>작업 시작에 실패하였습니다.</strong>', {
|
||||
type: 'warning'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("body").on('click', '#global_immediately_execute_sub_btn', function(e){
|
||||
e.preventDefault();
|
||||
$.ajax({
|
||||
url: '/' + package_name + '/ajax/immediately_execute',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {sub:sub},
|
||||
dataType: "json",
|
||||
success: function (ret) {
|
||||
if (ret.msg != null) notify(ret.msg, ret.ret);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("body").on('click', '#global_reset_db_btn', function(e){
|
||||
e.preventDefault();
|
||||
document.getElementById("confirm_title").innerHTML = "DB 삭제";
|
||||
document.getElementById("confirm_body").innerHTML = "전체 목록을 삭제 하시겠습니까?";
|
||||
$('#confirm_button').attr('onclick', "global_db_delete();");
|
||||
$("#confirm_modal").modal();
|
||||
return;
|
||||
});
|
||||
|
||||
function global_db_delete() {
|
||||
$.ajax({
|
||||
url: '/' + package_name + '/ajax/reset_db',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data) {
|
||||
$.notify('<strong>삭제하였습니다.</strong>', {
|
||||
type: 'success'
|
||||
});
|
||||
} else {
|
||||
$.notify('<strong>삭제에 실패하였습니다.</strong>',{
|
||||
type: 'warning'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$("body").on('click', '#global_reset_db_sub_btn', function(e){
|
||||
e.preventDefault();
|
||||
document.getElementById("confirm_title").innerHTML = "DB 삭제";
|
||||
document.getElementById("confirm_body").innerHTML = "전체 목록을 삭제 하시겠습니까?";
|
||||
$('#confirm_button').attr('onclick', "global_db_delete_sub();");
|
||||
$("#confirm_modal").modal();
|
||||
return;
|
||||
});
|
||||
|
||||
function global_db_delete_sub() {
|
||||
$.ajax({
|
||||
url: '/' + package_name + '/ajax/reset_db',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {sub:sub},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data) {
|
||||
$.notify('<strong>삭제하였습니다.</strong>', {
|
||||
type: 'success'
|
||||
});
|
||||
} else {
|
||||
$.notify('<strong>삭제에 실패하였습니다.</strong>',{
|
||||
type: 'warning'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function global_sub_request_search(page, move_top=true) {
|
||||
var formData = getFormdata('#form_search')
|
||||
formData += '&page=' + page;
|
||||
$.ajax({
|
||||
url: '/' + package_name + '/ajax/' + sub + '/web_list',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: formData,
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
current_data = data;
|
||||
if (move_top)
|
||||
window.scrollTo(0,0);
|
||||
make_list(data.list)
|
||||
make_page_html(data.paging)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
$("body").on('click', '#global_json_btn', function(e){
|
||||
@@ -438,79 +250,11 @@ $("body").on('click', '#global_remove_btn', function(e) {
|
||||
|
||||
|
||||
|
||||
//#######################################################
|
||||
//플러그인 - 모듈 - 서브 구조하에서 서브 관련 함수
|
||||
|
||||
function global_send_command_sub(command, arg1, arg2, arg3, modal_title, callback) {
|
||||
$.ajax({
|
||||
url: '/' + package_name + '/ajax/' + sub + '/' + sub2 + '/command',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data:{command:command, arg1:arg1, arg2:arg2, arg3},
|
||||
dataType: "json",
|
||||
success: function (ret) {
|
||||
console.log(ret);
|
||||
if (ret.msg != null) notify(ret.msg, ret.ret);
|
||||
if (ret.modal != null) m_modal(ret.modal, modal_title, false);
|
||||
if (ret.json != null) m_modal(ret.json, modal_title, true);
|
||||
if (callback != null) callback(ret);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$("body").on('click', '#global_one_execute_sublogic_btn', function(e){
|
||||
e.preventDefault();
|
||||
$.ajax({
|
||||
url: '/' + package_name + '/ajax/' + sub + '/' + sub2 + '/one_execute',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: function (ret) {
|
||||
if (ret=='scheduler' || ret=='thread') {
|
||||
$.notify('<strong>작업을 시작하였습니다. ('+ret+')</strong>', {
|
||||
type: 'success'
|
||||
});
|
||||
} else if (ret == 'is_running') {
|
||||
$.notify('<strong>작업중입니다.</strong>', {
|
||||
type: 'warning'
|
||||
});
|
||||
} else {
|
||||
$.notify('<strong>작업 시작에 실패하였습니다.</strong>', {
|
||||
type: 'warning'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("body").on('click', '#global_immediately_execute_sublogic_btn', function(e){
|
||||
e.preventDefault();
|
||||
$.ajax({
|
||||
url: '/' + package_name + '/ajax/' + sub + '/' + sub2 + '/immediately_execute',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: function (ret) {
|
||||
if (ret.msg != null) notify(ret.msg, ret.ret);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#global_scheduler_sublogic').change(function() {
|
||||
var ret = $(this).prop('checked');
|
||||
$.ajax({
|
||||
url: '/'+package_name+'/ajax/' + sub + '/' + sub2 + '/scheduler',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {scheduler : ret},
|
||||
dataType: "json",
|
||||
success: function (list) {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -615,50 +359,3 @@ $('#global_scheduler_sublogic').change(function() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 이동한 함수
|
||||
|
||||
|
||||
|
||||
|
||||
function global_send_command(command, data={}) {
|
||||
data['command'] = command;
|
||||
$.ajax({
|
||||
url: '/' + package_name + '/ajax/' + sub + '/command',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data:data,
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
notify(data['msg'], data['ret']);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function global_send_command2(command, arg1, arg2, arg3, modal_title, callback) {
|
||||
$.ajax({
|
||||
url: '/' + package_name + '/ajax/' + sub + '/command',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data:{command:command, arg1:arg1, arg2:arg2, arg3},
|
||||
dataType: "json",
|
||||
success: function (ret) {
|
||||
if (ret.msg != null) notify(ret.msg, ret.ret);
|
||||
if (ret.modal != null) m_modal(ret.modal, modal_title, false);
|
||||
if (ret.json != null) m_modal(ret.json, modal_title, true);
|
||||
if (callback != null) callback(ret);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user