@@ -129,71 +129,6 @@ Function Get-HtmlContainerCard{
129129 # Add to array
130130 [void ]$allObjects.Add ($row );
131131 }
132- <#
133- #Set h4 element
134- $HElement = @{
135- Name = 'h4';
136- ClassName = 'resource-name';
137- Text = $Resource.Name;
138- InnerText = $true;
139- Template = $row;
140- }
141- #Create element
142- $H4Tag = New-HtmlTag @HElement
143- #Get SVG icon
144- $svg = $Resource.Name | Get-SvgIcon -LocalPath C:\monkey365_dev\newhtml
145- $img_attributes = @{
146- src = $svg;
147- alt = $Resource.Name;
148- }
149- $img_element = @{
150- Name = 'img';
151- Attributes = $img_attributes;
152- Empty = $true;
153- Template = $row;
154- }
155- $img = New-HtmlTag @img_element
156- #Get header
157- $header = $row.SelectSingleNode('//div[@class="monkey-header"]')
158- If($null -ne $header){
159- #Add header and h4
160- [void]$header.AppendChild($img);
161- [void]$header.AppendChild($H4Tag);
162- }
163- #Get Card body
164- $body = $row.SelectSingleNode('//div[@class="card-body"]')
165- #Get search filter
166- $searchFilter = New-HtmlCardFilter -Template $row
167- #append child
168- [void]$body.AppendChild($searchFilter);
169- #Create div object
170- #Div properties
171- $divProperties = @{
172- Name = 'div';
173- ClassName = 'monkey-card-data';
174- Id = ("{0}-findings" -f $Resource.Name.ToLower().Replace(' ',''))
175- Template = $row;
176- }
177- #Create element
178- $divContent = New-HtmlTag @divProperties
179- #Get findings
180- $allFindings = $Resource.Group | New-FindingCard -Template $row
181- #Append all findings
182- Foreach($finding in @($allFindings)){
183- [void]$divContent.AppendChild($finding);
184- }
185- #append child
186- [void]$body.AppendChild($divContent);
187- #Import node
188- $row = $TemplateObject.ImportNode($row.DocumentElement,$true);
189- #Close div tags
190- $divs = $row.SelectNodes("//div")
191- $divs | ForEach-Object {
192- If($_.IsEmpty){
193- [void]$_.AppendChild($TemplateObject.CreateWhitespace(""))
194- }
195- }
196- #>
197132 # Add to array
198133 [void ]$allObjects.Add ($row );
199134 }
0 commit comments