def __safe_call__(self): # Ensure the current UID has enough priviledges if not InstallUtil.current_UID_is_admin() and 0: box = CTK.Box() box += CTK.RawHTML('<h2>%s</h2>' % (_(NO_ROOT_H1))) box += CTK.RawHTML('<p>%s</p>' % (_(NO_ROOT_P1))) box += CTK.RawHTML('<p>%s</p>' % (_(NO_ROOT_P2))) buttons = CTK.DruidButtonsPanel() buttons += CTK.DruidButton_Close(_('Cancel')) box += buttons return box.Render().toStr() # Check the rest of pre-requisites index = Distro.Index() app_id = CTK.cfg.get_val('tmp!market!install!app!application_id') app = index.get_package(app_id, 'software') inst = index.get_package(app_id, 'installation') if 'cherokee_min_ver' in inst: version = inst['cherokee_min_ver'] if version_cmp(VERSION, version) < 0: box = CTK.Box() box += CTK.RawHTML('<h2>%s</h2>' % (_(MIN_VER_H1))) box += CTK.RawHTML('<p>%s</p>' % (_(MIN_VER_P1) % (locals()))) buttons = CTK.DruidButtonsPanel() buttons += CTK.DruidButton_Close(_('Cancel')) box += buttons return box.Render().toStr() # Init the log file Install_Log.reset() Install_Log.log(".---------------------------------------------.") Install_Log.log("| PLEASE, DO NOT EDIT OR REMOVE THIS LOG FILE |") Install_Log.log("| |") Install_Log.log("| It contains useful information that |") Install_Log.log("| cherokee-admin might need in the future. |") Install_Log.log(".---------------------------------------------.") Install_Log.log("Retrieving package information...") # Check whether there are CTK.cfg changes to be saved changes = "01"[int(CTK.cfg.has_changed())] CTK.cfg['tmp!market!install!cfg_previous_changes'] = changes # Render a welcome message box = CTK.Box() box += CTK.RawHTML( js=CTK.DruidContent__JS_to_goto(box.id, URL_INSTALL_DOWNLOAD)) return box.Render().toStr()
def __safe_call__(self): box = CTK.Box() box += CTK.RawHTML('<h2>%s</h2>' % (_("Nagios start up"))) box += CTK.RawHTML('<p>%s</p>' % (_( "Nagios requires the Nagios system service to be launched at boot time. It is recommended that you allow the installer to add the service to your system." ))) table = CTK.PropsTable() table.Add( _('Add system service'), CTK.CheckCfgText('%s!nagiosstartup' % (PRE), True, _('Enable'), {'class': 'noauto'}), _('Mark the checkbox to automatically launch Nagios on start up.')) submit = CTK.Submitter(URL_APPLY) submit += table submit.bind('submit_success', CTK.DruidContent__JS_to_goto(box.id, URL_LAUNCH_SERVICE)) box += submit buttons = CTK.DruidButtonsPanel() buttons += CTK.DruidButton_Close(_('Cancel')) buttons += CTK.DruidButton_Submit(_('Next'), do_close=False) box += buttons return box.Render().toStr()
def __safe_call__(self): box = CTK.Box() box += CTK.RawHTML('<h2>%s</h2>' % (_('Access details'))) box += CTK.RawHTML('<p>%s</p>' % (_( 'Nuxeo-DAM has been installed, and Cherokee is configured to automatically launch it whenever the resource is accessed if it is not already available. A one-time pre-launch has been issued to save time.' ))) box += CTK.RawHTML('<p>%s</p>' % (_( 'Note that launching Nuxeo-DAM can take up a couple of minutes on modern servers, so please be patient the first time you access it.' ))) box += CTK.RawHTML('<p>%s</p>' % (_( 'It is probably a good idea to pre-launch it instead of having the web-server do so on demand.' ))) box += CTK.RawHTML('<p>%s</p>' % (_('These are the default access details:'))) notice = CTK.Notice() notice += CTK.RawHTML('<b>%s:</b>' % (_('Username'))) notice += CTK.Indenter(CTK.RawHTML('Administrator')) notice += CTK.RawHTML('<b>%s:</b>' % (_('Password'))) notice += CTK.Indenter(CTK.RawHTML('Administrator')) box += notice buttons = CTK.DruidButtonsPanel() buttons += CTK.DruidButton_Goto(_('Next'), market.Install.URL_INSTALL_DONE, do_submit=True) box += buttons return box.Render().toStr()
def __safe_call__(self): box = CTK.Box() box += CTK.RawHTML('<h2>%s</h2>' % (_("Checking Dependencies"))) error_cc = tools.check_cc() error_py = python.detect_python("2.5.0", or_greater=True) error_xml = tools.check_xml2config() if error_cc: note, inst = error_cc elif error_py: note, inst = error_py elif error_xml: note, inst = error_xml else: box += CTK.RawHTML( js=CTK.DruidContent__JS_to_goto(box.id, URL_TARGET)) return box.Render().toStr() box += market.Util.InstructionBox(_(note), inst) buttons = CTK.DruidButtonsPanel() buttons += CTK.DruidButton_Close(_('Cancel')) buttons += CTK.DruidButton_Goto(_('Retry'), URL_PRECONDITION, do_submit=True) return box.Render().toStr()
def __call__(self): commands = [] for app in CTK.cfg.keys('tmp!market!maintenance!remove'): # Should it be deleted? delete = CTK.cfg.get_val( 'tmp!market!maintenance!remove!%s!del' % (app), 0) if not int(delete): continue # Build the command list name = CTK.cfg.get_val('tmp!market!maintenance!remove!%s!name' % (app)) date = CTK.cfg.get_val('tmp!market!maintenance!remove!%s!date' % (app)) entry = {} entry['description'] = _("Removing %(name)s (%(date)s)" % (locals())) entry['function'] = lambda app=app: _remove_app(app) commands += [entry] cont = CTK.Container() cont += CTK.RawHTML("<h2>%s</h2>" % (_("Removing Applications"))) cont += CommandProgress.CommandProgress(commands, URL_MAINTENANCE_FINISHED) buttons = CTK.DruidButtonsPanel() buttons += CTK.DruidButton_Close(_('Cancel')) cont += buttons return cont.Render().toStr()
def content(): box = CTK.Box() # Submit 1 submit = CTK.Submitter ('/submit_ok') submit += CTK.TextField ({'name': '1', 'value': '1'}) box += CTK.RawHTML("<h2>Submit 1</h2>") box += submit # Submit 2 submit = CTK.Submitter ('/submit_ok') submit += CTK.TextField ({'name': '2', 'value': '2'}) box += CTK.RawHTML("<h2>Submit 2</h2>") box += submit # Submit 3 submit = CTK.Submitter ('/submit_fail') submit += CTK.TextField ({'name': '3', 'value': '3'}) box += CTK.RawHTML("<h2>Submit 3</h2>") box += submit buttons = CTK.DruidButtonsPanel() buttons += CTK.DruidButton_Goto (_('Next'), '/fin', do_submit=True) box += buttons return box.Render().toStr()
def __safe_call__(self): box = CTK.Box() buttons = CTK.DruidButtonsPanel() pre = "tmp!market!install" submit = CTK.Submitter(URL_APPLY) table = CTK.PropsTable() table.Add(_('Trac User'), CTK.TextCfg('%s!user' % (pre), False, {'class': 'noauto'}), _(NOTE_USER)) table.Add( _('Trac Password'), CTK.TextCfg('%s!password' % (pre), False, {'class': 'noauto'}), _(NOTE_PASSWORD)) submit += table submit.bind('submit_success', CTK.DruidContent__JS_to_goto(box.id, URL_SERVER_CONFIG)) box += CTK.RawHTML('<h2>%s</h2>' % (_(NOTE_AUTHLIST_H))) box += CTK.RawHTML('<p>%s</p>' % (_(NOTE_AUTHLIST_P))) box += submit buttons += CTK.DruidButton_Close(_('Cancel')) buttons += CTK.DruidButton_Submit(_('Next'), do_close=False) box += buttons return box.Render().toStr()
def __safe_call__(self): box = CTK.Box() box += CTK.RawHTML('<h2>%s</h2>' % (_("Checking Requirements"))) buttons = CTK.DruidButtonsPanel() buttons += CTK.DruidButton_Close(_('Cancel')) buttons += CTK.DruidButton_Goto(_('Retry'), URL_PRECONDITION, do_submit=True) # CC if not cc.detect_cc(): box += InstructionBox(_(cc.NOTE), cc.CC_INSTRUCTIONS) box += buttons return box.Render().toStr() # Database supported_dbs = database.get_supported_dbs(DB_SUPPORTED) if not supported_dbs: box += database.PreconditionError(DB_SUPPORTED) box += buttons return box.Render().toStr() box += CTK.RawHTML(js=CTK.DruidContent__JS_to_goto(box.id, URL_TARGET)) return box.Render().toStr()
def __safe_call__(self): box = CTK.Box() box += CTK.RawHTML('<h2>%s</h2>' % (_("Checking Dependencies"))) buttons = CTK.DruidButtonsPanel() buttons += CTK.DruidButton_Close(_('Cancel')) buttons += CTK.DruidButton_Goto(_('Retry'), URL_PRECONDITION, do_submit=True) # Check PHP php_cgi_bin = php.figure_phpcgi_binary() if not php_cgi_bin: box += php.PHP_Interpreter_Not_Found_Widget() box += buttons return box.Render().toStr() # Database supported_dbs = database.get_supported_dbs(DB_SUPPORTED) if not supported_dbs: box += database.PreconditionError(DB_SUPPORTED) box += buttons return box.Render().toStr() # PHP modules error = tools.check_requirements() if error: box += InstructionBox(error[0], error[1]) box += buttons return box.Render().toStr() box += CTK.RawHTML(js=CTK.DruidContent__JS_to_goto(box.id, URL_TARGET)) return box.Render().toStr()
def __call__(self): application_id = CTK.request.url.split('/')[-1] # Build the content submit = CTK.Submitter(URL_REPORT_APPLY) submit += CTK.TextArea({ 'name': 'report', 'rows': 10, 'cols': 60, 'class': 'noauto' }) submit += CTK.Hidden('app_id', application_id) submit.bind('submit_fail', CTK.DruidContent__JS_to_goto(submit.id, URL_REPORT_FAIL)) submit.bind('submit_success', CTK.DruidContent__JS_to_goto(submit.id, URL_REPORT_OK)) cont = CTK.Container() cont += CTK.RawHTML("<h2>%s</h2>" % (_(NOTE_REPORT_H2))) cont += CTK.RawHTML("<p>%s</p>" % (_(NOTE_REPORT_EXPLAIN))) cont += CTK.RawHTML("<p>%s</p>" % (_(NOTE_REPORT_COMMENT))) cont += submit buttons = CTK.DruidButtonsPanel() buttons += CTK.DruidButton_Submit(_("Report")) buttons += CTK.DruidButton_Close(_("Cancel")) cont += buttons return cont.Render().toStr()
def __safe_call__ (self): box = CTK.Box() box += CTK.RawHTML ('<h2>%s</h2>' %(_("Checking Requirements"))) buttons = CTK.DruidButtonsPanel() buttons += CTK.DruidButton_Close(_('Cancel')) buttons += CTK.DruidButton_Goto (_('Retry'), URL_PRECONDITION, do_submit=True) # Check PHP php_cgi_bin = php.figure_phpcgi_binary() if not php_cgi_bin: box += php.PHP_Interpreter_Not_Found_Widget() box += buttons return box.Render().toStr() # Check at least one php DB module is available db_errors = tools.check_php_database_support() if db_errors: note, instruction_list = db_errors box += market.Util.InstructionBox (note, instruction_list, bin_path=php_cgi_bin) box += buttons return box.Render().toStr() # Database supported_dbs = database.get_supported_dbs (DB_SUPPORTED) if not supported_dbs: box += database.PreconditionError (DB_SUPPORTED) box += buttons return box.Render().toStr() box += CTK.RawHTML (js = CTK.DruidContent__JS_to_goto (box.id, URL_TARGET)) return box.Render().toStr()
def __safe_call__(self): nagiosuser = CTK.cfg.get_val('%s!nagiosuser' % (PRE)) nagiosgroup = CTK.cfg.get_val('%s!nagiosgroup' % (PRE)) nagioscmd = CTK.cfg.get_val('%s!nagioscmd' % (PRE)) root = CTK.cfg.get_val('%s!root' % (PRE)) box = CTK.Box() box += CTK.RawHTML('<h2>%s</h2>' % (_("Checking System Users"))) # Installation ret = tools.create_credentials(nagiosuser, nagiosgroup, nagioscmd, root) if ret.get('ret') == True: box += CTK.RawHTML( js=CTK.DruidContent__JS_to_goto(box.id, URL_SERVER_BUILD)) return box.Render().toStr() box += CTK.RawHTML('<p>%s</p>' % (ret['error'])) box += CTK.Notice(content=CTK.RawHTML('<p>%s</p><pre>%s</pre>' % (_( 'The installer could not successfully execute the following command:' ), ret['command']))) box += CTK.RawHTML('<p>%s</p><pre>%s</pre>' % (_('The reported error was:'), ret['stderr'])) buttons = CTK.DruidButtonsPanel() buttons += CTK.DruidButton_Close(_('Cancel')) buttons += CTK.DruidButton_Goto(_('Retry'), URL_USER_CREATION, do_submit=True) box += buttons return box.Render().toStr()
def __safe_call__(self): vserver_n = CTK.cfg.get_val('%s!target!vserver_n' % ('tmp!market!install')) pre_vsrv = 'vserver!%s' % (vserver_n) replacements = php.figure_php_user(pre_vsrv) market.Install_Log.log("Post installation commands") commands = [ ({ 'function': tools.php_installer_replacements, 'description': _('Communicating DB details.') }), ({ 'command': 'chown ${root_user}:${php_group} ${app_root}/statusnet ${app_root}/statusnet/avatar ${app_root}/statusnet/background ${app_root}/statusnet/file' }), ] progress = market.CommandProgress.CommandProgress( commands, market.Install.URL_INSTALL_DONE) progress['php_group'] = replacements['php_group'] box = CTK.Box() box += CTK.RawHTML('<h2>%s</h2>' % (_('Performing adjustments'))) box += CTK.RawHTML( '<p>%s</p>' % (_('This process may take a while. Please, hold on.'))) box += progress buttons = CTK.DruidButtonsPanel() buttons += CTK.DruidButton_Close(_('Cancel')) box += buttons return box.Render().toStr()
def __safe_call__(self): ruby_min = ruby.ruby_version() db_supported = DB_SUPPORTED[:] if version_to_int (ruby_min) < version_to_int ('1.8.6') or \ not database.mysql_dev_path(): # required by mysql gem: db_supported.remove('mysql') if version_to_int(ruby_min) < version_to_int( '1.8.7'): # required by sqlite3 gem: db_supported.remove('sqlite3') box = CTK.Box() db_widget = database.MethodSelection(db_supported) db_widget.bind('goto_next_stage', CTK.DruidContent__JS_to_goto(box.id, URL_LANGUAGE)) buttons = CTK.DruidButtonsPanel() buttons += CTK.DruidButton_Close(_('Cancel')) buttons += CTK.DruidButton_Submit(_('Next'), do_close=False) box += db_widget box += buttons return box.Render().toStr()
def __init__(self, refresh): CTK.Box.__init__(self) self += CTK.RawHTML('<h2>%s</h2>' % (_(NOTE_NAGIOSUSER_H))) self += CTK.RawHTML('<p>%s</p>' % (_(NOTE_NAGIOSUSER_P))) self += Method_Chooser(refresh) method = CTK.cfg.get_val('%s!nagiosmethod' % (PRE)) if method == 'automatic': widget = Method_Auto() widget.bind( 'goto_next_stage', CTK.DruidContent__JS_to_goto(self.id, URL_USER_CREATION)) else: widget = Method_Manual() widget.bind( 'goto_next_stage', CTK.DruidContent__JS_to_goto(self.id, URL_SERVER_BUILD)) buttons = CTK.DruidButtonsPanel() buttons += CTK.DruidButton_Close(_('Cancel')) buttons += CTK.DruidButton_Submit(_('Next'), do_close=False) self += widget self += buttons
def __call__(self): # Form submit = CTK.Submitter(URL_SAVE_APPLY) submit += CTK.TextArea({ 'name': 'comment', 'class': 'noauto backup-notes-textarea optional', 'style': 'width: 436px; height: 48px; margin-top: 8px;' }) submit.bind('submit_success', CTK.DruidContent__JS_to_goto(submit.id, URL_SAVE_SUCCESS)) submit.bind('submit_fail', CTK.DruidContent__JS_to_goto(submit.id, URL_SAVE_FAIL)) # Buttons panel = CTK.DruidButtonsPanel() panel += CTK.DruidButton_Close(_('Cancel')) panel += CTK.DruidButton_Submit(_('Back Up')) # Layout content = CTK.Container() content += CTK.RawHTML('<p>%s</p>' % (_(NOTE_SAVE_P1))) content += CTK.RawHTML('<p>%s</p>' % (_(NOTE_SAVE_P2))) box = CTK.Box() box += CTK.RawHTML("<strong>%s</strong>" % (_("Notes"))) box += submit content += box content += panel return content.Render().toStr()
def __safe_call__(self): box = CTK.Box() pre = "tmp!market!install" root = CTK.cfg.get_val('%s!root' % (pre)) path = os.path.join(root, 'wp-es') # If only default language present, skip stage if not os.path.isdir(path): box += CTK.RawHTML( js=CTK.DruidContent__JS_to_goto(box.id, URL_DATABASE)) return box.Render().toStr() table = CTK.PropsTable() table.Add( _('Language'), CTK.ComboCfg('%s!wordpress!lang' % (pre), OPTS_LANG, { 'class': 'noauto', 'selected': 'en' }), _(LANG_NOTE)) submit = CTK.Submitter(URL_APPLY) submit += table submit.bind('submit_success', CTK.DruidContent__JS_to_goto(table.id, URL_DATABASE)) buttons = CTK.DruidButtonsPanel() buttons += CTK.DruidButton_Close(_('Cancel')) buttons += CTK.DruidButton_Submit(_('Next'), do_close=False) box = CTK.Box() box += CTK.RawHTML('<h2>%s</h2>' % (LANG_H2)) box += CTK.RawHTML('<p>%s</p>' % (LANG_P1)) box += submit box += buttons return box.Render().toStr()
def __safe_call__(self): vserver_n = CTK.cfg.get_val('%s!target!vserver_n' % ('tmp!market!install')) pre_vsrv = 'vserver!%s' % (vserver_n) replacements = php.figure_php_user(pre_vsrv) market.Install_Log.log("Post installation commands") commands = [ ({ 'command': 'chown -R ${php_user}:${php_group} ${app_root}/mediawiki' }), ({ 'command': 'chown -R ${php_user}:${php_group} ${app_root}/data' }), ] progress = market.CommandProgress.CommandProgress( commands, market.Install.URL_INSTALL_DONE) progress['php_user'] = replacements['php_user'] progress['php_group'] = replacements['php_group'] box = CTK.Box() box += CTK.RawHTML('<h2>%s</h2>' % (_('Performing adjustments'))) box += CTK.RawHTML( '<p>%s</p>' % (_('This process may take a while. Please, hold on.'))) box += progress buttons = CTK.DruidButtonsPanel() buttons += CTK.DruidButton_Close(_('Cancel')) box += buttons return box.Render().toStr()
def __init__ (self): CTK.Box.__init__ (self) self += CTK.RawHTML ('<h1>%s</h1>' %(_("Could not find the PHP interpreter"))) self += PHP_Interpreter_Not_Found_Widget() buttons = CTK.DruidButtonsPanel() buttons += CTK.DruidButton_Goto (_('Check Again'), URL_PHP_CONFIG, do_submit=False) self += buttons
def __safe_call__(self): box = CTK.Box() box += CTK.RawHTML('<h2>%s</h2>' % (_("Checking Requirements"))) buttons = CTK.DruidButtonsPanel() buttons += CTK.DruidButton_Close(_('Cancel')) buttons += CTK.DruidButton_Goto(_('Retry'), URL_PRECONDITION, do_submit=True) # Check PHP php_cgi_bin = php.figure_phpcgi_binary() if not php_cgi_bin: box += php.PHP_Interpreter_Not_Found_Widget() box += buttons return box.Render().toStr() # Database supported_dbs = database.get_supported_dbs(DB_SUPPORTED) if not supported_dbs: box += database.PreconditionError(DB_SUPPORTED) box += buttons return box.Render().toStr() # Check PHP modules error = tools.check_modules() if error: note, instructions = error box += market.Util.InstructionBox(note, instructions, bin_path=php_cgi_bin) box += buttons return box.Render().toStr() # Check PHP settings setting_errors = tools.check_settings() if setting_errors: box += CTK.RawHTML('<p>%s</p>' % (_( "Some of your PHP settings do not meet Vanilla's requirements. Please edit your PHP configuration files and try again." ))) table = CTK.Table({'class': 'infosection'}) table.set_header(1) table += [ CTK.RawHTML(x) for x in ('%s ' % _('Setting'), '%s ' % _('Expected value'), _('Current value')) ] for setting_test in setting_errors: table += [CTK.RawHTML(str(x)) for x in setting_test] box += CTK.Indenter(table) box += buttons return box.Render().toStr() box += CTK.RawHTML(js=CTK.DruidContent__JS_to_goto(box.id, URL_TARGET)) return box.Render().toStr()
def __call__(self): cont = CTK.Container() cont += CTK.RawHTML("<h1>%s</h1>" % (_('Report sent successfully'))) cont += CTK.RawHTML("<p>%s</p>" % (_(NOTE_REPORT_THANKS))) buttons = CTK.DruidButtonsPanel() buttons += CTK.DruidButton_Close(_('Close')) cont += buttons return cont.Render().toStr()
def __call__(self): panel = CTK.DruidButtonsPanel() panel += CTK.DruidButton_Close(_('Close')) # Layout content = CTK.Container() content += CTK.RawHTML('<h2>%s</h2>' % (_(NOTE_SAVE_OK_H2))) content += CTK.RawHTML('<p>%s</p>' % (_(NOTE_SAVE_OK_P1))) content += panel return content.Render().toStr()
def __call__(self): cont = CTK.Container() cont += CTK.RawHTML("<h1>%s</h1>" % (_('Could not send the report'))) cont += CTK.RawHTML("<p>%s</p>" % (_(NOTE_REPORT_ERROR))) cont += CTK.RawHTML("<p>%s</p>" % (_(NOTE_REPORT_TIPS))) buttons = CTK.DruidButtonsPanel() buttons += CTK.DruidButton_Close(_('Close')) cont += buttons return cont.Render().toStr()
def __call__(self): panel = CTK.DruidButtonsPanel() panel += CTK.DruidButton_Close(_('Close')) content = CTK.Container() content += CTK.RawHTML('<h2>%s</h2>' % (_(NOTE_RESTORE_FAIL_H2))) content += CTK.RawHTML('<p>%s</p>' % (_(NOTE_RESTORE_FAIL_P1))) content += CTK.RawHTML( '<p><pre>%s</pre></p>' % (CTK.escape_html(CTK.cfg.get_val('tmp!backup!restore!error', '')))) content += panel return content.Render().toStr()
def __safe_call__ (self): box = CTK.Box() target_wid = target.TargetSelection() target_wid.bind ('goto_next_stage', CTK.DruidContent__JS_to_goto (box.id, php.URL_PHP_CONFIG_INTRO)) box += target_wid buttons = CTK.DruidButtonsPanel() buttons += CTK.DruidButton_Close(_('Cancel')) buttons += CTK.DruidButton_Submit (_('Next'), do_close=False) box += buttons return box.Render().toStr()
def __safe_call__ (self): box = CTK.Box() db_widget = database.MethodSelection (DB_SUPPORTED) db_widget.bind ('goto_next_stage', CTK.DruidContent__JS_to_goto (box.id, URL_SERVER)) box += db_widget buttons = CTK.DruidButtonsPanel() buttons += CTK.DruidButton_Close(_('Cancel')) buttons += CTK.DruidButton_Submit (_('Next'), do_close=False) box += buttons return box.Render().toStr()
def __safe_call__(self): box = CTK.Box() box += CTK.RawHTML('<h2>%s</h2>' % (_("Nagios start up"))) system_info = SystemInfo.get_info() OS = system_info.get('system', '').lower() root = CTK.cfg.get_val('%s!root' % (PRE)) startup = CTK.cfg.get_val('%s!nagiosstartup' % (PRE)) plist = os.path.join(root, 'nrpe.plist') # Register service: init.d, launchd, etc. ret = services.register_service('nagios', macos_plist=plist) if ret['retcode'] == 0: # Launch if startup: if OS == 'darwin': services.launch_service('org.nagios.nrpe') else: services.launch_service('nagios') box += CTK.RawHTML( js=CTK.DruidContent__JS_to_goto(box.id, URL_SERVER_CONFIG)) return box.Render().toStr() # Error handling notice = CTK.Notice() notice += CTK.RawHTML('<p>%s</p>' % (_( 'The installer could not successfully execute the following command:' ))) notice += CTK.RawHTML('<pre>%s</pre>' % (ret['command'])) notice += CTK.RawHTML('<p>%s</p>' % (_('The reported error was:'))) notice += CTK.RawHTML('<pre>%s</pre>' % (ret['stderr'])) box += CTK.RawHTML('<p>%s</p>' % (ret['error'])) box += notice box += CTK.RawHTML('<p>%s</p>' % (_( 'You can either manually fix the problem and retry, or you can skip the step knowing that the Nagios system service will not be launched at boot time.' ))) buttons = CTK.DruidButtonsPanel() buttons += CTK.DruidButton_Close(_('Cancel')) buttons += CTK.DruidButton_Goto(_('Retry'), URL_LAUNCH_SERVICE, do_submit=True) buttons += CTK.DruidButton_Goto(_('Skip'), URL_SERVER_CONFIG, do_submit=True) box += buttons return box.Render().toStr()
def __call__(self): cont = CTK.Container() cont += CTK.RawHTML("<h1>%s</h1>" % (_('Could not send the review'))) cont += CTK.RawHTML( "<p>%s</p>" % (_('We are sorry, but the review could not be sent.'))) cont += CTK.RawHTML("<p>%s</p>" % (_( 'Make sure you are logged in and there are no connectivity issues. If the problem persists, please contact our support team.' ))) buttons = CTK.DruidButtonsPanel() buttons += CTK.DruidButton_Close(_('Close')) cont += buttons return cont.Render().toStr()
def __safe_call__(self): box = CTK.Box() details = Wiki_Details() details.bind('submit_success', CTK.DruidContent__JS_to_goto(box.id, URL_INSTALLER_3)) box += CTK.RawHTML('<h2>%s</h2>' % (_("Wiki details"))) box += details buttons = CTK.DruidButtonsPanel() buttons += CTK.DruidButton_Close(_('Cancel')) buttons += CTK.DruidButton_Submit(_('Next'), do_close=False) box += buttons return box.Render().toStr()
def __call__(self): panel = CTK.DruidButtonsPanel() panel += CTK.DruidButton_Close(_('Close')) content = CTK.Container() content += CTK.RawHTML('<h2>%s</h2>' % (_(NOTE_RESTORE_OK_H2))) content += CTK.RawHTML('<p>%s</p>' % (_(NOTE_RESTORE_OK_P1))) if CTK.cfg.has_changed(): content += CTK.RawHTML('<p>%s</p>' % (_(NOTE_RESTORE_OK_P2_1))) else: content += CTK.RawHTML('<p>%s</p>' % (_(NOTE_RESTORE_OK_P2_2))) content += panel return content.Render().toStr()