[Feature] Implementata schedulazione completa per file CSV/Excel
- Aggiunta validazione percorsi file prima del salvataggio profili - Implementati metodi di lettura file CSV e Excel per schedulazioni - Supporto doppia modalità: caricamento browser (preview) e percorso manuale (schedulazione) - Gestione completa deletion sync anche per file CSV/Excel - Rilevamento automatico separatori CSV (virgola, punto e virgola, tab, pipe) - Supporto formati Excel legacy (.xls) e moderni (.xlsx) - Abilitati profili file nella UI di schedulazione - Logging dettagliato per troubleshooting - Documentazione completa in CSV_SCHEDULING_IMPLEMENTATION.md - Aggiornati README.md e copilot-instructions.md con nuove feature - Rimosso testo 'TEST' dalla pagina di login
This commit was merged in pull request #5.
This commit is contained in:
@@ -294,13 +294,56 @@
|
||||
<!-- Sezione File -->
|
||||
@if (selectedSourceType == "file")
|
||||
{
|
||||
<div class="alert alert-info" role="alert">
|
||||
<i class="fas fa-info-circle"></i>
|
||||
<strong>Due modalità disponibili:</strong>
|
||||
<ul class="mb-0 mt-2">
|
||||
<li><strong>Caricamento Browser:</strong> Carica un file per preview e configurazione mapping (file temporaneo)</li>
|
||||
<li><strong>Percorso File:</strong> Specifica il percorso completo del file sul server per schedulazioni</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- Opzione 1: Caricamento Browser per Preview -->
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Seleziona File (Excel/CSV):</label>
|
||||
<label class="form-label">
|
||||
<i class="fas fa-upload"></i> Carica File per Preview (opzionale):
|
||||
</label>
|
||||
<InputFile class="form-control" OnChange="OnFileSelected" accept=".xlsx,.xls,.csv" />
|
||||
@if (!string.IsNullOrEmpty(selectedFileName))
|
||||
{
|
||||
<small class="text-muted">File selezionato: @selectedFileName</small>
|
||||
<small class="text-muted">File caricato: @selectedFileName</small>
|
||||
}
|
||||
<small class="form-text text-muted">
|
||||
Carica un file per vedere preview e configurare il mapping. Questo file non verrà salvato.
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<!-- Opzione 2: Percorso File Manuale (Richiesto per Schedulazione) -->
|
||||
<div class="mb-3">
|
||||
<label class="form-label">
|
||||
<i class="fas fa-folder-open"></i> Percorso File sul Server (richiesto per schedulazione): *
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" @bind="manualFilePath"
|
||||
placeholder="Es: C:\Data\products.csv o /data/products.csv" />
|
||||
<button class="btn btn-outline-primary" @onclick="ValidateAndLoadFileFromPath"
|
||||
disabled="@(string.IsNullOrEmpty(manualFilePath) || isProcessingFile)">
|
||||
@if (isProcessingFile)
|
||||
{
|
||||
<span class="spinner-border spinner-border-sm me-1"></span>
|
||||
}
|
||||
<i class="fas fa-check"></i> Valida e Carica
|
||||
</button>
|
||||
</div>
|
||||
@if (!string.IsNullOrEmpty(uploadedFilePath) && uploadedFilePath == manualFilePath)
|
||||
{
|
||||
<small class="text-success">
|
||||
<i class="fas fa-check-circle"></i> File validato e caricato con successo!
|
||||
</small>
|
||||
}
|
||||
<small class="form-text text-muted">
|
||||
Inserisci il percorso completo del file. Il file deve essere accessibile dal server.
|
||||
</small>
|
||||
</div>
|
||||
|
||||
@if (isProcessingFile)
|
||||
@@ -1016,7 +1059,7 @@
|
||||
SourceSchema="@GetCurrentDatabaseSchema()"
|
||||
SourceTable="@(useCustomQuery ? "custom_query" : selectedTable)"
|
||||
SourceCustomQuery="@(useCustomQuery ? customQuery : null)"
|
||||
SourceFilePath="@selectedFileName"
|
||||
SourceFilePath="@uploadedFilePath"
|
||||
DestinationType="rest"
|
||||
DestinationCredentialId="@(GetCurrentDestinationCredentialIdAsync().Result)"
|
||||
DestinationCredentialName="@selectedRestCredential"
|
||||
|
||||
Reference in New Issue
Block a user