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:
@@ -1,10 +1,15 @@
|
||||
function Show-Template {
|
||||
Param(
|
||||
[System.Collections.Hashtable] $Template
|
||||
$Template
|
||||
)
|
||||
$treeView.Nodes.Clear()
|
||||
|
||||
$tempBuilder = [TreeViewBuilder]::new()
|
||||
$tempBuilder.control = $treeView
|
||||
$tempBuilder.LoadTemplate($Template, "Template")
|
||||
}
|
||||
|
||||
if($null -ne $Template -and $Template.Contains("Resources")){
|
||||
$tempBuilder.LoadTemplate($Template["Resources"], "Template")
|
||||
}else{
|
||||
$treeView.Nodes.Add("No resources found") | Out-Null
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user