Skip to content

Commit 42f1af8

Browse files
Removes gates (#25)
* Removes gates * Remove refinery pat * remove welcome screen * Removes welcome * remove welcome import * Appdropdown positioning * Removed icons for gates and workflow * Removal of crowd labeler and zeroshot (#26) * Removal of crowd labeler and zeroshot * Removed data from dropdown used only for zeroshot * Remove model callbacks --------- Co-authored-by: Lina <lina.lumburovska@kern.ai> Co-authored-by: lumburovskalina <104008550+lumburovskalina@users.noreply.github.com>
1 parent 4533fef commit 42f1af8

File tree

7 files changed

+8
-79
lines changed

7 files changed

+8
-79
lines changed

assets/gates-icon.png

-30.4 KB
Binary file not shown.

assets/workflow-icon.png

-28.2 KB
Binary file not shown.

components/AppSelectionDropdown.tsx

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { combineClassNames } from '../../javascript-functions/general';
66
import { AppSelectionDropdownProps } from '../types/dropdown';
77
import kernLogo from '../assets/kern-icon.png';
88
import refineryLogo from '../assets/refinery-icon.png';
9-
import gatesLogo from '../assets/gates-icon.png';
109

1110
export default function PlatformWelcomeDropdown(props: AppSelectionDropdownProps) {
1211
return (
@@ -32,26 +31,8 @@ export default function PlatformWelcomeDropdown(props: AppSelectionDropdownProps
3231
leaveFrom="transform opacity-100 scale-100"
3332
leaveTo="transform opacity-0 scale-95"
3433
>
35-
<Menu.Items className="fixed bottom-[74px] left-20 z-50 w-40 rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none">
34+
<Menu.Items className="fixed bottom-[70px] left-14 z-50 w-40 rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none">
3635
<div className="py-1">
37-
{props.cockpit ? (
38-
<Menu.Item>
39-
{({ active }) => (
40-
<a
41-
href="/welcome"
42-
rel="noopener noreferrer"
43-
className={combineClassNames(
44-
active ? 'bg-gray-100 text-gray-900' : 'text-gray-700',
45-
'group flex items-center px-4 py-2 text-sm cursor-pointer font-mono'
46-
)}
47-
>
48-
<Image src={kernLogo} width="21" height="21" alt='cockpit' />
49-
<span className='ml-2'>cockpit</span>
50-
</a>
51-
)}
52-
</Menu.Item>
53-
) : null}
54-
5536
{props.refinery ? (
5637
<Menu.Item>
5738
{({ active }) => (
@@ -71,19 +52,19 @@ export default function PlatformWelcomeDropdown(props: AppSelectionDropdownProps
7152
) : null}
7253

7354

74-
{props.gates ? (
55+
{props.cognition ? (
7556
<Menu.Item>
7657
{({ active }) => (
7758
<a
78-
href="/gates"
59+
href="/cognition"
7960
rel="noopener noreferrer"
8061
className={combineClassNames(
8162
active ? 'bg-gray-100 text-gray-900' : 'text-gray-700',
8263
'group flex items-center px-4 py-2 text-sm cursor-pointer font-mono'
8364
)}
8465
>
85-
<Image src={gatesLogo} width="21" height="21" alt='gates' />
86-
<span className='ml-2'>gates</span>
66+
<Image src={kernLogo} width="21" height="21" alt='cognition' />
67+
<span className='ml-2'>cognition</span>
8768
</a>
8869
)}
8970
</Menu.Item>

components/KernDropdown.tsx

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,6 @@ export default function KernDropdown(props: KernDropdownProps) {
240240
{props.onClickDelete && <div className="ml-auto flex items-center cursor-pointer hover:bg-gray-200" onClick={(e) => { e.stopPropagation(); props.onClickDelete(option) }}><IconTrashXFilled size={20} /></div>}
241241
{props.optionsHaveLink && <a href={props.linkList[index]} target="_blank" className="h-4 w-4 mr-2 ml-auto flex items-center cursor-pointer"><IconExternalLink size={16} /></a>}
242242
</label>
243-
{index == props.lineSeparatorIndex && <hr className="my-2 border-t border-dashed h-px border-gray-700" onMouseEnter={() => setHoverBoxPosition(null)}></hr>}
244243
</Tooltip>
245244
</div>
246245
)}
@@ -263,19 +262,6 @@ function HoverBox(props: { position: any, hoverBox: any }) {
263262
<div className="flex justify-center">
264263
<span className="card-title mb-2 label-text">Info</span>
265264
</div>
266-
<div className="grid grid-cols-2 gap-2 items-center" style={{ gridTemplateColumns: 'max-content auto' }}>
267-
{props.hoverBox.avgTime && <Fragment>
268-
<span className="label-text text-sm font-bold">Avg Time</span>
269-
<span className="label-text text-sm">{props.hoverBox.avgTime}</span></Fragment>}
270-
{props.hoverBox.base && <Fragment>
271-
<span className="label-text text-sm font-bold">Based on</span>
272-
<span className="label-text text-sm">{props.hoverBox.base}</span>
273-
</Fragment>}
274-
{props.hoverBox.size && <Fragment>
275-
<span className="label-text text-sm font-bold">Size</span>
276-
<span className="label-text text-sm">{props.hoverBox.size}</span>
277-
</Fragment>}
278-
</div>
279265
{!props.hoverBox.avgTime && !props.hoverBox.base && !props.hoverBox.size && <Fragment>
280266
<span className="label-text text-sm">{props.hoverBox}</span>
281267
</Fragment>}

hooks/web-socket/constants.ts

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
export enum Application {
22
REFINERY = 'REFINERY',
33
COGNITION = 'COGNITION',
4-
GATES = 'GATES',
5-
WELCOME_SCREEN = 'WELCOME_SCREEN',
64
ENTRY = 'ENTRY',
75
ADMIN_DASHBOARD = 'ADMIN_DASHBOARD',
86
}
@@ -15,18 +13,14 @@ export enum CurrentPage {
1513
DATA_BROWSER = 'DATA_BROWSER',
1614
LABELING = 'LABELING',
1715
HEURISTICS = 'HEURISTICS',
18-
ADMIN_PAGE = 'ADMIN_PAGE',
1916
USERS = 'USERS',
2017
UPLOAD_RECORDS = 'UPLOAD_RECORDS',
2118
PROJECT_SETTINGS = "PROJECT_SETTINGS",
2219
MODELS_DOWNLOAD = "MODELS_DOWNLOAD",
2320
ATTRIBUTE_CALCULATION = "ATTRIBUTE_CALCULATION",
2421
LOOKUP_LISTS_DETAILS = "LOOKUP_LISTS_DETAILS",
25-
MODEL_CALLBACKS = "MODEL_CALLBACKS",
2622
LABELING_FUNCTION = "LABELING_FUNCTION",
2723
ACTIVE_LEARNING = "ACTIVE_LEARNING",
28-
ZERO_SHOT = "ZERO_SHOT",
29-
CROWD_LABELER = "CROWD_LABELER",
3024
RECORD_IDE = "RECORD_IDE",
3125
EDIT_RECORDS = "EDIT_RECORDS",
3226
NOTIFICATION_CENTER = "NOTIFICATION_CENTER",
@@ -35,8 +29,6 @@ export enum CurrentPage {
3529
BRICKS_INTEGRATOR = "BRICKS_INTEGRATOR",
3630
CONFIG = "CONFIG",
3731
COGNITION_LAYOUT = "COGNITION_LAYOUT",
38-
GATES_LAYOUT = "GATES_LAYOUT",
39-
WELCOME_SCREEN_LAYOUT = "WELCOME_SCREEN_LAYOUT",
4032
ENTRY_LAYOUT = "ENTRY_LAYOUT",
4133
ADMIN_DASHBOARD_LAYOUT = "ADMIN_DASHBOARD_LAYOUT",
4234
}
@@ -74,17 +66,14 @@ export const WHITELIST_LOOKUP_REFINERY = {
7466
[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']
7567
},
7668
[CurrentPage.PROJECT_SETTINGS]: {
77-
[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'],
69+
[CurrentPageSubKey.NONE]: ['project_update', 'tokenization', 'calculate_attribute', 'embedding', 'attributes_updated', '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'],
7870
[CurrentPageSubKey.SNAPSHOT_EXPORT]: ['project_updated', 'project_export'],
7971
[CurrentPageSubKey.EMBEDDINGS]: ['embedding_updated', 'upload_embedding_payload']
8072

8173
},
8274
[CurrentPage.EXPORT]: {
8375
[CurrentPageSubKey.NONE]: ['record_export', 'calculate_attribute', 'labeling_task_deleted', 'labeling_task_created', 'data_slice_created', 'data_slice_deleted', 'information_source_created', 'information_source_deleted']
8476
},
85-
[CurrentPage.MODEL_CALLBACKS]: {
86-
[CurrentPageSubKey.NONE]: ['information_source_created', 'information_source_updated', 'information_source_deleted', 'labeling_task_deleted', 'labeling_task_updated', 'labeling_task_created', 'model_callback_update_statistics']
87-
},
8877
[CurrentPage.LOOKUP_LISTS_DETAILS]: {
8978
[CurrentPageSubKey.NONE]: ['knowledge_base_updated', 'knowledge_base_deleted', 'knowledge_base_term_updated']
9079
},
@@ -95,15 +84,9 @@ export const WHITELIST_LOOKUP_REFINERY = {
9584
[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'],
9685

9786
},
98-
[CurrentPage.ZERO_SHOT]: {
99-
[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']
100-
},
10187
[CurrentPage.LABELING_FUNCTION]: {
10288
[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'],
10389
},
104-
[CurrentPage.CROWD_LABELER]: {
105-
[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']
106-
},
10790
[CurrentPage.ACTIVE_LEARNING]: {
10891
[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']
10992
},
@@ -122,9 +105,6 @@ export const WHITELIST_LOOKUP_REFINERY = {
122105
[CurrentPageSubKey.NONE]: ['attributes_updated', 'calculate_attribute', 'tokenization', 'knowledge_base_updated', 'knowledge_base_deleted', 'knowledge_base_created'],
123106

124107
},
125-
[CurrentPage.ADMIN_PAGE]: {
126-
[CurrentPageSubKey.NONE]: ['pat']
127-
},
128108
[CurrentPage.NOTIFICATION_CENTER]: {
129109
[CurrentPageSubKey.NONE]: ['notification_created', 'project_deleted', 'config_updated', 'admin_message'],
130110

@@ -137,17 +117,6 @@ export const WHITELIST_LOOKUP_COGNITION = {
137117
}
138118
}
139119

140-
export const WHITELIST_LOOKUP_GATES = {
141-
[CurrentPage.GATES_LAYOUT]: {
142-
[CurrentPageSubKey.NONE]: ['admin_message']
143-
}
144-
}
145-
146-
export const WHITE_LIST_LOOKUP_WELCOME_SCREEN = {
147-
[CurrentPage.WELCOME_SCREEN_LAYOUT]: {
148-
[CurrentPageSubKey.NONE]: ['admin_message']
149-
}
150-
}
151120

152121
export const WHITE_LIST_LOOKUP_ENTRY = {
153122
[CurrentPage.ENTRY_LAYOUT]: {

hooks/web-socket/web-sockets-helper.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Application, CurrentPage, CurrentPageSubKey, WHITELIST_LOOKUP_COGNITION, WHITELIST_LOOKUP_GATES, WHITELIST_LOOKUP_REFINERY, WHITE_LIST_LOOKUP_ADMIN_DASHBOARD, WHITE_LIST_LOOKUP_ENTRY, WHITE_LIST_LOOKUP_WELCOME_SCREEN } from "./constants";
1+
import { Application, CurrentPage, CurrentPageSubKey, WHITELIST_LOOKUP_COGNITION, WHITELIST_LOOKUP_REFINERY, WHITE_LIST_LOOKUP_ADMIN_DASHBOARD, WHITE_LIST_LOOKUP_ENTRY } from "./constants";
22

33
export type NotificationSubscription = {
44
projectId?: string;
@@ -29,8 +29,6 @@ export function getConstWhitelist(application: Application) {
2929
switch (application) {
3030
case Application.REFINERY: whiteListString = WHITELIST_LOOKUP_REFINERY; break;
3131
case Application.COGNITION: whiteListString = WHITELIST_LOOKUP_COGNITION; break;
32-
case Application.GATES: whiteListString = WHITELIST_LOOKUP_GATES; break;
33-
case Application.WELCOME_SCREEN: whiteListString = WHITE_LIST_LOOKUP_WELCOME_SCREEN; break;
3432
case Application.ENTRY: whiteListString = WHITE_LIST_LOOKUP_ENTRY; break;
3533
case Application.ADMIN_DASHBOARD: whiteListString = WHITE_LIST_LOOKUP_ADMIN_DASHBOARD; break;
3634
}

types/dropdown.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
* @linkList {string[]} - The array of links that will be applied to the dropdown items (needs to be the exact same length as the optionArray)
3333
* @optionsHaveHoverBox {boolean} - If the dropdown options have a hover box
3434
* @hoverBoxList {string[]} - The array of hover boxes that will be applied to the dropdown items (needs to be the exact same length as the optionArray)
35-
* @addLineSeparator {boolean} - If the dropdown should have a line separator
36-
* @lineSeparatorIndex {number} - The index of the dropdown item that will have a line separator
3735
* @iconsArray {string[]} - The array of icons that will be applied to the dropdown items (needs to be the exact same length as the optionArray)
3836
* @valuePropertyPath {string, optional} - if undefined option text is returned, else (e.g. name.tmp.xyz) the path is split and used to access the object property
3937
* @useFillForIcons {boolean[], optional} - if true, the icon will be filled with the color of the option
@@ -76,8 +74,6 @@ export type KernDropdownProps = {
7674
linkList?: string[];
7775
optionsHaveHoverBox?: boolean;
7876
hoverBoxList?: string[];
79-
addLineSeparator?: boolean;
80-
lineSeparatorIndex?: number;
8177
iconsArray?: string[];
8278
valuePropertyPath?: string;
8379
useFillForIcons?: boolean[];
@@ -88,7 +84,6 @@ export type KernDropdownProps = {
8884
}
8985

9086
export type AppSelectionDropdownProps = {
91-
cockpit?: boolean;
9287
refinery?: boolean;
93-
gates?: boolean;
88+
cognition?: boolean;
9489
};

0 commit comments

Comments
 (0)