srl-labs / containerlab

container-based networking labs
https://containerlab.dev
BSD 3-Clause "New" or "Revised" License
1.56k stars 266 forks source link

graph drawio: Pull strategy and Interactive mode support #2291

Closed FloSch62 closed 2 weeks ago

FloSch62 commented 2 weeks ago

This PR introduces two major improvements to the clab-io-draw functionality:

  1. Automatic Image Updates

    • When using the latest tag, containerlab now automatically checks and pulls the newest version of clab-io-draw
    • Users are informed about the update status through clear log messages
    • Ensures users always have the most recent version when using latest tag
  2. Native Interactive Mode Support

    • Adds native support for the -I (interactive) mode directly in containerlab
    • Users can now utilize the interactive
# Start interactive cli ui
containerlab graph -t st.clab.yml --drawio --drawio-args="-I --theme nokia_modern_dark"
steiler commented 2 weeks ago

Can't we use the docker lib instead of the execs?

FloSch62 commented 2 weeks ago

@steiler the origin of the execs is from @hellt

It think I tried the docker lib once but I was failing to get it work. If you want to move it to the docker lib, feel free to do it ;)

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 35.71429% with 36 lines in your changes missing coverage. Please review.

Project coverage is 51.42%. Comparing base (af637ce) to head (9d40892). Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
clab/graph.go 35.71% 32 Missing and 4 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2291 +/- ## ========================================== + Coverage 51.17% 51.42% +0.24% ========================================== Files 172 172 Lines 16708 16758 +50 ========================================== + Hits 8551 8617 +66 + Misses 7243 7219 -24 - Partials 914 922 +8 ``` | [Files with missing lines](https://app.codecov.io/gh/srl-labs/containerlab/pull/2291?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=srl-labs) | Coverage Δ | | |---|---|---| | [clab/graph.go](https://app.codecov.io/gh/srl-labs/containerlab/pull/2291?src=pr&el=tree&filepath=clab%2Fgraph.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=srl-labs#diff-Y2xhYi9ncmFwaC5nbw==) | `14.49% <35.71%> (+14.49%)` | :arrow_up: | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/srl-labs/containerlab/pull/2291/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=srl-labs)