Example #1
0
    def __init__(self, server_instance_settings):
        AppView.__init__(self, False, "admin", True)

        server_profile = ServerProfile(server_instance_settings, False)

        self.ctrl_be = wb_admin_control.WbAdminControl(server_profile, connect_sql=True)

        self.ctrl_be.init()

        version = self.ctrl_be.get_server_version()
        if type(version) is tuple:
            valid_versions = ((4, 0), (4, 1), (5, 0), (5, 1), (5, 2), (5, 4), (5, 5), (5, 6), (6, 0))
            if version[:2] not in valid_versions:
                print version, "UNSUPPORTED"
                log_warning(
                    _this_file, "%s: Server version %s is NOT supported\n" % (self.__class__.__name__, str(version))
                )
            else:
                log_info(_this_file, "%s: Server version %s is supported\n" % (self.__class__.__name__, str(version)))

        self.on_close(wb_admin_utils.weakcb(self, "handle_on_close"))

        # Create sections and add them to the admin page.
        self.configuration = wb_admin_main.WbAdminMainView(server_profile, self.ctrl_be, self.monitor)
        self.add(self.configuration, True, True)
Example #2
0
    def __init__(self, server_instance_settings):
        AppView.__init__(self, False, "admin", True)

        server_profile = ServerProfile(server_instance_settings, False)

        self.ctrl_be = wb_admin_control.WbAdminControl(server_profile,
                                                       connect_sql=True)

        self.ctrl_be.init()

        version = self.ctrl_be.get_server_version()
        if type(version) is tuple:
            valid_versions = ((4, 0), (4, 1), (5, 0), (5, 1), (5, 2), (5, 4),
                              (5, 5), (5, 6), (6, 0))
            if version[:2] not in valid_versions:
                print version, "UNSUPPORTED"
                log_warning(
                    _this_file, "%s: Server version %s is NOT supported\n" %
                    (self.__class__.__name__, str(version)))
            else:
                log_info(
                    _this_file, "%s: Server version %s is supported\n" %
                    (self.__class__.__name__, str(version)))

        self.on_close(wb_admin_utils.weakcb(self, "handle_on_close"))

        # Create sections and add them to the admin page.
        self.configuration = wb_admin_main.WbAdminMainView(
            server_profile, self.ctrl_be, self.monitor)
        self.add(self.configuration, True, True)
Example #3
0
    def __init__(self, server_port):
        AppView.__init__(self, False, "doclib", True)

        self.browser = newWebBrowser()
        self.add(self.browser, True, True)
        self.browser.add_loaded_callback(self.loaded)
        self.browser.navigate("http://localhost:%i" % server_port)
        
        self.on_close(self.handle_on_close)
Example #4
0
    def __init__(self, server_port):
        AppView.__init__(self, False, "doclib", True)

        self.browser = newWebBrowser()
        self.add(self.browser, True, True)
        self.browser.add_loaded_callback(self.loaded)
        self.browser.navigate("http://localhost:%i" % server_port)

        self.on_close(self.handle_on_close)