updated version
This commit is contained in:
@@ -12,6 +12,9 @@ class KeyValidations:
|
||||
data = "data"
|
||||
validation = "validations"
|
||||
|
||||
# Key URLS for the cluster
|
||||
class KeyURLs:
|
||||
validations = "/validations/validations"
|
||||
|
||||
# Keys for the cluster
|
||||
class KeyBases:
|
||||
@@ -27,7 +30,9 @@ class PageBases:
|
||||
DASHBOARD = f"/dashboard?{DefaultClusterName}={cluster_name}"
|
||||
|
||||
|
||||
class Page2Keys:
|
||||
KeyBases.create_key = PageBases.CREATE
|
||||
KeyBases.update_key = PageBases.UPDATE
|
||||
KeyBases.list_key = PageBases.DASHBOARD
|
||||
# Match the keys with the pages
|
||||
page_2_keys = {
|
||||
KeyBases.create_key: PageBases.CREATE,
|
||||
KeyBases.update_key: PageBases.UPDATE,
|
||||
KeyBases.list_key: PageBases.DASHBOARD,
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ from .account_records import (
|
||||
AccountRecordsCreateEventMethods,
|
||||
AccountRecordsUpdateEventMethods,
|
||||
)
|
||||
from .bases import cluster_name, prefix
|
||||
from .bases import cluster_name, prefix, page_2_keys
|
||||
from .info import page_infos
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ AccountCluster = CategoryCluster(
|
||||
"AccountRecordsUpdateEventMethods": AccountRecordsUpdateEventMethods,
|
||||
"AccountRecordsListEventMethods": AccountRecordsListEventMethods,
|
||||
},
|
||||
mapping=page_2_keys,
|
||||
include_in_schema=True,
|
||||
sub_category=[],
|
||||
is_client=True,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from Events.Engine.abstract_class import PageInfo
|
||||
from .bases import KeyValidations, cluster_name, KeyBases, PageBases, icon
|
||||
from .bases import KeyValidations, cluster_name, KeyBases, PageBases, icon, KeyURLs
|
||||
from .account_records import (
|
||||
AccountRecordsUpdateEventMethods,
|
||||
AccountRecordsCreateEventMethods,
|
||||
@@ -33,7 +33,7 @@ class ClustersPageInfo:
|
||||
str(KeyBases.list_key): {
|
||||
"headers": {
|
||||
"store": True,
|
||||
"url": "/validations/header",
|
||||
"url": KeyURLs.validations,
|
||||
"data": {"event_code": f"{KeyBases.list_key}", "asked_field": KeyValidations.headers},
|
||||
},
|
||||
"data": {
|
||||
@@ -65,12 +65,12 @@ class ClustersPageInfo:
|
||||
str(KeyBases.create_key): {
|
||||
"validation": {
|
||||
"store": True,
|
||||
"url": "/validations/validation",
|
||||
"url": KeyURLs.validations,
|
||||
"data": {"event_code": f"{KeyBases.create_key}", "asked_field": KeyValidations.validation },
|
||||
},
|
||||
"headers": {
|
||||
"store": True,
|
||||
"url": "/validations/header",
|
||||
"url": KeyURLs.validations,
|
||||
"data": {"event_code": f"{KeyBases.create_key}", "asked_field": KeyValidations.headers},
|
||||
},
|
||||
},
|
||||
@@ -91,7 +91,6 @@ class ClustersPageInfo:
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
update_page_info = PageInfo(
|
||||
name=f"{cluster_name}",
|
||||
url=PageBases.UPDATE,
|
||||
@@ -100,12 +99,12 @@ class ClustersPageInfo:
|
||||
str(KeyBases.update_key): {
|
||||
"validation": {
|
||||
"store": True,
|
||||
"url": "/validations/validation",
|
||||
"url": KeyURLs.validations,
|
||||
"data": {"event_code": f"{KeyBases.update_key}", "asked_field": KeyValidations.validation},
|
||||
},
|
||||
"headers": {
|
||||
"store": True,
|
||||
"url": "/validations/header",
|
||||
"url": KeyURLs.validations,
|
||||
"data": {"event_code": f"{KeyBases.update_key}", "asked_field": KeyValidations.headers},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -192,6 +192,7 @@ class RetrievePage(BaseRouteModel):
|
||||
prefix=cluster_name.PREFIX,
|
||||
url=dict(page_info).get("url", None),
|
||||
icon=dict(page_info).get("icon", None),
|
||||
mapping=cluster_name.MAPPING,
|
||||
page_info=dict(page_info).get("page_info", None),
|
||||
endpoints={},
|
||||
language_models={},
|
||||
|
||||
Reference in New Issue
Block a user