Can't get any HTML objects to display before tabs header
ioamnesia opened this issue · 4 comments
ioamnesia commented
I'd really like to have something above my tabs header so I tried putting the tab in a panel, section, etc and I can't figure out how... Is it possible?
PrzemyslawKlys commented
Currently not possible but should be easy to add. Just I never thought it would be needeed. Currently only New-HTMLLogo goes over the tabs. What would be use case for you?
UriHendler commented
I would like this too.
My use case is a dashboard that gets updated on a schedule.
I want to display a header before the tabs with the time of the last update.
PrzemyslawKlys commented
Makes sense. Probably would need to introduce new commands - something along the lines:
New-HTML {
New-HTMLHead {
# anything that would need putting over the tabs
}
New-HTMLBody {
New-HTMLTab {
# typical commands
}
}
New-HTMLFooter {
}
}
PrzemyslawKlys commented
Two options:
Import-Module .\PSWriteHTML.psd1 -Force
New-HTML -TitleText 'This is a test' -FilePath "$PSScriptRoot\Example34_02.html" {
New-HTMLHeader {
New-HTMLText -Text "Date of this report $(Get-Date)" -Color Blue -Alignment right
}
# see, not New-HTMLMain
New-HTMLTab -TabName 'Test' {
New-HTMLContent -HeaderText '0 section' {
New-HTMLPanel {
New-HTMLTable -ArrayOfObjects $Processes -HideFooter
}
New-HTMLPanel {
New-HTMLTable -DataTable $Processes -HideFooter
}
New-HTMLPanel {
New-HTMLTable -DataTable $Processes -HideFooter -Simplify
}
New-HTMLPanel {
New-HTMLTable -DataTable $Processes -HideFooter
}
}
}
New-HTMLTab -TabName 'Test5' {
New-HTMLContent -HeaderText '1 section' {
New-HTMLPanel {
New-HTMLTable -ArrayOfObjects $Processes -HideFooter
}
New-HTMLPanel {
New-HTMLTable -ArrayOfObjects $Processes -HideFooter
# New-HTMLTable -DataTable $Processes -HideFooter
}
New-HTMLPanel {
New-HTMLTable -DataTable $Processes -HideFooter
}
}
}
New-HTMLFooter {
New-HTMLText -Text "Date of this report $(Get-Date)" -Color Blue -Alignment right
}
} -UseCssLinks -UseJavaScriptLinks -ShowHTML
More explicit:
Import-Module .\PSWriteHTML.psd1 -Force
New-HTML -TitleText 'This is a test' -FilePath "$PSScriptRoot\Example34_01.html" {
New-HTMLHeader {
New-HTMLText -Text "Date of this report $(Get-Date)" -Color Blue -Alignment right
}
New-HTMLMain {
New-HTMLTab -TabName 'Test' {
New-HTMLContent -HeaderText '0 section' {
New-HTMLPanel {
New-HTMLTable -ArrayOfObjects $Processes -HideFooter
}
New-HTMLPanel {
New-HTMLTable -DataTable $Processes -HideFooter
}
New-HTMLPanel {
New-HTMLTable -DataTable $Processes -HideFooter -Simplify
}
New-HTMLPanel {
New-HTMLTable -DataTable $Processes -HideFooter
}
}
}
New-HTMLTab -TabName 'Test5' {
New-HTMLContent -HeaderText '1 section' {
New-HTMLPanel {
New-HTMLTable -ArrayOfObjects $Processes -HideFooter
}
New-HTMLPanel {
New-HTMLTable -ArrayOfObjects $Processes -HideFooter
# New-HTMLTable -DataTable $Processes -HideFooter
}
New-HTMLPanel {
New-HTMLTable -DataTable $Processes -HideFooter
}
}
}
}
New-HTMLFooter {
New-HTMLText -Text "Date of this report $(Get-Date)" -Color Blue -Alignment right
}
} -UseCssLinks -UseJavaScriptLinks -ShowHTML
I hopefully didn't break anything.