var conf_editor = null;
var createdCont = false;
performTranslation();
requestLoggingStart();
$(document).ready(function() {
var messages;
var loguplmess = "";
var reportUrl = 'https://report.hyperion-project.org/#';
$('#conf_cont').append(createOptPanel('fa-reorder', $.i18n("edt_conf_log_heading_title"), 'editor_container', 'btn_submit'));
if(window.showOptHelp)
{
$('#conf_cont').append(createHelpTable(window.schema.logger.properties, $.i18n("edt_conf_log_heading_title")));
createHintH("intro", $.i18n('conf_logging_label_intro'), "log_head");
}
$("#log_upl_pol").append(''+$.i18n("conf_logging_uplpolicy")+' '+buildWL("user/support#report_privacy_policy",$.i18n("conf_logging_contpolicy")));
conf_editor = createJsonEditor('editor_container', {
logger : window.schema.logger
}, true, true);
conf_editor.on('change',function() {
conf_editor.validate().length ? $('#btn_submit').attr('disabled', true) : $('#btn_submit').attr('disabled', false);
});
$('#btn_submit').off().on('click',function() {
requestWriteConfig(conf_editor.getValue());
});
$('#btn_logupload').off().on('click',function() {
uploadLog();
$(this).attr("disabled", true);
$('#upl_link').html($.i18n('conf_logging_uploading'))
});
//show prev uploads
var ent;
if(getStorage("prev_reports"))
{
ent = JSON.parse(getStorage("prev_reports"));
$('#prev_reports').append(''+$.i18n('conf_logging_lastreports')+'
');
for(var i = 0; i
'); createdCont = true; $('#btn_autoscroll').off().on('click',function() { toggleClass('#btn_autoscroll', "btn-success", "btn-danger"); }); } for(var idx = 0; idx < messages.length; idx++) { var app_name = messages[idx].appName; var logger_name = messages[idx].loggerName; var function_ = messages[idx].function; var line = messages[idx].line; var file_name = messages[idx].fileName; var msg = messages[idx].message; var level_string = messages[idx].levelString; var utime = messages[idx].utime; var debug = ""; if(level_string == "DEBUG") { debug = "("+file_name+":"+line+":"+function_+"()) "; } var date = new Date(parseInt(utime)); $("#logmessages").append("\n
"+date.toISOString()+" ["+app_name+" "+logger_name+"] ("+level_string+") "+debug+msg+"
");
loguplmess += "["+app_name+" "+logger_name+"] ("+level_string+") "+debug+msg+"\n";
}
if($("#btn_autoscroll").hasClass('btn-success'))
{
$('#logmessages').stop().animate({
scrollTop: $('#logmessages')[0].scrollHeight
}, 800);
}
});
}
removeOverlay();
});