let iframe = Ext.get('_export_dp_query_window') || new Ext.Template('<iframe id ="_export_dp_query_window" name="_export_dp_query_window" style="position:absolute;left:-1000px;top:-1000px;width:1px;height:1px;display:none"></iframe>').insertFirst(document.body, {}, true)
var s = document.createElement("input");
s.id = "_request_data";
s.type = 'hidden';
s.name = '_request_data';
let p = {"parameter": dpContext};
s.value = Ext.encode(p);
form.appendChild(s);
document.body.appendChild(form);
form.submit();
Ext.fly(form).remove();
setTimeout(function () {
function dp001_query() {
$('dp001_query_btn').disable();
let dpContext = document.getElementById('context_tta').value;
Leaf.showConfirm('${l:HLS.PROMPT}', '确认执行当前语句吗?', function okFun() {
let iframe = Ext.get('_export_dp_query_window') || new Ext.Template('<iframe id ="_export_dp_query_window" name="_export_dp_query_window" style="position:absolute;left:-1000px;top:-1000px;width:1px;height:1px;display:none"></iframe>').insertFirst(document.body, {}, true)
var s = document.createElement("input");
s.id = "_request_data";
s.type = 'hidden';
s.name = '_request_data';
let p = {"parameter": dpContext};
s.value = Ext.encode(p);
form.appendChild(s);
document.body.appendChild(form);
form.submit();
Ext.fly(form).remove();
setTimeout(function () {
$('dp001_query_btn').enable();
Leaf.Masker.unmask(Ext.getBody());
}, 10000);
},
failure: function () {
$('dp001_query_btn').enable();
Leaf.Masker.unmask(Ext.getBody());
}, 10000);
},
failure: function () {
$('dp001_query_btn').enable();
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
$('dp001_query_btn').enable();
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}, function cancel() {
$('dp001_query_btn').enable();
Leaf.Masker.unmask(Ext.getBody());
}, 200, 100);
}
},
error: function () {
$('dp001_query_btn').enable();
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}, function cancel() {
$('dp001_query_btn').enable();
Leaf.Masker.unmask(Ext.getBody());
}, 200, 100);
}
function dp001_exec() {
$('dp001_exec_btn').disable();
let dpContext = document.getElementById('context_tta').value;
Leaf.showConfirm('${l:HLS.PROMPT}', '确认执行当前语句吗?', function okFun() {
let iframe = Ext.get('_export_dp_log_window') || new Ext.Template('<iframeid ="_export_dp_log_window"name="_export_dp_log_window"style="position:absolute;left:-1000px;top:-1000px;width:1px;height:1px;display:none"></iframe>').insertFirst(document.body, {}, true)
document.body.appendChild(form);
form.submit();
Ext.fly(form).remove();
setTimeout(function () {
$('dp001_download_cluster_log_btn').enable();
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
$('dp001_exec_btn').enable();
}, 10000);
}, function cancel() {
$('dp001_download_cluster_log_btn').enable();
Leaf.Masker.unmask(Ext.getBody());
}, 200, 100);
}
function download_log() {
$('dp001_download_log_btn').disable();
Leaf.showConfirm('${l:HLS.PROMPT}', '确认下载日志吗?', function okFun() {
Leaf.Masker.mask(Ext.getBody(), '正在下载中...');
let form = document.createElement("form");
form.target = "_export_dp_log_window";
form.method = "post";
let url = '${/request/@context_path}/sys/dp/download/log';
let token = $jq('meta[name=_csrf]').attr('content');
let iframe = Ext.get('_export_dp_log_window') || new Ext.Template('<iframeid ="_export_dp_log_window"name="_export_dp_log_window"style="position:absolute;left:-1000px;top:-1000px;width:1px;height:1px;display:none"></iframe>').insertFirst(document.body, {}, true)
document.body.appendChild(form);
form.submit();
Ext.fly(form).remove();
setTimeout(function () {
$('dp001_download_log_btn').enable();
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}, function cancel() {
$('dp001_exec_btn').enable();
Leaf.Masker.unmask(Ext.getBody());
}, 200, 100);
}
}, 10000);
function download_log() {
$('dp001_download_log_btn').disable();
Leaf.showConfirm('${l:HLS.PROMPT}', '确认下载日志吗?', function okFun() {
Leaf.Masker.mask(Ext.getBody(), '正在下载中...');
let form = document.createElement("form");
form.target = "_export_dp_log_window";
form.method = "post";
let url = '${/request/@context_path}/sys/dp/download/log';
let token = $jq('meta[name=_csrf]').attr('content');
let iframe = Ext.get('_export_dp_log_window') || new Ext.Template('<iframeid ="_export_dp_log_window"name="_export_dp_log_window"style="position:absolute;left:-1000px;top:-1000px;width:1px;height:1px;display:none"></iframe>').insertFirst(document.body, {}, true)