|
|
|
@ -11,7 +11,7 @@ from birdvisu.annotations import AnnotatedTopology, AnnotatorID
|
|
|
|
|
from birdvisu.annotations.analysis import TopologyDifference, ShortestPathTree
|
|
|
|
|
from birdvisu.annotations.layout import PlaceVerticesFromFile, PlaceUnplacedVertices, EdgeWidthByCost, HighlightTopoDiff, HighlightSPDAG, HighlightShortestPath
|
|
|
|
|
from birdvisu.ospfsock import BirdSocketConnection
|
|
|
|
|
from birdvisu.providers import BirdSocketTopologyProvider, OspfFileTopologyProvider, OspfFileParseError
|
|
|
|
|
from birdvisu.providers import BirdSocketTopologyProvider, OspfFileTopologyProvider, OspfFileParseError, DummyTopologyProvider
|
|
|
|
|
from birdvisu.topo_v3 import TopologyV3, VertexID
|
|
|
|
|
from birdvisu.graphics_items import RouterGraphicsItem, NetworkGraphicsItem, EdgeGraphicsItem
|
|
|
|
|
|
|
|
|
@ -106,9 +106,13 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
|
|
|
self.menubar.addAction(autoload_act)
|
|
|
|
|
|
|
|
|
|
topo_menu = self.menubar.addMenu('&Topology')
|
|
|
|
|
ref_menu = topo_menu.addMenu("&Reference")
|
|
|
|
|
open_ref_act = QtGui.QAction("&Load reference", self)
|
|
|
|
|
open_ref_act.triggered.connect(self.openRefTopology)
|
|
|
|
|
topo_menu.addAction(open_ref_act)
|
|
|
|
|
ref_menu.addAction(open_ref_act)
|
|
|
|
|
no_ref_act = QtGui.QAction("&No reference topology", self)
|
|
|
|
|
no_ref_act.triggered.connect(self.noRefTopology)
|
|
|
|
|
ref_menu.addAction(no_ref_act)
|
|
|
|
|
|
|
|
|
|
cur_topo_menu = topo_menu.addMenu("Load ¤t")
|
|
|
|
|
running_bird_act = QtGui.QAction('&BIRD', self)
|
|
|
|
@ -231,6 +235,11 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
|
|
|
self.highlighter = HighlightShortestPath((self.start_vertex, self.end_vertex))
|
|
|
|
|
self.apply_styles()
|
|
|
|
|
|
|
|
|
|
@Slot()
|
|
|
|
|
def noRefTopology(self):
|
|
|
|
|
self.ref_topo_provider = DummyTopologyProvider()
|
|
|
|
|
self.refreshTopologies()
|
|
|
|
|
|
|
|
|
|
@Slot()
|
|
|
|
|
def openRefTopology(self):
|
|
|
|
|
filename = QtWidgets.QFileDialog.getOpenFileName(self, 'Open reference topology', '.', 'OSPF files (*.ospf);;All files(*)')[0]
|
|
|
|
|