Beispiel #1
0
    def __init__(self, filepath):
        LOGGER.debug("Using admin command line interface!")

        self.parser = ConfigParser.SafeConfigParser()
        self.parser.readfp(open(filepath))

        ProxyManager.__init__(self)

        self.actions()
Beispiel #2
0
 def create_new_database(self):
     '''
     raise a dialog, then create a database with the chosen name
     '''
     dl = NewDatabaseDialog(self)
     if not dl.exec_() or dl.database_name == "":
         self.display_proxy_message()
         return
     dbname = dl.database_name
     try:
         ProxyManager.create_database(self, dbname)
     except ProxyClient.PermissionError as exc:
         self.advise(exc.message, 2)
Beispiel #3
0
 def create_new_database(self):
     '''
     raise a dialog, then create a database with the chosen name
     '''
     dl = NewDatabaseDialog(self)
     if not dl.exec_() or dl.database_name == "":
         self.display_proxy_message()
         return
     dbname = dl.database_name
     try:
         ProxyManager.create_database(self, dbname)
     except ProxyClient.PermissionError as exc:
         self.advise(exc.message, 2)
Beispiel #4
0
 def _init_proxies(self):
     '''
     called at startup, and by the om_connect action
     '''
     self.wait()
     self.advise(_("Initiating OMServer connections"))
     self.advise(u"%s....."% _("Please wait"))
     ProxyManager._init_proxies(self)
     self.known_server_widget.clear()
     for client in self.proxy_clients:
         self.known_server_widget.add_proxy_client(client)
     self.known_server_widget.setEnabled(True)
     self.wait(False)
     self.advise(u"....%s"% _("Done!"))
Beispiel #5
0
 def _init_proxies(self):
     '''
     called at startup, and by the om_connect action
     '''
     self.wait()
     self.advise(_("Initiating OMServer connections"))
     self.advise(u"%s....." % _("Please wait"))
     ProxyManager._init_proxies(self)
     self.known_server_widget.clear()
     for client in self.proxy_clients:
         self.known_server_widget.add_proxy_client(client)
     self.known_server_widget.setEnabled(True)
     self.wait(False)
     self.advise(u"....%s" % _("Done!"))
Beispiel #6
0
    def create_demo_database(self):
        '''
        initiates the demo database
        '''
        LOGGER.info("creating demo database")
        result = ProxyManager.create_demo_database(self)
        LOGGER.info(result)
        if (result and QtGui.QMessageBox.question(
                self, _("Confirm"), u"%s" % _("Populate with demo data now?"),
                QtGui.QMessageBox.Ok | QtGui.QMessageBox.Cancel,
                QtGui.QMessageBox.Ok) == QtGui.QMessageBox.Ok):
            self.populate_demo()

        self.display_proxy_message()
Beispiel #7
0
    def create_demo_database(self):
        '''
        initiates the demo database
        '''
        LOGGER.info("creating demo database")
        result = ProxyManager.create_demo_database(self)
        LOGGER.info(result)
        if (result and
        QtGui.QMessageBox.question(self, _("Confirm"),
        u"%s"% _("Populate with demo data now?"),
        QtGui.QMessageBox.Ok | QtGui.QMessageBox.Cancel,
        QtGui.QMessageBox.Ok) == QtGui.QMessageBox.Ok):
            self.populate_demo()

        self.display_proxy_message()
Beispiel #8
0
 def om_disconnect(self):
     ProxyManager.om_disconnect(self)
     self.known_server_widget.clear()
     self.known_server_widget.setEnabled(False)
Beispiel #9
0
 def om_disconnect(self):
     ProxyManager.om_disconnect(self)
     self.known_server_widget.clear()
     self.known_server_widget.setEnabled(False)