asynqmon/ui/build/static/js/main.0094b47e.chunk.js.map
2022-03-02 06:34:45 -08:00

1 line
636 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","actions/metricsActions.ts","components/QueueMetricsChart.tsx","components/MetricsFetchControls.tsx","views/MetricsView.tsx","views/PageNotFoundView.tsx","images/logo-color.svg","images/logo-white.svg","App.tsx","reducers/queuesReducer.ts","reducers/tasksReducer.ts","reducers/serversReducer.ts","reducers/snackbarReducer.ts","reducers/queueStatsReducer.ts","reducers/redisInfoReducer.ts","reducers/metricsReducer.ts","localStorage.ts","store.ts","serviceWorker.ts","parseFlags.ts","index.tsx"],"names":["paths","HOME","window","ROOT_PATH","SETTINGS","SERVERS","SCHEDULERS","QUEUE_DETAILS","REDIS","TASK_DETAILS","QUEUE_METRICS","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","direction","Math","ceil","max","rowsPerPageOptions","getBaseUrl","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","getMetrics","endTime","duration","queues","params","endtime","length","join","toErrorStringWithHttpStatus","error","response","status","statusText","toErrorString","durationFromSeconds","totalSeconds","hour","floor","minute","second","durationBetween","start","end","durationInMillisec","stringifyDuration","d","n","durationBefore","timestamp","Date","parse","now","timeAgo","timeAgoUnix","console","unixtime","uuidPrefix","uuid","idx","indexOf","substr","percentage","numerator","denominator","perc","toFixed","prettifyPayload","p","JSON","isJsonPayload","currentUnixtime","durationRegex","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","allQueues","map","b","activeLabel","includes","push","style","cursor","CartesianGrid","strokeDasharray","XAxis","dataKey","stroke","palette","text","secondary","YAxis","Tooltip","Legend","Bar","stackId","fill","ProcessedTasksChart","success","light","connector","SortDirection","connect","state","ownProps","requestPending","q","find","name","undefined","Dialog","open","onClose","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","Latency","Processed","Failed","ErrorRate","None","sortQueues","cmpFn","copy","sort","QueuesOverviewTable","useState","setSortBy","Asc","sortDir","setSortDir","queueToDelete","setQueueToDelete","Fragment","TableContainer","Table","TableHead","TableRow","filter","cfg","READ_ONLY","i","TableCell","clsx","TableSortLabel","active","sortKey","e","nextSortDir","Desc","TableBody","q1","q2","isQ1Smaller","paused","memory_usage_bytes","latency_msec","processed","failed","q1ErrorRate","q2ErrorRate","Row","onPauseClick","onResumeClick","onDeleteClick","useRowStyles","row","borderBottomWidth","linkText","textDecoration","primary","textGreen","dark","textRed","boldCell","fontWeight","actionIconsContainer","display","justifyContent","showIcons","setShowIcons","component","scope","to","prettyBytes","display_latency","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","prevOpen","Popper","anchorEl","role","transition","disablePortal","TransitionProps","placement","Grow","transformOrigin","Paper","ClickAwayListener","onClickAway","MenuList","MenuItem","selected","onSelect","usePolling","doFn","interval","useEffect","setInterval","clearInterval","useQuery","search","useLocation","useMemo","URLSearchParams","DailyStatsChart","queueStats","numDays","dataByDate","stat","hasOwnProperty","date","succeeded","Object","values","sortByDate","slice","makeChartData","LineChart","minTickGap","Line","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","processedStats","Container","Grid","item","xs","Alert","severity","AlertTitle","Typography","initialState","themePreference","SystemDefault","isDrawerOpen","taskRowsPerPage","settingsReducer","CLOSE_SNACKBAR","listItem","borderTopRightRadius","borderBottomRightRadius","selectedText","selectedIcon","ListItemLink","icon","isMatch","useRouteMatch","strict","sensitive","exact","renderLink","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","idCell","copyButton","IdGroup","task","isSelected","stopPropagation","Checkbox","onChange","onSelectChange","checked","navigator","clipboard","writeText","margin","canceling","is_orphaned","start_time","deadline","onActionCellEnter","onActionCellLeave","showActions","onCancelClick","setPage","selectedIds","setSelectedIds","activeTaskId","setActiveTaskId","useCallback","rowCount","numSelected","then","indeterminate","newSelected","t","inputProps","col","concat","TableFooter","TablePagination","colSpan","totalTaskCount","SelectProps","native","newPage","onRowsPerPageChange","parseInt","ActionsComponent","listPendingTasksAsync","deletePendingTaskAsync","batchDeletePendingTasksAsync","deleteAllPendingTasksAsync","deleted","archivePendingTaskAsync","batchArchivePendingTasksAsync","archiveAllPendingTasksAsync","pendingTasks","actionCell","actionButton","retried","max_retry","onArchiveClick","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","searchIcon","pointerEvents","inputRoot","inputInput","chips","searchQuery","setSearchQuery","c","Chip","InputBase","placeholder","input","onKeyDown","trim","banner","bannerItem","flexGrow","divider","StyledBreadcrumb","emphasize","QueueBreadcrumbs","setAnchorEl","getPaths","handleClick","preventDefault","Breadcrumbs","Link","queueName","deleteIcon","onDelete","breadcrumbs","tasksTable","validStatus","useParams","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","redis","redisInfo","redisAddress","address","redisInfoRaw","rawData","redisClusterEnabled","cluster","redisClusterNodesRaw","rawClusterNodes","getRedisInfoAsync","RedisMetricCards","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","href","GET_METRICS_BEGIN","GET_METRICS_SUCCESS","GET_METRICS_ERROR","lineColors","QueueMetricsChart","metrics","byTimestamp","ts","metric","parseFloat","toChartData","domain","startTime","tickFormatter","toLocaleTimeString","scale","yAxisTickFormatter","labelFormatter","dot","defaultProps","toString","mapStateToProps","endTimeCaption","shiftButtons","buttonGroupRoot","top","endTimeShiftControls","borderBottomStyle","leftShiftButtons","rightShiftButtons","controlsContainer","controlSelectorBox","controlEndTimeSelector","controlDurationSelector","radioButtonRoot","formControlLabel","buttonLabel","textTransform","formControlRoot","formLabel","customInputField","filterButton","queueFilters","checkbox","day","formatTime","tz","timeZoneName","split","dayjs","unix","format","RadioInput","FormControlLabel","control","Radio","useShiftButtonStyles","dense","iconRoot","ShiftButton","endTimeSec","durationSec","endTimeOption","customEndTime","durationOption","customDuration","toISOString","customEndTimeError","customDurationError","getInitialState","setState","timePopoverAnchorElem","setTimePopoverAnchorElem","queuePopoverAnchorElem","setQueuePopoverAnchorElem","isTimePopoverOpen","isQueuePopoverOpen","onEndTimeChange","shiftBy","deltaSec","prevState","Popover","anchorOrigin","vertical","horizontal","FormLabel","RadioGroup","TextField","persist","timeUsecOrNaN","isNaN","helperText","isEndTimeFixed","onDurationChange","s","test","Error","parseDuration","FormGroup","selectedQueues","removeQueue","addQueue","appBar","right","chartInfo","errorMessage","warningIcon","getMetricsAsync","ENDTIME_URL_PARAM_KEY","DURATION_URL_PARAM_KEY","query","endTimeStr","durationStr","setEndTimeSec","setDurationSec","setSelectedQueues","urlQuery","location","tasks_processed_per_second","ChartRow","description","tasks_failed_per_second","error_rate","queue_size","queue_latency_seconds","queue_memory_usage_approx_bytes","pending_tasks_by_queue","retry_tasks_by_queue","archived_tasks_by_queue","_g","_path","headingText","PageNotFoundView","_extends","assign","arguments","source","prototype","call","apply","this","_objectWithoutProperties","excluded","sourceKeys","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","SvgLogoColor","_ref","svgRef","titleId","viewBox","xmlns","ForwardRef","SvgLogoWhite","closeSnackbar","toggleDrawer","SlideUpTransition","Slide","snackbar","prefersDarkMode","useMediaQuery","createTheme","toolbar","toolbarIcon","mixins","drawer","menuButton","menuButtonHidden","drawerPaper","whiteSpace","transitions","create","easing","sharp","enteringScreen","drawerPaperClose","overflowX","leavingScreen","breakpoints","up","snackbarCloseIcon","appBarSpacer","mainContainer","contentWrapper","sidebarContainer","ThemeProvider","AppBar","Toolbar","edge","Drawer","Snackbar","isOpen","autoHideDuration","TransitionComponent","SnackbarContent","message","List","PROMETHEUS_SERVER_ADDRESS","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","hostname","match","FLAG_ROOT_PATH","FLAG_PROMETHEUS_SERVER_ADDRESS","startsWith","FLAG_READ_ONLY","currentSettings","subscribe","getState","setItem","saveState","ReactDOM","render","StrictMode","CssBaseline","document","getElementById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bt8B,IAA1BnO,OAAO0qC,gBACTphC,QAAQ6gC,IAAI,0DACZnqC,OAAOC,UAAY,IAEnBD,OAAOC,UAAYD,OAAO0qC,oBAIkBv8B,IAA1CnO,OAAO2qC,gCACTrhC,QAAQ6gC,IACN,0EAEFnqC,OAAOkoC,0BAA4B,IAEnCloC,OAAO2qC,+BAA+BC,WAnBf,SAqBvBthC,QAAQ6gC,IACN,2FAEFnqC,OAAOkoC,0BAA4B,SAKP/5B,IAA1BnO,OAAO6qC,gBACTvhC,QAAQ6gC,IAAI,mDACZnqC,OAAOyR,WAAY,GACVzR,OAAO6qC,eAAeD,WAhCR,QAiCvBthC,QAAQ6gC,IACN,oEAEFnqC,OAAOyR,WAAY,GAEnBzR,OAAOyR,UAAsC,SAA1BzR,OAAO6qC,eC1B9B,IAAIC,QAA6C38B,EACjDk8B,GAAMU,WAAU,WACOD,MACrBA,GAAkBT,GAAMW,WAAW3vB,WJQ9B,SAAmBxN,GACxB,IACE,IAAMg8B,EAAkBz/B,KAAKjG,UAAU,CAAEkX,SAAUxN,EAAMwN,WACzDyuB,aAAamB,QAAQ7B,GAAmBS,GACxC,MAAOK,GACP5gC,QAAQzB,MAAM,oCAAqCqiC,IITnDgB,CAAUb,GAAMW,eAIpBG,IAASC,OACP,gBAAC,IAAMC,WAAP,WACE,eAACC,EAAA,EAAD,IACA,eAAC,IAAD,CAAUjB,MAAOA,GAAjB,SACE,eAAC,GAAD,SAGJkB,SAASC,eAAe,SF4GpB,kBAAmBjf,WACrBA,UAAUkf,cAAcC,MACrB/d,MAAK,SAAAge,GACJA,EAAaC,gBAEdC,OAAM,SAAAhkC,GACLyB,QAAQzB,MAAMA,EAAMmgC,c","file":"static/js/main.0094b47e.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 QUEUE_METRICS: `${window.ROOT_PATH}/q/metrics`,\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()\n .TASK_DETAILS.replace(\":qname\", qname)\n .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}\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 getBaseUrl = () =>\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\nexport interface MetricsResponse {\n queue_size: PrometheusMetricsResponse;\n queue_latency_seconds: PrometheusMetricsResponse;\n queue_memory_usage_approx_bytes: PrometheusMetricsResponse;\n tasks_processed_per_second: PrometheusMetricsResponse;\n tasks_failed_per_second: PrometheusMetricsResponse;\n error_rate: PrometheusMetricsResponse;\n pending_tasks_by_queue: PrometheusMetricsResponse;\n retry_tasks_by_queue: PrometheusMetricsResponse;\n archived_tasks_by_queue: PrometheusMetricsResponse;\n}\n\nexport interface PrometheusMetricsResponse {\n status: \"success\" | \"error\";\n data?: MetricsResult; // present if status === \"success\"\n error?: string; // present if status === \"error\"\n errorType?: string; // present if status === \"error\"\n}\n\nexport interface MetricsResult {\n resultType: string;\n result: Metrics[];\n}\n\nexport interface Metrics {\n metric: MetricsInfo;\n values: [number, string][]; // [unixtime, value]\n}\n\nexport interface MetricsInfo {\n __name__: string;\n instance: string;\n job: string;\n\n // labels (may or may not be present depending on metrics)\n queue?: string;\n state?: string;\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 latency_msec: number;\n display_latency: string;\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 is_orphaned: boolean; // Only applies to task.state == 'active'\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: `${getBaseUrl()}/queues`,\n });\n return resp.data;\n}\n\nexport async function deleteQueue(qname: string): Promise<void> {\n await axios({\n method: \"delete\",\n url: `${getBaseUrl()}/queues/${qname}`,\n });\n}\n\nexport async function pauseQueue(qname: string): Promise<void> {\n await axios({\n method: \"post\",\n url: `${getBaseUrl()}/queues/${qname}:pause`,\n });\n}\n\nexport async function resumeQueue(qname: string): Promise<void> {\n await axios({\n method: \"post\",\n url: `${getBaseUrl()}/queues/${qname}:resume`,\n });\n}\n\nexport async function listQueueStats(): Promise<ListQueueStatsResponse> {\n const resp = await axios({\n method: \"get\",\n url: `${getBaseUrl()}/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 = `${getBaseUrl()}/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 = `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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 = `${getBaseUrl()}/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 = `${getBaseUrl()}/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 = `${getBaseUrl()}/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 = `${getBaseUrl()}/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 = `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/servers`,\n });\n return resp.data;\n}\n\nexport async function listSchedulerEntries(): Promise<ListSchedulerEntriesResponse> {\n const resp = await axios({\n method: \"get\",\n url: `${getBaseUrl()}/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: `${getBaseUrl()}/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: `${getBaseUrl()}/redis_info`,\n });\n return resp.data;\n}\n\ninterface MetricsEndpointParams {\n endtime: number;\n duration: number;\n queues?: string; // comma-separated list of queues\n}\n\nexport async function getMetrics(\n endTime: number,\n duration: number,\n queues: string[]\n): Promise<MetricsResponse> {\n let params: MetricsEndpointParams = {\n endtime: endTime,\n duration: duration,\n };\n if (queues && queues.length > 0) {\n params.queues = queues.join(\",\");\n }\n const resp = await axios({\n method: \"get\",\n url: `${getBaseUrl()}/metrics?${queryString.stringify(params)}`,\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\nconst zeroTimestamp = \"0001-01-01T00:00:00Z\";\nexport function timeAgo(timestamp: string): string {\n if (timestamp === zeroTimestamp) {\n return \"-\";\n }\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\nexport function isJsonPayload(p: string) {\n try {\n JSON.parse(p);\n } catch (error) {\n return false;\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 return p;\n}\n\n// Returns the number of seconds elapsed since January 1, 1970 00:00:00 UTC.\nexport function currentUnixtime(): number {\n return Math.floor(Date.now() / 1000);\n}\n\nconst durationRegex = /([0-9]*(\\.[0-9]*)?)[s|m|h]/;\n// Parses the given string and returns the number of seconds if the input is valid.\n// Otherwise, it throws an error\n// Supported time units are \"s\", \"m\", \"h\"\nexport function parseDuration(s: string): number {\n if (!durationRegex.test(s)) {\n throw new Error(\"invalid duration\");\n }\n const val = parseFloat(s.slice(0, -1));\n switch (s.slice(-1)) {\n case \"s\":\n return val;\n case \"m\":\n return val * 60;\n case \"h\":\n return val * 60 * 60;\n default:\n throw new Error(\"invalid duration unit\");\n }\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 { useTheme } from \"@material-ui/core/styles\";\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 theme = useTheme();\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\" stroke={theme.palette.text.secondary} />\n <YAxis stroke={theme.palette.text.secondary} />\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\" stroke={theme.palette.text.secondary} />\n <YAxis stroke={theme.palette.text.secondary} />\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 Latency,\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: \"Latency\",\n key: \"latency\",\n sortBy: SortBy.Latency,\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.Latency:\n if (q1.latency_msec === q2.latency_msec) return 0;\n isQ1Smaller = q1.latency_msec < q2.latency_msec;\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\n .filter((cfg) => {\n // Filter out actions column in readonly mode.\n return !window.READ_ONLY || cfg.key !== \"actions\";\n })\n .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.display_latency}</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 {!window.READ_ONLY && (\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 )}\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, useMemo } from \"react\";\nimport { useLocation } from \"react-router-dom\";\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\n// useQuery gets the URL search params from the current URL.\nexport function useQuery(): URLSearchParams {\n const { search } = useLocation();\n return useMemo(() => new URLSearchParams(search), [search]);\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\n dataKey=\"date\"\n minTickGap={10}\n stroke={theme.palette.text.secondary}\n />\n <YAxis stroke={theme.palette.text.secondary} />\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 { createTheme, 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 createTheme({\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 Checkbox from \"@material-ui/core/Checkbox\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Paper from \"@material-ui/core/Paper\";\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 TableFooter from \"@material-ui/core/TableFooter\";\nimport TableHead from \"@material-ui/core/TableHead\";\nimport TablePagination from \"@material-ui/core/TablePagination\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport CancelIcon from \"@material-ui/icons/Cancel\";\nimport FileCopyOutlinedIcon from \"@material-ui/icons/FileCopyOutlined\";\nimport MoreHorizIcon from \"@material-ui/icons/MoreHoriz\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport AlertTitle from \"@material-ui/lab/AlertTitle\";\nimport React, { useCallback, useState } from \"react\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport { useHistory } from \"react-router-dom\";\nimport { taskRowsPerPageChange } from \"../actions/settingsActions\";\nimport {\n batchCancelActiveTasksAsync,\n cancelActiveTaskAsync,\n cancelAllActiveTasksAsync,\n listActiveTasksAsync,\n} from \"../actions/tasksActions\";\nimport { usePolling } from \"../hooks\";\nimport { taskDetailsPath } from \"../paths\";\nimport { ActiveTaskExtended } from \"../reducers/tasksReducer\";\nimport { AppState } from \"../store\";\nimport { TableColumn } from \"../types/table\";\nimport { durationBefore, prettifyPayload, timeAgo, uuidPrefix } from \"../utils\";\nimport SyntaxHighlighter from \"./SyntaxHighlighter\";\nimport TableActions from \"./TableActions\";\nimport TablePaginationActions, {\n rowsPerPageOptions,\n} from \"./TablePaginationActions\";\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 totalTaskCount: number; // total number of active tasks\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 {!window.READ_ONLY && (\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 )}\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 {!window.READ_ONLY && (\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 )}\n {columns\n .filter((col) => {\n // Filter out actions column in readonly mode.\n return !window.READ_ONLY || col.key !== \"actions\";\n })\n .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.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 \"& #copy-button\": {\n display: \"none\",\n },\n \"&:hover\": {\n boxShadow: theme.shadows[2],\n },\n \"&:hover $copyButton\": {\n display: \"inline-block\",\n },\n \"&:hover .MuiTableCell-root\": {\n borderBottomColor: theme.palette.background.paper,\n },\n },\n idCell: {\n width: \"200px\",\n },\n copyButton: {\n display: \"none\",\n },\n IdGroup: {\n display: \"flex\",\n alignItems: \"center\",\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 {!window.READ_ONLY && (\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 )}\n <TableCell component=\"th\" scope=\"row\" className={classes.idCell}>\n <div className={classes.IdGroup}>\n {uuidPrefix(task.id)}\n <Tooltip title=\"Copy full ID to clipboard\">\n <IconButton\n onClick={(e) => {\n e.stopPropagation();\n navigator.clipboard.writeText(task.id);\n }}\n size=\"small\"\n className={classes.copyButton}\n >\n <FileCopyOutlinedIcon fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n </div>\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>\n {task.canceling\n ? \"Canceling\"\n : task.is_orphaned\n ? \"Orphaned\"\n : \"Running\"}\n </TableCell>\n <TableCell>\n {task.is_orphaned\n ? \"-\"\n : task.start_time === \"-\"\n ? \"just now\"\n : timeAgo(task.start_time)}\n </TableCell>\n <TableCell>\n {task.deadline === \"-\" ? \"-\" : durationBefore(task.deadline)}\n </TableCell>\n {!window.READ_ONLY && (\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={\n task.requestPending || task.canceling || task.is_orphaned\n }\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 )}\n </TableRow>\n );\n}\n\nexport default connector(ActiveTasksTable);\n","import Checkbox from \"@material-ui/core/Checkbox\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Paper from \"@material-ui/core/Paper\";\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 TableFooter from \"@material-ui/core/TableFooter\";\nimport TableHead from \"@material-ui/core/TableHead\";\nimport TablePagination from \"@material-ui/core/TablePagination\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport ArchiveIcon from \"@material-ui/icons/Archive\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport FileCopyOutlinedIcon from \"@material-ui/icons/FileCopyOutlined\";\nimport MoreHorizIcon from \"@material-ui/icons/MoreHoriz\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport AlertTitle from \"@material-ui/lab/AlertTitle\";\nimport React, { useCallback, useState } from \"react\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport { useHistory } from \"react-router-dom\";\nimport { taskRowsPerPageChange } from \"../actions/settingsActions\";\nimport {\n archiveAllPendingTasksAsync,\n archivePendingTaskAsync,\n batchArchivePendingTasksAsync,\n batchDeletePendingTasksAsync,\n deleteAllPendingTasksAsync,\n deletePendingTaskAsync,\n listPendingTasksAsync,\n} from \"../actions/tasksActions\";\nimport { usePolling } from \"../hooks\";\nimport { taskDetailsPath } from \"../paths\";\nimport { TaskInfoExtended } from \"../reducers/tasksReducer\";\nimport { AppState } from \"../store\";\nimport { TableColumn } from \"../types/table\";\nimport { prettifyPayload, uuidPrefix } from \"../utils\";\nimport SyntaxHighlighter from \"./SyntaxHighlighter\";\nimport TableActions from \"./TableActions\";\nimport TablePaginationActions, {\n rowsPerPageOptions,\n} from \"./TablePaginationActions\";\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 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 {!window.READ_ONLY && (\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 )}\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 {!window.READ_ONLY && (\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 )}\n {columns\n .filter((col) => {\n // Filter out actions column in readonly mode.\n return !window.READ_ONLY || col.key !== \"actions\";\n })\n .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 \"& #copy-button\": {\n display: \"none\",\n },\n \"&:hover\": {\n boxShadow: theme.shadows[2],\n \"& #copy-button\": {\n display: \"inline-block\",\n },\n },\n \"&:hover $copyButton\": {\n display: \"inline-block\",\n },\n \"&:hover .MuiTableCell-root\": {\n borderBottomColor: theme.palette.background.paper,\n },\n },\n\n actionCell: {\n width: \"96px\",\n },\n actionButton: {\n marginLeft: 3,\n marginRight: 3,\n },\n idCell: {\n width: \"200px\",\n },\n copyButton: {\n display: \"none\",\n },\n IdGroup: {\n display: \"flex\",\n alignItems: \"center\",\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 {!window.READ_ONLY && (\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 )}\n <TableCell component=\"th\" scope=\"row\" className={classes.idCell}>\n <div className={classes.IdGroup}>\n {uuidPrefix(task.id)}\n <Tooltip title=\"Copy full ID to clipboard\">\n <IconButton\n onClick={(e) => {\n e.stopPropagation();\n navigator.clipboard.writeText(task.id);\n }}\n size=\"small\"\n className={classes.copyButton}\n >\n <FileCopyOutlinedIcon fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n </div>\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 {!window.READ_ONLY && (\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 )}\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\";\nimport FileCopyOutlinedIcon from \"@material-ui/icons/FileCopyOutlined\";\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 {!window.READ_ONLY && (\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 )}\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 {!window.READ_ONLY && (\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 )}\n {columns\n .filter((col) => {\n // Filter out actions column in readonly mode.\n return !window.READ_ONLY || col.key !== \"actions\";\n })\n .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 \"& #copy-button\": {\n display: \"none\",\n },\n \"&:hover\": {\n boxShadow: theme.shadows[2],\n \"& #copy-button\": {\n display: \"inline-block\",\n },\n },\n \"&:hover $copyButton\": {\n display: \"inline-block\",\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 idCell: {\n width: \"200px\",\n },\n copyButton: {\n display: \"none\",\n },\n IdGroup: {\n display: \"flex\",\n alignItems: \"center\",\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 {!window.READ_ONLY && (\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 )}\n <TableCell component=\"th\" scope=\"row\" className={classes.idCell}>\n <div className={classes.IdGroup}>\n {uuidPrefix(task.id)}\n <Tooltip title=\"Copy full ID to clipboard\">\n <IconButton\n onClick={(e) => {\n e.stopPropagation();\n navigator.clipboard.writeText(task.id);\n }}\n size=\"small\"\n className={classes.copyButton}\n >\n <FileCopyOutlinedIcon fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n </div>\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 {!window.READ_ONLY && (\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 )}\n </TableRow>\n );\n}\nexport default connector(ScheduledTasksTable);\n","import Checkbox from \"@material-ui/core/Checkbox\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Paper from \"@material-ui/core/Paper\";\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 TableFooter from \"@material-ui/core/TableFooter\";\nimport TableHead from \"@material-ui/core/TableHead\";\nimport TablePagination from \"@material-ui/core/TablePagination\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport ArchiveIcon from \"@material-ui/icons/Archive\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport FileCopyOutlinedIcon from \"@material-ui/icons/FileCopyOutlined\";\nimport MoreHorizIcon from \"@material-ui/icons/MoreHoriz\";\nimport PlayArrowIcon from \"@material-ui/icons/PlayArrow\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport AlertTitle from \"@material-ui/lab/AlertTitle\";\nimport React, { useCallback, useState } from \"react\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport { useHistory } from \"react-router-dom\";\nimport { taskRowsPerPageChange } from \"../actions/settingsActions\";\nimport {\n archiveAllRetryTasksAsync,\n archiveRetryTaskAsync,\n batchArchiveRetryTasksAsync,\n batchDeleteRetryTasksAsync,\n batchRunRetryTasksAsync,\n deleteAllRetryTasksAsync,\n deleteRetryTaskAsync,\n listRetryTasksAsync,\n runAllRetryTasksAsync,\n runRetryTaskAsync,\n} from \"../actions/tasksActions\";\nimport { usePolling } from \"../hooks\";\nimport { taskDetailsPath } from \"../paths\";\nimport { TaskInfoExtended } from \"../reducers/tasksReducer\";\nimport { AppState } from \"../store\";\nimport { TableColumn } from \"../types/table\";\nimport { durationBefore, prettifyPayload, uuidPrefix } from \"../utils\";\nimport SyntaxHighlighter from \"./SyntaxHighlighter\";\nimport TableActions from \"./TableActions\";\nimport TablePaginationActions, {\n rowsPerPageOptions,\n} from \"./TablePaginationActions\";\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 {!window.READ_ONLY && (\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 )}\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 {!window.READ_ONLY && (\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 )}\n {columns\n .filter((col) => {\n // Filter out actions column in readonly mode.\n return !window.READ_ONLY || col.key !== \"actions\";\n })\n .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 \"& #copy-button\": {\n display: \"none\",\n },\n \"&:hover\": {\n boxShadow: theme.shadows[2],\n \"& #copy-button\": {\n display: \"inline-block\",\n },\n },\n \"&:hover $copyButton\": {\n display: \"inline-block\",\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 idCell: {\n width: \"200px\",\n },\n copyButton: {\n display: \"none\",\n },\n IdGroup: {\n display: \"flex\",\n alignItems: \"center\",\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 {!window.READ_ONLY && (\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 )}\n <TableCell component=\"th\" scope=\"row\" className={classes.idCell}>\n <div className={classes.IdGroup}>\n {uuidPrefix(task.id)}\n <Tooltip title=\"Copy full ID to clipboard\">\n <IconButton\n onClick={(e) => {\n e.stopPropagation();\n navigator.clipboard.writeText(task.id);\n }}\n size=\"small\"\n className={classes.copyButton}\n >\n <FileCopyOutlinedIcon fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n </div>\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 {!window.READ_ONLY && (\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 )}\n </TableRow>\n );\n}\n\nexport default connector(RetryTasksTable);\n","import Checkbox from \"@material-ui/core/Checkbox\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Paper from \"@material-ui/core/Paper\";\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 TableFooter from \"@material-ui/core/TableFooter\";\nimport TableHead from \"@material-ui/core/TableHead\";\nimport TablePagination from \"@material-ui/core/TablePagination\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport FileCopyOutlinedIcon from \"@material-ui/icons/FileCopyOutlined\";\nimport MoreHorizIcon from \"@material-ui/icons/MoreHoriz\";\nimport PlayArrowIcon from \"@material-ui/icons/PlayArrow\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport AlertTitle from \"@material-ui/lab/AlertTitle\";\nimport React, { useCallback, useState } from \"react\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport { useHistory } from \"react-router-dom\";\nimport { taskRowsPerPageChange } from \"../actions/settingsActions\";\nimport {\n batchDeleteArchivedTasksAsync,\n batchRunArchivedTasksAsync,\n deleteAllArchivedTasksAsync,\n deleteArchivedTaskAsync,\n listArchivedTasksAsync,\n runAllArchivedTasksAsync,\n runArchivedTaskAsync,\n} from \"../actions/tasksActions\";\nimport { usePolling } from \"../hooks\";\nimport { taskDetailsPath } from \"../paths\";\nimport { TaskInfoExtended } from \"../reducers/tasksReducer\";\nimport { AppState } from \"../store\";\nimport { TableColumn } from \"../types/table\";\nimport { prettifyPayload, timeAgo, uuidPrefix } from \"../utils\";\nimport SyntaxHighlighter from \"./SyntaxHighlighter\";\nimport TableActions from \"./TableActions\";\nimport TablePaginationActions, {\n rowsPerPageOptions,\n} from \"./TablePaginationActions\";\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 idCell: {\n width: \"200px\",\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 {!window.READ_ONLY && (\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 )}\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 {!window.READ_ONLY && (\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 )}\n {columns\n .filter((col) => {\n // Filter out actions column in readonly mode.\n return !window.READ_ONLY || col.key !== \"actions\";\n })\n .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 \"& #copy-button\": {\n display: \"none\",\n },\n \"&:hover\": {\n boxShadow: theme.shadows[2],\n },\n \"&:hover $copyButton\": {\n display: \"inline-block\",\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 idCell: {\n width: \"200px\",\n },\n copyButton: {\n display: \"none\",\n },\n IdGroup: {\n display: \"flex\",\n alignItems: \"center\",\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 {!window.READ_ONLY && (\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 )}\n <TableCell component=\"th\" scope=\"row\" className={classes.idCell}>\n <div className={classes.IdGroup}>\n {uuidPrefix(task.id)}\n <Tooltip title=\"Copy full ID to clipboard\">\n <IconButton\n onClick={(e) => {\n e.stopPropagation();\n navigator.clipboard.writeText(task.id);\n }}\n size=\"small\"\n className={classes.copyButton}\n >\n <FileCopyOutlinedIcon fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n </div>\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 {!window.READ_ONLY && (\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 )}\n </TableRow>\n );\n}\n\nexport default connector(ArchivedTasksTable);\n","import Checkbox from \"@material-ui/core/Checkbox\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Paper from \"@material-ui/core/Paper\";\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 TableFooter from \"@material-ui/core/TableFooter\";\nimport TableHead from \"@material-ui/core/TableHead\";\nimport TablePagination from \"@material-ui/core/TablePagination\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport FileCopyOutlinedIcon from \"@material-ui/icons/FileCopyOutlined\";\nimport MoreHorizIcon from \"@material-ui/icons/MoreHoriz\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport AlertTitle from \"@material-ui/lab/AlertTitle\";\nimport React, { useCallback, useState } from \"react\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport { useHistory } from \"react-router-dom\";\nimport { taskRowsPerPageChange } from \"../actions/settingsActions\";\nimport {\n batchDeleteCompletedTasksAsync,\n deleteAllCompletedTasksAsync,\n deleteCompletedTaskAsync,\n listCompletedTasksAsync,\n} from \"../actions/tasksActions\";\nimport { usePolling } from \"../hooks\";\nimport { taskDetailsPath } from \"../paths\";\nimport { TaskInfoExtended } from \"../reducers/tasksReducer\";\nimport { AppState } from \"../store\";\nimport { TableColumn } from \"../types/table\";\nimport {\n durationFromSeconds,\n prettifyPayload,\n stringifyDuration,\n timeAgo,\n uuidPrefix,\n} from \"../utils\";\nimport SyntaxHighlighter from \"./SyntaxHighlighter\";\nimport TableActions from \"./TableActions\";\nimport TablePaginationActions, {\n rowsPerPageOptions,\n} from \"./TablePaginationActions\";\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 {!window.READ_ONLY && (\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 )}\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 {!window.READ_ONLY && (\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 )}\n {columns\n .filter((col) => {\n // Filter out actions column in readonly mode.\n return !window.READ_ONLY || col.key !== \"actions\";\n })\n .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 \"& #copy-button\": {\n display: \"none\",\n },\n \"&:hover\": {\n boxShadow: theme.shadows[2],\n \"& #copy-button\": {\n display: \"inline-block\",\n },\n },\n \"&:hover $copyButton\": {\n display: \"inline-block\",\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 idCell: {\n width: \"200px\",\n },\n copyButton: {\n display: \"none\",\n },\n IdGroup: {\n display: \"flex\",\n alignItems: \"center\",\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 {!window.READ_ONLY && (\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 )}\n <TableCell component=\"th\" scope=\"row\" className={classes.idCell}>\n <div className={classes.IdGroup}>\n {uuidPrefix(task.id)}\n <Tooltip title=\"Copy full ID to clipboard\">\n <IconButton\n onClick={(e) => {\n e.stopPropagation();\n navigator.clipboard.writeText(task.id);\n }}\n size=\"small\"\n className={classes.copyButton}\n >\n <FileCopyOutlinedIcon fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n </div>\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 {!window.READ_ONLY && (\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 )}\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\n queue={props.queue}\n totalTaskCount={currentStats.active}\n />\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 Latency\n </Typography>\n <Typography color=\"textSecondary\">\n {queue ? queue.display_latency : \"-\"}\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 as getPaths, 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: 400,\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 const paths = getPaths();\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 } from \"react-router-dom\";\nimport { listQueuesAsync } from \"../actions/queuesActions\";\nimport { AppState } from \"../store\";\nimport { QueueDetailsRouteParams } from \"../paths\";\nimport { useQuery } from \"../hooks\";\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\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 { Dispatch } from \"redux\";\nimport { getMetrics, MetricsResponse } from \"../api\";\nimport { toErrorString, toErrorStringWithHttpStatus } from \"../utils\";\n\n// List of metrics related action types.\nexport const GET_METRICS_BEGIN = \"GET_METRICS_BEGIN\";\nexport const GET_METRICS_SUCCESS = \"GET_METRICS_SUCCESS\";\nexport const GET_METRICS_ERROR = \"GET_METRICS_ERROR\";\n\ninterface GetMetricsBeginAction {\n type: typeof GET_METRICS_BEGIN;\n}\n\ninterface GetMetricsSuccessAction {\n type: typeof GET_METRICS_SUCCESS;\n payload: MetricsResponse;\n}\n\ninterface GetMetricsErrorAction {\n type: typeof GET_METRICS_ERROR;\n error: string;\n}\n\n// Union of all metrics related actions.\nexport type MetricsActionTypes =\n | GetMetricsBeginAction\n | GetMetricsSuccessAction\n | GetMetricsErrorAction;\n\nexport function getMetricsAsync(\n endTime: number,\n duration: number,\n queues: string[]\n) {\n return async (dispatch: Dispatch<MetricsActionTypes>) => {\n dispatch({ type: GET_METRICS_BEGIN });\n try {\n const response = await getMetrics(endTime, duration, queues);\n dispatch({ type: GET_METRICS_SUCCESS, payload: response });\n } catch (error) {\n console.error(`getMetricsAsync: ${toErrorStringWithHttpStatus(error)}`);\n dispatch({\n type: GET_METRICS_ERROR,\n error: toErrorString(error),\n });\n }\n };\n}\n","import { useTheme } from \"@material-ui/core/styles\";\nimport React from \"react\";\nimport {\n LineChart,\n Line,\n XAxis,\n YAxis,\n CartesianGrid,\n Tooltip,\n Legend,\n ResponsiveContainer,\n} from \"recharts\";\nimport { Metrics } from \"../api\";\n\ninterface Props {\n data: Metrics[];\n\n // both startTime and endTime are in unix time (seconds)\n startTime: number;\n endTime: number;\n\n // (optional): Tick formatter function for YAxis\n yAxisTickFormatter?: (val: number) => string;\n}\n\n// interface that rechart understands.\ninterface ChartData {\n timestamp: number;\n [qname: string]: number;\n}\n\nfunction toChartData(metrics: Metrics[]): ChartData[] {\n if (metrics.length === 0) {\n return [];\n }\n let byTimestamp: { [key: number]: ChartData } = {};\n for (let x of metrics) {\n for (let [ts, val] of x.values) {\n if (!byTimestamp[ts]) {\n byTimestamp[ts] = { timestamp: ts };\n }\n const qname = x.metric.queue;\n if (qname) {\n byTimestamp[ts][qname] = parseFloat(val);\n }\n }\n }\n return Object.values(byTimestamp);\n}\n\nconst lineColors = [\n \"#2085ec\",\n \"#72b4eb\",\n \"#0a417a\",\n \"#8464a0\",\n \"#cea9bc\",\n \"#323232\",\n];\n\nfunction QueueMetricsChart(props: Props) {\n const theme = useTheme();\n\n const data = toChartData(props.data);\n const keys = props.data.map((x) => x.metric.queue);\n return (\n <ResponsiveContainer height={260}>\n <LineChart data={data}>\n <CartesianGrid strokeDasharray=\"3 3\" />\n <XAxis\n minTickGap={10}\n dataKey=\"timestamp\"\n domain={[props.startTime, props.endTime]}\n tickFormatter={(timestamp: number) =>\n new Date(timestamp * 1000).toLocaleTimeString()\n }\n type=\"number\"\n scale=\"time\"\n stroke={theme.palette.text.secondary}\n />\n <YAxis\n tickFormatter={props.yAxisTickFormatter}\n stroke={theme.palette.text.secondary}\n />\n <Tooltip\n labelFormatter={(timestamp: number) => {\n return new Date(timestamp * 1000).toLocaleTimeString();\n }}\n />\n <Legend />\n {keys.map((key, idx) => (\n <Line\n key={key}\n type=\"monotone\"\n dataKey={key}\n stroke={lineColors[idx % lineColors.length]}\n dot={false}\n />\n ))}\n </LineChart>\n </ResponsiveContainer>\n );\n}\n\nQueueMetricsChart.defaultProps = {\n yAxisTickFormatter: (val: number) => val.toString(),\n};\n\nexport default QueueMetricsChart;\n","import React from \"react\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport { makeStyles, Theme } from \"@material-ui/core/styles\";\nimport Button, { ButtonProps } from \"@material-ui/core/Button\";\nimport ButtonGroup from \"@material-ui/core/ButtonGroup\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Popover from \"@material-ui/core/Popover\";\nimport Radio from \"@material-ui/core/Radio\";\nimport RadioGroup from \"@material-ui/core/RadioGroup\";\nimport Checkbox from \"@material-ui/core/Checkbox\";\nimport FormControlLabel from \"@material-ui/core/FormControlLabel\";\nimport FormControl from \"@material-ui/core/FormControl\";\nimport FormGroup from \"@material-ui/core/FormGroup\";\nimport FormLabel from \"@material-ui/core/FormLabel\";\nimport TextField from \"@material-ui/core/TextField\";\nimport Typography from \"@material-ui/core/Typography\";\nimport ArrowLeftIcon from \"@material-ui/icons/ArrowLeft\";\nimport ArrowRightIcon from \"@material-ui/icons/ArrowRight\";\nimport FilterListIcon from \"@material-ui/icons/FilterList\";\nimport dayjs from \"dayjs\";\nimport { currentUnixtime, parseDuration } from \"../utils\";\nimport { AppState } from \"../store\";\nimport { isDarkTheme } from \"../theme\";\n\nfunction mapStateToProps(state: AppState) {\n return { pollInterval: state.settings.pollInterval };\n}\n\nconst connector = connect(mapStateToProps);\ntype ReduxProps = ConnectedProps<typeof connector>;\n\ninterface Props extends ReduxProps {\n // Specifies the endtime in Unix time seconds.\n endTimeSec: number;\n onEndTimeChange: (t: number, isEndTimeFixed: boolean) => void;\n\n // Specifies the duration in seconds.\n durationSec: number;\n onDurationChange: (d: number, isEndTimeFixed: boolean) => void;\n\n // All available queues.\n queues: string[];\n // Selected queues.\n selectedQueues: string[];\n addQueue: (qname: string) => void;\n removeQueue: (qname: string) => void;\n}\n\ninterface State {\n endTimeOption: EndTimeOption;\n durationOption: DurationOption;\n customEndTime: string; // text shown in input field\n customDuration: string; // text shown in input field\n customEndTimeError: string;\n customDurationError: string;\n}\n\ntype EndTimeOption = \"real_time\" | \"freeze_at_now\" | \"custom\";\ntype DurationOption = \"1h\" | \"6h\" | \"1d\" | \"8d\" | \"30d\" | \"custom\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: \"flex\",\n alignItems: \"center\",\n },\n endTimeCaption: {\n marginRight: theme.spacing(1),\n },\n shiftButtons: {\n marginLeft: theme.spacing(1),\n },\n buttonGroupRoot: {\n height: 29,\n position: \"relative\",\n top: 1,\n },\n endTimeShiftControls: {\n padding: theme.spacing(1),\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n borderBottomColor: theme.palette.divider,\n borderBottomWidth: 1,\n borderBottomStyle: \"solid\",\n },\n leftShiftButtons: {\n display: \"flex\",\n alignItems: \"center\",\n marginRight: theme.spacing(2),\n },\n rightShiftButtons: {\n display: \"flex\",\n alignItems: \"center\",\n marginLeft: theme.spacing(2),\n },\n controlsContainer: {\n display: \"flex\",\n justifyContent: \"flex-end\",\n },\n controlSelectorBox: {\n display: \"flex\",\n minWidth: 490,\n padding: theme.spacing(2),\n },\n controlEndTimeSelector: {\n width: \"50%\",\n },\n controlDurationSelector: {\n width: \"50%\",\n },\n radioButtonRoot: {\n paddingTop: theme.spacing(0.5),\n paddingBottom: theme.spacing(0.5),\n paddingLeft: theme.spacing(1),\n paddingRight: theme.spacing(1),\n },\n formControlLabel: {\n fontSize: 14,\n },\n buttonLabel: {\n textTransform: \"none\",\n fontSize: 12,\n },\n formControlRoot: {\n width: \"100%\",\n margin: 0,\n },\n formLabel: {\n fontSize: 14,\n fontWeight: 500,\n marginBottom: theme.spacing(1),\n },\n customInputField: {\n marginTop: theme.spacing(1),\n },\n filterButton: {\n marginLeft: theme.spacing(1),\n },\n queueFilters: {\n padding: theme.spacing(2),\n maxHeight: 400,\n },\n checkbox: {\n padding: 6,\n },\n}));\n\n// minute, hour, day in seconds\nconst minute = 60;\nconst hour = 60 * minute;\nconst day = 24 * hour;\n\nfunction getInitialState(endTimeSec: number, durationSec: number): State {\n let endTimeOption: EndTimeOption = \"real_time\";\n let customEndTime = \"\";\n let durationOption: DurationOption = \"1h\";\n let customDuration = \"\";\n\n const now = currentUnixtime();\n // Account for 1s difference, may just happen to elapse 1s\n // between the parent component's render and this component's render.\n if (now <= endTimeSec && endTimeSec <= now + 1) {\n endTimeOption = \"real_time\";\n } else {\n endTimeOption = \"custom\";\n customEndTime = new Date(endTimeSec * 1000).toISOString();\n }\n\n switch (durationSec) {\n case 1 * hour:\n durationOption = \"1h\";\n break;\n case 6 * hour:\n durationOption = \"6h\";\n break;\n case 1 * day:\n durationOption = \"1d\";\n break;\n case 8 * day:\n durationOption = \"8d\";\n break;\n case 30 * day:\n durationOption = \"30d\";\n break;\n default:\n durationOption = \"custom\";\n customDuration = durationSec + \"s\";\n }\n\n return {\n endTimeOption,\n customEndTime,\n customEndTimeError: \"\",\n durationOption,\n customDuration,\n customDurationError: \"\",\n };\n}\n\nfunction MetricsFetchControls(props: Props) {\n const classes = useStyles();\n\n const [state, setState] = React.useState<State>(\n getInitialState(props.endTimeSec, props.durationSec)\n );\n const [timePopoverAnchorElem, setTimePopoverAnchorElem] =\n React.useState<HTMLButtonElement | null>(null);\n\n const [queuePopoverAnchorElem, setQueuePopoverAnchorElem] =\n React.useState<HTMLButtonElement | null>(null);\n\n const handleEndTimeOptionChange = (\n event: React.ChangeEvent<HTMLInputElement>\n ) => {\n const selectedOpt = (event.target as HTMLInputElement)\n .value as EndTimeOption;\n setState((prevState) => ({\n ...prevState,\n endTimeOption: selectedOpt,\n customEndTime: \"\",\n customEndTimeError: \"\",\n }));\n switch (selectedOpt) {\n case \"real_time\":\n props.onEndTimeChange(currentUnixtime(), /*isEndTimeFixed=*/ false);\n break;\n case \"freeze_at_now\":\n props.onEndTimeChange(currentUnixtime(), /*isEndTimeFixed=*/ true);\n break;\n case \"custom\":\n // No-op\n }\n };\n\n const handleDurationOptionChange = (\n event: React.ChangeEvent<HTMLInputElement>\n ) => {\n const selectedOpt = (event.target as HTMLInputElement)\n .value as DurationOption;\n setState((prevState) => ({\n ...prevState,\n durationOption: selectedOpt,\n customDuration: \"\",\n customDurationError: \"\",\n }));\n const isEndTimeFixed = state.endTimeOption !== \"real_time\";\n switch (selectedOpt) {\n case \"1h\":\n props.onDurationChange(1 * hour, isEndTimeFixed);\n break;\n case \"6h\":\n props.onDurationChange(6 * hour, isEndTimeFixed);\n break;\n case \"1d\":\n props.onDurationChange(1 * day, isEndTimeFixed);\n break;\n case \"8d\":\n props.onDurationChange(8 * day, isEndTimeFixed);\n break;\n case \"30d\":\n props.onDurationChange(30 * day, isEndTimeFixed);\n break;\n case \"custom\":\n // No-op\n }\n };\n\n const handleCustomDurationChange = (\n event: React.ChangeEvent<HTMLInputElement>\n ) => {\n event.persist(); // https://reactjs.org/docs/legacy-event-pooling.html\n setState((prevState) => ({\n ...prevState,\n customDuration: event.target.value,\n }));\n };\n\n const handleCustomEndTimeChange = (\n event: React.ChangeEvent<HTMLInputElement>\n ) => {\n event.persist(); // https://reactjs.org/docs/legacy-event-pooling.html\n setState((prevState) => ({\n ...prevState,\n customEndTime: event.target.value,\n }));\n };\n\n const handleCustomDurationKeyDown = (\n event: React.KeyboardEvent<HTMLInputElement>\n ) => {\n if (event.key === \"Enter\") {\n try {\n const d = parseDuration(state.customDuration);\n setState((prevState) => ({\n ...prevState,\n durationOption: \"custom\",\n customDurationError: \"\",\n }));\n props.onDurationChange(d, state.endTimeOption !== \"real_time\");\n } catch (error) {\n setState((prevState) => ({\n ...prevState,\n customDurationError: \"Duration invalid\",\n }));\n }\n }\n };\n\n const handleCustomEndTimeKeyDown = (\n event: React.KeyboardEvent<HTMLInputElement>\n ) => {\n if (event.key === \"Enter\") {\n const timeUsecOrNaN = Date.parse(state.customEndTime);\n if (isNaN(timeUsecOrNaN)) {\n setState((prevState) => ({\n ...prevState,\n customEndTimeError: \"End time invalid\",\n }));\n return;\n }\n setState((prevState) => ({\n ...prevState,\n endTimeOption: \"custom\",\n customEndTimeError: \"\",\n }));\n props.onEndTimeChange(\n Math.floor(timeUsecOrNaN / 1000),\n /* isEndTimeFixed= */ true\n );\n }\n };\n\n const handleOpenTimePopover = (\n event: React.MouseEvent<HTMLButtonElement>\n ) => {\n setTimePopoverAnchorElem(event.currentTarget);\n };\n\n const handleCloseTimePopover = () => {\n setTimePopoverAnchorElem(null);\n };\n\n const handleOpenQueuePopover = (\n event: React.MouseEvent<HTMLButtonElement>\n ) => {\n setQueuePopoverAnchorElem(event.currentTarget);\n };\n\n const handleCloseQueuePopover = () => {\n setQueuePopoverAnchorElem(null);\n };\n\n const isTimePopoverOpen = Boolean(timePopoverAnchorElem);\n const isQueuePopoverOpen = Boolean(queuePopoverAnchorElem);\n\n React.useEffect(() => {\n if (state.endTimeOption === \"real_time\") {\n const id = setInterval(() => {\n props.onEndTimeChange(currentUnixtime(), /*isEndTimeFixed=*/ false);\n }, props.pollInterval * 1000);\n return () => clearInterval(id);\n }\n });\n\n const shiftBy = (deltaSec: number) => {\n return () => {\n const now = currentUnixtime();\n const endTime = props.endTimeSec + deltaSec;\n if (now <= endTime) {\n setState((prevState) => ({\n ...prevState,\n customEndTime: \"\",\n endTimeOption: \"real_time\",\n }));\n props.onEndTimeChange(now, /*isEndTimeFixed=*/ false);\n return;\n }\n setState((prevState) => ({\n ...prevState,\n endTimeOption: \"custom\",\n customEndTime: new Date(endTime * 1000).toISOString(),\n }));\n props.onEndTimeChange(endTime, /*isEndTimeFixed=*/ true);\n };\n };\n\n return (\n <div className={classes.root}>\n <Typography\n variant=\"caption\"\n color=\"textPrimary\"\n className={classes.endTimeCaption}\n >\n {formatTime(props.endTimeSec)}\n </Typography>\n <div>\n <Button\n aria-describedby={isTimePopoverOpen ? \"time-popover\" : undefined}\n variant=\"outlined\"\n color=\"primary\"\n onClick={handleOpenTimePopover}\n size=\"small\"\n classes={{\n label: classes.buttonLabel,\n }}\n >\n {state.endTimeOption === \"real_time\" ? \"Realtime\" : \"Historical\"}:{\" \"}\n {state.durationOption === \"custom\"\n ? state.customDuration\n : state.durationOption}\n </Button>\n <Popover\n id={isTimePopoverOpen ? \"time-popover\" : undefined}\n open={isTimePopoverOpen}\n anchorEl={timePopoverAnchorElem}\n onClose={handleCloseTimePopover}\n anchorOrigin={{\n vertical: \"bottom\",\n horizontal: \"center\",\n }}\n transformOrigin={{\n vertical: \"top\",\n horizontal: \"center\",\n }}\n >\n <div className={classes.endTimeShiftControls}>\n <div className={classes.leftShiftButtons}>\n <ShiftButton\n direction=\"left\"\n text=\"2h\"\n onClick={shiftBy(-2 * hour)}\n dense={true}\n />\n <ShiftButton\n direction=\"left\"\n text=\"1h\"\n onClick={shiftBy(-1 * hour)}\n dense={true}\n />\n <ShiftButton\n direction=\"left\"\n text=\"30m\"\n onClick={shiftBy(-30 * minute)}\n dense={true}\n />\n <ShiftButton\n direction=\"left\"\n text=\"15m\"\n onClick={shiftBy(-15 * minute)}\n dense={true}\n />\n <ShiftButton\n direction=\"left\"\n text=\"5m\"\n onClick={shiftBy(-5 * minute)}\n dense={true}\n />\n </div>\n <div className={classes.rightShiftButtons}>\n <ShiftButton\n direction=\"right\"\n text=\"5m\"\n onClick={shiftBy(5 * minute)}\n dense={true}\n />\n <ShiftButton\n direction=\"right\"\n text=\"15m\"\n onClick={shiftBy(15 * minute)}\n dense={true}\n />\n <ShiftButton\n direction=\"right\"\n text=\"30m\"\n onClick={shiftBy(30 * minute)}\n dense={true}\n />\n <ShiftButton\n direction=\"right\"\n text=\"1h\"\n onClick={shiftBy(1 * hour)}\n dense={true}\n />\n <ShiftButton\n direction=\"right\"\n text=\"2h\"\n onClick={shiftBy(2 * hour)}\n dense={true}\n />\n </div>\n </div>\n <div className={classes.controlSelectorBox}>\n <div className={classes.controlEndTimeSelector}>\n <FormControl\n component=\"fieldset\"\n margin=\"dense\"\n classes={{ root: classes.formControlRoot }}\n >\n <FormLabel className={classes.formLabel} component=\"legend\">\n End Time\n </FormLabel>\n <RadioGroup\n aria-label=\"end_time\"\n name=\"end_time\"\n value={state.endTimeOption}\n onChange={handleEndTimeOptionChange}\n >\n <RadioInput value=\"real_time\" label=\"Real Time\" />\n <RadioInput value=\"freeze_at_now\" label=\"Freeze at now\" />\n <RadioInput value=\"custom\" label=\"Custom End Time\" />\n </RadioGroup>\n <div className={classes.customInputField}>\n <TextField\n id=\"custom-endtime\"\n label=\"yyyy-mm-dd hh:mm:ssz\"\n variant=\"outlined\"\n size=\"small\"\n onChange={handleCustomEndTimeChange}\n value={state.customEndTime}\n onKeyDown={handleCustomEndTimeKeyDown}\n error={state.customEndTimeError !== \"\"}\n helperText={state.customEndTimeError}\n />\n </div>\n </FormControl>\n </div>\n <div className={classes.controlDurationSelector}>\n <FormControl\n component=\"fieldset\"\n margin=\"dense\"\n classes={{ root: classes.formControlRoot }}\n >\n <FormLabel className={classes.formLabel} component=\"legend\">\n Duration\n </FormLabel>\n <RadioGroup\n aria-label=\"duration\"\n name=\"duration\"\n value={state.durationOption}\n onChange={handleDurationOptionChange}\n >\n <RadioInput value=\"1h\" label=\"1h\" />\n <RadioInput value=\"6h\" label=\"6h\" />\n <RadioInput value=\"1d\" label=\"1 day\" />\n <RadioInput value=\"8d\" label=\"8 days\" />\n <RadioInput value=\"30d\" label=\"30 days\" />\n <RadioInput value=\"custom\" label=\"Custom Duration\" />\n </RadioGroup>\n <div className={classes.customInputField}>\n <TextField\n id=\"custom-duration\"\n label=\"duration\"\n variant=\"outlined\"\n size=\"small\"\n onChange={handleCustomDurationChange}\n value={state.customDuration}\n onKeyDown={handleCustomDurationKeyDown}\n error={state.customDurationError !== \"\"}\n helperText={state.customDurationError}\n />\n </div>\n </FormControl>\n </div>\n </div>\n </Popover>\n </div>\n <div className={classes.shiftButtons}>\n <ButtonGroup\n classes={{ root: classes.buttonGroupRoot }}\n size=\"small\"\n color=\"primary\"\n aria-label=\"shift buttons\"\n >\n <ShiftButton\n direction=\"left\"\n text={\n state.durationOption === \"custom\" ? \"1h\" : state.durationOption\n }\n color=\"primary\"\n onClick={\n state.durationOption === \"custom\"\n ? shiftBy(-1 * hour)\n : shiftBy(-props.durationSec)\n }\n />\n <ShiftButton\n direction=\"right\"\n text={\n state.durationOption === \"custom\" ? \"1h\" : state.durationOption\n }\n color=\"primary\"\n onClick={\n state.durationOption === \"custom\"\n ? shiftBy(1 * hour)\n : shiftBy(props.durationSec)\n }\n />\n </ButtonGroup>\n </div>\n <div className={classes.filterButton}>\n <IconButton\n aria-label=\"filter\"\n size=\"small\"\n onClick={handleOpenQueuePopover}\n >\n <FilterListIcon />\n </IconButton>\n <Popover\n id={isQueuePopoverOpen ? \"queue-popover\" : undefined}\n open={isQueuePopoverOpen}\n anchorEl={queuePopoverAnchorElem}\n onClose={handleCloseQueuePopover}\n anchorOrigin={{\n vertical: \"bottom\",\n horizontal: \"center\",\n }}\n transformOrigin={{\n vertical: \"top\",\n horizontal: \"center\",\n }}\n >\n <FormControl className={classes.queueFilters}>\n <FormLabel className={classes.formLabel} component=\"legend\">\n Queues\n </FormLabel>\n <FormGroup>\n {props.queues.map((qname) => (\n <FormControlLabel\n key={qname}\n control={\n <Checkbox\n size=\"small\"\n checked={props.selectedQueues.includes(qname)}\n onChange={() => {\n if (props.selectedQueues.includes(qname)) {\n props.removeQueue(qname);\n } else {\n props.addQueue(qname);\n }\n }}\n name={qname}\n className={classes.checkbox}\n />\n }\n label={qname}\n classes={{ label: classes.formControlLabel }}\n />\n ))}\n </FormGroup>\n </FormControl>\n </Popover>\n </div>\n </div>\n );\n}\n\n/****************** Helper functions/components *******************/\n\nfunction formatTime(unixtime: number): string {\n const tz = new Date(unixtime * 1000)\n .toLocaleTimeString(\"en-us\", { timeZoneName: \"short\" })\n .split(\" \")[2];\n return dayjs.unix(unixtime).format(\"ddd, DD MMM YYYY HH:mm:ss \") + tz;\n}\n\ninterface RadioInputProps {\n value: string;\n label: string;\n}\n\nfunction RadioInput(props: RadioInputProps) {\n const classes = useStyles();\n return (\n <FormControlLabel\n classes={{ label: classes.formControlLabel }}\n value={props.value}\n control={\n <Radio size=\"small\" classes={{ root: classes.radioButtonRoot }} />\n }\n label={props.label}\n />\n );\n}\n\ninterface ShiftButtonProps extends ButtonProps {\n text: string;\n onClick: () => void;\n direction: \"left\" | \"right\";\n dense?: boolean;\n}\n\nconst useShiftButtonStyles = makeStyles((theme: Theme) => ({\n root: {\n minWidth: 40,\n fontWeight: (props: ShiftButtonProps) => (props.dense ? 400 : 500),\n },\n label: { fontSize: 12, textTransform: \"none\" },\n iconRoot: {\n marginRight: (props: ShiftButtonProps) =>\n props.direction === \"left\" ? (props.dense ? -8 : -4) : 0,\n marginLeft: (props: ShiftButtonProps) =>\n props.direction === \"right\" ? (props.dense ? -8 : -4) : 0,\n color: (props: ShiftButtonProps) =>\n props.color\n ? props.color\n : theme.palette.grey[isDarkTheme(theme) ? 200 : 700],\n },\n}));\n\nfunction ShiftButton(props: ShiftButtonProps) {\n const classes = useShiftButtonStyles(props);\n return (\n <Button\n {...props}\n classes={{\n root: classes.root,\n label: classes.label,\n }}\n size=\"small\"\n >\n {props.direction === \"left\" && (\n <ArrowLeftIcon classes={{ root: classes.iconRoot }} />\n )}\n {props.text}\n {props.direction === \"right\" && (\n <ArrowRightIcon classes={{ root: classes.iconRoot }} />\n )}\n </Button>\n );\n}\n\nShiftButton.defaultProps = {\n dense: false,\n};\n\nexport default connect(mapStateToProps)(MetricsFetchControls);\n","import React from \"react\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport { useHistory } from \"react-router-dom\";\nimport queryString from \"query-string\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Container from \"@material-ui/core/Container\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\nimport WarningIcon from \"@material-ui/icons/Warning\";\nimport InfoIcon from \"@material-ui/icons/Info\";\nimport prettyBytes from \"pretty-bytes\";\nimport { getMetricsAsync } from \"../actions/metricsActions\";\nimport { listQueuesAsync } from \"../actions/queuesActions\";\nimport { AppState } from \"../store\";\nimport QueueMetricsChart from \"../components/QueueMetricsChart\";\nimport Tooltip from \"../components/Tooltip\";\nimport { currentUnixtime } from \"../utils\";\nimport MetricsFetchControls from \"../components/MetricsFetchControls\";\nimport { useQuery } from \"../hooks\";\nimport { PrometheusMetricsResponse } from \"../api\";\n\nconst useStyles = makeStyles((theme) => ({\n container: {\n marginTop: 30,\n paddingTop: theme.spacing(4),\n paddingBottom: theme.spacing(4),\n },\n controlsContainer: {\n display: \"flex\",\n justifyContent: \"flex-end\",\n position: \"fixed\",\n background: theme.palette.background.paper,\n zIndex: theme.zIndex.appBar,\n right: 0,\n top: 64, // app-bar height\n width: \"100%\",\n padding: theme.spacing(2),\n },\n chartInfo: {\n display: \"flex\",\n alignItems: \"center\",\n marginBottom: theme.spacing(1),\n },\n infoIcon: {\n marginLeft: theme.spacing(1),\n color: theme.palette.grey[500],\n cursor: \"pointer\",\n },\n errorMessage: {\n marginLeft: \"auto\",\n display: \"flex\",\n alignItems: \"center\",\n },\n warningIcon: {\n color: \"#ff6700\",\n marginRight: 6,\n },\n}));\n\nfunction mapStateToProps(state: AppState) {\n return {\n loading: state.metrics.loading,\n error: state.metrics.error,\n data: state.metrics.data,\n pollInterval: state.settings.pollInterval,\n queues: state.queues.data.map((q) => q.name),\n };\n}\n\nconst connector = connect(mapStateToProps, {\n getMetricsAsync,\n listQueuesAsync,\n});\ntype Props = ConnectedProps<typeof connector>;\n\nconst ENDTIME_URL_PARAM_KEY = \"end\";\nconst DURATION_URL_PARAM_KEY = \"duration\";\n\nfunction MetricsView(props: Props) {\n const classes = useStyles();\n const history = useHistory();\n const query = useQuery();\n\n const endTimeStr = query.get(ENDTIME_URL_PARAM_KEY);\n const endTime = endTimeStr ? parseFloat(endTimeStr) : currentUnixtime(); // default to now\n\n const durationStr = query.get(DURATION_URL_PARAM_KEY);\n const duration = durationStr ? parseFloat(durationStr) : 60 * 60; // default to 1h\n\n const { pollInterval, getMetricsAsync, listQueuesAsync, data } = props;\n\n const [endTimeSec, setEndTimeSec] = React.useState(endTime);\n const [durationSec, setDurationSec] = React.useState(duration);\n const [selectedQueues, setSelectedQueues] = React.useState<string[]>([]);\n\n const handleEndTimeChange = (endTime: number, isEndTimeFixed: boolean) => {\n const urlQuery = isEndTimeFixed\n ? {\n [ENDTIME_URL_PARAM_KEY]: endTime,\n [DURATION_URL_PARAM_KEY]: durationSec,\n }\n : {\n [DURATION_URL_PARAM_KEY]: durationSec,\n };\n history.push({\n ...history.location,\n search: queryString.stringify(urlQuery),\n });\n setEndTimeSec(endTime);\n };\n\n const handleDurationChange = (duration: number, isEndTimeFixed: boolean) => {\n const urlQuery = isEndTimeFixed\n ? {\n [ENDTIME_URL_PARAM_KEY]: endTimeSec,\n [DURATION_URL_PARAM_KEY]: duration,\n }\n : {\n [DURATION_URL_PARAM_KEY]: duration,\n };\n history.push({\n ...history.location,\n search: queryString.stringify(urlQuery),\n });\n setDurationSec(duration);\n };\n\n const handleAddQueue = (qname: string) => {\n if (selectedQueues.includes(qname)) {\n return;\n }\n setSelectedQueues(selectedQueues.concat(qname));\n };\n\n const handleRemoveQueue = (qname: string) => {\n if (selectedQueues.length === 1) {\n return; // ensure that selected queues doesn't go down to zero once user selected\n }\n if (selectedQueues.length === 0) {\n // when user first select filter (remove once of the queues),\n // we need to lazily initialize the selectedQueues with the rest (all queues but the selected one).\n setSelectedQueues(props.queues.filter((q) => q !== qname));\n return;\n }\n setSelectedQueues(selectedQueues.filter((q) => q !== qname));\n };\n\n React.useEffect(() => {\n listQueuesAsync();\n }, [listQueuesAsync]);\n\n React.useEffect(() => {\n getMetricsAsync(endTimeSec, durationSec, selectedQueues);\n }, [pollInterval, getMetricsAsync, durationSec, endTimeSec, selectedQueues]);\n\n return (\n <Container maxWidth=\"lg\" className={classes.container}>\n <div className={classes.controlsContainer}>\n <MetricsFetchControls\n endTimeSec={endTimeSec}\n onEndTimeChange={handleEndTimeChange}\n durationSec={durationSec}\n onDurationChange={handleDurationChange}\n queues={props.queues}\n selectedQueues={\n // If none are selected (e.g. initial state), no filters should apply.\n selectedQueues.length === 0 ? props.queues : selectedQueues\n }\n addQueue={handleAddQueue}\n removeQueue={handleRemoveQueue}\n />\n </div>\n <Grid container spacing={3}>\n {data?.tasks_processed_per_second && (\n <Grid item xs={12}>\n <ChartRow\n title=\"Tasks Processed\"\n description=\"Number of tasks processed (both succeeded and failed) per second.\"\n metrics={data.tasks_processed_per_second}\n endTime={endTimeSec}\n startTime={endTimeSec - durationSec}\n />\n </Grid>\n )}\n {data?.tasks_failed_per_second && (\n <Grid item xs={12}>\n <ChartRow\n title=\"Tasks Failed\"\n description=\"Number of tasks failed per second.\"\n metrics={data.tasks_failed_per_second}\n endTime={endTimeSec}\n startTime={endTimeSec - durationSec}\n />\n </Grid>\n )}\n {data?.error_rate && (\n <Grid item xs={12}>\n <ChartRow\n title=\"Error Rate\"\n description=\"Rate of task failures\"\n metrics={data.error_rate}\n endTime={endTimeSec}\n startTime={endTimeSec - durationSec}\n />\n </Grid>\n )}\n {data?.queue_size && (\n <Grid item xs={12}>\n <ChartRow\n title=\"Queue Size\"\n description=\"Total number of tasks in a given queue.\"\n metrics={data.queue_size}\n endTime={endTimeSec}\n startTime={endTimeSec - durationSec}\n />\n </Grid>\n )}\n {data?.queue_latency_seconds && (\n <Grid item xs={12}>\n <ChartRow\n title=\"Queue Latency\"\n description=\"Latency of queue, measured by the oldest pending task in the queue.\"\n metrics={data.queue_latency_seconds}\n endTime={endTimeSec}\n startTime={endTimeSec - durationSec}\n yAxisTickFormatter={(val: number) => val + \"s\"}\n />\n </Grid>\n )}\n {data?.queue_size && (\n <Grid item xs={12}>\n <ChartRow\n title=\"Queue Memory Usage (approx)\"\n description=\"Memory usage by queue. Approximate value by sampling a few tasks in a queue.\"\n metrics={data.queue_memory_usage_approx_bytes}\n endTime={endTimeSec}\n startTime={endTimeSec - durationSec}\n yAxisTickFormatter={(val: number) => {\n try {\n return prettyBytes(val);\n } catch (error) {\n return val + \"B\";\n }\n }}\n />\n </Grid>\n )}\n {data?.pending_tasks_by_queue && (\n <Grid item xs={12}>\n <ChartRow\n title=\"Pending Tasks\"\n description=\"Number of pending tasks in a given queue.\"\n metrics={data.pending_tasks_by_queue}\n endTime={endTimeSec}\n startTime={endTimeSec - durationSec}\n />\n </Grid>\n )}\n {data?.retry_tasks_by_queue && (\n <Grid item xs={12}>\n <ChartRow\n title=\"Retry Tasks\"\n description=\"Number of retry tasks in a given queue.\"\n metrics={data.retry_tasks_by_queue}\n endTime={endTimeSec}\n startTime={endTimeSec - durationSec}\n />\n </Grid>\n )}\n {data?.archived_tasks_by_queue && (\n <Grid item xs={12}>\n <ChartRow\n title=\"Archived Tasks\"\n description=\"Number of archived tasks in a given queue.\"\n metrics={data.archived_tasks_by_queue}\n endTime={endTimeSec}\n startTime={endTimeSec - durationSec}\n />\n </Grid>\n )}\n </Grid>\n </Container>\n );\n}\n\nexport default connector(MetricsView);\n\n/******** Helper components ********/\n\ninterface ChartRowProps {\n title: string;\n description: string;\n metrics: PrometheusMetricsResponse;\n endTime: number;\n startTime: number;\n yAxisTickFormatter?: (val: number) => string;\n}\n\nfunction ChartRow(props: ChartRowProps) {\n const classes = useStyles();\n return (\n <>\n <div className={classes.chartInfo}>\n <Typography color=\"textPrimary\">{props.title}</Typography>\n <Tooltip title={<div>{props.description}</div>}>\n <InfoIcon fontSize=\"small\" className={classes.infoIcon} />\n </Tooltip>\n {props.metrics.status === \"error\" && (\n <div className={classes.errorMessage}>\n <WarningIcon fontSize=\"small\" className={classes.warningIcon} />\n <Typography color=\"textSecondary\">\n Failed to get metrics data: {props.metrics.error}\n </Typography>\n </div>\n )}\n </div>\n <QueueMetricsChart\n data={\n props.metrics.status === \"error\"\n ? []\n : props.metrics.data?.result || []\n }\n endTime={props.endTime}\n startTime={props.startTime}\n yAxisTickFormatter={props.yAxisTickFormatter}\n />\n </>\n );\n}\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","var _g, _path;\n\nvar _excluded = [\"title\", \"titleId\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgLogoColor(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n height: 397,\n viewBox: \"0 0 1663 397\",\n width: 1663,\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n fill: \"#2f80ed\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"m206.548 169.585c-.557-23.718 13.058-45.343 34.682-55.094 29.6-13.347 64.54-.124 77.887 29.477l15.238 12.411.787-19.637c-17.331-38.4361-62.701-55.6064-101.137-38.2754-28.077 12.6594-45.753 40.7374-45.031 71.5204l.722 32.337 7.225 16.025 10.183-23.874z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"m107.46 139.032c2.407 5.339 5.56 10.213 9.32 14.511-5.737 1.125-11.386 2.914-16.8471 5.377-38.4362 17.331-55.6065 62.701-38.2754 101.137l15.2377 12.412.7867-19.637c-13.3469-29.601-.1238-64.541 29.4761-77.888 13.93-6.281 29.44-6.923 43.805-1.844l-4.244 11.213 42.371-6.199-27.65-32.7-4.255 11.246c-2.446-.879-4.918-1.63-7.408-2.253-11.712-3.279-21.294-11.514-26.294-22.6-9.274-20.57-.085-44.85 20.484-54.1248 20.57-9.2749 44.85-.0862 54.125 20.4834l16.024-7.2255c-13.259-29.4054-47.969-42.5414-77.374-29.2824s-42.5414 47.9693-29.282 77.3743z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"m162.795 298.333c28.076-12.66 45.753-40.737 45.03-71.521l-.721-32.337-17.408 7.85.555 24.89c.557 23.717-13.057 45.343-34.682 55.093-29.6 13.347-64.5399.124-77.8868-29.476l-16.0244 7.225c17.331 38.437 62.7012 55.607 101.1372 38.276z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"m289.641 221.854c-13.93 6.281-29.439 6.924-43.805 1.845l4.244-11.213-42.371 6.199 27.65 32.699 4.256-11.245c2.446.879 4.917 1.63 7.407 2.253 11.713 3.278 21.295 11.513 26.294 22.6 9.274 20.57.086 44.85-20.484 54.125-20.569 9.275-44.849.086-54.124-20.484l-16.025 7.226c13.259 29.405 47.969 42.541 77.375 29.282 29.405-13.259 42.541-47.969 29.282-77.374-2.407-5.339-5.561-10.213-9.321-14.511 5.738-1.125 11.386-2.915 16.847-5.377 38.437-17.331 55.607-62.701 38.276-101.137l-16.024 7.225c13.346 29.601.123 64.541-29.477 77.887z\"\n }))), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m517.32 233.008h-80.896l-20.992 52.992h-13.568l67.584-168.96h15.104l67.584 168.96h-13.568zm-4.608-11.776-29.44-73.728-6.144-17.92h-.256l-6.144 17.408-29.44 74.24zm108.05 67.328c-12.971 0-24.235-2.56-33.792-7.68s-16.128-12.544-19.712-22.272l10.496-6.912c2.56 8.533 7.765 14.933 15.616 19.2s17.493 6.4 28.928 6.4c11.605 0 20.651-2.219 27.136-6.656 6.656-4.437 9.984-10.325 9.984-17.664 0-6.315-2.816-11.349-8.448-15.104s-15.531-6.912-29.696-9.472c-17.92-3.243-30.549-7.595-37.888-13.056s-11.008-13.227-11.008-23.296c0-6.656 2.048-12.8 6.144-18.432s9.899-10.069 17.408-13.312 16.043-4.864 25.6-4.864c13.483 0 24.235 2.56 32.256 7.68 8.192 5.12 13.824 12.971 16.896 23.552l-11.008 6.4c-4.779-17.579-17.493-26.368-38.144-26.368-6.827 0-13.056 1.109-18.688 3.328-5.461 2.219-9.813 5.205-13.056 8.96-3.072 3.584-4.608 7.509-4.608 11.776 0 6.997 2.901 12.459 8.704 16.384s16.043 7.168 30.72 9.728c17.408 2.901 29.696 7.083 36.864 12.544s10.752 13.141 10.752 23.04c0 10.923-4.693 19.712-14.08 26.368-9.216 6.485-21.675 9.728-37.376 9.728zm122.732 20.992c-4.779 11.605-10.069 19.712-15.872 24.32-5.803 4.779-13.141 7.168-22.016 7.168-10.581 0-18.688-3.157-24.32-9.472l4.864-11.008c4.096 6.144 10.581 9.216 19.456 9.216 5.973 0 11.008-1.707 15.104-5.12 4.267-3.243 8.192-9.301 11.776-18.176l8.192-20.48-13.312-31.744-40.704-96.256h14.592l39.168 97.024 6.4 17.152 6.912-18.432 37.632-95.744h13.824zm149.444-154.112c14.677 0 26.453 4.096 35.328 12.288 9.045 8.192 13.568 19.968 13.568 35.328v82.944h-12.8v-78.848c0-13.653-3.328-23.808-9.984-30.464s-15.787-9.984-27.392-9.984c-8.192 0-15.787 1.877-22.784 5.632s-12.629 9.216-16.896 16.384c-4.096 7.168-6.144 15.531-6.144 25.088v72.192h-12.8v-128h11.52l.512 25.856c4.096-9.216 10.325-16.213 18.688-20.992 8.533-4.949 18.261-7.424 29.184-7.424zm203.692 2.56v181.76h-12.8v-80.896c-3.93 9.216-9.99 16.469-18.18 21.76s-17.83 7.936-28.93 7.936c-18.09 0-32.42-5.888-43.006-17.664-10.411-11.776-15.616-28.075-15.616-48.896s5.205-37.12 15.616-48.896c10.586-11.776 24.916-17.664 43.006-17.664 11.44 0 21.34 2.816 29.7 8.448 8.36 5.461 14.33 13.056 17.92 22.784l.77-28.672zm-58.37 119.296c13.31 0 23.98-4.437 32-13.312 8.19-9.045 12.71-21.248 13.57-36.608v-10.752c-.69-15.36-5.12-27.477-13.32-36.352-8.19-9.045-18.94-13.568-32.25-13.568-14.85 0-26.46 4.949-34.82 14.848-8.361 9.728-12.542 23.211-12.542 40.448s4.181 30.805 12.542 40.704c8.36 9.728 19.97 14.592 34.82 14.592zm259.93-122.368c14.5 0 26.11 4.096 34.81 12.288 8.71 8.192 13.06 19.712 13.06 34.56v83.712h-7.17v-82.944c0-13.141-3.75-23.296-11.26-30.464s-17.67-10.752-30.47-10.752c-9.21 0-17.66 2.219-25.34 6.656-7.51 4.267-13.48 10.155-17.92 17.664-4.27 7.339-6.4 15.36-6.4 24.064v76.288h-7.17v-82.944c0-13.141-3.75-23.296-11.26-30.464-7.51-7.339-17.67-11.008-30.47-11.008-9.04 0-17.4 2.219-25.08 6.656-7.51 4.267-13.49 10.155-17.92 17.664-4.44 7.339-6.66 15.531-6.66 24.576v75.52h-7.17v-128h6.66l.25 30.464c3.59-10.069 9.99-18.091 19.2-24.064 9.22-5.973 19.8-8.96 31.75-8.96 12.29 0 22.53 2.987 30.72 8.96 8.36 5.973 13.65 14.507 15.87 25.6 3.07-10.411 9.39-18.859 18.94-25.344 9.56-6.485 20.57-9.728 33.03-9.728zm142.29.512c18.61 0 33.2 5.888 43.78 17.664 10.75 11.776 16.13 28.075 16.13 48.896s-5.38 37.12-16.13 48.896c-10.58 11.776-25.17 17.664-43.78 17.664-18.77 0-33.53-5.888-44.28-17.664-10.76-11.947-16.13-28.245-16.13-48.896s5.37-36.864 16.13-48.64c10.75-11.947 25.51-17.92 44.28-17.92zm0 6.144c-16.55 0-29.61 5.376-39.16 16.128-9.39 10.752-14.08 25.515-14.08 44.288s4.69 33.536 14.08 44.288c9.55 10.752 22.61 16.128 39.16 16.128 16.39 0 29.27-5.376 38.66-16.128s14.08-25.515 14.08-44.288-4.69-33.536-14.08-44.288-22.27-16.128-38.66-16.128zm153.9-6.144c14.85 0 26.54 4.096 35.08 12.288 8.7 8.192 13.05 19.712 13.05 34.56v83.712h-7.17v-81.92c0-13.653-3.75-24.149-11.26-31.488s-17.75-11.008-30.72-11.008c-9.22 0-17.66 2.219-25.34 6.656-7.51 4.267-13.49 10.155-17.92 17.664-4.44 7.339-6.66 15.616-6.66 24.832v75.264h-7.17v-128h6.66v30.72c3.58-10.24 9.98-18.347 19.2-24.32 9.21-5.973 19.97-8.96 32.25-8.96z\",\n fill: \"#828282\"\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgLogoColor);\nexport default __webpack_public_path__ + \"static/media/logo-color.c2b0c1f3.svg\";\nexport { ForwardRef as ReactComponent };","var _g;\n\nvar _excluded = [\"title\", \"titleId\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgLogoWhite(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n fill: \"none\",\n height: 397,\n viewBox: \"0 0 1663 397\",\n width: 1663,\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n fill: \"#f2f2f2\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"m206.548 169.585c-.556-23.718 13.058-45.343 34.682-55.094 29.6-13.347 64.54-.124 77.887 29.477l15.238 12.411.787-19.637c-17.331-38.4361-62.701-55.6064-101.137-38.2754-28.077 12.6594-45.753 40.7374-45.031 71.5204l.722 32.337 7.225 16.025 10.183-23.874z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"m107.46 139.032c2.407 5.339 5.56 10.213 9.321 14.511-5.738 1.125-11.387 2.914-16.8479 5.377-38.4363 17.331-55.6066 62.701-38.2755 101.137l15.2377 12.412.7867-19.637c-13.3469-29.601-.1238-64.541 29.477-77.888 13.929-6.281 29.439-6.923 43.804-1.844l-4.244 11.213 42.371-6.199-27.649-32.7-4.256 11.246c-2.446-.879-4.917-1.63-7.407-2.253-11.713-3.279-21.295-11.514-26.294-22.6-9.275-20.57-.086-44.85 20.484-54.1248 20.569-9.2749 44.849-.0862 54.124 20.4834l16.024-7.2255c-13.259-29.4054-47.969-42.5414-77.374-29.2824s-42.5413 47.9693-29.282 77.3743z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"m162.795 298.333c28.076-12.66 45.753-40.737 45.03-71.521l-.721-32.337-17.408 7.85.555 24.89c.557 23.717-13.057 45.343-34.682 55.093-29.6 13.347-64.5399.124-77.8868-29.476l-16.0244 7.225c17.331 38.437 62.7012 55.607 101.1372 38.276z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"m289.641 221.854c-13.929 6.281-29.439 6.924-43.804 1.845l4.243-11.213-42.371 6.199 27.65 32.699 4.256-11.245c2.446.879 4.917 1.63 7.407 2.253 11.713 3.278 21.295 11.513 26.294 22.6 9.274 20.57.086 44.85-20.484 54.125-20.569 9.275-44.849.086-54.124-20.484l-16.025 7.226c13.259 29.405 47.969 42.541 77.375 29.282 29.405-13.259 42.541-47.969 29.282-77.374-2.407-5.339-5.561-10.213-9.321-14.511 5.738-1.125 11.386-2.915 16.848-5.377 38.436-17.331 55.606-62.701 38.275-101.137l-16.024 7.225c13.346 29.601.123 64.541-29.477 77.887z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"m517.32 233.008h-80.896l-20.992 52.992h-13.568l67.584-168.96h15.104l67.584 168.96h-13.568zm-4.608-11.776-29.44-73.728-6.144-17.92h-.256l-6.144 17.408-29.44 74.24zm108.05 67.328c-12.971 0-24.235-2.56-33.792-7.68s-16.128-12.544-19.712-22.272l10.496-6.912c2.56 8.533 7.765 14.933 15.616 19.2s17.493 6.4 28.928 6.4c11.605 0 20.651-2.219 27.136-6.656 6.656-4.437 9.984-10.325 9.984-17.664 0-6.315-2.816-11.349-8.448-15.104s-15.531-6.912-29.696-9.472c-17.92-3.243-30.549-7.595-37.888-13.056s-11.008-13.227-11.008-23.296c0-6.656 2.048-12.8 6.144-18.432s9.899-10.069 17.408-13.312 16.043-4.864 25.6-4.864c13.483 0 24.235 2.56 32.256 7.68 8.192 5.12 13.824 12.971 16.896 23.552l-11.008 6.4c-4.779-17.579-17.493-26.368-38.144-26.368-6.827 0-13.056 1.109-18.688 3.328-5.461 2.219-9.813 5.205-13.056 8.96-3.072 3.584-4.608 7.509-4.608 11.776 0 6.997 2.901 12.459 8.704 16.384s16.043 7.168 30.72 9.728c17.408 2.901 29.696 7.083 36.864 12.544s10.752 13.141 10.752 23.04c0 10.923-4.693 19.712-14.08 26.368-9.216 6.485-21.675 9.728-37.376 9.728zm122.732 20.992c-4.779 11.605-10.069 19.712-15.872 24.32-5.803 4.779-13.141 7.168-22.016 7.168-10.581 0-18.688-3.157-24.32-9.472l4.864-11.008c4.096 6.144 10.581 9.216 19.456 9.216 5.973 0 11.008-1.707 15.104-5.12 4.267-3.243 8.192-9.301 11.776-18.176l8.192-20.48-13.312-31.744-40.704-96.256h14.592l39.168 97.024 6.4 17.152 6.912-18.432 37.632-95.744h13.824zm149.444-154.112c14.677 0 26.453 4.096 35.328 12.288 9.045 8.192 13.568 19.968 13.568 35.328v82.944h-12.8v-78.848c0-13.653-3.328-23.808-9.984-30.464s-15.787-9.984-27.392-9.984c-8.192 0-15.787 1.877-22.784 5.632s-12.629 9.216-16.896 16.384c-4.096 7.168-6.144 15.531-6.144 25.088v72.192h-12.8v-128h11.52l.512 25.856c4.096-9.216 10.325-16.213 18.688-20.992 8.533-4.949 18.261-7.424 29.184-7.424zm203.692 2.56v181.76h-12.8v-80.896c-3.93 9.216-9.99 16.469-18.18 21.76s-17.83 7.936-28.93 7.936c-18.09 0-32.42-5.888-43.006-17.664-10.411-11.776-15.616-28.075-15.616-48.896s5.205-37.12 15.616-48.896c10.586-11.776 24.916-17.664 43.006-17.664 11.44 0 21.34 2.816 29.7 8.448 8.36 5.461 14.33 13.056 17.92 22.784l.77-28.672zm-58.37 119.296c13.31 0 23.98-4.437 32-13.312 8.19-9.045 12.71-21.248 13.57-36.608v-10.752c-.69-15.36-5.12-27.477-13.32-36.352-8.19-9.045-18.94-13.568-32.25-13.568-14.85 0-26.46 4.949-34.82 14.848-8.361 9.728-12.542 23.211-12.542 40.448s4.181 30.805 12.542 40.704c8.36 9.728 19.97 14.592 34.82 14.592zm259.93-122.368c14.5 0 26.11 4.096 34.81 12.288 8.71 8.192 13.06 19.712 13.06 34.56v83.712h-7.17v-82.944c0-13.141-3.75-23.296-11.26-30.464s-17.67-10.752-30.47-10.752c-9.21 0-17.66 2.219-25.34 6.656-7.51 4.267-13.48 10.155-17.92 17.664-4.27 7.339-6.4 15.36-6.4 24.064v76.288h-7.17v-82.944c0-13.141-3.75-23.296-11.26-30.464-7.51-7.339-17.67-11.008-30.47-11.008-9.04 0-17.4 2.219-25.08 6.656-7.51 4.267-13.49 10.155-17.92 17.664-4.44 7.339-6.66 15.531-6.66 24.576v75.52h-7.17v-128h6.66l.25 30.464c3.59-10.069 9.99-18.091 19.2-24.064 9.22-5.973 19.8-8.96 31.75-8.96 12.29 0 22.53 2.987 30.72 8.96 8.36 5.973 13.65 14.507 15.87 25.6 3.07-10.411 9.39-18.859 18.94-25.344 9.56-6.485 20.57-9.728 33.03-9.728zm142.29.512c18.61 0 33.2 5.888 43.78 17.664 10.75 11.776 16.13 28.075 16.13 48.896s-5.38 37.12-16.13 48.896c-10.58 11.776-25.17 17.664-43.78 17.664-18.77 0-33.53-5.888-44.28-17.664-10.76-11.947-16.13-28.245-16.13-48.896s5.37-36.864 16.13-48.64c10.75-11.947 25.51-17.92 44.28-17.92zm0 6.144c-16.55 0-29.61 5.376-39.16 16.128-9.39 10.752-14.08 25.515-14.08 44.288s4.69 33.536 14.08 44.288c9.55 10.752 22.61 16.128 39.16 16.128 16.39 0 29.27-5.376 38.66-16.128s14.08-25.515 14.08-44.288-4.69-33.536-14.08-44.288-22.27-16.128-38.66-16.128zm153.9-6.144c14.85 0 26.54 4.096 35.08 12.288 8.7 8.192 13.05 19.712 13.05 34.56v83.712h-7.17v-81.92c0-13.653-3.75-24.149-11.26-31.488s-17.75-11.008-30.72-11.008c-9.22 0-17.66 2.219-25.34 6.656-7.51 4.267-13.49 10.155-17.92 17.664-4.44 7.339-6.66 15.616-6.66 24.832v75.264h-7.17v-128h6.66v30.72c3.58-10.24 9.98-18.347 19.2-24.32 9.21-5.973 19.97-8.96 32.25-8.96z\"\n }))));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgLogoWhite);\nexport default __webpack_public_path__ + \"static/media/logo-white.3fa2ac55.svg\";\nexport { ForwardRef as ReactComponent };","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 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 TimelineIcon from \"@material-ui/icons/Timeline\";\nimport DoubleArrowIcon from \"@material-ui/icons/DoubleArrow\";\nimport CloseIcon from \"@material-ui/icons/Close\";\nimport { AppState } from \"./store\";\nimport { paths as getPaths } 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 MetricsView from \"./views/MetricsView\";\nimport PageNotFoundView from \"./views/PageNotFoundView\";\nimport { ReactComponent as Logo } from \"./images/logo-color.svg\";\nimport { ReactComponent as LogoDarkTheme } from \"./images/logo-white.svg\";\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 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 const paths = getPaths();\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 {isDarkTheme(theme) ? (\n <LogoDarkTheme width={200} height={48} />\n ) : (\n <Logo width={200} height={48} />\n )}\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 {window.PROMETHEUS_SERVER_ADDRESS && (\n <ListItemLink\n to={paths.QUEUE_METRICS}\n primary=\"Metrics\"\n icon={<TimelineIcon />}\n />\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 exact path={paths.QUEUE_METRICS}>\n <MetricsView />\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 {\n GET_METRICS_BEGIN,\n GET_METRICS_ERROR,\n GET_METRICS_SUCCESS,\n MetricsActionTypes,\n} from \"../actions/metricsActions\";\nimport { MetricsResponse } from \"../api\";\n\ninterface MetricsState {\n loading: boolean;\n error: string;\n data: MetricsResponse | null;\n}\n\nconst initialState: MetricsState = {\n loading: false,\n error: \"\",\n data: null,\n};\n\nexport default function metricsReducer(\n state = initialState,\n action: MetricsActionTypes\n): MetricsState {\n switch (action.type) {\n case GET_METRICS_BEGIN:\n return {\n ...state,\n loading: true,\n };\n\n case GET_METRICS_ERROR:\n return {\n ...state,\n loading: false,\n error: action.error,\n };\n\n case GET_METRICS_SUCCESS:\n return {\n loading: false,\n error: \"\",\n data: action.payload,\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 metricsReducer from \"./reducers/metricsReducer\";\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 metrics: metricsReducer,\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","// Prefix used for go template\nconst goTmplActionPrefix = \"/[[\";\n\n// paseses flags (string values) assigned under the window objects by server.\nexport default function parseFlagsUnderWindow() {\n // ROOT_PATH\n if (window.FLAG_ROOT_PATH === undefined) {\n console.log(\"ROOT_PATH is not defined. Falling back to emtpy string\");\n window.ROOT_PATH = \"\";\n } else {\n window.ROOT_PATH = window.FLAG_ROOT_PATH;\n }\n\n // PROMETHEUS_SERVER_ADDRESS\n if (window.FLAG_PROMETHEUS_SERVER_ADDRESS === undefined) {\n console.log(\n \"PROMETHEUS_SERVER_ADDRESS is not defined. Falling back to emtpy string\"\n );\n window.PROMETHEUS_SERVER_ADDRESS = \"\";\n } else if (\n window.FLAG_PROMETHEUS_SERVER_ADDRESS.startsWith(goTmplActionPrefix)\n ) {\n console.log(\n \"PROMETHEUS_SERVER_ADDRESS was not evaluated by the server. Falling back to empty string\"\n );\n window.PROMETHEUS_SERVER_ADDRESS = \"\";\n } else {\n }\n\n // READ_ONLY\n if (window.FLAG_READ_ONLY === undefined) {\n console.log(\"READ_ONLY is not defined. Falling back to false\");\n window.READ_ONLY = false;\n } else if (window.FLAG_READ_ONLY.startsWith(goTmplActionPrefix)) {\n console.log(\n \"READ_ONLY was not evaluated by the server. Falling back to false\"\n );\n window.READ_ONLY = false;\n } else {\n window.READ_ONLY = window.FLAG_READ_ONLY === \"true\";\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 parseFlagsUnderWindow from \"./parseFlags\";\nimport * as serviceWorker from \"./serviceWorker\";\nimport { saveState } from \"./localStorage\";\nimport { SettingsState } from \"./reducers/settingsReducer\";\n\nparseFlagsUnderWindow();\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":""}