Add export button for channel data and update API integration
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -84,6 +84,14 @@ function renderChannels(channels) {
|
||||
await refreshDashboard();
|
||||
});
|
||||
|
||||
node.querySelector(".export-btn").addEventListener("click", async () => {
|
||||
await api("/api/jobs/export-channel", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ channel_id: channel.channel_id }),
|
||||
});
|
||||
await refreshDashboard();
|
||||
});
|
||||
|
||||
node.querySelector(".export-view-btn").addEventListener("click", () => {
|
||||
window.location.href = `/viewer?channel=${encodeURIComponent(channel.channel_id)}`;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user