asynqmon/ui/build/static/js/main.2bdef890.chunk.js.map
2021-12-13 16:39:55 -08:00

1 line
541 KiB
Plaintext

{"version":3,"sources":["paths.ts","actions/settingsActions.ts","components/TablePaginationActions.tsx","api.ts","utils.ts","actions/queuesActions.ts","actions/queueStatsActions.ts","components/QueueSizeChart.tsx","components/ProcessedTasksChart.tsx","components/DeleteQueueConfirmationDialog.tsx","types/table.ts","components/QueuesOverviewTable.tsx","components/Tooltip.tsx","components/SplitButton.tsx","hooks/index.tsx","components/DailyStatsChart.tsx","views/DashboardView.tsx","reducers/settingsReducer.ts","theme.tsx","actions/snackbarActions.ts","components/ListItemLink.tsx","components/SyntaxHighlighter.tsx","actions/schedulerEntriesActions.ts","reducers/schedulerEntriesReducer.ts","components/SchedulerEnqueueEventsTable.tsx","components/SchedulerEntriesTable.tsx","views/SchedulersView.tsx","actions/tasksActions.ts","components/TableActions.tsx","components/ActiveTasksTable.tsx","components/PendingTasksTable.tsx","components/ScheduledTasksTable.tsx","components/RetryTasksTable.tsx","components/ArchivedTasksTable.tsx","components/CompletedTasksTable.tsx","components/TasksTable.tsx","components/QueueInfoBanner.tsx","components/QueueBreadcrumb.tsx","views/TasksView.tsx","views/TaskDetailsView.tsx","views/SettingsView.tsx","components/ServersTable.tsx","actions/serversActions.ts","views/ServersView.tsx","actions/redisInfoActions.ts","components/QueueLocationTable.tsx","views/RedisInfoView.tsx","views/PageNotFoundView.tsx","App.tsx","reducers/queuesReducer.ts","reducers/tasksReducer.ts","reducers/serversReducer.ts","reducers/snackbarReducer.ts","reducers/queueStatsReducer.ts","reducers/redisInfoReducer.ts","localStorage.ts","store.ts","serviceWorker.ts","index.tsx"],"names":["paths","HOME","window","ROOT_PATH","SETTINGS","SERVERS","SCHEDULERS","QUEUE_DETAILS","REDIS","TASK_DETAILS","queueDetailsPath","qname","taskStatus","path","replace","taskDetailsPath","taskId","POLL_INTERVAL_CHANGE","THEME_PREFERENCE_CHANGE","TOGGLE_DRAWER","TASK_ROWS_PER_PAGE_CHANGE","DAILY_STATS_KEY_CHANGE","taskRowsPerPageChange","value","type","useStyles","makeStyles","theme","createStyles","root","flexShrink","marginLeft","spacing","TablePaginationActions","props","classes","useTheme","count","page","rowsPerPage","onPageChange","className","IconButton","onClick","event","disabled","aria-label","direction","Math","ceil","max","rowsPerPageOptions","BASE_URL","listQueues","a","axios","method","url","resp","data","deleteQueue","pauseQueue","resumeQueue","listQueueStats","getTaskInfo","id","listActiveTasks","pageOpts","queryString","stringify","cancelActiveTask","cancelAllActiveTasks","batchCancelActiveTasks","taskIds","task_ids","listPendingTasks","listScheduledTasks","listRetryTasks","listArchivedTasks","listCompletedTasks","archivePendingTask","batchArchivePendingTasks","archiveAllPendingTasks","deletePendingTask","batchDeletePendingTasks","deleteAllPendingTasks","runScheduledTask","archiveScheduledTask","deleteScheduledTask","batchDeleteScheduledTasks","deleteAllScheduledTasks","batchRunScheduledTasks","runAllScheduledTasks","batchArchiveScheduledTasks","archiveAllScheduledTasks","runRetryTask","archiveRetryTask","deleteRetryTask","batchDeleteRetryTasks","deleteAllRetryTasks","batchRunRetryTasks","runAllRetryTasks","batchArchiveRetryTasks","archiveAllRetryTasks","runArchivedTask","deleteArchivedTask","batchDeleteArchivedTasks","deleteAllArchivedTasks","batchRunArchivedTasks","runAllArchivedTasks","deleteCompletedTask","batchDeleteCompletedTasks","deleteAllCompletedTasks","listServers","listSchedulerEntries","listSchedulerEnqueueEvents","entryId","getRedisInfo","toErrorStringWithHttpStatus","error","response","status","statusText","toErrorString","durationFromSeconds","totalSeconds","hour","floor","minute","second","durationBetween","start","end","durationInMillisec","stringifyDuration","d","n","durationBefore","timestamp","duration","Date","parse","now","timeAgo","timeAgoUnix","console","unixtime","uuidPrefix","uuid","idx","indexOf","substr","percentage","numerator","denominator","perc","toFixed","prettifyPayload","p","JSON","isJsonPayload","LIST_QUEUES_BEGIN","LIST_QUEUES_SUCCESS","LIST_QUEUES_ERROR","DELETE_QUEUE_BEGIN","DELETE_QUEUE_SUCCESS","DELETE_QUEUE_ERROR","PAUSE_QUEUE_BEGIN","PAUSE_QUEUE_SUCCESS","PAUSE_QUEUE_ERROR","RESUME_QUEUE_BEGIN","RESUME_QUEUE_SUCCESS","RESUME_QUEUE_ERROR","listQueuesAsync","dispatch","payload","deleteQueueAsync","queue","LIST_QUEUE_STATS_BEGIN","LIST_QUEUE_STATS_SUCCESS","LIST_QUEUE_STATS_ERROR","QueueSizeChart","history","useHistory","ResponsiveContainer","maxBarSize","params","allQueues","map","b","activeLabel","includes","push","style","cursor","CartesianGrid","strokeDasharray","XAxis","dataKey","YAxis","Tooltip","Legend","Bar","stackId","fill","ProcessedTasksChart","palette","success","light","connector","SortDirection","connect","state","ownProps","requestPending","q","queues","find","name","undefined","Dialog","open","onClose","aria-labelledby","aria-describedby","size","DialogTitle","DialogContent","DialogContentText","DialogActions","Button","color","autoFocus","SortBy","table","minWidth","fixedCell","position","zIndex","left","background","paper","colConfigs","label","key","sortBy","Queue","align","State","Size","MemoryUsage","Processed","Failed","ErrorRate","None","sortQueues","cmpFn","copy","sort","QueuesOverviewTable","useState","setSortBy","Asc","sortDir","setSortDir","queueToDelete","setQueueToDelete","Fragment","TableContainer","Table","TableHead","TableRow","cfg","i","TableCell","clsx","TableSortLabel","active","sortKey","e","nextSortDir","Desc","TableBody","q1","q2","isQ1Smaller","paused","memory_usage_bytes","processed","failed","q1ErrorRate","q2ErrorRate","Row","onPauseClick","onResumeClick","onDeleteClick","useRowStyles","row","borderBottomWidth","linkText","textDecoration","text","primary","textGreen","dark","textRed","boldCell","fontWeight","actionIconsContainer","display","justifyContent","showIcons","setShowIcons","component","scope","to","prettyBytes","onMouseEnter","onMouseLeave","title","fontSize","withStyles","tooltip","backgroundColor","maxWidth","typography","pxToRem","border","popper","buttonContained","isDarkTheme","default","action","hover","SplitButton","React","setOpen","anchorRef","useRef","initialSelectedKey","selectedKey","setSelectedKey","handleClose","current","contains","target","selectedOpt","options","opt","ButtonGroup","variant","ref","disableElevation","contained","aria-controls","aria-expanded","aria-haspopup","prevOpen","Popper","anchorEl","role","transition","disablePortal","TransitionProps","placement","Grow","transformOrigin","Paper","ClickAwayListener","onClickAway","MenuList","MenuItem","selected","onSelect","usePolling","doFn","interval","useEffect","setInterval","clearInterval","DailyStatsChart","queueStats","numDays","dataByDate","stat","hasOwnProperty","date","succeeded","Object","values","sortByDate","slice","makeChartData","LineChart","minTickGap","Line","stroke","main","x","y","container","paddingTop","paddingBottom","padding","overflow","flexDirection","chartHeader","alignItems","marginBottom","chartHeaderTitle","chartContainer","width","height","infoIcon","grey","tooltipSection","tableContainer","mapDispatchToProps","pauseQueueAsync","resumeQueueAsync","listQueueStatsAsync","dailyStatsKeyChange","ThemePreference","loading","currentStats","pollInterval","settings","dailyStatsKey","dailyStatsChartType","qnames","join","processedStats","Container","Grid","length","item","xs","Alert","severity","AlertTitle","Typography","initialState","themePreference","SystemDefault","isDrawerOpen","taskRowsPerPage","settingsReducer","CLOSE_SNACKBAR","listItem","borderTopRightRadius","borderBottomRightRadius","secondary","selectedText","selectedIcon","ListItemLink","icon","isMatch","useRouteMatch","strict","sensitive","exact","renderLink","useMemo","forwardRef","itemProps","ListItem","button","ListItemIcon","ListItemText","SyntaxHighlighter","styleDark","styleLight","language","customStyle","children","LIST_SCHEDULER_ENTRIES_BEGIN","LIST_SCHEDULER_ENTRIES_SUCCESS","LIST_SCHEDULER_ENTRIES_ERROR","LIST_SCHEDULER_ENQUEUE_EVENTS_BEGIN","LIST_SCHEDULER_ENQUEUE_EVENTS_SUCCESS","LIST_SCHEDULER_ENQUEUE_EVENTS_ERROR","getEnqueueEventsEntry","enqueueEventsByEntryId","schedulerEntriesReducer","entries","entry","sortByEnqueuedAt","e1","e2","enqueued_at","newData","uniqBy","events","stickyHeaderCell","schedulerEntries","listSchedulerEnqueueEventsAsync","stickyHeader","task_id","noBorder","modal","modalContent","outline","borderRadius","shape","eventsTable","maxHeight","EntryId","Spec","Type","Payload","Options","NextEnqueue","PrevEnqueue","sortEntries","SchedulerEntriesTable","activeEntryId","setActiveEntryId","isE1Smaller","spec","task_type","task_payload","next_enqueue_at","e1PrevEnqueueAt","prev_enqueue_at","e2PrevEnqueueAt","isLastRow","onShowHistoryClick","Modal","gutterBottom","rowRoot","borderBottom","heading","paddingLeft","listSchedulerEntriesAsync","GET_TASK_INFO_BEGIN","GET_TASK_INFO_SUCCESS","GET_TASK_INFO_ERROR","LIST_ACTIVE_TASKS_BEGIN","LIST_ACTIVE_TASKS_SUCCESS","LIST_ACTIVE_TASKS_ERROR","LIST_PENDING_TASKS_BEGIN","LIST_PENDING_TASKS_SUCCESS","LIST_PENDING_TASKS_ERROR","LIST_SCHEDULED_TASKS_BEGIN","LIST_SCHEDULED_TASKS_SUCCESS","LIST_SCHEDULED_TASKS_ERROR","LIST_RETRY_TASKS_BEGIN","LIST_RETRY_TASKS_SUCCESS","LIST_RETRY_TASKS_ERROR","LIST_ARCHIVED_TASKS_BEGIN","LIST_ARCHIVED_TASKS_SUCCESS","LIST_ARCHIVED_TASKS_ERROR","LIST_COMPLETED_TASKS_BEGIN","LIST_COMPLETED_TASKS_SUCCESS","LIST_COMPLETED_TASKS_ERROR","CANCEL_ACTIVE_TASK_BEGIN","CANCEL_ACTIVE_TASK_SUCCESS","CANCEL_ACTIVE_TASK_ERROR","CANCEL_ALL_ACTIVE_TASKS_BEGIN","CANCEL_ALL_ACTIVE_TASKS_SUCCESS","CANCEL_ALL_ACTIVE_TASKS_ERROR","BATCH_CANCEL_ACTIVE_TASKS_BEGIN","BATCH_CANCEL_ACTIVE_TASKS_SUCCESS","BATCH_CANCEL_ACTIVE_TASKS_ERROR","RUN_SCHEDULED_TASK_BEGIN","RUN_SCHEDULED_TASK_SUCCESS","RUN_SCHEDULED_TASK_ERROR","RUN_RETRY_TASK_BEGIN","RUN_RETRY_TASK_SUCCESS","RUN_RETRY_TASK_ERROR","RUN_ARCHIVED_TASK_BEGIN","RUN_ARCHIVED_TASK_SUCCESS","RUN_ARCHIVED_TASK_ERROR","DELETE_PENDING_TASK_BEGIN","DELETE_PENDING_TASK_SUCCESS","DELETE_PENDING_TASK_ERROR","ARCHIVE_PENDING_TASK_BEGIN","ARCHIVE_PENDING_TASK_SUCCESS","ARCHIVE_PENDING_TASK_ERROR","DELETE_SCHEDULED_TASK_BEGIN","DELETE_SCHEDULED_TASK_SUCCESS","DELETE_SCHEDULED_TASK_ERROR","ARCHIVE_SCHEDULED_TASK_BEGIN","ARCHIVE_SCHEDULED_TASK_SUCCESS","ARCHIVE_SCHEDULED_TASK_ERROR","ARCHIVE_RETRY_TASK_BEGIN","ARCHIVE_RETRY_TASK_SUCCESS","ARCHIVE_RETRY_TASK_ERROR","BATCH_ARCHIVE_PENDING_TASKS_BEGIN","BATCH_ARCHIVE_PENDING_TASKS_SUCCESS","BATCH_ARCHIVE_PENDING_TASKS_ERROR","BATCH_DELETE_PENDING_TASKS_BEGIN","BATCH_DELETE_PENDING_TASKS_SUCCESS","BATCH_DELETE_PENDING_TASKS_ERROR","DELETE_ALL_PENDING_TASKS_BEGIN","DELETE_ALL_PENDING_TASKS_SUCCESS","DELETE_ALL_PENDING_TASKS_ERROR","ARCHIVE_ALL_PENDING_TASKS_BEGIN","ARCHIVE_ALL_PENDING_TASKS_SUCCESS","ARCHIVE_ALL_PENDING_TASKS_ERROR","BATCH_RUN_SCHEDULED_TASKS_BEGIN","BATCH_RUN_SCHEDULED_TASKS_SUCCESS","BATCH_RUN_SCHEDULED_TASKS_ERROR","BATCH_ARCHIVE_SCHEDULED_TASKS_BEGIN","BATCH_ARCHIVE_SCHEDULED_TASKS_SUCCESS","BATCH_ARCHIVE_SCHEDULED_TASKS_ERROR","BATCH_DELETE_SCHEDULED_TASKS_BEGIN","BATCH_DELETE_SCHEDULED_TASKS_SUCCESS","BATCH_DELETE_SCHEDULED_TASKS_ERROR","RUN_ALL_SCHEDULED_TASKS_BEGIN","RUN_ALL_SCHEDULED_TASKS_SUCCESS","RUN_ALL_SCHEDULED_TASKS_ERROR","ARCHIVE_ALL_SCHEDULED_TASKS_BEGIN","ARCHIVE_ALL_SCHEDULED_TASKS_SUCCESS","ARCHIVE_ALL_SCHEDULED_TASKS_ERROR","DELETE_ALL_SCHEDULED_TASKS_BEGIN","DELETE_ALL_SCHEDULED_TASKS_SUCCESS","DELETE_ALL_SCHEDULED_TASKS_ERROR","DELETE_RETRY_TASK_BEGIN","DELETE_RETRY_TASK_SUCCESS","DELETE_RETRY_TASK_ERROR","BATCH_RUN_RETRY_TASKS_BEGIN","BATCH_RUN_RETRY_TASKS_SUCCESS","BATCH_RUN_RETRY_TASKS_ERROR","BATCH_ARCHIVE_RETRY_TASKS_BEGIN","BATCH_ARCHIVE_RETRY_TASKS_SUCCESS","BATCH_ARCHIVE_RETRY_TASKS_ERROR","BATCH_DELETE_RETRY_TASKS_BEGIN","BATCH_DELETE_RETRY_TASKS_SUCCESS","BATCH_DELETE_RETRY_TASKS_ERROR","RUN_ALL_RETRY_TASKS_BEGIN","RUN_ALL_RETRY_TASKS_SUCCESS","RUN_ALL_RETRY_TASKS_ERROR","ARCHIVE_ALL_RETRY_TASKS_BEGIN","ARCHIVE_ALL_RETRY_TASKS_SUCCESS","ARCHIVE_ALL_RETRY_TASKS_ERROR","DELETE_ALL_RETRY_TASKS_BEGIN","DELETE_ALL_RETRY_TASKS_SUCCESS","DELETE_ALL_RETRY_TASKS_ERROR","DELETE_ARCHIVED_TASK_BEGIN","DELETE_ARCHIVED_TASK_SUCCESS","DELETE_ARCHIVED_TASK_ERROR","BATCH_RUN_ARCHIVED_TASKS_BEGIN","BATCH_RUN_ARCHIVED_TASKS_SUCCESS","BATCH_RUN_ARCHIVED_TASKS_ERROR","BATCH_DELETE_ARCHIVED_TASKS_BEGIN","BATCH_DELETE_ARCHIVED_TASKS_SUCCESS","BATCH_DELETE_ARCHIVED_TASKS_ERROR","RUN_ALL_ARCHIVED_TASKS_BEGIN","RUN_ALL_ARCHIVED_TASKS_SUCCESS","RUN_ALL_ARCHIVED_TASKS_ERROR","DELETE_ALL_ARCHIVED_TASKS_BEGIN","DELETE_ALL_ARCHIVED_TASKS_SUCCESS","DELETE_ALL_ARCHIVED_TASKS_ERROR","DELETE_COMPLETED_TASK_BEGIN","DELETE_COMPLETED_TASK_SUCCESS","DELETE_COMPLETED_TASK_ERROR","DELETE_ALL_COMPLETED_TASKS_BEGIN","DELETE_ALL_COMPLETED_TASKS_SUCCESS","DELETE_ALL_COMPLETED_TASKS_ERROR","BATCH_DELETE_COMPLETED_TASKS_BEGIN","BATCH_DELETE_COMPLETED_TASKS_SUCCESS","BATCH_DELETE_COMPLETED_TASKS_ERROR","actionsContainer","moreIcon","marginRight","iconGroup","borderLeft","TableActions","menuAnchor","setMenuAnchor","closeMenu","currentTarget","keepMounted","Boolean","menuItemActions","showIconButtons","iconButtonActions","alert","borderTopLeftRadius","pagination","listActiveTasksAsync","cancelActiveTaskAsync","batchCancelActiveTasksAsync","cancelAllActiveTasksAsync","columns","tasks","activeTasks","batchActionPending","allActionPending","pageSize","boxShadow","shadows","borderBottomColor","task","isSelected","stopPropagation","Checkbox","onChange","onSelectChange","checked","margin","canceling","start_time","deadline","onActionCellEnter","onActionCellLeave","showActions","onCancelClick","setPage","selectedIds","setSelectedIds","activeTaskId","setActiveTaskId","useCallback","rowCount","numSelected","then","indeterminate","newSelected","t","inputProps","col","concat","filter","TableFooter","TablePagination","colSpan","SelectProps","native","newPage","onRowsPerPageChange","parseInt","ActionsComponent","listPendingTasksAsync","deletePendingTaskAsync","batchDeletePendingTasksAsync","deleteAllPendingTasksAsync","deleted","archivePendingTaskAsync","batchArchivePendingTasksAsync","archiveAllPendingTasksAsync","pendingTasks","actionCell","actionButton","retried","max_retry","onArchiveClick","totalTaskCount","listScheduledTasksAsync","batchDeleteScheduledTasksAsync","batchRunScheduledTasksAsync","batchArchiveScheduledTasksAsync","deleteAllScheduledTasksAsync","runAllScheduledTasksAsync","archiveAllScheduledTasksAsync","deleteScheduledTaskAsync","runScheduledTaskAsync","archiveScheduledTaskAsync","scheduledTasks","next_process_at","onRunClick","batchDeleteRetryTasksAsync","batchRunRetryTasksAsync","batchArchiveRetryTasksAsync","deleteAllRetryTasksAsync","runAllRetryTasksAsync","archiveAllRetryTasksAsync","listRetryTasksAsync","deleteRetryTaskAsync","runRetryTaskAsync","archiveRetryTaskAsync","retryTasks","error_message","listArchivedTasksAsync","runArchivedTaskAsync","runAllArchivedTasksAsync","deleteArchivedTaskAsync","deleteAllArchivedTasksAsync","batchRunArchivedTasksAsync","batchDeleteArchivedTasksAsync","archivedTasks","last_failed_at","listCompletedTasksAsync","deleteCompletedTaskAsync","deleteAllCompletedTasksAsync","batchDeleteCompletedTasksAsync","completedTasks","completed_at","result","ttl_seconds","TabPanel","other","hidden","flex","overflowY","queueInfo","pending","scheduled","retry","archived","completed","header","paddingRight","chip","taskcount","textAlign","searchbar","search","searchIcon","pointerEvents","inputRoot","inputInput","chips","searchQuery","setSearchQuery","c","Chip","InputBase","placeholder","input","onKeyDown","trim","banner","bannerItem","flexGrow","divider","StyledBreadcrumb","fontWeightRegular","emphasize","QueueBreadcrumbs","setAnchorEl","handleClick","preventDefault","Breadcrumbs","Link","queueName","deleteIcon","onDelete","breadcrumbs","tasksTable","validStatus","useParams","URLSearchParams","useLocation","get","taskInfo","getTaskInfoAsync","marginTop","infoRow","infoKeyCell","infoValueCell","footer","md","timeout_seconds","startIcon","goBack","formControl","selectEmpty","select","pollIntervalChange","selectTheme","sliderValue","setSliderValue","justify","Slider","val","onChangeCommitted","valueLabelDisplay","step","marks","min","Select","labelId","Always","Never","HostPID","Started","Status","Queues","ActiveWorkers","sortServerInfos","ServersTable","servers","s1","s2","isS1Smaller","host","pid","s1StartTime","s2StartTime","s1Queues","keys","queue_priorities","s2Queues","active_workers","srv","server","link","concurrency","Collapse","in","timeout","unmountOnExit","worker","Box","strict_priority_enabled","LIST_SERVERS_BEGIN","LIST_SERVERS_SUCCESS","LIST_SERVERS_ERROR","listServersAsync","GET_REDIS_INFO_BEGIN","GET_REDIS_INFO_SUCCESS","GET_REDIS_INFO_ERROR","QueueLocationTable","queueLocations","loc","keyslot","nodes","RedisMetricCards","redisInfo","MetricCard","content","redis_version","uptime_in_days","used_memory_human","used_memory_peak_human","mem_fragmentation_ratio","connected_clients","connected_slaves","rdb_last_save_time","rdb_changes_since_last_save","Card","CardContent","redis","redisAddress","address","redisInfoRaw","rawData","redisClusterEnabled","cluster","redisClusterNodesRaw","rawClusterNodes","getRedisInfoAsync","href","headingText","PageNotFoundView","closeSnackbar","toggleDrawer","SlideUpTransition","Slide","snackbar","prefersDarkMode","useMediaQuery","createMuiTheme","toolbar","toolbarIcon","mixins","appBar","drawer","menuButton","menuButtonHidden","drawerPaper","whiteSpace","transitions","create","easing","sharp","enteringScreen","drawerPaperClose","overflowX","leavingScreen","breakpoints","up","snackbarCloseIcon","appBarSpacer","mainContainer","contentWrapper","sidebarContainer","ThemeProvider","AppBar","Toolbar","edge","noWrap","Drawer","Snackbar","anchorOrigin","vertical","horizontal","isOpen","autoHideDuration","TransitionComponent","SnackbarContent","message","List","queuesReducer","stats","archived_ids","deleted_ids","pending_ids","tasksReducer","canceled_ids","error_ids","snackbarReducer","isSameDate","ts1","ts2","date1","date2","getUTCDate","getUTCMonth","getUTCFullYear","LOCAL_STORAGE_KEY","rootReducer","combineReducers","newStats","info","raw_info","raw_cluster_nodes","queue_locations","preloadedState","serializedState","localStorage","getItem","savedState","settingsInitialState","err","log","loadState","store","configureStore","reducer","location","hostname","match","currentSettings","subscribe","getState","setItem","saveState","ReactDOM","render","StrictMode","CssBaseline","document","getElementById","navigator","serviceWorker","ready","registration","unregister","catch"],"mappings":"4cAAaA,EAAQ,CACnBC,KAAK,GAAD,OAAKC,OAAOC,UAAZ,KACJC,SAAS,GAAD,OAAKF,OAAOC,UAAZ,aACRE,QAAQ,GAAD,OAAKH,OAAOC,UAAZ,YACPG,WAAW,GAAD,OAAKJ,OAAOC,UAAZ,eACVI,cAAc,GAAD,OAAKL,OAAOC,UAAZ,kBACb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ApBS,EACF,MAAO,GAET,IAAMG,EAAaj2B,KAAKlB,MAAMg3B,GAC9B,MAAO,CACLnlB,SAAS,2BACJulB,IACCD,EAAWtlB,UAAY,KAG/B,MAAOwlB,GAEP,OADAj3B,QAAQk3B,IAAI,mCAAoCD,GACzC,ICEYE,GAURC,GALDC,aAAe,CAC3BC,QAASlB,GACTO,oBCjBkB1V,QACW,cAA7BhqB,OAAOsgC,SAASC,UAEe,UAA7BvgC,OAAOsgC,SAASC,UAEhBvgC,OAAOsgC,SAASC,SAASC,MACvB,2DCRN,IAAIC,QAA6ChzB,EACjD0yB,GAAMO,WAAU,WACOD,MACrBA,GAAkBN,GAAMQ,WAAWnmB,WHW9B,SAAmBtN,GACxB,IACE,IAAMyyB,EAAkB91B,KAAK1F,UAAU,CAAEqW,SAAUtN,EAAMsN,WACzDolB,aAAagB,QAAQ1B,GAAmBS,GACxC,MAAOK,GACPj3B,QAAQ1B,MAAM,oCAAqC24B,IGZnDa,CAAUV,GAAMQ,eAIpBG,IAASC,OACP,gBAAC,IAAMC,WAAP,WACE,eAACC,EAAA,EAAD,IACA,eAAC,IAAD,CAAUd,MAAOA,GAAjB,SACE,eAAC,GAAD,SAGJe,SAASC,eAAe,SD+GpB,kBAAmBC,WACrBA,UAAUC,cAAcC,MACrB3U,MAAK,SAAA4U,GACJA,EAAaC,gBAEdC,OAAM,SAAAp6B,GACL0B,QAAQ1B,MAAMA,EAAM02B,c","file":"static/js/main.2bdef890.chunk.js","sourcesContent":["export const paths = {\n HOME: `${window.ROOT_PATH}/`,\n SETTINGS: `${window.ROOT_PATH}/settings`,\n SERVERS: `${window.ROOT_PATH}/servers`,\n SCHEDULERS: `${window.ROOT_PATH}/schedulers`,\n QUEUE_DETAILS: `${window.ROOT_PATH}/queues/:qname`,\n REDIS: `${window.ROOT_PATH}/redis`,\n TASK_DETAILS: `${window.ROOT_PATH}/queues/:qname/tasks/:taskId`,\n};\n\n/**************************************************************\n Path Helper functions\n **************************************************************/\n\nexport function queueDetailsPath(qname: string, taskStatus?: string): string {\n const path = paths.QUEUE_DETAILS.replace(\":qname\", qname);\n if (taskStatus) {\n return `${path}?status=${taskStatus}`;\n }\n return path;\n}\n\nexport function taskDetailsPath(qname: string, taskId: string): string {\n return paths.TASK_DETAILS.replace(\":qname\", qname).replace(\":taskId\", taskId);\n}\n\n/**************************************************************\n URL Params\n **************************************************************/\n\nexport interface QueueDetailsRouteParams {\n qname: string;\n}\n\nexport interface TaskDetailsRouteParams {\n qname: string;\n taskId: string;\n}","import { ThemePreference } from \"../reducers/settingsReducer\";\nimport { DailyStatsKey } from \"../views/DashboardView\";\n// List of settings related action types.\nexport const POLL_INTERVAL_CHANGE = \"POLL_INTERVAL_CHANGE\";\nexport const THEME_PREFERENCE_CHANGE = \"THEME_PREFERENCE_CHANGE\";\nexport const TOGGLE_DRAWER = \"TOGGLE_DRAWER\";\nexport const TASK_ROWS_PER_PAGE_CHANGE = \"TASK_ROWS_PER_PAGE_CHANGE\";\nexport const DAILY_STATS_KEY_CHANGE = \"DAILY_STATS_KEY_CHANGE\";\n\ninterface PollIntervalChangeAction {\n type: typeof POLL_INTERVAL_CHANGE;\n value: number; // new poll interval value in seconds\n}\n\ninterface ThemePreferenceChangeAction {\n type: typeof THEME_PREFERENCE_CHANGE;\n value: ThemePreference;\n}\n\ninterface ToggleDrawerAction {\n type: typeof TOGGLE_DRAWER;\n}\n\ninterface TaskRowsPerPageChange {\n type: typeof TASK_ROWS_PER_PAGE_CHANGE;\n value: number;\n}\n\ninterface DailyStatsKeyChange {\n type: typeof DAILY_STATS_KEY_CHANGE;\n value: DailyStatsKey;\n}\n\n// Union of all settings related action types.\nexport type SettingsActionTypes =\n | PollIntervalChangeAction\n | ThemePreferenceChangeAction\n | ToggleDrawerAction\n | TaskRowsPerPageChange\n | DailyStatsKeyChange;\n\nexport function pollIntervalChange(value: number) {\n return {\n type: POLL_INTERVAL_CHANGE,\n value,\n };\n}\n\nexport function selectTheme(value: ThemePreference) {\n return {\n type: THEME_PREFERENCE_CHANGE,\n value,\n };\n}\n\nexport function toggleDrawer() {\n return { type: TOGGLE_DRAWER };\n}\n\nexport function taskRowsPerPageChange(value: number) {\n return {\n type: TASK_ROWS_PER_PAGE_CHANGE,\n value,\n };\n}\n\nexport function dailyStatsKeyChange(value: DailyStatsKey) {\n return {\n type: DAILY_STATS_KEY_CHANGE,\n value,\n }\n}\n","import React from \"react\";\nimport {\n useTheme,\n makeStyles,\n Theme,\n createStyles,\n} from \"@material-ui/core/styles\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport FirstPageIcon from \"@material-ui/icons/FirstPage\";\nimport KeyboardArrowLeft from \"@material-ui/icons/KeyboardArrowLeft\";\nimport KeyboardArrowRight from \"@material-ui/icons/KeyboardArrowRight\";\nimport LastPageIcon from \"@material-ui/icons/LastPage\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n flexShrink: 0,\n marginLeft: theme.spacing(2.5),\n },\n })\n);\n\ninterface TablePaginationActionsProps {\n count: number;\n page: number;\n rowsPerPage: number;\n onPageChange: (\n event: React.MouseEvent<HTMLButtonElement>,\n newPage: number\n ) => void;\n}\n\nfunction TablePaginationActions(props: TablePaginationActionsProps) {\n const classes = useStyles();\n const theme = useTheme();\n const { count, page, rowsPerPage, onPageChange } = props;\n\n const handleFirstPageButtonClick = (\n event: React.MouseEvent<HTMLButtonElement>\n ) => {\n onPageChange(event, 0);\n };\n\n const handleBackButtonClick = (\n event: React.MouseEvent<HTMLButtonElement>\n ) => {\n onPageChange(event, page - 1);\n };\n\n const handleNextButtonClick = (\n event: React.MouseEvent<HTMLButtonElement>\n ) => {\n onPageChange(event, page + 1);\n };\n\n const handleLastPageButtonClick = (\n event: React.MouseEvent<HTMLButtonElement>\n ) => {\n onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));\n };\n\n return (\n <div className={classes.root}>\n <IconButton\n onClick={handleFirstPageButtonClick}\n disabled={page === 0}\n aria-label=\"first page\"\n >\n {theme.direction === \"rtl\" ? <LastPageIcon /> : <FirstPageIcon />}\n </IconButton>\n <IconButton\n onClick={handleBackButtonClick}\n disabled={page === 0}\n aria-label=\"previous page\"\n >\n {theme.direction === \"rtl\" ? (\n <KeyboardArrowRight />\n ) : (\n <KeyboardArrowLeft />\n )}\n </IconButton>\n <IconButton\n onClick={handleNextButtonClick}\n disabled={page >= Math.ceil(count / rowsPerPage) - 1}\n aria-label=\"next page\"\n >\n {theme.direction === \"rtl\" ? (\n <KeyboardArrowLeft />\n ) : (\n <KeyboardArrowRight />\n )}\n </IconButton>\n <IconButton\n onClick={handleLastPageButtonClick}\n disabled={page >= Math.ceil(count / rowsPerPage) - 1}\n aria-label=\"last page\"\n >\n {theme.direction === \"rtl\" ? <FirstPageIcon /> : <LastPageIcon />}\n </IconButton>\n </div>\n );\n}\n\nexport default TablePaginationActions;\n\nexport const rowsPerPageOptions = [10, 20, 30, 60, 100];\nexport const defaultPageSize = 20;\n","import axios from \"axios\";\nimport queryString from \"query-string\";\n\n// In production build, API server is on listening on the same port as\n// the static file server.\n// In developement, we assume that the API server is listening on port 8080.\nconst BASE_URL =\n process.env.NODE_ENV === \"production\"\n ? `${window.ROOT_PATH}/api`\n : `http://localhost:8080${window.ROOT_PATH}/api`;\n\nexport interface ListQueuesResponse {\n queues: Queue[];\n}\n\nexport interface ListTasksResponse {\n tasks: TaskInfo[];\n stats: Queue;\n}\n\nexport interface ListServersResponse {\n servers: ServerInfo[];\n}\n\nexport interface ListSchedulerEntriesResponse {\n entries: SchedulerEntry[];\n}\n\nexport interface ListSchedulerEnqueueEventsResponse {\n events: SchedulerEnqueueEvent[];\n}\n\nexport interface BatchCancelTasksResponse {\n canceled_ids: string[];\n error_ids: string[];\n}\n\nexport interface BatchDeleteTasksResponse {\n deleted_ids: string[];\n failed_ids: string[];\n}\n\nexport interface BatchRunTasksResponse {\n pending_ids: string[];\n error_ids: string[];\n}\n\nexport interface BatchArchiveTasksResponse {\n archived_ids: string[];\n error_ids: string[];\n}\n\nexport interface DeleteAllTasksResponse {\n deleted: number;\n}\n\nexport interface ListQueueStatsResponse {\n stats: { [qname: string]: DailyStat[] };\n}\n\nexport interface RedisInfoResponse {\n address: string;\n info: RedisInfo;\n raw_info: string;\n cluster: boolean;\n\n // following fields are set only when cluster=true\n raw_cluster_nodes: string;\n queue_locations: QueueLocation[] | null;\n}\n\n// Describes location of a queue in cluster.\nexport interface QueueLocation {\n queue: string; // queue name\n keyslot: number; // cluster keyslot\n nodes: string[]; // node addresses\n}\n\n// Return value from redis INFO command.\n// See https://redis.io/commands/info#return-value.\nexport interface RedisInfo {\n active_defrag_hits: string;\n active_defrag_key_hits: string;\n active_defrag_key_misses: string;\n active_defrag_misses: string;\n active_defrag_running: string;\n allocator_active: string;\n allocator_allocated: string;\n allocator_frag_bytes: string;\n allocator_frag_ratio: string;\n allocator_resident: string;\n allocator_rss_bytes: string;\n allocator_rss_ratio: string;\n aof_current_rewrite_time_sec: string;\n aof_enabled: string;\n aof_last_bgrewrite_status: string;\n aof_last_cow_size: string;\n aof_last_rewrite_time_sec: string;\n aof_last_write_status: string;\n aof_rewrite_in_progress: string;\n aof_rewrite_scheduled: string;\n arch_bits: string;\n atomicvar_api: string;\n blocked_clients: string;\n client_recent_max_input_buffer: string;\n client_recent_max_output_buffer: string;\n clients_in_timeout_table: string;\n cluster_enabled: string;\n config_file: string;\n configured_hz: string;\n connected_clients: string;\n connected_slaves: string;\n evicted_keys: string;\n executable: string;\n expire_cycle_cpu_milliseconds: string;\n expired_keys: string;\n expired_stale_perc: string;\n expired_time_cap_reached_count: string;\n gcc_version: string;\n hz: string;\n instantaneous_input_kbps: string;\n instantaneous_ops_per_sec: string;\n instantaneous_output_kbps: string;\n keyspace_hits: string;\n keyspace_misses: string;\n latest_fork_usec: string;\n lazyfree_pending_objects: string;\n loading: string;\n lru_clock: string;\n master_repl_offset: string;\n master_replid: string;\n master_replid2: string;\n maxmemory: string;\n maxmemory_human: string;\n maxmemory_policy: string;\n mem_allocator: string;\n mem_aof_buffer: string;\n mem_clients_normal: string;\n mem_clients_slaves: string;\n mem_fragmentation_bytes: string;\n mem_fragmentation_ratio: string;\n mem_not_counted_for_evict: string;\n mem_replication_backlog: string;\n migrate_cached_sockets: string;\n module_fork_in_progress: string;\n module_fork_last_cow_size: string;\n multiplexing_api: string;\n number_of_cached_scripts: string;\n os: string;\n process_id: string;\n pubsub_channels: string;\n pubsub_patterns: string;\n rdb_bgsave_in_progress: string;\n rdb_changes_since_last_save: string;\n rdb_current_bgsave_time_sec: string;\n rdb_last_bgsave_status: string;\n rdb_last_bgsave_time_sec: string;\n rdb_last_cow_size: string;\n rdb_last_save_time: string;\n redis_build_id: string;\n redis_git_dirty: string;\n redis_git_sha1: string;\n redis_mode: string;\n redis_version: string;\n rejected_connections: string;\n repl_backlog_active: string;\n repl_backlog_first_byte_offset: string;\n repl_backlog_histlen: string;\n repl_backlog_size: string;\n role: string;\n rss_overhead_bytes: string;\n rss_overhead_ratio: string;\n run_id: string;\n second_repl_offset: string;\n slave_expires_tracked_keys: string;\n sync_full: string;\n sync_partial_err: string;\n sync_partial_ok: string;\n tcp_port: string;\n total_commands_processed: string;\n total_connections_received: string;\n total_net_input_bytes: string;\n total_net_output_bytes: string;\n total_system_memory: string;\n total_system_memory_human: string;\n tracking_clients: string;\n tracking_total_items: string;\n tracking_total_keys: string;\n tracking_total_prefixes: string;\n unexpected_error_replies: string;\n uptime_in_days: string;\n uptime_in_seconds: string;\n used_cpu_sys: string;\n used_cpu_sys_children: string;\n used_cpu_user: string;\n used_cpu_user_children: string;\n used_memory: string;\n used_memory_dataset: string;\n used_memory_dataset_perc: string;\n used_memory_human: string;\n used_memory_lua: string;\n used_memory_lua_human: string;\n used_memory_overhead: string;\n used_memory_peak: string;\n used_memory_peak_human: string;\n used_memory_peak_perc: string;\n used_memory_rss: string;\n used_memory_rss_human: string;\n used_memory_scripts: string;\n used_memory_scripts_human: string;\n used_memory_startup: string;\n}\n\nexport interface Queue {\n queue: string;\n paused: boolean;\n size: number;\n memory_usage_bytes: number;\n active: number;\n pending: number;\n scheduled: number;\n retry: number;\n archived: number;\n completed: number;\n processed: number;\n failed: number;\n timestamp: string;\n}\n\nexport interface DailyStat {\n queue: string;\n date: string;\n processed: number;\n failed: number;\n}\n\nexport interface TaskInfo {\n id: string;\n queue: string;\n type: string;\n payload: string;\n state: string;\n start_time: string; // Only applies to task.state == 'active'\n max_retry: number;\n retried: number;\n last_failed_at: string;\n error_message: string;\n next_process_at: string;\n timeout_seconds: number;\n deadline: string;\n completed_at: string;\n result: string;\n ttl_seconds: number;\n}\n\nexport interface ServerInfo {\n id: string;\n host: string;\n pid: number;\n concurrency: number;\n queue_priorities: { [qname: string]: number };\n strict_priority_enabled: boolean;\n start_time: string;\n status: string;\n active_workers: WorkerInfo[];\n}\n\nexport interface WorkerInfo {\n task_id: string;\n queue: string;\n task_type: string;\n task_payload: string;\n start_time: string;\n}\n\nexport interface SchedulerEntry {\n id: string;\n spec: string;\n task_type: string;\n task_payload: string;\n options: string[];\n next_enqueue_at: string;\n // prev_enqueue_at will be omitted\n // if there were no previous enqueue events.\n prev_enqueue_at?: string;\n}\n\nexport interface SchedulerEnqueueEvent {\n task_id: string;\n enqueued_at: string;\n}\n\nexport interface PaginationOptions extends Record<string, number | undefined> {\n size?: number; // size of the page\n page?: number; // page number (1 being the first page)\n}\n\nexport async function listQueues(): Promise<ListQueuesResponse> {\n const resp = await axios({\n method: \"get\",\n url: `${BASE_URL}/queues`,\n });\n return resp.data;\n}\n\nexport async function deleteQueue(qname: string): Promise<void> {\n await axios({\n method: \"delete\",\n url: `${BASE_URL}/queues/${qname}`,\n });\n}\n\nexport async function pauseQueue(qname: string): Promise<void> {\n await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}:pause`,\n });\n}\n\nexport async function resumeQueue(qname: string): Promise<void> {\n await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}:resume`,\n });\n}\n\nexport async function listQueueStats(): Promise<ListQueueStatsResponse> {\n const resp = await axios({\n method: \"get\",\n url: `${BASE_URL}/queue_stats`,\n });\n return resp.data;\n}\n\nexport async function getTaskInfo(\n qname: string,\n id: string\n): Promise<TaskInfo> {\n const url = `${BASE_URL}/queues/${qname}/tasks/${id}`;\n const resp = await axios({\n method: \"get\",\n url,\n });\n return resp.data;\n}\n\nexport async function listActiveTasks(\n qname: string,\n pageOpts?: PaginationOptions\n): Promise<ListTasksResponse> {\n let url = `${BASE_URL}/queues/${qname}/active_tasks`;\n if (pageOpts) {\n url += `?${queryString.stringify(pageOpts)}`;\n }\n const resp = await axios({\n method: \"get\",\n url,\n });\n return resp.data;\n}\n\nexport async function cancelActiveTask(\n qname: string,\n taskId: string\n): Promise<void> {\n await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}/active_tasks/${taskId}:cancel`,\n });\n}\n\nexport async function cancelAllActiveTasks(qname: string): Promise<void> {\n await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}/active_tasks:cancel_all`,\n });\n}\n\nexport async function batchCancelActiveTasks(\n qname: string,\n taskIds: string[]\n): Promise<BatchCancelTasksResponse> {\n const resp = await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}/active_tasks:batch_cancel`,\n data: {\n task_ids: taskIds,\n },\n });\n return resp.data;\n}\n\nexport async function listPendingTasks(\n qname: string,\n pageOpts?: PaginationOptions\n): Promise<ListTasksResponse> {\n let url = `${BASE_URL}/queues/${qname}/pending_tasks`;\n if (pageOpts) {\n url += `?${queryString.stringify(pageOpts)}`;\n }\n const resp = await axios({\n method: \"get\",\n url,\n });\n return resp.data;\n}\n\nexport async function listScheduledTasks(\n qname: string,\n pageOpts?: PaginationOptions\n): Promise<ListTasksResponse> {\n let url = `${BASE_URL}/queues/${qname}/scheduled_tasks`;\n if (pageOpts) {\n url += `?${queryString.stringify(pageOpts)}`;\n }\n const resp = await axios({\n method: \"get\",\n url,\n });\n return resp.data;\n}\n\nexport async function listRetryTasks(\n qname: string,\n pageOpts?: PaginationOptions\n): Promise<ListTasksResponse> {\n let url = `${BASE_URL}/queues/${qname}/retry_tasks`;\n if (pageOpts) {\n url += `?${queryString.stringify(pageOpts)}`;\n }\n const resp = await axios({\n method: \"get\",\n url,\n });\n return resp.data;\n}\n\nexport async function listArchivedTasks(\n qname: string,\n pageOpts?: PaginationOptions\n): Promise<ListTasksResponse> {\n let url = `${BASE_URL}/queues/${qname}/archived_tasks`;\n if (pageOpts) {\n url += `?${queryString.stringify(pageOpts)}`;\n }\n const resp = await axios({\n method: \"get\",\n url,\n });\n return resp.data;\n}\n\nexport async function listCompletedTasks(\n qname: string,\n pageOpts?: PaginationOptions\n): Promise<ListTasksResponse> {\n let url = `${BASE_URL}/queues/${qname}/completed_tasks`;\n if (pageOpts) {\n url += `?${queryString.stringify(pageOpts)}`;\n }\n const resp = await axios({\n method: \"get\",\n url,\n });\n return resp.data;\n}\n\nexport async function archivePendingTask(\n qname: string,\n taskId: string\n): Promise<void> {\n await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}/pending_tasks/${taskId}:archive`,\n });\n}\n\nexport async function batchArchivePendingTasks(\n qname: string,\n taskIds: string[]\n): Promise<BatchArchiveTasksResponse> {\n const resp = await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}/pending_tasks:batch_archive`,\n data: {\n task_ids: taskIds,\n },\n });\n return resp.data;\n}\n\nexport async function archiveAllPendingTasks(qname: string): Promise<void> {\n await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}/pending_tasks:archive_all`,\n });\n}\n\nexport async function deletePendingTask(\n qname: string,\n taskId: string\n): Promise<void> {\n await axios({\n method: \"delete\",\n url: `${BASE_URL}/queues/${qname}/pending_tasks/${taskId}`,\n });\n}\n\nexport async function batchDeletePendingTasks(\n qname: string,\n taskIds: string[]\n): Promise<BatchDeleteTasksResponse> {\n const resp = await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}/pending_tasks:batch_delete`,\n data: {\n task_ids: taskIds,\n },\n });\n return resp.data;\n}\n\nexport async function deleteAllPendingTasks(\n qname: string\n): Promise<DeleteAllTasksResponse> {\n const resp = await axios({\n method: \"delete\",\n url: `${BASE_URL}/queues/${qname}/pending_tasks:delete_all`,\n });\n return resp.data;\n}\n\nexport async function runScheduledTask(\n qname: string,\n taskId: string\n): Promise<void> {\n await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}/scheduled_tasks/${taskId}:run`,\n });\n}\n\nexport async function archiveScheduledTask(\n qname: string,\n taskId: string\n): Promise<void> {\n await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}/scheduled_tasks/${taskId}:archive`,\n });\n}\n\nexport async function deleteScheduledTask(\n qname: string,\n taskId: string\n): Promise<void> {\n await axios({\n method: \"delete\",\n url: `${BASE_URL}/queues/${qname}/scheduled_tasks/${taskId}`,\n });\n}\n\nexport async function batchDeleteScheduledTasks(\n qname: string,\n taskIds: string[]\n): Promise<BatchDeleteTasksResponse> {\n const resp = await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}/scheduled_tasks:batch_delete`,\n data: {\n task_ids: taskIds,\n },\n });\n return resp.data;\n}\n\nexport async function deleteAllScheduledTasks(\n qname: string\n): Promise<DeleteAllTasksResponse> {\n const resp = await axios({\n method: \"delete\",\n url: `${BASE_URL}/queues/${qname}/scheduled_tasks:delete_all`,\n });\n return resp.data;\n}\n\nexport async function batchRunScheduledTasks(\n qname: string,\n taskIds: string[]\n): Promise<BatchRunTasksResponse> {\n const resp = await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}/scheduled_tasks:batch_run`,\n data: {\n task_ids: taskIds,\n },\n });\n return resp.data;\n}\n\nexport async function runAllScheduledTasks(qname: string): Promise<void> {\n await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}/scheduled_tasks:run_all`,\n });\n}\n\nexport async function batchArchiveScheduledTasks(\n qname: string,\n taskIds: string[]\n): Promise<BatchArchiveTasksResponse> {\n const resp = await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}/scheduled_tasks:batch_archive`,\n data: {\n task_ids: taskIds,\n },\n });\n return resp.data;\n}\n\nexport async function archiveAllScheduledTasks(qname: string): Promise<void> {\n await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}/scheduled_tasks:archive_all`,\n });\n}\n\nexport async function runRetryTask(\n qname: string,\n taskId: string\n): Promise<void> {\n await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}/retry_tasks/${taskId}:run`,\n });\n}\n\nexport async function archiveRetryTask(\n qname: string,\n taskId: string\n): Promise<void> {\n await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}/retry_tasks/${taskId}:archive`,\n });\n}\n\nexport async function deleteRetryTask(\n qname: string,\n taskId: string\n): Promise<void> {\n await axios({\n method: \"delete\",\n url: `${BASE_URL}/queues/${qname}/retry_tasks/${taskId}`,\n });\n}\n\nexport async function batchDeleteRetryTasks(\n qname: string,\n taskIds: string[]\n): Promise<BatchDeleteTasksResponse> {\n const resp = await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}/retry_tasks:batch_delete`,\n data: {\n task_ids: taskIds,\n },\n });\n return resp.data;\n}\n\nexport async function deleteAllRetryTasks(\n qname: string\n): Promise<DeleteAllTasksResponse> {\n const resp = await axios({\n method: \"delete\",\n url: `${BASE_URL}/queues/${qname}/retry_tasks:delete_all`,\n });\n return resp.data;\n}\n\nexport async function batchRunRetryTasks(\n qname: string,\n taskIds: string[]\n): Promise<BatchRunTasksResponse> {\n const resp = await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}/retry_tasks:batch_run`,\n data: {\n task_ids: taskIds,\n },\n });\n return resp.data;\n}\n\nexport async function runAllRetryTasks(qname: string): Promise<void> {\n await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}/retry_tasks:run_all`,\n });\n}\n\nexport async function batchArchiveRetryTasks(\n qname: string,\n taskIds: string[]\n): Promise<BatchArchiveTasksResponse> {\n const resp = await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}/retry_tasks:batch_archive`,\n data: {\n task_ids: taskIds,\n },\n });\n return resp.data;\n}\n\nexport async function archiveAllRetryTasks(qname: string): Promise<void> {\n await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}/retry_tasks:archive_all`,\n });\n}\n\nexport async function runArchivedTask(\n qname: string,\n taskId: string\n): Promise<void> {\n await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}/archived_tasks/${taskId}:run`,\n });\n}\n\nexport async function deleteArchivedTask(\n qname: string,\n taskId: string\n): Promise<void> {\n await axios({\n method: \"delete\",\n url: `${BASE_URL}/queues/${qname}/archived_tasks/${taskId}`,\n });\n}\n\nexport async function batchDeleteArchivedTasks(\n qname: string,\n taskIds: string[]\n): Promise<BatchDeleteTasksResponse> {\n const resp = await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}/archived_tasks:batch_delete`,\n data: {\n task_ids: taskIds,\n },\n });\n return resp.data;\n}\n\nexport async function deleteAllArchivedTasks(\n qname: string\n): Promise<DeleteAllTasksResponse> {\n const resp = await axios({\n method: \"delete\",\n url: `${BASE_URL}/queues/${qname}/archived_tasks:delete_all`,\n });\n return resp.data;\n}\n\nexport async function batchRunArchivedTasks(\n qname: string,\n taskIds: string[]\n): Promise<BatchRunTasksResponse> {\n const resp = await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}/archived_tasks:batch_run`,\n data: {\n task_ids: taskIds,\n },\n });\n return resp.data;\n}\n\nexport async function runAllArchivedTasks(qname: string): Promise<void> {\n await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}/archived_tasks:run_all`,\n });\n}\n\nexport async function deleteCompletedTask(\n qname: string,\n taskId: string\n): Promise<void> {\n await axios({\n method: \"delete\",\n url: `${BASE_URL}/queues/${qname}/completed_tasks/${taskId}`,\n });\n}\n\nexport async function batchDeleteCompletedTasks(\n qname: string,\n taskIds: string[]\n): Promise<BatchDeleteTasksResponse> {\n const resp = await axios({\n method: \"post\",\n url: `${BASE_URL}/queues/${qname}/completed_tasks:batch_delete`,\n data: {\n task_ids: taskIds,\n },\n });\n return resp.data;\n}\n\nexport async function deleteAllCompletedTasks(\n qname: string\n): Promise<DeleteAllTasksResponse> {\n const resp = await axios({\n method: \"delete\",\n url: `${BASE_URL}/queues/${qname}/completed_tasks:delete_all`,\n });\n return resp.data;\n}\n\nexport async function listServers(): Promise<ListServersResponse> {\n const resp = await axios({\n method: \"get\",\n url: `${BASE_URL}/servers`,\n });\n return resp.data;\n}\n\nexport async function listSchedulerEntries(): Promise<ListSchedulerEntriesResponse> {\n const resp = await axios({\n method: \"get\",\n url: `${BASE_URL}/scheduler_entries`,\n });\n return resp.data;\n}\n\nexport async function listSchedulerEnqueueEvents(\n entryId: string\n): Promise<ListSchedulerEnqueueEventsResponse> {\n const resp = await axios({\n method: \"get\",\n url: `${BASE_URL}/scheduler_entries/${entryId}/enqueue_events`,\n });\n return resp.data;\n}\n\nexport async function getRedisInfo(): Promise<RedisInfoResponse> {\n const resp = await axios({\n method: \"get\",\n url: `${BASE_URL}/redis_info`,\n });\n return resp.data;\n}\n","import { AxiosError } from \"axios\";\n\n// toErrorStringWithHttpStatus returns a string representaion of axios error with HTTP status.\nexport function toErrorStringWithHttpStatus(error: AxiosError<string>): string {\n const { response } = error;\n if (!response) {\n return \"error: no error response data available\";\n }\n return `${response.status} (${response.statusText}): ${response.data}`;\n}\n\n// toErrorString returns a string representaion of axios error.\nexport function toErrorString(error: AxiosError<string>): string {\n const { response } = error;\n if (!response) {\n return \"Unknown error occurred. See the logs for details.\";\n }\n return response.data;\n}\n\ninterface Duration {\n hour: number;\n minute: number;\n second: number;\n totalSeconds: number;\n}\n\n// Returns a duration from the number of seconds provided.\nexport function durationFromSeconds(totalSeconds: number): Duration {\n const hour = Math.floor(totalSeconds / 3600);\n const minute = Math.floor((totalSeconds - 3600 * hour) / 60);\n const second = totalSeconds - 3600 * hour - 60 * minute;\n return { hour, minute, second, totalSeconds };\n}\n\n// start and end are in milliseconds.\nfunction durationBetween(start: number, end: number): Duration {\n const durationInMillisec = start - end;\n const totalSeconds = Math.floor(durationInMillisec / 1000);\n return durationFromSeconds(totalSeconds);\n}\n\nexport function stringifyDuration(d: Duration): string {\n if (d.hour > 24) {\n const n = Math.floor(d.hour / 24);\n return n + (n === 1 ? \" day\" : \" days\");\n }\n return (\n (d.hour !== 0 ? `${d.hour}h` : \"\") +\n (d.minute !== 0 ? `${d.minute}m` : \"\") +\n `${d.second}s`\n );\n}\n\nexport function durationBefore(timestamp: string): string {\n try {\n const duration = durationBetween(Date.parse(timestamp), Date.now());\n if (duration.totalSeconds < 1) {\n return \"now\";\n }\n return \"in \" + stringifyDuration(duration);\n } catch {\n return \"-\";\n }\n}\n\nexport function timeAgo(timestamp: string): string {\n try {\n return timeAgoUnix(Date.parse(timestamp) / 1000);\n } catch (error) {\n console.error(\"Could not parse timestamp: \", timestamp, error);\n return \"-\";\n }\n}\n\nexport function timeAgoUnix(unixtime: number): string {\n if (unixtime === 0) {\n return \"\"\n }\n const duration = durationBetween(Date.now(), unixtime * 1000);\n return stringifyDuration(duration) + \" ago\";\n}\n\nexport function getCurrentUTCDate(): string {\n const today = new Date();\n const dd = today.getUTCDate().toString().padStart(2, \"0\");\n const mm = (today.getMonth() + 1).toString().padStart(2, \"0\");\n const yyyy = today.getFullYear();\n return `${yyyy}-${mm}-${dd}`;\n}\n\nexport function uuidPrefix(uuid: string): string {\n const idx = uuid.indexOf(\"-\");\n if (idx === -1) {\n return uuid;\n }\n return uuid.substr(0, idx);\n}\n\nexport function percentage(numerator: number, denominator: number): string {\n if (denominator === 0) return \"0.00%\";\n const perc = ((numerator / denominator) * 100).toFixed(2);\n return `${perc} %`;\n}\n\n\nexport function isJsonPayload(p: string) {\n try {\n JSON.parse(p);\n } catch (error) {\n return false;\n }\n\n return true;\n}\n\nexport function prettifyPayload(p: string) {\n if (isJsonPayload(p)) {\n return JSON.stringify(JSON.parse(p), null, 2);\n }\n\n return p;\n}\n","import { Dispatch } from \"redux\";\nimport {\n deleteQueue,\n listQueues,\n ListQueuesResponse,\n pauseQueue,\n resumeQueue,\n} from \"../api\";\nimport { toErrorString, toErrorStringWithHttpStatus } from \"../utils\";\n\n// List of queue related action types.\nexport const LIST_QUEUES_BEGIN = \"LIST_QUEUES_BEGIN\";\nexport const LIST_QUEUES_SUCCESS = \"LIST_QUEUES_SUCCESS\";\nexport const LIST_QUEUES_ERROR = \"LIST_QUEUES_ERROR\";\nexport const DELETE_QUEUE_BEGIN = \"DELETE_QUEUE_BEGIN\";\nexport const DELETE_QUEUE_SUCCESS = \"DELETE_QUEUE_SUCCESS\";\nexport const DELETE_QUEUE_ERROR = \"DELETE_QUEUE_ERROR\";\nexport const PAUSE_QUEUE_BEGIN = \"PAUSE_QUEUE_BEGIN\";\nexport const PAUSE_QUEUE_SUCCESS = \"PAUSE_QUEUE_SUCCESS\";\nexport const PAUSE_QUEUE_ERROR = \"PAUSE_QUEUE_ERROR\";\nexport const RESUME_QUEUE_BEGIN = \"RESUME_QUEUE_BEGIN\";\nexport const RESUME_QUEUE_SUCCESS = \"RESUME_QUEUE_SUCCESS\";\nexport const RESUME_QUEUE_ERROR = \"RESUME_QUEUE_ERROR\";\n\ninterface ListQueuesBeginAction {\n type: typeof LIST_QUEUES_BEGIN;\n}\n\ninterface ListQueuesSuccessAction {\n type: typeof LIST_QUEUES_SUCCESS;\n payload: ListQueuesResponse;\n}\n\ninterface ListQueuesErrorAction {\n type: typeof LIST_QUEUES_ERROR;\n error: string;\n}\n\ninterface DeleteQueueBeginAction {\n type: typeof DELETE_QUEUE_BEGIN;\n queue: string; // name of the queue\n}\n\ninterface DeleteQueueSuccessAction {\n type: typeof DELETE_QUEUE_SUCCESS;\n queue: string; // name of the queue\n}\n\ninterface DeleteQueueErrorAction {\n type: typeof DELETE_QUEUE_ERROR;\n queue: string; // name of the queue\n error: string; // error description\n}\n\ninterface PauseQueueBeginAction {\n type: typeof PAUSE_QUEUE_BEGIN;\n queue: string; // name of the queue\n}\n\ninterface PauseQueueSuccessAction {\n type: typeof PAUSE_QUEUE_SUCCESS;\n queue: string; // name of the queue\n}\n\ninterface PauseQueueErrorAction {\n type: typeof PAUSE_QUEUE_ERROR;\n queue: string; // name of the queue\n error: string; // error description\n}\n\ninterface ResumeQueueBeginAction {\n type: typeof RESUME_QUEUE_BEGIN;\n queue: string; // name of the queue\n}\n\ninterface ResumeQueueSuccessAction {\n type: typeof RESUME_QUEUE_SUCCESS;\n queue: string; // name of the queue\n}\n\ninterface ResumeQueueErrorAction {\n type: typeof RESUME_QUEUE_ERROR;\n queue: string; // name of the queue\n error: string; // error description\n}\n\n// Union of all queues related action types.\nexport type QueuesActionTypes =\n | ListQueuesBeginAction\n | ListQueuesSuccessAction\n | ListQueuesErrorAction\n | DeleteQueueBeginAction\n | DeleteQueueSuccessAction\n | DeleteQueueErrorAction\n | PauseQueueBeginAction\n | PauseQueueSuccessAction\n | PauseQueueErrorAction\n | ResumeQueueBeginAction\n | ResumeQueueSuccessAction\n | ResumeQueueErrorAction;\n\nexport function listQueuesAsync() {\n return async (dispatch: Dispatch<QueuesActionTypes>) => {\n dispatch({ type: LIST_QUEUES_BEGIN });\n try {\n const response = await listQueues();\n dispatch({\n type: LIST_QUEUES_SUCCESS,\n payload: response,\n });\n } catch (error) {\n console.error(`listQueuesAsync: ${toErrorStringWithHttpStatus(error)}`);\n dispatch({\n type: LIST_QUEUES_ERROR,\n error: toErrorString(error),\n });\n }\n };\n}\n\nexport function deleteQueueAsync(qname: string) {\n return async (dispatch: Dispatch<QueuesActionTypes>) => {\n dispatch({\n type: DELETE_QUEUE_BEGIN,\n queue: qname,\n });\n try {\n await deleteQueue(qname);\n // FIXME: this action doesn't get dispatched when server stalls\n dispatch({\n type: DELETE_QUEUE_SUCCESS,\n queue: qname,\n });\n } catch (error) {\n console.error(error);\n dispatch({\n type: DELETE_QUEUE_ERROR,\n queue: qname,\n error: toErrorString(error),\n });\n }\n };\n}\n\nexport function pauseQueueAsync(qname: string) {\n return async (dispatch: Dispatch<QueuesActionTypes>) => {\n dispatch({ type: PAUSE_QUEUE_BEGIN, queue: qname });\n try {\n await pauseQueue(qname);\n dispatch({ type: PAUSE_QUEUE_SUCCESS, queue: qname });\n } catch (error) {\n console.error(\"pauseQueueAsynq: \", toErrorStringWithHttpStatus(error));\n dispatch({\n type: PAUSE_QUEUE_ERROR,\n queue: qname,\n error: toErrorString(error),\n });\n }\n };\n}\n\nexport function resumeQueueAsync(qname: string) {\n return async (dispatch: Dispatch<QueuesActionTypes>) => {\n dispatch({ type: RESUME_QUEUE_BEGIN, queue: qname });\n try {\n await resumeQueue(qname);\n dispatch({ type: RESUME_QUEUE_SUCCESS, queue: qname });\n } catch (error) {\n console.error(\"resumeQueueAsync: \", toErrorStringWithHttpStatus(error));\n dispatch({\n type: RESUME_QUEUE_ERROR,\n queue: qname,\n error: toErrorString(error),\n });\n }\n };\n}\n","import { Dispatch } from \"redux\";\nimport { listQueueStats, ListQueueStatsResponse } from \"../api\";\nimport { toErrorString, toErrorStringWithHttpStatus } from \"../utils\";\n\nexport const LIST_QUEUE_STATS_BEGIN = \"LIST_QUEUE_STATS_BEGIN\";\nexport const LIST_QUEUE_STATS_SUCCESS = \"LIST_QUEUE_STATS_SUCCESS\";\nexport const LIST_QUEUE_STATS_ERROR = \"LIST_QUEUE_STATS_ERROR\";\n\ninterface ListQueueStatsBeginAction {\n type: typeof LIST_QUEUE_STATS_BEGIN;\n}\n\ninterface ListQueueStatsSuccessAction {\n type: typeof LIST_QUEUE_STATS_SUCCESS;\n payload: ListQueueStatsResponse;\n}\n\ninterface ListQueueStatsErrorAction {\n type: typeof LIST_QUEUE_STATS_ERROR;\n error: string;\n}\n\n// Union of all queue stats related action types.\nexport type QueueStatsActionTypes =\n | ListQueueStatsBeginAction\n | ListQueueStatsSuccessAction\n | ListQueueStatsErrorAction;\n\nexport function listQueueStatsAsync() {\n return async (dispatch: Dispatch<QueueStatsActionTypes>) => {\n dispatch({ type: LIST_QUEUE_STATS_BEGIN });\n try {\n const response = await listQueueStats();\n dispatch({\n type: LIST_QUEUE_STATS_SUCCESS,\n payload: response,\n });\n } catch (error) {\n console.error(\n \"listQueueStatsAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: LIST_QUEUE_STATS_ERROR,\n error: toErrorString(error),\n });\n }\n };\n}\n","import React from \"react\";\nimport {\n BarChart,\n Bar,\n XAxis,\n YAxis,\n CartesianGrid,\n Tooltip,\n Legend,\n ResponsiveContainer,\n} from \"recharts\";\nimport { useHistory } from \"react-router-dom\";\nimport { queueDetailsPath } from \"../paths\";\n\ninterface Props {\n data: TaskBreakdown[];\n}\n\ninterface TaskBreakdown {\n queue: string; // name of the queue.\n active: number; // number of active tasks in the queue.\n pending: number; // number of pending tasks in the queue.\n scheduled: number; // number of scheduled tasks in the queue.\n retry: number; // number of retry tasks in the queue.\n archived: number; // number of archived tasks in the queue.\n completed: number; // number of completed tasks in the queue.\n}\n\nfunction QueueSizeChart(props: Props) {\n const handleClick = (params: { activeLabel?: string } | null) => {\n const allQueues = props.data.map((b) => b.queue);\n if (\n params &&\n params.activeLabel &&\n allQueues.includes(params.activeLabel)\n ) {\n history.push(queueDetailsPath(params.activeLabel));\n }\n };\n const history = useHistory();\n return (\n <ResponsiveContainer>\n <BarChart\n data={props.data}\n maxBarSize={120}\n onClick={handleClick}\n style={{ cursor: \"pointer\" }}\n >\n <CartesianGrid strokeDasharray=\"3 3\" />\n <XAxis dataKey=\"queue\" />\n <YAxis />\n <Tooltip />\n <Legend />\n <Bar dataKey=\"active\" stackId=\"a\" fill=\"#1967d2\" />\n <Bar dataKey=\"pending\" stackId=\"a\" fill=\"#669df6\" />\n <Bar dataKey=\"scheduled\" stackId=\"a\" fill=\"#fdd663\" />\n <Bar dataKey=\"retry\" stackId=\"a\" fill=\"#f666a9\" />\n <Bar dataKey=\"archived\" stackId=\"a\" fill=\"#ac4776\" />\n <Bar dataKey=\"completed\" stackId=\"a\" fill=\"#4bb543\" />\n </BarChart>\n </ResponsiveContainer>\n );\n}\n\nexport default QueueSizeChart;\n","import React from \"react\";\nimport {\n BarChart,\n Bar,\n XAxis,\n YAxis,\n CartesianGrid,\n Tooltip,\n Legend,\n ResponsiveContainer,\n} from \"recharts\";\nimport { useTheme, Theme } from \"@material-ui/core/styles\";\n\ninterface Props {\n data: ProcessedStats[];\n}\n\ninterface ProcessedStats {\n queue: string; // name of the queue.\n succeeded: number; // number of tasks succeeded.\n failed: number; // number of tasks failed.\n}\n\nfunction ProcessedTasksChart(props: Props) {\n const theme = useTheme<Theme>();\n return (\n <ResponsiveContainer>\n <BarChart data={props.data} maxBarSize={120}>\n <CartesianGrid strokeDasharray=\"3 3\" />\n <XAxis dataKey=\"queue\" />\n <YAxis />\n <Tooltip />\n <Legend />\n <Bar\n dataKey=\"succeeded\"\n stackId=\"a\"\n fill={theme.palette.success.light}\n />\n <Bar dataKey=\"failed\" stackId=\"a\" fill={theme.palette.error.light} />\n </BarChart>\n </ResponsiveContainer>\n );\n}\n\nexport default ProcessedTasksChart;\n","import React from \"react\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport Button from \"@material-ui/core/Button\";\nimport Dialog from \"@material-ui/core/Dialog\";\nimport DialogActions from \"@material-ui/core/DialogActions\";\nimport DialogContent from \"@material-ui/core/DialogContent\";\nimport DialogContentText from \"@material-ui/core/DialogContentText\";\nimport DialogTitle from \"@material-ui/core/DialogTitle\";\nimport { Queue } from \"../api\";\nimport { AppState } from \"../store\";\nimport { deleteQueueAsync } from \"../actions/queuesActions\";\n\ninterface Props {\n queue: Queue | null; // queue to delete\n onClose: () => void;\n}\n\nfunction mapStateToProps(state: AppState, ownProps: Props) {\n let requestPending = false;\n if (ownProps.queue !== null) {\n const q = state.queues.data.find((q) => q.name === ownProps.queue?.queue);\n if (q !== undefined) {\n requestPending = q.requestPending;\n }\n }\n return {\n requestPending,\n };\n}\n\nconst connector = connect(mapStateToProps, { deleteQueueAsync });\n\ntype ReduxProps = ConnectedProps<typeof connector>;\n\nfunction DeleteQueueConfirmationDialog(props: Props & ReduxProps) {\n const handleDeleteClick = () => {\n if (!props.queue) {\n return;\n }\n props.deleteQueueAsync(props.queue.queue);\n props.onClose();\n };\n return (\n <Dialog\n open={props.queue !== null}\n onClose={props.onClose}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n {props.queue !== null &&\n (props.queue.size > 0 ? (\n <>\n <DialogTitle id=\"alert-dialog-title\">\n Queue is not empty\n </DialogTitle>\n <DialogContent>\n <DialogContentText id=\"alert-dialog-description\">\n You are trying to delete a non-emtpy queue \"{props.queue.queue}\n \". Please empty the queue first before deleting.\n </DialogContentText>\n </DialogContent>\n <DialogActions>\n <Button onClick={props.onClose} color=\"primary\">\n OK\n </Button>\n </DialogActions>\n </>\n ) : (\n <>\n <DialogTitle id=\"alert-dialog-title\">\n Are you sure you want to delete \"{props.queue.queue}\"?\n </DialogTitle>\n <DialogContent>\n <DialogContentText id=\"alert-dialog-description\">\n You can't undo this action.\n </DialogContentText>\n </DialogContent>\n <DialogActions>\n <Button\n onClick={props.onClose}\n disabled={props.requestPending}\n color=\"primary\"\n >\n Cancel\n </Button>\n <Button\n onClick={handleDeleteClick}\n disabled={props.requestPending}\n color=\"primary\"\n autoFocus\n >\n Delete\n </Button>\n </DialogActions>\n </>\n ))}\n </Dialog>\n );\n}\n\nexport default connector(DeleteQueueConfirmationDialog);\n","// SortDirection describes the direction of sort.\nexport enum SortDirection {\n Asc = \"asc\",\n Desc = \"desc\",\n}\n\n// TableColumn is a config for a table column.\nexport interface TableColumn {\n key: string;\n label: string;\n align: \"left\" | \"right\" | \"center\";\n}\n\n// SortableTableColumn is a config for a table column\n// for table with sorting support.\n//\n// T is the enum of sort keys.\nexport interface SortableTableColumn<T> extends TableColumn {\n sortBy: T;\n}\n","import React, { useState } from \"react\";\nimport clsx from \"clsx\";\nimport { Link } from \"react-router-dom\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Table from \"@material-ui/core/Table\";\nimport TableBody from \"@material-ui/core/TableBody\";\nimport TableCell from \"@material-ui/core/TableCell\";\nimport TableContainer from \"@material-ui/core/TableContainer\";\nimport TableHead from \"@material-ui/core/TableHead\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport TableSortLabel from \"@material-ui/core/TableSortLabel\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport PauseCircleFilledIcon from \"@material-ui/icons/PauseCircleFilled\";\nimport PlayCircleFilledIcon from \"@material-ui/icons/PlayCircleFilled\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport MoreHorizIcon from \"@material-ui/icons/MoreHoriz\";\nimport DeleteQueueConfirmationDialog from \"./DeleteQueueConfirmationDialog\";\nimport { Queue } from \"../api\";\nimport { queueDetailsPath } from \"../paths\";\nimport { SortDirection, SortableTableColumn } from \"../types/table\";\nimport prettyBytes from \"pretty-bytes\";\nimport { percentage } from \"../utils\";\n\nconst useStyles = makeStyles((theme) => ({\n table: {\n minWidth: 650,\n },\n fixedCell: {\n position: \"sticky\",\n zIndex: 1,\n left: 0,\n background: theme.palette.background.paper,\n },\n}));\n\ninterface QueueWithMetadata extends Queue {\n requestPending: boolean; // indicates pause/resume/delete request is pending for the queue.\n}\n\ninterface Props {\n queues: QueueWithMetadata[];\n onPauseClick: (qname: string) => Promise<void>;\n onResumeClick: (qname: string) => Promise<void>;\n onDeleteClick: (qname: string) => Promise<void>;\n}\n\nenum SortBy {\n Queue,\n State,\n Size,\n MemoryUsage,\n Processed,\n Failed,\n ErrorRate,\n\n None, // no sort support\n}\n\nconst colConfigs: SortableTableColumn<SortBy>[] = [\n { label: \"Queue\", key: \"queue\", sortBy: SortBy.Queue, align: \"left\" },\n { label: \"State\", key: \"state\", sortBy: SortBy.State, align: \"left\" },\n {\n label: \"Size\",\n key: \"size\",\n sortBy: SortBy.Size,\n align: \"right\",\n },\n {\n label: \"Memory usage\",\n key: \"memory_usage\",\n sortBy: SortBy.MemoryUsage,\n align: \"right\",\n },\n {\n label: \"Processed\",\n key: \"processed\",\n sortBy: SortBy.Processed,\n align: \"right\",\n },\n { label: \"Failed\", key: \"failed\", sortBy: SortBy.Failed, align: \"right\" },\n {\n label: \"Error rate\",\n key: \"error_rate\",\n sortBy: SortBy.ErrorRate,\n align: \"right\",\n },\n { label: \"Actions\", key: \"actions\", sortBy: SortBy.None, align: \"center\" },\n];\n\n// sortQueues takes a array of queues and return a sorted array.\n// It returns a new array and leave the original array untouched.\nfunction sortQueues(\n queues: QueueWithMetadata[],\n cmpFn: (first: QueueWithMetadata, second: QueueWithMetadata) => number\n): QueueWithMetadata[] {\n let copy = [...queues];\n copy.sort(cmpFn);\n return copy;\n}\n\nexport default function QueuesOverviewTable(props: Props) {\n const classes = useStyles();\n const [sortBy, setSortBy] = useState<SortBy>(SortBy.Queue);\n const [sortDir, setSortDir] = useState<SortDirection>(SortDirection.Asc);\n const [queueToDelete, setQueueToDelete] = useState<QueueWithMetadata | null>(\n null\n );\n const createSortClickHandler = (sortKey: SortBy) => (e: React.MouseEvent) => {\n if (sortKey === sortBy) {\n // Toggle sort direction.\n const nextSortDir =\n sortDir === SortDirection.Asc ? SortDirection.Desc : SortDirection.Asc;\n setSortDir(nextSortDir);\n } else {\n // Change the sort key.\n setSortBy(sortKey);\n }\n };\n\n const cmpFunc = (q1: QueueWithMetadata, q2: QueueWithMetadata): number => {\n let isQ1Smaller: boolean;\n switch (sortBy) {\n case SortBy.Queue:\n if (q1.queue === q2.queue) return 0;\n isQ1Smaller = q1.queue < q2.queue;\n break;\n case SortBy.State:\n if (q1.paused === q2.paused) return 0;\n isQ1Smaller = !q1.paused;\n break;\n case SortBy.Size:\n if (q1.size === q2.size) return 0;\n isQ1Smaller = q1.size < q2.size;\n break;\n case SortBy.MemoryUsage:\n if (q1.memory_usage_bytes === q2.memory_usage_bytes) return 0;\n isQ1Smaller = q1.memory_usage_bytes < q2.memory_usage_bytes;\n break;\n case SortBy.Processed:\n if (q1.processed === q2.processed) return 0;\n isQ1Smaller = q1.processed < q2.processed;\n break;\n case SortBy.Failed:\n if (q1.failed === q2.failed) return 0;\n isQ1Smaller = q1.failed < q2.failed;\n break;\n case SortBy.ErrorRate:\n const q1ErrorRate = q1.failed / q1.processed;\n const q2ErrorRate = q2.failed / q2.processed;\n if (q1ErrorRate === q2ErrorRate) return 0;\n isQ1Smaller = q1ErrorRate < q2ErrorRate;\n break;\n default:\n // eslint-disable-next-line no-throw-literal\n throw `Unexpected order by value: ${sortBy}`;\n }\n if (sortDir === SortDirection.Asc) {\n return isQ1Smaller ? -1 : 1;\n } else {\n return isQ1Smaller ? 1 : -1;\n }\n };\n\n const handleDialogClose = () => {\n setQueueToDelete(null);\n };\n\n return (\n <React.Fragment>\n <TableContainer>\n <Table className={classes.table} aria-label=\"queues overview table\">\n <TableHead>\n <TableRow>\n {colConfigs.map((cfg, i) => (\n <TableCell\n key={cfg.key}\n align={cfg.align}\n className={clsx(i === 0 && classes.fixedCell)}\n >\n {cfg.sortBy !== SortBy.None ? (\n <TableSortLabel\n active={sortBy === cfg.sortBy}\n direction={sortDir}\n onClick={createSortClickHandler(cfg.sortBy)}\n >\n {cfg.label}\n </TableSortLabel>\n ) : (\n <div>{cfg.label}</div>\n )}\n </TableCell>\n ))}\n </TableRow>\n </TableHead>\n <TableBody>\n {sortQueues(props.queues, cmpFunc).map((q) => (\n <Row\n key={q.queue}\n queue={q}\n onPauseClick={() => props.onPauseClick(q.queue)}\n onResumeClick={() => props.onResumeClick(q.queue)}\n onDeleteClick={() => setQueueToDelete(q)}\n />\n ))}\n </TableBody>\n </Table>\n </TableContainer>\n <DeleteQueueConfirmationDialog\n onClose={handleDialogClose}\n queue={queueToDelete}\n />\n </React.Fragment>\n );\n}\n\nconst useRowStyles = makeStyles((theme) => ({\n row: {\n \"&:last-child td\": {\n borderBottomWidth: 0,\n },\n \"&:last-child th\": {\n borderBottomWidth: 0,\n },\n },\n linkText: {\n textDecoration: \"none\",\n color: theme.palette.text.primary,\n \"&:hover\": {\n textDecoration: \"underline\",\n },\n },\n textGreen: {\n color: theme.palette.success.dark,\n },\n textRed: {\n color: theme.palette.error.dark,\n },\n boldCell: {\n fontWeight: 600,\n },\n fixedCell: {\n position: \"sticky\",\n zIndex: 1,\n left: 0,\n background: theme.palette.background.paper,\n },\n actionIconsContainer: {\n display: \"flex\",\n justifyContent: \"center\",\n minWidth: \"100px\",\n },\n}));\n\ninterface RowProps {\n queue: QueueWithMetadata;\n onPauseClick: () => void;\n onResumeClick: () => void;\n onDeleteClick: () => void;\n}\n\nfunction Row(props: RowProps) {\n const classes = useRowStyles();\n const { queue: q } = props;\n const [showIcons, setShowIcons] = useState<boolean>(false);\n return (\n <TableRow key={q.queue} className={classes.row}>\n <TableCell\n component=\"th\"\n scope=\"row\"\n className={clsx(classes.boldCell, classes.fixedCell)}\n >\n <Link to={queueDetailsPath(q.queue)} className={classes.linkText}>\n {q.queue}\n </Link>\n </TableCell>\n <TableCell>\n {q.paused ? (\n <span className={classes.textRed}>paused</span>\n ) : (\n <span className={classes.textGreen}>run</span>\n )}\n </TableCell>\n <TableCell align=\"right\">{q.size}</TableCell>\n <TableCell align=\"right\">{prettyBytes(q.memory_usage_bytes)}</TableCell>\n <TableCell align=\"right\">{q.processed}</TableCell>\n <TableCell align=\"right\">{q.failed}</TableCell>\n <TableCell align=\"right\">{percentage(q.failed, q.processed)}</TableCell>\n <TableCell\n align=\"center\"\n onMouseEnter={() => setShowIcons(true)}\n onMouseLeave={() => setShowIcons(false)}\n >\n <div className={classes.actionIconsContainer}>\n {showIcons ? (\n <React.Fragment>\n {q.paused ? (\n <Tooltip title=\"Resume\">\n <IconButton\n color=\"secondary\"\n onClick={props.onResumeClick}\n disabled={q.requestPending}\n size=\"small\"\n >\n <PlayCircleFilledIcon fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n ) : (\n <Tooltip title=\"Pause\">\n <IconButton\n color=\"primary\"\n onClick={props.onPauseClick}\n disabled={q.requestPending}\n size=\"small\"\n >\n <PauseCircleFilledIcon fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n )}\n <Tooltip title=\"Delete\">\n <IconButton onClick={props.onDeleteClick} size=\"small\">\n <DeleteIcon fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n </React.Fragment>\n ) : (\n <IconButton size=\"small\">\n <MoreHorizIcon fontSize=\"small\" />\n </IconButton>\n )}\n </div>\n </TableCell>\n </TableRow>\n );\n}\n","import { Theme, withStyles } from \"@material-ui/core/styles\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\n\n// Export custom style tooltip.\nexport default withStyles((theme: Theme) => ({\n tooltip: {\n backgroundColor: \"#f5f5f9\",\n color: \"rgba(0, 0, 0, 0.87)\",\n maxWidth: 400,\n fontSize: theme.typography.pxToRem(12),\n border: \"1px solid #dadde9\",\n },\n}))(Tooltip);\n","import React from \"react\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Button from \"@material-ui/core/Button\";\nimport ButtonGroup from \"@material-ui/core/ButtonGroup\";\nimport ArrowDropDownIcon from \"@material-ui/icons/ArrowDropDown\";\nimport ClickAwayListener from \"@material-ui/core/ClickAwayListener\";\nimport Grow from \"@material-ui/core/Grow\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Popper from \"@material-ui/core/Popper\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\nimport MenuList from \"@material-ui/core/MenuList\";\nimport { isDarkTheme } from \"../theme\";\n\ninterface Option {\n label: string;\n key: string;\n}\n\ninterface Props {\n options: Option[];\n initialSelectedKey: string;\n onSelect: (key: string) => void;\n}\n\nconst useStyles = makeStyles((theme) => ({\n popper: {\n zIndex: 2,\n },\n buttonContained: {\n backgroundColor: isDarkTheme(theme)\n ? \"#303030\"\n : theme.palette.background.default,\n color: theme.palette.text.primary,\n \"&:hover\": {\n backgroundColor: theme.palette.action.hover,\n },\n },\n}));\n\nexport default function SplitButton(props: Props) {\n const classes = useStyles();\n const [open, setOpen] = React.useState<boolean>(false);\n const anchorRef = React.useRef<HTMLDivElement>(null);\n const [selectedKey, setSelectedKey] = React.useState<string>(\n props.initialSelectedKey\n );\n\n const handleMenuItemClick = (\n event: React.MouseEvent<HTMLLIElement, MouseEvent>,\n key: string\n ) => {\n setSelectedKey(key);\n setOpen(false);\n props.onSelect(key);\n };\n\n const handleToggle = () => {\n setOpen((prevOpen) => !prevOpen);\n };\n\n const handleClose = (event: React.MouseEvent<Document, MouseEvent>) => {\n if (\n anchorRef.current &&\n anchorRef.current.contains(event.target as HTMLElement)\n ) {\n return;\n }\n setOpen(false);\n };\n\n const selectedOpt = props.options.find((opt) => opt.key === selectedKey);\n\n return (\n <>\n <ButtonGroup\n variant=\"contained\"\n ref={anchorRef}\n aria-label=\"split button\"\n size=\"small\"\n disableElevation\n >\n <Button classes={{ contained: classes.buttonContained }}>\n {selectedOpt ? selectedOpt.label : \"Select Option\"}\n </Button>\n <Button\n size=\"small\"\n aria-controls={open ? \"split-button-menu\" : undefined}\n aria-expanded={open ? \"true\" : undefined}\n aria-label=\"select option\"\n aria-haspopup=\"menu\"\n onClick={handleToggle}\n classes={{ contained: classes.buttonContained }}\n >\n <ArrowDropDownIcon />\n </Button>\n </ButtonGroup>\n <Popper\n open={open}\n anchorEl={anchorRef.current}\n role={undefined}\n transition\n disablePortal\n className={classes.popper}\n >\n {({ TransitionProps, placement }) => (\n <Grow\n {...TransitionProps}\n style={{\n transformOrigin:\n placement === \"bottom\" ? \"center top\" : \"center bottom\",\n }}\n >\n <Paper>\n <ClickAwayListener onClickAway={handleClose}>\n <MenuList id=\"split-button-menu\">\n {props.options.map((opt) => (\n <MenuItem\n key={opt.key}\n selected={opt.key === selectedKey}\n onClick={(event) => handleMenuItemClick(event, opt.key)}\n >\n {opt.label}\n </MenuItem>\n ))}\n </MenuList>\n </ClickAwayListener>\n </Paper>\n </Grow>\n )}\n </Popper>\n </>\n );\n}\n","import { useEffect } from \"react\";\n\n// usePolling repeatedly calls doFn with a fix time delay specified\n// by interval (in millisecond).\nexport function usePolling(doFn: () => void, interval: number) {\n useEffect(() => {\n doFn();\n const id = setInterval(doFn, interval * 1000);\n return () => clearInterval(id);\n }, [interval, doFn]);\n}\n","import React from \"react\";\nimport {\n LineChart,\n Line,\n XAxis,\n YAxis,\n CartesianGrid,\n Tooltip,\n Legend,\n ResponsiveContainer,\n} from \"recharts\";\nimport { useTheme, Theme } from \"@material-ui/core/styles\";\nimport { DailyStat } from \"../api\";\n\ninterface Props {\n data: { [qname: string]: DailyStat[] };\n numDays: number;\n}\n\ninterface ChartData {\n succeeded: number;\n failed: number;\n date: string;\n}\n\nexport default function DailyStatsChart(props: Props) {\n const data = makeChartData(props.data, props.numDays);\n const theme = useTheme<Theme>();\n return (\n <ResponsiveContainer>\n <LineChart data={data}>\n <CartesianGrid strokeDasharray=\"3 3\" />\n <XAxis dataKey=\"date\" minTickGap={10} />\n <YAxis />\n <Tooltip />\n <Legend />\n <Line\n type=\"monotone\"\n dataKey=\"succeeded\"\n stroke={theme.palette.success.main}\n />\n <Line\n type=\"monotone\"\n dataKey=\"failed\"\n stroke={theme.palette.error.main}\n />\n </LineChart>\n </ResponsiveContainer>\n );\n}\n\nfunction makeChartData(\n queueStats: { [qname: string]: DailyStat[] },\n numDays: number\n): ChartData[] {\n const dataByDate: { [date: string]: ChartData } = {};\n for (const qname in queueStats) {\n for (const stat of queueStats[qname]) {\n if (!dataByDate.hasOwnProperty(stat.date)) {\n dataByDate[stat.date] = { succeeded: 0, failed: 0, date: stat.date };\n }\n dataByDate[stat.date].succeeded += stat.processed - stat.failed;\n dataByDate[stat.date].failed += stat.failed;\n }\n }\n return Object.values(dataByDate).sort(sortByDate).slice(-numDays);\n}\n\nfunction sortByDate(x: ChartData, y: ChartData): number {\n return Date.parse(x.date) - Date.parse(y.date);\n}\n","import React, { useEffect } from \"react\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport Container from \"@material-ui/core/Container\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Typography from \"@material-ui/core/Typography\";\nimport InfoIcon from \"@material-ui/icons/Info\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport AlertTitle from \"@material-ui/lab/AlertTitle\";\nimport {\n listQueuesAsync,\n pauseQueueAsync,\n resumeQueueAsync,\n deleteQueueAsync,\n} from \"../actions/queuesActions\";\nimport { listQueueStatsAsync } from \"../actions/queueStatsActions\";\nimport { dailyStatsKeyChange } from \"../actions/settingsActions\";\nimport { AppState } from \"../store\";\nimport QueueSizeChart from \"../components/QueueSizeChart\";\nimport ProcessedTasksChart from \"../components/ProcessedTasksChart\";\nimport QueuesOverviewTable from \"../components/QueuesOverviewTable\";\nimport Tooltip from \"../components/Tooltip\";\nimport SplitButton from \"../components/SplitButton\";\nimport { usePolling } from \"../hooks\";\nimport DailyStatsChart from \"../components/DailyStatsChart\";\n\nconst useStyles = makeStyles((theme) => ({\n container: {\n paddingTop: theme.spacing(4),\n paddingBottom: theme.spacing(4),\n },\n paper: {\n padding: theme.spacing(2),\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n },\n chartHeader: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n marginBottom: theme.spacing(2),\n },\n chartHeaderTitle: {\n display: \"flex\",\n alignItems: \"center\",\n },\n chartContainer: {\n width: \"100%\",\n height: \"300px\",\n },\n infoIcon: {\n marginLeft: theme.spacing(1),\n color: theme.palette.grey[500],\n cursor: \"pointer\",\n },\n tooltipSection: {\n marginBottom: \"4px\",\n },\n tableContainer: {\n marginBottom: theme.spacing(2),\n },\n}));\n\nfunction mapStateToProps(state: AppState) {\n return {\n loading: state.queues.loading,\n queues: state.queues.data.map((q) => ({\n ...q.currentStats,\n requestPending: q.requestPending,\n })),\n error: state.queues.error,\n pollInterval: state.settings.pollInterval,\n queueStats: state.queueStats.data,\n dailyStatsKey: state.settings.dailyStatsChartType,\n };\n}\n\nconst mapDispatchToProps = {\n listQueuesAsync,\n pauseQueueAsync,\n resumeQueueAsync,\n deleteQueueAsync,\n listQueueStatsAsync,\n dailyStatsKeyChange,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\ntype Props = ConnectedProps<typeof connector>;\n\nexport type DailyStatsKey = \"today\" | \"last-7d\" | \"last-30d\" | \"last-90d\";\nexport const defaultDailyStatsKey = \"last-7d\";\n\nfunction DashboardView(props: Props) {\n const {\n pollInterval,\n listQueuesAsync,\n queues,\n listQueueStatsAsync,\n dailyStatsKey,\n } = props;\n const classes = useStyles();\n\n usePolling(listQueuesAsync, pollInterval);\n\n // Refetch queue stats if a queue is added or deleted.\n const qnames = queues\n .map((q) => q.queue)\n .sort()\n .join(\",\");\n\n useEffect(() => {\n listQueueStatsAsync();\n }, [listQueueStatsAsync, qnames]);\n\n const processedStats = queues.map((q) => ({\n queue: q.queue,\n succeeded: q.processed - q.failed,\n failed: q.failed,\n }));\n\n return (\n <Container maxWidth=\"lg\" className={classes.container}>\n <Grid container spacing={3}>\n {props.error.length > 0 && (\n <Grid item xs={12}>\n <Alert severity=\"error\">\n <AlertTitle>Error</AlertTitle>\n Could not retrieve queues live data —{\" \"}\n <strong>See the logs for details</strong>\n </Alert>\n </Grid>\n )}\n <Grid item xs={6}>\n <Paper className={classes.paper} variant=\"outlined\">\n <div className={classes.chartHeader}>\n <div className={classes.chartHeaderTitle}>\n <Typography variant=\"h6\">Queue Size</Typography>\n <Tooltip\n title={\n <div>\n <div className={classes.tooltipSection}>\n Total number of tasks in the queue\n </div>\n <div className={classes.tooltipSection}>\n <strong>Active</strong>: number of tasks currently being\n processed\n </div>\n <div className={classes.tooltipSection}>\n <strong>Pending</strong>: number of tasks ready to be\n processed\n </div>\n <div className={classes.tooltipSection}>\n <strong>Scheduled</strong>: number of tasks scheduled to\n be processed in the future\n </div>\n <div className={classes.tooltipSection}>\n <strong>Retry</strong>: number of tasks scheduled to be\n retried in the future\n </div>\n <div>\n <strong>Archived</strong>: number of tasks exhausted\n their retries\n </div>\n </div>\n }\n >\n <InfoIcon fontSize=\"small\" className={classes.infoIcon} />\n </Tooltip>\n </div>\n </div>\n <div className={classes.chartContainer}>\n <QueueSizeChart data={queues} />\n </div>\n </Paper>\n </Grid>\n\n <Grid item xs={6}>\n <Paper className={classes.paper} variant=\"outlined\">\n <div className={classes.chartHeader}>\n <div className={classes.chartHeaderTitle}>\n <Typography variant=\"h6\">Tasks Processed</Typography>\n <Tooltip\n title={\n <div>\n <div className={classes.tooltipSection}>\n Total number of tasks processed in a given day (UTC)\n </div>\n <div className={classes.tooltipSection}>\n <strong>Succeeded</strong>: number of tasks successfully\n processed\n </div>\n <div>\n <strong>Failed</strong>: number of tasks failed to be\n processed\n </div>\n </div>\n }\n >\n <InfoIcon fontSize=\"small\" className={classes.infoIcon} />\n </Tooltip>\n </div>\n <div>\n <SplitButton\n options={[\n { label: \"Today\", key: \"today\" },\n { label: \"Last 7d\", key: \"last-7d\" },\n { label: \"Last 30d\", key: \"last-30d\" },\n { label: \"Last 90d\", key: \"last-90d\" },\n ]}\n initialSelectedKey={dailyStatsKey}\n onSelect={(key) =>\n props.dailyStatsKeyChange(key as DailyStatsKey)\n }\n />\n </div>\n </div>\n <div className={classes.chartContainer}>\n {dailyStatsKey === \"today\" && (\n <ProcessedTasksChart data={processedStats} />\n )}\n {dailyStatsKey === \"last-7d\" && (\n <DailyStatsChart data={props.queueStats} numDays={7} />\n )}\n {dailyStatsKey === \"last-30d\" && (\n <DailyStatsChart data={props.queueStats} numDays={30} />\n )}\n {dailyStatsKey === \"last-90d\" && (\n <DailyStatsChart data={props.queueStats} numDays={90} />\n )}\n </div>\n </Paper>\n </Grid>\n\n <Grid item xs={12} className={classes.tableContainer}>\n <Paper className={classes.paper} variant=\"outlined\">\n {/* TODO: Add loading indicator */}\n <QueuesOverviewTable\n queues={queues}\n onPauseClick={props.pauseQueueAsync}\n onResumeClick={props.resumeQueueAsync}\n onDeleteClick={props.deleteQueueAsync}\n />\n </Paper>\n </Grid>\n </Grid>\n </Container>\n );\n}\n\nexport default connector(DashboardView);\n","import {\n DAILY_STATS_KEY_CHANGE,\n POLL_INTERVAL_CHANGE,\n SettingsActionTypes,\n TASK_ROWS_PER_PAGE_CHANGE,\n THEME_PREFERENCE_CHANGE,\n TOGGLE_DRAWER,\n} from \"../actions/settingsActions\";\nimport { defaultPageSize } from \"../components/TablePaginationActions\"\nimport { DailyStatsKey, defaultDailyStatsKey } from \"../views/DashboardView\";\n\nexport enum ThemePreference {\n SystemDefault,\n Always,\n Never,\n}\n\nexport interface SettingsState {\n // Time duration between data refresh.\n pollInterval: number;\n\n // UI theme setting.\n themePreference: ThemePreference;\n\n // Whether the drawer (i.e. sidebar) is open or not.\n isDrawerOpen: boolean;\n\n // Number of tasks displayed in task table.\n taskRowsPerPage: number,\n\n // Type of the chart displayed for \"Processed Tasks\" section in dashboard.\n dailyStatsChartType: DailyStatsKey;\n}\n\nexport const initialState: SettingsState = {\n pollInterval: 8,\n themePreference: ThemePreference.SystemDefault,\n isDrawerOpen: true,\n taskRowsPerPage: defaultPageSize,\n dailyStatsChartType: defaultDailyStatsKey,\n};\n\nfunction settingsReducer(\n state = initialState,\n action: SettingsActionTypes\n): SettingsState {\n switch (action.type) {\n case POLL_INTERVAL_CHANGE:\n return {\n ...state,\n pollInterval: action.value,\n };\n\n case THEME_PREFERENCE_CHANGE:\n return {\n ...state,\n themePreference: action.value,\n };\n\n case TOGGLE_DRAWER:\n return {\n ...state,\n isDrawerOpen: !state.isDrawerOpen,\n };\n\n case TASK_ROWS_PER_PAGE_CHANGE:\n return {\n ...state,\n taskRowsPerPage: action.value,\n }\n\n case DAILY_STATS_KEY_CHANGE:\n return {\n ...state,\n dailyStatsChartType: action.value,\n }\n\n default:\n return state;\n }\n}\n\nexport default settingsReducer;\n","import { createMuiTheme, Theme } from \"@material-ui/core/styles\";\nimport { ThemePreference } from \"./reducers/settingsReducer\";\nimport useMediaQuery from \"@material-ui/core/useMediaQuery\";\n\nexport function useTheme(themePreference: ThemePreference): Theme {\n let prefersDarkMode = useMediaQuery(\"(prefers-color-scheme: dark)\");\n if (themePreference === ThemePreference.Always) {\n prefersDarkMode = true;\n } else if (themePreference === ThemePreference.Never) {\n prefersDarkMode = false;\n }\n return createMuiTheme({\n // Got color palette from https://htmlcolors.com/palette/31/stripe\n palette: {\n primary: {\n main: \"#4379FF\",\n },\n secondary: {\n main: \"#97FBD1\",\n },\n background: {\n default: \"#f5f7f9\",\n },\n type: prefersDarkMode ? \"dark\" : \"light\",\n },\n });\n}\n\nexport function isDarkTheme(theme: Theme): boolean {\n return theme.palette.type === \"dark\";\n}\n","export const CLOSE_SNACKBAR = \"CLOSE_SNACKBAR\";\n\ninterface CloseSnakbarAction {\n type: typeof CLOSE_SNACKBAR;\n}\n\n// Union of all snackbar related action types\nexport type SnackbarActionTypes = CloseSnakbarAction;\n\nexport function closeSnackbar() {\n return { type: CLOSE_SNACKBAR };\n}\n","import React, { ReactElement } from \"react\";\nimport clsx from \"clsx\";\nimport ListItem from \"@material-ui/core/ListItem\";\nimport ListItemIcon from \"@material-ui/core/ListItemIcon\";\nimport ListItemText from \"@material-ui/core/ListItemText\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport {\n useRouteMatch,\n Link as RouterLink,\n LinkProps as RouterLinkProps,\n} from \"react-router-dom\";\nimport { isDarkTheme } from \"../theme\";\n\nconst useStyles = makeStyles((theme) => ({\n listItem: {\n borderTopRightRadius: \"24px\",\n borderBottomRightRadius: \"24px\",\n },\n selected: {\n backgroundColor: isDarkTheme(theme)\n ? `${theme.palette.secondary.main}30`\n : `${theme.palette.primary.main}30`,\n },\n selectedText: {\n fontWeight: 600,\n color: isDarkTheme(theme)\n ? theme.palette.secondary.main\n : theme.palette.primary.main,\n },\n selectedIcon: {\n color: isDarkTheme(theme)\n ? theme.palette.secondary.main\n : theme.palette.primary.main,\n },\n}));\n\ninterface Props {\n to: string;\n primary: string;\n icon?: ReactElement;\n}\n\n// Note: See https://material-ui.com/guides/composition/ for details.\nfunction ListItemLink(props: Props): ReactElement {\n const classes = useStyles();\n const { icon, primary, to } = props;\n const isMatch = useRouteMatch({\n path: to,\n strict: true,\n sensitive: true,\n exact: true,\n });\n const renderLink = React.useMemo(\n () =>\n React.forwardRef<any, Omit<RouterLinkProps, \"to\">>((itemProps, ref) => (\n <RouterLink to={to} ref={ref} {...itemProps} />\n )),\n [to]\n );\n return (\n <li>\n <Tooltip title={primary} placement=\"right\">\n <ListItem\n button\n component={renderLink}\n className={clsx(classes.listItem, isMatch && classes.selected)}\n >\n {icon && (\n <ListItemIcon className={clsx(isMatch && classes.selectedIcon)}>\n {icon}\n </ListItemIcon>\n )}\n <ListItemText\n primary={primary}\n classes={{\n primary: isMatch ? classes.selectedText : undefined,\n }}\n />\n </ListItem>\n </Tooltip>\n </li>\n );\n}\n\nexport default ListItemLink;\n","import React from \"react\";\nimport { useTheme, Theme } from \"@material-ui/core/styles\";\nimport ReactSyntaxHighlighter from \"react-syntax-highlighter\";\nimport styleDark from \"react-syntax-highlighter/dist/esm/styles/hljs/atom-one-dark\";\nimport styleLight from \"react-syntax-highlighter/dist/esm/styles/hljs/atom-one-light\";\nimport { isDarkTheme } from \"../theme\";\n\ninterface Props {\n language: string;\n children: string;\n customStyle?: object;\n}\n\n// Theme aware syntax-highlighter component.\nexport default function SyntaxHighlighter(props: Props) {\n const theme = useTheme<Theme>();\n const style = isDarkTheme(theme) ? styleDark : styleLight;\n return (\n <ReactSyntaxHighlighter\n language={props.language}\n style={style}\n customStyle={props.customStyle}\n >\n {props.children}\n </ReactSyntaxHighlighter>\n );\n}\n","import { Dispatch } from \"@reduxjs/toolkit\";\nimport {\n listSchedulerEnqueueEvents,\n ListSchedulerEnqueueEventsResponse,\n listSchedulerEntries,\n ListSchedulerEntriesResponse,\n} from \"../api\";\nimport { toErrorString, toErrorStringWithHttpStatus } from \"../utils\";\n\n// List of scheduler-entry related action types.\nexport const LIST_SCHEDULER_ENTRIES_BEGIN = \"LIST_SCHEDULER_ENTRIES_BEGIN\";\nexport const LIST_SCHEDULER_ENTRIES_SUCCESS = \"LIST_SCHEDULER_ENTRIES_SUCCESS\";\nexport const LIST_SCHEDULER_ENTRIES_ERROR = \"LIST_SCHEDULER_ENTRIES_ERROR\";\nexport const LIST_SCHEDULER_ENQUEUE_EVENTS_BEGIN =\n \"LIST_SCHEDULER_ENQUEUE_EVENTS_BEGIN\";\nexport const LIST_SCHEDULER_ENQUEUE_EVENTS_SUCCESS =\n \"LIST_SCHEDULER_ENQUEUE_EVENTS_SUCCESS\";\nexport const LIST_SCHEDULER_ENQUEUE_EVENTS_ERROR =\n \"LIST_SCHEDULER_ENQUEUE_EVENTS_ERROR\";\n\ninterface ListSchedulerEntriesBeginAction {\n type: typeof LIST_SCHEDULER_ENTRIES_BEGIN;\n}\n\ninterface ListSchedulerEntriesSuccessAction {\n type: typeof LIST_SCHEDULER_ENTRIES_SUCCESS;\n payload: ListSchedulerEntriesResponse;\n}\n\ninterface ListSchedulerEntriesErrorAction {\n type: typeof LIST_SCHEDULER_ENTRIES_ERROR;\n error: string; // error description\n}\n\ninterface ListSchedulerEnqueueEventBeginAction {\n type: typeof LIST_SCHEDULER_ENQUEUE_EVENTS_BEGIN;\n entryId: string;\n}\n\ninterface ListSchedulerEnqueueEventSuccessAction {\n type: typeof LIST_SCHEDULER_ENQUEUE_EVENTS_SUCCESS;\n entryId: string;\n payload: ListSchedulerEnqueueEventsResponse;\n}\n\ninterface ListSchedulerEnqueueEventErrorAction {\n type: typeof LIST_SCHEDULER_ENQUEUE_EVENTS_ERROR;\n entryId: string;\n error: string;\n}\n\n// Union of all scheduler-entry related actions.\nexport type SchedulerEntriesActionTypes =\n | ListSchedulerEntriesBeginAction\n | ListSchedulerEntriesSuccessAction\n | ListSchedulerEntriesErrorAction\n | ListSchedulerEnqueueEventBeginAction\n | ListSchedulerEnqueueEventSuccessAction\n | ListSchedulerEnqueueEventErrorAction;\n\nexport function listSchedulerEntriesAsync() {\n return async (dispatch: Dispatch<SchedulerEntriesActionTypes>) => {\n dispatch({ type: LIST_SCHEDULER_ENTRIES_BEGIN });\n try {\n const response = await listSchedulerEntries();\n dispatch({\n type: LIST_SCHEDULER_ENTRIES_SUCCESS,\n payload: response,\n });\n } catch (error) {\n console.error(\n `listSchedulerEnqueueEventsAsync: ${toErrorStringWithHttpStatus(error)}`\n );\n dispatch({\n type: LIST_SCHEDULER_ENTRIES_ERROR,\n error: toErrorString(error),\n });\n }\n };\n}\n\nexport function listSchedulerEnqueueEventsAsync(entryId: string) {\n return async (dispatch: Dispatch<SchedulerEntriesActionTypes>) => {\n dispatch({ type: LIST_SCHEDULER_ENQUEUE_EVENTS_BEGIN, entryId });\n try {\n const response = await listSchedulerEnqueueEvents(entryId);\n dispatch({\n type: LIST_SCHEDULER_ENQUEUE_EVENTS_SUCCESS,\n payload: response,\n entryId,\n });\n } catch (error) {\n console.error(\n \"listSchedulerEnqueueEventsAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: LIST_SCHEDULER_ENQUEUE_EVENTS_ERROR,\n error: toErrorString(error),\n entryId,\n });\n }\n };\n}\n","import uniqBy from \"lodash.uniqby\";\nimport {\n LIST_SCHEDULER_ENQUEUE_EVENTS_BEGIN,\n LIST_SCHEDULER_ENQUEUE_EVENTS_ERROR,\n LIST_SCHEDULER_ENQUEUE_EVENTS_SUCCESS,\n LIST_SCHEDULER_ENTRIES_BEGIN,\n LIST_SCHEDULER_ENTRIES_ERROR,\n LIST_SCHEDULER_ENTRIES_SUCCESS,\n SchedulerEntriesActionTypes,\n} from \"../actions/schedulerEntriesActions\";\nimport { SchedulerEnqueueEvent, SchedulerEntry } from \"../api\";\n\ninterface SchedulerEntriesState {\n loading: boolean;\n data: SchedulerEntry[];\n error: string; // error description\n enqueueEventsByEntryId: {\n [entryId: string]: { data: SchedulerEnqueueEvent[]; loading: boolean };\n };\n}\n\nexport function getEnqueueEventsEntry(\n state: SchedulerEntriesState,\n entryId: string\n): { data: SchedulerEnqueueEvent[]; loading: boolean } {\n return state.enqueueEventsByEntryId[entryId] || { data: [], loading: false };\n}\n\nconst initialState: SchedulerEntriesState = {\n loading: false,\n data: [],\n error: \"\",\n enqueueEventsByEntryId: {},\n};\n\nfunction schedulerEntriesReducer(\n state = initialState,\n action: SchedulerEntriesActionTypes\n): SchedulerEntriesState {\n switch (action.type) {\n case LIST_SCHEDULER_ENTRIES_BEGIN:\n return {\n ...state,\n loading: true,\n };\n case LIST_SCHEDULER_ENTRIES_SUCCESS:\n return {\n ...state,\n error: \"\",\n loading: false,\n data: action.payload.entries,\n };\n case LIST_SCHEDULER_ENTRIES_ERROR:\n return {\n ...state,\n loading: false,\n error: action.error,\n };\n case LIST_SCHEDULER_ENQUEUE_EVENTS_BEGIN: {\n const entry = getEnqueueEventsEntry(state, action.entryId);\n return {\n ...state,\n enqueueEventsByEntryId: {\n ...state.enqueueEventsByEntryId,\n [action.entryId]: {\n ...entry,\n loading: true,\n },\n },\n };\n }\n case LIST_SCHEDULER_ENQUEUE_EVENTS_SUCCESS: {\n const sortByEnqueuedAt = (\n e1: SchedulerEnqueueEvent,\n e2: SchedulerEnqueueEvent\n ): number => {\n return Date.parse(e2.enqueued_at) - Date.parse(e1.enqueued_at);\n };\n const entry = getEnqueueEventsEntry(state, action.entryId);\n const newData = uniqBy(\n [...entry.data, ...action.payload.events],\n \"task_id\"\n ).sort(sortByEnqueuedAt);\n return {\n ...state,\n enqueueEventsByEntryId: {\n ...state.enqueueEventsByEntryId,\n [action.entryId]: {\n loading: false,\n data: newData,\n },\n },\n };\n }\n case LIST_SCHEDULER_ENQUEUE_EVENTS_ERROR: {\n const entry = getEnqueueEventsEntry(state, action.entryId);\n return {\n ...state,\n enqueueEventsByEntryId: {\n ...state.enqueueEventsByEntryId,\n [action.entryId]: {\n ...entry,\n loading: false,\n },\n },\n };\n }\n default:\n return state;\n }\n}\n\nexport default schedulerEntriesReducer;\n","import React, { useEffect } from \"react\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Table from \"@material-ui/core/Table\";\nimport TableBody from \"@material-ui/core/TableBody\";\nimport TableCell from \"@material-ui/core/TableCell\";\nimport TableContainer from \"@material-ui/core/TableContainer\";\nimport TableHead from \"@material-ui/core/TableHead\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport { AppState } from \"../store\";\nimport { getEnqueueEventsEntry } from \"../reducers/schedulerEntriesReducer\";\nimport { listSchedulerEnqueueEventsAsync } from \"../actions/schedulerEntriesActions\";\nimport { timeAgo } from \"../utils\";\n\nconst useStyles = makeStyles((theme) => ({\n table: {\n height: \"80vh\",\n },\n stickyHeaderCell: {\n background: theme.palette.background.paper,\n },\n}));\n\nfunction mapStateToProps(state: AppState, ownProps: Props) {\n return {\n events: getEnqueueEventsEntry(state.schedulerEntries, ownProps.entryId),\n };\n}\n\nconst connector = connect(mapStateToProps, { listSchedulerEnqueueEventsAsync });\n\ntype ReduxProps = ConnectedProps<typeof connector>;\n\ninterface Props {\n entryId: string; // Scheduler Entry ID\n}\n\nfunction SchedulerEnqueueEventsTable(props: Props & ReduxProps) {\n const classes = useStyles();\n const { listSchedulerEnqueueEventsAsync, entryId, events } = props;\n\n useEffect(() => {\n listSchedulerEnqueueEventsAsync(entryId);\n }, [entryId, listSchedulerEnqueueEventsAsync]);\n\n // TODO: loading state UI\n\n // TODO: \"Load More\" button OR infinite scroll\n\n return (\n <TableContainer className={classes.table}>\n <Table\n stickyHeader\n aria-label=\"scheduler enqueue events table\"\n size=\"small\"\n >\n <TableHead>\n <TableRow>\n <TableCell classes={{ stickyHeader: classes.stickyHeaderCell }}>\n Enqueued\n </TableCell>\n <TableCell classes={{ stickyHeader: classes.stickyHeaderCell }}>\n Task ID\n </TableCell>\n </TableRow>\n </TableHead>\n <TableBody>\n {events.data.map((e) => (\n <TableRow key={e.task_id}>\n <TableCell component=\"th\" scope=\"row\">\n {timeAgo(e.enqueued_at)}\n </TableCell>\n <TableCell>{e.task_id}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </TableContainer>\n );\n}\n\nexport default connector(SchedulerEnqueueEventsTable);\n","import React, { useState } from \"react\";\nimport clsx from \"clsx\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Table from \"@material-ui/core/Table\";\nimport TableBody from \"@material-ui/core/TableBody\";\nimport TableCell from \"@material-ui/core/TableCell\";\nimport TableContainer from \"@material-ui/core/TableContainer\";\nimport TableHead from \"@material-ui/core/TableHead\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport Modal from \"@material-ui/core/Modal\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport HistoryIcon from \"@material-ui/icons/History\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport AlertTitle from \"@material-ui/lab/AlertTitle\";\nimport { SortDirection, SortableTableColumn } from \"../types/table\";\nimport TableSortLabel from \"@material-ui/core/TableSortLabel\";\nimport SyntaxHighlighter from \"./SyntaxHighlighter\";\nimport { SchedulerEntry } from \"../api\";\nimport { timeAgo, durationBefore, prettifyPayload } from \"../utils\";\nimport SchedulerEnqueueEventsTable from \"./SchedulerEnqueueEventsTable\";\n\nconst useStyles = makeStyles((theme) => ({\n table: {\n minWidth: 650,\n },\n noBorder: {\n border: \"none\",\n },\n fixedCell: {\n position: \"sticky\",\n zIndex: 1,\n left: 0,\n background: theme.palette.background.paper,\n },\n modal: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n modalContent: {\n background: theme.palette.background.paper,\n padding: theme.spacing(2),\n width: \"540px\",\n outline: \"none\",\n borderRadius: theme.shape.borderRadius,\n },\n eventsTable: {\n maxHeight: \"80vh\",\n },\n}));\n\nenum SortBy {\n EntryId,\n Spec,\n Type,\n Payload,\n Options,\n NextEnqueue,\n PrevEnqueue,\n\n None,\n}\n\nconst colConfigs: SortableTableColumn<SortBy>[] = [\n {\n label: \"Entry ID\",\n key: \"entry_id\",\n sortBy: SortBy.EntryId,\n align: \"left\",\n },\n {\n label: \"Spec\",\n key: \"spec\",\n sortBy: SortBy.Spec,\n align: \"left\",\n },\n {\n label: \"Type\",\n key: \"type\",\n sortBy: SortBy.Type,\n align: \"left\",\n },\n {\n label: \"Payload\",\n key: \"task_payload\",\n sortBy: SortBy.Payload,\n align: \"left\",\n },\n {\n label: \"Options\",\n key: \"options\",\n sortBy: SortBy.Options,\n align: \"left\",\n },\n {\n label: \"Next Enqueue\",\n key: \"next_enqueue\",\n sortBy: SortBy.NextEnqueue,\n align: \"left\",\n },\n {\n label: \"Prev Enqueue\",\n key: \"prev_enqueue\",\n sortBy: SortBy.PrevEnqueue,\n align: \"left\",\n },\n {\n label: \"\",\n key: \"show_history\",\n sortBy: SortBy.None,\n align: \"left\",\n },\n];\n\n// sortEntries takes a array of entries and return a sorted array.\n// It returns a new array and leave the original array untouched.\nfunction sortEntries(\n entries: SchedulerEntry[],\n cmpFn: (first: SchedulerEntry, second: SchedulerEntry) => number\n): SchedulerEntry[] {\n let copy = [...entries];\n copy.sort(cmpFn);\n return copy;\n}\n\ninterface Props {\n entries: SchedulerEntry[];\n}\n\nexport default function SchedulerEntriesTable(props: Props) {\n const classes = useStyles();\n const [sortBy, setSortBy] = useState<SortBy>(SortBy.EntryId);\n const [sortDir, setSortDir] = useState<SortDirection>(SortDirection.Asc);\n const [activeEntryId, setActiveEntryId] = useState<string>(\"\");\n\n const createSortClickHandler = (sortKey: SortBy) => (e: React.MouseEvent) => {\n if (sortKey === sortBy) {\n // Toggle sort direction.\n const nextSortDir =\n sortDir === SortDirection.Asc ? SortDirection.Desc : SortDirection.Asc;\n setSortDir(nextSortDir);\n } else {\n // Change the sort key.\n setSortBy(sortKey);\n }\n };\n\n const cmpFunc = (e1: SchedulerEntry, e2: SchedulerEntry): number => {\n let isE1Smaller: boolean;\n switch (sortBy) {\n case SortBy.EntryId:\n if (e1.id === e2.id) return 0;\n isE1Smaller = e1.id < e2.id;\n break;\n case SortBy.Spec:\n if (e1.spec === e2.spec) return 0;\n isE1Smaller = e1.spec < e2.spec;\n break;\n case SortBy.Type:\n if (e1.task_type === e2.task_type) return 0;\n isE1Smaller = e1.task_type < e2.task_type;\n break;\n case SortBy.Payload:\n if (e1.task_payload === e2.task_payload) return 0;\n isE1Smaller = e1.task_payload < e2.task_payload;\n break;\n case SortBy.Options:\n if (e1.options === e2.options) return 0;\n isE1Smaller = e1.options < e2.options;\n break;\n case SortBy.NextEnqueue:\n if (e1.next_enqueue_at === e2.next_enqueue_at) return 0;\n isE1Smaller = e1.next_enqueue_at < e2.next_enqueue_at;\n break;\n case SortBy.PrevEnqueue:\n const e1PrevEnqueueAt = e1.prev_enqueue_at || \"\";\n const e2PrevEnqueueAt = e2.prev_enqueue_at || \"\";\n if (e1PrevEnqueueAt === e2PrevEnqueueAt) return 0;\n isE1Smaller = e1PrevEnqueueAt < e2PrevEnqueueAt;\n break;\n default:\n // eslint-disable-next-line no-throw-literal\n throw `Unexpected order by value: ${sortBy}`;\n }\n if (sortDir === SortDirection.Asc) {\n return isE1Smaller ? -1 : 1;\n } else {\n return isE1Smaller ? 1 : -1;\n }\n };\n\n if (props.entries.length === 0) {\n return (\n <Alert severity=\"info\">\n <AlertTitle>Info</AlertTitle>\n No entries found at this time.\n </Alert>\n );\n }\n\n return (\n <>\n <TableContainer>\n <Table className={classes.table} aria-label=\"scheduler entries table\">\n <TableHead>\n <TableRow>\n {colConfigs.map((cfg, i) => (\n <TableCell\n key={cfg.key}\n align={cfg.align}\n className={clsx(i === 0 && classes.fixedCell)}\n >\n <TableSortLabel\n active={cfg.sortBy === sortBy}\n direction={sortDir}\n onClick={createSortClickHandler(cfg.sortBy)}\n >\n {cfg.label}\n </TableSortLabel>\n </TableCell>\n ))}\n </TableRow>\n </TableHead>\n <TableBody>\n {sortEntries(props.entries, cmpFunc).map((entry, idx) => (\n <Row\n key={entry.id}\n entry={entry}\n isLastRow={idx === props.entries.length - 1}\n onShowHistoryClick={() => setActiveEntryId(entry.id)}\n />\n ))}\n </TableBody>\n </Table>\n <Modal\n open={activeEntryId !== \"\"}\n onClose={() => setActiveEntryId(\"\")}\n className={classes.modal}\n >\n <div className={classes.modalContent}>\n <Typography variant=\"h6\" gutterBottom color=\"textPrimary\">\n Recent History\n </Typography>\n <SchedulerEnqueueEventsTable entryId={activeEntryId} />\n </div>\n </Modal>\n </TableContainer>\n </>\n );\n}\n\ninterface RowProps {\n entry: SchedulerEntry;\n isLastRow: boolean;\n onShowHistoryClick: () => void;\n}\n\nconst useRowStyles = makeStyles((theme) => ({\n rowRoot: {\n \"& > *\": {\n borderBottom: \"unset\",\n },\n },\n noBorder: {\n border: \"none\",\n },\n}));\n\nfunction Row(props: RowProps) {\n const { entry, isLastRow } = props;\n const classes = useRowStyles();\n return (\n <TableRow className={classes.rowRoot}>\n <TableCell\n component=\"th\"\n scope=\"row\"\n className={clsx(isLastRow && classes.noBorder)}\n >\n {entry.id}\n </TableCell>\n <TableCell className={clsx(isLastRow && classes.noBorder)}>\n {entry.spec}\n </TableCell>\n <TableCell className={clsx(isLastRow && classes.noBorder)}>\n {entry.task_type}\n </TableCell>\n <TableCell className={clsx(isLastRow && classes.noBorder)}>\n <SyntaxHighlighter language=\"json\">\n {prettifyPayload(entry.task_payload)}\n </SyntaxHighlighter>\n </TableCell>\n <TableCell className={clsx(isLastRow && classes.noBorder)}>\n <SyntaxHighlighter language=\"go\">\n {entry.options.length > 0 ? entry.options.join(\", \") : \"No options\"}\n </SyntaxHighlighter>\n </TableCell>\n <TableCell className={clsx(isLastRow && classes.noBorder)}>\n {durationBefore(entry.next_enqueue_at)}\n </TableCell>\n <TableCell className={clsx(isLastRow && classes.noBorder)}>\n {entry.prev_enqueue_at ? timeAgo(entry.prev_enqueue_at) : \"N/A\"}\n </TableCell>\n <TableCell>\n <Tooltip title=\"See History\">\n <IconButton\n aria-label=\"expand row\"\n size=\"small\"\n onClick={props.onShowHistoryClick}\n >\n <HistoryIcon />\n </IconButton>\n </Tooltip>\n </TableCell>\n </TableRow>\n );\n}\n","import React from \"react\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport Container from \"@material-ui/core/Container\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Paper from \"@material-ui/core/Paper\";\nimport SchedulerEntriesTable from \"../components/SchedulerEntriesTable\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport AlertTitle from \"@material-ui/lab/AlertTitle\";\nimport { AppState } from \"../store\";\nimport { listSchedulerEntriesAsync } from \"../actions/schedulerEntriesActions\";\nimport { usePolling } from \"../hooks\";\n\nconst useStyles = makeStyles((theme) => ({\n container: {\n paddingTop: theme.spacing(4),\n paddingBottom: theme.spacing(4),\n },\n paper: {\n padding: theme.spacing(2),\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n },\n heading: {\n paddingLeft: theme.spacing(2),\n marginBottom: theme.spacing(1),\n },\n}));\n\nfunction mapStateToProps(state: AppState) {\n return {\n loading: state.schedulerEntries.loading,\n error: state.schedulerEntries.error,\n entries: state.schedulerEntries.data,\n pollInterval: state.settings.pollInterval,\n };\n}\n\nconst connector = connect(mapStateToProps, { listSchedulerEntriesAsync });\n\ntype Props = ConnectedProps<typeof connector>;\n\nfunction SchedulersView(props: Props) {\n const { pollInterval, listSchedulerEntriesAsync } = props;\n const classes = useStyles();\n\n usePolling(listSchedulerEntriesAsync, pollInterval);\n\n return (\n <Container maxWidth=\"lg\" className={classes.container}>\n <Grid container spacing={3}>\n {props.error === \"\" ? (\n <Grid item xs={12}>\n <Paper className={classes.paper} variant=\"outlined\">\n <Typography variant=\"h6\" className={classes.heading}>\n Scheduler Entries\n </Typography>\n <SchedulerEntriesTable entries={props.entries} />\n </Paper>\n </Grid>\n ) : (\n <Grid item xs={12}>\n <Alert severity=\"error\">\n <AlertTitle>Error</AlertTitle>\n Could not retrieve scheduler entries live data —{\" \"}\n <strong>See the logs for details</strong>\n </Alert>\n </Grid>\n )}\n </Grid>\n </Container>\n );\n}\n\nexport default connector(SchedulersView);\n","import {\n batchCancelActiveTasks,\n BatchCancelTasksResponse,\n batchDeleteArchivedTasks,\n batchDeleteRetryTasks,\n batchDeleteScheduledTasks,\n batchDeleteCompletedTasks,\n BatchDeleteTasksResponse,\n batchArchiveRetryTasks,\n batchArchiveScheduledTasks,\n BatchArchiveTasksResponse,\n batchRunArchivedTasks,\n batchRunRetryTasks,\n batchRunScheduledTasks,\n BatchRunTasksResponse,\n cancelActiveTask,\n cancelAllActiveTasks,\n deleteAllArchivedTasks,\n deleteAllRetryTasks,\n deleteAllScheduledTasks,\n deleteAllCompletedTasks,\n deleteArchivedTask,\n deleteRetryTask,\n deleteScheduledTask,\n deleteCompletedTask,\n archiveAllRetryTasks,\n archiveAllScheduledTasks,\n archiveRetryTask,\n archiveScheduledTask,\n listActiveTasks,\n listArchivedTasks,\n listPendingTasks,\n ListTasksResponse,\n listRetryTasks,\n listScheduledTasks,\n listCompletedTasks,\n PaginationOptions,\n runAllArchivedTasks,\n runAllRetryTasks,\n runAllScheduledTasks,\n runArchivedTask,\n runRetryTask,\n runScheduledTask,\n deletePendingTask,\n batchDeletePendingTasks,\n deleteAllPendingTasks,\n archivePendingTask,\n batchArchivePendingTasks,\n archiveAllPendingTasks,\n TaskInfo,\n getTaskInfo,\n} from \"../api\";\nimport { Dispatch } from \"redux\";\nimport { toErrorString, toErrorStringWithHttpStatus } from \"../utils\";\n\n// List of tasks related action types.\nexport const GET_TASK_INFO_BEGIN = \"GET_TASK_INFO_BEGIN\";\nexport const GET_TASK_INFO_SUCCESS = \"GET_TASK_INFO_SUCCESS\";\nexport const GET_TASK_INFO_ERROR = \"GET_TASK_INFO_ERROR\";\nexport const LIST_ACTIVE_TASKS_BEGIN = \"LIST_ACTIVE_TASKS_BEGIN\";\nexport const LIST_ACTIVE_TASKS_SUCCESS = \"LIST_ACTIVE_TASKS_SUCCESS\";\nexport const LIST_ACTIVE_TASKS_ERROR = \"LIST_ACTIVE_TASKS_ERROR\";\nexport const LIST_PENDING_TASKS_BEGIN = \"LIST_PENDING_TASKS_BEGIN\";\nexport const LIST_PENDING_TASKS_SUCCESS = \"LIST_PENDING_TASKS_SUCCESS\";\nexport const LIST_PENDING_TASKS_ERROR = \"LIST_PENDING_TASKS_ERROR\";\nexport const LIST_SCHEDULED_TASKS_BEGIN = \"LIST_SCHEDULED_TASKS_BEGIN\";\nexport const LIST_SCHEDULED_TASKS_SUCCESS = \"LIST_SCHEDULED_TASKS_SUCCESS\";\nexport const LIST_SCHEDULED_TASKS_ERROR = \"LIST_SCHEDULED_TASKS_ERROR\";\nexport const LIST_RETRY_TASKS_BEGIN = \"LIST_RETRY_TASKS_BEGIN\";\nexport const LIST_RETRY_TASKS_SUCCESS = \"LIST_RETRY_TASKS_SUCCESS\";\nexport const LIST_RETRY_TASKS_ERROR = \"LIST_RETRY_TASKS_ERROR\";\nexport const LIST_ARCHIVED_TASKS_BEGIN = \"LIST_ARCHIVED_TASKS_BEGIN\";\nexport const LIST_ARCHIVED_TASKS_SUCCESS = \"LIST_ARCHIVED_TASKS_SUCCESS\";\nexport const LIST_ARCHIVED_TASKS_ERROR = \"LIST_ARCHIVED_TASKS_ERROR\";\nexport const LIST_COMPLETED_TASKS_BEGIN = \"LIST_COMPLETED_TASKS_BEGIN\";\nexport const LIST_COMPLETED_TASKS_SUCCESS = \"LIST_COMPLETED_TASKS_SUCCESS\";\nexport const LIST_COMPLETED_TASKS_ERROR = \"LIST_COMPLETED_TASKS_ERROR\";\nexport const CANCEL_ACTIVE_TASK_BEGIN = \"CANCEL_ACTIVE_TASK_BEGIN\";\nexport const CANCEL_ACTIVE_TASK_SUCCESS = \"CANCEL_ACTIVE_TASK_SUCCESS\";\nexport const CANCEL_ACTIVE_TASK_ERROR = \"CANCEL_ACTIVE_TASK_ERROR\";\nexport const CANCEL_ALL_ACTIVE_TASKS_BEGIN = \"CANCEL_ALL_ACTIVE_TASKS_BEGIN\";\nexport const CANCEL_ALL_ACTIVE_TASKS_SUCCESS =\n \"CANCEL_ALL_ACTIVE_TASKS_SUCCESS\";\nexport const CANCEL_ALL_ACTIVE_TASKS_ERROR = \"CANCEL_ALL_ACTIVE_TASKS_ERROR\";\nexport const BATCH_CANCEL_ACTIVE_TASKS_BEGIN =\n \"BATCH_CANCEL_ACTIVE_TASKS_BEGIN\";\nexport const BATCH_CANCEL_ACTIVE_TASKS_SUCCESS =\n \"BATCH_CANCEL_ACTIVE_TASKS_SUCCESS\";\nexport const BATCH_CANCEL_ACTIVE_TASKS_ERROR =\n \"BATCH_CANCEL_ACTIVE_TASKS_ERROR\";\nexport const RUN_SCHEDULED_TASK_BEGIN = \"RUN_SCHEDULED_TASK_BEGIN\";\nexport const RUN_SCHEDULED_TASK_SUCCESS = \"RUN_SCHEDULED_TASK_SUCCESS\";\nexport const RUN_SCHEDULED_TASK_ERROR = \"RUN_SCHEDULED_TASK_ERROR\";\nexport const RUN_RETRY_TASK_BEGIN = \"RUN_RETRY_TASK_BEGIN\";\nexport const RUN_RETRY_TASK_SUCCESS = \"RUN_RETRY_TASK_SUCCESS\";\nexport const RUN_RETRY_TASK_ERROR = \"RUN_RETRY_TASK_ERROR\";\nexport const RUN_ARCHIVED_TASK_BEGIN = \"RUN_ARCHIVED_TASK_BEGIN\";\nexport const RUN_ARCHIVED_TASK_SUCCESS = \"RUN_ARCHIVED_TASK_SUCCESS\";\nexport const RUN_ARCHIVED_TASK_ERROR = \"RUN_ARCHIVED_TASK_ERROR\";\nexport const DELETE_PENDING_TASK_BEGIN = \"DELETE_PENDING_TASK_BEGIN\";\nexport const DELETE_PENDING_TASK_SUCCESS = \"DELETE_PENDING_TASK_SUCCESS\";\nexport const DELETE_PENDING_TASK_ERROR = \"DELETE_PENDING_TASK_ERROR\";\nexport const ARCHIVE_PENDING_TASK_BEGIN = \"ARCHIVE_PENDING_TASK_BEGIN\";\nexport const ARCHIVE_PENDING_TASK_SUCCESS = \"ARCHIVE_PENDING_TASK_SUCCESS\";\nexport const ARCHIVE_PENDING_TASK_ERROR = \"ARCHIVE_PENDING_TASK_ERROR\";\nexport const DELETE_SCHEDULED_TASK_BEGIN = \"DELETE_SCHEDULED_TASK_BEGIN\";\nexport const DELETE_SCHEDULED_TASK_SUCCESS = \"DELETE_SCHEDULED_TASK_SUCCESS\";\nexport const DELETE_SCHEDULED_TASK_ERROR = \"DELETE_SCHEDULED_TASK_ERROR\";\nexport const ARCHIVE_SCHEDULED_TASK_BEGIN = \"ARCHIVE_SCHEDULED_TASK_BEGIN\";\nexport const ARCHIVE_SCHEDULED_TASK_SUCCESS = \"ARCHIVE_SCHEDULED_TASK_SUCCESS\";\nexport const ARCHIVE_SCHEDULED_TASK_ERROR = \"ARCHIVE_SCHEDULED_TASK_ERROR\";\nexport const ARCHIVE_RETRY_TASK_BEGIN = \"ARCHIVE_RETRY_TASK_BEGIN\";\nexport const ARCHIVE_RETRY_TASK_SUCCESS = \"ARCHIVE_RETRY_TASK_SUCCESS\";\nexport const ARCHIVE_RETRY_TASK_ERROR = \"ARCHIVE_RETRY_TASK_ERROR\";\nexport const BATCH_ARCHIVE_PENDING_TASKS_BEGIN =\n \"BATCH_ARCHIVE_PENDING_TASKS_BEGIN\";\nexport const BATCH_ARCHIVE_PENDING_TASKS_SUCCESS =\n \"BATCH_ARCHIVE_PENDING_TASKS_SUCCESS\";\nexport const BATCH_ARCHIVE_PENDING_TASKS_ERROR =\n \"BATCH_RUN_PENDING_TASKS_ERROR\";\nexport const BATCH_DELETE_PENDING_TASKS_BEGIN =\n \"BATCH_DELETE_PENDING_TASKS_BEGIN\";\nexport const BATCH_DELETE_PENDING_TASKS_SUCCESS =\n \"BATCH_DELETE_PENDING_TASKS_SUCCESS\";\nexport const BATCH_DELETE_PENDING_TASKS_ERROR =\n \"BATCH_DELETE_PENDING_TASKS_ERROR\";\nexport const DELETE_ALL_PENDING_TASKS_BEGIN = \"DELETE_ALL_PENDING_TASKS_BEGIN\";\nexport const DELETE_ALL_PENDING_TASKS_SUCCESS =\n \"DELETE_ALL_PENDING_TASKS_SUCCESS\";\nexport const DELETE_ALL_PENDING_TASKS_ERROR = \"DELETE_ALL_PENDING_TASKS_ERROR\";\nexport const ARCHIVE_ALL_PENDING_TASKS_BEGIN =\n \"ARCHIVE_ALL_PENDING_TASKS_BEGIN\";\nexport const ARCHIVE_ALL_PENDING_TASKS_SUCCESS =\n \"ARCHIVE_ALL_PENDING_TASKS_SUCCESS\";\nexport const ARCHIVE_ALL_PENDING_TASKS_ERROR =\n \"ARCHIVE_ALL_PENDING_TASKS_ERROR\";\nexport const BATCH_RUN_SCHEDULED_TASKS_BEGIN =\n \"BATCH_RUN_SCHEDULED_TASKS_BEGIN\";\nexport const BATCH_RUN_SCHEDULED_TASKS_SUCCESS =\n \"BATCH_RUN_SCHEDULED_TASKS_SUCCESS\";\nexport const BATCH_RUN_SCHEDULED_TASKS_ERROR =\n \"BATCH_RUN_SCHEDULED_TASKS_ERROR\";\nexport const BATCH_ARCHIVE_SCHEDULED_TASKS_BEGIN =\n \"BATCH_ARCHIVE_SCHEDULED_TASKS_BEGIN\";\nexport const BATCH_ARCHIVE_SCHEDULED_TASKS_SUCCESS =\n \"BATCH_ARCHIVE_SCHEDULED_TASKS_SUCCESS\";\nexport const BATCH_ARCHIVE_SCHEDULED_TASKS_ERROR =\n \"BATCH_RUN_SCHEDULED_TASKS_ERROR\";\nexport const BATCH_DELETE_SCHEDULED_TASKS_BEGIN =\n \"BATCH_DELETE_SCHEDULED_TASKS_BEGIN\";\nexport const BATCH_DELETE_SCHEDULED_TASKS_SUCCESS =\n \"BATCH_DELETE_SCHEDULED_TASKS_SUCCESS\";\nexport const BATCH_DELETE_SCHEDULED_TASKS_ERROR =\n \"BATCH_DELETE_SCHEDULED_TASKS_ERROR\";\nexport const RUN_ALL_SCHEDULED_TASKS_BEGIN = \"RUN_ALL_SCHEDULED_TASKS_BEGIN\";\nexport const RUN_ALL_SCHEDULED_TASKS_SUCCESS =\n \"RUN_ALL_SCHEDULED_TASKS_SUCCESS\";\nexport const RUN_ALL_SCHEDULED_TASKS_ERROR = \"RUN_ALL_SCHEDULED_TASKS_ERROR\";\nexport const ARCHIVE_ALL_SCHEDULED_TASKS_BEGIN =\n \"ARCHIVE_ALL_SCHEDULED_TASKS_BEGIN\";\nexport const ARCHIVE_ALL_SCHEDULED_TASKS_SUCCESS =\n \"ARCHIVE_ALL_SCHEDULED_TASKS_SUCCESS\";\nexport const ARCHIVE_ALL_SCHEDULED_TASKS_ERROR =\n \"ARCHIVE_ALL_SCHEDULED_TASKS_ERROR\";\nexport const DELETE_ALL_SCHEDULED_TASKS_BEGIN =\n \"DELETE_ALL_SCHEDULED_TASKS_BEGIN\";\nexport const DELETE_ALL_SCHEDULED_TASKS_SUCCESS =\n \"DELETE_ALL_SCHEDULED_TASKS_SUCCESS\";\nexport const DELETE_ALL_SCHEDULED_TASKS_ERROR =\n \"DELETE_ALL_SCHEDULED_TASKS_ERROR\";\nexport const DELETE_RETRY_TASK_BEGIN = \"DELETE_RETRY_TASK_BEGIN\";\nexport const DELETE_RETRY_TASK_SUCCESS = \"DELETE_RETRY_TASK_SUCCESS\";\nexport const DELETE_RETRY_TASK_ERROR = \"DELETE_RETRY_TASK_ERROR\";\nexport const BATCH_RUN_RETRY_TASKS_BEGIN = \"BATCH_RUN_RETRY_TASKS_BEGIN\";\nexport const BATCH_RUN_RETRY_TASKS_SUCCESS = \"BATCH_RUN_RETRY_TASKS_SUCCESS\";\nexport const BATCH_RUN_RETRY_TASKS_ERROR = \"BATCH_RUN_RETRY_TASKS_ERROR\";\nexport const BATCH_ARCHIVE_RETRY_TASKS_BEGIN =\n \"BATCH_ARCHIVE_RETRY_TASKS_BEGIN\";\nexport const BATCH_ARCHIVE_RETRY_TASKS_SUCCESS =\n \"BATCH_ARCHIVE_RETRY_TASKS_SUCCESS\";\nexport const BATCH_ARCHIVE_RETRY_TASKS_ERROR =\n \"BATCH_ARCHIVE_RETRY_TASKS_ERROR\";\nexport const BATCH_DELETE_RETRY_TASKS_BEGIN = \"BATCH_DELETE_RETRY_TASKS_BEGIN\";\nexport const BATCH_DELETE_RETRY_TASKS_SUCCESS =\n \"BATCH_DELETE_RETRY_TASKS_SUCCESS\";\nexport const BATCH_DELETE_RETRY_TASKS_ERROR = \"BATCH_DELETE_RETRY_TASKS_ERROR\";\nexport const RUN_ALL_RETRY_TASKS_BEGIN = \"RUN_ALL_RETRY_TASKS_BEGIN\";\nexport const RUN_ALL_RETRY_TASKS_SUCCESS = \"RUN_ALL_RETRY_TASKS_SUCCESS\";\nexport const RUN_ALL_RETRY_TASKS_ERROR = \"RUN_ALL_RETRY_TASKS_ERROR\";\nexport const ARCHIVE_ALL_RETRY_TASKS_BEGIN = \"ARCHIVE_ALL_RETRY_TASKS_BEGIN\";\nexport const ARCHIVE_ALL_RETRY_TASKS_SUCCESS =\n \"ARCHIVE_ALL_RETRY_TASKS_SUCCESS\";\nexport const ARCHIVE_ALL_RETRY_TASKS_ERROR = \"ARCHIVE_ALL_RETRY_TASKS_ERROR\";\nexport const DELETE_ALL_RETRY_TASKS_BEGIN = \"DELETE_ALL_RETRY_TASKS_BEGIN\";\nexport const DELETE_ALL_RETRY_TASKS_SUCCESS = \"DELETE_ALL_RETRY_TASKS_SUCCESS\";\nexport const DELETE_ALL_RETRY_TASKS_ERROR = \"DELETE_ALL_RETRY_TASKS_ERROR\";\nexport const DELETE_ARCHIVED_TASK_BEGIN = \"DELETE_ARCHIVED_TASK_BEGIN\";\nexport const DELETE_ARCHIVED_TASK_SUCCESS = \"DELETE_ARCHIVED_TASK_SUCCESS\";\nexport const DELETE_ARCHIVED_TASK_ERROR = \"DELETE_ARCHIVED_TASK_ERROR\";\nexport const BATCH_RUN_ARCHIVED_TASKS_BEGIN = \"BATCH_RUN_ARCHIVED_TASKS_BEGIN\";\nexport const BATCH_RUN_ARCHIVED_TASKS_SUCCESS =\n \"BATCH_RUN_ARCHIVED_TASKS_SUCCESS\";\nexport const BATCH_RUN_ARCHIVED_TASKS_ERROR = \"BATCH_RUN_ARCHIVED_TASKS_ERROR\";\nexport const BATCH_DELETE_ARCHIVED_TASKS_BEGIN =\n \"BATCH_DELETE_ARCHIVED_TASKS_BEGIN\";\nexport const BATCH_DELETE_ARCHIVED_TASKS_SUCCESS =\n \"BATCH_DELETE_ARCHIVED_TASKS_SUCCESS\";\nexport const BATCH_DELETE_ARCHIVED_TASKS_ERROR =\n \"BATCH_DELETE_ARCHIVED_TASKS_ERROR\";\nexport const RUN_ALL_ARCHIVED_TASKS_BEGIN = \"RUN_ALL_ARCHIVED_TASKS_BEGIN\";\nexport const RUN_ALL_ARCHIVED_TASKS_SUCCESS = \"RUN_ALL_ARCHIVED_TASKS_SUCCESS\";\nexport const RUN_ALL_ARCHIVED_TASKS_ERROR = \"RUN_ALL_ARCHIVED_TASKS_ERROR\";\nexport const DELETE_ALL_ARCHIVED_TASKS_BEGIN =\n \"DELETE_ALL_ARCHIVED_TASKS_BEGIN\";\nexport const DELETE_ALL_ARCHIVED_TASKS_SUCCESS =\n \"DELETE_ALL_ARCHIVED_TASKS_SUCCESS\";\nexport const DELETE_ALL_ARCHIVED_TASKS_ERROR =\n \"DELETE_ALL_ARCHIVED_TASKS_ERROR\";\nexport const DELETE_COMPLETED_TASK_BEGIN = \"DELETE_COMPLETED_TASK_BEGIN\";\nexport const DELETE_COMPLETED_TASK_SUCCESS = \"DELETE_COMPLETED_TASK_SUCCESS\";\nexport const DELETE_COMPLETED_TASK_ERROR = \"DELETE_COMPLETED_TASK_ERROR\";\nexport const DELETE_ALL_COMPLETED_TASKS_BEGIN =\n \"DELETE_ALL_COMPLETED_TASKS_BEGIN\";\nexport const DELETE_ALL_COMPLETED_TASKS_SUCCESS =\n \"DELETE_ALL_COMPLETED_TASKS_SUCCESS\";\nexport const DELETE_ALL_COMPLETED_TASKS_ERROR =\n \"DELETE_ALL_COMPLETED_TASKS_ERROR\";\nexport const BATCH_DELETE_COMPLETED_TASKS_BEGIN =\n \"BATCH_DELETE_COMPLETED_TASKS_BEGIN\";\nexport const BATCH_DELETE_COMPLETED_TASKS_SUCCESS =\n \"BATCH_DELETE_COMPLETED_TASKS_SUCCESS\";\nexport const BATCH_DELETE_COMPLETED_TASKS_ERROR =\n \"BATCH_DELETE_COMPLETED_TASKS_ERROR\";\n\ninterface GetTaskInfoBeginAction {\n type: typeof GET_TASK_INFO_BEGIN;\n}\n\ninterface GetTaskInfoErrorAction {\n type: typeof GET_TASK_INFO_ERROR;\n error: string; // error description\n}\n\ninterface GetTaskInfoSuccessAction {\n type: typeof GET_TASK_INFO_SUCCESS;\n payload: TaskInfo;\n}\n\ninterface ListActiveTasksBeginAction {\n type: typeof LIST_ACTIVE_TASKS_BEGIN;\n queue: string;\n}\n\ninterface ListActiveTasksSuccessAction {\n type: typeof LIST_ACTIVE_TASKS_SUCCESS;\n queue: string;\n payload: ListTasksResponse;\n}\n\ninterface ListActiveTasksErrorAction {\n type: typeof LIST_ACTIVE_TASKS_ERROR;\n queue: string;\n error: string; // error description\n}\n\ninterface ListPendingTasksBeginAction {\n type: typeof LIST_PENDING_TASKS_BEGIN;\n queue: string;\n}\n\ninterface ListPendingTasksSuccessAction {\n type: typeof LIST_PENDING_TASKS_SUCCESS;\n queue: string;\n payload: ListTasksResponse;\n}\n\ninterface ListPendingTasksErrorAction {\n type: typeof LIST_PENDING_TASKS_ERROR;\n queue: string;\n error: string; // error description\n}\n\ninterface ListScheduledTasksBeginAction {\n type: typeof LIST_SCHEDULED_TASKS_BEGIN;\n queue: string;\n}\n\ninterface ListScheduledTasksSuccessAction {\n type: typeof LIST_SCHEDULED_TASKS_SUCCESS;\n queue: string;\n payload: ListTasksResponse;\n}\n\ninterface ListScheduledTasksErrorAction {\n type: typeof LIST_SCHEDULED_TASKS_ERROR;\n queue: string;\n error: string; // error description\n}\n\ninterface ListRetryTasksBeginAction {\n type: typeof LIST_RETRY_TASKS_BEGIN;\n queue: string;\n}\n\ninterface ListRetryTasksSuccessAction {\n type: typeof LIST_RETRY_TASKS_SUCCESS;\n queue: string;\n payload: ListTasksResponse;\n}\n\ninterface ListRetryTasksErrorAction {\n type: typeof LIST_RETRY_TASKS_ERROR;\n queue: string;\n error: string; // error description\n}\n\ninterface ListArchivedTasksBeginAction {\n type: typeof LIST_ARCHIVED_TASKS_BEGIN;\n queue: string;\n}\n\ninterface ListArchivedTasksSuccessAction {\n type: typeof LIST_ARCHIVED_TASKS_SUCCESS;\n queue: string;\n payload: ListTasksResponse;\n}\n\ninterface ListArchivedTasksErrorAction {\n type: typeof LIST_ARCHIVED_TASKS_ERROR;\n queue: string;\n error: string; // error description\n}\n\ninterface ListCompletedTasksBeginAction {\n type: typeof LIST_COMPLETED_TASKS_BEGIN;\n queue: string;\n}\n\ninterface ListCompletedTasksSuccessAction {\n type: typeof LIST_COMPLETED_TASKS_SUCCESS;\n queue: string;\n payload: ListTasksResponse;\n}\n\ninterface ListCompletedTasksErrorAction {\n type: typeof LIST_COMPLETED_TASKS_ERROR;\n queue: string;\n error: string; // error description\n}\n\ninterface CancelActiveTaskBeginAction {\n type: typeof CANCEL_ACTIVE_TASK_BEGIN;\n queue: string;\n taskId: string;\n}\n\ninterface CancelActiveTaskSuccessAction {\n type: typeof CANCEL_ACTIVE_TASK_SUCCESS;\n queue: string;\n taskId: string;\n}\n\ninterface CancelActiveTaskErrorAction {\n type: typeof CANCEL_ACTIVE_TASK_ERROR;\n queue: string;\n taskId: string;\n error: string;\n}\n\ninterface CancelAllActiveTasksBeginAction {\n type: typeof CANCEL_ALL_ACTIVE_TASKS_BEGIN;\n queue: string;\n}\n\ninterface CancelAllActiveTasksSuccessAction {\n type: typeof CANCEL_ALL_ACTIVE_TASKS_SUCCESS;\n queue: string;\n}\n\ninterface CancelAllActiveTasksErrorAction {\n type: typeof CANCEL_ALL_ACTIVE_TASKS_ERROR;\n queue: string;\n error: string;\n}\n\ninterface BatchCancelActiveTasksBeginAction {\n type: typeof BATCH_CANCEL_ACTIVE_TASKS_BEGIN;\n queue: string;\n taskIds: string[];\n}\n\ninterface BatchCancelActiveTasksSuccessAction {\n type: typeof BATCH_CANCEL_ACTIVE_TASKS_SUCCESS;\n queue: string;\n payload: BatchCancelTasksResponse;\n}\n\ninterface BatchCancelActiveTasksErrorAction {\n type: typeof BATCH_CANCEL_ACTIVE_TASKS_ERROR;\n queue: string;\n taskIds: string[];\n error: string;\n}\n\ninterface DeletePendingTaskBeginAction {\n type: typeof DELETE_PENDING_TASK_BEGIN;\n queue: string;\n taskId: string;\n}\n\ninterface DeletePendingTaskSuccessAction {\n type: typeof DELETE_PENDING_TASK_SUCCESS;\n queue: string;\n taskId: string;\n}\n\ninterface DeletePendingTaskErrorAction {\n type: typeof DELETE_PENDING_TASK_ERROR;\n queue: string;\n taskId: string;\n error: string;\n}\n\ninterface BatchDeletePendingTasksBeginAction {\n type: typeof BATCH_DELETE_PENDING_TASKS_BEGIN;\n queue: string;\n taskIds: string[];\n}\n\ninterface BatchDeletePendingTasksSuccessAction {\n type: typeof BATCH_DELETE_PENDING_TASKS_SUCCESS;\n queue: string;\n payload: BatchDeleteTasksResponse;\n}\n\ninterface BatchDeletePendingTasksErrorAction {\n type: typeof BATCH_DELETE_PENDING_TASKS_ERROR;\n queue: string;\n taskIds: string[];\n error: string;\n}\n\ninterface DeleteAllPendingTasksBeginAction {\n type: typeof DELETE_ALL_PENDING_TASKS_BEGIN;\n queue: string;\n}\n\ninterface DeleteAllPendingTasksSuccessAction {\n type: typeof DELETE_ALL_PENDING_TASKS_SUCCESS;\n queue: string;\n deleted: number;\n}\n\ninterface DeleteAllPendingTasksErrorAction {\n type: typeof DELETE_ALL_PENDING_TASKS_ERROR;\n queue: string;\n error: string;\n}\n\ninterface ArchivePendingTaskBeginAction {\n type: typeof ARCHIVE_PENDING_TASK_BEGIN;\n queue: string;\n taskId: string;\n}\n\ninterface ArchivePendingTaskSuccessAction {\n type: typeof ARCHIVE_PENDING_TASK_SUCCESS;\n queue: string;\n taskId: string;\n}\n\ninterface ArchivePendingTaskErrorAction {\n type: typeof ARCHIVE_PENDING_TASK_ERROR;\n queue: string;\n taskId: string;\n error: string;\n}\n\ninterface BatchArchivePendingTasksBeginAction {\n type: typeof BATCH_ARCHIVE_PENDING_TASKS_BEGIN;\n queue: string;\n taskIds: string[];\n}\n\ninterface BatchArchivePendingTasksSuccessAction {\n type: typeof BATCH_ARCHIVE_PENDING_TASKS_SUCCESS;\n queue: string;\n payload: BatchArchiveTasksResponse;\n}\n\ninterface BatchArchivePendingTasksErrorAction {\n type: typeof BATCH_ARCHIVE_PENDING_TASKS_ERROR;\n queue: string;\n taskIds: string[];\n error: string;\n}\n\ninterface ArchiveAllPendingTasksBeginAction {\n type: typeof ARCHIVE_ALL_PENDING_TASKS_BEGIN;\n queue: string;\n}\n\ninterface ArchiveAllPendingTasksSuccessAction {\n type: typeof ARCHIVE_ALL_PENDING_TASKS_SUCCESS;\n queue: string;\n}\n\ninterface ArchiveAllPendingTasksErrorAction {\n type: typeof ARCHIVE_ALL_PENDING_TASKS_ERROR;\n queue: string;\n error: string;\n}\n\ninterface RunScheduledTaskBeginAction {\n type: typeof RUN_SCHEDULED_TASK_BEGIN;\n queue: string;\n taskId: string;\n}\n\ninterface RunScheduledTaskSuccessAction {\n type: typeof RUN_SCHEDULED_TASK_SUCCESS;\n queue: string;\n taskId: string;\n}\n\ninterface RunScheduledTaskErrorAction {\n type: typeof RUN_SCHEDULED_TASK_ERROR;\n queue: string;\n taskId: string;\n error: string;\n}\n\ninterface ArchiveScheduledTaskBeginAction {\n type: typeof ARCHIVE_SCHEDULED_TASK_BEGIN;\n queue: string;\n taskId: string;\n}\n\ninterface ArchiveScheduledTaskSuccessAction {\n type: typeof ARCHIVE_SCHEDULED_TASK_SUCCESS;\n queue: string;\n taskId: string;\n}\n\ninterface ArchiveScheduledTaskErrorAction {\n type: typeof ARCHIVE_SCHEDULED_TASK_ERROR;\n queue: string;\n taskId: string;\n error: string;\n}\n\ninterface RunRetryTaskBeginAction {\n type: typeof RUN_RETRY_TASK_BEGIN;\n queue: string;\n taskId: string;\n}\n\ninterface RunRetryTaskSuccessAction {\n type: typeof RUN_RETRY_TASK_SUCCESS;\n queue: string;\n taskId: string;\n}\n\ninterface RunRetryTaskErrorAction {\n type: typeof RUN_RETRY_TASK_ERROR;\n queue: string;\n taskId: string;\n error: string;\n}\n\ninterface ArchiveRetryTaskBeginAction {\n type: typeof ARCHIVE_RETRY_TASK_BEGIN;\n queue: string;\n taskId: string;\n}\n\ninterface ArchiveRetryTaskSuccessAction {\n type: typeof ARCHIVE_RETRY_TASK_SUCCESS;\n queue: string;\n taskId: string;\n}\n\ninterface ArchiveRetryTaskErrorAction {\n type: typeof ARCHIVE_RETRY_TASK_ERROR;\n queue: string;\n taskId: string;\n error: string;\n}\n\ninterface RunArchivedTaskBeginAction {\n type: typeof RUN_ARCHIVED_TASK_BEGIN;\n queue: string;\n taskId: string;\n}\n\ninterface RunArchivedTaskSuccessAction {\n type: typeof RUN_ARCHIVED_TASK_SUCCESS;\n queue: string;\n taskId: string;\n}\n\ninterface RunArchivedTaskErrorAction {\n type: typeof RUN_ARCHIVED_TASK_ERROR;\n queue: string;\n taskId: string;\n error: string;\n}\n\ninterface DeleteScheduledTaskBeginAction {\n type: typeof DELETE_SCHEDULED_TASK_BEGIN;\n queue: string;\n taskId: string;\n}\n\ninterface DeleteScheduledTaskSuccessAction {\n type: typeof DELETE_SCHEDULED_TASK_SUCCESS;\n queue: string;\n taskId: string;\n}\n\ninterface DeleteScheduledTaskErrorAction {\n type: typeof DELETE_SCHEDULED_TASK_ERROR;\n queue: string;\n taskId: string;\n error: string;\n}\n\ninterface BatchDeleteScheduledTasksBeginAction {\n type: typeof BATCH_DELETE_SCHEDULED_TASKS_BEGIN;\n queue: string;\n taskIds: string[];\n}\n\ninterface BatchDeleteScheduledTasksSuccessAction {\n type: typeof BATCH_DELETE_SCHEDULED_TASKS_SUCCESS;\n queue: string;\n payload: BatchDeleteTasksResponse;\n}\n\ninterface BatchDeleteScheduledTasksErrorAction {\n type: typeof BATCH_DELETE_SCHEDULED_TASKS_ERROR;\n queue: string;\n taskIds: string[];\n error: string;\n}\n\ninterface BatchRunScheduledTasksBeginAction {\n type: typeof BATCH_RUN_SCHEDULED_TASKS_BEGIN;\n queue: string;\n taskIds: string[];\n}\n\ninterface BatchRunScheduledTasksSuccessAction {\n type: typeof BATCH_RUN_SCHEDULED_TASKS_SUCCESS;\n queue: string;\n payload: BatchRunTasksResponse;\n}\n\ninterface BatchRunScheduledTasksErrorAction {\n type: typeof BATCH_RUN_SCHEDULED_TASKS_ERROR;\n queue: string;\n taskIds: string[];\n error: string;\n}\n\ninterface RunAllScheduledTasksBeginAction {\n type: typeof RUN_ALL_SCHEDULED_TASKS_BEGIN;\n queue: string;\n}\n\ninterface RunAllScheduledTasksSuccessAction {\n type: typeof RUN_ALL_SCHEDULED_TASKS_SUCCESS;\n queue: string;\n}\n\ninterface RunAllScheduledTasksErrorAction {\n type: typeof RUN_ALL_SCHEDULED_TASKS_ERROR;\n queue: string;\n error: string;\n}\n\ninterface BatchArchiveScheduledTasksBeginAction {\n type: typeof BATCH_ARCHIVE_SCHEDULED_TASKS_BEGIN;\n queue: string;\n taskIds: string[];\n}\n\ninterface BatchArchiveScheduledTasksSuccessAction {\n type: typeof BATCH_ARCHIVE_SCHEDULED_TASKS_SUCCESS;\n queue: string;\n payload: BatchArchiveTasksResponse;\n}\n\ninterface BatchArchiveScheduledTasksErrorAction {\n type: typeof BATCH_ARCHIVE_SCHEDULED_TASKS_ERROR;\n queue: string;\n taskIds: string[];\n error: string;\n}\n\ninterface ArchiveAllScheduledTasksBeginAction {\n type: typeof ARCHIVE_ALL_SCHEDULED_TASKS_BEGIN;\n queue: string;\n}\n\ninterface ArchiveAllScheduledTasksSuccessAction {\n type: typeof ARCHIVE_ALL_SCHEDULED_TASKS_SUCCESS;\n queue: string;\n}\n\ninterface ArchiveAllScheduledTasksErrorAction {\n type: typeof ARCHIVE_ALL_SCHEDULED_TASKS_ERROR;\n queue: string;\n error: string;\n}\n\ninterface DeleteAllScheduledTasksBeginAction {\n type: typeof DELETE_ALL_SCHEDULED_TASKS_BEGIN;\n queue: string;\n}\n\ninterface DeleteAllScheduledTasksSuccessAction {\n type: typeof DELETE_ALL_SCHEDULED_TASKS_SUCCESS;\n queue: string;\n deleted: number;\n}\n\ninterface DeleteAllScheduledTasksErrorAction {\n type: typeof DELETE_ALL_SCHEDULED_TASKS_ERROR;\n queue: string;\n error: string;\n}\n\ninterface DeleteRetryTaskBeginAction {\n type: typeof DELETE_RETRY_TASK_BEGIN;\n queue: string;\n taskId: string;\n}\n\ninterface DeleteRetryTaskSuccessAction {\n type: typeof DELETE_RETRY_TASK_SUCCESS;\n queue: string;\n taskId: string;\n}\n\ninterface DeleteRetryTaskErrorAction {\n type: typeof DELETE_RETRY_TASK_ERROR;\n queue: string;\n taskId: string;\n error: string;\n}\n\ninterface BatchDeleteRetryTasksBeginAction {\n type: typeof BATCH_DELETE_RETRY_TASKS_BEGIN;\n queue: string;\n taskIds: string[];\n}\n\ninterface BatchDeleteRetryTasksSuccessAction {\n type: typeof BATCH_DELETE_RETRY_TASKS_SUCCESS;\n queue: string;\n payload: BatchDeleteTasksResponse;\n}\n\ninterface BatchDeleteRetryTasksErrorAction {\n type: typeof BATCH_DELETE_RETRY_TASKS_ERROR;\n queue: string;\n taskIds: string[];\n error: string;\n}\n\ninterface BatchRunRetryTasksBeginAction {\n type: typeof BATCH_RUN_RETRY_TASKS_BEGIN;\n queue: string;\n taskIds: string[];\n}\n\ninterface BatchRunRetryTasksSuccessAction {\n type: typeof BATCH_RUN_RETRY_TASKS_SUCCESS;\n queue: string;\n payload: BatchRunTasksResponse;\n}\n\ninterface BatchRunRetryTasksErrorAction {\n type: typeof BATCH_RUN_RETRY_TASKS_ERROR;\n queue: string;\n taskIds: string[];\n error: string;\n}\n\ninterface RunAllRetryTasksBeginAction {\n type: typeof RUN_ALL_RETRY_TASKS_BEGIN;\n queue: string;\n}\n\ninterface RunAllRetryTasksSuccessAction {\n type: typeof RUN_ALL_RETRY_TASKS_SUCCESS;\n queue: string;\n}\n\ninterface RunAllRetryTasksErrorAction {\n type: typeof RUN_ALL_RETRY_TASKS_ERROR;\n queue: string;\n error: string;\n}\n\ninterface BatchArchiveRetryTasksBeginAction {\n type: typeof BATCH_ARCHIVE_RETRY_TASKS_BEGIN;\n queue: string;\n taskIds: string[];\n}\n\ninterface BatchArchiveRetryTasksSuccessAction {\n type: typeof BATCH_ARCHIVE_RETRY_TASKS_SUCCESS;\n queue: string;\n payload: BatchArchiveTasksResponse;\n}\n\ninterface BatchArchiveRetryTasksErrorAction {\n type: typeof BATCH_ARCHIVE_RETRY_TASKS_ERROR;\n queue: string;\n taskIds: string[];\n error: string;\n}\n\ninterface ArchiveAllRetryTasksBeginAction {\n type: typeof ARCHIVE_ALL_RETRY_TASKS_BEGIN;\n queue: string;\n}\n\ninterface ArchiveAllRetryTasksSuccessAction {\n type: typeof ARCHIVE_ALL_RETRY_TASKS_SUCCESS;\n queue: string;\n}\n\ninterface ArchiveAllRetryTasksErrorAction {\n type: typeof ARCHIVE_ALL_RETRY_TASKS_ERROR;\n queue: string;\n error: string;\n}\n\ninterface DeleteAllRetryTasksBeginAction {\n type: typeof DELETE_ALL_RETRY_TASKS_BEGIN;\n queue: string;\n}\n\ninterface DeleteAllRetryTasksSuccessAction {\n type: typeof DELETE_ALL_RETRY_TASKS_SUCCESS;\n queue: string;\n deleted: number;\n}\n\ninterface DeleteAllRetryTasksErrorAction {\n type: typeof DELETE_ALL_RETRY_TASKS_ERROR;\n queue: string;\n error: string;\n}\n\ninterface DeleteArchivedTaskBeginAction {\n type: typeof DELETE_ARCHIVED_TASK_BEGIN;\n queue: string;\n taskId: string;\n}\n\ninterface DeleteArchivedTaskSuccessAction {\n type: typeof DELETE_ARCHIVED_TASK_SUCCESS;\n queue: string;\n taskId: string;\n}\n\ninterface DeleteArchivedTaskErrorAction {\n type: typeof DELETE_ARCHIVED_TASK_ERROR;\n queue: string;\n taskId: string;\n error: string;\n}\n\ninterface BatchDeleteArchivedTasksBeginAction {\n type: typeof BATCH_DELETE_ARCHIVED_TASKS_BEGIN;\n queue: string;\n taskIds: string[];\n}\n\ninterface BatchDeleteArchivedTasksSuccessAction {\n type: typeof BATCH_DELETE_ARCHIVED_TASKS_SUCCESS;\n queue: string;\n payload: BatchDeleteTasksResponse;\n}\n\ninterface BatchDeleteArchivedTasksErrorAction {\n type: typeof BATCH_DELETE_ARCHIVED_TASKS_ERROR;\n queue: string;\n taskIds: string[];\n error: string;\n}\n\ninterface BatchRunArchivedTasksBeginAction {\n type: typeof BATCH_RUN_ARCHIVED_TASKS_BEGIN;\n queue: string;\n taskIds: string[];\n}\n\ninterface BatchRunArchivedTasksSuccessAction {\n type: typeof BATCH_RUN_ARCHIVED_TASKS_SUCCESS;\n queue: string;\n payload: BatchRunTasksResponse;\n}\n\ninterface BatchRunArchivedTasksErrorAction {\n type: typeof BATCH_RUN_ARCHIVED_TASKS_ERROR;\n queue: string;\n taskIds: string[];\n error: string;\n}\n\ninterface RunAllArchivedTasksBeginAction {\n type: typeof RUN_ALL_ARCHIVED_TASKS_BEGIN;\n queue: string;\n}\n\ninterface RunAllArchivedTasksSuccessAction {\n type: typeof RUN_ALL_ARCHIVED_TASKS_SUCCESS;\n queue: string;\n}\n\ninterface RunAllArchivedTasksErrorAction {\n type: typeof RUN_ALL_ARCHIVED_TASKS_ERROR;\n queue: string;\n error: string;\n}\n\ninterface DeleteAllArchivedTasksBeginAction {\n type: typeof DELETE_ALL_ARCHIVED_TASKS_BEGIN;\n queue: string;\n}\n\ninterface DeleteAllArchivedTasksSuccessAction {\n type: typeof DELETE_ALL_ARCHIVED_TASKS_SUCCESS;\n queue: string;\n deleted: number;\n}\n\ninterface DeleteAllArchivedTasksErrorAction {\n type: typeof DELETE_ALL_ARCHIVED_TASKS_ERROR;\n queue: string;\n error: string;\n}\n\ninterface DeleteCompletedTaskBeginAction {\n type: typeof DELETE_COMPLETED_TASK_BEGIN;\n queue: string;\n taskId: string;\n}\n\ninterface DeleteCompletedTaskSuccessAction {\n type: typeof DELETE_COMPLETED_TASK_SUCCESS;\n queue: string;\n taskId: string;\n}\n\ninterface DeleteCompletedTaskErrorAction {\n type: typeof DELETE_COMPLETED_TASK_ERROR;\n queue: string;\n taskId: string;\n error: string;\n}\n\ninterface BatchDeleteCompletedTasksBeginAction {\n type: typeof BATCH_DELETE_COMPLETED_TASKS_BEGIN;\n queue: string;\n taskIds: string[];\n}\n\ninterface BatchDeleteCompletedTasksSuccessAction {\n type: typeof BATCH_DELETE_COMPLETED_TASKS_SUCCESS;\n queue: string;\n payload: BatchDeleteTasksResponse;\n}\n\ninterface BatchDeleteCompletedTasksErrorAction {\n type: typeof BATCH_DELETE_COMPLETED_TASKS_ERROR;\n queue: string;\n taskIds: string[];\n error: string;\n}\n\ninterface DeleteAllCompletedTasksBeginAction {\n type: typeof DELETE_ALL_COMPLETED_TASKS_BEGIN;\n queue: string;\n}\n\ninterface DeleteAllCompletedTasksSuccessAction {\n type: typeof DELETE_ALL_COMPLETED_TASKS_SUCCESS;\n queue: string;\n deleted: number;\n}\n\ninterface DeleteAllCompletedTasksErrorAction {\n type: typeof DELETE_ALL_COMPLETED_TASKS_ERROR;\n queue: string;\n error: string;\n}\n\n// Union of all tasks related action types.\nexport type TasksActionTypes =\n | GetTaskInfoBeginAction\n | GetTaskInfoErrorAction\n | GetTaskInfoSuccessAction\n | ListActiveTasksBeginAction\n | ListActiveTasksSuccessAction\n | ListActiveTasksErrorAction\n | ListPendingTasksBeginAction\n | ListPendingTasksSuccessAction\n | ListPendingTasksErrorAction\n | ListScheduledTasksBeginAction\n | ListScheduledTasksSuccessAction\n | ListScheduledTasksErrorAction\n | ListRetryTasksBeginAction\n | ListRetryTasksSuccessAction\n | ListRetryTasksErrorAction\n | ListArchivedTasksBeginAction\n | ListArchivedTasksSuccessAction\n | ListArchivedTasksErrorAction\n | ListCompletedTasksBeginAction\n | ListCompletedTasksSuccessAction\n | ListCompletedTasksErrorAction\n | CancelActiveTaskBeginAction\n | CancelActiveTaskSuccessAction\n | CancelActiveTaskErrorAction\n | CancelAllActiveTasksBeginAction\n | CancelAllActiveTasksSuccessAction\n | CancelAllActiveTasksErrorAction\n | BatchCancelActiveTasksBeginAction\n | BatchCancelActiveTasksSuccessAction\n | BatchCancelActiveTasksErrorAction\n | DeletePendingTaskBeginAction\n | DeletePendingTaskSuccessAction\n | DeletePendingTaskErrorAction\n | BatchDeletePendingTasksBeginAction\n | BatchDeletePendingTasksSuccessAction\n | BatchDeletePendingTasksErrorAction\n | DeleteAllPendingTasksBeginAction\n | DeleteAllPendingTasksSuccessAction\n | DeleteAllPendingTasksErrorAction\n | ArchivePendingTaskBeginAction\n | ArchivePendingTaskSuccessAction\n | ArchivePendingTaskErrorAction\n | BatchArchivePendingTasksBeginAction\n | BatchArchivePendingTasksSuccessAction\n | BatchArchivePendingTasksErrorAction\n | ArchiveAllPendingTasksBeginAction\n | ArchiveAllPendingTasksSuccessAction\n | ArchiveAllPendingTasksErrorAction\n | RunScheduledTaskBeginAction\n | RunScheduledTaskSuccessAction\n | RunScheduledTaskErrorAction\n | RunRetryTaskBeginAction\n | RunRetryTaskSuccessAction\n | RunRetryTaskErrorAction\n | RunArchivedTaskBeginAction\n | RunArchivedTaskSuccessAction\n | RunArchivedTaskErrorAction\n | ArchiveScheduledTaskBeginAction\n | ArchiveScheduledTaskSuccessAction\n | ArchiveScheduledTaskErrorAction\n | ArchiveRetryTaskBeginAction\n | ArchiveRetryTaskSuccessAction\n | ArchiveRetryTaskErrorAction\n | DeleteScheduledTaskBeginAction\n | DeleteScheduledTaskSuccessAction\n | DeleteScheduledTaskErrorAction\n | BatchDeleteScheduledTasksBeginAction\n | BatchDeleteScheduledTasksSuccessAction\n | BatchDeleteScheduledTasksErrorAction\n | BatchRunScheduledTasksBeginAction\n | BatchRunScheduledTasksSuccessAction\n | BatchRunScheduledTasksErrorAction\n | RunAllScheduledTasksBeginAction\n | RunAllScheduledTasksSuccessAction\n | RunAllScheduledTasksErrorAction\n | BatchArchiveScheduledTasksBeginAction\n | BatchArchiveScheduledTasksSuccessAction\n | BatchArchiveScheduledTasksErrorAction\n | ArchiveAllScheduledTasksBeginAction\n | ArchiveAllScheduledTasksSuccessAction\n | ArchiveAllScheduledTasksErrorAction\n | DeleteAllScheduledTasksBeginAction\n | DeleteAllScheduledTasksSuccessAction\n | DeleteAllScheduledTasksErrorAction\n | DeleteRetryTaskBeginAction\n | DeleteRetryTaskSuccessAction\n | DeleteRetryTaskErrorAction\n | BatchDeleteRetryTasksBeginAction\n | BatchDeleteRetryTasksSuccessAction\n | BatchDeleteRetryTasksErrorAction\n | BatchRunRetryTasksBeginAction\n | BatchRunRetryTasksSuccessAction\n | BatchRunRetryTasksErrorAction\n | RunAllRetryTasksBeginAction\n | RunAllRetryTasksSuccessAction\n | RunAllRetryTasksErrorAction\n | BatchArchiveRetryTasksBeginAction\n | BatchArchiveRetryTasksSuccessAction\n | BatchArchiveRetryTasksErrorAction\n | ArchiveAllRetryTasksBeginAction\n | ArchiveAllRetryTasksSuccessAction\n | ArchiveAllRetryTasksErrorAction\n | DeleteAllRetryTasksBeginAction\n | DeleteAllRetryTasksSuccessAction\n | DeleteAllRetryTasksErrorAction\n | DeleteArchivedTaskBeginAction\n | DeleteArchivedTaskSuccessAction\n | DeleteArchivedTaskErrorAction\n | BatchDeleteArchivedTasksBeginAction\n | BatchDeleteArchivedTasksSuccessAction\n | BatchDeleteArchivedTasksErrorAction\n | BatchRunArchivedTasksBeginAction\n | BatchRunArchivedTasksSuccessAction\n | BatchRunArchivedTasksErrorAction\n | RunAllArchivedTasksBeginAction\n | RunAllArchivedTasksSuccessAction\n | RunAllArchivedTasksErrorAction\n | DeleteAllArchivedTasksBeginAction\n | DeleteAllArchivedTasksSuccessAction\n | DeleteAllArchivedTasksErrorAction\n | DeleteCompletedTaskBeginAction\n | DeleteCompletedTaskSuccessAction\n | DeleteCompletedTaskErrorAction\n | BatchDeleteCompletedTasksBeginAction\n | BatchDeleteCompletedTasksSuccessAction\n | BatchDeleteCompletedTasksErrorAction\n | DeleteAllCompletedTasksBeginAction\n | DeleteAllCompletedTasksSuccessAction\n | DeleteAllCompletedTasksErrorAction;\n\nexport function getTaskInfoAsync(qname: string, id: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: GET_TASK_INFO_BEGIN });\n try {\n const response = await getTaskInfo(qname, id);\n dispatch({\n type: GET_TASK_INFO_SUCCESS,\n payload: response,\n });\n } catch (error) {\n console.error(\"getTaskInfoAsync: \", toErrorStringWithHttpStatus(error));\n dispatch({\n type: GET_TASK_INFO_ERROR,\n error: toErrorString(error),\n });\n }\n };\n}\n\nexport function listActiveTasksAsync(\n qname: string,\n pageOpts?: PaginationOptions\n) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: LIST_ACTIVE_TASKS_BEGIN, queue: qname });\n try {\n const response = await listActiveTasks(qname, pageOpts);\n dispatch({\n type: LIST_ACTIVE_TASKS_SUCCESS,\n queue: qname,\n payload: response,\n });\n } catch (error) {\n console.error(\n \"listActiveTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: LIST_ACTIVE_TASKS_ERROR,\n queue: qname,\n error: toErrorString(error),\n });\n }\n };\n}\n\nexport function listPendingTasksAsync(\n qname: string,\n pageOpts?: PaginationOptions\n) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: LIST_PENDING_TASKS_BEGIN, queue: qname });\n try {\n const response = await listPendingTasks(qname, pageOpts);\n dispatch({\n type: LIST_PENDING_TASKS_SUCCESS,\n queue: qname,\n payload: response,\n });\n } catch (error) {\n console.error(\n \"listPendingTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: LIST_PENDING_TASKS_ERROR,\n queue: qname,\n error: toErrorString(error),\n });\n }\n };\n}\n\nexport function listScheduledTasksAsync(\n qname: string,\n pageOpts?: PaginationOptions\n) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: LIST_SCHEDULED_TASKS_BEGIN, queue: qname });\n try {\n const response = await listScheduledTasks(qname, pageOpts);\n dispatch({\n type: LIST_SCHEDULED_TASKS_SUCCESS,\n queue: qname,\n payload: response,\n });\n } catch (error) {\n console.error(\n \"listScheduledTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: LIST_SCHEDULED_TASKS_ERROR,\n queue: qname,\n error: toErrorString(error),\n });\n }\n };\n}\n\nexport function listRetryTasksAsync(\n qname: string,\n pageOpts?: PaginationOptions\n) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: LIST_RETRY_TASKS_BEGIN, queue: qname });\n try {\n const response = await listRetryTasks(qname, pageOpts);\n dispatch({\n type: LIST_RETRY_TASKS_SUCCESS,\n queue: qname,\n payload: response,\n });\n } catch (error) {\n console.error(\n \"listRetryTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: LIST_RETRY_TASKS_ERROR,\n queue: qname,\n error: toErrorString(error),\n });\n }\n };\n}\n\nexport function listArchivedTasksAsync(\n qname: string,\n pageOpts?: PaginationOptions\n) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: LIST_ARCHIVED_TASKS_BEGIN, queue: qname });\n try {\n const response = await listArchivedTasks(qname, pageOpts);\n dispatch({\n type: LIST_ARCHIVED_TASKS_SUCCESS,\n queue: qname,\n payload: response,\n });\n } catch (error) {\n console.error(\n \"listArchivedTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: LIST_ARCHIVED_TASKS_ERROR,\n queue: qname,\n error: toErrorString(error),\n });\n }\n };\n}\n\nexport function listCompletedTasksAsync(\n qname: string,\n pageOpts?: PaginationOptions\n) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n try {\n dispatch({ type: LIST_COMPLETED_TASKS_BEGIN, queue: qname });\n const response = await listCompletedTasks(qname, pageOpts);\n dispatch({\n type: LIST_COMPLETED_TASKS_SUCCESS,\n queue: qname,\n payload: response,\n });\n } catch (error) {\n console.error(\n \"listCompletedTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: LIST_COMPLETED_TASKS_ERROR,\n queue: qname,\n error: toErrorString(error),\n });\n }\n };\n}\n\nexport function cancelActiveTaskAsync(queue: string, taskId: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: CANCEL_ACTIVE_TASK_BEGIN, queue, taskId });\n try {\n await cancelActiveTask(queue, taskId);\n dispatch({ type: CANCEL_ACTIVE_TASK_SUCCESS, queue, taskId });\n } catch (error) {\n console.error(\n \"cancelActiveTaskAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: CANCEL_ACTIVE_TASK_ERROR,\n error: toErrorString(error),\n queue,\n taskId,\n });\n }\n };\n}\n\nexport function cancelAllActiveTasksAsync(queue: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: CANCEL_ALL_ACTIVE_TASKS_BEGIN, queue });\n try {\n await cancelAllActiveTasks(queue);\n dispatch({ type: CANCEL_ALL_ACTIVE_TASKS_SUCCESS, queue });\n } catch (error) {\n console.error(\n \"cancelAllActiveTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: CANCEL_ALL_ACTIVE_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n });\n }\n };\n}\n\nexport function batchCancelActiveTasksAsync(queue: string, taskIds: string[]) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: BATCH_CANCEL_ACTIVE_TASKS_BEGIN, queue, taskIds });\n try {\n const response = await batchCancelActiveTasks(queue, taskIds);\n dispatch({\n type: BATCH_CANCEL_ACTIVE_TASKS_SUCCESS,\n queue: queue,\n payload: response,\n });\n } catch (error) {\n console.error(\n \"batchCancelActiveTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: BATCH_CANCEL_ACTIVE_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n taskIds,\n });\n }\n };\n}\n\nexport function runScheduledTaskAsync(queue: string, taskId: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: RUN_SCHEDULED_TASK_BEGIN, queue, taskId });\n try {\n await runScheduledTask(queue, taskId);\n dispatch({ type: RUN_SCHEDULED_TASK_SUCCESS, queue, taskId });\n } catch (error) {\n console.error(\n \"runScheduledTaskAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: RUN_SCHEDULED_TASK_ERROR,\n error: toErrorString(error),\n queue,\n taskId,\n });\n }\n };\n}\n\nexport function runRetryTaskAsync(queue: string, taskId: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: RUN_RETRY_TASK_BEGIN, queue, taskId });\n try {\n await runRetryTask(queue, taskId);\n dispatch({ type: RUN_RETRY_TASK_SUCCESS, queue, taskId });\n } catch (error) {\n console.error(\"runRetryTaskAsync: \", toErrorStringWithHttpStatus(error));\n dispatch({\n type: RUN_RETRY_TASK_ERROR,\n error: toErrorString(error),\n queue,\n taskId,\n });\n }\n };\n}\n\nexport function archivePendingTaskAsync(queue: string, taskId: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: ARCHIVE_PENDING_TASK_BEGIN, queue, taskId });\n try {\n await archivePendingTask(queue, taskId);\n dispatch({ type: ARCHIVE_PENDING_TASK_SUCCESS, queue, taskId });\n } catch (error) {\n console.error(\n \"archivePendingTaskAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: ARCHIVE_PENDING_TASK_ERROR,\n error: toErrorString(error),\n queue,\n taskId,\n });\n }\n };\n}\n\nexport function archiveScheduledTaskAsync(queue: string, taskId: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: ARCHIVE_SCHEDULED_TASK_BEGIN, queue, taskId });\n try {\n await archiveScheduledTask(queue, taskId);\n dispatch({ type: ARCHIVE_SCHEDULED_TASK_SUCCESS, queue, taskId });\n } catch (error) {\n console.error(\n \"archiveScheduledTaskAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: ARCHIVE_SCHEDULED_TASK_ERROR,\n error: toErrorString(error),\n queue,\n taskId,\n });\n }\n };\n}\n\nexport function archiveRetryTaskAsync(queue: string, taskId: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: ARCHIVE_RETRY_TASK_BEGIN, queue, taskId });\n try {\n await archiveRetryTask(queue, taskId);\n dispatch({ type: ARCHIVE_RETRY_TASK_SUCCESS, queue, taskId });\n } catch (error) {\n console.error(\n \"archiveRetryTaskAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: ARCHIVE_RETRY_TASK_ERROR,\n error: toErrorString(error),\n queue,\n taskId,\n });\n }\n };\n}\n\nexport function runArchivedTaskAsync(queue: string, taskId: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: RUN_ARCHIVED_TASK_BEGIN, queue, taskId });\n try {\n await runArchivedTask(queue, taskId);\n dispatch({ type: RUN_ARCHIVED_TASK_SUCCESS, queue, taskId });\n } catch (error) {\n console.error(\n \"runArchivedTaskAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: RUN_ARCHIVED_TASK_ERROR,\n error: toErrorString(error),\n queue,\n taskId,\n });\n }\n };\n}\n\nexport function deletePendingTaskAsync(queue: string, taskId: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: DELETE_PENDING_TASK_BEGIN, queue, taskId });\n try {\n await deletePendingTask(queue, taskId);\n dispatch({ type: DELETE_PENDING_TASK_SUCCESS, queue, taskId });\n } catch (error) {\n console.error(\n \"deletePendingTaskAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: DELETE_PENDING_TASK_ERROR,\n error: toErrorString(error),\n queue,\n taskId,\n });\n }\n };\n}\n\nexport function batchDeletePendingTasksAsync(queue: string, taskIds: string[]) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: BATCH_DELETE_PENDING_TASKS_BEGIN, queue, taskIds });\n try {\n const response = await batchDeletePendingTasks(queue, taskIds);\n dispatch({\n type: BATCH_DELETE_PENDING_TASKS_SUCCESS,\n queue: queue,\n payload: response,\n });\n } catch (error) {\n console.error(\n \"batchDeletePendingTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: BATCH_DELETE_PENDING_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n taskIds,\n });\n }\n };\n}\n\nexport function deleteScheduledTaskAsync(queue: string, taskId: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: DELETE_SCHEDULED_TASK_BEGIN, queue, taskId });\n try {\n await deleteScheduledTask(queue, taskId);\n dispatch({ type: DELETE_SCHEDULED_TASK_SUCCESS, queue, taskId });\n } catch (error) {\n console.error(\n \"deleteScheduledTaskAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: DELETE_SCHEDULED_TASK_ERROR,\n error: toErrorString(error),\n queue,\n taskId,\n });\n }\n };\n}\n\nexport function batchDeleteScheduledTasksAsync(\n queue: string,\n taskIds: string[]\n) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: BATCH_DELETE_SCHEDULED_TASKS_BEGIN, queue, taskIds });\n try {\n const response = await batchDeleteScheduledTasks(queue, taskIds);\n dispatch({\n type: BATCH_DELETE_SCHEDULED_TASKS_SUCCESS,\n queue: queue,\n payload: response,\n });\n } catch (error) {\n console.error(\n \"batchDeleteScheduledTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: BATCH_DELETE_SCHEDULED_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n taskIds,\n });\n }\n };\n}\n\nexport function batchRunScheduledTasksAsync(queue: string, taskIds: string[]) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: BATCH_RUN_SCHEDULED_TASKS_BEGIN, queue, taskIds });\n try {\n const response = await batchRunScheduledTasks(queue, taskIds);\n dispatch({\n type: BATCH_RUN_SCHEDULED_TASKS_SUCCESS,\n queue: queue,\n payload: response,\n });\n } catch (error) {\n console.error(\n \"batchRunScheduledTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: BATCH_RUN_SCHEDULED_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n taskIds,\n });\n }\n };\n}\n\nexport function batchArchiveScheduledTasksAsync(\n queue: string,\n taskIds: string[]\n) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: BATCH_ARCHIVE_SCHEDULED_TASKS_BEGIN, queue, taskIds });\n try {\n const response = await batchArchiveScheduledTasks(queue, taskIds);\n dispatch({\n type: BATCH_ARCHIVE_SCHEDULED_TASKS_SUCCESS,\n queue: queue,\n payload: response,\n });\n } catch (error) {\n console.error(\n \"batchArchiveScheduledTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: BATCH_ARCHIVE_SCHEDULED_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n taskIds,\n });\n }\n };\n}\n\nexport function batchArchivePendingTasksAsync(\n queue: string,\n taskIds: string[]\n) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: BATCH_ARCHIVE_PENDING_TASKS_BEGIN, queue, taskIds });\n try {\n const response = await batchArchivePendingTasks(queue, taskIds);\n dispatch({\n type: BATCH_ARCHIVE_PENDING_TASKS_SUCCESS,\n queue: queue,\n payload: response,\n });\n } catch (error) {\n console.error(\n \"batchArchivePendingTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: BATCH_ARCHIVE_PENDING_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n taskIds,\n });\n }\n };\n}\n\nexport function archiveAllPendingTasksAsync(queue: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: ARCHIVE_ALL_PENDING_TASKS_BEGIN, queue });\n try {\n await archiveAllPendingTasks(queue);\n dispatch({ type: ARCHIVE_ALL_PENDING_TASKS_SUCCESS, queue });\n } catch (error) {\n console.error(\n \"archiveAllPendingTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: ARCHIVE_ALL_PENDING_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n });\n }\n };\n}\n\nexport function deleteAllPendingTasksAsync(queue: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: DELETE_ALL_PENDING_TASKS_BEGIN, queue });\n try {\n const response = await deleteAllPendingTasks(queue);\n dispatch({\n type: DELETE_ALL_PENDING_TASKS_SUCCESS,\n deleted: response.deleted,\n queue,\n });\n } catch (error) {\n console.error(\n \"deleteAllPendingTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: DELETE_ALL_PENDING_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n });\n }\n };\n}\n\nexport function deleteAllScheduledTasksAsync(queue: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: DELETE_ALL_SCHEDULED_TASKS_BEGIN, queue });\n try {\n const response = await deleteAllScheduledTasks(queue);\n dispatch({\n type: DELETE_ALL_SCHEDULED_TASKS_SUCCESS,\n deleted: response.deleted,\n queue,\n });\n } catch (error) {\n console.error(\n \"deleteAllScheduledTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: DELETE_ALL_SCHEDULED_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n });\n }\n };\n}\n\nexport function runAllScheduledTasksAsync(queue: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: RUN_ALL_SCHEDULED_TASKS_BEGIN, queue });\n try {\n await runAllScheduledTasks(queue);\n dispatch({ type: RUN_ALL_SCHEDULED_TASKS_SUCCESS, queue });\n } catch (error) {\n console.error(\n \"runAllScheduledTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: RUN_ALL_SCHEDULED_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n });\n }\n };\n}\n\nexport function archiveAllScheduledTasksAsync(queue: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: ARCHIVE_ALL_SCHEDULED_TASKS_BEGIN, queue });\n try {\n await archiveAllScheduledTasks(queue);\n dispatch({ type: ARCHIVE_ALL_SCHEDULED_TASKS_SUCCESS, queue });\n } catch (error) {\n console.error(\n \"archiveAllScheduledTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: ARCHIVE_ALL_SCHEDULED_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n });\n }\n };\n}\n\nexport function deleteRetryTaskAsync(queue: string, taskId: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: DELETE_RETRY_TASK_BEGIN, queue, taskId });\n try {\n await deleteRetryTask(queue, taskId);\n dispatch({ type: DELETE_RETRY_TASK_SUCCESS, queue, taskId });\n } catch (error) {\n console.error(\n \"deleteRetryTaskAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: DELETE_RETRY_TASK_ERROR,\n error: toErrorString(error),\n queue,\n taskId,\n });\n }\n };\n}\n\nexport function batchDeleteRetryTasksAsync(queue: string, taskIds: string[]) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: BATCH_DELETE_RETRY_TASKS_BEGIN, queue, taskIds });\n try {\n const response = await batchDeleteRetryTasks(queue, taskIds);\n dispatch({\n type: BATCH_DELETE_RETRY_TASKS_SUCCESS,\n queue: queue,\n payload: response,\n });\n } catch (error) {\n console.error(\n \"batchDeleteRetryTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: BATCH_DELETE_RETRY_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n taskIds,\n });\n }\n };\n}\n\nexport function batchRunRetryTasksAsync(queue: string, taskIds: string[]) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: BATCH_RUN_RETRY_TASKS_BEGIN, queue, taskIds });\n try {\n const response = await batchRunRetryTasks(queue, taskIds);\n dispatch({\n type: BATCH_RUN_RETRY_TASKS_SUCCESS,\n queue: queue,\n payload: response,\n });\n } catch (error) {\n console.error(\n \"batchRunRetryTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: BATCH_RUN_RETRY_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n taskIds,\n });\n }\n };\n}\n\nexport function batchArchiveRetryTasksAsync(queue: string, taskIds: string[]) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: BATCH_ARCHIVE_RETRY_TASKS_BEGIN, queue, taskIds });\n try {\n const response = await batchArchiveRetryTasks(queue, taskIds);\n dispatch({\n type: BATCH_ARCHIVE_RETRY_TASKS_SUCCESS,\n queue: queue,\n payload: response,\n });\n } catch (error) {\n console.error(\n \"batchArchiveRetryTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: BATCH_ARCHIVE_RETRY_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n taskIds,\n });\n }\n };\n}\n\nexport function deleteAllRetryTasksAsync(queue: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: DELETE_ALL_RETRY_TASKS_BEGIN, queue });\n try {\n const response = await deleteAllRetryTasks(queue);\n dispatch({\n type: DELETE_ALL_RETRY_TASKS_SUCCESS,\n deleted: response.deleted,\n queue,\n });\n } catch (error) {\n console.error(\n \"deleteAllRetryTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: DELETE_ALL_RETRY_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n });\n }\n };\n}\n\nexport function runAllRetryTasksAsync(queue: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: RUN_ALL_RETRY_TASKS_BEGIN, queue });\n try {\n await runAllRetryTasks(queue);\n dispatch({ type: RUN_ALL_RETRY_TASKS_SUCCESS, queue });\n } catch (error) {\n console.error(\n \"runAllRetryTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: RUN_ALL_RETRY_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n });\n }\n };\n}\n\nexport function archiveAllRetryTasksAsync(queue: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: ARCHIVE_ALL_RETRY_TASKS_BEGIN, queue });\n try {\n await archiveAllRetryTasks(queue);\n dispatch({ type: ARCHIVE_ALL_RETRY_TASKS_SUCCESS, queue });\n } catch (error) {\n console.error(\n \"archiveAllRetryTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: ARCHIVE_ALL_RETRY_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n });\n }\n };\n}\n\nexport function deleteArchivedTaskAsync(queue: string, taskId: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: DELETE_ARCHIVED_TASK_BEGIN, queue, taskId });\n try {\n await deleteArchivedTask(queue, taskId);\n dispatch({ type: DELETE_ARCHIVED_TASK_SUCCESS, queue, taskId });\n } catch (error) {\n console.error(\n \"deleteArchivedTaskAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: DELETE_ARCHIVED_TASK_ERROR,\n error: toErrorString(error),\n queue,\n taskId,\n });\n }\n };\n}\n\nexport function batchDeleteArchivedTasksAsync(\n queue: string,\n taskIds: string[]\n) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: BATCH_DELETE_ARCHIVED_TASKS_BEGIN, queue, taskIds });\n try {\n const response = await batchDeleteArchivedTasks(queue, taskIds);\n dispatch({\n type: BATCH_DELETE_ARCHIVED_TASKS_SUCCESS,\n queue: queue,\n payload: response,\n });\n } catch (error) {\n console.error(\n \"batchDeleteArchivedTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: BATCH_DELETE_ARCHIVED_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n taskIds,\n });\n }\n };\n}\n\nexport function batchRunArchivedTasksAsync(queue: string, taskIds: string[]) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: BATCH_RUN_ARCHIVED_TASKS_BEGIN, queue, taskIds });\n try {\n const response = await batchRunArchivedTasks(queue, taskIds);\n dispatch({\n type: BATCH_RUN_ARCHIVED_TASKS_SUCCESS,\n queue: queue,\n payload: response,\n });\n } catch (error) {\n console.error(\n \"batchRunArchivedTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: BATCH_RUN_ARCHIVED_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n taskIds,\n });\n }\n };\n}\n\nexport function deleteAllArchivedTasksAsync(queue: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: DELETE_ALL_ARCHIVED_TASKS_BEGIN, queue });\n try {\n const response = await deleteAllArchivedTasks(queue);\n dispatch({\n type: DELETE_ALL_ARCHIVED_TASKS_SUCCESS,\n deleted: response.deleted,\n queue,\n });\n } catch (error) {\n console.error(\n \"deleteAllArchivedTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: DELETE_ALL_ARCHIVED_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n });\n }\n };\n}\n\nexport function runAllArchivedTasksAsync(queue: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: RUN_ALL_ARCHIVED_TASKS_BEGIN, queue });\n try {\n await runAllArchivedTasks(queue);\n dispatch({ type: RUN_ALL_ARCHIVED_TASKS_SUCCESS, queue });\n } catch (error) {\n console.error(\n \"runAllArchivedTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: RUN_ALL_ARCHIVED_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n });\n }\n };\n}\n\nexport function deleteCompletedTaskAsync(queue: string, taskId: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: DELETE_COMPLETED_TASK_BEGIN, queue, taskId });\n try {\n await deleteCompletedTask(queue, taskId);\n dispatch({ type: DELETE_COMPLETED_TASK_SUCCESS, queue, taskId });\n } catch (error) {\n console.error(\n \"deleteCompletedTaskAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: DELETE_COMPLETED_TASK_ERROR,\n error: toErrorString(error),\n queue,\n taskId,\n });\n }\n };\n}\n\nexport function batchDeleteCompletedTasksAsync(\n queue: string,\n taskIds: string[]\n) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: BATCH_DELETE_COMPLETED_TASKS_BEGIN, queue, taskIds });\n try {\n const response = await batchDeleteCompletedTasks(queue, taskIds);\n dispatch({\n type: BATCH_DELETE_COMPLETED_TASKS_SUCCESS,\n queue: queue,\n payload: response,\n });\n } catch (error) {\n console.error(\n \"batchDeleteCompletedTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: BATCH_DELETE_COMPLETED_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n taskIds,\n });\n }\n };\n}\n\nexport function deleteAllCompletedTasksAsync(queue: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: DELETE_ALL_COMPLETED_TASKS_BEGIN, queue });\n try {\n const response = await deleteAllCompletedTasks(queue);\n dispatch({\n type: DELETE_ALL_COMPLETED_TASKS_SUCCESS,\n deleted: response.deleted,\n queue,\n });\n } catch (error) {\n console.error(\n \"deleteAllCompletedTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: DELETE_ALL_COMPLETED_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n });\n }\n };\n}\n","import React, { useState } from \"react\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Menu from \"@material-ui/core/Menu\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\nimport MoreHorizIcon from \"@material-ui/icons/MoreHoriz\";\n\nconst useStyles = makeStyles((theme) => ({\n actionsContainer: {\n display: \"flex\",\n padding: \"4px\",\n },\n moreIcon: {\n marginRight: \"8px\",\n },\n iconGroup: {\n paddingLeft: theme.spacing(1),\n borderLeft: `1px solid ${theme.palette.grey[100]}`,\n },\n}));\n\ninterface MenuItemAction {\n label: string;\n onClick: () => void;\n disabled: boolean;\n}\n\ninterface IconButtonAction {\n icon: React.ReactElement;\n tooltip: string;\n onClick: () => void;\n disabled: boolean;\n}\n\ninterface Props {\n menuItemActions: MenuItemAction[];\n iconButtonActions: IconButtonAction[];\n showIconButtons: boolean;\n}\n\nexport default function TableActions(props: Props) {\n const classes = useStyles();\n const [menuAnchor, setMenuAnchor] = useState<null | HTMLElement>(null);\n\n const handleMenuClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n setMenuAnchor(event.currentTarget);\n };\n\n const closeMenu = () => setMenuAnchor(null);\n\n return (\n <div className={classes.actionsContainer}>\n <Tooltip title=\"More Actions\">\n <IconButton\n aria-label=\"actions\"\n className={classes.moreIcon}\n onClick={handleMenuClick}\n >\n <MoreHorizIcon />\n </IconButton>\n </Tooltip>\n <Menu\n id=\"action-menu\"\n keepMounted\n anchorEl={menuAnchor}\n open={Boolean(menuAnchor)}\n onClose={closeMenu}\n >\n {props.menuItemActions.map((action) => (\n <MenuItem\n key={action.label}\n onClick={() => {\n action.onClick();\n closeMenu();\n }}\n disabled={action.disabled}\n >\n {action.label}\n </MenuItem>\n ))}\n </Menu>\n {props.showIconButtons && (\n <div className={classes.iconGroup}>\n {props.iconButtonActions.map((action) => (\n <Tooltip key={action.tooltip} title={action.tooltip}>\n <IconButton onClick={action.onClick} disabled={action.disabled}>\n {action.icon}\n </IconButton>\n </Tooltip>\n ))}\n </div>\n )}\n </div>\n );\n}\n","import React, { useState, useCallback } from \"react\";\nimport { useHistory } from \"react-router-dom\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Table from \"@material-ui/core/Table\";\nimport TableBody from \"@material-ui/core/TableBody\";\nimport TableCell from \"@material-ui/core/TableCell\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport AlertTitle from \"@material-ui/lab/AlertTitle\";\nimport TableContainer from \"@material-ui/core/TableContainer\";\nimport TableHead from \"@material-ui/core/TableHead\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport TableFooter from \"@material-ui/core/TableFooter\";\nimport TablePagination from \"@material-ui/core/TablePagination\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Checkbox from \"@material-ui/core/Checkbox\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport CancelIcon from \"@material-ui/icons/Cancel\";\nimport MoreHorizIcon from \"@material-ui/icons/MoreHoriz\";\nimport SyntaxHighlighter from \"./SyntaxHighlighter\";\nimport {\n listActiveTasksAsync,\n cancelActiveTaskAsync,\n batchCancelActiveTasksAsync,\n cancelAllActiveTasksAsync,\n} from \"../actions/tasksActions\";\nimport { taskRowsPerPageChange } from \"../actions/settingsActions\";\nimport { AppState } from \"../store\";\nimport TablePaginationActions, {\n rowsPerPageOptions,\n} from \"./TablePaginationActions\";\nimport TableActions from \"./TableActions\";\nimport { usePolling } from \"../hooks\";\nimport { ActiveTaskExtended } from \"../reducers/tasksReducer\";\nimport { durationBefore, timeAgo, uuidPrefix, prettifyPayload } from \"../utils\";\nimport { TableColumn } from \"../types/table\";\nimport { taskDetailsPath } from \"../paths\";\n\nconst useStyles = makeStyles((theme) => ({\n table: {\n minWidth: 650,\n },\n stickyHeaderCell: {\n background: theme.palette.background.paper,\n },\n alert: {\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n },\n pagination: {\n border: \"none\",\n },\n}));\n\nfunction mapStateToProps(state: AppState) {\n return {\n loading: state.tasks.activeTasks.loading,\n error: state.tasks.activeTasks.error,\n tasks: state.tasks.activeTasks.data,\n batchActionPending: state.tasks.activeTasks.batchActionPending,\n allActionPending: state.tasks.activeTasks.allActionPending,\n pollInterval: state.settings.pollInterval,\n pageSize: state.settings.taskRowsPerPage,\n };\n}\n\nconst mapDispatchToProps = {\n listActiveTasksAsync,\n cancelActiveTaskAsync,\n batchCancelActiveTasksAsync,\n cancelAllActiveTasksAsync,\n taskRowsPerPageChange,\n};\n\nconst columns: TableColumn[] = [\n { key: \"id\", label: \"ID\", align: \"left\" },\n { key: \"type\", label: \"Type\", align: \"left\" },\n { key: \"payload\", label: \"Payload\", align: \"left\" },\n { key: \"status\", label: \"Status\", align: \"left\" },\n { key: \"start-time\", label: \"Started\", align: \"left\" },\n { key: \"deadline\", label: \"Deadline\", align: \"left\" },\n { key: \"actions\", label: \"Actions\", align: \"center\" },\n];\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\ntype ReduxProps = ConnectedProps<typeof connector>;\n\ninterface Props {\n queue: string; // name of the queue\n}\n\nfunction ActiveTasksTable(props: Props & ReduxProps) {\n const { pollInterval, listActiveTasksAsync, queue, pageSize } = props;\n const classes = useStyles();\n const [page, setPage] = useState(0);\n const [selectedIds, setSelectedIds] = useState<string[]>([]);\n const [activeTaskId, setActiveTaskId] = useState<string>(\"\");\n\n const handlePageChange = (\n event: React.MouseEvent<HTMLButtonElement> | null,\n newPage: number\n ) => {\n setPage(newPage);\n };\n\n const handleRowsPerPageChange = (\n event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>\n ) => {\n props.taskRowsPerPageChange(parseInt(event.target.value, 10));\n setPage(0);\n };\n\n const handleSelectAllClick = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (event.target.checked) {\n const newSelected = props.tasks.map((t) => t.id);\n setSelectedIds(newSelected);\n } else {\n setSelectedIds([]);\n }\n };\n\n const handleCancelAllClick = () => {\n props.cancelAllActiveTasksAsync(queue);\n };\n\n const handleBatchCancelClick = () => {\n props\n .batchCancelActiveTasksAsync(queue, selectedIds)\n .then(() => setSelectedIds([]));\n };\n\n const fetchData = useCallback(() => {\n const pageOpts = { page: page + 1, size: pageSize };\n listActiveTasksAsync(queue, pageOpts);\n }, [page, pageSize, queue, listActiveTasksAsync]);\n\n usePolling(fetchData, pollInterval);\n\n if (props.error.length > 0) {\n return (\n <Alert severity=\"error\" className={classes.alert}>\n <AlertTitle>Error</AlertTitle>\n {props.error}\n </Alert>\n );\n }\n\n if (props.tasks.length === 0) {\n return (\n <Alert severity=\"info\" className={classes.alert}>\n <AlertTitle>Info</AlertTitle>\n No active tasks at this time.\n </Alert>\n );\n }\n\n const rowCount = props.tasks.length;\n const numSelected = selectedIds.length;\n return (\n <div>\n <TableActions\n showIconButtons={numSelected > 0}\n iconButtonActions={[\n {\n tooltip: \"Cancel\",\n icon: <CancelIcon />,\n onClick: handleBatchCancelClick,\n disabled: props.batchActionPending,\n },\n ]}\n menuItemActions={[\n {\n label: \"Cancel All\",\n onClick: handleCancelAllClick,\n disabled: props.allActionPending,\n },\n ]}\n />\n <TableContainer component={Paper}>\n <Table\n stickyHeader={true}\n className={classes.table}\n aria-label=\"active tasks table\"\n size=\"small\"\n >\n <TableHead>\n <TableRow>\n <TableCell\n padding=\"checkbox\"\n classes={{ stickyHeader: classes.stickyHeaderCell }}\n >\n <IconButton>\n <Checkbox\n indeterminate={numSelected > 0 && numSelected < rowCount}\n checked={rowCount > 0 && numSelected === rowCount}\n onChange={handleSelectAllClick}\n inputProps={{\n \"aria-label\": \"select all tasks shown in the table\",\n }}\n />\n </IconButton>\n </TableCell>\n {columns.map((col) => (\n <TableCell\n key={col.key}\n align={col.align}\n classes={{ stickyHeader: classes.stickyHeaderCell }}\n >\n {col.label}\n </TableCell>\n ))}\n </TableRow>\n </TableHead>\n <TableBody>\n {/* TODO: loading and empty state */}\n {props.tasks.map((task) => (\n <Row\n key={task.id}\n task={task}\n isSelected={selectedIds.includes(task.id)}\n onSelectChange={(checked: boolean) => {\n if (checked) {\n setSelectedIds(selectedIds.concat(task.id));\n } else {\n setSelectedIds(selectedIds.filter((id) => id !== task.id));\n }\n }}\n onCancelClick={() => {\n props.cancelActiveTaskAsync(queue, task.id);\n }}\n onActionCellEnter={() => setActiveTaskId(task.id)}\n onActionCellLeave={() => setActiveTaskId(\"\")}\n showActions={activeTaskId === task.id}\n />\n ))}\n </TableBody>\n <TableFooter>\n <TableRow>\n <TablePagination\n rowsPerPageOptions={rowsPerPageOptions}\n colSpan={columns.length + 1}\n count={props.tasks.length}\n rowsPerPage={pageSize}\n page={page}\n SelectProps={{\n inputProps: { \"aria-label\": \"rows per page\" },\n native: true,\n }}\n onPageChange={handlePageChange}\n onRowsPerPageChange={handleRowsPerPageChange}\n ActionsComponent={TablePaginationActions}\n className={classes.pagination}\n />\n </TableRow>\n </TableFooter>\n </Table>\n </TableContainer>\n </div>\n );\n}\n\nconst useRowStyles = makeStyles((theme) => ({\n root: {\n cursor: \"pointer\",\n \"&:hover\": {\n boxShadow: theme.shadows[2],\n },\n \"&:hover .MuiTableCell-root\": {\n borderBottomColor: theme.palette.background.paper,\n },\n },\n}));\n\ninterface RowProps {\n task: ActiveTaskExtended;\n isSelected: boolean;\n onSelectChange: (checked: boolean) => void;\n onCancelClick: () => void;\n showActions: boolean;\n onActionCellEnter: () => void;\n onActionCellLeave: () => void;\n}\n\nfunction Row(props: RowProps) {\n const { task } = props;\n const classes = useRowStyles();\n const history = useHistory();\n return (\n <TableRow\n key={task.id}\n className={classes.root}\n selected={props.isSelected}\n onClick={() => history.push(taskDetailsPath(task.queue, task.id))}\n >\n <TableCell padding=\"checkbox\" onClick={(e) => e.stopPropagation()}>\n <IconButton>\n <Checkbox\n onChange={(event: React.ChangeEvent<HTMLInputElement>) =>\n props.onSelectChange(event.target.checked)\n }\n checked={props.isSelected}\n />\n </IconButton>\n </TableCell>\n <TableCell component=\"th\" scope=\"row\">\n {uuidPrefix(task.id)}\n </TableCell>\n <TableCell>{task.type}</TableCell>\n <TableCell>\n <SyntaxHighlighter\n language=\"json\"\n customStyle={{ margin: 0, maxWidth: 400 }}\n >\n {prettifyPayload(task.payload)}\n </SyntaxHighlighter>\n </TableCell>\n <TableCell>{task.canceling ? \"Canceling\" : \"Running\"}</TableCell>\n <TableCell>\n {task.start_time === \"-\" ? \"just now\" : timeAgo(task.start_time)}\n </TableCell>\n <TableCell>\n {task.deadline === \"-\" ? \"-\" : durationBefore(task.deadline)}\n </TableCell>\n <TableCell\n align=\"center\"\n onMouseEnter={props.onActionCellEnter}\n onMouseLeave={props.onActionCellLeave}\n onClick={(e) => e.stopPropagation()}\n >\n {props.showActions ? (\n <React.Fragment>\n <Tooltip title=\"Cancel\">\n <IconButton\n onClick={props.onCancelClick}\n disabled={task.requestPending || task.canceling}\n size=\"small\"\n >\n <CancelIcon fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n </React.Fragment>\n ) : (\n <IconButton size=\"small\" onClick={props.onActionCellEnter}>\n <MoreHorizIcon fontSize=\"small\" />\n </IconButton>\n )}\n </TableCell>\n </TableRow>\n );\n}\n\nexport default connector(ActiveTasksTable);\n","import React, { useCallback, useState } from \"react\";\nimport { useHistory } from \"react-router-dom\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Table from \"@material-ui/core/Table\";\nimport TableBody from \"@material-ui/core/TableBody\";\nimport TableCell from \"@material-ui/core/TableCell\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport AlertTitle from \"@material-ui/lab/AlertTitle\";\nimport TableContainer from \"@material-ui/core/TableContainer\";\nimport TableHead from \"@material-ui/core/TableHead\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Checkbox from \"@material-ui/core/Checkbox\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport TableFooter from \"@material-ui/core/TableFooter\";\nimport TablePagination from \"@material-ui/core/TablePagination\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport ArchiveIcon from \"@material-ui/icons/Archive\";\nimport MoreHorizIcon from \"@material-ui/icons/MoreHoriz\";\nimport SyntaxHighlighter from \"./SyntaxHighlighter\";\nimport TablePaginationActions, {\n rowsPerPageOptions,\n} from \"./TablePaginationActions\";\nimport TableActions from \"./TableActions\";\nimport {\n listPendingTasksAsync,\n deletePendingTaskAsync,\n batchDeletePendingTasksAsync,\n deleteAllPendingTasksAsync,\n archivePendingTaskAsync,\n batchArchivePendingTasksAsync,\n archiveAllPendingTasksAsync,\n} from \"../actions/tasksActions\";\nimport { taskRowsPerPageChange } from \"../actions/settingsActions\";\nimport { AppState } from \"../store\";\nimport { usePolling } from \"../hooks\";\nimport { uuidPrefix, prettifyPayload } from \"../utils\";\nimport { TableColumn } from \"../types/table\";\nimport { TaskInfoExtended } from \"../reducers/tasksReducer\";\nimport { taskDetailsPath } from \"../paths\";\n\nconst useStyles = makeStyles((theme) => ({\n table: {\n minWidth: 650,\n },\n stickyHeaderCell: {\n background: theme.palette.background.paper,\n },\n alert: {\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n },\n pagination: {\n border: \"none\",\n },\n}));\n\nfunction mapStateToProps(state: AppState) {\n return {\n loading: state.tasks.pendingTasks.loading,\n error: state.tasks.pendingTasks.error,\n tasks: state.tasks.pendingTasks.data,\n batchActionPending: state.tasks.pendingTasks.batchActionPending,\n allActionPending: state.tasks.pendingTasks.allActionPending,\n pollInterval: state.settings.pollInterval,\n pageSize: state.settings.taskRowsPerPage,\n };\n}\n\nconst mapDispatchToProps = {\n listPendingTasksAsync,\n deletePendingTaskAsync,\n batchDeletePendingTasksAsync,\n deleteAllPendingTasksAsync,\n archivePendingTaskAsync,\n batchArchivePendingTasksAsync,\n archiveAllPendingTasksAsync,\n taskRowsPerPageChange,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\ntype ReduxProps = ConnectedProps<typeof connector>;\n\ninterface Props {\n queue: string;\n totalTaskCount: number; // total number of pending tasks\n}\n\nfunction PendingTasksTable(props: Props & ReduxProps) {\n const { pollInterval, listPendingTasksAsync, queue, pageSize } = props;\n const classes = useStyles();\n const [page, setPage] = useState(0);\n const [selectedIds, setSelectedIds] = useState<string[]>([]);\n const [activeTaskId, setActiveTaskId] = useState<string>(\"\");\n\n const handlePageChange = (\n event: React.MouseEvent<HTMLButtonElement> | null,\n newPage: number\n ) => {\n setPage(newPage);\n };\n\n const handleRowsPerPageChange = (\n event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>\n ) => {\n props.taskRowsPerPageChange(parseInt(event.target.value, 10));\n setPage(0);\n };\n\n const handleSelectAllClick = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (event.target.checked) {\n const newSelected = props.tasks.map((t) => t.id);\n setSelectedIds(newSelected);\n } else {\n setSelectedIds([]);\n }\n };\n\n const handleDeleteAllClick = () => {\n props.deleteAllPendingTasksAsync(queue);\n };\n\n const handleArchiveAllClick = () => {\n props.archiveAllPendingTasksAsync(queue);\n };\n\n const handleBatchDeleteClick = () => {\n props\n .batchDeletePendingTasksAsync(queue, selectedIds)\n .then(() => setSelectedIds([]));\n };\n\n const handleBatchArchiveClick = () => {\n props\n .batchArchivePendingTasksAsync(queue, selectedIds)\n .then(() => setSelectedIds([]));\n };\n\n const fetchData = useCallback(() => {\n const pageOpts = { page: page + 1, size: pageSize };\n listPendingTasksAsync(queue, pageOpts);\n }, [page, pageSize, queue, listPendingTasksAsync]);\n\n usePolling(fetchData, pollInterval);\n\n if (props.error.length > 0) {\n return (\n <Alert severity=\"error\" className={classes.alert}>\n <AlertTitle>Error</AlertTitle>\n {props.error}\n </Alert>\n );\n }\n if (props.tasks.length === 0) {\n return (\n <Alert severity=\"info\" className={classes.alert}>\n <AlertTitle>Info</AlertTitle>\n No pending tasks at this time.\n </Alert>\n );\n }\n\n const columns: TableColumn[] = [\n { key: \"id\", label: \"ID\", align: \"left\" },\n { key: \"type\", label: \"Type\", align: \"left\" },\n { key: \"paylod\", label: \"Payload\", align: \"left\" },\n { key: \"retried\", label: \"Retried\", align: \"right\" },\n { key: \"max_retry\", label: \"Max Retry\", align: \"right\" },\n { key: \"actions\", label: \"Actions\", align: \"center\" },\n ];\n\n const rowCount = props.tasks.length;\n const numSelected = selectedIds.length;\n return (\n <div>\n <TableActions\n showIconButtons={numSelected > 0}\n iconButtonActions={[\n {\n tooltip: \"Delete\",\n icon: <DeleteIcon />,\n onClick: handleBatchDeleteClick,\n disabled: props.batchActionPending,\n },\n {\n tooltip: \"Archive\",\n icon: <ArchiveIcon />,\n onClick: handleBatchArchiveClick,\n disabled: props.batchActionPending,\n },\n ]}\n menuItemActions={[\n {\n label: \"Delete All\",\n onClick: handleDeleteAllClick,\n disabled: props.allActionPending,\n },\n {\n label: \"Archive All\",\n onClick: handleArchiveAllClick,\n disabled: props.allActionPending,\n },\n ]}\n />\n <TableContainer component={Paper}>\n <Table\n stickyHeader={true}\n className={classes.table}\n aria-label=\"pending tasks table\"\n size=\"small\"\n >\n <TableHead>\n <TableRow>\n <TableCell\n padding=\"checkbox\"\n classes={{ stickyHeader: classes.stickyHeaderCell }}\n >\n <IconButton>\n <Checkbox\n indeterminate={numSelected > 0 && numSelected < rowCount}\n checked={rowCount > 0 && numSelected === rowCount}\n onChange={handleSelectAllClick}\n inputProps={{\n \"aria-label\": \"select all tasks shown in the table\",\n }}\n />\n </IconButton>\n </TableCell>\n {columns.map((col) => (\n <TableCell\n key={col.key}\n align={col.align}\n classes={{\n stickyHeader: classes.stickyHeaderCell,\n }}\n >\n {col.label}\n </TableCell>\n ))}\n </TableRow>\n </TableHead>\n <TableBody>\n {props.tasks.map((task) => (\n <Row\n key={task.id}\n task={task}\n isSelected={selectedIds.includes(task.id)}\n onSelectChange={(checked: boolean) => {\n if (checked) {\n setSelectedIds(selectedIds.concat(task.id));\n } else {\n setSelectedIds(selectedIds.filter((id) => id !== task.id));\n }\n }}\n allActionPending={props.allActionPending}\n onDeleteClick={() =>\n props.deletePendingTaskAsync(queue, task.id)\n }\n onArchiveClick={() => {\n props.archivePendingTaskAsync(queue, task.id);\n }}\n onActionCellEnter={() => setActiveTaskId(task.id)}\n onActionCellLeave={() => setActiveTaskId(\"\")}\n showActions={activeTaskId === task.id}\n />\n ))}\n </TableBody>\n <TableFooter>\n <TableRow>\n <TablePagination\n rowsPerPageOptions={rowsPerPageOptions}\n colSpan={columns.length + 1}\n count={props.totalTaskCount}\n rowsPerPage={pageSize}\n page={page}\n SelectProps={{\n inputProps: { \"aria-label\": \"rows per page\" },\n native: true,\n }}\n onPageChange={handlePageChange}\n onRowsPerPageChange={handleRowsPerPageChange}\n ActionsComponent={TablePaginationActions}\n className={classes.pagination}\n />\n </TableRow>\n </TableFooter>\n </Table>\n </TableContainer>\n </div>\n );\n}\n\nconst useRowStyles = makeStyles((theme) => ({\n root: {\n cursor: \"pointer\",\n \"&:hover\": {\n boxShadow: theme.shadows[2],\n },\n \"&:hover .MuiTableCell-root\": {\n borderBottomColor: theme.palette.background.paper,\n },\n },\n actionCell: {\n width: \"96px\",\n },\n actionButton: {\n marginLeft: 3,\n marginRight: 3,\n },\n}));\n\ninterface RowProps {\n task: TaskInfoExtended;\n isSelected: boolean;\n onSelectChange: (checked: boolean) => void;\n onDeleteClick: () => void;\n onArchiveClick: () => void;\n allActionPending: boolean;\n showActions: boolean;\n onActionCellEnter: () => void;\n onActionCellLeave: () => void;\n}\n\nfunction Row(props: RowProps) {\n const { task } = props;\n const classes = useRowStyles();\n const history = useHistory();\n return (\n <TableRow\n key={task.id}\n className={classes.root}\n selected={props.isSelected}\n onClick={() => history.push(taskDetailsPath(task.queue, task.id))}\n >\n <TableCell padding=\"checkbox\" onClick={(e) => e.stopPropagation()}>\n <IconButton>\n <Checkbox\n onChange={(event: React.ChangeEvent<HTMLInputElement>) =>\n props.onSelectChange(event.target.checked)\n }\n checked={props.isSelected}\n />\n </IconButton>\n </TableCell>\n <TableCell component=\"th\" scope=\"row\">\n {uuidPrefix(task.id)}\n </TableCell>\n <TableCell>{task.type}</TableCell>\n <TableCell>\n <SyntaxHighlighter\n language=\"json\"\n customStyle={{ margin: 0, maxWidth: 400 }}\n >\n {prettifyPayload(task.payload)}\n </SyntaxHighlighter>\n </TableCell>\n <TableCell align=\"right\">{task.retried}</TableCell>\n <TableCell align=\"right\">{task.max_retry}</TableCell>\n <TableCell\n align=\"center\"\n className={classes.actionCell}\n onMouseEnter={props.onActionCellEnter}\n onMouseLeave={props.onActionCellLeave}\n onClick={(e) => e.stopPropagation()}\n >\n {props.showActions ? (\n <React.Fragment>\n <Tooltip title=\"Delete\">\n <IconButton\n onClick={props.onDeleteClick}\n disabled={task.requestPending || props.allActionPending}\n size=\"small\"\n className={classes.actionButton}\n >\n <DeleteIcon fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n <Tooltip title=\"Archive\">\n <IconButton\n onClick={props.onArchiveClick}\n disabled={task.requestPending || props.allActionPending}\n size=\"small\"\n className={classes.actionButton}\n >\n <ArchiveIcon fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n </React.Fragment>\n ) : (\n <IconButton size=\"small\" onClick={props.onActionCellEnter}>\n <MoreHorizIcon fontSize=\"small\" />\n </IconButton>\n )}\n </TableCell>\n </TableRow>\n );\n}\n\nexport default connector(PendingTasksTable);\n","import React, { useState, useCallback } from \"react\";\nimport { useHistory } from \"react-router-dom\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Table from \"@material-ui/core/Table\";\nimport TableBody from \"@material-ui/core/TableBody\";\nimport TableCell from \"@material-ui/core/TableCell\";\nimport TableContainer from \"@material-ui/core/TableContainer\";\nimport TableHead from \"@material-ui/core/TableHead\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport TableFooter from \"@material-ui/core/TableFooter\";\nimport TablePagination from \"@material-ui/core/TablePagination\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport Checkbox from \"@material-ui/core/Checkbox\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport PlayArrowIcon from \"@material-ui/icons/PlayArrow\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport ArchiveIcon from \"@material-ui/icons/Archive\";\nimport MoreHorizIcon from \"@material-ui/icons/MoreHoriz\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport AlertTitle from \"@material-ui/lab/AlertTitle\";\nimport SyntaxHighlighter from \"./SyntaxHighlighter\";\nimport {\n batchDeleteScheduledTasksAsync,\n batchRunScheduledTasksAsync,\n batchArchiveScheduledTasksAsync,\n deleteAllScheduledTasksAsync,\n runAllScheduledTasksAsync,\n archiveAllScheduledTasksAsync,\n listScheduledTasksAsync,\n deleteScheduledTaskAsync,\n runScheduledTaskAsync,\n archiveScheduledTaskAsync,\n} from \"../actions/tasksActions\";\nimport { taskRowsPerPageChange } from \"../actions/settingsActions\";\nimport { AppState } from \"../store\";\nimport TablePaginationActions, {\n rowsPerPageOptions,\n} from \"./TablePaginationActions\";\nimport TableActions from \"./TableActions\";\nimport { durationBefore, uuidPrefix, prettifyPayload } from \"../utils\";\nimport { usePolling } from \"../hooks\";\nimport { TaskInfoExtended } from \"../reducers/tasksReducer\";\nimport { TableColumn } from \"../types/table\";\nimport { taskDetailsPath } from \"../paths\";\n\nconst useStyles = makeStyles((theme) => ({\n table: {\n minWidth: 650,\n },\n stickyHeaderCell: {\n background: theme.palette.background.paper,\n },\n alert: {\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n },\n pagination: {\n border: \"none\",\n },\n}));\n\nfunction mapStateToProps(state: AppState) {\n return {\n loading: state.tasks.scheduledTasks.loading,\n error: state.tasks.scheduledTasks.error,\n tasks: state.tasks.scheduledTasks.data,\n batchActionPending: state.tasks.scheduledTasks.batchActionPending,\n allActionPending: state.tasks.scheduledTasks.allActionPending,\n pollInterval: state.settings.pollInterval,\n pageSize: state.settings.taskRowsPerPage,\n };\n}\n\nconst mapDispatchToProps = {\n listScheduledTasksAsync,\n batchDeleteScheduledTasksAsync,\n batchRunScheduledTasksAsync,\n batchArchiveScheduledTasksAsync,\n deleteAllScheduledTasksAsync,\n runAllScheduledTasksAsync,\n archiveAllScheduledTasksAsync,\n deleteScheduledTaskAsync,\n runScheduledTaskAsync,\n archiveScheduledTaskAsync,\n taskRowsPerPageChange,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\ntype ReduxProps = ConnectedProps<typeof connector>;\n\ninterface Props {\n queue: string; // name of the queue.\n totalTaskCount: number; // totoal number of scheduled tasks.\n}\n\nfunction ScheduledTasksTable(props: Props & ReduxProps) {\n const { pollInterval, listScheduledTasksAsync, queue, pageSize } = props;\n const classes = useStyles();\n const [page, setPage] = useState(0);\n const [selectedIds, setSelectedIds] = useState<string[]>([]);\n const [activeTaskId, setActiveTaskId] = useState<string>(\"\");\n\n const handlePageChange = (\n event: React.MouseEvent<HTMLButtonElement> | null,\n newPage: number\n ) => {\n setPage(newPage);\n };\n\n const handleRowsPerPageChange = (\n event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>\n ) => {\n props.taskRowsPerPageChange(parseInt(event.target.value, 10));\n setPage(0);\n };\n\n const handleSelectAllClick = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (event.target.checked) {\n const newSelected = props.tasks.map((t) => t.id);\n setSelectedIds(newSelected);\n } else {\n setSelectedIds([]);\n }\n };\n\n const handleRunAllClick = () => {\n props.runAllScheduledTasksAsync(queue);\n };\n\n const handleDeleteAllClick = () => {\n props.deleteAllScheduledTasksAsync(queue);\n };\n\n const handleArchiveAllClick = () => {\n props.archiveAllScheduledTasksAsync(queue);\n };\n\n const handleBatchRunClick = () => {\n props\n .batchRunScheduledTasksAsync(queue, selectedIds)\n .then(() => setSelectedIds([]));\n };\n\n const handleBatchDeleteClick = () => {\n props\n .batchDeleteScheduledTasksAsync(queue, selectedIds)\n .then(() => setSelectedIds([]));\n };\n\n const handleBatchArchiveClick = () => {\n props\n .batchArchiveScheduledTasksAsync(queue, selectedIds)\n .then(() => setSelectedIds([]));\n };\n\n const fetchData = useCallback(() => {\n const pageOpts = { page: page + 1, size: pageSize };\n listScheduledTasksAsync(queue, pageOpts);\n }, [page, pageSize, queue, listScheduledTasksAsync]);\n\n usePolling(fetchData, pollInterval);\n\n if (props.error.length > 0) {\n return (\n <Alert severity=\"error\" className={classes.alert}>\n <AlertTitle>Error</AlertTitle>\n {props.error}\n </Alert>\n );\n }\n if (props.tasks.length === 0) {\n return (\n <Alert severity=\"info\" className={classes.alert}>\n <AlertTitle>Info</AlertTitle>\n No scheduled tasks at this time.\n </Alert>\n );\n }\n\n const columns: TableColumn[] = [\n { key: \"id\", label: \"ID\", align: \"left\" },\n { key: \"type\", label: \"Type\", align: \"left\" },\n { key: \"payload\", label: \"Payload\", align: \"left\" },\n { key: \"process_in\", label: \"Process In\", align: \"left\" },\n { key: \"actions\", label: \"Actions\", align: \"center\" },\n ];\n\n const rowCount = props.tasks.length;\n const numSelected = selectedIds.length;\n return (\n <div>\n <TableActions\n showIconButtons={numSelected > 0}\n iconButtonActions={[\n {\n tooltip: \"Delete\",\n icon: <DeleteIcon />,\n onClick: handleBatchDeleteClick,\n disabled: props.batchActionPending,\n },\n {\n tooltip: \"Archive\",\n icon: <ArchiveIcon />,\n onClick: handleBatchArchiveClick,\n disabled: props.batchActionPending,\n },\n {\n tooltip: \"Run\",\n icon: <PlayArrowIcon />,\n onClick: handleBatchRunClick,\n disabled: props.batchActionPending,\n },\n ]}\n menuItemActions={[\n {\n label: \"Delete All\",\n onClick: handleDeleteAllClick,\n disabled: props.allActionPending,\n },\n {\n label: \"Archive All\",\n onClick: handleArchiveAllClick,\n disabled: props.allActionPending,\n },\n {\n label: \"Run All\",\n onClick: handleRunAllClick,\n disabled: props.allActionPending,\n },\n ]}\n />\n <TableContainer component={Paper}>\n <Table\n stickyHeader={true}\n className={classes.table}\n aria-label=\"scheduled tasks table\"\n size=\"small\"\n >\n <TableHead>\n <TableRow>\n <TableCell\n padding=\"checkbox\"\n classes={{ stickyHeader: classes.stickyHeaderCell }}\n >\n <IconButton>\n <Checkbox\n indeterminate={numSelected > 0 && numSelected < rowCount}\n checked={rowCount > 0 && numSelected === rowCount}\n onChange={handleSelectAllClick}\n inputProps={{\n \"aria-label\": \"select all tasks shown in the table\",\n }}\n />\n </IconButton>\n </TableCell>\n {columns.map((col) => (\n <TableCell\n key={col.label}\n align={col.align}\n classes={{ stickyHeader: classes.stickyHeaderCell }}\n >\n {col.label}\n </TableCell>\n ))}\n </TableRow>\n </TableHead>\n <TableBody>\n {props.tasks.map((task) => (\n <Row\n key={task.id}\n task={task}\n allActionPending={props.allActionPending}\n isSelected={selectedIds.includes(task.id)}\n onSelectChange={(checked: boolean) => {\n if (checked) {\n setSelectedIds(selectedIds.concat(task.id));\n } else {\n setSelectedIds(selectedIds.filter((id) => id !== task.id));\n }\n }}\n onRunClick={() => {\n props.runScheduledTaskAsync(queue, task.id);\n }}\n onDeleteClick={() => {\n props.deleteScheduledTaskAsync(queue, task.id);\n }}\n onArchiveClick={() => {\n props.archiveScheduledTaskAsync(queue, task.id);\n }}\n onActionCellEnter={() => setActiveTaskId(task.id)}\n onActionCellLeave={() => setActiveTaskId(\"\")}\n showActions={activeTaskId === task.id}\n />\n ))}\n </TableBody>\n <TableFooter>\n <TableRow>\n <TablePagination\n rowsPerPageOptions={rowsPerPageOptions}\n colSpan={columns.length + 1}\n count={props.totalTaskCount}\n rowsPerPage={pageSize}\n page={page}\n SelectProps={{\n inputProps: { \"aria-label\": \"rows per page\" },\n native: true,\n }}\n onPageChange={handlePageChange}\n onRowsPerPageChange={handleRowsPerPageChange}\n ActionsComponent={TablePaginationActions}\n className={classes.pagination}\n />\n </TableRow>\n </TableFooter>\n </Table>\n </TableContainer>\n </div>\n );\n}\n\nconst useRowStyles = makeStyles((theme) => ({\n root: {\n cursor: \"pointer\",\n \"&:hover\": {\n boxShadow: theme.shadows[2],\n },\n \"&:hover .MuiTableCell-root\": {\n borderBottomColor: theme.palette.background.paper,\n },\n },\n actionCell: {\n width: \"140px\",\n },\n actionButton: {\n marginLeft: 3,\n marginRight: 3,\n },\n}));\n\ninterface RowProps {\n task: TaskInfoExtended;\n isSelected: boolean;\n onSelectChange: (checked: boolean) => void;\n onRunClick: () => void;\n onDeleteClick: () => void;\n onArchiveClick: () => void;\n allActionPending: boolean;\n showActions: boolean;\n onActionCellEnter: () => void;\n onActionCellLeave: () => void;\n}\n\nfunction Row(props: RowProps) {\n const { task } = props;\n const classes = useRowStyles();\n const history = useHistory();\n return (\n <TableRow\n key={task.id}\n className={classes.root}\n selected={props.isSelected}\n onClick={() => history.push(taskDetailsPath(task.queue, task.id))}\n >\n <TableCell padding=\"checkbox\" onClick={(e) => e.stopPropagation()}>\n <IconButton>\n <Checkbox\n onChange={(event: React.ChangeEvent<HTMLInputElement>) =>\n props.onSelectChange(event.target.checked)\n }\n checked={props.isSelected}\n />\n </IconButton>\n </TableCell>\n <TableCell component=\"th\" scope=\"row\">\n {uuidPrefix(task.id)}\n </TableCell>\n <TableCell>{task.type}</TableCell>\n <TableCell>\n <SyntaxHighlighter\n language=\"json\"\n customStyle={{ margin: 0, maxWidth: 400 }}\n >\n {prettifyPayload(task.payload)}\n </SyntaxHighlighter>\n </TableCell>\n <TableCell>{durationBefore(task.next_process_at)}</TableCell>\n <TableCell\n align=\"center\"\n className={classes.actionCell}\n onMouseEnter={props.onActionCellEnter}\n onMouseLeave={props.onActionCellLeave}\n onClick={(e) => e.stopPropagation()}\n >\n {props.showActions ? (\n <React.Fragment>\n <Tooltip title=\"Delete\">\n <IconButton\n onClick={props.onDeleteClick}\n disabled={task.requestPending || props.allActionPending}\n size=\"small\"\n className={classes.actionButton}\n >\n <DeleteIcon fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n <Tooltip title=\"Archive\">\n <IconButton\n onClick={props.onArchiveClick}\n disabled={task.requestPending || props.allActionPending}\n size=\"small\"\n className={classes.actionButton}\n >\n <ArchiveIcon fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n <Tooltip title=\"Run\">\n <IconButton\n onClick={props.onRunClick}\n disabled={task.requestPending || props.allActionPending}\n size=\"small\"\n className={classes.actionButton}\n >\n <PlayArrowIcon fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n </React.Fragment>\n ) : (\n <IconButton size=\"small\" onClick={props.onActionCellEnter}>\n <MoreHorizIcon fontSize=\"small\" />\n </IconButton>\n )}\n </TableCell>\n </TableRow>\n );\n}\nexport default connector(ScheduledTasksTable);\n","import React, { useCallback, useState } from \"react\";\nimport { useHistory } from \"react-router-dom\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Table from \"@material-ui/core/Table\";\nimport TableBody from \"@material-ui/core/TableBody\";\nimport TableCell from \"@material-ui/core/TableCell\";\nimport TableContainer from \"@material-ui/core/TableContainer\";\nimport TableHead from \"@material-ui/core/TableHead\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport TableFooter from \"@material-ui/core/TableFooter\";\nimport TablePagination from \"@material-ui/core/TablePagination\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport Checkbox from \"@material-ui/core/Checkbox\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport PlayArrowIcon from \"@material-ui/icons/PlayArrow\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport ArchiveIcon from \"@material-ui/icons/Archive\";\nimport MoreHorizIcon from \"@material-ui/icons/MoreHoriz\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport AlertTitle from \"@material-ui/lab/AlertTitle\";\nimport SyntaxHighlighter from \"./SyntaxHighlighter\";\nimport {\n batchDeleteRetryTasksAsync,\n batchRunRetryTasksAsync,\n batchArchiveRetryTasksAsync,\n deleteAllRetryTasksAsync,\n runAllRetryTasksAsync,\n archiveAllRetryTasksAsync,\n listRetryTasksAsync,\n deleteRetryTaskAsync,\n runRetryTaskAsync,\n archiveRetryTaskAsync,\n} from \"../actions/tasksActions\";\nimport { AppState } from \"../store\";\nimport TablePaginationActions, {\n rowsPerPageOptions,\n} from \"./TablePaginationActions\";\nimport { taskRowsPerPageChange } from \"../actions/settingsActions\";\nimport TableActions from \"./TableActions\";\nimport { durationBefore, uuidPrefix, prettifyPayload } from \"../utils\";\nimport { usePolling } from \"../hooks\";\nimport { TaskInfoExtended } from \"../reducers/tasksReducer\";\nimport { TableColumn } from \"../types/table\";\nimport { taskDetailsPath } from \"../paths\";\n\nconst useStyles = makeStyles((theme) => ({\n table: {\n minWidth: 650,\n },\n stickyHeaderCell: {\n background: theme.palette.background.paper,\n },\n alert: {\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n },\n pagination: {\n border: \"none\",\n },\n}));\n\nfunction mapStateToProps(state: AppState) {\n return {\n loading: state.tasks.retryTasks.loading,\n error: state.tasks.retryTasks.error,\n tasks: state.tasks.retryTasks.data,\n batchActionPending: state.tasks.retryTasks.batchActionPending,\n allActionPending: state.tasks.retryTasks.allActionPending,\n pollInterval: state.settings.pollInterval,\n pageSize: state.settings.taskRowsPerPage,\n };\n}\n\nconst mapDispatchToProps = {\n batchDeleteRetryTasksAsync,\n batchRunRetryTasksAsync,\n batchArchiveRetryTasksAsync,\n deleteAllRetryTasksAsync,\n runAllRetryTasksAsync,\n archiveAllRetryTasksAsync,\n listRetryTasksAsync,\n deleteRetryTaskAsync,\n runRetryTaskAsync,\n archiveRetryTaskAsync,\n taskRowsPerPageChange,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\ntype ReduxProps = ConnectedProps<typeof connector>;\n\ninterface Props {\n queue: string; // name of the queue.\n totalTaskCount: number; // totoal number of scheduled tasks.\n}\n\nfunction RetryTasksTable(props: Props & ReduxProps) {\n const { pollInterval, listRetryTasksAsync, queue, pageSize } = props;\n const classes = useStyles();\n const [page, setPage] = useState(0);\n const [selectedIds, setSelectedIds] = useState<string[]>([]);\n const [activeTaskId, setActiveTaskId] = useState<string>(\"\");\n\n const handlePageChange = (\n event: React.MouseEvent<HTMLButtonElement> | null,\n newPage: number\n ) => {\n setPage(newPage);\n };\n\n const handleRowsPerPageChange = (\n event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>\n ) => {\n props.taskRowsPerPageChange(parseInt(event.target.value, 10));\n setPage(0);\n };\n\n const handleSelectAllClick = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (event.target.checked) {\n const newSelected = props.tasks.map((t) => t.id);\n setSelectedIds(newSelected);\n } else {\n setSelectedIds([]);\n }\n };\n\n const handleRunAllClick = () => {\n props.runAllRetryTasksAsync(queue);\n };\n\n const handleDeleteAllClick = () => {\n props.deleteAllRetryTasksAsync(queue);\n };\n\n const handleArchiveAllClick = () => {\n props.archiveAllRetryTasksAsync(queue);\n };\n\n const handleBatchRunClick = () => {\n props\n .batchRunRetryTasksAsync(queue, selectedIds)\n .then(() => setSelectedIds([]));\n };\n\n const handleBatchDeleteClick = () => {\n props\n .batchDeleteRetryTasksAsync(queue, selectedIds)\n .then(() => setSelectedIds([]));\n };\n\n const handleBatchArchiveClick = () => {\n props\n .batchArchiveRetryTasksAsync(queue, selectedIds)\n .then(() => setSelectedIds([]));\n };\n\n const fetchData = useCallback(() => {\n const pageOpts = { page: page + 1, size: pageSize };\n listRetryTasksAsync(queue, pageOpts);\n }, [page, pageSize, queue, listRetryTasksAsync]);\n\n usePolling(fetchData, pollInterval);\n\n if (props.error.length > 0) {\n return (\n <Alert severity=\"error\" className={classes.alert}>\n <AlertTitle>Error</AlertTitle>\n {props.error}\n </Alert>\n );\n }\n if (props.tasks.length === 0) {\n return (\n <Alert severity=\"info\" className={classes.alert}>\n <AlertTitle>Info</AlertTitle>\n No retry tasks at this time.\n </Alert>\n );\n }\n\n const columns: TableColumn[] = [\n { key: \"id\", label: \"ID\", align: \"left\" },\n { key: \"type\", label: \"Type\", align: \"left\" },\n { key: \"payload\", label: \"Payload\", align: \"left\" },\n { key: \"retry_in\", label: \"Retry In\", align: \"left\" },\n { key: \"last_error\", label: \"Last Error\", align: \"left\" },\n { key: \"retried\", label: \"Retried\", align: \"right\" },\n { key: \"max_retry\", label: \"Max Retry\", align: \"right\" },\n { key: \"actions\", label: \"Actions\", align: \"center\" },\n ];\n\n const rowCount = props.tasks.length;\n const numSelected = selectedIds.length;\n return (\n <div>\n <TableActions\n showIconButtons={numSelected > 0}\n iconButtonActions={[\n {\n tooltip: \"Delete\",\n icon: <DeleteIcon />,\n onClick: handleBatchDeleteClick,\n disabled: props.batchActionPending,\n },\n {\n tooltip: \"Archive\",\n icon: <ArchiveIcon />,\n onClick: handleBatchArchiveClick,\n disabled: props.batchActionPending,\n },\n {\n tooltip: \"Run\",\n icon: <PlayArrowIcon />,\n onClick: handleBatchRunClick,\n disabled: props.batchActionPending,\n },\n ]}\n menuItemActions={[\n {\n label: \"Delete All\",\n onClick: handleDeleteAllClick,\n disabled: props.allActionPending,\n },\n {\n label: \"Archive All\",\n onClick: handleArchiveAllClick,\n disabled: props.allActionPending,\n },\n {\n label: \"Run All\",\n onClick: handleRunAllClick,\n disabled: props.allActionPending,\n },\n ]}\n />\n <TableContainer component={Paper}>\n <Table\n stickyHeader={true}\n className={classes.table}\n aria-label=\"retry tasks table\"\n size=\"small\"\n >\n <TableHead>\n <TableRow>\n <TableCell\n padding=\"checkbox\"\n classes={{ stickyHeader: classes.stickyHeaderCell }}\n >\n <IconButton>\n <Checkbox\n indeterminate={numSelected > 0 && numSelected < rowCount}\n checked={rowCount > 0 && numSelected === rowCount}\n onChange={handleSelectAllClick}\n inputProps={{\n \"aria-label\": \"select all tasks shown in the table\",\n }}\n />\n </IconButton>\n </TableCell>\n {columns.map((col) => (\n <TableCell\n key={col.label}\n align={col.align}\n classes={{ stickyHeader: classes.stickyHeaderCell }}\n >\n {col.label}\n </TableCell>\n ))}\n </TableRow>\n </TableHead>\n <TableBody>\n {props.tasks.map((task) => (\n <Row\n key={task.id}\n task={task}\n allActionPending={props.allActionPending}\n isSelected={selectedIds.includes(task.id)}\n onSelectChange={(checked: boolean) => {\n if (checked) {\n setSelectedIds(selectedIds.concat(task.id));\n } else {\n setSelectedIds(selectedIds.filter((id) => id !== task.id));\n }\n }}\n onRunClick={() => {\n props.runRetryTaskAsync(task.queue, task.id);\n }}\n onDeleteClick={() => {\n props.deleteRetryTaskAsync(task.queue, task.id);\n }}\n onArchiveClick={() => {\n props.archiveRetryTaskAsync(task.queue, task.id);\n }}\n onActionCellEnter={() => setActiveTaskId(task.id)}\n onActionCellLeave={() => setActiveTaskId(\"\")}\n showActions={activeTaskId === task.id}\n />\n ))}\n </TableBody>\n <TableFooter>\n <TableRow>\n <TablePagination\n rowsPerPageOptions={rowsPerPageOptions}\n colSpan={columns.length + 1}\n count={props.totalTaskCount}\n rowsPerPage={pageSize}\n page={page}\n SelectProps={{\n inputProps: { \"aria-label\": \"rows per page\" },\n native: true,\n }}\n onPageChange={handlePageChange}\n onRowsPerPageChange={handleRowsPerPageChange}\n ActionsComponent={TablePaginationActions}\n className={classes.pagination}\n />\n </TableRow>\n </TableFooter>\n </Table>\n </TableContainer>\n </div>\n );\n}\n\nconst useRowStyles = makeStyles((theme) => ({\n root: {\n cursor: \"pointer\",\n \"&:hover\": {\n boxShadow: theme.shadows[2],\n },\n \"&:hover .MuiTableCell-root\": {\n borderBottomColor: theme.palette.background.paper,\n },\n },\n actionCell: {\n width: \"140px\",\n },\n actionButton: {\n marginLeft: 3,\n marginRight: 3,\n },\n}));\n\ninterface RowProps {\n task: TaskInfoExtended;\n isSelected: boolean;\n onSelectChange: (checked: boolean) => void;\n onDeleteClick: () => void;\n onRunClick: () => void;\n onArchiveClick: () => void;\n allActionPending: boolean;\n showActions: boolean;\n onActionCellEnter: () => void;\n onActionCellLeave: () => void;\n}\n\nfunction Row(props: RowProps) {\n const { task } = props;\n const classes = useRowStyles();\n const history = useHistory();\n\n return (\n <TableRow\n key={task.id}\n className={classes.root}\n selected={props.isSelected}\n onClick={() => history.push(taskDetailsPath(task.queue, task.id))}\n >\n <TableCell padding=\"checkbox\" onClick={(e) => e.stopPropagation()}>\n <IconButton>\n <Checkbox\n onChange={(event: React.ChangeEvent<HTMLInputElement>) =>\n props.onSelectChange(event.target.checked)\n }\n checked={props.isSelected}\n />\n </IconButton>\n </TableCell>\n <TableCell component=\"th\" scope=\"row\">\n {uuidPrefix(task.id)}\n </TableCell>\n <TableCell>{task.type}</TableCell>\n <TableCell>\n <SyntaxHighlighter\n language=\"json\"\n customStyle={{ margin: 0, maxWidth: 400 }}\n >\n {prettifyPayload(task.payload)}\n </SyntaxHighlighter>\n </TableCell>\n <TableCell>{durationBefore(task.next_process_at)}</TableCell>\n <TableCell>{task.error_message}</TableCell>\n <TableCell align=\"right\">{task.retried}</TableCell>\n <TableCell align=\"right\">{task.max_retry}</TableCell>\n <TableCell\n align=\"center\"\n className={classes.actionCell}\n onMouseEnter={props.onActionCellEnter}\n onMouseLeave={props.onActionCellLeave}\n onClick={(e) => e.stopPropagation()}\n >\n {props.showActions ? (\n <React.Fragment>\n <Tooltip title=\"Delete\">\n <IconButton\n onClick={props.onDeleteClick}\n disabled={task.requestPending || props.allActionPending}\n size=\"small\"\n className={classes.actionButton}\n >\n <DeleteIcon fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n <Tooltip title=\"Archive\">\n <IconButton\n onClick={props.onArchiveClick}\n disabled={task.requestPending || props.allActionPending}\n size=\"small\"\n className={classes.actionButton}\n >\n <ArchiveIcon fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n <Tooltip title=\"Run\">\n <IconButton\n onClick={props.onRunClick}\n disabled={task.requestPending || props.allActionPending}\n size=\"small\"\n className={classes.actionButton}\n >\n <PlayArrowIcon fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n </React.Fragment>\n ) : (\n <IconButton size=\"small\" onClick={props.onActionCellEnter}>\n <MoreHorizIcon fontSize=\"small\" />\n </IconButton>\n )}\n </TableCell>\n </TableRow>\n );\n}\n\nexport default connector(RetryTasksTable);\n","import React, { useCallback, useState } from \"react\";\nimport { useHistory } from \"react-router-dom\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Table from \"@material-ui/core/Table\";\nimport TableBody from \"@material-ui/core/TableBody\";\nimport TableCell from \"@material-ui/core/TableCell\";\nimport Checkbox from \"@material-ui/core/Checkbox\";\nimport TableContainer from \"@material-ui/core/TableContainer\";\nimport TableHead from \"@material-ui/core/TableHead\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport Paper from \"@material-ui/core/Paper\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport PlayArrowIcon from \"@material-ui/icons/PlayArrow\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport MoreHorizIcon from \"@material-ui/icons/MoreHoriz\";\nimport TableFooter from \"@material-ui/core/TableFooter\";\nimport TablePagination from \"@material-ui/core/TablePagination\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport AlertTitle from \"@material-ui/lab/AlertTitle\";\nimport SyntaxHighlighter from \"./SyntaxHighlighter\";\nimport { AppState } from \"../store\";\nimport {\n batchDeleteArchivedTasksAsync,\n batchRunArchivedTasksAsync,\n deleteArchivedTaskAsync,\n deleteAllArchivedTasksAsync,\n listArchivedTasksAsync,\n runArchivedTaskAsync,\n runAllArchivedTasksAsync,\n} from \"../actions/tasksActions\";\nimport TablePaginationActions, {\n rowsPerPageOptions,\n} from \"./TablePaginationActions\";\nimport { taskRowsPerPageChange } from \"../actions/settingsActions\";\nimport TableActions from \"./TableActions\";\nimport { timeAgo, uuidPrefix, prettifyPayload } from \"../utils\";\nimport { usePolling } from \"../hooks\";\nimport { TaskInfoExtended } from \"../reducers/tasksReducer\";\nimport { TableColumn } from \"../types/table\";\nimport { taskDetailsPath } from \"../paths\";\n\nconst useStyles = makeStyles((theme) => ({\n table: {\n minWidth: 650,\n },\n stickyHeaderCell: {\n background: theme.palette.background.paper,\n },\n alert: {\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n },\n pagination: {\n border: \"none\",\n },\n}));\n\nfunction mapStateToProps(state: AppState) {\n return {\n loading: state.tasks.archivedTasks.loading,\n error: state.tasks.archivedTasks.error,\n tasks: state.tasks.archivedTasks.data,\n batchActionPending: state.tasks.archivedTasks.batchActionPending,\n allActionPending: state.tasks.archivedTasks.allActionPending,\n pollInterval: state.settings.pollInterval,\n pageSize: state.settings.taskRowsPerPage,\n };\n}\n\nconst mapDispatchToProps = {\n listArchivedTasksAsync,\n runArchivedTaskAsync,\n runAllArchivedTasksAsync,\n deleteArchivedTaskAsync,\n deleteAllArchivedTasksAsync,\n batchRunArchivedTasksAsync,\n batchDeleteArchivedTasksAsync,\n taskRowsPerPageChange,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\ntype ReduxProps = ConnectedProps<typeof connector>;\n\ninterface Props {\n queue: string; // name of the queue.\n totalTaskCount: number; // totoal number of archived tasks.\n}\n\nfunction ArchivedTasksTable(props: Props & ReduxProps) {\n const { pollInterval, listArchivedTasksAsync, queue, pageSize } = props;\n const classes = useStyles();\n const [page, setPage] = useState(0);\n const [selectedIds, setSelectedIds] = useState<string[]>([]);\n const [activeTaskId, setActiveTaskId] = useState<string>(\"\");\n\n const handlePageChange = (\n event: React.MouseEvent<HTMLButtonElement> | null,\n newPage: number\n ) => {\n setPage(newPage);\n };\n\n const handleRowsPerPageChange = (\n event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>\n ) => {\n props.taskRowsPerPageChange(parseInt(event.target.value, 10));\n setPage(0);\n };\n\n const handleSelectAllClick = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (event.target.checked) {\n const newSelected = props.tasks.map((t) => t.id);\n setSelectedIds(newSelected);\n } else {\n setSelectedIds([]);\n }\n };\n\n const handleRunAllClick = () => {\n props.runAllArchivedTasksAsync(queue);\n };\n\n const handleDeleteAllClick = () => {\n props.deleteAllArchivedTasksAsync(queue);\n };\n\n const handleBatchRunClick = () => {\n props\n .batchRunArchivedTasksAsync(queue, selectedIds)\n .then(() => setSelectedIds([]));\n };\n\n const handleBatchDeleteClick = () => {\n props\n .batchDeleteArchivedTasksAsync(queue, selectedIds)\n .then(() => setSelectedIds([]));\n };\n\n const fetchData = useCallback(() => {\n const pageOpts = { page: page + 1, size: pageSize };\n listArchivedTasksAsync(queue, pageOpts);\n }, [page, pageSize, queue, listArchivedTasksAsync]);\n\n usePolling(fetchData, pollInterval);\n\n if (props.error.length > 0) {\n return (\n <Alert severity=\"error\" className={classes.alert}>\n <AlertTitle>Error</AlertTitle>\n {props.error}\n </Alert>\n );\n }\n if (props.tasks.length === 0) {\n return (\n <Alert severity=\"info\" className={classes.alert}>\n <AlertTitle>Info</AlertTitle>\n No archived tasks at this time.\n </Alert>\n );\n }\n\n const columns: TableColumn[] = [\n { key: \"id\", label: \"ID\", align: \"left\" },\n { key: \"type\", label: \"Type\", align: \"left\" },\n { key: \"payload\", label: \"Payload\", align: \"left\" },\n { key: \"last_failed\", label: \"Last Failed\", align: \"left\" },\n { key: \"last_error\", label: \"Last Error\", align: \"left\" },\n { key: \"actions\", label: \"Actions\", align: \"center\" },\n ];\n\n const rowCount = props.tasks.length;\n const numSelected = selectedIds.length;\n return (\n <div>\n <TableActions\n showIconButtons={numSelected > 0}\n iconButtonActions={[\n {\n tooltip: \"Delete\",\n icon: <DeleteIcon />,\n onClick: handleBatchDeleteClick,\n disabled: props.batchActionPending,\n },\n {\n tooltip: \"Run\",\n icon: <PlayArrowIcon />,\n onClick: handleBatchRunClick,\n disabled: props.batchActionPending,\n },\n ]}\n menuItemActions={[\n {\n label: \"Delete All\",\n onClick: handleDeleteAllClick,\n disabled: props.allActionPending,\n },\n {\n label: \"Run All\",\n onClick: handleRunAllClick,\n disabled: props.allActionPending,\n },\n ]}\n />\n <TableContainer component={Paper}>\n <Table\n stickyHeader={true}\n className={classes.table}\n aria-label=\"archived tasks table\"\n size=\"small\"\n >\n <TableHead>\n <TableRow>\n <TableCell\n padding=\"checkbox\"\n classes={{ stickyHeader: classes.stickyHeaderCell }}\n >\n <IconButton>\n <Checkbox\n indeterminate={numSelected > 0 && numSelected < rowCount}\n checked={rowCount > 0 && numSelected === rowCount}\n onChange={handleSelectAllClick}\n inputProps={{\n \"aria-label\": \"select all tasks shown in the table\",\n }}\n />\n </IconButton>\n </TableCell>\n {columns.map((col) => (\n <TableCell\n key={col.key}\n align={col.align}\n classes={{ stickyHeader: classes.stickyHeaderCell }}\n >\n {col.label}\n </TableCell>\n ))}\n </TableRow>\n </TableHead>\n <TableBody>\n {props.tasks.map((task) => (\n <Row\n key={task.id}\n task={task}\n isSelected={selectedIds.includes(task.id)}\n onSelectChange={(checked: boolean) => {\n if (checked) {\n setSelectedIds(selectedIds.concat(task.id));\n } else {\n setSelectedIds(selectedIds.filter((id) => id !== task.id));\n }\n }}\n onRunClick={() => {\n props.runArchivedTaskAsync(queue, task.id);\n }}\n onDeleteClick={() => {\n props.deleteArchivedTaskAsync(queue, task.id);\n }}\n allActionPending={props.allActionPending}\n onActionCellEnter={() => setActiveTaskId(task.id)}\n onActionCellLeave={() => setActiveTaskId(\"\")}\n showActions={activeTaskId === task.id}\n />\n ))}\n </TableBody>\n <TableFooter>\n <TableRow>\n <TablePagination\n rowsPerPageOptions={rowsPerPageOptions}\n colSpan={columns.length + 1}\n count={props.totalTaskCount}\n rowsPerPage={pageSize}\n page={page}\n SelectProps={{\n inputProps: { \"aria-label\": \"rows per page\" },\n native: true,\n }}\n onPageChange={handlePageChange}\n onRowsPerPageChange={handleRowsPerPageChange}\n ActionsComponent={TablePaginationActions}\n className={classes.pagination}\n />\n </TableRow>\n </TableFooter>\n </Table>\n </TableContainer>\n </div>\n );\n}\n\nconst useRowStyles = makeStyles((theme) => ({\n root: {\n cursor: \"pointer\",\n \"&:hover\": {\n boxShadow: theme.shadows[2],\n },\n \"&:hover .MuiTableCell-root\": {\n borderBottomColor: theme.palette.background.paper,\n },\n },\n actionCell: {\n width: \"96px\",\n },\n actionButton: {\n marginLeft: 3,\n marginRight: 3,\n },\n}));\n\ninterface RowProps {\n task: TaskInfoExtended;\n isSelected: boolean;\n onSelectChange: (checked: boolean) => void;\n onRunClick: () => void;\n onDeleteClick: () => void;\n allActionPending: boolean;\n showActions: boolean;\n onActionCellEnter: () => void;\n onActionCellLeave: () => void;\n}\n\nfunction Row(props: RowProps) {\n const { task } = props;\n const classes = useRowStyles();\n const history = useHistory();\n return (\n <TableRow\n key={task.id}\n className={classes.root}\n selected={props.isSelected}\n onClick={() => history.push(taskDetailsPath(task.queue, task.id))}\n >\n <TableCell padding=\"checkbox\" onClick={(e) => e.stopPropagation()}>\n <IconButton>\n <Checkbox\n onChange={(event: React.ChangeEvent<HTMLInputElement>) =>\n props.onSelectChange(event.target.checked)\n }\n checked={props.isSelected}\n />\n </IconButton>\n </TableCell>\n <TableCell component=\"th\" scope=\"row\">\n {uuidPrefix(task.id)}\n </TableCell>\n <TableCell>{task.type}</TableCell>\n <TableCell>\n <SyntaxHighlighter\n language=\"json\"\n customStyle={{ margin: 0, maxWidth: 400 }}\n >\n {prettifyPayload(task.payload)}\n </SyntaxHighlighter>\n </TableCell>\n <TableCell>{timeAgo(task.last_failed_at)}</TableCell>\n <TableCell>{task.error_message}</TableCell>\n <TableCell\n align=\"center\"\n className={classes.actionCell}\n onMouseEnter={props.onActionCellEnter}\n onMouseLeave={props.onActionCellLeave}\n onClick={(e) => e.stopPropagation()}\n >\n {props.showActions ? (\n <React.Fragment>\n <Tooltip title=\"Delete\">\n <IconButton\n className={classes.actionButton}\n onClick={props.onDeleteClick}\n disabled={task.requestPending || props.allActionPending}\n size=\"small\"\n >\n <DeleteIcon fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n <Tooltip title=\"Run\">\n <IconButton\n className={classes.actionButton}\n onClick={props.onRunClick}\n disabled={task.requestPending || props.allActionPending}\n size=\"small\"\n >\n <PlayArrowIcon fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n </React.Fragment>\n ) : (\n <IconButton size=\"small\" onClick={props.onActionCellEnter}>\n <MoreHorizIcon fontSize=\"small\" />\n </IconButton>\n )}\n </TableCell>\n </TableRow>\n );\n}\n\nexport default connector(ArchivedTasksTable);\n","import React, { useCallback, useState } from \"react\";\nimport { useHistory } from \"react-router-dom\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Table from \"@material-ui/core/Table\";\nimport TableBody from \"@material-ui/core/TableBody\";\nimport TableCell from \"@material-ui/core/TableCell\";\nimport Checkbox from \"@material-ui/core/Checkbox\";\nimport TableContainer from \"@material-ui/core/TableContainer\";\nimport TableHead from \"@material-ui/core/TableHead\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport Paper from \"@material-ui/core/Paper\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport MoreHorizIcon from \"@material-ui/icons/MoreHoriz\";\nimport TableFooter from \"@material-ui/core/TableFooter\";\nimport TablePagination from \"@material-ui/core/TablePagination\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport AlertTitle from \"@material-ui/lab/AlertTitle\";\nimport SyntaxHighlighter from \"./SyntaxHighlighter\";\nimport { AppState } from \"../store\";\nimport {\n listCompletedTasksAsync,\n deleteAllCompletedTasksAsync,\n deleteCompletedTaskAsync,\n batchDeleteCompletedTasksAsync,\n} from \"../actions/tasksActions\";\nimport TablePaginationActions, {\n rowsPerPageOptions,\n} from \"./TablePaginationActions\";\nimport { taskRowsPerPageChange } from \"../actions/settingsActions\";\nimport TableActions from \"./TableActions\";\nimport {\n durationFromSeconds,\n stringifyDuration,\n timeAgo,\n uuidPrefix,\n prettifyPayload\n} from \"../utils\";\nimport { usePolling } from \"../hooks\";\nimport { TaskInfoExtended } from \"../reducers/tasksReducer\";\nimport { TableColumn } from \"../types/table\";\nimport { taskDetailsPath } from \"../paths\";\n\nconst useStyles = makeStyles((theme) => ({\n table: {\n minWidth: 650,\n },\n stickyHeaderCell: {\n background: theme.palette.background.paper,\n },\n alert: {\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n },\n pagination: {\n border: \"none\",\n },\n}));\n\nfunction mapStateToProps(state: AppState) {\n return {\n loading: state.tasks.completedTasks.loading,\n error: state.tasks.completedTasks.error,\n tasks: state.tasks.completedTasks.data,\n batchActionPending: state.tasks.completedTasks.batchActionPending,\n allActionPending: state.tasks.completedTasks.allActionPending,\n pollInterval: state.settings.pollInterval,\n pageSize: state.settings.taskRowsPerPage,\n };\n}\n\nconst mapDispatchToProps = {\n listCompletedTasksAsync,\n deleteCompletedTaskAsync,\n deleteAllCompletedTasksAsync,\n batchDeleteCompletedTasksAsync,\n taskRowsPerPageChange,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\ntype ReduxProps = ConnectedProps<typeof connector>;\n\ninterface Props {\n queue: string; // name of the queue.\n totalTaskCount: number; // totoal number of completed tasks.\n}\n\nfunction CompletedTasksTable(props: Props & ReduxProps) {\n const { pollInterval, listCompletedTasksAsync, queue, pageSize } = props;\n const classes = useStyles();\n const [page, setPage] = useState(0);\n const [selectedIds, setSelectedIds] = useState<string[]>([]);\n const [activeTaskId, setActiveTaskId] = useState<string>(\"\");\n\n const handlePageChange = (\n event: React.MouseEvent<HTMLButtonElement> | null,\n newPage: number\n ) => {\n setPage(newPage);\n };\n\n const handleRowsPerPageChange = (\n event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>\n ) => {\n props.taskRowsPerPageChange(parseInt(event.target.value, 10));\n setPage(0);\n };\n\n const handleSelectAllClick = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (event.target.checked) {\n const newSelected = props.tasks.map((t) => t.id);\n setSelectedIds(newSelected);\n } else {\n setSelectedIds([]);\n }\n };\n\n const handleDeleteAllClick = () => {\n props.deleteAllCompletedTasksAsync(queue);\n };\n\n const handleBatchDeleteClick = () => {\n props\n .batchDeleteCompletedTasksAsync(queue, selectedIds)\n .then(() => setSelectedIds([]));\n };\n\n const fetchData = useCallback(() => {\n const pageOpts = { page: page + 1, size: pageSize };\n listCompletedTasksAsync(queue, pageOpts);\n }, [page, pageSize, queue, listCompletedTasksAsync]);\n\n usePolling(fetchData, pollInterval);\n\n if (props.error.length > 0) {\n return (\n <Alert severity=\"error\" className={classes.alert}>\n <AlertTitle>Error</AlertTitle>\n {props.error}\n </Alert>\n );\n }\n if (props.tasks.length === 0) {\n return (\n <Alert severity=\"info\" className={classes.alert}>\n <AlertTitle>Info</AlertTitle>\n No completed tasks at this time.\n </Alert>\n );\n }\n\n const columns: TableColumn[] = [\n { key: \"id\", label: \"ID\", align: \"left\" },\n { key: \"type\", label: \"Type\", align: \"left\" },\n { key: \"payload\", label: \"Payload\", align: \"left\" },\n { key: \"completed_at\", label: \"Completed\", align: \"left\" },\n { key: \"result\", label: \"Result\", align: \"left\" },\n { key: \"ttl\", label: \"TTL\", align: \"left\" },\n { key: \"actions\", label: \"Actions\", align: \"center\" },\n ];\n\n const rowCount = props.tasks.length;\n const numSelected = selectedIds.length;\n return (\n <div>\n <TableActions\n showIconButtons={numSelected > 0}\n iconButtonActions={[\n {\n tooltip: \"Delete\",\n icon: <DeleteIcon />,\n onClick: handleBatchDeleteClick,\n disabled: props.batchActionPending,\n },\n ]}\n menuItemActions={[\n {\n label: \"Delete All\",\n onClick: handleDeleteAllClick,\n disabled: props.allActionPending,\n },\n ]}\n />\n <TableContainer component={Paper}>\n <Table\n stickyHeader={true}\n className={classes.table}\n aria-label=\"archived tasks table\"\n size=\"small\"\n >\n <TableHead>\n <TableRow>\n <TableCell\n padding=\"checkbox\"\n classes={{ stickyHeader: classes.stickyHeaderCell }}\n >\n <IconButton>\n <Checkbox\n indeterminate={numSelected > 0 && numSelected < rowCount}\n checked={rowCount > 0 && numSelected === rowCount}\n onChange={handleSelectAllClick}\n inputProps={{\n \"aria-label\": \"select all tasks shown in the table\",\n }}\n />\n </IconButton>\n </TableCell>\n {columns.map((col) => (\n <TableCell\n key={col.key}\n align={col.align}\n classes={{ stickyHeader: classes.stickyHeaderCell }}\n >\n {col.label}\n </TableCell>\n ))}\n </TableRow>\n </TableHead>\n <TableBody>\n {props.tasks.map((task) => (\n <Row\n key={task.id}\n task={task}\n isSelected={selectedIds.includes(task.id)}\n onSelectChange={(checked: boolean) => {\n if (checked) {\n setSelectedIds(selectedIds.concat(task.id));\n } else {\n setSelectedIds(selectedIds.filter((id) => id !== task.id));\n }\n }}\n onDeleteClick={() => {\n props.deleteCompletedTaskAsync(queue, task.id);\n }}\n allActionPending={props.allActionPending}\n onActionCellEnter={() => setActiveTaskId(task.id)}\n onActionCellLeave={() => setActiveTaskId(\"\")}\n showActions={activeTaskId === task.id}\n />\n ))}\n </TableBody>\n <TableFooter>\n <TableRow>\n <TablePagination\n rowsPerPageOptions={rowsPerPageOptions}\n colSpan={columns.length + 1}\n count={props.totalTaskCount}\n rowsPerPage={pageSize}\n page={page}\n SelectProps={{\n inputProps: { \"aria-label\": \"rows per page\" },\n native: true,\n }}\n onPageChange={handlePageChange}\n onRowsPerPageChange={handleRowsPerPageChange}\n ActionsComponent={TablePaginationActions}\n className={classes.pagination}\n />\n </TableRow>\n </TableFooter>\n </Table>\n </TableContainer>\n </div>\n );\n}\n\nconst useRowStyles = makeStyles((theme) => ({\n root: {\n cursor: \"pointer\",\n \"&:hover\": {\n boxShadow: theme.shadows[2],\n },\n \"&:hover .MuiTableCell-root\": {\n borderBottomColor: theme.palette.background.paper,\n },\n },\n actionCell: {\n width: \"96px\",\n },\n actionButton: {\n marginLeft: 3,\n marginRight: 3,\n },\n}));\n\ninterface RowProps {\n task: TaskInfoExtended;\n isSelected: boolean;\n onSelectChange: (checked: boolean) => void;\n onDeleteClick: () => void;\n allActionPending: boolean;\n showActions: boolean;\n onActionCellEnter: () => void;\n onActionCellLeave: () => void;\n}\n\nfunction Row(props: RowProps) {\n const { task } = props;\n const classes = useRowStyles();\n const history = useHistory();\n return (\n <TableRow\n key={task.id}\n className={classes.root}\n selected={props.isSelected}\n onClick={() => history.push(taskDetailsPath(task.queue, task.id))}\n >\n <TableCell padding=\"checkbox\" onClick={(e) => e.stopPropagation()}>\n <IconButton>\n <Checkbox\n onChange={(event: React.ChangeEvent<HTMLInputElement>) =>\n props.onSelectChange(event.target.checked)\n }\n checked={props.isSelected}\n />\n </IconButton>\n </TableCell>\n <TableCell component=\"th\" scope=\"row\">\n {uuidPrefix(task.id)}\n </TableCell>\n <TableCell>{task.type}</TableCell>\n <TableCell>\n <SyntaxHighlighter\n language=\"json\"\n customStyle={{ margin: 0, maxWidth: 400 }}\n >\n {prettifyPayload(task.payload)}\n </SyntaxHighlighter>\n </TableCell>\n <TableCell>{timeAgo(task.completed_at)}</TableCell>\n <TableCell>\n <SyntaxHighlighter\n language=\"json\"\n customStyle={{ margin: 0, maxWidth: 400 }}\n >\n {prettifyPayload(task.result)}\n </SyntaxHighlighter>\n </TableCell>\n <TableCell>\n {task.ttl_seconds > 0\n ? `${stringifyDuration(durationFromSeconds(task.ttl_seconds))} left`\n : `expired`}\n </TableCell>\n <TableCell\n align=\"center\"\n className={classes.actionCell}\n onMouseEnter={props.onActionCellEnter}\n onMouseLeave={props.onActionCellLeave}\n onClick={(e) => e.stopPropagation()}\n >\n {props.showActions ? (\n <React.Fragment>\n <Tooltip title=\"Delete\">\n <IconButton\n className={classes.actionButton}\n onClick={props.onDeleteClick}\n disabled={task.requestPending || props.allActionPending}\n size=\"small\"\n >\n <DeleteIcon fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n </React.Fragment>\n ) : (\n <IconButton size=\"small\" onClick={props.onActionCellEnter}>\n <MoreHorizIcon fontSize=\"small\" />\n </IconButton>\n )}\n </TableCell>\n </TableRow>\n );\n}\n\nexport default connector(CompletedTasksTable);\n","import React, { useState } from \"react\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Chip from \"@material-ui/core/Chip\";\nimport InputBase from \"@material-ui/core/InputBase\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport ActiveTasksTable from \"./ActiveTasksTable\";\nimport PendingTasksTable from \"./PendingTasksTable\";\nimport ScheduledTasksTable from \"./ScheduledTasksTable\";\nimport RetryTasksTable from \"./RetryTasksTable\";\nimport ArchivedTasksTable from \"./ArchivedTasksTable\";\nimport CompletedTasksTable from \"./CompletedTasksTable\";\nimport { useHistory } from \"react-router-dom\";\nimport { queueDetailsPath, taskDetailsPath } from \"../paths\";\nimport { QueueInfo } from \"../reducers/queuesReducer\";\nimport { AppState } from \"../store\";\nimport { isDarkTheme } from \"../theme\";\n\ninterface TabPanelProps {\n children?: React.ReactNode;\n selected: string; // currently selected value\n value: string; // tab panel will be shown if selected value equals to the value\n}\n\nfunction TabPanel(props: TabPanelProps) {\n const { children, value, selected, ...other } = props;\n\n return (\n <div\n role=\"tabpanel\"\n hidden={value !== selected}\n id={`scrollable-auto-tabpanel-${selected}`}\n aria-labelledby={`scrollable-auto-tab-${selected}`}\n style={{ flex: 1, overflowY: \"scroll\" }}\n {...other}\n >\n {value === selected && children}\n </div>\n );\n}\n\nfunction mapStatetoProps(state: AppState, ownProps: Props) {\n // TODO: Add loading state for each queue.\n const queueInfo = state.queues.data.find(\n (q: QueueInfo) => q.name === ownProps.queue\n );\n const currentStats = queueInfo\n ? queueInfo.currentStats\n : {\n queue: ownProps.queue,\n paused: false,\n size: 0,\n active: 0,\n pending: 0,\n scheduled: 0,\n retry: 0,\n archived: 0,\n completed: 0,\n processed: 0,\n failed: 0,\n timestamp: \"n/a\",\n };\n return { currentStats };\n}\n\nconst connector = connect(mapStatetoProps);\n\ntype ReduxProps = ConnectedProps<typeof connector>;\n\ninterface Props {\n queue: string;\n selected: string;\n}\n\nconst useStyles = makeStyles((theme) => ({\n container: {\n width: \"100%\",\n height: \"100%\",\n background: theme.palette.background.paper,\n },\n header: {\n display: \"flex\",\n alignItems: \"center\",\n paddingTop: theme.spacing(1),\n },\n heading: {\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n chip: {\n marginLeft: theme.spacing(1),\n },\n taskcount: {\n fontSize: \"12px\",\n color: theme.palette.text.secondary,\n background: isDarkTheme(theme)\n ? \"#303030\"\n : theme.palette.background.default,\n textAlign: \"center\",\n padding: \"3px 6px\",\n borderRadius: \"10px\",\n marginLeft: \"2px\",\n },\n searchbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n search: {\n position: \"relative\",\n width: \"312px\",\n borderRadius: \"18px\",\n backgroundColor: isDarkTheme(theme) ? \"#303030\" : theme.palette.grey[100],\n \"&:hover, &:focus\": {\n backgroundColor: isDarkTheme(theme) ? \"#303030\" : theme.palette.grey[200],\n },\n },\n searchIcon: {\n padding: theme.spacing(0, 2),\n height: \"100%\",\n position: \"absolute\",\n pointerEvents: \"none\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n inputRoot: {\n color: \"inherit\",\n width: \"100%\",\n },\n inputInput: {\n padding: theme.spacing(1, 1, 1, 0),\n // vertical padding + font size from searchIcon\n paddingLeft: `calc(1em + ${theme.spacing(4)}px)`,\n width: \"100%\",\n fontSize: \"0.85rem\",\n },\n}));\n\nfunction TasksTable(props: Props & ReduxProps) {\n const { currentStats } = props;\n const classes = useStyles();\n const history = useHistory();\n const chips = [\n { key: \"active\", label: \"Active\", count: currentStats.active },\n { key: \"pending\", label: \"Pending\", count: currentStats.pending },\n { key: \"scheduled\", label: \"Scheduled\", count: currentStats.scheduled },\n { key: \"retry\", label: \"Retry\", count: currentStats.retry },\n { key: \"archived\", label: \"Archived\", count: currentStats.archived },\n { key: \"completed\", label: \"Completed\", count: currentStats.completed },\n ];\n\n const [searchQuery, setSearchQuery] = useState<string>(\"\");\n\n return (\n <Paper variant=\"outlined\" className={classes.container}>\n <div className={classes.header}>\n <Typography color=\"textPrimary\" className={classes.heading}>\n Tasks\n </Typography>\n <div>\n {chips.map((c) => (\n <Chip\n key={c.key}\n className={classes.chip}\n label={\n <div>\n {c.label} <span className={classes.taskcount}>{c.count}</span>\n </div>\n }\n variant=\"outlined\"\n color={props.selected === c.key ? \"primary\" : \"default\"}\n onClick={() => history.push(queueDetailsPath(props.queue, c.key))}\n />\n ))}\n </div>\n <div className={classes.searchbar}>\n <div className={classes.search}>\n <div className={classes.searchIcon}>\n <SearchIcon />\n </div>\n <InputBase\n placeholder=\"Search by ID\"\n classes={{\n root: classes.inputRoot,\n input: classes.inputInput,\n }}\n value={searchQuery}\n onChange={(e) => {\n setSearchQuery(e.target.value);\n }}\n inputProps={{\n \"aria-label\": \"search\",\n onKeyDown: (e) => {\n if (e.key === \"Enter\") {\n history.push(\n taskDetailsPath(props.queue, searchQuery.trim())\n );\n }\n },\n }}\n />\n </div>\n </div>\n </div>\n <TabPanel value=\"active\" selected={props.selected}>\n <ActiveTasksTable queue={props.queue} />\n </TabPanel>\n <TabPanel value=\"pending\" selected={props.selected}>\n <PendingTasksTable\n queue={props.queue}\n totalTaskCount={currentStats.pending}\n />\n </TabPanel>\n <TabPanel value=\"scheduled\" selected={props.selected}>\n <ScheduledTasksTable\n queue={props.queue}\n totalTaskCount={currentStats.scheduled}\n />\n </TabPanel>\n <TabPanel value=\"retry\" selected={props.selected}>\n <RetryTasksTable\n queue={props.queue}\n totalTaskCount={currentStats.retry}\n />\n </TabPanel>\n <TabPanel value=\"archived\" selected={props.selected}>\n <ArchivedTasksTable\n queue={props.queue}\n totalTaskCount={currentStats.archived}\n />\n </TabPanel>\n <TabPanel value=\"completed\" selected={props.selected}>\n <CompletedTasksTable\n queue={props.queue}\n totalTaskCount={currentStats.completed}\n />\n </TabPanel>\n </Paper>\n );\n}\n\nexport default connector(TasksTable);\n","import React from \"react\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Typography from \"@material-ui/core/Typography\";\nimport prettyBytes from \"pretty-bytes\";\nimport { AppState } from \"../store\";\nimport { percentage } from \"../utils\";\n\nconst useStyles = makeStyles((theme) => ({\n banner: {\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(2),\n display: \"flex\",\n },\n bannerItem: {\n flexGrow: 1,\n borderLeft: `1px solid ${theme.palette.divider}`,\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n}));\n\ninterface Props {\n qname: string;\n}\n\nfunction mapStateToProps(state: AppState, ownProps: Props) {\n const queueInfo = state.queues.data.find((q) => q.name === ownProps.qname);\n return {\n queue: queueInfo?.currentStats,\n };\n}\n\nconst connector = connect(mapStateToProps);\n\ntype ReduxProps = ConnectedProps<typeof connector>;\n\nfunction QueueInfoBanner(props: Props & ReduxProps) {\n const classes = useStyles();\n const { queue, qname } = props;\n return (\n <div className={classes.banner}>\n <div className={classes.bannerItem}>\n <Typography variant=\"subtitle2\" color=\"textPrimary\" gutterBottom>\n Queue name\n </Typography>\n <Typography color=\"textSecondary\">{qname}</Typography>\n </div>\n\n <div className={classes.bannerItem}>\n <Typography variant=\"subtitle2\" color=\"textPrimary\" gutterBottom>\n Queue state\n </Typography>\n <Typography color=\"textSecondary\">\n {queue ? (queue.paused ? \"paused\" : \"run\") : \"-\"}\n </Typography>\n </div>\n\n <div className={classes.bannerItem}>\n <Typography variant=\"subtitle2\" color=\"textPrimary\" gutterBottom>\n Queue size\n </Typography>\n <Typography color=\"textSecondary\">\n {queue ? queue.size : \"-\"}\n </Typography>\n </div>\n\n <div className={classes.bannerItem}>\n <Typography variant=\"subtitle2\" color=\"textPrimary\" gutterBottom>\n Memory usage\n </Typography>\n <Typography color=\"textSecondary\">\n {queue ? prettyBytes(queue.memory_usage_bytes) : \"-\"}\n </Typography>\n </div>\n\n <div className={classes.bannerItem}>\n <Typography variant=\"subtitle2\" color=\"textPrimary\" gutterBottom>\n Processed\n </Typography>\n <Typography color=\"textSecondary\">\n {queue ? queue.processed : \"-\"}\n </Typography>\n </div>\n\n <div className={classes.bannerItem}>\n <Typography variant=\"subtitle2\" color=\"textPrimary\" gutterBottom>\n Failed\n </Typography>\n <Typography color=\"textSecondary\">\n {queue ? queue.failed : \"-\"}\n </Typography>\n </div>\n\n <div className={classes.bannerItem}>\n <Typography variant=\"subtitle2\" color=\"textPrimary\" gutterBottom>\n Error rate\n </Typography>\n <Typography color=\"textSecondary\">\n {queue ? percentage(queue.failed, queue.processed) : \"-\"}\n </Typography>\n </div>\n </div>\n );\n}\n\nexport default connector(QueueInfoBanner);\n","import React, { useState } from \"react\";\nimport { Link, useHistory } from \"react-router-dom\";\nimport { emphasize, withStyles, Theme } from \"@material-ui/core/styles\";\nimport Breadcrumbs from \"@material-ui/core/Breadcrumbs\";\nimport Chip from \"@material-ui/core/Chip\";\nimport Menu from \"@material-ui/core/Menu\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\nimport ExpandMoreIcon from \"@material-ui/icons/ExpandMore\";\nimport { paths, queueDetailsPath } from \"../paths\";\nimport { isDarkTheme } from \"../theme\";\n\nconst StyledBreadcrumb = withStyles((theme: Theme) => ({\n root: {\n backgroundColor: isDarkTheme(theme)\n ? \"#303030\"\n : theme.palette.background.default,\n height: theme.spacing(3),\n color: theme.palette.text.secondary,\n fontWeight: theme.typography.fontWeightRegular,\n \"&:hover, &:focus\": {\n backgroundColor: theme.palette.action.hover,\n },\n \"&:active\": {\n boxShadow: theme.shadows[1],\n backgroundColor: emphasize(theme.palette.action.hover, 0.12),\n },\n },\n}))(Chip) as typeof Chip; // Note: need a type cast here because https://github.com/Microsoft/TypeScript/issues/26591\n\ninterface Props {\n // All queue names.\n queues: string[];\n // Name of the queue currently selected.\n queueName: string;\n // ID of the task currently selected (optional).\n taskId?: string;\n}\n\nexport default function QueueBreadcrumbs(props: Props) {\n const history = useHistory();\n const [anchorEl, setAnchorEl] = useState<null | Element>(null);\n\n const handleClick = (event: React.MouseEvent<Element, MouseEvent>) => {\n event.preventDefault();\n setAnchorEl(event.currentTarget);\n };\n\n const closeMenu = () => {\n setAnchorEl(null);\n };\n\n return (\n <>\n <Breadcrumbs aria-label=\"breadcrumb\">\n <StyledBreadcrumb\n component={Link}\n to={paths.HOME}\n label=\"Queues\"\n onClick={() => history.push(paths.HOME)}\n />\n <StyledBreadcrumb\n label={props.queueName}\n deleteIcon={<ExpandMoreIcon />}\n onClick={handleClick}\n onDelete={handleClick}\n />\n {props.taskId && <StyledBreadcrumb label={`task:${props.taskId}`} />}\n </Breadcrumbs>\n <Menu\n id=\"queue-breadcrumb-menu\"\n anchorEl={anchorEl}\n keepMounted\n open={Boolean(anchorEl)}\n onClose={closeMenu}\n >\n {props.queues.sort().map((qname) => (\n <MenuItem\n key={qname}\n onClick={() => {\n history.push(queueDetailsPath(qname));\n closeMenu();\n }}\n >\n {qname}\n </MenuItem>\n ))}\n </Menu>\n </>\n );\n}\n","import React, { useEffect } from \"react\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Container from \"@material-ui/core/Container\";\nimport Grid from \"@material-ui/core/Grid\";\nimport TasksTable from \"../components/TasksTable\";\nimport QueueInfoBanner from \"../components/QueueInfoBanner\";\nimport QueueBreadCrumb from \"../components/QueueBreadcrumb\";\nimport { useParams, useLocation } from \"react-router-dom\";\nimport { listQueuesAsync } from \"../actions/queuesActions\";\nimport { AppState } from \"../store\";\nimport { QueueDetailsRouteParams } from \"../paths\";\n\nfunction mapStateToProps(state: AppState) {\n return {\n queues: state.queues.data.map((q) => q.name),\n };\n}\n\nconst connector = connect(mapStateToProps, { listQueuesAsync });\n\nconst useStyles = makeStyles((theme) => ({\n container: {\n paddingTop: theme.spacing(2),\n },\n breadcrumbs: {\n marginBottom: theme.spacing(2),\n },\n banner: {\n marginBottom: theme.spacing(2),\n },\n tasksTable: {\n marginBottom: theme.spacing(4),\n },\n}));\n\nfunction useQuery(): URLSearchParams {\n return new URLSearchParams(useLocation().search);\n}\n\nconst validStatus = [\n \"active\",\n \"pending\",\n \"scheduled\",\n \"retry\",\n \"archived\",\n \"completed\",\n];\nconst defaultStatus = \"active\";\n\nfunction TasksView(props: ConnectedProps<typeof connector>) {\n const classes = useStyles();\n const { qname } = useParams<QueueDetailsRouteParams>();\n const query = useQuery();\n let selected = query.get(\"status\");\n if (!selected || !validStatus.includes(selected)) {\n selected = defaultStatus;\n }\n const { listQueuesAsync } = props;\n\n useEffect(() => {\n listQueuesAsync();\n }, [listQueuesAsync]);\n\n return (\n <Container maxWidth=\"lg\">\n <Grid container spacing={0} className={classes.container}>\n <Grid item xs={12} className={classes.breadcrumbs}>\n <QueueBreadCrumb queues={props.queues} queueName={qname} />\n </Grid>\n <Grid item xs={12} className={classes.banner}>\n <QueueInfoBanner qname={qname} />\n </Grid>\n <Grid item xs={12} className={classes.tasksTable}>\n <TasksTable queue={qname} selected={selected} />\n </Grid>\n </Grid>\n </Container>\n );\n}\n\nexport default connector(TasksView);\n","import React, { useMemo, useEffect } from \"react\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport { useHistory } from \"react-router-dom\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Container from \"@material-ui/core/Container\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Button from \"@material-ui/core/Button\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport AlertTitle from \"@material-ui/lab/AlertTitle\";\nimport ArrowBackIcon from \"@material-ui/icons/ArrowBack\";\nimport { useParams } from \"react-router-dom\";\nimport QueueBreadCrumb from \"../components/QueueBreadcrumb\";\nimport { AppState } from \"../store\";\nimport { getTaskInfoAsync } from \"../actions/tasksActions\";\nimport { TaskDetailsRouteParams } from \"../paths\";\nimport { usePolling } from \"../hooks\";\nimport { listQueuesAsync } from \"../actions/queuesActions\";\nimport SyntaxHighlighter from \"../components/SyntaxHighlighter\";\nimport { durationFromSeconds, stringifyDuration, timeAgo, prettifyPayload } from \"../utils\";\n\nfunction mapStateToProps(state: AppState) {\n return {\n loading: state.tasks.taskInfo.loading,\n error: state.tasks.taskInfo.error,\n taskInfo: state.tasks.taskInfo.data,\n pollInterval: state.settings.pollInterval,\n queues: state.queues.data.map((q) => q.name), // FIXME: This data may not be available\n };\n}\n\nconst connector = connect(mapStateToProps, {\n getTaskInfoAsync,\n listQueuesAsync,\n});\n\nconst useStyles = makeStyles((theme) => ({\n container: {\n paddingTop: theme.spacing(2),\n },\n alert: {\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n },\n paper: {\n padding: theme.spacing(2),\n marginTop: theme.spacing(2),\n },\n breadcrumbs: {\n marginBottom: theme.spacing(2),\n },\n infoRow: {\n display: \"flex\",\n alignItems: \"center\",\n paddingTop: theme.spacing(1),\n },\n infoKeyCell: {\n width: \"140px\",\n },\n infoValueCell: {\n width: \"auto\",\n },\n footer: {\n paddingTop: theme.spacing(3),\n paddingBottom: theme.spacing(3),\n },\n}));\n\ntype Props = ConnectedProps<typeof connector>;\n\nfunction TaskDetailsView(props: Props) {\n const classes = useStyles();\n const { qname, taskId } = useParams<TaskDetailsRouteParams>();\n const { getTaskInfoAsync, pollInterval, listQueuesAsync, taskInfo } = props;\n const history = useHistory();\n\n const fetchTaskInfo = useMemo(() => {\n return () => {\n getTaskInfoAsync(qname, taskId);\n };\n }, [qname, taskId, getTaskInfoAsync]);\n\n usePolling(fetchTaskInfo, pollInterval);\n\n // Fetch queues data to populate props.queues\n useEffect(() => {\n listQueuesAsync();\n }, [listQueuesAsync]);\n\n return (\n <Container maxWidth=\"lg\" className={classes.container}>\n <Grid container spacing={0}>\n <Grid item xs={12} className={classes.breadcrumbs}>\n <QueueBreadCrumb\n queues={props.queues}\n queueName={qname}\n taskId={taskId}\n />\n </Grid>\n <Grid item xs={12} md={6}>\n {props.error ? (\n <Alert severity=\"error\" className={classes.alert}>\n <AlertTitle>Error</AlertTitle>\n {props.error}\n </Alert>\n ) : (\n <Paper className={classes.paper} variant=\"outlined\">\n <Typography variant=\"h6\">Task Info</Typography>\n <div>\n <div className={classes.infoRow}>\n <Typography\n variant=\"subtitle2\"\n className={classes.infoKeyCell}\n >\n ID:{\" \"}\n </Typography>\n <Typography className={classes.infoValueCell}>\n {taskInfo?.id}\n </Typography>\n </div>\n <div className={classes.infoRow}>\n <Typography\n variant=\"subtitle2\"\n className={classes.infoKeyCell}\n >\n Type:{\" \"}\n </Typography>\n <Typography className={classes.infoValueCell}>\n {taskInfo?.type}\n </Typography>\n </div>\n <div className={classes.infoRow}>\n <Typography\n variant=\"subtitle2\"\n className={classes.infoKeyCell}\n >\n State:{\" \"}\n </Typography>\n <Typography className={classes.infoValueCell}>\n {taskInfo?.state}\n </Typography>\n </div>\n <div className={classes.infoRow}>\n <Typography\n variant=\"subtitle2\"\n className={classes.infoKeyCell}\n >\n Queue:{\" \"}\n </Typography>\n <Typography className={classes.infoValueCell}>\n {taskInfo?.queue}\n </Typography>\n </div>\n <div className={classes.infoRow}>\n <Typography\n variant=\"subtitle2\"\n className={classes.infoKeyCell}\n >\n Retry:{\" \"}\n </Typography>\n <Typography className={classes.infoValueCell}>\n {taskInfo?.retried}/{taskInfo?.max_retry}\n </Typography>\n </div>\n <div className={classes.infoRow}>\n <Typography\n variant=\"subtitle2\"\n className={classes.infoKeyCell}\n >\n Last Failure:{\" \"}\n </Typography>\n <Typography className={classes.infoValueCell}>\n {taskInfo?.last_failed_at ? (\n <Typography>\n {taskInfo?.error_message} ({taskInfo?.last_failed_at})\n </Typography>\n ) : (\n <Typography> - </Typography>\n )}\n </Typography>\n </div>\n <div className={classes.infoRow}>\n <Typography\n variant=\"subtitle2\"\n className={classes.infoKeyCell}\n >\n Next Process Time:{\" \"}\n </Typography>\n {taskInfo?.next_process_at ? (\n <Typography>{taskInfo?.next_process_at}</Typography>\n ) : (\n <Typography> - </Typography>\n )}\n </div>\n </div>\n <div className={classes.infoRow}>\n <Typography variant=\"subtitle2\" className={classes.infoKeyCell}>\n Timeout:{\" \"}\n </Typography>\n <Typography className={classes.infoValueCell}>\n {taskInfo?.timeout_seconds ? (\n <Typography>{taskInfo?.timeout_seconds} seconds</Typography>\n ) : (\n <Typography> - </Typography>\n )}\n </Typography>\n </div>\n <div className={classes.infoRow}>\n <Typography variant=\"subtitle2\" className={classes.infoKeyCell}>\n Deadline:{\" \"}\n </Typography>\n <Typography className={classes.infoValueCell}>\n {taskInfo?.deadline ? (\n <Typography>{taskInfo?.deadline}</Typography>\n ) : (\n <Typography> - </Typography>\n )}\n </Typography>\n </div>\n <div className={classes.infoRow}>\n <Typography variant=\"subtitle2\" className={classes.infoKeyCell}>\n Payload:{\" \"}\n </Typography>\n <div className={classes.infoValueCell}>\n {taskInfo?.payload && (\n <SyntaxHighlighter\n language=\"json\"\n customStyle={{ margin: 0, maxWidth: 400 }}\n >\n {prettifyPayload(taskInfo.payload)}\n </SyntaxHighlighter>\n )}\n </div>\n </div>\n {\n /* Completed Task Only */ taskInfo?.state === \"completed\" && (\n <>\n <div className={classes.infoRow}>\n <Typography\n variant=\"subtitle2\"\n className={classes.infoKeyCell}\n >\n Completed:{\" \"}\n </Typography>\n <div className={classes.infoValueCell}>\n <Typography>\n {timeAgo(taskInfo.completed_at)} (\n {taskInfo.completed_at})\n </Typography>\n </div>\n </div>\n <div className={classes.infoRow}>\n <Typography\n variant=\"subtitle2\"\n className={classes.infoKeyCell}\n >\n Result:{\" \"}\n </Typography>\n <div className={classes.infoValueCell}>\n <SyntaxHighlighter\n language=\"json\"\n customStyle={{ margin: 0, maxWidth: 400 }}\n >\n {prettifyPayload(taskInfo.result)}\n </SyntaxHighlighter>\n </div>\n </div>\n <div className={classes.infoRow}>\n <Typography\n variant=\"subtitle2\"\n className={classes.infoKeyCell}\n >\n TTL:{\" \"}\n </Typography>\n <Typography className={classes.infoValueCell}>\n <Typography>\n {taskInfo.ttl_seconds > 0\n ? `${stringifyDuration(\n durationFromSeconds(taskInfo.ttl_seconds)\n )} left`\n : \"expired\"}\n </Typography>\n </Typography>\n </div>\n </>\n )\n }\n </Paper>\n )}\n <div className={classes.footer}>\n <Button\n startIcon={<ArrowBackIcon />}\n onClick={() => history.goBack()}\n >\n Go Back\n </Button>\n </div>\n </Grid>\n </Grid>\n </Container>\n );\n}\n\nexport default connector(TaskDetailsView);\n","import React, { useState } from \"react\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport Container from \"@material-ui/core/Container\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Slider from \"@material-ui/core/Slider\";\nimport { pollIntervalChange, selectTheme } from \"../actions/settingsActions\";\nimport { AppState } from \"../store\";\nimport FormControl from \"@material-ui/core/FormControl/FormControl\";\nimport Select from \"@material-ui/core/Select\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\nimport { ThemePreference } from \"../reducers/settingsReducer\";\n\nconst useStyles = makeStyles((theme) => ({\n container: {\n paddingTop: theme.spacing(4),\n paddingBottom: theme.spacing(4),\n },\n paper: {\n padding: theme.spacing(2),\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n },\n formControl: {\n margin: theme.spacing(1),\n display: \"flex\",\n justifyContent: \"space-between\",\n flexDirection: \"row\",\n alignItems: \"center\",\n },\n selectEmpty: {\n marginTop: theme.spacing(2),\n },\n select: {\n width: \"200px\",\n },\n}));\n\nfunction mapStateToProps(state: AppState) {\n return {\n pollInterval: state.settings.pollInterval,\n themePreference: state.settings.themePreference,\n };\n}\n\nconst mapDispatchToProps = { pollIntervalChange, selectTheme };\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\ntype PropsFromRedux = ConnectedProps<typeof connector>;\n\nfunction SettingsView(props: PropsFromRedux) {\n const classes = useStyles();\n\n const [sliderValue, setSliderValue] = useState(props.pollInterval);\n const handleSliderValueChange = (event: any, val: number | number[]) => {\n setSliderValue(val as number);\n };\n\n const handleSliderValueCommited = (event: any, val: number | number[]) => {\n props.pollIntervalChange(val as number);\n };\n\n const handleThemeChange = (event: React.ChangeEvent<{ value: unknown }>) => {\n props.selectTheme(event.target.value as ThemePreference);\n };\n return (\n <Container maxWidth=\"lg\" className={classes.container}>\n <Grid container spacing={3} justify=\"center\">\n <Grid item xs={1} />\n <Grid item xs={6}>\n <Typography variant=\"h5\" color=\"textPrimary\">\n Settings\n </Typography>\n </Grid>\n <Grid item xs={5} />\n\n <Grid item xs={1} />\n <Grid item xs={6}>\n <Paper className={classes.paper} variant=\"outlined\">\n <Typography color=\"textPrimary\">Polling Interval</Typography>\n <Typography gutterBottom color=\"textSecondary\" variant=\"subtitle1\">\n Web UI will fetch live data with the specified interval\n </Typography>\n <Typography gutterBottom color=\"textSecondary\" variant=\"subtitle1\">\n Currently: Every{\" \"}\n {sliderValue === 1 ? \"second\" : `${sliderValue} seconds`}\n </Typography>\n <Slider\n value={sliderValue}\n onChange={handleSliderValueChange}\n onChangeCommitted={handleSliderValueCommited}\n aria-labelledby=\"continuous-slider\"\n valueLabelDisplay=\"auto\"\n step={1}\n marks={true}\n min={2}\n max={20}\n />\n </Paper>\n </Grid>\n <Grid xs={5} />\n\n <Grid item xs={1} />\n <Grid item xs={6}>\n <Paper className={classes.paper} variant=\"outlined\">\n <FormControl variant=\"outlined\" className={classes.formControl}>\n <Typography color=\"textPrimary\">Dark Theme</Typography>\n <Select\n labelId=\"theme-label\"\n id=\"theme-selected\"\n value={props.themePreference}\n onChange={handleThemeChange}\n label=\"theme preference\"\n className={classes.select}\n >\n <MenuItem value={ThemePreference.SystemDefault}>\n System Default\n </MenuItem>\n <MenuItem value={ThemePreference.Always}>Always</MenuItem>\n <MenuItem value={ThemePreference.Never}>Never</MenuItem>\n </Select>\n </FormControl>\n </Paper>\n </Grid>\n <Grid item xs={5} />\n </Grid>\n </Container>\n );\n}\n\nexport default connector(SettingsView);\n","import React, { useState } from \"react\";\nimport { Link } from \"react-router-dom\";\nimport clsx from \"clsx\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Box from \"@material-ui/core/Box\";\nimport Collapse from \"@material-ui/core/Collapse\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Table from \"@material-ui/core/Table\";\nimport TableBody from \"@material-ui/core/TableBody\";\nimport TableCell from \"@material-ui/core/TableCell\";\nimport TableContainer from \"@material-ui/core/TableContainer\";\nimport TableHead from \"@material-ui/core/TableHead\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport TableSortLabel from \"@material-ui/core/TableSortLabel\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport KeyboardArrowDownIcon from \"@material-ui/icons/KeyboardArrowDown\";\nimport KeyboardArrowUpIcon from \"@material-ui/icons/KeyboardArrowUp\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport AlertTitle from \"@material-ui/lab/AlertTitle\";\nimport SyntaxHighlighter from \"./SyntaxHighlighter\";\nimport { ServerInfo } from \"../api\";\nimport { SortDirection, SortableTableColumn } from \"../types/table\";\nimport { timeAgo, uuidPrefix, prettifyPayload } from \"../utils\";\nimport { queueDetailsPath } from \"../paths\";\nimport Typography from \"@material-ui/core/Typography\";\n\nconst useStyles = makeStyles((theme) => ({\n table: {\n minWidth: 650,\n },\n fixedCell: {\n position: \"sticky\",\n zIndex: 1,\n left: 0,\n background: theme.palette.background.paper,\n },\n}));\n\nenum SortBy {\n HostPID,\n Status,\n ActiveWorkers,\n Queues,\n Started,\n}\nconst colConfigs: SortableTableColumn<SortBy>[] = [\n {\n label: \"Host:PID\",\n key: \"host\",\n sortBy: SortBy.HostPID,\n align: \"left\",\n },\n {\n label: \"Started\",\n key: \"started\",\n sortBy: SortBy.Started,\n align: \"left\",\n },\n {\n label: \"Status\",\n key: \"status\",\n sortBy: SortBy.Status,\n align: \"left\",\n },\n {\n label: \"Queues\",\n key: \"queues\",\n sortBy: SortBy.Queues,\n align: \"left\",\n },\n {\n label: \"Active Workers\",\n key: \"workers\",\n sortBy: SortBy.ActiveWorkers,\n align: \"left\",\n },\n];\n\n// sortServers takes a array of server-infos and return a sorted array.\n// It returns a new array and leave the original array untouched.\nfunction sortServerInfos(\n entries: ServerInfo[],\n cmpFn: (first: ServerInfo, second: ServerInfo) => number\n): ServerInfo[] {\n let copy = [...entries];\n copy.sort(cmpFn);\n return copy;\n}\n\ninterface Props {\n servers: ServerInfo[];\n}\n\nexport default function ServersTable(props: Props) {\n const classes = useStyles();\n const [sortBy, setSortBy] = useState<SortBy>(SortBy.HostPID);\n const [sortDir, setSortDir] = useState<SortDirection>(SortDirection.Asc);\n\n const createSortClickHandler = (sortKey: SortBy) => (e: React.MouseEvent) => {\n if (sortKey === sortBy) {\n // Toggle sort direction.\n const nextSortDir =\n sortDir === SortDirection.Asc ? SortDirection.Desc : SortDirection.Asc;\n setSortDir(nextSortDir);\n } else {\n // Change the sort key.\n setSortBy(sortKey);\n }\n };\n\n const cmpFunc = (s1: ServerInfo, s2: ServerInfo): number => {\n let isS1Smaller = false;\n switch (sortBy) {\n case SortBy.HostPID:\n if (s1.host === s2.host && s1.pid === s2.pid) return 0;\n if (s1.host === s2.host) {\n isS1Smaller = s1.pid < s2.pid;\n } else {\n isS1Smaller = s1.host < s2.host;\n }\n break;\n case SortBy.Started:\n const s1StartTime = Date.parse(s1.start_time);\n const s2StartTime = Date.parse(s2.start_time);\n if (s1StartTime === s2StartTime) return 0;\n isS1Smaller = s1StartTime < s2StartTime;\n break;\n case SortBy.Status:\n if (s1.status === s2.status) return 0;\n isS1Smaller = s1.status < s2.status;\n break;\n case SortBy.Queues:\n const s1Queues = Object.keys(s1.queue_priorities).join(\",\");\n const s2Queues = Object.keys(s2.queue_priorities).join(\",\");\n if (s1Queues === s2Queues) return 0;\n isS1Smaller = s1Queues < s2Queues;\n break;\n case SortBy.ActiveWorkers:\n if (s1.active_workers.length === s2.active_workers.length) {\n return 0;\n }\n isS1Smaller = s1.active_workers.length < s2.active_workers.length;\n break;\n default:\n // eslint-disable-next-line no-throw-literal\n throw `Unexpected order by value: ${sortBy}`;\n }\n if (sortDir === SortDirection.Asc) {\n return isS1Smaller ? -1 : 1;\n } else {\n return isS1Smaller ? 1 : -1;\n }\n };\n\n if (props.servers.length === 0) {\n return (\n <Alert severity=\"info\">\n <AlertTitle>Info</AlertTitle>\n No servers found at this time.\n </Alert>\n );\n }\n\n return (\n <TableContainer>\n <Table className={classes.table} aria-label=\"server info table\">\n <TableHead>\n <TableRow>\n {colConfigs.map((cfg, i) => (\n <TableCell\n key={cfg.key}\n align={cfg.align}\n className={clsx(i === 0 && classes.fixedCell)}\n >\n <TableSortLabel\n active={cfg.sortBy === sortBy}\n direction={sortDir}\n onClick={createSortClickHandler(cfg.sortBy)}\n >\n {cfg.label}\n </TableSortLabel>\n </TableCell>\n ))}\n <TableCell />\n </TableRow>\n </TableHead>\n <TableBody>\n {sortServerInfos(props.servers, cmpFunc).map((srv) => (\n <Row key={srv.id} server={srv} />\n ))}\n </TableBody>\n </Table>\n </TableContainer>\n );\n}\ninterface RowProps {\n server: ServerInfo;\n}\n\nconst useRowStyles = makeStyles((theme) => ({\n rowRoot: {\n \"& > *\": {\n borderBottom: \"unset\",\n },\n },\n noBorder: {\n border: \"none\",\n },\n link: {\n color: theme.palette.text.primary,\n },\n}));\n\nfunction Row(props: RowProps) {\n const classes = useRowStyles();\n const { server } = props;\n const [open, setOpen] = useState<boolean>(false);\n const qnames = Object.keys(server.queue_priorities);\n return (\n <React.Fragment>\n <TableRow className={classes.rowRoot}>\n <TableCell>\n {server.host}:{server.pid}\n </TableCell>\n <TableCell>{timeAgo(server.start_time)}</TableCell>\n <TableCell>{server.status}</TableCell>\n <TableCell>\n {qnames.map((qname, idx) => (\n <span key={qname}>\n <Link to={queueDetailsPath(qname)} className={classes.link}>\n {qname}\n </Link>\n {idx === qnames.length - 1 ? \"\" : \", \"}\n </span>\n ))}\n </TableCell>\n <TableCell>\n {server.active_workers.length}/{server.concurrency}\n </TableCell>\n <TableCell>\n <Tooltip title={open ? \"Hide Details\" : \"Show Details\"}>\n <IconButton\n aria-label=\"expand row\"\n size=\"small\"\n onClick={() => setOpen(!open)}\n >\n {open ? <KeyboardArrowUpIcon /> : <KeyboardArrowDownIcon />}\n </IconButton>\n </Tooltip>\n </TableCell>\n </TableRow>\n <TableRow className={classes.rowRoot}>\n <TableCell style={{ paddingBottom: 0, paddingTop: 0 }} colSpan={6}>\n <Collapse in={open} timeout=\"auto\" unmountOnExit>\n <Grid container spacing={2}>\n <Grid item xs={9}>\n <Typography\n variant=\"subtitle1\"\n gutterBottom\n color=\"textSecondary\"\n >\n Active Workers\n </Typography>\n <Table size=\"small\" aria-label=\"active workers\">\n <TableHead>\n <TableRow>\n <TableCell>Task ID</TableCell>\n <TableCell>Task Payload</TableCell>\n <TableCell>Queue</TableCell>\n <TableCell>Started</TableCell>\n </TableRow>\n </TableHead>\n <TableBody>\n {server.active_workers.map((worker) => (\n <TableRow key={worker.task_id}>\n <TableCell component=\"th\" scope=\"row\">\n {uuidPrefix(worker.task_id)}\n </TableCell>\n <TableCell>\n <SyntaxHighlighter\n language=\"json\"\n customStyle={{ margin: 0 }}\n >\n {prettifyPayload(worker.task_payload)}\n </SyntaxHighlighter>\n </TableCell>\n <TableCell>{worker.queue}</TableCell>\n <TableCell>{timeAgo(worker.start_time)}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </Grid>\n <Grid item xs={3}>\n <Typography\n variant=\"subtitle1\"\n gutterBottom\n color=\"textSecondary\"\n >\n Queue Priority\n </Typography>\n <Table size=\"small\" aria-label=\"active workers\">\n <TableHead>\n <TableRow>\n <TableCell>Queue</TableCell>\n <TableCell align=\"right\">Priority</TableCell>\n </TableRow>\n </TableHead>\n <TableBody>\n {qnames.map((qname) => (\n <TableRow key={qname}>\n <TableCell>\n <Link\n to={queueDetailsPath(qname)}\n className={classes.link}\n >\n {qname}\n </Link>\n </TableCell>\n <TableCell align=\"right\">\n {server.queue_priorities[qname]}\n </TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n <Box margin={2}>\n <Typography variant=\"subtitle2\" component=\"span\">\n Strict Priority:{\" \"}\n </Typography>\n <Typography variant=\"button\" component=\"span\">\n {server.strict_priority_enabled ? \"ON\" : \"OFF\"}\n </Typography>\n </Box>\n </Grid>\n </Grid>\n </Collapse>\n </TableCell>\n </TableRow>\n </React.Fragment>\n );\n}\n","import { Dispatch } from \"redux\";\nimport { listServers, ListServersResponse } from \"../api\";\nimport { toErrorString, toErrorStringWithHttpStatus } from \"../utils\";\n\n// List of server related action types.\nexport const LIST_SERVERS_BEGIN = \"LIST_SERVERS_BEGIN\";\nexport const LIST_SERVERS_SUCCESS = \"LIST_SERVERS_SUCCESS\";\nexport const LIST_SERVERS_ERROR = \"LIST_SERVERS_ERROR\";\n\ninterface ListServersBeginAction {\n type: typeof LIST_SERVERS_BEGIN;\n}\ninterface ListServersSuccessAction {\n type: typeof LIST_SERVERS_SUCCESS;\n payload: ListServersResponse;\n}\ninterface ListServersErrorAction {\n type: typeof LIST_SERVERS_ERROR;\n error: string; // error description\n}\n\n// Union of all server related actions.\nexport type ServersActionTypes =\n | ListServersBeginAction\n | ListServersSuccessAction\n | ListServersErrorAction;\n\nexport function listServersAsync() {\n return async (dispatch: Dispatch<ServersActionTypes>) => {\n dispatch({ type: LIST_SERVERS_BEGIN });\n try {\n const response = await listServers();\n dispatch({\n type: LIST_SERVERS_SUCCESS,\n payload: response,\n });\n } catch (error) {\n console.error(`listServersAsync: ${toErrorStringWithHttpStatus(error)}`);\n dispatch({\n type: LIST_SERVERS_ERROR,\n error: toErrorString(error),\n });\n }\n };\n}\n","import React from \"react\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport Container from \"@material-ui/core/Container\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport AlertTitle from \"@material-ui/lab/AlertTitle\";\nimport ServersTable from \"../components/ServersTable\";\nimport { listServersAsync } from \"../actions/serversActions\";\nimport { AppState } from \"../store\";\nimport { usePolling } from \"../hooks\";\n\nconst useStyles = makeStyles((theme) => ({\n container: {\n paddingTop: theme.spacing(4),\n paddingBottom: theme.spacing(4),\n },\n paper: {\n padding: theme.spacing(2),\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n },\n heading: {\n paddingLeft: theme.spacing(2),\n marginBottom: theme.spacing(1),\n },\n}));\n\nfunction mapStateToProps(state: AppState) {\n return {\n loading: state.servers.loading,\n error: state.servers.error,\n servers: state.servers.data,\n pollInterval: state.settings.pollInterval,\n };\n}\n\nconst connector = connect(mapStateToProps, { listServersAsync });\n\ntype Props = ConnectedProps<typeof connector>;\n\nfunction ServersView(props: Props) {\n const { pollInterval, listServersAsync } = props;\n const classes = useStyles();\n\n usePolling(listServersAsync, pollInterval);\n\n return (\n <Container maxWidth=\"lg\" className={classes.container}>\n <Grid container spacing={3}>\n {props.error === \"\" ? (\n <Grid item xs={12}>\n <Paper className={classes.paper} variant=\"outlined\">\n <Typography variant=\"h6\" className={classes.heading}>\n Servers\n </Typography>\n <ServersTable servers={props.servers} />\n </Paper>\n </Grid>\n ) : (\n <Grid item xs={12}>\n <Alert severity=\"error\">\n <AlertTitle>Error</AlertTitle>\n Could not retrieve servers live data —{\" \"}\n <strong>See the logs for details</strong>\n </Alert>\n </Grid>\n )}\n </Grid>\n </Container>\n );\n}\n\nexport default connector(ServersView);\n","import { Dispatch } from \"redux\";\nimport { getRedisInfo, RedisInfoResponse } from \"../api\";\nimport { toErrorString, toErrorStringWithHttpStatus } from \"../utils\";\n\n// List of redis-info related action types.\nexport const GET_REDIS_INFO_BEGIN = \"GET_REDIS_INFO_BEGIN\";\nexport const GET_REDIS_INFO_SUCCESS = \"GET_REDIS_INFO_SUCCESS\";\nexport const GET_REDIS_INFO_ERROR = \"GET_REDIS_INFO_ERROR\";\n\ninterface GetRedisInfoBeginAction {\n type: typeof GET_REDIS_INFO_BEGIN;\n}\n\ninterface GetRedisInfoSuccessAction {\n type: typeof GET_REDIS_INFO_SUCCESS;\n payload: RedisInfoResponse;\n}\n\ninterface GetRedisInfoErrorAction {\n type: typeof GET_REDIS_INFO_ERROR;\n error: string;\n}\n\n// Union of all redis-info related actions.\nexport type RedisInfoActionTypes =\n | GetRedisInfoBeginAction\n | GetRedisInfoErrorAction\n | GetRedisInfoSuccessAction;\n\nexport function getRedisInfoAsync() {\n return async (dispatch: Dispatch<RedisInfoActionTypes>) => {\n dispatch({ type: GET_REDIS_INFO_BEGIN });\n try {\n const response = await getRedisInfo();\n dispatch({ type: GET_REDIS_INFO_SUCCESS, payload: response });\n } catch (error) {\n console.error(`getRedisInfoAsync: ${toErrorStringWithHttpStatus(error)}`);\n dispatch({\n type: GET_REDIS_INFO_ERROR,\n error: toErrorString(error),\n });\n }\n };\n}\n","import React from \"react\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Table from \"@material-ui/core/Table\";\nimport TableBody from \"@material-ui/core/TableBody\";\nimport TableCell from \"@material-ui/core/TableCell\";\nimport TableContainer from \"@material-ui/core/TableContainer\";\nimport TableHead from \"@material-ui/core/TableHead\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport { QueueLocation } from \"../api\";\n\nconst useStyles = makeStyles((theme) => ({\n table: {\n minWidth: 650,\n },\n}));\n\ninterface Props {\n queueLocations: QueueLocation[];\n}\n\nexport default function QueueLocationTable(props: Props) {\n const classes = useStyles();\n\n return (\n <TableContainer>\n <Table className={classes.table} aria-label=\"queue location table\">\n <TableHead>\n <TableRow>\n <TableCell>Queue</TableCell>\n <TableCell>KeySlot</TableCell>\n <TableCell>Node Addresses</TableCell>\n </TableRow>\n </TableHead>\n <TableBody>\n {props.queueLocations.map((loc) => (\n <TableRow key={loc.queue}>\n <TableCell component=\"th\" scope=\"row\">\n {loc.queue}\n </TableCell>\n <TableCell>{loc.keyslot}</TableCell>\n <TableCell>{loc.nodes.join(\", \")}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </TableContainer>\n );\n}\n","import React from \"react\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport Container from \"@material-ui/core/Container\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Card from \"@material-ui/core/Card\";\nimport CardContent from \"@material-ui/core/CardContent\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport AlertTitle from \"@material-ui/lab/AlertTitle\";\nimport SyntaxHighlighter from \"../components/SyntaxHighlighter\";\nimport { getRedisInfoAsync } from \"../actions/redisInfoActions\";\nimport { usePolling } from \"../hooks\";\nimport { AppState } from \"../store\";\nimport { timeAgoUnix } from \"../utils\";\nimport { RedisInfo } from \"../api\";\nimport QueueLocationTable from \"../components/QueueLocationTable\";\nimport Link from \"@material-ui/core/Link\";\n\nconst useStyles = makeStyles((theme) => ({\n container: {\n paddingTop: theme.spacing(4),\n paddingBottom: theme.spacing(4),\n },\n}));\n\nfunction mapStateToProps(state: AppState) {\n return {\n loading: state.redis.loading,\n error: state.redis.error,\n redisInfo: state.redis.data,\n redisAddress: state.redis.address,\n redisInfoRaw: state.redis.rawData,\n redisClusterEnabled: state.redis.cluster,\n redisClusterNodesRaw: state.redis.rawClusterNodes,\n queueLocations: state.redis.queueLocations,\n pollInterval: state.settings.pollInterval,\n themePreference: state.settings.themePreference,\n };\n}\n\nconst connector = connect(mapStateToProps, { getRedisInfoAsync });\ntype Props = ConnectedProps<typeof connector>;\n\nfunction RedisInfoView(props: Props) {\n const classes = useStyles();\n const {\n pollInterval,\n getRedisInfoAsync,\n redisInfo,\n redisInfoRaw,\n redisClusterEnabled,\n redisClusterNodesRaw,\n queueLocations,\n } = props;\n usePolling(getRedisInfoAsync, pollInterval);\n\n // Metrics to show\n // - Used Memory\n // - Memory Fragmentation Ratio\n // - Connected Clients\n // - Connected Replicas (slaves)\n // - Persistence (rdb_last_save_time, rdb_changes_since_last_save)\n // - Errors (rejected_connections)\n\n return (\n <Container maxWidth=\"lg\" className={classes.container}>\n <Grid container spacing={3}>\n {props.error === \"\" ? (\n <>\n <Grid item xs={12}>\n <Typography variant=\"h5\" color=\"textPrimary\">\n {redisClusterEnabled ? \"Redis Cluster Info\" : \"Redis Info\"}\n </Typography>\n {!redisClusterEnabled && (\n <Typography variant=\"subtitle1\" color=\"textSecondary\">\n Connected to: {props.redisAddress}\n </Typography>\n )}\n </Grid>\n {queueLocations && queueLocations.length > 0 && (\n <Grid item xs={12}>\n <Typography variant=\"h6\" color=\"textSecondary\">\n Queue Location in Cluster\n </Typography>\n <QueueLocationTable queueLocations={queueLocations} />\n </Grid>\n )}\n {redisClusterNodesRaw && (\n <>\n <Grid item xs={12}>\n <Typography variant=\"h6\" color=\"textSecondary\">\n <Link\n href=\"https://redis.io/commands/cluster-nodes\"\n target=\"_\"\n >\n CLUSTER NODES\n </Link>{\" \"}\n Command Output\n </Typography>\n <SyntaxHighlighter language=\"yaml\">\n {redisClusterNodesRaw}\n </SyntaxHighlighter>\n </Grid>\n </>\n )}\n {redisInfo && !redisClusterEnabled && (\n <RedisMetricCards redisInfo={redisInfo} />\n )}\n {redisInfoRaw && (\n <>\n <Grid item xs={6}>\n <Typography variant=\"h6\" color=\"textSecondary\">\n {redisClusterEnabled ? (\n <Link\n href=\"https://redis.io/commands/cluster-info\"\n target=\"_\"\n >\n CLUSTER INFO\n </Link>\n ) : (\n <Link href=\"https://redis.io/commands/info\" target=\"_\">\n INFO\n </Link>\n )}{\" \"}\n Command Output\n </Typography>\n <SyntaxHighlighter language=\"yaml\">\n {redisInfoRaw}\n </SyntaxHighlighter>\n </Grid>\n </>\n )}\n </>\n ) : (\n <Grid item xs={12}>\n <Alert severity=\"error\">\n <AlertTitle>Error</AlertTitle>\n Could not retrieve redis live data —{\" \"}\n <strong>See the logs for details</strong>\n </Alert>\n </Grid>\n )}\n </Grid>\n </Container>\n );\n}\n\nfunction RedisMetricCards(props: { redisInfo: RedisInfo }) {\n const { redisInfo } = props;\n return (\n <>\n <Grid item xs={12}>\n <Typography variant=\"h6\" color=\"textSecondary\">\n Server\n </Typography>\n </Grid>\n <Grid item xs={3}>\n <MetricCard title=\"Version\" content={redisInfo.redis_version} />\n </Grid>\n <Grid item xs={3}>\n <MetricCard\n title=\"Uptime\"\n content={`${redisInfo.uptime_in_days} days`}\n />\n </Grid>\n <Grid item xs={6} />\n <Grid item xs={12}>\n <Typography variant=\"h6\" color=\"textSecondary\">\n Memory\n </Typography>\n </Grid>\n <Grid item xs={3}>\n <MetricCard title=\"Used Memory\" content={redisInfo.used_memory_human} />\n </Grid>\n <Grid item xs={3}>\n <MetricCard\n title=\"Peak Memory Used\"\n content={redisInfo.used_memory_peak_human}\n />\n </Grid>\n <Grid item xs={3}>\n <MetricCard\n title=\"Memory Fragmentation Ratio\"\n content={redisInfo.mem_fragmentation_ratio}\n />\n </Grid>\n <Grid item xs={3} />\n <Grid item xs={12}>\n <Typography variant=\"h6\" color=\"textSecondary\">\n Connections\n </Typography>\n </Grid>\n <Grid item xs={3}>\n <MetricCard\n title=\"Connected Clients\"\n content={redisInfo.connected_clients}\n />\n </Grid>\n <Grid item xs={3}>\n <MetricCard\n title=\"Connected Replicas\"\n content={redisInfo.connected_slaves}\n />\n </Grid>\n <Grid item xs={6} />\n <Grid item xs={12}>\n <Typography variant=\"h6\" color=\"textSecondary\">\n Persistence\n </Typography>\n </Grid>\n <Grid item xs={3}>\n <MetricCard\n title=\"Last Save to Disk\"\n content={timeAgoUnix(parseInt(redisInfo.rdb_last_save_time))}\n />\n </Grid>\n <Grid item xs={3}>\n <MetricCard\n title=\"Number of Changes Since Last Dump\"\n content={redisInfo.rdb_changes_since_last_save}\n />\n </Grid>\n <Grid item xs={6} />\n </>\n );\n}\n\ninterface MetricCardProps {\n title: string;\n content: string;\n}\n\nfunction MetricCard(props: MetricCardProps) {\n return (\n <Card variant=\"outlined\">\n <CardContent>\n <Typography\n gutterBottom\n color=\"textPrimary\"\n variant=\"h5\"\n align=\"center\"\n >\n {props.content}\n </Typography>\n <Typography color=\"textSecondary\" variant=\"subtitle2\" align=\"center\">\n {props.title}\n </Typography>\n </CardContent>\n </Card>\n );\n}\n\nexport default connector(RedisInfoView);\n","import React from \"react\";\nimport Container from \"@material-ui/core/Container\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\n\nconst useStyles = makeStyles((theme) => ({\n container: {\n paddingTop: theme.spacing(4),\n paddingBottom: theme.spacing(4),\n },\n headingText: {\n fontWeight: \"bold\",\n },\n}));\n\nexport default function PageNotFoundView() {\n const classes = useStyles();\n return (\n <Container maxWidth=\"lg\" className={classes.container}>\n <Grid container spacing={3}>\n <Grid item xs={12}>\n <Typography\n variant=\"h5\"\n align=\"center\"\n className={classes.headingText}\n >\n Oops!\n </Typography>\n <Typography variant=\"subtitle1\" color=\"textSecondary\" align=\"center\">\n 404 - Page Not Found\n </Typography>\n </Grid>\n </Grid>\n </Container>\n );\n}\n","import React from \"react\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport clsx from \"clsx\";\nimport { BrowserRouter as Router, Switch, Route } from \"react-router-dom\";\nimport { makeStyles, Theme, ThemeProvider } from \"@material-ui/core/styles\";\nimport AppBar from \"@material-ui/core/AppBar\";\nimport Drawer from \"@material-ui/core/Drawer\";\nimport Toolbar from \"@material-ui/core/Toolbar\";\nimport List from \"@material-ui/core/List\";\nimport ListItem from \"@material-ui/core/ListItem\";\nimport ListItemIcon from \"@material-ui/core/ListItemIcon\";\nimport ListItemText from \"@material-ui/core/ListItemText\";\nimport Snackbar from \"@material-ui/core/Snackbar\";\nimport SnackbarContent from \"@material-ui/core/SnackbarContent\";\nimport Typography from \"@material-ui/core/Typography\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Slide from \"@material-ui/core/Slide\";\nimport { TransitionProps } from \"@material-ui/core/transitions\";\nimport MenuIcon from \"@material-ui/icons/Menu\";\nimport BarChartIcon from \"@material-ui/icons/BarChart\";\nimport LayersIcon from \"@material-ui/icons/Layers\";\nimport SettingsIcon from \"@material-ui/icons/Settings\";\nimport ScheduleIcon from \"@material-ui/icons/Schedule\";\nimport FeedbackIcon from \"@material-ui/icons/Feedback\";\nimport DoubleArrowIcon from \"@material-ui/icons/DoubleArrow\";\nimport CloseIcon from \"@material-ui/icons/Close\";\nimport { AppState } from \"./store\";\nimport { paths } from \"./paths\";\nimport { isDarkTheme, useTheme } from \"./theme\";\nimport { closeSnackbar } from \"./actions/snackbarActions\";\nimport { toggleDrawer } from \"./actions/settingsActions\";\nimport ListItemLink from \"./components/ListItemLink\";\nimport SchedulersView from \"./views/SchedulersView\";\nimport DashboardView from \"./views/DashboardView\";\nimport TasksView from \"./views/TasksView\";\nimport TaskDetailsView from \"./views/TaskDetailsView\";\nimport SettingsView from \"./views/SettingsView\";\nimport ServersView from \"./views/ServersView\";\nimport RedisInfoView from \"./views/RedisInfoView\";\nimport PageNotFoundView from \"./views/PageNotFoundView\";\n\nconst drawerWidth = 220;\n\n// FIXME: For some reason, the following code does not work:\n// makeStyles(theme => ({ /* use theme here */}));\n// Using closure to work around this problem.\nconst useStyles = (theme: Theme) =>\n makeStyles({\n root: {\n display: \"flex\",\n },\n toolbar: {\n paddingRight: 24, // keep right padding when drawer closed\n },\n toolbarIcon: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-end\",\n padding: \"0 8px\",\n ...theme.mixins.toolbar,\n },\n appBar: {\n backgroundColor: theme.palette.background.paper,\n zIndex: theme.zIndex.drawer + 1,\n },\n menuButton: {\n marginRight: theme.spacing(1),\n color: isDarkTheme(theme)\n ? theme.palette.grey[100]\n : theme.palette.grey[700],\n },\n menuButtonHidden: {\n display: \"none\",\n },\n title: {\n flexGrow: 1,\n },\n drawerPaper: {\n position: \"relative\",\n whiteSpace: \"nowrap\",\n width: drawerWidth,\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n border: \"none\",\n },\n drawerPaperClose: {\n overflowX: \"hidden\",\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n width: theme.spacing(7),\n [theme.breakpoints.up(\"sm\")]: {\n width: theme.spacing(9),\n },\n },\n snackbar: {\n background: theme.palette.grey[\"A400\"],\n color: \"#ffffff\",\n },\n snackbarCloseIcon: {\n color: theme.palette.grey[400],\n },\n appBarSpacer: theme.mixins.toolbar,\n mainContainer: {\n display: \"flex\",\n width: \"100vw\",\n },\n content: {\n flex: 1,\n height: \"100vh\",\n overflow: \"hidden\",\n background: theme.palette.background.paper,\n },\n contentWrapper: {\n height: \"100%\",\n display: \"flex\",\n paddingTop: \"64px\", // app-bar height\n overflow: \"scroll\",\n },\n sidebarContainer: {\n display: \"flex\",\n justifyContent: \"space-between\",\n height: \"100%\",\n flexDirection: \"column\",\n },\n listItem: {\n borderTopRightRadius: \"24px\",\n borderBottomRightRadius: \"24px\",\n },\n });\n\nfunction mapStateToProps(state: AppState) {\n return {\n snackbar: state.snackbar,\n themePreference: state.settings.themePreference,\n isDrawerOpen: state.settings.isDrawerOpen,\n };\n}\n\nconst mapDispatchToProps = {\n closeSnackbar,\n toggleDrawer,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\nfunction SlideUpTransition(props: TransitionProps) {\n return <Slide {...props} direction=\"up\" />;\n}\n\nfunction App(props: ConnectedProps<typeof connector>) {\n const theme = useTheme(props.themePreference);\n const classes = useStyles(theme)();\n return (\n <ThemeProvider theme={theme}>\n <Router>\n <div className={classes.root}>\n <AppBar\n position=\"absolute\"\n className={classes.appBar}\n variant=\"outlined\"\n >\n <Toolbar className={classes.toolbar}>\n <IconButton\n edge=\"start\"\n color=\"inherit\"\n aria-label=\"open drawer\"\n onClick={props.toggleDrawer}\n className={classes.menuButton}\n >\n <MenuIcon />\n </IconButton>\n <Typography\n component=\"h1\"\n variant=\"h6\"\n noWrap\n className={classes.title}\n color=\"textPrimary\"\n >\n Asynq Monitoring\n </Typography>\n </Toolbar>\n </AppBar>\n <div className={classes.mainContainer}>\n <Drawer\n variant=\"permanent\"\n classes={{\n paper: clsx(\n classes.drawerPaper,\n !props.isDrawerOpen && classes.drawerPaperClose\n ),\n }}\n open={props.isDrawerOpen}\n >\n <Snackbar\n anchorOrigin={{ vertical: \"bottom\", horizontal: \"left\" }}\n open={props.snackbar.isOpen}\n autoHideDuration={6000}\n onClose={props.closeSnackbar}\n TransitionComponent={SlideUpTransition}\n >\n <SnackbarContent\n message={props.snackbar.message}\n className={classes.snackbar}\n action={\n <IconButton\n size=\"small\"\n aria-label=\"close\"\n color=\"inherit\"\n onClick={props.closeSnackbar}\n >\n <CloseIcon\n className={classes.snackbarCloseIcon}\n fontSize=\"small\"\n />\n </IconButton>\n }\n />\n </Snackbar>\n <div className={classes.appBarSpacer} />\n <div className={classes.sidebarContainer}>\n <List>\n <div>\n <ListItemLink\n to={paths.HOME}\n primary=\"Queues\"\n icon={<BarChartIcon />}\n />\n <ListItemLink\n to={paths.SERVERS}\n primary=\"Servers\"\n icon={<DoubleArrowIcon />}\n />\n <ListItemLink\n to={paths.SCHEDULERS}\n primary=\"Schedulers\"\n icon={<ScheduleIcon />}\n />\n <ListItemLink\n to={paths.REDIS}\n primary=\"Redis\"\n icon={<LayersIcon />}\n />\n </div>\n </List>\n <List>\n <ListItemLink\n to={paths.SETTINGS}\n primary=\"Settings\"\n icon={<SettingsIcon />}\n />\n <ListItem\n button\n component=\"a\"\n className={classes.listItem}\n href=\"https://github.com/hibiken/asynqmon/issues\"\n target=\"_blank\"\n >\n <ListItemIcon>\n <FeedbackIcon />\n </ListItemIcon>\n <ListItemText primary=\"Send Feedback\" />\n </ListItem>\n </List>\n </div>\n </Drawer>\n <main className={classes.content}>\n <div className={classes.contentWrapper}>\n <Switch>\n <Route exact path={paths.TASK_DETAILS}>\n <TaskDetailsView />\n </Route>\n <Route exact path={paths.QUEUE_DETAILS}>\n <TasksView />\n </Route>\n <Route exact path={paths.SCHEDULERS}>\n <SchedulersView />\n </Route>\n <Route exact path={paths.SERVERS}>\n <ServersView />\n </Route>\n <Route exact path={paths.REDIS}>\n <RedisInfoView />\n </Route>\n <Route exact path={paths.SETTINGS}>\n <SettingsView />\n </Route>\n <Route exact path={paths.HOME}>\n <DashboardView />\n </Route>\n <Route path=\"*\">\n <PageNotFoundView />\n </Route>\n </Switch>\n </div>\n </main>\n </div>\n </div>\n </Router>\n </ThemeProvider>\n );\n}\n\nexport default connector(App);\n","import {\n LIST_QUEUES_SUCCESS,\n LIST_QUEUES_BEGIN,\n QueuesActionTypes,\n PAUSE_QUEUE_BEGIN,\n PAUSE_QUEUE_SUCCESS,\n PAUSE_QUEUE_ERROR,\n RESUME_QUEUE_BEGIN,\n RESUME_QUEUE_ERROR,\n RESUME_QUEUE_SUCCESS,\n DELETE_QUEUE_BEGIN,\n DELETE_QUEUE_ERROR,\n DELETE_QUEUE_SUCCESS,\n LIST_QUEUES_ERROR,\n} from \"../actions/queuesActions\";\nimport {\n BATCH_DELETE_ARCHIVED_TASKS_SUCCESS,\n BATCH_DELETE_RETRY_TASKS_SUCCESS,\n BATCH_DELETE_SCHEDULED_TASKS_SUCCESS,\n BATCH_ARCHIVE_RETRY_TASKS_SUCCESS,\n BATCH_ARCHIVE_SCHEDULED_TASKS_SUCCESS,\n BATCH_RUN_ARCHIVED_TASKS_SUCCESS,\n BATCH_RUN_RETRY_TASKS_SUCCESS,\n BATCH_RUN_SCHEDULED_TASKS_SUCCESS,\n DELETE_ALL_ARCHIVED_TASKS_SUCCESS,\n DELETE_ALL_RETRY_TASKS_SUCCESS,\n DELETE_ALL_SCHEDULED_TASKS_SUCCESS,\n DELETE_ARCHIVED_TASK_SUCCESS,\n DELETE_RETRY_TASK_SUCCESS,\n DELETE_SCHEDULED_TASK_SUCCESS,\n ARCHIVE_ALL_RETRY_TASKS_SUCCESS,\n ARCHIVE_ALL_SCHEDULED_TASKS_SUCCESS,\n ARCHIVE_RETRY_TASK_SUCCESS,\n ARCHIVE_SCHEDULED_TASK_SUCCESS,\n LIST_ACTIVE_TASKS_SUCCESS,\n LIST_ARCHIVED_TASKS_SUCCESS,\n LIST_PENDING_TASKS_SUCCESS,\n LIST_RETRY_TASKS_SUCCESS,\n LIST_SCHEDULED_TASKS_SUCCESS,\n RUN_ALL_ARCHIVED_TASKS_SUCCESS,\n RUN_ALL_RETRY_TASKS_SUCCESS,\n RUN_ALL_SCHEDULED_TASKS_SUCCESS,\n RUN_ARCHIVED_TASK_SUCCESS,\n RUN_RETRY_TASK_SUCCESS,\n RUN_SCHEDULED_TASK_SUCCESS,\n TasksActionTypes,\n ARCHIVE_PENDING_TASK_SUCCESS,\n DELETE_PENDING_TASK_SUCCESS,\n BATCH_ARCHIVE_PENDING_TASKS_SUCCESS,\n BATCH_DELETE_PENDING_TASKS_SUCCESS,\n ARCHIVE_ALL_PENDING_TASKS_SUCCESS,\n DELETE_ALL_PENDING_TASKS_SUCCESS,\n DELETE_COMPLETED_TASK_SUCCESS,\n DELETE_ALL_COMPLETED_TASKS_SUCCESS,\n BATCH_DELETE_COMPLETED_TASKS_SUCCESS,\n} from \"../actions/tasksActions\";\nimport { Queue } from \"../api\";\n\ninterface QueuesState {\n loading: boolean;\n data: QueueInfo[];\n error: string;\n}\n\nexport interface QueueInfo {\n name: string; // name of the queue.\n currentStats: Queue;\n requestPending: boolean; // indicates pause/resume/delete action is pending on this queue\n}\n\nconst initialState: QueuesState = { data: [], loading: false, error: \"\" };\n\nfunction queuesReducer(\n state = initialState,\n action: QueuesActionTypes | TasksActionTypes\n): QueuesState {\n switch (action.type) {\n case LIST_QUEUES_BEGIN:\n return { ...state, loading: true };\n\n case LIST_QUEUES_SUCCESS:\n const { queues } = action.payload;\n return {\n ...state,\n loading: false,\n error: \"\",\n data: queues.map((q: Queue) => ({\n name: q.queue,\n currentStats: q,\n requestPending: false,\n })),\n };\n\n case LIST_QUEUES_ERROR:\n return {\n ...state,\n loading: false,\n error: action.error,\n };\n\n case DELETE_QUEUE_BEGIN:\n case PAUSE_QUEUE_BEGIN:\n case RESUME_QUEUE_BEGIN: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return { ...queueInfo, requestPending: true };\n });\n return { ...state, data: newData };\n }\n\n case DELETE_QUEUE_SUCCESS: {\n const newData = state.data.filter(\n (queueInfo) => queueInfo.name !== action.queue\n );\n return { ...state, data: newData };\n }\n\n case PAUSE_QUEUE_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n requestPending: false,\n currentStats: { ...queueInfo.currentStats, paused: true },\n };\n });\n return { ...state, data: newData };\n }\n\n case RESUME_QUEUE_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n requestPending: false,\n currentStats: { ...queueInfo.currentStats, paused: false },\n };\n });\n return { ...state, data: newData };\n }\n\n case DELETE_QUEUE_ERROR:\n case PAUSE_QUEUE_ERROR:\n case RESUME_QUEUE_ERROR: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n requestPending: false,\n };\n });\n return { ...state, data: newData };\n }\n\n case LIST_ACTIVE_TASKS_SUCCESS:\n case LIST_PENDING_TASKS_SUCCESS:\n case LIST_SCHEDULED_TASKS_SUCCESS:\n case LIST_RETRY_TASKS_SUCCESS:\n case LIST_ARCHIVED_TASKS_SUCCESS: {\n const newData = state.data\n .filter((queueInfo) => queueInfo.name !== action.queue)\n .concat({\n name: action.queue,\n currentStats: action.payload.stats,\n requestPending: false,\n });\n return { ...state, data: newData };\n }\n\n case RUN_SCHEDULED_TASK_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n pending: queueInfo.currentStats.pending + 1,\n scheduled: queueInfo.currentStats.scheduled - 1,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case RUN_RETRY_TASK_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n pending: queueInfo.currentStats.pending + 1,\n retry: queueInfo.currentStats.retry - 1,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case RUN_ARCHIVED_TASK_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n pending: queueInfo.currentStats.pending + 1,\n archived: queueInfo.currentStats.archived - 1,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case ARCHIVE_PENDING_TASK_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n archived: queueInfo.currentStats.archived + 1,\n pending: queueInfo.currentStats.pending - 1,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case ARCHIVE_SCHEDULED_TASK_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n archived: queueInfo.currentStats.archived + 1,\n scheduled: queueInfo.currentStats.scheduled - 1,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case ARCHIVE_RETRY_TASK_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n archived: queueInfo.currentStats.archived + 1,\n retry: queueInfo.currentStats.retry - 1,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case DELETE_PENDING_TASK_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n size: queueInfo.currentStats.size - 1,\n pending: queueInfo.currentStats.pending - 1,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case DELETE_SCHEDULED_TASK_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n size: queueInfo.currentStats.size - 1,\n scheduled: queueInfo.currentStats.scheduled - 1,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case BATCH_ARCHIVE_PENDING_TASKS_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n archived:\n queueInfo.currentStats.archived +\n action.payload.archived_ids.length,\n pending:\n queueInfo.currentStats.pending -\n action.payload.archived_ids.length,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case BATCH_DELETE_PENDING_TASKS_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n size:\n queueInfo.currentStats.size - action.payload.deleted_ids.length,\n pending:\n queueInfo.currentStats.pending -\n action.payload.deleted_ids.length,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case ARCHIVE_ALL_PENDING_TASKS_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n archived:\n queueInfo.currentStats.archived + queueInfo.currentStats.pending,\n pending: 0,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case DELETE_ALL_PENDING_TASKS_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n size: queueInfo.currentStats.size - action.deleted,\n pending: 0,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case BATCH_RUN_SCHEDULED_TASKS_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n pending:\n queueInfo.currentStats.pending +\n action.payload.pending_ids.length,\n scheduled:\n queueInfo.currentStats.scheduled -\n action.payload.pending_ids.length,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case BATCH_ARCHIVE_SCHEDULED_TASKS_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n archived:\n queueInfo.currentStats.archived +\n action.payload.archived_ids.length,\n scheduled:\n queueInfo.currentStats.scheduled -\n action.payload.archived_ids.length,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case BATCH_DELETE_SCHEDULED_TASKS_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n size:\n queueInfo.currentStats.size - action.payload.deleted_ids.length,\n scheduled:\n queueInfo.currentStats.scheduled -\n action.payload.deleted_ids.length,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case RUN_ALL_SCHEDULED_TASKS_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n pending:\n queueInfo.currentStats.pending + queueInfo.currentStats.scheduled,\n scheduled: 0,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case ARCHIVE_ALL_SCHEDULED_TASKS_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n archived:\n queueInfo.currentStats.archived +\n queueInfo.currentStats.scheduled,\n scheduled: 0,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case DELETE_ALL_SCHEDULED_TASKS_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n size: queueInfo.currentStats.size - action.deleted,\n scheduled: 0,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case DELETE_RETRY_TASK_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n size: queueInfo.currentStats.size - 1,\n retry: queueInfo.currentStats.retry - 1,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case BATCH_RUN_RETRY_TASKS_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n pending:\n queueInfo.currentStats.pending +\n action.payload.pending_ids.length,\n retry:\n queueInfo.currentStats.retry - action.payload.pending_ids.length,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case BATCH_ARCHIVE_RETRY_TASKS_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n archived:\n queueInfo.currentStats.pending +\n action.payload.archived_ids.length,\n retry:\n queueInfo.currentStats.retry - action.payload.archived_ids.length,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case BATCH_DELETE_RETRY_TASKS_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n size:\n queueInfo.currentStats.size - action.payload.deleted_ids.length,\n retry:\n queueInfo.currentStats.retry - action.payload.deleted_ids.length,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case RUN_ALL_RETRY_TASKS_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n pending:\n queueInfo.currentStats.pending + queueInfo.currentStats.retry,\n retry: 0,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case ARCHIVE_ALL_RETRY_TASKS_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n archived:\n queueInfo.currentStats.archived + queueInfo.currentStats.retry,\n retry: 0,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case DELETE_ALL_RETRY_TASKS_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n size: queueInfo.currentStats.size - action.deleted,\n retry: 0,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case DELETE_ARCHIVED_TASK_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n size: queueInfo.currentStats.size - 1,\n archived: queueInfo.currentStats.archived - 1,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case DELETE_COMPLETED_TASK_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n size: queueInfo.currentStats.size - 1,\n completed: queueInfo.currentStats.completed - 1,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case BATCH_RUN_ARCHIVED_TASKS_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n pending:\n queueInfo.currentStats.pending +\n action.payload.pending_ids.length,\n archived:\n queueInfo.currentStats.archived -\n action.payload.pending_ids.length,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case BATCH_DELETE_ARCHIVED_TASKS_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n size:\n queueInfo.currentStats.size - action.payload.deleted_ids.length,\n archived:\n queueInfo.currentStats.archived -\n action.payload.deleted_ids.length,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case BATCH_DELETE_COMPLETED_TASKS_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n size:\n queueInfo.currentStats.size - action.payload.deleted_ids.length,\n completed:\n queueInfo.currentStats.completed -\n action.payload.deleted_ids.length,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case RUN_ALL_ARCHIVED_TASKS_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n pending:\n queueInfo.currentStats.pending + queueInfo.currentStats.archived,\n archived: 0,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case DELETE_ALL_ARCHIVED_TASKS_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n size: queueInfo.currentStats.size - action.deleted,\n archived: 0,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case DELETE_ALL_COMPLETED_TASKS_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: {\n ...queueInfo.currentStats,\n size: queueInfo.currentStats.size - action.deleted,\n completed: 0,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n default:\n return state;\n }\n}\n\nexport default queuesReducer;\n","import {\n LIST_ACTIVE_TASKS_BEGIN,\n LIST_ACTIVE_TASKS_SUCCESS,\n LIST_ACTIVE_TASKS_ERROR,\n TasksActionTypes,\n LIST_PENDING_TASKS_BEGIN,\n LIST_PENDING_TASKS_SUCCESS,\n LIST_PENDING_TASKS_ERROR,\n LIST_SCHEDULED_TASKS_BEGIN,\n LIST_SCHEDULED_TASKS_SUCCESS,\n LIST_SCHEDULED_TASKS_ERROR,\n LIST_RETRY_TASKS_BEGIN,\n LIST_RETRY_TASKS_SUCCESS,\n LIST_RETRY_TASKS_ERROR,\n LIST_ARCHIVED_TASKS_BEGIN,\n LIST_ARCHIVED_TASKS_SUCCESS,\n LIST_ARCHIVED_TASKS_ERROR,\n LIST_COMPLETED_TASKS_BEGIN,\n LIST_COMPLETED_TASKS_SUCCESS,\n LIST_COMPLETED_TASKS_ERROR,\n CANCEL_ACTIVE_TASK_BEGIN,\n CANCEL_ACTIVE_TASK_SUCCESS,\n CANCEL_ACTIVE_TASK_ERROR,\n DELETE_RETRY_TASK_BEGIN,\n DELETE_RETRY_TASK_SUCCESS,\n DELETE_RETRY_TASK_ERROR,\n DELETE_SCHEDULED_TASK_BEGIN,\n DELETE_SCHEDULED_TASK_SUCCESS,\n DELETE_SCHEDULED_TASK_ERROR,\n DELETE_ARCHIVED_TASK_BEGIN,\n DELETE_ARCHIVED_TASK_SUCCESS,\n DELETE_ARCHIVED_TASK_ERROR,\n BATCH_DELETE_ARCHIVED_TASKS_BEGIN,\n BATCH_DELETE_ARCHIVED_TASKS_SUCCESS,\n BATCH_DELETE_ARCHIVED_TASKS_ERROR,\n RUN_ARCHIVED_TASK_BEGIN,\n RUN_ARCHIVED_TASK_SUCCESS,\n RUN_ARCHIVED_TASK_ERROR,\n BATCH_RUN_ARCHIVED_TASKS_BEGIN,\n BATCH_RUN_ARCHIVED_TASKS_ERROR,\n BATCH_RUN_ARCHIVED_TASKS_SUCCESS,\n DELETE_ALL_ARCHIVED_TASKS_BEGIN,\n DELETE_ALL_ARCHIVED_TASKS_SUCCESS,\n DELETE_ALL_ARCHIVED_TASKS_ERROR,\n RUN_ALL_ARCHIVED_TASKS_BEGIN,\n RUN_ALL_ARCHIVED_TASKS_ERROR,\n RUN_ALL_ARCHIVED_TASKS_SUCCESS,\n BATCH_DELETE_RETRY_TASKS_ERROR,\n BATCH_RUN_RETRY_TASKS_ERROR,\n BATCH_DELETE_RETRY_TASKS_SUCCESS,\n BATCH_RUN_RETRY_TASKS_SUCCESS,\n BATCH_DELETE_RETRY_TASKS_BEGIN,\n BATCH_RUN_RETRY_TASKS_BEGIN,\n DELETE_ALL_RETRY_TASKS_ERROR,\n RUN_ALL_RETRY_TASKS_ERROR,\n DELETE_ALL_RETRY_TASKS_SUCCESS,\n RUN_ALL_RETRY_TASKS_SUCCESS,\n DELETE_ALL_RETRY_TASKS_BEGIN,\n RUN_ALL_RETRY_TASKS_BEGIN,\n BATCH_DELETE_SCHEDULED_TASKS_ERROR,\n BATCH_RUN_SCHEDULED_TASKS_ERROR,\n BATCH_DELETE_SCHEDULED_TASKS_SUCCESS,\n BATCH_RUN_SCHEDULED_TASKS_SUCCESS,\n BATCH_DELETE_SCHEDULED_TASKS_BEGIN,\n BATCH_RUN_SCHEDULED_TASKS_BEGIN,\n DELETE_ALL_SCHEDULED_TASKS_ERROR,\n RUN_ALL_SCHEDULED_TASKS_ERROR,\n DELETE_ALL_SCHEDULED_TASKS_SUCCESS,\n RUN_ALL_SCHEDULED_TASKS_SUCCESS,\n DELETE_ALL_SCHEDULED_TASKS_BEGIN,\n RUN_ALL_SCHEDULED_TASKS_BEGIN,\n RUN_RETRY_TASK_BEGIN,\n RUN_RETRY_TASK_SUCCESS,\n RUN_RETRY_TASK_ERROR,\n RUN_SCHEDULED_TASK_BEGIN,\n RUN_SCHEDULED_TASK_SUCCESS,\n RUN_SCHEDULED_TASK_ERROR,\n ARCHIVE_SCHEDULED_TASK_BEGIN,\n ARCHIVE_SCHEDULED_TASK_SUCCESS,\n ARCHIVE_SCHEDULED_TASK_ERROR,\n ARCHIVE_ALL_SCHEDULED_TASKS_BEGIN,\n ARCHIVE_ALL_SCHEDULED_TASKS_SUCCESS,\n ARCHIVE_ALL_SCHEDULED_TASKS_ERROR,\n BATCH_ARCHIVE_SCHEDULED_TASKS_BEGIN,\n BATCH_ARCHIVE_SCHEDULED_TASKS_ERROR,\n BATCH_ARCHIVE_SCHEDULED_TASKS_SUCCESS,\n ARCHIVE_RETRY_TASK_BEGIN,\n ARCHIVE_RETRY_TASK_SUCCESS,\n ARCHIVE_RETRY_TASK_ERROR,\n ARCHIVE_ALL_RETRY_TASKS_BEGIN,\n ARCHIVE_ALL_RETRY_TASKS_SUCCESS,\n ARCHIVE_ALL_RETRY_TASKS_ERROR,\n BATCH_ARCHIVE_RETRY_TASKS_SUCCESS,\n BATCH_ARCHIVE_RETRY_TASKS_BEGIN,\n BATCH_ARCHIVE_RETRY_TASKS_ERROR,\n BATCH_CANCEL_ACTIVE_TASKS_BEGIN,\n BATCH_CANCEL_ACTIVE_TASKS_SUCCESS,\n BATCH_CANCEL_ACTIVE_TASKS_ERROR,\n CANCEL_ALL_ACTIVE_TASKS_BEGIN,\n CANCEL_ALL_ACTIVE_TASKS_SUCCESS,\n CANCEL_ALL_ACTIVE_TASKS_ERROR,\n ARCHIVE_PENDING_TASK_BEGIN,\n DELETE_PENDING_TASK_BEGIN,\n ARCHIVE_PENDING_TASK_SUCCESS,\n DELETE_PENDING_TASK_SUCCESS,\n ARCHIVE_PENDING_TASK_ERROR,\n DELETE_PENDING_TASK_ERROR,\n ARCHIVE_ALL_PENDING_TASKS_BEGIN,\n DELETE_ALL_PENDING_TASKS_BEGIN,\n ARCHIVE_ALL_PENDING_TASKS_SUCCESS,\n DELETE_ALL_PENDING_TASKS_SUCCESS,\n ARCHIVE_ALL_PENDING_TASKS_ERROR,\n DELETE_ALL_PENDING_TASKS_ERROR,\n BATCH_ARCHIVE_PENDING_TASKS_BEGIN,\n BATCH_DELETE_PENDING_TASKS_BEGIN,\n BATCH_ARCHIVE_PENDING_TASKS_SUCCESS,\n BATCH_DELETE_PENDING_TASKS_SUCCESS,\n BATCH_ARCHIVE_PENDING_TASKS_ERROR,\n BATCH_DELETE_PENDING_TASKS_ERROR,\n GET_TASK_INFO_BEGIN,\n GET_TASK_INFO_ERROR,\n GET_TASK_INFO_SUCCESS,\n DELETE_COMPLETED_TASK_BEGIN,\n DELETE_COMPLETED_TASK_ERROR,\n DELETE_COMPLETED_TASK_SUCCESS,\n DELETE_ALL_COMPLETED_TASKS_BEGIN,\n DELETE_ALL_COMPLETED_TASKS_ERROR,\n DELETE_ALL_COMPLETED_TASKS_SUCCESS,\n BATCH_DELETE_COMPLETED_TASKS_BEGIN,\n BATCH_DELETE_COMPLETED_TASKS_ERROR,\n BATCH_DELETE_COMPLETED_TASKS_SUCCESS,\n} from \"../actions/tasksActions\";\nimport { TaskInfo } from \"../api\";\n\nexport interface ActiveTaskExtended extends TaskInfo {\n // Indicates that a request has been sent for this\n // task and awaiting for a response.\n requestPending: boolean;\n\n // Incidates that a cancelation signal has been\n // published for this task.\n canceling: boolean;\n}\n\nexport interface TaskInfoExtended extends TaskInfo {\n // Indicates that a request has been sent for this\n // task and awaiting for a response.\n requestPending: boolean;\n}\n\ninterface TasksState {\n activeTasks: {\n loading: boolean;\n batchActionPending: boolean;\n allActionPending: boolean;\n error: string;\n data: ActiveTaskExtended[];\n };\n pendingTasks: {\n loading: boolean;\n batchActionPending: boolean;\n allActionPending: boolean;\n error: string;\n data: TaskInfoExtended[];\n };\n scheduledTasks: {\n loading: boolean;\n batchActionPending: boolean;\n allActionPending: boolean;\n error: string;\n data: TaskInfoExtended[];\n };\n retryTasks: {\n loading: boolean;\n batchActionPending: boolean;\n allActionPending: boolean;\n error: string;\n data: TaskInfoExtended[];\n };\n archivedTasks: {\n loading: boolean;\n batchActionPending: boolean;\n allActionPending: boolean;\n error: string;\n data: TaskInfoExtended[];\n };\n completedTasks: {\n loading: boolean;\n batchActionPending: boolean;\n allActionPending: boolean;\n error: string;\n data: TaskInfoExtended[];\n };\n taskInfo: {\n loading: boolean;\n error: string;\n data?: TaskInfo;\n };\n}\n\nconst initialState: TasksState = {\n activeTasks: {\n loading: false,\n batchActionPending: false,\n allActionPending: false,\n error: \"\",\n data: [],\n },\n pendingTasks: {\n loading: false,\n batchActionPending: false,\n allActionPending: false,\n error: \"\",\n data: [],\n },\n scheduledTasks: {\n loading: false,\n batchActionPending: false,\n allActionPending: false,\n error: \"\",\n data: [],\n },\n retryTasks: {\n loading: false,\n batchActionPending: false,\n allActionPending: false,\n error: \"\",\n data: [],\n },\n archivedTasks: {\n loading: false,\n batchActionPending: false,\n allActionPending: false,\n error: \"\",\n data: [],\n },\n completedTasks: {\n loading: false,\n batchActionPending: false,\n allActionPending: false,\n error: \"\",\n data: [],\n },\n taskInfo: {\n loading: false,\n error: \"\",\n },\n};\n\nfunction tasksReducer(\n state = initialState,\n action: TasksActionTypes\n): TasksState {\n switch (action.type) {\n case GET_TASK_INFO_BEGIN:\n return {\n ...state,\n taskInfo: {\n ...state.taskInfo,\n loading: true,\n },\n };\n\n case GET_TASK_INFO_ERROR:\n return {\n ...state,\n taskInfo: {\n loading: false,\n error: action.error,\n },\n };\n\n case GET_TASK_INFO_SUCCESS:\n return {\n ...state,\n taskInfo: {\n loading: false,\n error: \"\",\n data: action.payload,\n },\n };\n\n case LIST_ACTIVE_TASKS_BEGIN:\n return {\n ...state,\n activeTasks: {\n ...state.activeTasks,\n loading: true,\n },\n };\n\n case LIST_ACTIVE_TASKS_SUCCESS:\n return {\n ...state,\n activeTasks: {\n ...state.activeTasks,\n loading: false,\n error: \"\",\n data: action.payload.tasks.map((task) => ({\n ...task,\n canceling: false,\n requestPending: false,\n })),\n },\n };\n\n case LIST_ACTIVE_TASKS_ERROR:\n return {\n ...state,\n activeTasks: {\n ...state.activeTasks,\n loading: false,\n error: action.error,\n data: [],\n },\n };\n\n case LIST_PENDING_TASKS_BEGIN:\n return {\n ...state,\n pendingTasks: {\n ...state.pendingTasks,\n loading: true,\n },\n };\n\n case LIST_PENDING_TASKS_SUCCESS:\n return {\n ...state,\n pendingTasks: {\n ...state.pendingTasks,\n loading: false,\n error: \"\",\n data: action.payload.tasks.map((task) => ({\n ...task,\n requestPending: false,\n })),\n },\n };\n\n case LIST_PENDING_TASKS_ERROR:\n return {\n ...state,\n pendingTasks: {\n ...state.pendingTasks,\n loading: false,\n error: action.error,\n data: [],\n },\n };\n\n case LIST_SCHEDULED_TASKS_BEGIN:\n return {\n ...state,\n scheduledTasks: {\n ...state.scheduledTasks,\n loading: true,\n },\n };\n\n case LIST_SCHEDULED_TASKS_SUCCESS:\n return {\n ...state,\n scheduledTasks: {\n ...state.scheduledTasks,\n loading: false,\n error: \"\",\n data: action.payload.tasks.map((task) => ({\n ...task,\n requestPending: false,\n })),\n },\n };\n\n case LIST_SCHEDULED_TASKS_ERROR:\n return {\n ...state,\n scheduledTasks: {\n ...state.scheduledTasks,\n loading: false,\n error: action.error,\n data: [],\n },\n };\n\n case LIST_RETRY_TASKS_BEGIN:\n return {\n ...state,\n retryTasks: {\n ...state.retryTasks,\n loading: true,\n },\n };\n\n case LIST_RETRY_TASKS_SUCCESS:\n return {\n ...state,\n retryTasks: {\n ...state.retryTasks,\n loading: false,\n error: \"\",\n data: action.payload.tasks.map((task) => ({\n ...task,\n requestPending: false,\n })),\n },\n };\n\n case LIST_RETRY_TASKS_ERROR:\n return {\n ...state,\n retryTasks: {\n ...state.retryTasks,\n loading: false,\n error: action.error,\n data: [],\n },\n };\n\n case LIST_ARCHIVED_TASKS_BEGIN:\n return {\n ...state,\n archivedTasks: {\n ...state.archivedTasks,\n loading: true,\n },\n };\n\n case LIST_ARCHIVED_TASKS_SUCCESS:\n return {\n ...state,\n archivedTasks: {\n ...state.archivedTasks,\n loading: false,\n error: \"\",\n data: action.payload.tasks.map((task) => ({\n ...task,\n requestPending: false,\n })),\n },\n };\n\n case LIST_ARCHIVED_TASKS_ERROR:\n return {\n ...state,\n archivedTasks: {\n ...state.archivedTasks,\n loading: false,\n error: action.error,\n data: [],\n },\n };\n\n case LIST_COMPLETED_TASKS_BEGIN:\n return {\n ...state,\n completedTasks: {\n ...state.completedTasks,\n loading: true,\n },\n };\n\n case LIST_COMPLETED_TASKS_SUCCESS:\n return {\n ...state,\n completedTasks: {\n ...state.completedTasks,\n loading: false,\n error: \"\",\n data: action.payload.tasks.map((task) => ({\n ...task,\n requestPending: false,\n })),\n },\n };\n\n case LIST_COMPLETED_TASKS_ERROR:\n return {\n ...state,\n completedTasks: {\n ...state.completedTasks,\n loading: false,\n error: action.error,\n data: [],\n },\n };\n\n case DELETE_COMPLETED_TASK_BEGIN:\n return {\n ...state,\n completedTasks: {\n ...state.completedTasks,\n data: state.completedTasks.data.map((task) => {\n if (task.id !== action.taskId) {\n return task;\n }\n return { ...task, requestPending: true };\n }),\n },\n };\n\n case DELETE_COMPLETED_TASK_SUCCESS:\n return {\n ...state,\n completedTasks: {\n ...state.completedTasks,\n data: state.completedTasks.data.filter(\n (task) => task.id !== action.taskId\n ),\n },\n };\n\n case DELETE_COMPLETED_TASK_ERROR:\n return {\n ...state,\n completedTasks: {\n ...state.completedTasks,\n data: state.completedTasks.data.map((task) => {\n if (task.id !== action.taskId) {\n return task;\n }\n return { ...task, requestPending: false };\n }),\n },\n };\n\n case DELETE_ALL_COMPLETED_TASKS_BEGIN:\n return {\n ...state,\n completedTasks: {\n ...state.completedTasks,\n allActionPending: true,\n },\n };\n\n case DELETE_ALL_COMPLETED_TASKS_SUCCESS:\n return {\n ...state,\n completedTasks: {\n ...state.completedTasks,\n allActionPending: false,\n data: [],\n },\n };\n\n case DELETE_ALL_COMPLETED_TASKS_ERROR:\n return {\n ...state,\n completedTasks: {\n ...state.completedTasks,\n allActionPending: false,\n },\n };\n\n case BATCH_DELETE_COMPLETED_TASKS_BEGIN:\n return {\n ...state,\n completedTasks: {\n ...state.completedTasks,\n batchActionPending: true,\n data: state.completedTasks.data.map((task) => {\n if (!action.taskIds.includes(task.id)) {\n return task;\n }\n return {\n ...task,\n requestPending: true,\n };\n }),\n },\n };\n\n case BATCH_DELETE_COMPLETED_TASKS_SUCCESS: {\n const newData = state.completedTasks.data.filter(\n (task) => !action.payload.deleted_ids.includes(task.id)\n );\n return {\n ...state,\n completedTasks: {\n ...state.completedTasks,\n batchActionPending: false,\n data: newData,\n },\n };\n }\n\n case BATCH_DELETE_COMPLETED_TASKS_ERROR:\n return {\n ...state,\n completedTasks: {\n ...state.completedTasks,\n batchActionPending: false,\n data: state.completedTasks.data.map((task) => {\n if (!action.taskIds.includes(task.id)) {\n return task;\n }\n return {\n ...task,\n requestPending: false,\n };\n }),\n },\n };\n\n case CANCEL_ACTIVE_TASK_BEGIN: {\n const newData = state.activeTasks.data.map((task) => {\n if (task.id !== action.taskId) {\n return task;\n }\n return { ...task, requestPending: true };\n });\n return {\n ...state,\n activeTasks: {\n ...state.activeTasks,\n data: newData,\n },\n };\n }\n\n case CANCEL_ACTIVE_TASK_SUCCESS: {\n const newData = state.activeTasks.data.map((task) => {\n if (task.id !== action.taskId) {\n return task;\n }\n return { ...task, requestPending: false, canceling: true };\n });\n return {\n ...state,\n activeTasks: {\n ...state.activeTasks,\n data: newData,\n },\n };\n }\n\n case CANCEL_ACTIVE_TASK_ERROR:\n const newData = state.activeTasks.data.map((task) => {\n if (task.id !== action.taskId) {\n return task;\n }\n return { ...task, requestPending: false };\n });\n return {\n ...state,\n activeTasks: {\n ...state.activeTasks,\n data: newData,\n },\n };\n\n case BATCH_CANCEL_ACTIVE_TASKS_BEGIN: {\n const newData = state.activeTasks.data.map((task) => {\n if (!action.taskIds.includes(task.id)) {\n return task;\n }\n return { ...task, requestPending: true };\n });\n return {\n ...state,\n activeTasks: {\n ...state.activeTasks,\n batchActionPending: true,\n data: newData,\n },\n };\n }\n\n case BATCH_CANCEL_ACTIVE_TASKS_SUCCESS: {\n const newData = state.activeTasks.data.map((task) => {\n if (action.payload.canceled_ids.includes(task.id)) {\n return { ...task, canceling: true, requestPending: false };\n }\n if (action.payload.error_ids.includes(task.id)) {\n return { ...task, requestPending: false };\n }\n return task;\n });\n return {\n ...state,\n activeTasks: {\n ...state.activeTasks,\n batchActionPending: false,\n data: newData,\n },\n };\n }\n\n case BATCH_CANCEL_ACTIVE_TASKS_ERROR: {\n const newData = state.activeTasks.data.map((task) => {\n return { ...task, requestPending: false };\n });\n return {\n ...state,\n activeTasks: {\n ...state.activeTasks,\n batchActionPending: false,\n data: newData,\n },\n };\n }\n\n case CANCEL_ALL_ACTIVE_TASKS_BEGIN: {\n const newData = state.activeTasks.data.map((task) => ({\n ...task,\n requestPending: true,\n }));\n return {\n ...state,\n activeTasks: {\n ...state.activeTasks,\n allActionPending: true,\n data: newData,\n },\n };\n }\n\n case CANCEL_ALL_ACTIVE_TASKS_SUCCESS: {\n const newData = state.activeTasks.data.map((task) => ({\n ...task,\n requestPending: false,\n canceling: true,\n }));\n return {\n ...state,\n activeTasks: {\n ...state.activeTasks,\n allActionPending: false,\n data: newData,\n },\n };\n }\n\n case CANCEL_ALL_ACTIVE_TASKS_ERROR: {\n const newData = state.activeTasks.data.map((task) => ({\n ...task,\n requestPending: false,\n }));\n return {\n ...state,\n activeTasks: {\n ...state.activeTasks,\n allActionPending: false,\n data: newData,\n },\n };\n }\n\n case ARCHIVE_PENDING_TASK_BEGIN:\n case DELETE_PENDING_TASK_BEGIN:\n return {\n ...state,\n pendingTasks: {\n ...state.pendingTasks,\n data: state.pendingTasks.data.map((task) => {\n if (task.id !== action.taskId) {\n return task;\n }\n return { ...task, requestPending: true };\n }),\n },\n };\n\n case ARCHIVE_PENDING_TASK_SUCCESS:\n case DELETE_PENDING_TASK_SUCCESS:\n return {\n ...state,\n pendingTasks: {\n ...state.pendingTasks,\n data: state.pendingTasks.data.filter(\n (task) => task.id !== action.taskId\n ),\n },\n };\n\n case ARCHIVE_PENDING_TASK_ERROR:\n case DELETE_PENDING_TASK_ERROR:\n return {\n ...state,\n pendingTasks: {\n ...state.pendingTasks,\n data: state.pendingTasks.data.map((task) => {\n if (task.id !== action.taskId) {\n return task;\n }\n return { ...task, requestPending: false };\n }),\n },\n };\n\n case ARCHIVE_ALL_PENDING_TASKS_BEGIN:\n case DELETE_ALL_PENDING_TASKS_BEGIN:\n return {\n ...state,\n pendingTasks: {\n ...state.pendingTasks,\n allActionPending: true,\n },\n };\n\n case ARCHIVE_ALL_PENDING_TASKS_SUCCESS:\n case DELETE_ALL_PENDING_TASKS_SUCCESS:\n return {\n ...state,\n pendingTasks: {\n ...state.pendingTasks,\n allActionPending: false,\n data: [],\n },\n };\n\n case ARCHIVE_ALL_PENDING_TASKS_ERROR:\n case DELETE_ALL_PENDING_TASKS_ERROR:\n return {\n ...state,\n pendingTasks: {\n ...state.pendingTasks,\n allActionPending: false,\n },\n };\n\n case BATCH_ARCHIVE_PENDING_TASKS_BEGIN:\n case BATCH_DELETE_PENDING_TASKS_BEGIN:\n return {\n ...state,\n pendingTasks: {\n ...state.pendingTasks,\n batchActionPending: true,\n data: state.pendingTasks.data.map((task) => {\n if (!action.taskIds.includes(task.id)) {\n return task;\n }\n return {\n ...task,\n requestPending: true,\n };\n }),\n },\n };\n\n case BATCH_ARCHIVE_PENDING_TASKS_SUCCESS: {\n const newData = state.pendingTasks.data.filter(\n (task) => !action.payload.archived_ids.includes(task.id)\n );\n return {\n ...state,\n pendingTasks: {\n ...state.pendingTasks,\n batchActionPending: false,\n data: newData,\n },\n };\n }\n\n case BATCH_DELETE_PENDING_TASKS_SUCCESS: {\n const newData = state.pendingTasks.data.filter(\n (task) => !action.payload.deleted_ids.includes(task.id)\n );\n return {\n ...state,\n pendingTasks: {\n ...state.pendingTasks,\n batchActionPending: false,\n data: newData,\n },\n };\n }\n\n case BATCH_ARCHIVE_PENDING_TASKS_ERROR:\n case BATCH_DELETE_PENDING_TASKS_ERROR:\n return {\n ...state,\n pendingTasks: {\n ...state.pendingTasks,\n batchActionPending: false,\n data: state.pendingTasks.data.map((task) => {\n if (!action.taskIds.includes(task.id)) {\n return task;\n }\n return {\n ...task,\n requestPending: false,\n };\n }),\n },\n };\n\n case RUN_SCHEDULED_TASK_BEGIN:\n case ARCHIVE_SCHEDULED_TASK_BEGIN:\n case DELETE_SCHEDULED_TASK_BEGIN:\n return {\n ...state,\n scheduledTasks: {\n ...state.scheduledTasks,\n data: state.scheduledTasks.data.map((task) => {\n if (task.id !== action.taskId) {\n return task;\n }\n return { ...task, requestPending: true };\n }),\n },\n };\n\n case RUN_SCHEDULED_TASK_SUCCESS:\n case ARCHIVE_SCHEDULED_TASK_SUCCESS:\n case DELETE_SCHEDULED_TASK_SUCCESS:\n return {\n ...state,\n scheduledTasks: {\n ...state.scheduledTasks,\n data: state.scheduledTasks.data.filter(\n (task) => task.id !== action.taskId\n ),\n },\n };\n\n case RUN_SCHEDULED_TASK_ERROR:\n case ARCHIVE_SCHEDULED_TASK_ERROR:\n case DELETE_SCHEDULED_TASK_ERROR:\n return {\n ...state,\n scheduledTasks: {\n ...state.scheduledTasks,\n data: state.scheduledTasks.data.map((task) => {\n if (task.id !== action.taskId) {\n return task;\n }\n return { ...task, requestPending: false };\n }),\n },\n };\n\n case RUN_ALL_SCHEDULED_TASKS_BEGIN:\n case ARCHIVE_ALL_SCHEDULED_TASKS_BEGIN:\n case DELETE_ALL_SCHEDULED_TASKS_BEGIN:\n return {\n ...state,\n scheduledTasks: {\n ...state.scheduledTasks,\n allActionPending: true,\n },\n };\n\n case RUN_ALL_SCHEDULED_TASKS_SUCCESS:\n case ARCHIVE_ALL_SCHEDULED_TASKS_SUCCESS:\n case DELETE_ALL_SCHEDULED_TASKS_SUCCESS:\n return {\n ...state,\n scheduledTasks: {\n ...state.scheduledTasks,\n allActionPending: false,\n data: [],\n },\n };\n\n case RUN_ALL_SCHEDULED_TASKS_ERROR:\n case ARCHIVE_ALL_SCHEDULED_TASKS_ERROR:\n case DELETE_ALL_SCHEDULED_TASKS_ERROR:\n return {\n ...state,\n scheduledTasks: {\n ...state.scheduledTasks,\n allActionPending: false,\n },\n };\n\n case BATCH_RUN_SCHEDULED_TASKS_BEGIN:\n case BATCH_ARCHIVE_SCHEDULED_TASKS_BEGIN:\n case BATCH_DELETE_SCHEDULED_TASKS_BEGIN:\n return {\n ...state,\n scheduledTasks: {\n ...state.scheduledTasks,\n batchActionPending: true,\n data: state.scheduledTasks.data.map((task) => {\n if (!action.taskIds.includes(task.id)) {\n return task;\n }\n return {\n ...task,\n requestPending: true,\n };\n }),\n },\n };\n\n case BATCH_RUN_SCHEDULED_TASKS_SUCCESS: {\n const newData = state.scheduledTasks.data.filter(\n (task) => !action.payload.pending_ids.includes(task.id)\n );\n return {\n ...state,\n scheduledTasks: {\n ...state.scheduledTasks,\n batchActionPending: false,\n data: newData,\n },\n };\n }\n\n case BATCH_ARCHIVE_SCHEDULED_TASKS_SUCCESS: {\n const newData = state.scheduledTasks.data.filter(\n (task) => !action.payload.archived_ids.includes(task.id)\n );\n return {\n ...state,\n scheduledTasks: {\n ...state.scheduledTasks,\n batchActionPending: false,\n data: newData,\n },\n };\n }\n\n case BATCH_DELETE_SCHEDULED_TASKS_SUCCESS: {\n const newData = state.scheduledTasks.data.filter(\n (task) => !action.payload.deleted_ids.includes(task.id)\n );\n return {\n ...state,\n scheduledTasks: {\n ...state.scheduledTasks,\n batchActionPending: false,\n data: newData,\n },\n };\n }\n\n case BATCH_RUN_SCHEDULED_TASKS_ERROR:\n case BATCH_ARCHIVE_SCHEDULED_TASKS_ERROR:\n case BATCH_DELETE_SCHEDULED_TASKS_ERROR:\n return {\n ...state,\n scheduledTasks: {\n ...state.scheduledTasks,\n batchActionPending: false,\n data: state.scheduledTasks.data.map((task) => {\n if (!action.taskIds.includes(task.id)) {\n return task;\n }\n return {\n ...task,\n requestPending: false,\n };\n }),\n },\n };\n\n case RUN_RETRY_TASK_BEGIN:\n case ARCHIVE_RETRY_TASK_BEGIN:\n case DELETE_RETRY_TASK_BEGIN:\n return {\n ...state,\n retryTasks: {\n ...state.retryTasks,\n data: state.retryTasks.data.map((task) => {\n if (task.id !== action.taskId) {\n return task;\n }\n return { ...task, requestPending: true };\n }),\n },\n };\n\n case RUN_RETRY_TASK_SUCCESS:\n case ARCHIVE_RETRY_TASK_SUCCESS:\n case DELETE_RETRY_TASK_SUCCESS:\n return {\n ...state,\n retryTasks: {\n ...state.retryTasks,\n data: state.retryTasks.data.filter(\n (task) => task.id !== action.taskId\n ),\n },\n };\n\n case RUN_RETRY_TASK_ERROR:\n case ARCHIVE_RETRY_TASK_ERROR:\n case DELETE_RETRY_TASK_ERROR:\n return {\n ...state,\n retryTasks: {\n ...state.retryTasks,\n data: state.retryTasks.data.map((task) => {\n if (task.id !== action.taskId) {\n return task;\n }\n return { ...task, requestPending: false };\n }),\n },\n };\n\n case RUN_ALL_RETRY_TASKS_BEGIN:\n case ARCHIVE_ALL_RETRY_TASKS_BEGIN:\n case DELETE_ALL_RETRY_TASKS_BEGIN:\n return {\n ...state,\n retryTasks: {\n ...state.retryTasks,\n allActionPending: true,\n },\n };\n\n case RUN_ALL_RETRY_TASKS_SUCCESS:\n case ARCHIVE_ALL_RETRY_TASKS_SUCCESS:\n case DELETE_ALL_RETRY_TASKS_SUCCESS:\n return {\n ...state,\n retryTasks: {\n ...state.retryTasks,\n allActionPending: false,\n data: [],\n },\n };\n\n case RUN_ALL_RETRY_TASKS_ERROR:\n case ARCHIVE_ALL_RETRY_TASKS_ERROR:\n case DELETE_ALL_RETRY_TASKS_ERROR:\n return {\n ...state,\n retryTasks: {\n ...state.retryTasks,\n allActionPending: false,\n },\n };\n\n case BATCH_RUN_RETRY_TASKS_BEGIN:\n case BATCH_ARCHIVE_RETRY_TASKS_BEGIN:\n case BATCH_DELETE_RETRY_TASKS_BEGIN:\n return {\n ...state,\n retryTasks: {\n ...state.retryTasks,\n batchActionPending: true,\n data: state.retryTasks.data.map((task) => {\n if (!action.taskIds.includes(task.id)) {\n return task;\n }\n return {\n ...task,\n requestPending: true,\n };\n }),\n },\n };\n\n case BATCH_RUN_RETRY_TASKS_SUCCESS: {\n const newData = state.retryTasks.data.filter(\n (task) => !action.payload.pending_ids.includes(task.id)\n );\n return {\n ...state,\n retryTasks: {\n ...state.retryTasks,\n batchActionPending: false,\n data: newData,\n },\n };\n }\n\n case BATCH_ARCHIVE_RETRY_TASKS_SUCCESS: {\n const newData = state.retryTasks.data.filter(\n (task) => !action.payload.archived_ids.includes(task.id)\n );\n return {\n ...state,\n retryTasks: {\n ...state.retryTasks,\n batchActionPending: false,\n data: newData,\n },\n };\n }\n\n case BATCH_DELETE_RETRY_TASKS_SUCCESS: {\n const newData = state.retryTasks.data.filter(\n (task) => !action.payload.deleted_ids.includes(task.id)\n );\n return {\n ...state,\n retryTasks: {\n ...state.retryTasks,\n batchActionPending: false,\n data: newData,\n },\n };\n }\n\n case BATCH_RUN_RETRY_TASKS_ERROR:\n case BATCH_ARCHIVE_RETRY_TASKS_ERROR:\n case BATCH_DELETE_RETRY_TASKS_ERROR:\n return {\n ...state,\n retryTasks: {\n ...state.retryTasks,\n batchActionPending: false,\n data: state.retryTasks.data.map((task) => {\n if (!action.taskIds.includes(task.id)) {\n return task;\n }\n return {\n ...task,\n requestPending: false,\n };\n }),\n },\n };\n\n case RUN_ARCHIVED_TASK_BEGIN:\n case DELETE_ARCHIVED_TASK_BEGIN:\n return {\n ...state,\n archivedTasks: {\n ...state.archivedTasks,\n data: state.archivedTasks.data.map((task) => {\n if (task.id !== action.taskId) {\n return task;\n }\n return { ...task, requestPending: true };\n }),\n },\n };\n\n case RUN_ARCHIVED_TASK_SUCCESS:\n case DELETE_ARCHIVED_TASK_SUCCESS:\n return {\n ...state,\n archivedTasks: {\n ...state.archivedTasks,\n data: state.archivedTasks.data.filter(\n (task) => task.id !== action.taskId\n ),\n },\n };\n\n case RUN_ARCHIVED_TASK_ERROR:\n case DELETE_ARCHIVED_TASK_ERROR:\n return {\n ...state,\n archivedTasks: {\n ...state.archivedTasks,\n data: state.archivedTasks.data.map((task) => {\n if (task.id !== action.taskId) {\n return task;\n }\n return { ...task, requestPending: false };\n }),\n },\n };\n\n case RUN_ALL_ARCHIVED_TASKS_BEGIN:\n case DELETE_ALL_ARCHIVED_TASKS_BEGIN:\n return {\n ...state,\n archivedTasks: {\n ...state.archivedTasks,\n allActionPending: true,\n },\n };\n\n case RUN_ALL_ARCHIVED_TASKS_SUCCESS:\n case DELETE_ALL_ARCHIVED_TASKS_SUCCESS:\n return {\n ...state,\n archivedTasks: {\n ...state.archivedTasks,\n allActionPending: false,\n data: [],\n },\n };\n\n case RUN_ALL_ARCHIVED_TASKS_ERROR:\n case DELETE_ALL_ARCHIVED_TASKS_ERROR:\n return {\n ...state,\n archivedTasks: {\n ...state.archivedTasks,\n allActionPending: false,\n },\n };\n\n case BATCH_RUN_ARCHIVED_TASKS_BEGIN:\n case BATCH_DELETE_ARCHIVED_TASKS_BEGIN:\n return {\n ...state,\n archivedTasks: {\n ...state.archivedTasks,\n batchActionPending: true,\n data: state.archivedTasks.data.map((task) => {\n if (!action.taskIds.includes(task.id)) {\n return task;\n }\n return {\n ...task,\n requestPending: true,\n };\n }),\n },\n };\n\n case BATCH_RUN_ARCHIVED_TASKS_SUCCESS: {\n const newData = state.archivedTasks.data.filter(\n (task) => !action.payload.pending_ids.includes(task.id)\n );\n return {\n ...state,\n archivedTasks: {\n ...state.archivedTasks,\n batchActionPending: false,\n data: newData,\n },\n };\n }\n\n case BATCH_DELETE_ARCHIVED_TASKS_SUCCESS: {\n const newData = state.archivedTasks.data.filter(\n (task) => !action.payload.deleted_ids.includes(task.id)\n );\n return {\n ...state,\n archivedTasks: {\n ...state.archivedTasks,\n batchActionPending: false,\n data: newData,\n },\n };\n }\n\n case BATCH_RUN_ARCHIVED_TASKS_ERROR:\n case BATCH_DELETE_ARCHIVED_TASKS_ERROR:\n return {\n ...state,\n archivedTasks: {\n ...state.archivedTasks,\n batchActionPending: false,\n data: state.archivedTasks.data.map((task) => {\n if (!action.taskIds.includes(task.id)) {\n return task;\n }\n return {\n ...task,\n requestPending: false,\n };\n }),\n },\n };\n\n default:\n return state;\n }\n}\n\nexport default tasksReducer;\n","import {\n LIST_SERVERS_BEGIN,\n LIST_SERVERS_ERROR,\n LIST_SERVERS_SUCCESS,\n ServersActionTypes,\n} from \"../actions/serversActions\";\nimport { ServerInfo } from \"../api\";\n\ninterface ServersState {\n loading: boolean;\n error: string;\n data: ServerInfo[];\n}\n\nconst initialState: ServersState = {\n loading: false,\n error: \"\",\n data: [],\n};\n\nexport default function serversReducer(\n state = initialState,\n action: ServersActionTypes\n): ServersState {\n switch (action.type) {\n case LIST_SERVERS_BEGIN:\n return {\n ...state,\n loading: true,\n };\n\n case LIST_SERVERS_SUCCESS:\n return {\n loading: false,\n error: \"\",\n data: action.payload.servers,\n };\n\n case LIST_SERVERS_ERROR:\n return {\n ...state,\n error: action.error,\n loading: false,\n };\n\n default:\n return state;\n }\n}\n","import {\n CLOSE_SNACKBAR,\n SnackbarActionTypes,\n} from \"../actions/snackbarActions\";\nimport {\n BATCH_CANCEL_ACTIVE_TASKS_SUCCESS,\n BATCH_DELETE_ARCHIVED_TASKS_SUCCESS,\n BATCH_DELETE_RETRY_TASKS_SUCCESS,\n BATCH_DELETE_SCHEDULED_TASKS_SUCCESS,\n BATCH_ARCHIVE_RETRY_TASKS_SUCCESS,\n BATCH_ARCHIVE_SCHEDULED_TASKS_SUCCESS,\n BATCH_RUN_ARCHIVED_TASKS_SUCCESS,\n BATCH_RUN_RETRY_TASKS_SUCCESS,\n BATCH_RUN_SCHEDULED_TASKS_SUCCESS,\n CANCEL_ALL_ACTIVE_TASKS_SUCCESS,\n DELETE_ALL_ARCHIVED_TASKS_SUCCESS,\n DELETE_ALL_RETRY_TASKS_SUCCESS,\n DELETE_ALL_SCHEDULED_TASKS_SUCCESS,\n DELETE_ARCHIVED_TASK_SUCCESS,\n DELETE_RETRY_TASK_SUCCESS,\n DELETE_SCHEDULED_TASK_SUCCESS,\n ARCHIVE_ALL_RETRY_TASKS_SUCCESS,\n ARCHIVE_ALL_SCHEDULED_TASKS_SUCCESS,\n ARCHIVE_RETRY_TASK_SUCCESS,\n ARCHIVE_SCHEDULED_TASK_SUCCESS,\n RUN_ALL_ARCHIVED_TASKS_SUCCESS,\n RUN_ALL_RETRY_TASKS_SUCCESS,\n RUN_ALL_SCHEDULED_TASKS_SUCCESS,\n RUN_ARCHIVED_TASK_SUCCESS,\n RUN_RETRY_TASK_SUCCESS,\n RUN_SCHEDULED_TASK_SUCCESS,\n TasksActionTypes,\n ARCHIVE_PENDING_TASK_SUCCESS,\n DELETE_PENDING_TASK_SUCCESS,\n BATCH_ARCHIVE_PENDING_TASKS_SUCCESS,\n BATCH_DELETE_PENDING_TASKS_SUCCESS,\n ARCHIVE_ALL_PENDING_TASKS_SUCCESS,\n DELETE_ALL_PENDING_TASKS_SUCCESS,\n DELETE_COMPLETED_TASK_SUCCESS,\n DELETE_ALL_COMPLETED_TASKS_SUCCESS,\n BATCH_DELETE_COMPLETED_TASKS_SUCCESS,\n} from \"../actions/tasksActions\";\n\ninterface SnackbarState {\n isOpen: boolean;\n message: string;\n}\n\nconst initialState: SnackbarState = {\n isOpen: false,\n message: \"\",\n};\n\nfunction snackbarReducer(\n state = initialState,\n action: TasksActionTypes | SnackbarActionTypes\n): SnackbarState {\n switch (action.type) {\n case CLOSE_SNACKBAR:\n return {\n // Note: We keep the message state unchanged for\n // smoother transition animation.\n ...state,\n isOpen: false,\n };\n\n case BATCH_CANCEL_ACTIVE_TASKS_SUCCESS: {\n const n = action.payload.canceled_ids.length;\n return {\n isOpen: true,\n message: `Cancelation signal sent to ${n} ${\n n === 1 ? \"task\" : \"tasks\"\n }`,\n };\n }\n\n case CANCEL_ALL_ACTIVE_TASKS_SUCCESS:\n return {\n isOpen: true,\n message: `Cancelation signal sent to all tasks in ${action.queue} queue`,\n };\n\n case RUN_SCHEDULED_TASK_SUCCESS:\n return {\n isOpen: true,\n message: `Scheduled task is now pending`,\n };\n\n case RUN_RETRY_TASK_SUCCESS:\n return {\n isOpen: true,\n message: `Retry task is now pending`,\n };\n\n case RUN_ARCHIVED_TASK_SUCCESS:\n return {\n isOpen: true,\n message: `Archived task is now pending`,\n };\n\n case ARCHIVE_PENDING_TASK_SUCCESS:\n return {\n isOpen: true,\n message: `Pending task is now archived`,\n };\n\n case ARCHIVE_SCHEDULED_TASK_SUCCESS:\n return {\n isOpen: true,\n message: `Scheduled task is now archived`,\n };\n\n case ARCHIVE_RETRY_TASK_SUCCESS:\n return {\n isOpen: true,\n message: `Retry task is now archived`,\n };\n\n case DELETE_PENDING_TASK_SUCCESS:\n return {\n isOpen: true,\n message: `Pending task deleted`,\n };\n\n case DELETE_SCHEDULED_TASK_SUCCESS:\n return {\n isOpen: true,\n message: `Scheduled task deleted`,\n };\n\n case BATCH_RUN_SCHEDULED_TASKS_SUCCESS: {\n const n = action.payload.pending_ids.length;\n return {\n isOpen: true,\n message: `${n} scheduled ${\n n === 1 ? \"task is\" : \"tasks are\"\n } now pending`,\n };\n }\n\n case BATCH_ARCHIVE_PENDING_TASKS_SUCCESS: {\n const n = action.payload.archived_ids.length;\n return {\n isOpen: true,\n message: `${n} pending ${\n n === 1 ? \"task is\" : \"tasks are\"\n } now archived`,\n };\n }\n\n case BATCH_DELETE_PENDING_TASKS_SUCCESS: {\n const n = action.payload.deleted_ids.length;\n return {\n isOpen: true,\n message: `${n} pending ${n === 1 ? \"task\" : \"tasks\"} deleted`,\n };\n }\n\n case BATCH_ARCHIVE_SCHEDULED_TASKS_SUCCESS: {\n const n = action.payload.archived_ids.length;\n return {\n isOpen: true,\n message: `${n} scheduled ${\n n === 1 ? \"task is\" : \"tasks are\"\n } now archived`,\n };\n }\n\n case BATCH_DELETE_SCHEDULED_TASKS_SUCCESS: {\n const n = action.payload.deleted_ids.length;\n return {\n isOpen: true,\n message: `${n} scheduled ${n === 1 ? \"task\" : \"tasks\"} deleted`,\n };\n }\n\n case ARCHIVE_ALL_PENDING_TASKS_SUCCESS:\n return {\n isOpen: true,\n message: \"All pending tasks are now archived\",\n };\n\n case DELETE_ALL_PENDING_TASKS_SUCCESS:\n return {\n isOpen: true,\n message: \"All pending tasks deleted\",\n };\n\n case RUN_ALL_SCHEDULED_TASKS_SUCCESS:\n return {\n isOpen: true,\n message: \"All scheduled tasks are now pending\",\n };\n\n case ARCHIVE_ALL_SCHEDULED_TASKS_SUCCESS:\n return {\n isOpen: true,\n message: \"All scheduled tasks are now archived\",\n };\n\n case DELETE_ALL_SCHEDULED_TASKS_SUCCESS:\n return {\n isOpen: true,\n message: \"All scheduled tasks deleted\",\n };\n\n case DELETE_RETRY_TASK_SUCCESS:\n return {\n isOpen: true,\n message: `Retry task deleted`,\n };\n\n case BATCH_RUN_RETRY_TASKS_SUCCESS: {\n const n = action.payload.pending_ids.length;\n return {\n isOpen: true,\n message: `${n} retry ${n === 1 ? \"task is\" : \"tasks are\"} now pending`,\n };\n }\n\n case BATCH_ARCHIVE_RETRY_TASKS_SUCCESS: {\n const n = action.payload.archived_ids.length;\n return {\n isOpen: true,\n message: `${n} retry ${n === 1 ? \"task is\" : \"tasks are\"} now archived`,\n };\n }\n\n case BATCH_DELETE_RETRY_TASKS_SUCCESS: {\n const n = action.payload.deleted_ids.length;\n return {\n isOpen: true,\n message: `${n} retry ${n === 1 ? \"task\" : \"tasks\"} deleted`,\n };\n }\n\n case RUN_ALL_RETRY_TASKS_SUCCESS:\n return {\n isOpen: true,\n message: \"All retry tasks are now pending\",\n };\n\n case ARCHIVE_ALL_RETRY_TASKS_SUCCESS:\n return {\n isOpen: true,\n message: \"All retry tasks are now archived\",\n };\n\n case DELETE_ALL_RETRY_TASKS_SUCCESS:\n return {\n isOpen: true,\n message: \"All retry tasks deleted\",\n };\n\n case DELETE_ARCHIVED_TASK_SUCCESS:\n return {\n isOpen: true,\n message: `Archived task deleted`,\n };\n\n case BATCH_RUN_ARCHIVED_TASKS_SUCCESS: {\n const n = action.payload.pending_ids.length;\n return {\n isOpen: true,\n message: `${n} archived ${\n n === 1 ? \"task is\" : \"tasks are\"\n } now pending`,\n };\n }\n\n case BATCH_DELETE_ARCHIVED_TASKS_SUCCESS: {\n const n = action.payload.deleted_ids.length;\n return {\n isOpen: true,\n message: `${n} archived ${n === 1 ? \"task\" : \"tasks\"} deleted`,\n };\n }\n\n case RUN_ALL_ARCHIVED_TASKS_SUCCESS:\n return {\n isOpen: true,\n message: \"All archived tasks are now pending\",\n };\n\n case DELETE_ALL_ARCHIVED_TASKS_SUCCESS:\n return {\n isOpen: true,\n message: \"All archived tasks deleted\",\n };\n\n case DELETE_COMPLETED_TASK_SUCCESS:\n return {\n isOpen: true,\n message: `Completed task deleted`,\n };\n\n case DELETE_ALL_COMPLETED_TASKS_SUCCESS:\n return {\n isOpen: true,\n message: \"All completed tasks deleted\",\n };\n\n case BATCH_DELETE_COMPLETED_TASKS_SUCCESS:\n const n = action.payload.deleted_ids.length;\n return {\n isOpen: true,\n message: `${n} completed ${n === 1 ? \"task\" : \"tasks\"} deleted`,\n };\n\n default:\n return state;\n }\n}\n\nexport default snackbarReducer;\n","import {\n LIST_QUEUES_SUCCESS,\n QueuesActionTypes,\n} from \"../actions/queuesActions\";\nimport {\n LIST_QUEUE_STATS_BEGIN,\n LIST_QUEUE_STATS_ERROR,\n LIST_QUEUE_STATS_SUCCESS,\n QueueStatsActionTypes,\n} from \"../actions/queueStatsActions\";\nimport { DailyStat } from \"../api\";\n\ninterface QueueStatsState {\n loading: boolean;\n data: { [qname: string]: DailyStat[] };\n}\n\nconst initialState: QueueStatsState = {\n loading: false,\n data: {},\n};\n\nexport default function queueStatsReducer(\n state = initialState,\n action: QueueStatsActionTypes | QueuesActionTypes\n): QueueStatsState {\n switch (action.type) {\n case LIST_QUEUE_STATS_BEGIN:\n return {\n ...state,\n loading: true,\n };\n\n case LIST_QUEUE_STATS_SUCCESS:\n return {\n data: action.payload.stats,\n loading: false,\n };\n\n case LIST_QUEUE_STATS_ERROR:\n return {\n ...state,\n loading: false,\n };\n\n case LIST_QUEUES_SUCCESS: {\n // Copy to avoid mutation.\n let newData = { ...state.data };\n // Update today's stats with most up-to-date data.\n for (const q of action.payload.queues) {\n const stats = newData[q.queue];\n if (!stats) {\n continue;\n }\n const newStats = stats.map((stat) => {\n if (isSameDate(stat.date, q.timestamp)) {\n return {\n ...stat,\n processed: q.processed,\n failed: q.failed,\n };\n }\n return stat;\n });\n newData[q.queue] = newStats;\n }\n return { ...state, data: newData };\n }\n\n default:\n return state;\n }\n}\n\n// Returns true if two timestamps are from the same date.\nfunction isSameDate(ts1: string, ts2: string): boolean {\n const date1 = new Date(ts1);\n const date2 = new Date(ts2);\n return (\n date1.getUTCDate() === date2.getUTCDate() &&\n date1.getUTCMonth() === date2.getUTCMonth() &&\n date1.getUTCFullYear() === date2.getUTCFullYear()\n );\n}\n","import {\n GET_REDIS_INFO_BEGIN,\n GET_REDIS_INFO_ERROR,\n GET_REDIS_INFO_SUCCESS,\n RedisInfoActionTypes,\n} from \"../actions/redisInfoActions\";\nimport { QueueLocation, RedisInfo } from \"../api\";\n\ninterface RedisInfoState {\n loading: boolean;\n error: string;\n address: string;\n data: RedisInfo | null;\n rawData: string | null;\n cluster: boolean;\n rawClusterNodes: string | null;\n queueLocations: QueueLocation[] | null;\n}\n\nconst initialState: RedisInfoState = {\n loading: false,\n error: \"\",\n address: \"\",\n data: null,\n rawData: null,\n cluster: false,\n rawClusterNodes: null,\n queueLocations: null,\n};\n\nexport default function redisInfoReducer(\n state = initialState,\n action: RedisInfoActionTypes\n): RedisInfoState {\n switch (action.type) {\n case GET_REDIS_INFO_BEGIN:\n return {\n ...state,\n loading: true,\n };\n\n case GET_REDIS_INFO_ERROR:\n return {\n ...state,\n loading: false,\n error: action.error,\n };\n\n case GET_REDIS_INFO_SUCCESS:\n return {\n loading: false,\n error: \"\",\n address: action.payload.address,\n data: action.payload.info,\n rawData: action.payload.raw_info,\n cluster: action.payload.cluster,\n rawClusterNodes: action.payload.raw_cluster_nodes,\n queueLocations: action.payload.queue_locations,\n };\n\n default:\n return state;\n }\n}\n","import { initialState as settingsInitialState } from \"./reducers/settingsReducer\"\nimport { AppState } from \"./store\";\n\nconst LOCAL_STORAGE_KEY = \"asynqmon:state\";\n\nexport function loadState(): Partial<AppState> {\n try {\n const serializedState = localStorage.getItem(LOCAL_STORAGE_KEY);\n if (serializedState === null) {\n return {};\n }\n const savedState = JSON.parse(serializedState);\n return {\n settings: {\n ...settingsInitialState,\n ...(savedState.settings || {}),\n }\n }\n } catch (err) {\n console.log(\"loadState: could not load state \", err)\n return {};\n }\n}\n\nexport function saveState(state: AppState) {\n try {\n const serializedState = JSON.stringify({ settings: state.settings });\n localStorage.setItem(LOCAL_STORAGE_KEY, serializedState);\n } catch (err) {\n console.error(\"saveState: could not save state: \", err);\n }\n}\n","import { combineReducers, configureStore } from \"@reduxjs/toolkit\";\nimport settingsReducer from \"./reducers/settingsReducer\";\nimport queuesReducer from \"./reducers/queuesReducer\";\nimport tasksReducer from \"./reducers/tasksReducer\";\nimport serversReducer from \"./reducers/serversReducer\";\nimport schedulerEntriesReducer from \"./reducers/schedulerEntriesReducer\";\nimport snackbarReducer from \"./reducers/snackbarReducer\";\nimport queueStatsReducer from \"./reducers/queueStatsReducer\";\nimport redisInfoReducer from \"./reducers/redisInfoReducer\";\nimport { loadState } from \"./localStorage\";\n\nconst rootReducer = combineReducers({\n settings: settingsReducer,\n queues: queuesReducer,\n tasks: tasksReducer,\n servers: serversReducer,\n schedulerEntries: schedulerEntriesReducer,\n snackbar: snackbarReducer,\n queueStats: queueStatsReducer,\n redis: redisInfoReducer,\n});\n\nconst preloadedState = loadState();\n\n// AppState is the top-level application state maintained by redux store.\nexport type AppState = ReturnType<typeof rootReducer>;\n\nconst store = configureStore({\n reducer: rootReducer,\n preloadedState,\n});\n\nexport default store;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(\n process.env.PUBLIC_URL,\n window.location.href\n );\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' }\n })\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then(registration => {\n registration.unregister();\n })\n .catch(error => {\n console.error(error.message);\n });\n }\n}\n","import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport CssBaseline from \"@material-ui/core/CssBaseline\";\nimport { Provider } from \"react-redux\";\nimport App from \"./App\";\nimport store from \"./store\";\nimport * as serviceWorker from \"./serviceWorker\";\nimport { saveState } from \"./localStorage\";\nimport { SettingsState } from \"./reducers/settingsReducer\";\n\nlet currentSettings: SettingsState | undefined = undefined;\nstore.subscribe(() => {\n const prevSettings = currentSettings;\n currentSettings = store.getState().settings;\n\n // Write to local-storage only when settings have changed.\n if (prevSettings !== currentSettings) {\n saveState(store.getState());\n }\n});\n\nReactDOM.render(\n <React.StrictMode>\n <CssBaseline />\n <Provider store={store}>\n <App />\n </Provider>\n </React.StrictMode>,\n document.getElementById(\"root\")\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\n// TODO(hibiken): Look into this.\nserviceWorker.unregister();\n"],"sourceRoot":""}