Пример #1
0
def get_plan(plan_name):
    plan = plans.find_one({"name": plan_name})
    if not plan:
        return jsonify(success=False, reason='no-such-plan')
    # Fill in the details of the plugin
    for step in plan['workflow']:
        plugin = plugins.get(step['plugin_name'])
    return jsonify(success=True, plan=sanitize_plan(plan))
def get_plan(plan_name):
    plan = get_plan_by_plan_name(plan_name)
    if plan:
        # Fill in the details of the plugin
        for step in plan['workflow']:
            plugin = plugins.get(step['plugin_name'])
        return jsonify(success=True, plan=sanitize_plan(plan))
    else:
        return jsonify(success=False, reason="Plan does not exist")
Пример #3
0
def get_plan(plan_name):
    plan = get_plan_by_plan_name(plan_name)
    if plan:
        # Fill in the details of the plugin
        for step in plan['workflow']:
            plugin = plugins.get(step['plugin_name'])
        return jsonify(success=True, plan=sanitize_plan(plan))
    else:
        return jsonify(success=False, reason="Plan does not exist")
def get_plans():
    name = request.args.get('name')
    if name:
        plan = get_plan_by_plan_name(name)
        if not plan:
            return jsonify(success=True, plans=[])
        else:
            # Fill in the details of the plugin
            for step in plan['workflow']:
                plugin = plugins.get(step['plugin_name'])
            return jsonify(success=True, plans=[sanitize_plan(plan)])
    else:
        email = request.args.get('email')
        if email:
            plans = get_plans_by_email(email)
        else:
            plans = get_sanitized_plans()
        return jsonify(success=True, plans=plans)
Пример #5
0
def get_plans():
    name = request.args.get('name')
    if name:
        plan = get_plan_by_plan_name(name)
        if not plan:
            return jsonify(success=True, plans=[])
        else:
            # Fill in the details of the plugin
            for step in plan['workflow']:
                plugin = plugins.get(step['plugin_name'])
            return jsonify(success=True, plans=[sanitize_plan(plan)])
    else:
        email = request.args.get('email')
        if email:
            plans = get_plans_by_email(email)
        else:
            plans = get_sanitized_plans()
        return jsonify(success=True, plans=plans)
Пример #6
0
def get_plan(plan_name):
    plan = get_plan_by_plan_name(plan_name)
    # Fill in the details of the plugin
    for step in plan['workflow']:
        plugin = plugins.get(step['plugin_name'])
    return jsonify(success=True, plan=sanitize_plan(plan))