feat: Add bulk uploading
All checks were successful
Build Docker / BuildImage (push) Successful in 1m44s

This commit is contained in:
2025-07-29 12:27:32 +10:00
parent 402e321396
commit 55e6306e35
5 changed files with 116 additions and 1 deletions

View File

@@ -126,6 +126,28 @@
{% endfor %}
</div>
</section>
<section class="add-alerts-section">
<h2>Bulk Upload Domains</h2>
<p class="section-description">Upload a CSV file with your Handshake domains to set up multiple alerts at once.</p>
<div class="bulk-upload-card">
<form method="POST" action="/bulk_upload" enctype="multipart/form-data" class="bulk-upload-form">
<div class="form-group">
<label for="bulk-file">CSV File:</label>
<input type="file" id="bulk-file" name="file" accept=".csv" required>
<small class="form-note">Upload a CSV file with one domain per line.</small>
</div>
<div class="form-actions">
<button type="submit" class="button primary">Upload CSV</button>
</div>
</form>
<div class="bulk-upload-info">
<p>Format: Each line should contain a domain name, followed by the type of notification (e.g., "exampledomain, email") & notification parameters</p>
<p>Example: <code>exampledomain, email</code></p>
<p>Supported types: email, discord, slack, webhook</p>
<p>Download example CSV: <a href="/assets/csv/example.csv" class="button secondary" download>Download Example CSV</a></p>
</div>
</section>
</main>
</div>
</body>

View File

@@ -29,6 +29,8 @@
.alerts-section, .add-alerts-section {
margin-bottom: 60px;
max-width: 1000px;
margin: 16px auto;
}
.alerts-section h2, .add-alerts-section h2 {

View File

@@ -0,0 +1,3 @@
woodburn,1008,email,example@woodburn.au
woodburn1,1008,discord_webhook,https://discord.com/api/webhooks/123456789012345678/abcdefghijklmnopqrstuvwxyz
woodburn2,1008,telegram
1 woodburn,1008,email,example@woodburn.au
2 woodburn1,1008,discord_webhook,https://discord.com/api/webhooks/123456789012345678/abcdefghijklmnopqrstuvwxyz
3 woodburn2,1008,telegram