feat: Add race upload functionality and file transfer endpoints
- Implemented IRaceUploadCommunicationClient with methods for saving races, creating race points, indexing race points, retrieving race details, and uploading files to the receiver. - Added ReceiveFilePath option to CatalogCommunicationOptions for file transfer configuration. - Enhanced CatalogCommunicationServiceCollectionExtensions to validate ReceiveFilePath. - Developed RaceUploadCommunicationClient to handle race-related API interactions, including saving race data and uploading processed images. - Updated API documentation to reflect new race upload and file transfer endpoints. - Modified Avalonia UI to support race creation and processed image uploads, including new input fields and buttons. - Introduced RaceSaveRequest and ReceiveFileUploadRequest models for structured data handling.
This commit is contained in:
parent
4a0973b681
commit
15b1da4371
11 changed files with 675 additions and 97 deletions
|
|
@ -270,12 +270,12 @@
|
|||
</ScrollViewer>
|
||||
</TabItem>
|
||||
|
||||
<!-- Tab 7: API Test -->
|
||||
<TabItem Header="API Test">
|
||||
<!-- Tab 7: Race Upload -->
|
||||
<TabItem Header="Race Upload">
|
||||
<ScrollViewer>
|
||||
<StackPanel Margin="8" Spacing="8">
|
||||
<TextBlock Text="Test comunicazione API (non distruttivo)" FontWeight="Bold" />
|
||||
<TextBlock Text="Questa prova esegue login admin e una ricerca gare (cmd=search), poi mostra una sintesi delle prime 3 righe rilevate."
|
||||
<TextBlock Text="Setup gara e upload foto processate" FontWeight="Bold" />
|
||||
<TextBlock Text="Flusso: login admin, creazione gara, creazione punti foto, upload file processati da cartella destinazione locale, indicizzazione punti foto."
|
||||
TextWrapping="Wrap" Opacity="0.8" />
|
||||
|
||||
<Grid ColumnDefinitions="Auto,*" RowDefinitions="Auto,Auto" ColumnSpacing="8" RowSpacing="8">
|
||||
|
|
@ -286,8 +286,58 @@
|
|||
<TextBox Grid.Row="1" Grid.Column="1" Name="ApiPasswordTextBox" PasswordChar="*" />
|
||||
</Grid>
|
||||
|
||||
<TextBlock Text="Dati gara" FontWeight="Bold" Margin="0,4,0,0" />
|
||||
<Grid ColumnDefinitions="Auto,*,Auto,*" RowDefinitions="Auto,Auto,Auto,Auto" ColumnSpacing="8" RowSpacing="8">
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="Descrizione:" VerticalAlignment="Center" />
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Name="ApiRaceDescriptionTextBox" Watermark="Nome gara" />
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="2" Text="Tipo Gara ID:" VerticalAlignment="Center" />
|
||||
<TextBox Grid.Row="0" Grid.Column="3" Name="ApiRaceTypeIdTextBox" Text="1" />
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="Data Inizio:" VerticalAlignment="Center" />
|
||||
<CalendarDatePicker Grid.Row="1" Grid.Column="1" Name="ApiRaceStartDatePicker" />
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="2" Text="Data Fine:" VerticalAlignment="Center" />
|
||||
<CalendarDatePicker Grid.Row="1" Grid.Column="3" Name="ApiRaceEndDatePicker" />
|
||||
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="Path Base Gara:" VerticalAlignment="Center" />
|
||||
<TextBox Grid.Row="2" Grid.Column="1" Name="ApiPathBaseTextBox" Watermark="2026/mia-gara/" />
|
||||
|
||||
<TextBlock Grid.Row="2" Grid.Column="2" Text="Localita:" VerticalAlignment="Center" />
|
||||
<TextBox Grid.Row="2" Grid.Column="3" Name="ApiLocalitaTextBox" />
|
||||
|
||||
<TextBlock Grid.Row="3" Grid.Column="0" Text="Evento In Linea:" VerticalAlignment="Center" />
|
||||
<ComboBox Grid.Row="3" Grid.Column="1" Name="ApiEventoInLineaComboBox" SelectedIndex="0">
|
||||
<ComboBoxItem Content="0 - Non in linea" />
|
||||
<ComboBoxItem Content="1 - Stand by" />
|
||||
<ComboBoxItem Content="2 - In linea" />
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Grid.Row="3" Grid.Column="2" Text="Tipo Indicizzazione:" VerticalAlignment="Center" />
|
||||
<ComboBox Grid.Row="3" Grid.Column="3" Name="ApiTipoIndexComboBox" SelectedIndex="1">
|
||||
<ComboBoxItem Content="0" />
|
||||
<ComboBoxItem Content="1" />
|
||||
</ComboBox>
|
||||
</Grid>
|
||||
|
||||
<Grid ColumnDefinitions="Auto,*,Auto,*" RowDefinitions="Auto,Auto" ColumnSpacing="8" RowSpacing="8">
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="Evento Omaggio:" VerticalAlignment="Center" />
|
||||
<ComboBox Grid.Row="0" Grid.Column="1" Name="ApiFreeEventComboBox" SelectedIndex="0">
|
||||
<ComboBoxItem Content="0 - No" />
|
||||
<ComboBoxItem Content="1 - SI" />
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="2" Text="id_gara corrente:" VerticalAlignment="Center" />
|
||||
<TextBox Grid.Row="0" Grid.Column="3" Name="ApiRaceIdTextBox" />
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="Path remoto processate:" VerticalAlignment="Center" />
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3" Name="ApiRemoteProcessedBasePathTextBox"
|
||||
Watermark="/percorso/remoto/foto-ridotte" />
|
||||
</Grid>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<Button Name="ApiTestButton" Content="Test login + ultime 3 gare" Click="ApiTestLoginAndGetRaces_Click" />
|
||||
<Button Name="ApiCreateRaceButton" Content="Crea nuova gara" Click="CreateRace_Click" />
|
||||
<Button Name="ApiUploadButton" Content="Upload foto processate" Click="UploadProcessed_Click" />
|
||||
<TextBlock Name="ApiStatusTextBlock" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue