Skip to content

Commit b050659

Browse files
committed
Remove Record IDE
1 parent 3866fb9 commit b050659

File tree

8 files changed

+15
-343
lines changed

8 files changed

+15
-343
lines changed

src/components/projects/projectId/labeling/sessionId/main-component/NavigationBarTop.tsx

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@ export default function NavigationBarTop(props: NavigationBarTopProps) {
3838
});
3939
}, [SessionManager.labelingLinkData, userDisplayRole]);
4040

41-
function goToRecordIde() {
42-
const sessionId = router.query.sessionId as string;
43-
const pos = router.query.pos as string;
44-
router.push(`/projects/${projectId}/record-ide/${sessionId}?pos=${pos}`);
45-
}
46-
4741
function previousRecord() {
4842
SessionManager.previousRecord();
4943
router.push(`/projects/${projectId}/labeling/${SessionManager.labelingLinkData.huddleId}?pos=${SessionManager.huddleData.linkData.requestedPos}&type=${SessionManager.huddleData.linkData.linkType}`);
@@ -73,15 +67,6 @@ export default function NavigationBarTop(props: NavigationBarTopProps) {
7367
</button>
7468
</Tooltip>
7569
</div>
76-
77-
<div className="flex justify-center overflow-visible">
78-
<Tooltip content={TOOLTIPS_DICT.LABELING.NAVIGATE_TO_RECORD_IDE} placement="bottom" color="invert">
79-
<button onClick={() => goToRecordIde()}
80-
className="bg-white text-gray-700 text-xs font-semibold mr-3 px-4 py-2 rounded-md border border-gray-300 hover:bg-gray-50 focus:outline-none">
81-
Record IDE
82-
</button>
83-
</Tooltip>
84-
</div>
8570
{userIconsData.userIcons.length > 0 && <>
8671
{userIconsData.showUserIcons && <div className="flex justify-center overflow-visible">
8772
{userIconsData.userIcons.map((user) => (

src/components/projects/projectId/record-ide/RecordIDE.tsx

Lines changed: 0 additions & 276 deletions
This file was deleted.

src/pages/projects/[projectId]/record-ide/[sessionId]/index.tsx

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/services/base/record-ide.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/util/classes/bricks-integrator/bricks-integrator.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export class BricksCodeParser {
159159
replacedCode = replacedCode.replace(variable.line, variable.replacedLine);
160160
}
161161
config.preparedCode = replacedCode;
162-
this.extendCodeForRecordIde(config, forIde);
162+
// this.extendCodeForRecordIde(config, forIde);
163163
this.extendCodeForLabelMapping(config, executionTypeFilter);
164164
config.codeFullyPrepared = this.variables.every(v => v.optional || (v.values.length > 0 && v.values.every(va => va != null)));
165165
config.canAccept = config.codeFullyPrepared && !this.nameTaken && this.functionName != "";
@@ -357,18 +357,18 @@ export class BricksCodeParser {
357357
return -1;
358358
}
359359

360-
private static extendCodeForRecordIde(config: BricksIntegratorConfig, forIde: string | boolean = false) {
361-
if (!forIde) return;
362-
if (this.functionName == null || this.functionName == "@@unknown@@") return;
363-
const isExtractor = config.api.data.data.attributes.moduleType == "extractor";
364-
let printReturn = "\n\nprint(\"Record: \", record) \nprint(\"Result: \", ";
365-
if (isExtractor) {
366-
printReturn += "[v for v in " + this.functionName + "(record)])"
367-
} else {
368-
printReturn += this.functionName + "(record))"
369-
}
370-
config.preparedCode += printReturn;
371-
}
360+
// private static extendCodeForRecordIde(config: BricksIntegratorConfig, forIde: string | boolean = false) {
361+
// if (!forIde) return;
362+
// if (this.functionName == null || this.functionName == "@@unknown@@") return;
363+
// const isExtractor = config.api.data.data.attributes.moduleType == "extractor";
364+
// let printReturn = "\n\nprint(\"Record: \", record) \nprint(\"Result: \", ";
365+
// if (isExtractor) {
366+
// printReturn += "[v for v in " + this.functionName + "(record)])"
367+
// } else {
368+
// printReturn += this.functionName + "(record))"
369+
// }
370+
// config.preparedCode += printReturn;
371+
// }
372372

373373
private static collectGlobalComment(labelingTaskId: string = null, labelingTasks: any[] = null): string[] {
374374
const lines = this.baseCode.split("\n");

0 commit comments

Comments
 (0)