';
}
+$("admin-model-placement").addEventListener("click", event => {
+ const load = event.target.closest("[data-admin-model-load]");
+ const release = event.target.closest("[data-admin-model-release]");
+ if (load) void requestAdminModelLoad(load.dataset.adminModelLoad);
+ if (release) void releaseAdminModel(release.dataset.adminModelRelease);
+});
+
function chatAuthToken() {
if (accountApiKeys.length) return accountApiKeys[0];
return null;
diff --git a/tests/test_dashboard.py b/tests/test_dashboard.py
index c379ec8..9492b12 100644
--- a/tests/test_dashboard.py
+++ b/tests/test_dashboard.py
@@ -111,6 +111,9 @@ def test_dashboard_exposes_admin_model_inventory_and_release_controls():
assert '"/v1/models/release"' in html
assert "requestAdminModelLoad" in html
assert "releaseAdminModel" in html
+ assert 'data-admin-model-load=' in html
+ assert 'data-admin-model-release=' in html
+ assert "admin-model-placement-status" in html
def test_network_map_includes_node_friendly_name():