release
This commit is contained in:
16
static/js/set_log_level.js
Normal file
16
static/js/set_log_level.js
Normal file
@@ -0,0 +1,16 @@
|
||||
document.getElementById('setLogLevelForm').addEventListener('submit', function(e) {
|
||||
e.preventDefault();
|
||||
const level = document.getElementById('appLogLevel').value;
|
||||
fetch(SET_LOG_LEVEL_URL, {
|
||||
method: 'POST',
|
||||
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
|
||||
body: 'level=' + encodeURIComponent(level)
|
||||
})
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
window.showToast({ text: data.message, variant: 'success' });
|
||||
})
|
||||
.catch(() => {
|
||||
window.showToast({ text: "Błąd podczas zmiany poziomu", variant: "error" });
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user