Skip to content

Commit bb35e0b

Browse files
authored
Fix extractor submission related bugs (#1154)
* new parameters need to be reflected on frontend * add more default core extractors * in the catch need to match input params too
1 parent 5ea5e46 commit bb35e0b

File tree

5 files changed

+66
-5
lines changed

5 files changed

+66
-5
lines changed

docker-compose.extractors.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,50 @@ services:
4747
- clowder2
4848
restart: unless-stopped
4949

50+
wordcount:
51+
image: clowder/extractors-wordcount:latest
52+
environment:
53+
CLOWDER_VERSION: 2
54+
RABBITMQ_URI: amqp://guest:guest@rabbitmq:5672/%2F
55+
networks:
56+
- clowder2
57+
restart: unless-stopped
58+
59+
image-preview:
60+
image: clowder/extractors-image-preview:latest
61+
environment:
62+
CLOWDER_VERSION: 2
63+
RABBITMQ_URI: amqp://guest:guest@rabbitmq:5672/%2F
64+
networks:
65+
- clowder2
66+
restart: unless-stopped
67+
68+
image-metadata:
69+
image: clowder/extractors-image-metadata:latest
70+
environment:
71+
CLOWDER_VERSION: 2
72+
RABBITMQ_URI: amqp://guest:guest@rabbitmq:5672/%2F
73+
networks:
74+
- clowder2
75+
restart: unless-stopped
76+
77+
audio-preview:
78+
image: clowder/extractors-audio-preview:latest
79+
environment:
80+
CLOWDER_VERSION: 2
81+
RABBITMQ_URI: amqp://guest:guest@rabbitmq:5672/%2F
82+
networks:
83+
- clowder2
84+
restart: unless-stopped
85+
86+
file-digest:
87+
image: clowder/extractors-digest:latest
88+
environment:
89+
CLOWDER_VERSION: 2
90+
RABBITMQ_URI: amqp://guest:guest@rabbitmq:5672/%2F
91+
networks:
92+
- clowder2
93+
restart: unless-stopped
5094

5195
networks:
5296
clowder2:

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ services:
5050
RABBITMQ_HOST: ${RABBITMQ_HOST:-rabbitmq}
5151
RABBITMQ_USER: ${RABBITMQ_USER:-guest}
5252
RABBITMQ_PASS: ${RABBITMQ_PASS:-guest}
53-
API_HOST: ${API_HOST:-http://localhost}
53+
API_HOST: ${API_HOST:-http://backend}
5454
elasticsearch_url: http://elasticsearch:9200
5555
auth_base: http://localhost
5656
auth_realm: clowder

frontend/src/actions/dataset.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ export function submitDatasetExtractionAction(
142142
return V2.DatasetsService.getDatasetExtractApiV2DatasetsDatasetIdExtractPost(
143143
datasetId,
144144
extractorName,
145+
null,
145146
requestBody
146147
)
147148
.then((json) => {

frontend/src/actions/file.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,12 +344,18 @@ export function generateFilePresignedUrl(
344344

345345
export const SUBMIT_FILE_EXTRACTION = "SUBMIT_FILE_EXTRACTION";
346346

347-
export function submitFileExtractionAction(fileId, extractorName, requestBody) {
347+
export function submitFileExtractionAction(
348+
fileId,
349+
extractorName,
350+
datasetId,
351+
requestBody
352+
) {
348353
return (dispatch) => {
349354
return V2.FilesService.postFileExtractApiV2FilesFileIdExtractPost(
350355
fileId,
351356
extractorName,
352357
null,
358+
datasetId,
353359
requestBody
354360
)
355361
.then((json) => {
@@ -363,7 +369,13 @@ export function submitFileExtractionAction(fileId, extractorName, requestBody) {
363369
dispatch(
364370
handleErrors(
365371
reason,
366-
submitFileExtractionAction(fileId, extractorName, requestBody)
372+
submitFileExtractionAction(
373+
fileId,
374+
extractorName,
375+
null,
376+
datasetId,
377+
requestBody
378+
)
367379
)
368380
);
369381
});

frontend/src/components/listeners/SubmitExtraction.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,12 @@ export default function SubmitExtraction(props: SubmitExtractionProps) {
5555
const submitFileExtraction = (
5656
fileId: string | undefined,
5757
extractorName: string | undefined,
58+
datasetId: string | undefined,
5859
requestBody: FormData
59-
) => dispatch(submitFileExtractionAction(fileId, extractorName, requestBody));
60+
) =>
61+
dispatch(
62+
submitFileExtractionAction(fileId, extractorName, datasetId, requestBody)
63+
);
6064
const submitDatasetExtraction = (
6165
datasetId: string | undefined,
6266
extractorName: string | undefined,
@@ -74,7 +78,7 @@ export default function SubmitExtraction(props: SubmitExtractionProps) {
7478
submitDatasetExtraction(datasetId, extractorName, formData);
7579
handleNext();
7680
} else if (fileId !== undefined) {
77-
submitFileExtraction(fileId, extractorName, formData);
81+
submitFileExtraction(fileId, extractorName, datasetId, formData);
7882
handleNext();
7983
}
8084
};

0 commit comments

Comments
 (0)