Beispiel #1
0
class DashboardServerPlugin(BaseTaskPlugin):
    dashboard_server = Instance(DashboardServer)

    def _tasks_default(self):
        return [
            TaskFactory(id='pychron.dashboard.server',
                        name='Dashboard Server',
                        accelerator='Ctrl+4',
                        factory=self._factory)
        ]

    def _factory(self):
        f = DashboardServerTask(server=self.dashboard_server)
        return f

    def start(self):
        app = self.application
        elm = app.get_service(
            'pychron.extraction_line.extraction_line_manager.ExtractionLineManager'
        )
        labspy = app.get_service('pychron.labspy.client.LabspyClient')

        self.dashboard_server = DashboardServer(application=app,
                                                labspy_client=labspy,
                                                extraction_line_manager=elm)

    def stop(self):
        self.dashboard_server.deactivate()

    @on_trait_change('application:started')
    def start_server(self):
        do_after(5000, self.dashboard_server.activate)
Beispiel #2
0
class DashboardServerPlugin(BaseTaskPlugin):
    dashboard_server = Instance(DashboardServer)

    def _tasks_default(self):
        return [TaskFactory(id='pychron.dashboard.server',
                            name='Dashboard Server',
                            accelerator='Ctrl+4',
                            factory=self._factory)]

    def _factory(self):
        f = DashboardServerTask(server=self.dashboard_server)
        return f

    def start(self):
        app = self.application
        elm = app.get_service('pychron.extraction_line.extraction_line_manager.ExtractionLineManager')
        labspy = app.get_service('pychron.labspy.client.LabspyClient')

        self.dashboard_server = DashboardServer(application=app,
                                                labspy_client=labspy,
                                                extraction_line_manager=elm)
        self.dashboard_server.bind_preferences()

    def _preferences_panes_default(self):
        return [DashboardServerPreferencesPane]

    def stop(self):
        self.dashboard_server.deactivate()

    @on_trait_change('application:started')
    def start_server(self):
        do_after(5000, self.dashboard_server.activate)
Beispiel #3
0
    def start(self):
        app = self.application
        elm = app.get_service(
            'pychron.extraction_line.extraction_line_manager.ExtractionLineManager'
        )
        labspy = app.get_service('pychron.labspy.client.LabspyClient')

        self.dashboard_server = DashboardServer(application=app,
                                                labspy_client=labspy,
                                                extraction_line_manager=elm)
Beispiel #4
0
    def start(self):
        app= self.application
        elm = app.get_service('pychron.extraction_line.extraction_line_manager.ExtractionLineManager')
        labspy = app.get_service('pychron.labspy.client.LabspyClient')

        self.dashboard_server = DashboardServer(application=app,
                                                labspy_client=labspy,
                                                extraction_line_manager=elm)
Beispiel #5
0
class DashboardServerPlugin(BaseTaskPlugin):
    dashboard_server = Instance(DashboardServer)

    def _tasks_default(self):
        return [TaskFactory(id='pychron.dashboard.server',
                            name='Dashboard Server',
                            accelerator='Ctrl+4',
                            factory=self._factory)]

    def _factory(self):
        f = DashboardServerTask(server=self.dashboard_server)
        return f

    def start(self):
        self.dashboard_server = DashboardServer(application=self.application)
        s = self.dashboard_server
        s.activate()

    def stop(self):
        self.dashboard_server.deactivate()
Beispiel #6
0
    def setUpClass(cls):
        man = DashboardDBManager(connect=False)
        man.db.kind = 'mysql'
        man.db.name = 'isotopedb_dev'
        man.db.password = '******'
        man.db.username = '******'
        man.db.host = 'localhost'
        man.db.connect()
        cls.man = man

        cls.server = DashboardServer()
        cls.server.db_manager = man
        cls.server._load_devices()
Beispiel #7
0
 def start(self):
     self.dashboard_server = DashboardServer(application=self.application)
     s = self.dashboard_server
     s.activate()