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

[nwdiag] grouping does not work properly #408

Closed
smoebody opened this issue Nov 26, 2020 · 3 comments
Closed

[nwdiag] grouping does not work properly #408

smoebody opened this issue Nov 26, 2020 · 3 comments

Comments

@smoebody
Copy link

From the docs this should do:

@startuml
nwdiag {
    internet [ shape = cloud];
    internet -- ingress;

    group {
      app;
      db;
    }

    network proxy {
    	app;
        ingress;
    }

    network default {
    	app;
        db;
    }
  }
}
@enduml

But it looks like this:
image

Without group the structure is ok:

@startuml
nwdiag {
    internet [ shape = cloud];
    internet -- ingress;

    network proxy {
    	app;
        ingress;
    }

    network default {
    	app;
        db;
    }
  }
}
@enduml

produces:
image

@Code-m0nk3y
Copy link

Code-m0nk3y commented Jul 13, 2022

I have another example:

@startuml

title = My buggy nwdiag

nwdiag {
   network A1 {
        Entity_1
		Entity_2
		
    }

    network A2 {
        Entity_2 
		Entity_3
    }
	
    network AB {
        Entity_3
        Entity_4
    }

    group {
        Entity_2
        Entity_1
	Entity_3
    }
}

@enduml

Which produces:
image

Where Entity_1 and Entity_2 should not be connected to network AB.

Removing the group like so:

@startuml

title = My OK nwdiag 

nwdiag {
    network A1 {
        Entity_1
		Entity_2
		
    }

    network A2 {
        Entity_2 
		Entity_3
    }
	
    network AB {
        Entity_3
        Entity_4
    }

}

@enduml

Provides the correct structure.
image

@The-Lum
Copy link
Collaborator

The-Lum commented Jul 13, 2022

@The-Lum
Copy link
Collaborator

The-Lum commented Mar 5, 2023

Hi @smoebody, @Code-m0nk3y, and all,

That is now fixed with:

@startuml
nwdiag {
    internet [ shape = cloud];
    internet -- ingress;

    group {
      app;
      db;
    }

    network proxy {
    	app;
        ingress;
    }

    network default {
    	app;
        db;
    }
  }
}
@enduml

Or:

@startuml

title = My buggy nwdiag

nwdiag {
   network A1 {
        Entity_1
		Entity_2
		
    }

    network A2 {
        Entity_2 
		Entity_3
    }
	
    network AB {
        Entity_3
        Entity_4
    }

    group {
        Entity_2
        Entity_1
	Entity_3
    }
}

@enduml

Thanks to PlantUML team, 👍
Regards.

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

4 participants