Exemple #1
0
def update_setting(setting_id):
    key = request.form['key']
    name = request.form['name']
    value = request.form['value']
    value_type = request.form['value_type']
    config.update_setting(setting_id, key, name, value, value_type)
    return jsonify(Msg(True, '修改成功,请自行确定是否需要重启面板'))
Exemple #2
0
def update_setting(setting_id):
    key = request.form['key']
    name = request.form['name']
    value = request.form['value']
    value_type = request.form['value_type']
    config.update_setting(setting_id, key, name, value, value_type)
    return jsonify(Msg(True, gettext('update success, please determine if you need to restart the panel.')))
Exemple #3
0
def update_setting(setting_id):
    key = request.form['key']
    name = request.form['name']
    value = request.form['value']
    value_type = request.form['value_type']
    config.update_setting(setting_id, key, name, value, value_type)
    if key == 'v2_template_config':
        v2_jobs.__v2_config_changed = True
    return jsonify(
        Msg(
            True,
            gettext(
                'update success, please determine if you need to restart the panel.'
            )))
Exemple #4
0
def update_setting(setting_id):
    key = request.form["key"]
    name = request.form["name"]
    value = request.form["value"]
    value_type = request.form["value_type"]
    if key == "cert_file" or key == "key_file":
        if value and not file_util.is_file(value):
            return jsonify(
                Msg(False,
                    gettext("File <%(file)s> does not exist.", file=value)))
    config.update_setting(setting_id, key, name, value, value_type)
    if key == "v2_template_config":
        __v2_config_changed = True
    return jsonify(Msg(
        True,
        gettext("Updated successfully."),
    ))
Exemple #5
0
def update_setting(setting_id):
    key = request.form['key']
    name = request.form['name']
    value = request.form['value']
    value_type = request.form['value_type']
    if key == 'cert_file' or key == 'key_file':
        if value and not file_util.is_file(value):
            return jsonify(
                Msg(False,
                    gettext(u'File <%(file)s> does not exist.', file=value)))
    config.update_setting(setting_id, key, name, value, value_type)
    if key == 'v2_template_config':
        v2_jobs.__v2_config_changed = True
    return jsonify(
        Msg(
            True,
            gettext(
                'update success, please determine if you need to restart the panel.'
            )))