Files
jdescopingtool/NEW/src/Utils/JdeScoping.ConfigManager.Ui/Views/Editors/SourceEditorView.axaml
T
Joseph Doherty 1fc7792cd1 refactor(configmanager): rename UI project and split test projects
Rename ConfigManager to ConfigManager.Ui to match the Core/CLI/UI project
structure, and split the monolithic test project into Core.Tests,
Cli.Tests, and Ui.Tests to align with the source project organization.
2026-01-28 10:24:36 -05:00

119 lines
6.5 KiB
XML

<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:steps="using:JdeScoping.ConfigManager.Ui.ViewModels.PipelineSteps"
x:Class="JdeScoping.ConfigManager.Ui.Views.Editors.SourceEditorView"
x:DataType="steps:SourceStepViewModel">
<StackPanel Spacing="16">
<!-- Header -->
<StackPanel>
<TextBlock Text="Source Configuration"
Foreground="#E6EDF5" FontSize="14" FontWeight="SemiBold"/>
<TextBlock Text="Configure the data source for this pipeline"
Foreground="#5C6A7A" FontSize="11"/>
</StackPanel>
<!-- Connection -->
<StackPanel Spacing="4">
<StackPanel Orientation="Horizontal" Spacing="2">
<TextBlock Text="Connection"
Foreground="#9BA8B8" FontSize="12" FontWeight="Medium"/>
<TextBlock Text="*" Foreground="#FF6B6B" FontSize="12"/>
</StackPanel>
<ComboBox ItemsSource="{Binding AvailableConnections}"
SelectedItem="{Binding Connection}"
Background="#232A35" Foreground="#E6EDF5"
BorderBrush="#3D4550" Height="36"
HorizontalAlignment="Stretch"
PlaceholderText="Select connection..."/>
<TextBlock Text="Connection string name from Settings > ConnectionStrings"
Foreground="#5C6A7A" FontSize="11"/>
</StackPanel>
<!-- Query -->
<StackPanel Spacing="4">
<StackPanel Orientation="Horizontal" Spacing="2">
<TextBlock Text="Query"
Foreground="#9BA8B8" FontSize="12" FontWeight="Medium"/>
<TextBlock Text="*" Foreground="#FF6B6B" FontSize="12"/>
</StackPanel>
<TextBox Text="{Binding Query}"
Background="#232A35" Foreground="#E6EDF5"
BorderBrush="#3D4550"
FontFamily="JetBrains Mono" FontSize="11"
AcceptsReturn="True"
TextWrapping="NoWrap"
MinHeight="100"
Watermark="SELECT ... FROM ... WHERE ..."/>
<TextBlock Text="SQL query for incremental updates (use @LastSync parameter)"
Foreground="#5C6A7A" FontSize="11"/>
</StackPanel>
<!-- Mass Query -->
<StackPanel Spacing="4">
<TextBlock Text="Mass Query (Optional)"
Foreground="#9BA8B8" FontSize="12" FontWeight="Medium"/>
<TextBox Text="{Binding MassQuery}"
Background="#232A35" Foreground="#E6EDF5"
BorderBrush="#3D4550"
FontFamily="JetBrains Mono" FontSize="11"
AcceptsReturn="True"
TextWrapping="NoWrap"
MinHeight="80"
Watermark="SELECT ... FROM ... (no date filter)"/>
<TextBlock Text="Query for full table reload during mass sync"
Foreground="#5C6A7A" FontSize="11"/>
</StackPanel>
<!-- Parameters Section -->
<Expander IsExpanded="False">
<Expander.Header>
<StackPanel Orientation="Horizontal" Spacing="8">
<TextBlock Text="Parameters" Foreground="#9BA8B8" FontSize="12" FontWeight="Medium"/>
<TextBlock Text="{Binding Parameters.Count, StringFormat='({0})'}"
Foreground="#5C6A7A" FontSize="12"/>
</StackPanel>
</Expander.Header>
<StackPanel Spacing="8" Margin="0,8,0,0">
<ItemsControl ItemsSource="{Binding Parameters}">
<ItemsControl.ItemTemplate>
<DataTemplate DataType="steps:ParameterViewModel">
<Border Background="#151920" BorderBrush="#2D3540" BorderThickness="1"
CornerRadius="4" Padding="8" Margin="0,0,0,4">
<Grid ColumnDefinitions="*,8,*,8,*,8,Auto">
<StackPanel Grid.Column="0" Spacing="2">
<TextBlock Text="Key" Foreground="#5C6A7A" FontSize="10"/>
<TextBox Text="{Binding Key}"
Background="#232A35" Height="28" FontSize="11"/>
</StackPanel>
<StackPanel Grid.Column="2" Spacing="2">
<TextBlock Text="Format" Foreground="#5C6A7A" FontSize="10"/>
<TextBox Text="{Binding Format}"
Background="#232A35" Height="28" FontSize="11"
Watermark="jdeJulian"/>
</StackPanel>
<StackPanel Grid.Column="4" Spacing="2">
<TextBlock Text="Source" Foreground="#5C6A7A" FontSize="10"/>
<TextBox Text="{Binding Source}"
Background="#232A35" Height="28" FontSize="11"
Watermark="offset"/>
</StackPanel>
<Button Grid.Column="6" Content="X"
Background="Transparent" Foreground="#FF6B6B"
BorderThickness="0" FontSize="11" Width="24"
VerticalAlignment="Bottom"/>
</Grid>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<Button Content="+ Add Parameter"
Background="#232A35" Foreground="#9BA8B8"
BorderBrush="#3D4550" Height="32"
HorizontalAlignment="Left" Padding="12,0"
Command="{Binding AddParameterCommand}"/>
</StackPanel>
</Expander>
</StackPanel>
</UserControl>