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

Formatting error in Get-ImageNode #100

Open
MichaelSawczyn-AWH opened this issue Sep 9, 2022 · 2 comments
Open

Formatting error in Get-ImageNode #100

MichaelSawczyn-AWH opened this issue Sep 9, 2022 · 2 comments

Comments

@MichaelSawczyn-AWH
Copy link

MichaelSawczyn-AWH commented Sep 9, 2022

I'm getting the following while diagramming one of my resource groups.

The resource group contained only one virtual network and one network security group

Command line:
Export-AzViz -ResourceGroup services-Dev-Migrated -LabelVerbosity 2 -CategoryDepth 3 -Theme light -Show -OutputFormat png -OutputFilePath "Diagrams/Sub - ICM-Dev - RG - services-Dev-Migrated.png"

Output:

    █████╗ ███████╗██╗   ██╗██╗███████╗
   ██╔══██╗╚══███╔╝██║   ██║██║╚══███╔╝   Author    : Prateek Singh (Twitter @singhprateik)
   ███████║  ███╔╝ ██║   ██║██║  ███╔╝    Module    : Azure Visualizer v1.2.1
   ██╔══██║ ███╔╝  ╚██╗ ██╔╝██║ ███╔╝     Github    : https://github.com/PrateekKumarSingh/AzViz
   ██║  ██║███████╗ ╚████╔╝ ██║███████╗   Document  : https://azviz.readthedocs.io
   ╚═╝  ╚═╝╚══════╝  ╚═══╝  ╚═╝╚══════╝
 ▶ Testing Graphviz installation... 167ms
    ▶ GraphViz installation path : C:\Program Files\Graphviz\bin\dot.exe
 ▶ Configuring Defaults... 172ms
    ▶  Target Type            : Azure Resource Group
    ▶  Output Format          : png
    ▶  Exluded Resource Types :
    ▶  Output File Path       : Diagrams/Sub - ICM-Dev - RG - services-Dev-Migrated.png
    ▶  Label Verbosity        : 2
    ▶  Category Depth         : 3
    ▶  Sub-graph Direction    : top-to-bottom
    ▶  Theme                  : light
    ▶  Launch Visualization   : True
 ▶ Target Azure Resource Groups...  179ms
    ▶ services-Dev-Migrated
 ▶ Starting to generate Azure visualization... 180ms
    ▶ Exporting network associations for resource group: 'services-Dev-Migrated'
       ▶ Network watcher found: 'NetworkWatcher_eastus'
       ▶ Obtaining network topology using Network Watcher
    ▶ Exporting ARM template of Azure resource group: 'services-Dev-Migrated'
       ▶ Processing the ARM template to extract resources
       ▶ Total resources found: 36
       ▶ Cleaning up temporary ARM template file at: C:\Users\michael\AppData\Local\Temp\tmpD13E.tmp.json
    ▶ Plotting sub-graph for Azure Resource Group: "services-Dev-Migrated" 49.47s
	
Get-ImageNode : Error formatting a string: Index (zero based) must be greater than or equal to zero and less than the
size of the argument list..
At C:\Users\michael\OneDrive\Documents\WindowsPowerShell\Modules\AzViz\1.2.1\src\private\ConvertTo-DOTLangauge.ps1:182
char:39
+ ...   $nodes += Get-ImageNode -Name "$tocateg/$to".tolower() -Rows ($to,  ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (<TR><TD align="...FONT></TD></TR>:String) [Get-ImageNode], RuntimeExc
   eption
    + FullyQualifiedErrorId : FormatError,Get-ImageNode
@moiaune
Copy link
Contributor

moiaune commented Sep 12, 2022

I'm guessing its because there are some resource in your resource group that does not have an icon associated with it. You can check all the icons here and the mapping in code here.

@iliyakarin
Copy link

Is it possible to add some kind of default mock icon for non-existing icons?

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

No branches or pull requests

3 participants