Skip to content

Commit

Permalink
[backend/frontend] Fix the analyst workbenches (#5749)
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelHassine committed Jan 30, 2024
1 parent 38cb81a commit bbb1214
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4101,6 +4101,7 @@ const WorkbenchFileContentComponent = ({
label={t_i18n('Connector')}
fullWidth
containerstyle={{ width: '100%' }}
disabled={connectors.filter((n) => n.active).length === 0}
>
{connectors.map((connector) => (
<MenuItem
Expand All @@ -4120,7 +4121,7 @@ const WorkbenchFileContentComponent = ({
<Button
color="secondary"
onClick={submitForm}
disabled={isSubmitting}
disabled={isSubmitting || connectors.filter((n) => n.active).length === 0}
>
{t_i18n('Create')}
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const WorkbenchFileViewerBase = ({
{t('Analyst workbenches')}
</Typography>
<IconButton
color="secondary"
color="primary"
aria-label="Add"
onClick={() => setOpenCreate(true)}
classes={{ root: classes.createButton }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ interface FilesOptions<T extends BasicStoreCommon> extends EntityOptions<T> {
modifiedSince?: string | null
prefixMimeTypes?: string[]
maxFileSize?: number
isPending?: boolean
excludedPaths?: string[]
orderBy?: string
orderMode?: OrderingMode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ const stixCoreObjectResolvers = {
return paginatedForPathWithEnrichment(context, context.user, `import/${stixCoreObject.entity_type}/${stixCoreObject.id}`, stixCoreObject.id, opts);
},
pendingFiles: (stixCoreObject, { first }, context) => {
const opts = { first, entity_type: stixCoreObject.entity_type };
return paginatedForPathWithEnrichment(context, context.user, `import/pending/${stixCoreObject.entity_type}/${stixCoreObject.id}`, stixCoreObject.id, opts);
const opts = { first, entity_type: stixCoreObject.entity_type, entity_id: stixCoreObject.id };
return paginatedForPathWithEnrichment(context, context.user, 'import/pending', stixCoreObject.id, opts);
},
exportFiles: (stixCoreObject, { first }, context) => {
const opts = { first, entity_type: stixCoreObject.entity_type };
Expand Down

0 comments on commit bbb1214

Please sign in to comment.