Skip to content

Commit 86430a3

Browse files
v1.18.0 (#55)
* Release version * fix: forcePathStyle for S3 downloadFile * Console error on the labeling page(happens with the following steps) * Bricks button on active learners navigate to home * Lookup lists unsupported dropdown icon error with existing list * Lookup lists paste terms split on doesn’t display default value complete * comment icon on records missing click cursor * cannot add new downloaded model in the model download page * The inputs fields ‘Confidence between’ on the databrowser should be type number * Submodules update --------- Co-authored-by: andhreljaKern <[email protected]>
1 parent e93fcb4 commit 86430a3

File tree

11 files changed

+20
-15
lines changed

11 files changed

+20
-15
lines changed

src/components/projects/projectId/data-browser/RecordList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default function RecordList(props: RecordListProps) {
3030
<div className="px-4 py-5 sm:p-6">
3131
{recordComments[record.id] && <div className="cursor-pointer absolute top-10 right-4"
3232
onClick={() => dispatch(setModalStates(ModalEnum.RECORD_COMMENTS, { commentsData: recordComments[record.id], open: true }))}>
33-
<Tooltip content={TOOLTIPS_DICT.DATA_BROWSER.RECORD_COMMENTS} color="invert" placement="left" className="cursor-auto">
33+
<Tooltip content={TOOLTIPS_DICT.DATA_BROWSER.RECORD_COMMENTS} color="invert" placement="left">
3434
<IconNotes className="h-4 w-4" />
3535
</Tooltip>
3636
</div>}

src/components/projects/projectId/data-browser/SearchGroups.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,12 +678,12 @@ export default function SearchGroups() {
678678
<div className="flex-grow min-w-0 mt-1">
679679
<div className="flex flex-row items-center whitespace-nowrap">
680680
<span className="text-sm mr-0.5 font-dmMono">CONFIDENCE BETWEEN</span>
681-
<input disabled={fullSearchStore[group.key].groupElements['weakSupervisionLabels'].length == 0}
681+
<input disabled={fullSearchStore[group.key].groupElements['weakSupervisionLabels'].length == 0} type="number"
682682
onChange={(e) => changeConfidence(e, 'lower', group.key, 'weakSupervisionConfidence')}
683683
value={fullSearchStore[group.key].groupElements['weakSupervisionConfidence'] ? fullSearchStore[group.key].groupElements['weakSupervisionConfidence']['lower'] : 0}
684684
className="h-8 w-11 text-sm border-gray-300 rounded-md placeholder-italic border text-gray-900 pl-2 placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-300 focus:ring-offset-2 focus:ring-offset-gray-100 disabled:opacity-50 disabled:cursor-not-allowed" />
685685
<span className="text-sm mx-0.5 font-dmMono">% AND</span>
686-
<input disabled={fullSearchStore[group.key].groupElements['weakSupervisionLabels'].length == 0}
686+
<input disabled={fullSearchStore[group.key].groupElements['weakSupervisionLabels'].length == 0} type="number"
687687
onChange={(e) => changeConfidence(e, 'upper', group.key, 'weakSupervisionConfidence')}
688688
value={fullSearchStore[group.key].groupElements['weakSupervisionConfidence'] ? fullSearchStore[group.key].groupElements['weakSupervisionConfidence']['upper'] : 100}
689689
className="h-8 w-11 text-sm border-gray-300 rounded-md placeholder-italic border text-gray-900 pl-2 placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-300 focus:ring-offset-2 focus:ring-offset-gray-100 disabled:opacity-50 disabled:cursor-not-allowed" />

src/components/projects/projectId/heuristics/heuristicId/active-learning/ActiveLearning.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useDispatch, useSelector } from "react-redux";
22
import HeuristicsLayout from "../shared/HeuristicsLayout";
33
import { useRouter } from "next/router";
44
import { selectProjectId } from "@/src/reduxStore/states/project";
5-
import { Fragment, useCallback, useEffect, useState } from "react";
5+
import { Fragment, useCallback, useEffect, useMemo, useState } from "react";
66
import { selectHeuristic, setActiveHeuristics, updateHeuristicsState } from "@/src/reduxStore/states/pages/heuristics";
77
import { getClassLine, postProcessCurrentHeuristic, postProcessLastTaskLogs } from "@/src/util/components/projects/projectId/heuristics/heuristicId/heuristics-details-helper";
88
import { TOOLTIPS_DICT } from "@/src/util/tooltip-constants";
@@ -204,6 +204,11 @@ export default function ActiveLearning() {
204204
const orgId = useSelector(selectOrganizationId);
205205
useWebsocket(orgId, Application.REFINERY, CurrentPage.ACTIVE_LEARNING, handleWebsocketNotification, projectId);
206206

207+
const bricksUrlExtension = useMemo(() => {
208+
if (currentHeuristic?.labelingTaskType == 'INFORMATION_EXTRACTION') return 'extractors';
209+
return "classifiers"
210+
}, [currentHeuristic?.labelingTaskType]);
211+
207212
return (
208213
<HeuristicsLayout updateSourceCode={(code) => updateSourceCodeToDisplay(code)}>
209214

@@ -252,7 +257,7 @@ export default function ActiveLearning() {
252257
)}
253258
</div>
254259
<div className="flex flex-row flex-nowrap items-center ml-auto">
255-
<VisitBricksButton tooltipPlacement="left" size="small" />
260+
<VisitBricksButton urlExtension={bricksUrlExtension} tooltipPlacement="left" size="small" />
256261
</div>
257262
</div>
258263
<HeuristicsEditor

src/components/projects/projectId/lookup-lists/lookupListId/PasteLookupListModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default function PasteLookupListModal() {
3636
<div className="grid justify-center items-center gap-x-2 gap-y-1 justify-items-start" style={{ gridTemplateColumns: 'max-content min-content' }}>
3737
<span>Split On</span>
3838
<input value={inputSplit} type="text" onInput={(e: any) => setInputSplit(e.target.value)}
39-
className="h-8 w-10 text-sm border-gray-300 rounded-md placeholder-italic border text-gray-900 pl-4 placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-300 focus:ring-offset-2 focus:ring-offset-gray-100" />
39+
className="h-8 w-12 text-sm border-gray-300 rounded-md placeholder-italic border text-gray-900 pl-4 placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-300 focus:ring-offset-2 focus:ring-offset-gray-100" />
4040
</div>
4141
<div className="mt-3" style={{ maxHeight: '80vh' }}>
4242
<textarea value={inputArea} onInput={(e: any) => setInputArea(e.target.value)}

src/components/projects/projectId/lookup-lists/lookupListId/RemoveLookupListModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default function RemoveLookupListModal() {
3737
<div className="grid justify-center items-center gap-x-2 gap-y-1 justify-items-start" style={{ gridTemplateColumns: 'max-content min-content' }}>
3838
<span>Split On</span>
3939
<input value={inputSplit} type="text" onInput={(e: any) => setInputSplit(e.target.value)}
40-
className="h-8 w-10 border-gray-300 rounded-md placeholder-italic border text-gray-900 pl-4 placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-300 focus:ring-offset-2 focus:ring-offset-gray-100" />
40+
className="h-8 w-12 border-gray-300 rounded-md placeholder-italic border text-gray-900 pl-4 placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-300 focus:ring-offset-2 focus:ring-offset-gray-100" />
4141
</div>
4242
<div className="mt-3" style={{ maxHeight: '80vh' }}>
4343
<textarea value={inputArea} onInput={(e: any) => setInputArea(e.target.value)}

src/components/shared/sidebar/Sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export default function Sidebar() {
190190
<Tooltip placement="right" trigger="hover" color="invert" content={TOOLTIPS_DICT.SIDEBAR.VERSION_OVERVIEW}>
191191
<div onClick={requestVersionOverview} id="refineryVersion"
192192
className="z-50 tooltip tooltip-right cursor-pointer select-none text-white flex items-center mr-1">
193-
v1.17.0
193+
v1.18.0
194194
{hasUpdates && <Tooltip placement="right" trigger="hover" color="invert" content={TOOLTIPS_DICT.SIDEBAR.NEWER_VERSION_AVAILABLE} >
195195
<IconAlertCircle className="h-5 w-5 text-yellow-700" />
196196
</Tooltip>}

src/reduxStore/StoreManagerComponent.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,13 @@ export function GlobalStoreDataComponent(props: React.PropsWithChildren) {
9292
getProjectByProjectId(projectId, (res) => {
9393
dispatch(setActiveProject(res.data["projectByProjectId"]));
9494
})
95-
getRecommendedEncoders(null, (resEncoders) => {
96-
dispatch(setCache(CacheEnum.MODELS_LIST, postProcessingEncoders(resEncoders.data['recommendedEncoders'])))
97-
});
9895
}
9996
else {
10097
dispatch(setActiveProject(null));
10198
}
102-
99+
getRecommendedEncoders(null, (resEncoders) => {
100+
dispatch(setCache(CacheEnum.MODELS_LIST, postProcessingEncoders(resEncoders.data['recommendedEncoders'])))
101+
});
103102
}, [router.query.projectId]);
104103

105104
useEffect(() => {

src/services/base/s3-service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export function downloadFile(credentialBlock: any, isStringData: boolean = true)
5353

5454
const s3Client = new S3Client({
5555
endpoint: s3Endpoint,
56+
forcePathStyle: true,
5657
region: s3Region,
5758
credentials: {
5859
accessKeyId: credentials["AccessKeyId"],

src/util/components/projects/projectId/labeling/labeling-main-component-helper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export function getDefaultTaskOverviewLabelSettings(): LabelingSuiteTaskHeaderLa
144144
}
145145

146146
export function prepareRLADataForRole(rlaData: any[], user: User, displayUserId: string, userDisplayRole: UserRole): any[] {
147-
if (user.role != UserRole.ANNOTATOR && userDisplayRole != UserRole.ANNOTATOR) return rlaData;
147+
if (user?.role != UserRole.ANNOTATOR && userDisplayRole != UserRole.ANNOTATOR) return rlaData;
148148
const currentSourceId = SessionManager.getSourceId();
149149
const allowedTask = SessionManager.getAllowedTask();
150150
const rlaDataCopy = jsonCopy(rlaData);

src/util/components/projects/projectId/labeling/overview-table-helper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export function filterRlaDataForUser(rlaData: any[], user: User, displayUserId:
159159
}
160160

161161
export function filterRlaCondition(rla, user, displayUserId, userDisplayRole): boolean {
162-
if (user.role != UserRole.ENGINEER || userDisplayRole != UserRole.ENGINEER) return rla.sourceType == LabelSource.MANUAL && rla.createdBy == displayUserId;
162+
if (user?.role != UserRole.ENGINEER || userDisplayRole != UserRole.ENGINEER) return rla.sourceType == LabelSource.MANUAL && rla.createdBy == displayUserId;
163163
if (rla.sourceType != LabelSource.MANUAL) return true;
164164
if (displayUserId == ALL_USERS_USER_ID) return true;
165165
if (!!rla.isGoldStar) return displayUserId == GOLD_STAR_USER_ID;

0 commit comments

Comments
 (0)