This commit is contained in:
flaskfarm
2022-10-21 01:41:49 +09:00
parent 56419a8355
commit 2e27ae8f72
20 changed files with 603 additions and 143 deletions

View File

@@ -110,8 +110,9 @@ function showModal(data='EMPTY', title='JSON', json=true) {
document.getElementById("modal_title").innerHTML = title;
if (json) {
data = JSON.stringify(data, null, 2);
}
document.getElementById("modal_body").innerHTML = "<pre>"+ data + "</pre>";;
}
document.getElementById("modal_body").innerHTML = '<pre style="white-space: pre-wrap;">' +data + '</pre>';
$("#large_modal").modal();
}

View File

@@ -146,8 +146,8 @@ function globalSendCommand(command, arg1, arg2, arg3, modal_title, callback) {
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 (ret.modal != null) showModal(ret.modal, modal_title, false);
if (ret.json != null) showModal(ret.json, modal_title, true);
if (callback != null) callback(ret);
}
});

View File

@@ -1,3 +1,7 @@
/*
<div class="d-inline-block"></div>
*/
function j_button_group(h) {
var str = '<div class="btn-group btn-group-sm flex-wrap mr-2" role="group">';
str += h