Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various enhancements #72

Closed
wants to merge 7 commits into from
Closed

Conversation

msoukhomlinov
Copy link
Contributor

Added support for:

  • Documenting HA configuration
  • FortiGuard (under FortiCare) subscription status
  • Split out Interfaces by interface type (inc including relevant info for each type)

Cosmetic changes

  • Added additional fields for use in style/coverpage
  • Added removal of blank columns from system and firewall tables

@@ -96,6 +96,29 @@ function Get-AbrFgtFirewall {
$TableParams['Caption'] = "- $($TableParams.Name)"
}

# Identify and remove empty columns
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What empty columns do you have ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example columns have alias/description, and if all rows have this column empty, then there's no point including it in the table.

Copy link
Collaborator

@alagoutte alagoutte Apr 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, may be add a settings for this
No info/configuration are an info :)

@@ -96,7 +96,7 @@ function Get-AbrFgtSystem {
}

if ($info -and $settings -and $InfoLevel.System -ge 1) {
Section -Style Heading3 'GUI Settings' {
Section -Style Heading3 'Feature GUI visibility' {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change also TableParams name ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aligned it closer to what it's labelled in firewall.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and only to make also modification line 130 (TableParams = @{
Name = "Settings"

@@ -319,11 +481,89 @@ function Get-AbrFgtSystem {
}
}

# Fetch HA Configuration
$haConfig = Get-FGTSystemHA
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make a specific chapiter (and file) for HA ?

$OutObj = @()

$OutObj = [pscustomobject]@{
"Group Name / ID / Mode" = $haConfig.'group-name'+' / '+$haConfig.'group-id'+' / '+$haConfig.mode
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one line by setting ? (like other)


$OutObj = [pscustomobject]@{
"Group Name / ID / Mode" = $haConfig.'group-name'+' / '+$haConfig.'group-id'+' / '+$haConfig.mode
"HB Device" = $haConfig.'hbdev'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you align (indent) '=' ? (see visual code configuration for auto formatting)

@alagoutte
Copy link
Collaborator

Hi @msoukhomlinov

Look great, i need to make some real try for look change !

May be better a PR by change i think !

@@ -1,6 +1,9 @@
{
"Report": {
"Name": "Fortinet FortiGate As Built Report",
"Assets": "Your Firewall HostNames",
"ProjectRef": "Your Project Reference name and number",
"ClientName": "Your Client's Name",
Copy link
Contributor

@tpcarman tpcarman Apr 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Client/Customer/Company name is already defined in the AsBuiltReport Core configuration JSON file.

$AsBuiltConfig.Company.FullName

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tpcarman, there's a usecase for having two sets of company details, one for service provider and other for client. What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds like a specific use case, not a generic one which would be needed by all users? If you want to insert specific details into your reports you should be creating a custom style script.

@@ -49,11 +49,11 @@ TableStyle -Id 'Borderless' -HeaderStyle Normal -RowStyle Normal -BorderWidth 0
# Header & Footer
if ($ReportConfig.Report.ShowHeaderFooter) {
Header -Default {
Paragraph -Style Header "$($ReportConfig.Report.Name) - v$($ReportConfig.Report.Version)"
Paragraph -Style Header "$($ReportConfig.Report.ClientName) | $($ReportConfig.Report.Name) | $($ReportConfig.Report.ProjectRef)"
Copy link
Contributor

@tpcarman tpcarman Apr 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Client/Customer/Company name is already defined in the AsBuiltReport Core configuration JSON file.

$AsBuiltConfig.Company.FullName

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing the header can be achieved by using a custom style script to tailor to your specific needs.

BlankLine

$OutObj = @()
foreach ($lincese in $licenseSummary) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo $lincese (and after also)

@alagoutte
Copy link
Collaborator

@msoukhomlinov can you split change on multiple PR ? it will be more easy to review and merge ?

@alagoutte
Copy link
Collaborator

@msoukhomlinov i merge majority of change (expect for split interface stuf and remove unused column)
i will look after to add split interface

@alagoutte alagoutte closed this Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants