|
| 1 | +export enum Application { |
| 2 | + REFINERY = 'REFINERY', |
| 3 | + COGNITION = 'COGNITION', |
| 4 | + GATES = 'GATES', |
| 5 | + WELCOME_SCREEN = 'WELCOME_SCREEN', |
| 6 | +} |
| 7 | + |
| 8 | +export enum CurrentPage { |
| 9 | + PROJECTS = 'PROJECTS', |
| 10 | + LOOKUP_LISTS_OVERVIEW = 'LOOKUP_LISTS_OVERVIEW', |
| 11 | + NEW_PROJECT = 'NEW_PROJECT', |
| 12 | + PROJECT_OVERVIEW = 'PROJECT_OVERVIEW', |
| 13 | + DATA_BROWSER = 'DATA_BROWSER', |
| 14 | + LABELING = 'LABELING', |
| 15 | + HEURISTICS = 'HEURISTICS', |
| 16 | + ADMIN_PAGE = 'ADMIN_PAGE', |
| 17 | + USERS = 'USERS', |
| 18 | + UPLOAD_RECORDS = 'UPLOAD_RECORDS', |
| 19 | + PROJECT_SETTINGS = "PROJECT_SETTINGS", |
| 20 | + MODELS_DOWNLOAD = "MODELS_DOWNLOAD", |
| 21 | + ATTRIBUTE_CALCULATION = "ATTRIBUTE_CALCULATION", |
| 22 | + LOOKUP_LISTS_DETAILS = "LOOKUP_LISTS_DETAILS", |
| 23 | + MODEL_CALLBACKS = "MODEL_CALLBACKS", |
| 24 | + LABELING_FUNCTION = "LABELING_FUNCTION", |
| 25 | + ACTIVE_LEARNING = "ACTIVE_LEARNING", |
| 26 | + ZERO_SHOT = "ZERO_SHOT", |
| 27 | + CROWD_LABELER = "CROWD_LABELER", |
| 28 | + RECORD_IDE = "RECORD_IDE", |
| 29 | + EDIT_RECORDS = "EDIT_RECORDS", |
| 30 | + NOTIFICATION_CENTER = "NOTIFICATION_CENTER", |
| 31 | + EXPORT = "EXPORT", |
| 32 | + COMMENTS = "COMMENTS", |
| 33 | + BRICKS_INTEGRATOR = "BRICKS_INTEGRATOR", |
| 34 | + CONFIG = "CONFIG", |
| 35 | + COGNITION_LAYOUT = "COGNITION_LAYOUT", |
| 36 | + GATES_LAYOUT = "GATES_LAYOUT", |
| 37 | + WELCOME_SCREEN_LAYOUT = "WELCOME_SCREEN_LAYOUT", |
| 38 | +} |
| 39 | + |
| 40 | +export enum CurrentPageSubKey { |
| 41 | + EMBEDDINGS = 'EMBEDDING', |
| 42 | + NONE = 'NONE', |
| 43 | + BUTTONS_CONTAINER = 'BUTTONS_CONTAINER', |
| 44 | + VARIABLE_SELECTION = 'VARIABLE_SELECTION', |
| 45 | + SNAPSHOT_EXPORT = 'SNAPSHOT_EXPORT', |
| 46 | + GLOBAL = 'GLOBAL', |
| 47 | + FILE_UPLOAD = 'FILE_UPLOAD', |
| 48 | +} |
| 49 | + |
| 50 | +export const WHITELIST_LOOKUP_REFINERY = { |
| 51 | + [CurrentPage.PROJECTS]: { |
| 52 | + [CurrentPageSubKey.NONE]: ['project_created', 'project_deleted', 'project_update', 'file_upload'], |
| 53 | + [CurrentPageSubKey.BUTTONS_CONTAINER]: ['bad_password'], |
| 54 | + [CurrentPageSubKey.FILE_UPLOAD]: ['file_upload'] |
| 55 | + }, |
| 56 | + [CurrentPage.UPLOAD_RECORDS]: { |
| 57 | + [CurrentPageSubKey.NONE]: ['file_upload'] |
| 58 | + }, |
| 59 | + [CurrentPage.MODELS_DOWNLOAD]: { |
| 60 | + [CurrentPageSubKey.NONE]: ['model_provider_download'] |
| 61 | + }, |
| 62 | + [CurrentPage.COMMENTS]: { |
| 63 | + [CurrentPageSubKey.NONE]: ['label_created', 'label_deleted', 'attributes_updated', 'calculate_attribute', 'embedding_deleted', 'embedding', 'labeling_task_updated', 'labeling_task_deleted', 'labeling_task_created', 'data_slice_created', 'data_slice_updated', 'data_slice_deleted', 'information_source_created', 'information_source_updated', 'information_source_deleted', 'knowledge_base_created', 'knowledge_base_updated', 'knowledge_base_deleted'], |
| 64 | + [CurrentPageSubKey.GLOBAL]: ['comment_created', 'comment_updated', 'comment_deleted', 'project_created', 'project_deleted'] |
| 65 | + }, |
| 66 | + [CurrentPage.BRICKS_INTEGRATOR]: { |
| 67 | + [CurrentPageSubKey.VARIABLE_SELECTION]: ['attributes_updated', 'calculate_attribute', 'label_created', 'label_deleted', 'labeling_task_deleted', 'labeling_task_updated', 'labeling_task_created', 'embedding', 'embedding_deleted', 'knowledge_base_deleted', 'knowledge_base_created'] |
| 68 | + }, |
| 69 | + [CurrentPage.PROJECT_OVERVIEW]: { |
| 70 | + [CurrentPageSubKey.NONE]: ['label_created', 'label_deleted', 'labeling_task_deleted', 'labeling_task_updated', 'labeling_task_created', 'weak_supervision_finished', 'data_slice_created', 'data_slice_updated', 'data_slice_deleted'] |
| 71 | + }, |
| 72 | + [CurrentPage.PROJECT_SETTINGS]: { |
| 73 | + [CurrentPageSubKey.NONE]: ['project_update', 'tokenization', 'calculate_attribute', 'embedding', 'attributes_updated', 'gates_integration', 'information_source_deleted', 'information_source_updated', 'embedding_deleted', 'embedding_updated', 'upload_embedding_payload', 'label_created', 'label_deleted', 'labeling_task_deleted', 'labeling_task_updated', 'labeling_task_created'], |
| 74 | + [CurrentPageSubKey.SNAPSHOT_EXPORT]: ['project_updated', 'project_export'], |
| 75 | + [CurrentPageSubKey.EMBEDDINGS]: ['embedding_updated', 'upload_embedding_payload'] |
| 76 | + |
| 77 | + }, |
| 78 | + [CurrentPage.EXPORT]: { |
| 79 | + [CurrentPageSubKey.NONE]: ['record_export', 'calculate_attribute', 'labeling_task_deleted', 'labeling_task_created', 'data_slice_created', 'data_slice_deleted', 'information_source_created', 'information_source_deleted'] |
| 80 | + }, |
| 81 | + [CurrentPage.MODEL_CALLBACKS]: { |
| 82 | + [CurrentPageSubKey.NONE]: ['information_source_created', 'information_source_updated', 'information_source_deleted', 'labeling_task_deleted', 'labeling_task_updated', 'labeling_task_created', 'model_callback_update_statistics'] |
| 83 | + }, |
| 84 | + [CurrentPage.LOOKUP_LISTS_DETAILS]: { |
| 85 | + [CurrentPageSubKey.NONE]: ['knowledge_base_updated', 'knowledge_base_deleted', 'knowledge_base_term_updated'] |
| 86 | + }, |
| 87 | + [CurrentPage.LOOKUP_LISTS_OVERVIEW]: { |
| 88 | + [CurrentPageSubKey.NONE]: ['knowledge_base_updated', 'knowledge_base_deleted', 'knowledge_base_created'] |
| 89 | + }, |
| 90 | + [CurrentPage.LABELING]: { |
| 91 | + [CurrentPageSubKey.NONE]: ['attributes_updated', 'calculate_attribute', 'payload_finished', 'weak_supervision_finished', 'record_deleted', 'rla_created', 'rla_deleted', 'access_link_changed', 'access_link_removed', 'label_created', 'label_deleted', 'labeling_task_deleted', 'labeling_task_updated', 'labeling_task_created'], |
| 92 | + |
| 93 | + }, |
| 94 | + [CurrentPage.ZERO_SHOT]: { |
| 95 | + [CurrentPageSubKey.NONE]: ['labeling_task_updated', 'labeling_task_created', 'label_created', 'label_deleted', 'labeling_task_deleted', 'information_source_deleted', 'information_source_updated', 'payload_update_statistics', 'payload_finished', 'payload_failed', 'payload_created', 'zero-shot', 'zero_shot_download'] |
| 96 | + }, |
| 97 | + [CurrentPage.LABELING_FUNCTION]: { |
| 98 | + [CurrentPageSubKey.NONE]: ['labeling_task_updated', 'labeling_task_created', 'label_created', 'label_deleted', 'labeling_task_deleted', 'information_source_deleted', 'information_source_updated', 'model_callback_update_statistics', 'payload_progress', 'payload_finished', 'payload_failed', 'payload_created', 'payload_update_statistics'], |
| 99 | + }, |
| 100 | + [CurrentPage.CROWD_LABELER]: { |
| 101 | + [CurrentPageSubKey.NONE]: ['labeling_task_updated', 'labeling_task_created', 'label_created', 'label_deleted', 'labeling_task_deleted', 'information_source_deleted', 'information_source_updated', 'model_callback_update_statistics'] |
| 102 | + }, |
| 103 | + [CurrentPage.ACTIVE_LEARNING]: { |
| 104 | + [CurrentPageSubKey.NONE]: ['labeling_task_updated', 'labeling_task_created', 'label_created', 'label_deleted', 'labeling_task_deleted', 'information_source_deleted', 'information_source_updated', 'model_callback_update_statistics', 'embedding_deleted', 'embedding', 'payload_finished', 'payload_failed', 'payload_created', 'payload_update_statistics'] |
| 105 | + }, |
| 106 | + [CurrentPage.HEURISTICS]: { |
| 107 | + [CurrentPageSubKey.NONE]: ['labeling_task_updated', 'labeling_task_created', 'labeling_task_deleted', 'information_source_created', 'information_source_updated', 'information_source_deleted', 'payload_finished', 'payload_failed', 'payload_created', 'payload_update_statistics', 'embedding_deleted'], |
| 108 | + |
| 109 | + }, |
| 110 | + [CurrentPage.EDIT_RECORDS]: { |
| 111 | + [CurrentPageSubKey.NONE]: ['calculate_attribute'] |
| 112 | + }, |
| 113 | + [CurrentPage.DATA_BROWSER]: { |
| 114 | + [CurrentPageSubKey.NONE]: ['data_slice_created', 'data_slice_updated', 'data_slice_deleted', 'label_created', 'label_deleted', 'labeling_task_deleted', 'labeling_task_updated', 'labeling_task_created', 'information_source_created', 'information_source_updated', 'information_source_deleted', 'attributes_updated', 'calculate_attribute', 'embedding', 'embedding_deleted'], |
| 115 | + |
| 116 | + }, |
| 117 | + [CurrentPage.ATTRIBUTE_CALCULATION]: { |
| 118 | + [CurrentPageSubKey.NONE]: ['attributes_updated', 'calculate_attribute', 'tokenization', 'knowledge_base_updated', 'knowledge_base_deleted', 'knowledge_base_created'], |
| 119 | + |
| 120 | + }, |
| 121 | + [CurrentPage.ADMIN_PAGE]: { |
| 122 | + [CurrentPageSubKey.NONE]: ['pat'] |
| 123 | + }, |
| 124 | + [CurrentPage.NOTIFICATION_CENTER]: { |
| 125 | + [CurrentPageSubKey.NONE]: ['notification_created', 'project_deleted', 'config_updated', 'admin_message'], |
| 126 | + |
| 127 | + } |
| 128 | +} |
| 129 | + |
| 130 | +export const WHITELIST_LOOKUP_COGNITION = { |
| 131 | + [CurrentPage.COGNITION_LAYOUT]: { |
| 132 | + [CurrentPageSubKey.NONE]: ['admin_message'] |
| 133 | + } |
| 134 | +} |
| 135 | + |
| 136 | +export const WHITELIST_LOOKUP_GATES = { |
| 137 | + [CurrentPage.GATES_LAYOUT]: { |
| 138 | + [CurrentPageSubKey.NONE]: ['admin_message'] |
| 139 | + } |
| 140 | +} |
| 141 | + |
| 142 | +export const WHITE_LIST_LOOKUP_WELCOME_SCREEN = { |
| 143 | + [CurrentPage.WELCOME_SCREEN_LAYOUT]: { |
| 144 | + [CurrentPageSubKey.NONE]: ['admin_message'] |
| 145 | + } |
| 146 | +} |
0 commit comments