Skip to content

Commit e1290ed

Browse files
Fix [ScheduleJobs/Model Endpoints] UI craches with error (#2042)
1 parent dd9ed67 commit e1290ed

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

src/components/Jobs/ScheduledJobs/ScheduledJobs.js

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ import { DANGER_BUTTON, FORBIDDEN_ERROR_STATUS_CODE } from 'igz-controls/constan
4242
import { JobsContext } from '../Jobs'
4343
import { createJobsScheduleTabContent } from '../../../utils/createJobsContent'
4444
import { getJobFunctionData } from '../jobs.util'
45-
import { generateContentActionsMenu } from '../../../layout/Content/content.util'
4645
import { getNoDataMessage } from '../../../utils/getNoDataMessage'
4746
import { openPopUp } from 'igz-controls/utils/common.util'
4847
import { parseJob } from '../../../utils/parseJob'
@@ -207,35 +206,36 @@ const ScheduledJobs = ({
207206
[fetchJobFunction, dispatch, fetchFunctionTemplate, fetchJobFunctionSuccess, setJobWizardMode]
208207
)
209208

210-
const actionsMenu = useMemo(() => {
211-
return generateContentActionsMenu(
212-
job => [
213-
{
214-
label: 'Run now',
215-
icon: <Run className="action_cell__run-icon" />,
216-
onClick: handleRunJob
217-
},
218-
{
219-
label: 'Edit',
220-
icon: <Edit />,
221-
onClick: handleEditScheduleJob,
222-
hidden: job?.type === JOB_KIND_WORKFLOW
223-
},
224-
{
225-
label: 'Delete',
226-
icon: <Delete />,
227-
className: 'danger',
228-
onClick: onRemoveScheduledJob
229-
},
230-
{
231-
label: 'View YAML',
232-
icon: <Yaml />,
233-
onClick: toggleConvertedYaml
234-
}
209+
const actionsMenu = useMemo(
210+
() => job =>
211+
[
212+
[
213+
{
214+
label: 'Run now',
215+
icon: <Run className="action_cell__run-icon" />,
216+
onClick: handleRunJob
217+
},
218+
{
219+
label: 'Edit',
220+
icon: <Edit />,
221+
onClick: handleEditScheduleJob,
222+
hidden: job?.type === JOB_KIND_WORKFLOW
223+
},
224+
{
225+
label: 'Delete',
226+
icon: <Delete />,
227+
className: 'danger',
228+
onClick: onRemoveScheduledJob
229+
},
230+
{
231+
label: 'View YAML',
232+
icon: <Yaml />,
233+
onClick: toggleConvertedYaml
234+
}
235+
]
235236
],
236-
[]
237-
)
238-
}, [handleEditScheduleJob, handleRunJob, onRemoveScheduledJob, toggleConvertedYaml])
237+
[handleEditScheduleJob, handleRunJob, onRemoveScheduledJob, toggleConvertedYaml]
238+
)
239239

240240
useEffect(() => {
241241
if (!dataIsLoaded) {

0 commit comments

Comments
 (0)