Commit Graph

77 Commits (styling)
 

Author SHA1 Message Date
LEdoian 6b2772d160 Extend visualisation.ospf to include styles
A concept/idea stage atm, but seems simple enough and nice.

The builtin style might want to have a sigil. The default possibly too.

The core idea is that everything that is not annotated uses the
"default" style, which is user-tweakable and defaults to the "builtin"
style, which makes sure everything gets drawn in some sane way.

Implementation-wise, a first annotator would lay out the vertices and
shortcut them possibly, second one would lay out the
unpositioned-but-shown vertices (in a similar way to the
random_positioner), third would process the styling graph and annotate
with styling directives. The actual visualisation would then just read
the annotations and topology¹ and draw that into the QGraphicsScene.

¹ We might need to devise a different representation to make sure thaat
the shortcuts work reasonably.

For a very broad overview, something akin to:
	style default
		hide
	style important
		show
		pen color red
could be used.

The styling should possibly be in opposite order: object property
params. This way, we can quickly ignore the irrelevant properties (like
line width for vertices)

An extreme but probably workable idea would be to reuse a TopologyV3.
While the families and addresses make zero sense, it could represent the
reduced graph. However, we would need some way of mapping the new
vertices/edges to the old ones (for Dijkstra &c.), so it is probably
just better to create an Annotator-driven "overlay" in the existing
AnnotatedTopology (reuse a subset of VertexIDs, maybe create own Edges.
Those objects can exist without a TopologyV3, so it is fine. Also, at
that point we do not need to use too-reasonable objects in the
Annotations.)

Regarding the "icon router bleg.svg": We will probably want to only
allow files from assets in the beginning, so that the visualisation
files are portable without any restrictions. In future, we could have a
visualisation-relative resolution and/or directives to add other paths.
(maybe with prefixes, Pelican style)

The styles should possibly be top-level directives, not l2, so that they
are reusable between presets (in the same file)
1 year ago
LEdoian 57f148d50d Start reimplementing poor_mans_visualisation.py
This script serves as a simple demonstration of how to use birdvisu.
Over time, it should become shorter, as more of its features are
integrated into birdvisu itself, until at last it becomes only a very
thin wrapper.

The functionality will probably be incorporated into some core /
orchestrator birdvisu module, but there is no such thing yet.
1 year ago
LEdoian 266408b99b Add module docstring for annotations.analysis 1 year ago
LEdoian 51fdef55bd Improve annotation core and add basic analysis annotators. 1 year ago
LEdoian 7cfa7ea2bf Split visualisation directives to separate file.
This allows us to safely reuse the OspfFileTopologyParser without having
it ignore unknown directives.
1 year ago
LEdoian c61bc10084 Fix comments in reference.ospf 1 year ago
LEdoian 113c540e19 Fix more dumb mistakes, in annotations this time 1 year ago
LEdoian 8dad17c259 Fix stupid bugs
I can't code, don't tell anyone.

Now it can read the topology from running BIRD without crashing.
1 year ago
LEdoian 61b058bcfc Fix mishandling of BirdErrors in BirdSocketTopologyProvider 1 year ago
LEdoian 2cb43bbc9f Fix assignment instead of type hint 1 year ago
LEdoian f7f064147c Reimplemented TopologyProviders to generate TopologyV3
If this works (it might), we may be able to drop original topology
implementation (which is horrible)
1 year ago
LEdoian b9ae64f643 Add all the networks in a vertex to the index in VertexFinder. 1 year ago
LEdoian 7cf33d0fa2 Allow multiple or none addres ranges for vertices 1 year ago
LEdoian 18b695462d Remove a setter for a frozen dataclass
You cannot set that anyway.
1 year ago
LEdoian a47f3849dd Rename ExternalRouter to ExtraAreaRouter
That is what 'xrouter' in ospffile really means. IIRC OSPF does not
represent (AS-)external ptp links differently.
1 year ago
LEdoian a0ae4abfc7 Fix a few mistakes
thanks mypy
1 year ago
LEdoian d17c8c4585 Guard against bad edges being added to topology 1 year ago
LEdoian b6711dd32e Add a few clarifications
The clarifications sometimes are about change that will come in a future
commit, sorry for that. (But the order of commits on this branch is
broken anyway…)
1 year ago
LEdoian 6a912ec51d Fix a few typos in annotations/__init__.py
Found using mypy.
1 year ago
LEdoian 53098c4b41 Fix exception message 1 year ago
LEdoian e80a4e5424 Reimplement TopologyProvider core
At this moment it no actual providers are present, but the parsing of
ospffile is the bigger part of providing topologies.

Maybe this file is not the good place for that code.
1 year ago
LEdoian 460738b84f Implement the two types of costs in TopologyV3 1 year ago
LEdoian 2ae6c5a44b Reimplement annotators using classes 1 year ago
LEdoian 610198ea6b Add topology v3
This is a re-implemented topology, which should be more compatible with
OSPF's idea of a network system.
1 year ago
LEdoian ac3508727d Unify the two READMEs 1 year ago
LEdoian f9f6804f30 Merge remote-tracking branch 'gitea/docs' 1 year ago
LEdoian 765a1944c3 Merge remote-tracking branch 'gitea/toolchain_setup' 1 year ago
LEdoian 682a3e4be2 Reference: Nicer layout.
Layouting using random.random is not really great, unsurprisingly.
1 year ago
LEdoian ef39d1a9a5 Drop the symlink in snippets
Since the project can now be installed with pip editable install, it is
now in sys.path and therefore installable out-of-box
1 year ago
LEdoian b8fc724070 Add a readme with really basic info.
I do not expect the readme to contain much, it will mostly link to the
documentation, which should become really complete.
1 year ago
LEdoian 02b459ad55 Ensure, that sphinx works
This is a trivial intro message, just to make sure docs can be written
and built.

May serve as a reference commit on how to add new pages to
documentation.
1 year ago
LEdoian d62007c2c5 We will use autodoc
… one day, hopefully :-)
1 year ago
LEdoian be03b7fb51 Graphviz: Allow specifying layout engine on cmdline
It's better for demonstration purposes.
1 year ago
LEdoian e95ca088a5 ospfsock: Wait for the socket answer
The error handling is horrible though.
1 year ago
LEdoian cafdd3cd07 Merge branch 'socket_api' 1 year ago
LEdoian 159c122f67 Use the new TopoProvider in poor_mans_visualisation.py 1 year ago
LEdoian 333d415b6c Add a few types to make mypy happier 1 year ago
LEdoian 4b9276621d Fix a few typos 1 year ago
LEdoian e9ff79c57f Implement definitive (?) reading from BIRD socket 1 year ago
LEdoian 6e70500ded Ignore Python virtualenvs 2 years ago
LEdoian 1b0bc3e032 Init sphinx
Very basic, but hopefully workable. We mainly need something to put the
docs into, the exact solution does not matter much now.
2 years ago
LEdoian 52050338d6 More text in README 2 years ago
LEdoian 927bc8857d Initial version of packaging
This is only support "code", the real code has not been migrated yet.
Also, the README is quite lacking in content.
2 years ago
LEdoian 5cc5685ae3 [WIP] Early code for handling BIRD's control socket. 2 years ago
LEdoian 822fc1c507 Add note about supported OSPFv3 2 years ago
LEdoian 6f3286be4f Add tooltips to all nodes
When labels end up too close to each other, it is hard to read them,
this helps.
2 years ago
LEdoian fe5ff025f5 OSPF provider: quick ugly hack with various metrics
This does not really make sense. But I want this to run, fixes will
follow :-)
2 years ago
LEdoian 6c91be573e Fix positioning of qgritems 2 years ago
LEdoian 999f6988cb Poor man's visualisation: +x 2 years ago
LEdoian 6c75c7e1cd Poor man's visualisation: cope with no BIRD client. 2 years ago