100 lines
5.6 KiB
XML
100 lines
5.6 KiB
XML
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
Title="DBAToolBox - MS SQL Management" Height="550" Width="850" Background="#F0F0F0">
|
|
<DockPanel>
|
|
<!-- Top Menu -->
|
|
<Menu DockPanel.Dock="Top" Background="#F5F5F5" BorderBrush="#CCCCCC" BorderThickness="0,0,0,1">
|
|
<MenuItem Header="Main">
|
|
<MenuItem x:Name="menuSqlServers" Header="SQL Servers"/>
|
|
<MenuItem x:Name="menuHostSplunk" Header="Host Splunk"/>
|
|
</MenuItem>
|
|
</Menu>
|
|
|
|
<Grid Margin="10">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Header -->
|
|
<TextBlock Text="DBAToolBox" FontSize="24" FontWeight="Bold" Foreground="#2D3E50" Margin="0,0,0,10"/>
|
|
|
|
<!-- Main Workspace divided into Left (Tree View) and Right (Details) -->
|
|
<Grid Grid.Row="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="220" MinWidth="180"/>
|
|
<ColumnDefinition Width="5"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- Left Panel: SQL Servers Tree -->
|
|
<GroupBox x:Name="grpDirectory" Header="SQL Server Directory" Grid.Column="0" Margin="0,0,5,0" Foreground="#2D3E50" FontWeight="SemiBold">
|
|
<Grid Margin="5">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TreeView x:Name="tvServers" Margin="0,0,0,5" Background="White" BorderBrush="#CCCCCC" BorderThickness="1">
|
|
<!-- Items will be populated dynamically from PowerShell -->
|
|
</TreeView>
|
|
|
|
<!-- Buttons to manage servers list -->
|
|
<Grid Grid.Row="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Button x:Name="btnAddServer" Content="Add Server" Grid.Column="0" Margin="0,0,3,0" Padding="5,4" Background="#007ACC" Foreground="White" BorderThickness="0" FontWeight="Normal" Cursor="Hand"/>
|
|
<Button x:Name="btnRemoveServer" Content="Remove" Grid.Column="1" Margin="3,0,0,0" Padding="5,4" Background="#D13438" Foreground="White" BorderThickness="0" FontWeight="Normal" Cursor="Hand"/>
|
|
</Grid>
|
|
</Grid>
|
|
</GroupBox>
|
|
|
|
<!-- GridSplitter to resize columns -->
|
|
<GridSplitter Grid.Column="1" HorizontalAlignment="Stretch" Background="#D8D8D8" ResizeBehavior="PreviousAndNext" Cursor="SizeWE"/>
|
|
|
|
<!-- Right Panel: Connection and Main Workspace -->
|
|
<Grid Grid.Column="2" Margin="10,0,0,0">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Information/Connection Panel (Hidden until a server/db is selected) -->
|
|
<Grid x:Name="gridDetails" Grid.Row="0" Visibility="Collapsed">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Connection Panel -->
|
|
<StackPanel Grid.Row="0" Orientation="Horizontal" Margin="0,0,0,10">
|
|
<Label Content="Server Name:" VerticalAlignment="Center" FontWeight="SemiBold"/>
|
|
<TextBox x:Name="txtServerName" Width="250" VerticalAlignment="Center" Margin="5,0,10,0" Padding="4"/>
|
|
<Button x:Name="btnConnect" Content="Connect & Test" Width="120" Padding="5" Background="#007ACC" Foreground="White" BorderThickness="0" Cursor="Hand"/>
|
|
</StackPanel>
|
|
|
|
<!-- Main Content Area -->
|
|
<GroupBox Grid.Row="1" Header="Server Information" Margin="0,0,0,10" Foreground="#2D3E50" FontWeight="SemiBold">
|
|
<TabControl Background="White" BorderBrush="#CCCCCC" Margin="5">
|
|
<TabItem Header="Details">
|
|
<DataGrid x:Name="dgServerInfo" AutoGenerateColumns="True" IsReadOnly="True" Background="White" BorderBrush="Transparent" Margin="5"/>
|
|
</TabItem>
|
|
<TabItem Header="Databases">
|
|
<DataGrid x:Name="dgDatabases" AutoGenerateColumns="True" IsReadOnly="True" Background="White" BorderBrush="Transparent" Margin="5"/>
|
|
</TabItem>
|
|
<TabItem Header="Errors (Last Hour)">
|
|
<DataGrid x:Name="dgServerErrors" AutoGenerateColumns="True" IsReadOnly="True" Background="White" BorderBrush="Transparent" Margin="5"/>
|
|
</TabItem>
|
|
</TabControl>
|
|
</GroupBox>
|
|
</Grid>
|
|
|
|
<!-- Log Area -->
|
|
<TextBox Grid.Row="1" x:Name="txtLogs" Height="120" IsReadOnly="True" VerticalScrollBarVisibility="Auto" Background="#E8E8E8" FontFamily="Consolas" FontSize="11" TextWrapping="Wrap" BorderBrush="#CCCCCC" Padding="5"/>
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
</DockPanel>
|
|
</Window> |