# Connections
m.add_handler(AnalyticsNetworkConnectionsOverviewHandler)
+ # Fragmentation
+ m.add_handler(AnalyticsNetworkIPFragmentationHandler)
+
return m
self.render_graphs(graphs)
+class AnalyticsNetworkIPFragmentationHandler(AnalyticsNetworkBaseHandler):
+ url = r"/analytics/network/fragmentation"
+ title = N_("Fragmentation")
+
+ def get(self):
+ _ = self.locale.translate
+
+ graphs = [
+ ui.graphs.Graph(self, "ipv6-fragmentation"),
+ ui.graphs.Graph(self, "ipv4-fragmentation"),
+ ]
+
+ self.render_graphs(graphs)
+
+
class AnalyticsSystemBaseHandler(AnalyticsBaseHandler):
@property
def menu(self):
g = ui.graphs.Graph(self, template_name, object_id=object_id)
# Generate the graph image
- image = g.generate_graph(format=format.upper(), interval=interval,
- height=height, width=width)
+ kwargs = {
+ "format" : format.upper(),
+ "interval" : interval,
+ "height" : height,
+ "width" : width,
+
+ # Include the title in the PDF exports
+ "with_title" : format == "pdf",
+ }
+ image = g.generate_graph(**kwargs)
# Set the HTTP headers
self._make_headers(format, template_name, object_id)