示例#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)
示例#2
0
        def change_features():
            """

            :return:
            """
            feature = request.args['selected']
            plot = Plot(self.control.statestore)
            graphJSON = plot.create_box_plot(feature)
            return graphJSON
示例#3
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,
     )