Refactor configuration data export and template loading functions

- Updated Export-ConfigurationData to use resolved configuration data directly and added error handling for missing data.
- Enhanced Load-Templates to streamline category loading and improve error handling for missing template directories.
- Removed Merge-ConfigurationData function as it is no longer needed.
- Refactored Merge-Templates to improve merging logic and handle default files more effectively.
- Introduced Get-TemplatePreviewData function to handle template preview data retrieval and merging.
- Added Import-OrderedPowerShellDataFile function to support ordered hashtable imports.
- Updated Update-ParametersPanel to handle parameter and variable tab updates more efficiently.
- Improved Update-TreeView to handle cases where resources are not found.
- Added new parameters to Environment.Default.psd1 for Active Directory configuration.
- Created new template BGW-LAN.psd1 for domain configuration.
This commit is contained in:
Torsten Brendgen
2026-06-29 22:16:05 +02:00
parent 6986570510
commit 1a4ba96dc8
13 changed files with 689 additions and 4456 deletions

View File

@@ -5,13 +5,23 @@ function Update-TreeView {
if ($null -ne $ConfigurationData) {
$tempBuilder = [TreeViewBuilder]::new()
$tempBuilder.control = $treeView
$tempBuilder.LoadTemplate($ConfigurationData['Resources'], "Deployment")
if($ConfigurationData.ContainsKey("Resources")){
$tempBuilder.LoadTemplate($ConfigurationData['Resources'], "Deployment")
}else{
$treeView.Nodes.Clear()
$treeView.Nodes.Add("No resources found") | Out-Null
}
$statusBar.SetText("Status", "Merged: Anzeige aktualisiert")
$stateManager.SetState("isMerged", $true)
$stateManager.SetState("isResolved", $null -ne $script:ResolvedConfigurationData)
$stateManager.UpdateAllButtons()
# Parameter und Variablen Panel aktualisieren
Update-ParametersPanel -ConfigurationData $ConfigurationData
if($null -ne $script:MergedConfigurationData){
Update-ParametersPanel -ConfigurationData $script:MergedConfigurationData
}else{
Update-ParametersPanel -ConfigurationData $ConfigurationData
}
}
else {
@@ -22,4 +32,4 @@ function Update-TreeView {
# Panel ausblenden
$parametersPanel.Visible = $false
}
}
}