Commit 0e40bd49 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Corrected Policy Rule routes

parent dfbc5196
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -28,23 +28,23 @@ def home():
    policy_rules = context_client.ListPolicyRules(Empty())
    policy_rules = policy_rules.policyRules
    context_client.close()
    return render_template('policy/home.html', policy_rules=policy_rules, prse=PolicyRuleStateEnum)
    return render_template('policy_rule/home.html', policy_rules=policy_rules, prse=PolicyRuleStateEnum)

#@policy_rule.get('<path:policy_rule_uuid>/detail')
#def detail(policy_rule_uuid: str):
#    try:
#        context_client.connect()
#
#        slice_obj = get_slice_by_uuid(context_client, slice_uuid, rw_copy=False)
#        if slice_obj is None:
#            flash('Context({:s})/Slice({:s}) not found'.format(str(context_uuid), str(slice_uuid)), 'danger')
#            slice_obj = Slice()
#        policy_rule_obj = get_policy_rule_by_uuid(context_client, policy_rule_uuid, rw_copy=False)
#        if policy_rule_obj is None:
#            flash('Context({:s})/PolicyRule({:s}) not found'.format(str(context_uuid), str(policy_rule_uuid)), 'danger')
#            policy_rule_obj = PolicyRule()
#
#        context_client.close()
#
#        return render_template(
#            'slice/detail.html', slice=slice_obj, prse=PolicyRuleStateEnum)
#            'policy_rule/detail.html', policy_rule=policy_rule_obj, prse=PolicyRuleStateEnum)
#    except Exception as e:
#        flash('The system encountered an error and cannot show the details of this slice.', 'warning')
#        flash('The system encountered an error and cannot show the details of this policy_rule.', 'warning')
#        current_app.logger.exception(e)
#        return redirect(url_for('slice.home'))
#        return redirect(url_for('policy_rule.home'))