diff --git a/server/src/routes/ui.rs b/server/src/routes/ui.rs
index 10e25a1..fb1bb23 100644
--- a/server/src/routes/ui.rs
+++ b/server/src/routes/ui.rs
@@ -325,6 +325,8 @@ pub async fn app_detail(
.replace("{{host}}", &host)
.replace("{{app_id}}", &app.id)
.replace("{{secret}}", &app.webhook_secret)
+ .replace("{{memory_limit}}", &app.memory_limit)
+ .replace("{{cpu_limit}}", &app.cpu_limit)
.replace("{{deploy_rows}}", &deploy_rows)
.replace("{{env_rows}}", &env_rows)
.replace("{{c_badge}}", &container_badge(&container_state))
diff --git a/server/templates/app_detail.html b/server/templates/app_detail.html
index c4e2380..3ba7b00 100644
--- a/server/templates/app_detail.html
+++ b/server/templates/app_detail.html
@@ -35,6 +35,20 @@
+
+
{{db_card}}
@@ -168,6 +182,22 @@ async function deprovisionDb() {
else alert('Error: ' + await r.text());
}
const IS_PUBLIC = {{is_public_js}};
+async function saveSettings() {
+ const body = {
+ repo_url: document.getElementById('cfg-repo').value,
+ branch: document.getElementById('cfg-branch').value,
+ port: parseInt(document.getElementById('cfg-port').value, 10),
+ memory_limit: document.getElementById('cfg-memory').value,
+ cpu_limit: document.getElementById('cfg-cpu').value,
+ };
+ const r = await fetch('/api/apps/' + APP_ID, {
+ method: 'PATCH',
+ headers: {'Content-Type': 'application/json'},
+ body: JSON.stringify(body),
+ });
+ if (r.ok) window.location.reload();
+ else alert('Error saving settings: ' + await r.text());
+}
async function toggleVisibility() {
const r = await fetch('/api/apps/' + APP_ID, {
method: 'PATCH',