generated from nathanwoodburn/python-webserver-template
feat: Add bulk uploading
All checks were successful
Build Docker / BuildImage (push) Successful in 1m44s
All checks were successful
Build Docker / BuildImage (push) Successful in 1m44s
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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 {
|
||||
|
||||
3
templates/assets/csv/example.csv
Normal file
3
templates/assets/csv/example.csv
Normal 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
|
||||
|
Reference in New Issue
Block a user