Ejemplo n.º 1
0
        def dashboard():
            not_configured = self.check_configured()
            if not_configured:
                return not_configured

            plot = Plot(self.control.statestore)
            try:
                valid_metrics = plot.fetch_valid_metrics()
                box_plot = plot.create_box_plot(valid_metrics[0])
            except Exception as e:
                valid_metrics = None
                box_plot = None
                print(e, flush=True)
            table_plot = plot.create_table_plot()
            # timeline_plot = plot.create_timeline_plot()
            timeline_plot = None
            clients_plot = plot.create_client_plot()
            return render_template('dashboard.html',
                                   show_plot=True,
                                   box_plot=box_plot,
                                   table_plot=table_plot,
                                   timeline_plot=timeline_plot,
                                   clients_plot=clients_plot,
                                   metrics=valid_metrics,
                                   configured=True)
Ejemplo n.º 2
0
 def dashboard():
     from fedn.clients.reducer.plots import Plot
     plot = Plot(self.control.statestore)
     box_plot = plot.create_box_plot()
     table_plot = plot.create_table_plot()
     #timeline_plot = plot.create_timeline_plot()
     timeline_plot = None
     clients_plot = plot.create_client_plot()
     return render_template(
         'index.html',
         show_plot=True,
         box_plot=box_plot,
         table_plot=table_plot,
         timeline_plot=timeline_plot,
         clients_plot=clients_plot,
     )