initial files
This commit is contained in:
35
public/views/integrated/serverconfig.hbs
Normal file
35
public/views/integrated/serverconfig.hbs
Normal file
@@ -0,0 +1,35 @@
|
||||
<header>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
</header>
|
||||
|
||||
<body>
|
||||
<div class="container static">
|
||||
<div class="card" style="overflow: auto;height:100vh">
|
||||
<div id="jsonConfigTree" class="json-tree"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
|
||||
<script>
|
||||
fetch('/api/getConfig', { method: 'POST' })
|
||||
.then(res => res.json())
|
||||
.then(json => {
|
||||
const tree = createJsonTree({
|
||||
container: document.getElementById("jsonConfigTree"),
|
||||
data: json,
|
||||
expandInitially: true,
|
||||
onSave: json => {
|
||||
fetch('/config', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(json, null, 2)
|
||||
}).then(() => writeEventLog(0, 'Serverconfig', tree.getChanges()) );
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user