diff --git a/src/webui/service/__init__.py b/src/webui/service/__init__.py index e7f50ed42d19921b3423617f6860b5630e93adba..3c64f45c90457e1b6a9553e60634879a28910a31 100644 --- a/src/webui/service/__init__.py +++ b/src/webui/service/__init__.py @@ -95,8 +95,8 @@ def create_app(use_config=None, web_app_root=None): from webui.service.link.routes import link # pylint: disable=import-outside-toplevel app.register_blueprint(link) - from webui.service.policy.routes import policy # pylint: disable=import-outside-toplevel - app.register_blueprint(policy) + from webui.service.policy_rule.routes import policy_rule # pylint: disable=import-outside-toplevel + app.register_blueprint(policy_rule) app.jinja_env.globals.update({ # pylint: disable=no-member 'enumerate' : enumerate, diff --git a/src/webui/service/policy/__init__.py b/src/webui/service/policy_rule/__init__.py similarity index 100% rename from src/webui/service/policy/__init__.py rename to src/webui/service/policy_rule/__init__.py diff --git a/src/webui/service/policy/routes.py b/src/webui/service/policy_rule/routes.py similarity index 90% rename from src/webui/service/policy/routes.py rename to src/webui/service/policy_rule/routes.py index 6d14f86b4f1428695b474b3f2e2dd4dc72657452..9077892ad9fcef023dadf28c58f58f3a821f72ae 100644 --- a/src/webui/service/policy/routes.py +++ b/src/webui/service/policy_rule/routes.py @@ -18,11 +18,11 @@ from common.proto.context_pb2 import Empty from common.proto.policy_pb2 import PolicyRuleStateEnum from context.client.ContextClient import ContextClient -policy = Blueprint('policy', __name__, url_prefix='/policy') +policy_rule = Blueprint('policy_rule', __name__, url_prefix='/policy_rule') context_client = ContextClient() -@policy.get('/') +@policy_rule.get('/') def home(): context_client.connect() policy_rules = context_client.ListPolicyRules(Empty()) @@ -30,8 +30,8 @@ def home(): context_client.close() return render_template('policy/home.html', policy_rules=policy_rules, prse=PolicyRuleStateEnum) -#@policy.get('/detail') -#def detail(policy_uuid: str): +#@policy_rule.get('/detail') +#def detail(policy_rule_uuid: str): # try: # context_client.connect() # diff --git a/src/webui/service/templates/base.html b/src/webui/service/templates/base.html index 61c283b0d957b4d13b7cc57e47d3ea2675ab76f0..4c31b61935aca2bd7d2a5e7642168afdea6fd02d 100644 --- a/src/webui/service/templates/base.html +++ b/src/webui/service/templates/base.html @@ -84,10 +84,10 @@ {% endif %}