Пример #1
0
    def finish_initializing(self):
        self.chef_is_configured = serverconf.chef_is_configured()
        self.json_cached = serverconf.json_is_cached()
        self.show_status()

        self.ui.chkUnlinkChef.set_visible(self.chef_is_configured)
        self.ui.chkLinkChef.set_visible(not self.chef_is_configured)
Пример #2
0
    def finish_initializing(self):

        self.show_status()

        self.ldap_is_configured = serverconf.ldap_is_configured()
        self.chef_is_configured = serverconf.chef_is_configured()

        show_conf_fields = not (self.ldap_is_configured & self.chef_is_configured)
        if not show_conf_fields:
            self.ui.radioOmit.set_visible(False)
            self.ui.radioManual.set_visible(False)
            self.ui.radioAuto.set_visible(False)
            self.ui.lblUrl.set_visible(False)
            self.ui.txtUrl.set_visible(False)
            self.main_window.btnNext.set_sensitive(False)

        self.ui.chkUnlinkLDAP.set_visible(self.ldap_is_configured)
        self.ui.chkUnlinkChef.set_visible(self.chef_is_configured)

        url_config = self.fbe.get_url()
        url = self.cmd_options.url

        if url == None or len(url) == 0:
            url = url_config

        if url == None or len(url) == 0:
            url = ''

        self.ui.txtUrl.set_text(url)
Пример #3
0
 def finish_initializing(self):
     self.gcc_is_configured = serverconf.gcc_is_configured()
     server_conf = serverconf.get_server_conf(None)
     self.show_status()
     self.ui.btnUnlinkLocally.set_visible(
         self.gcc_is_configured or serverconf.chef_is_configured())
     self.ui.chkUnlinkChef.set_visible(self.gcc_is_configured)
     self.ui.chkLinkChef.set_visible(not self.gcc_is_configured)
     if server_conf.get_gcc_conf().get_gcc_link(
     ) and not self.gcc_is_configured:
         self.ui.chkLinkChef.set_active(True)
Пример #4
0
 def on_btnUnlinkLocally_clicked(self, button):
     result = serverconf.message_box(
         _("Unlink Locally"),
         _("Are you sure to unlink locally this workstation?"))
     if result == 1:
         try:
             if serverconf.chef_is_configured():
                 serverconf.clean_conf_chef()
             if serverconf.gcc_is_configured():
                 serverconf.clean_conf_gcc()
             self.finish_initializing()
         except Exception as e:
             serverconf.display_errors(
                 _("Unlink Error"),
                 [_("An error occurred during the locally unlink")])
Пример #5
0
    def finish_initializing(self):

        self.show_status()
        self.chef_is_configured = serverconf.chef_is_configured()

        self.ui.radioOmit.set_visible(not self.chef_is_configured)
        self.ui.radioManual.set_visible(not self.chef_is_configured)
        self.ui.radioAuto.set_visible(not self.chef_is_configured)
        self.ui.lblUrl.set_visible(not self.chef_is_configured)
        self.ui.txtUrl.set_visible(not self.chef_is_configured)
        self.ui.chkUnlinkChef.set_visible(self.chef_is_configured)

        url_config = self.fbe.get_url()
        url = self.cmd_options.url

        if url == None or len(url) == 0:
            url = url_config

        if url == None or len(url) == 0:
            url = ''

        self.ui.txtUrl.set_text(url)