mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-01-19 11:15:53 +08:00
1 line
662 KiB
Plaintext
1 line
662 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/TasksTable.tsx","components/ActiveTasksTable.tsx","components/PendingTasksTable.tsx","components/ScheduledTasksTable.tsx","components/RetryTasksTable.tsx","components/ArchivedTasksTable.tsx","components/CompletedTasksTable.tsx","actions/groupsActions.ts","components/AggregatingTasksTable.tsx","components/GroupSelect.tsx","components/AggregatingTasksTableContainer.tsx","components/TasksTableContainer.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/groupsReducer.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","aria-label","direction","Math","ceil","max","rowsPerPageOptions","getBaseUrl","listQueues","a","axios","method","url","resp","data","deleteQueue","pauseQueue","resumeQueue","listQueueStats","listGroups","getTaskInfo","id","listActiveTasks","pageOpts","queryString","stringify","cancelActiveTask","cancelAllActiveTasks","batchCancelActiveTasks","taskIds","task_ids","listPendingTasks","listScheduledTasks","listRetryTasks","listArchivedTasks","listCompletedTasks","listAggregatingTasks","gname","archivePendingTask","batchArchivePendingTasks","archiveAllPendingTasks","deletePendingTask","batchDeletePendingTasks","deleteAllPendingTasks","deleteAggregatingTask","batchDeleteAggregatingTasks","deleteAllAggregatingTasks","runAggregatingTask","batchRunAggregatingTasks","runAllAggregatingTasks","archiveAggregatingTask","batchArchiveAggregatingTasks","archiveAllAggregatingTasks","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","aria-labelledby","aria-describedby","size","DialogTitle","DialogContent","DialogContentText","DialogActions","Button","color","autoFocus","SortBy","table","minWidth","fixedCell","position","zIndex","left","background","paper","colConfigs","label","key","sortBy","Queue","align","State","Size","MemoryUsage","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","aria-controls","aria-expanded","aria-haspopup","prevOpen","Popper","anchorEl","role","transition","disablePortal","TransitionProps","placement","Grow","transformOrigin","Paper","ClickAwayListener","onClickAway","MenuList","MenuItem","selected","onSelect","usePolling","doFn","interval","useEffect","setInterval","clearInterval","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","ReactSyntaxHighlighter","registerLanguage","json","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","LIST_AGGREGATING_TASKS_BEGIN","LIST_AGGREGATING_TASKS_SUCCESS","LIST_AGGREGATING_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","RUN_AGGREGATING_TASK_BEGIN","RUN_AGGREGATING_TASK_SUCCESS","RUN_AGGREGATING_TASK_ERROR","DELETE_AGGREGATING_TASK_BEGIN","DELETE_AGGREGATING_TASK_SUCCESS","DELETE_AGGREGATING_TASK_ERROR","ARCHIVE_AGGREGATING_TASK_BEGIN","ARCHIVE_AGGREGATING_TASK_SUCCESS","ARCHIVE_AGGREGATING_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","BATCH_RUN_AGGREGATING_TASKS_BEGIN","BATCH_RUN_AGGREGATING_TASKS_SUCCESS","BATCH_RUN_AGGREGATING_TASKS_ERROR","BATCH_ARCHIVE_AGGREGATING_TASKS_BEGIN","BATCH_ARCHIVE_AGGREGATING_TASKS_SUCCESS","BATCH_ARCHIVE_AGGREGATING_TASKS_ERROR","BATCH_DELETE_AGGREGATING_TASKS_BEGIN","BATCH_DELETE_AGGREGATING_TASKS_SUCCESS","BATCH_DELETE_AGGREGATING_TASKS_ERROR","RUN_ALL_AGGREGATING_TASKS_BEGIN","RUN_ALL_AGGREGATING_TASKS_SUCCESS","RUN_ALL_AGGREGATING_TASKS_ERROR","ARCHIVE_ALL_AGGREGATING_TASKS_BEGIN","ARCHIVE_ALL_AGGREGATING_TASKS_SUCCESS","ARCHIVE_ALL_AGGREGATING_TASKS_ERROR","DELETE_ALL_AGGREGATING_TASKS_BEGIN","DELETE_ALL_AGGREGATING_TASKS_SUCCESS","DELETE_ALL_AGGREGATING_TASKS_ERROR","actionsContainer","moreIcon","marginRight","iconGroup","borderLeft","TableActions","menuAnchor","setMenuAnchor","closeMenu","currentTarget","keepMounted","Boolean","menuItemActions","showIconButtons","iconButtonActions","alert","borderTopLeftRadius","pagination","TasksTable","listTasks","pageSize","setPage","selectedIds","setSelectedIds","activeTaskId","setActiveTaskId","createAllActionHandler","createBatchActionHandler","then","createSingleActionHandler","allActions","deleteAllTasks","allActionPending","archiveAllTasks","runAllTasks","cancelAllTasks","batchActions","batchDeleteTasks","batchActionPending","batchArchiveTasks","batchRunTasks","batchCancelTasks","useCallback","tasks","taskState","rowCount","numSelected","Checkbox","indeterminate","checked","onChange","newSelected","t","inputProps","columns","col","task","renderRow","isSelected","onSelectChange","concat","onRunClick","runTask","deleteTask","onArchiveClick","archiveTask","onCancelClick","cancelTask","onActionCellEnter","onActionCellLeave","showActions","TableFooter","TablePagination","colSpan","totalTaskCount","SelectProps","native","newPage","onRowsPerPageChange","parseInt","ActionsComponent","boxShadow","shadows","borderBottomColor","actionCell","actionButton","idCell","copyButton","IdGroup","stopPropagation","navigator","clipboard","writeText","margin","canceling","is_orphaned","start_time","deadline","activeTasks","rowProps","deleted","pendingTasks","retried","max_retry","scheduledTasks","next_process_at","retryTasks","error_message","archivedTasks","last_failed_at","completedTasks","completed_at","result","ttl_seconds","LIST_GROUPS_BEGIN","LIST_GROUPS_SUCCESS","LIST_GROUPS_ERROR","listAggregatingTasksAsync","group","deleteAllAggregatingTasksAsync","archiveAllAggregatingTasksAsync","archived","runAllAggregatingTasksAsync","scheduled","batchDeleteAggregatingTasksAsync","batchRunAggregatingTasksAsync","batchArchiveAggregatingTasksAsync","deleteAggregatingTaskAsync","runAggregatingTaskAsync","archiveAggregatingTaskAsync","groups","groupsError","aggregatingTasks","pgn","selectedGroup","groupSelectOption","groupSize","textAlign","inputRoot","GroupSelect","inputValue","setInputValue","Autocomplete","newValue","onInputChange","newInputValue","disableListWrap","ListboxComponent","getOptionLabel","option","renderOption","renderInput","TextField","index","cloneElement","top","OuterElementContext","createContext","OuterElementType","outerProps","useContext","other","itemData","Children","toArray","smUp","useMediaQuery","breakpoints","up","noSsr","itemCount","itemSize","getChildSize","child","isValidElement","ListSubheader","gridRef","resetAfterIndex","useResetCache","Provider","reduce","outerElementType","innerElementType","overscanCount","groupSelector","paddingRight","listGroupsAsync","setSelectedGroup","TabPanel","hidden","flex","overflowY","queueInfo","pending","aggregating","retry","completed","header","chip","taskcount","searchbar","searchIcon","pointerEvents","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","RedisMetricCards","redisInfo","MetricCard","content","redis_version","uptime_in_days","used_memory_human","used_memory_peak_human","mem_fragmentation_ratio","connected_clients","connected_slaves","rdb_last_save_time","rdb_changes_since_last_save","Card","CardContent","redis","redisAddress","address","redisInfoRaw","rawData","redisClusterEnabled","cluster","redisClusterNodesRaw","rawClusterNodes","getRedisInfoAsync","href","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","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","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","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","createTheme","toolbar","toolbarIcon","mixins","drawer","menuButton","menuButtonHidden","drawerPaper","whiteSpace","transitions","create","easing","sharp","enteringScreen","drawerPaperClose","overflowX","leavingScreen","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","groupsReducer","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","serviceWorker","ready","registration","unregister","catch"],"mappings":"odAAaA,EAAQ,iBAAO,CAC1BC,KAAK,GAAD,OAAKC,OAAOC,UAAZ,KACJC,SAAS,GAAD,OAAKF,OAAOC,UAAZ,aACRE,QAAQ,GAAD,OAAKH,OAAOC,UAAZ,YACPG,WAAW,GAAD,OAAKJ,OAAOC,UAAZ,eACVI,cAAc,GAAD,OAAKL,OAAOC,UAAZ,kBACbK,MAAM,GAAD,OAAKN,OAAOC,UAAZ,UACLM,aAAa,GAAD,OAAKP,OAAOC,UAAZ,gCACZO,cAAc,GAAD,OAAKR,OAAOC,UAAZ,gBAOR,SAASQ,EAAiBC,EAAeC,GAC9C,IAAMC,EAAOd,IAAQO,cAAcQ,QAAQ,SAAUH,GACrD,OAAIC,EACI,GAAN,OAAUC,EAAV,mBAAyBD,GAEpBC,EAGF,SAASE,EAAgBJ,EAAeK,GAC7C,OAAOjB,IACJS,aAAaM,QAAQ,SAAUH,GAC/BG,QAAQ,UAAWE,G,aCvBXC,EAAuB,uBACvBC,EAA0B,0BAC1BC,EAAgB,gBAChBC,EAA4B,4BAC5BC,EAAyB,yBAoD/B,SAASC,GAAsBC,GACpC,MAAO,CACLC,KAAMJ,EACNG,S,mHCjDEE,GAAYC,aAAW,SAACC,GAAD,OAC3BC,aAAa,CACXC,KAAM,CACJC,WAAY,EACZC,WAAYJ,EAAMK,QAAQ,WAsFjBC,OAvEf,SAAgCC,GAC9B,IAAMC,EAAUV,KACVE,EAAQS,eACNC,EAA2CH,EAA3CG,MAAOC,EAAoCJ,EAApCI,KAAMC,EAA8BL,EAA9BK,YAAaC,EAAiBN,EAAjBM,aA0BlC,OACE,uBAAKC,UAAWN,EAAQN,KAAxB,UACE,eAACa,EAAA,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TtmC,QAAQ8lC,IACN,0EAEFjwC,OAAO+tC,0BAA4B,IAEnC/tC,OAAOywC,+BAA+BC,WAnBf,QAqBvBvmC,QAAQ8lC,IACN,2FAEFjwC,OAAO+tC,0BAA4B,IAEjC/tC,OAAO+tC,0BAA4B/tC,OAAOywC,oCAIhBzhC,IAA1BhP,OAAO2wC,gBACTxmC,QAAQ8lC,IAAI,mDACZjwC,OAAOwS,WAAY,GACVxS,OAAO2wC,eAAeD,WAjCR,QAkCvBvmC,QAAQ8lC,IACN,oEAEFjwC,OAAOwS,WAAY,GAEnBxS,OAAOwS,UAAsC,SAA1BxS,OAAO2wC,eC3B9B,IAAIC,QAA6C5hC,EACjDmhC,GAAMU,WAAU,WACOD,MACrBA,GAAkBT,GAAMW,WAAWv0B,WJQ9B,SAAmB7N,GACxB,IACE,IAAMihC,EAAkB1kC,KAAK5G,UAAU,CAAEkY,SAAU7N,EAAM6N,WACzDqzB,aAAamB,QAAQ7B,GAAmBS,GACxC,MAAOK,GACP7lC,QAAQzB,MAAM,oCAAqCsnC,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,kBAAmB3e,WACrBA,UAAU4e,cAAcC,MACrB3iB,MAAK,SAAA4iB,GACJA,EAAaC,gBAEdC,OAAM,SAAAjpC,GACLyB,QAAQzB,MAAMA,EAAMmlC,c","file":"static/js/main.5adda2da.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 ListAggregatingTasksResponse {\n tasks: TaskInfo[];\n stats: Queue;\n groups: GroupInfo[];\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 ArchiveAllTasksResponse {\n archived: number;\n}\n\nexport interface RunAllTasksResponse {\n scheduled: number;\n}\n\nexport interface ListQueueStatsResponse {\n stats: { [qname: string]: DailyStat[] };\n}\n\nexport interface ListGroupsResponse {\n stats: Queue;\n groups: GroupInfo[];\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 GroupInfo {\n group: string;\n size: number;\n}\n\nexport interface Queue {\n queue: string;\n paused: boolean;\n size: number;\n groups: number;\n latency_msec: number;\n display_latency: string;\n memory_usage_bytes: number;\n active: number;\n pending: number;\n aggregating: 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 group: 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 listGroups(qname: string): Promise<ListGroupsResponse> {\n const resp = await axios({\n method: \"get\",\n url: `${getBaseUrl()}/queues/${qname}/groups`,\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 listAggregatingTasks(\n qname: string,\n gname: string,\n pageOpts?: PaginationOptions\n): Promise<ListAggregatingTasksResponse> {\n let url = `${getBaseUrl()}/queues/${qname}/groups/${gname}/aggregating_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 deleteAggregatingTask(\n qname: string,\n gname: string,\n taskId: string\n): Promise<void> {\n await axios({\n method: \"delete\",\n url: `${getBaseUrl()}/queues/${qname}/groups/${gname}/aggregating_tasks/${taskId}`,\n });\n}\n\nexport async function batchDeleteAggregatingTasks(\n qname: string,\n gname: string,\n taskIds: string[]\n): Promise<BatchDeleteTasksResponse> {\n const resp = await axios({\n method: \"post\",\n url: `${getBaseUrl()}/queues/${qname}/groups/${gname}/aggregating_tasks:batch_delete`,\n data: {\n task_ids: taskIds,\n },\n });\n return resp.data;\n}\n\nexport async function deleteAllAggregatingTasks(\n qname: string,\n gname: string\n): Promise<DeleteAllTasksResponse> {\n const resp = await axios({\n method: \"delete\",\n url: `${getBaseUrl()}/queues/${qname}/groups/${gname}/aggregating_tasks:delete_all`,\n });\n return resp.data;\n}\n\nexport async function runAggregatingTask(\n qname: string,\n gname: string,\n taskId: string\n): Promise<void> {\n await axios({\n method: \"post\",\n url: `${getBaseUrl()}/queues/${qname}/groups/${gname}/aggregating_tasks/${taskId}:run`,\n });\n}\n\nexport async function batchRunAggregatingTasks(\n qname: string,\n gname: string,\n taskIds: string[]\n): Promise<BatchRunTasksResponse> {\n const resp = await axios({\n method: \"post\",\n url: `${getBaseUrl()}/queues/${qname}/groups/${gname}/aggregating_tasks:batch_run`,\n data: {\n task_ids: taskIds,\n },\n });\n return resp.data;\n}\n\nexport async function runAllAggregatingTasks(\n qname: string,\n gname: string\n): Promise<RunAllTasksResponse> {\n const resp = await axios({\n method: \"post\",\n url: `${getBaseUrl()}/queues/${qname}/groups/${gname}/aggregating_tasks:run_all`,\n });\n return resp.data;\n}\n\nexport async function archiveAggregatingTask(\n qname: string,\n gname: string,\n taskId: string\n): Promise<void> {\n await axios({\n method: \"post\",\n url: `${getBaseUrl()}/queues/${qname}/groups/${gname}/aggregating_tasks/${taskId}:archive`,\n });\n}\n\nexport async function batchArchiveAggregatingTasks(\n qname: string,\n gname: string,\n taskIds: string[]\n): Promise<BatchArchiveTasksResponse> {\n const resp = await axios({\n method: \"post\",\n url: `${getBaseUrl()}/queues/${qname}/groups/${gname}/aggregating_tasks:batch_archive`,\n data: {\n task_ids: taskIds,\n },\n });\n return resp.data;\n}\n\nexport async function archiveAllAggregatingTasks(\n qname: string,\n gname: string\n): Promise<ArchiveAllTasksResponse> {\n const resp = await axios({\n method: \"post\",\n url: `${getBaseUrl()}/queues/${qname}/groups/${gname}/aggregating_tasks:archive_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 aggregating: number; // number of aggregating 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=\"aggregating\" stackId=\"a\" fill=\"#e69138\" />\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 { Light as ReactSyntaxHighlighter } from \"react-syntax-highlighter\";\nimport json from \"react-syntax-highlighter/dist/esm/languages/hljs/json\";\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\nReactSyntaxHighlighter.registerLanguage(\"json\", json);\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 listAggregatingTasks,\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 deleteAllAggregatingTasks,\n archiveAllAggregatingTasks,\n runAllAggregatingTasks,\n batchDeleteAggregatingTasks,\n batchArchiveAggregatingTasks,\n batchRunAggregatingTasks,\n deleteAggregatingTask,\n runAggregatingTask,\n archiveAggregatingTask,\n ListAggregatingTasksResponse,\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 LIST_AGGREGATING_TASKS_BEGIN = \"LIST_AGGREGATING_TASKS_BEGIN\";\nexport const LIST_AGGREGATING_TASKS_SUCCESS = \"LIST_AGGREGATING_TASKS_SUCCESS\";\nexport const LIST_AGGREGATING_TASKS_ERROR = \"LIST_AGGREGATING_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 RUN_AGGREGATING_TASK_BEGIN = \"RUN_AGGREGATING_TASK_BEGIN\";\nexport const RUN_AGGREGATING_TASK_SUCCESS = \"RUN_AGGREGATING_TASK_SUCCESS\";\nexport const RUN_AGGREGATING_TASK_ERROR = \"RUN_AGGREGATING_TASK_ERROR\";\nexport const DELETE_AGGREGATING_TASK_BEGIN = \"DELETE_AGGREGATING_TASK_BEGIN\";\nexport const DELETE_AGGREGATING_TASK_SUCCESS =\n \"DELETE_AGGREGATING_TASK_SUCCESS\";\nexport const DELETE_AGGREGATING_TASK_ERROR = \"DELETE_AGGREGATING_TASK_ERROR\";\nexport const ARCHIVE_AGGREGATING_TASK_BEGIN = \"ARCHIVE_AGGREGATING_TASK_BEGIN\";\nexport const ARCHIVE_AGGREGATING_TASK_SUCCESS =\n \"ARCHIVE_AGGREGATING_TASK_SUCCESS\";\nexport const ARCHIVE_AGGREGATING_TASK_ERROR = \"ARCHIVE_AGGREGATING_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\";\nexport const BATCH_RUN_AGGREGATING_TASKS_BEGIN =\n \"BATCH_RUN_AGGREGATING_TASKS_BEGIN\";\nexport const BATCH_RUN_AGGREGATING_TASKS_SUCCESS =\n \"BATCH_RUN_AGGREGATING_TASKS_SUCCESS\";\nexport const BATCH_RUN_AGGREGATING_TASKS_ERROR =\n \"BATCH_RUN_AGGREGATING_TASKS_ERROR\";\nexport const BATCH_ARCHIVE_AGGREGATING_TASKS_BEGIN =\n \"BATCH_ARCHIVE_AGGREGATING_TASKS_BEGIN\";\nexport const BATCH_ARCHIVE_AGGREGATING_TASKS_SUCCESS =\n \"BATCH_ARCHIVE_AGGREGATING_TASKS_SUCCESS\";\nexport const BATCH_ARCHIVE_AGGREGATING_TASKS_ERROR =\n \"BATCH_RUN_AGGREGATING_TASKS_ERROR\";\nexport const BATCH_DELETE_AGGREGATING_TASKS_BEGIN =\n \"BATCH_DELETE_AGGREGATING_TASKS_BEGIN\";\nexport const BATCH_DELETE_AGGREGATING_TASKS_SUCCESS =\n \"BATCH_DELETE_AGGREGATING_TASKS_SUCCESS\";\nexport const BATCH_DELETE_AGGREGATING_TASKS_ERROR =\n \"BATCH_DELETE_AGGREGATING_TASKS_ERROR\";\nexport const RUN_ALL_AGGREGATING_TASKS_BEGIN =\n \"RUN_ALL_AGGREGATING_TASKS_BEGIN\";\nexport const RUN_ALL_AGGREGATING_TASKS_SUCCESS =\n \"RUN_ALL_AGGREGATING_TASKS_SUCCESS\";\nexport const RUN_ALL_AGGREGATING_TASKS_ERROR =\n \"RUN_ALL_AGGREGATING_TASKS_ERROR\";\nexport const ARCHIVE_ALL_AGGREGATING_TASKS_BEGIN =\n \"ARCHIVE_ALL_AGGREGATING_TASKS_BEGIN\";\nexport const ARCHIVE_ALL_AGGREGATING_TASKS_SUCCESS =\n \"ARCHIVE_ALL_AGGREGATING_TASKS_SUCCESS\";\nexport const ARCHIVE_ALL_AGGREGATING_TASKS_ERROR =\n \"ARCHIVE_ALL_AGGREGATING_TASKS_ERROR\";\nexport const DELETE_ALL_AGGREGATING_TASKS_BEGIN =\n \"DELETE_ALL_AGGREGATING_TASKS_BEGIN\";\nexport const DELETE_ALL_AGGREGATING_TASKS_SUCCESS =\n \"DELETE_ALL_AGGREGATING_TASKS_SUCCESS\";\nexport const DELETE_ALL_AGGREGATING_TASKS_ERROR =\n \"DELETE_ALL_AGGREGATING_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 ListAggregatingTasksBeginAction {\n type: typeof LIST_AGGREGATING_TASKS_BEGIN;\n queue: string;\n group: string;\n}\n\ninterface ListAggregatingTasksSuccessAction {\n type: typeof LIST_AGGREGATING_TASKS_SUCCESS;\n queue: string;\n group: string;\n payload: ListAggregatingTasksResponse;\n}\n\ninterface ListAggregatingTasksErrorAction {\n type: typeof LIST_AGGREGATING_TASKS_ERROR;\n queue: string;\n group: 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\ninterface DeleteAggregatingTaskBeginAction {\n type: typeof DELETE_AGGREGATING_TASK_BEGIN;\n queue: string;\n taskId: string;\n}\n\ninterface DeleteAggregatingTaskSuccessAction {\n type: typeof DELETE_AGGREGATING_TASK_SUCCESS;\n queue: string;\n taskId: string;\n}\n\ninterface DeleteAggregatingTaskErrorAction {\n type: typeof DELETE_AGGREGATING_TASK_ERROR;\n queue: string;\n taskId: string;\n error: string;\n}\n\ninterface RunAggregatingTaskBeginAction {\n type: typeof RUN_AGGREGATING_TASK_BEGIN;\n queue: string;\n taskId: string;\n}\n\ninterface RunAggregatingTaskSuccessAction {\n type: typeof RUN_AGGREGATING_TASK_SUCCESS;\n queue: string;\n taskId: string;\n}\n\ninterface RunAggregatingTaskErrorAction {\n type: typeof RUN_AGGREGATING_TASK_ERROR;\n queue: string;\n taskId: string;\n error: string;\n}\n\ninterface ArchiveAggregatingTaskBeginAction {\n type: typeof ARCHIVE_AGGREGATING_TASK_BEGIN;\n queue: string;\n taskId: string;\n}\n\ninterface ArchiveAggregatingTaskSuccessAction {\n type: typeof ARCHIVE_AGGREGATING_TASK_SUCCESS;\n queue: string;\n taskId: string;\n}\n\ninterface ArchiveAggregatingTaskErrorAction {\n type: typeof ARCHIVE_AGGREGATING_TASK_ERROR;\n queue: string;\n taskId: string;\n error: string;\n}\n\ninterface BatchDeleteAggregatingTasksBeginAction {\n type: typeof BATCH_DELETE_AGGREGATING_TASKS_BEGIN;\n queue: string;\n group: string;\n taskIds: string[];\n}\n\ninterface BatchDeleteAggregatingTasksSuccessAction {\n type: typeof BATCH_DELETE_AGGREGATING_TASKS_SUCCESS;\n queue: string;\n group: string;\n payload: BatchDeleteTasksResponse;\n}\n\ninterface BatchDeleteAggregatingTasksErrorAction {\n type: typeof BATCH_DELETE_AGGREGATING_TASKS_ERROR;\n queue: string;\n group: string;\n taskIds: string[];\n error: string;\n}\n\ninterface BatchRunAggregatingTasksBeginAction {\n type: typeof BATCH_RUN_AGGREGATING_TASKS_BEGIN;\n queue: string;\n group: string;\n taskIds: string[];\n}\n\ninterface BatchRunAggregatingTasksSuccessAction {\n type: typeof BATCH_RUN_AGGREGATING_TASKS_SUCCESS;\n queue: string;\n group: string;\n payload: BatchRunTasksResponse;\n}\n\ninterface BatchRunAggregatingTasksErrorAction {\n type: typeof BATCH_RUN_AGGREGATING_TASKS_ERROR;\n queue: string;\n group: string;\n taskIds: string[];\n error: string;\n}\n\ninterface RunAllAggregatingTasksBeginAction {\n type: typeof RUN_ALL_AGGREGATING_TASKS_BEGIN;\n queue: string;\n group: string;\n}\n\ninterface RunAllAggregatingTasksSuccessAction {\n type: typeof RUN_ALL_AGGREGATING_TASKS_SUCCESS;\n scheduled: number;\n queue: string;\n group: string;\n}\n\ninterface RunAllAggregatingTasksErrorAction {\n type: typeof RUN_ALL_AGGREGATING_TASKS_ERROR;\n queue: string;\n group: string;\n error: string;\n}\n\ninterface BatchArchiveAggregatingTasksBeginAction {\n type: typeof BATCH_ARCHIVE_AGGREGATING_TASKS_BEGIN;\n queue: string;\n group: string;\n taskIds: string[];\n}\n\ninterface BatchArchiveAggregatingTasksSuccessAction {\n type: typeof BATCH_ARCHIVE_AGGREGATING_TASKS_SUCCESS;\n queue: string;\n group: string;\n payload: BatchArchiveTasksResponse;\n}\n\ninterface BatchArchiveAggregatingTasksErrorAction {\n type: typeof BATCH_ARCHIVE_AGGREGATING_TASKS_ERROR;\n queue: string;\n group: string;\n taskIds: string[];\n error: string;\n}\n\ninterface ArchiveAllAggregatingTasksBeginAction {\n type: typeof ARCHIVE_ALL_AGGREGATING_TASKS_BEGIN;\n queue: string;\n group: string;\n}\n\ninterface ArchiveAllAggregatingTasksSuccessAction {\n type: typeof ARCHIVE_ALL_AGGREGATING_TASKS_SUCCESS;\n queue: string;\n group: string;\n archived: number;\n}\n\ninterface ArchiveAllAggregatingTasksErrorAction {\n type: typeof ARCHIVE_ALL_AGGREGATING_TASKS_ERROR;\n queue: string;\n group: string;\n error: string;\n}\n\ninterface DeleteAllAggregatingTasksBeginAction {\n type: typeof DELETE_ALL_AGGREGATING_TASKS_BEGIN;\n queue: string;\n group: string;\n}\n\ninterface DeleteAllAggregatingTasksSuccessAction {\n type: typeof DELETE_ALL_AGGREGATING_TASKS_SUCCESS;\n queue: string;\n group: string;\n deleted: number;\n}\n\ninterface DeleteAllAggregatingTasksErrorAction {\n type: typeof DELETE_ALL_AGGREGATING_TASKS_ERROR;\n queue: string;\n group: 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 | ListAggregatingTasksBeginAction\n | ListAggregatingTasksSuccessAction\n | ListAggregatingTasksErrorAction\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 | BatchDeleteAggregatingTasksBeginAction\n | BatchDeleteAggregatingTasksSuccessAction\n | BatchDeleteAggregatingTasksErrorAction\n | BatchRunAggregatingTasksBeginAction\n | BatchRunAggregatingTasksSuccessAction\n | BatchRunAggregatingTasksErrorAction\n | RunAllAggregatingTasksBeginAction\n | RunAllAggregatingTasksSuccessAction\n | RunAllAggregatingTasksErrorAction\n | BatchArchiveAggregatingTasksBeginAction\n | BatchArchiveAggregatingTasksSuccessAction\n | BatchArchiveAggregatingTasksErrorAction\n | ArchiveAllAggregatingTasksBeginAction\n | ArchiveAllAggregatingTasksSuccessAction\n | ArchiveAllAggregatingTasksErrorAction\n | DeleteAllAggregatingTasksBeginAction\n | DeleteAllAggregatingTasksSuccessAction\n | DeleteAllAggregatingTasksErrorAction\n | DeleteAggregatingTaskBeginAction\n | DeleteAggregatingTaskSuccessAction\n | DeleteAggregatingTaskErrorAction\n | RunAggregatingTaskBeginAction\n | RunAggregatingTaskSuccessAction\n | RunAggregatingTaskErrorAction\n | ArchiveAggregatingTaskBeginAction\n | ArchiveAggregatingTaskSuccessAction\n | ArchiveAggregatingTaskErrorAction;\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 listAggregatingTasksAsync(\n qname: string,\n gname: string,\n pageOpts?: PaginationOptions\n) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n try {\n dispatch({\n type: LIST_AGGREGATING_TASKS_BEGIN,\n queue: qname,\n group: gname,\n });\n const response = await listAggregatingTasks(qname, gname, pageOpts);\n dispatch({\n type: LIST_AGGREGATING_TASKS_SUCCESS,\n queue: qname,\n group: gname,\n payload: response,\n });\n } catch (error) {\n console.error(\n \"listAggregatingTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: LIST_AGGREGATING_TASKS_ERROR,\n queue: qname,\n group: gname,\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 deleteAggregatingTaskAsync(\n queue: string,\n group: string,\n taskId: string\n) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: DELETE_AGGREGATING_TASK_BEGIN, queue, taskId });\n try {\n await deleteAggregatingTask(queue, group, taskId);\n dispatch({ type: DELETE_AGGREGATING_TASK_SUCCESS, queue, taskId });\n } catch (error) {\n console.error(\n \"deleteAggregatingTaskAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: DELETE_AGGREGATING_TASK_ERROR,\n error: toErrorString(error),\n queue,\n taskId,\n });\n }\n };\n}\n\nexport function runAggregatingTaskAsync(\n queue: string,\n group: string,\n taskId: string\n) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: RUN_AGGREGATING_TASK_BEGIN, queue, taskId });\n try {\n await runAggregatingTask(queue, group, taskId);\n dispatch({ type: RUN_AGGREGATING_TASK_SUCCESS, queue, taskId });\n } catch (error) {\n console.error(\n \"runAggregatingTaskAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: RUN_AGGREGATING_TASK_ERROR,\n error: toErrorString(error),\n queue,\n taskId,\n });\n }\n };\n}\n\nexport function archiveAggregatingTaskAsync(\n queue: string,\n group: string,\n taskId: string\n) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: ARCHIVE_AGGREGATING_TASK_BEGIN, queue, taskId });\n try {\n await archiveAggregatingTask(queue, group, taskId);\n dispatch({ type: ARCHIVE_AGGREGATING_TASK_SUCCESS, queue, taskId });\n } catch (error) {\n console.error(\n \"archiveAggregatingTaskAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: ARCHIVE_AGGREGATING_TASK_ERROR,\n error: toErrorString(error),\n queue,\n taskId,\n });\n }\n };\n}\n\nexport function batchArchiveAggregatingTasksAsync(\n queue: string,\n group: string,\n taskIds: string[]\n) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({\n type: BATCH_ARCHIVE_AGGREGATING_TASKS_BEGIN,\n queue,\n group,\n taskIds,\n });\n try {\n const response = await batchArchiveAggregatingTasks(\n queue,\n group,\n taskIds\n );\n dispatch({\n type: BATCH_ARCHIVE_AGGREGATING_TASKS_SUCCESS,\n payload: response,\n queue,\n group,\n });\n } catch (error) {\n console.error(\n \"batchArchiveAggregatingTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: BATCH_ARCHIVE_AGGREGATING_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n group,\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 deleteAllAggregatingTasksAsync(queue: string, group: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: DELETE_ALL_AGGREGATING_TASKS_BEGIN, queue, group });\n try {\n const response = await deleteAllAggregatingTasks(queue, group);\n dispatch({\n type: DELETE_ALL_AGGREGATING_TASKS_SUCCESS,\n deleted: response.deleted,\n queue,\n group,\n });\n } catch (error) {\n console.error(\n \"deleteAllAggregatingTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: DELETE_ALL_AGGREGATING_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n group,\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 archiveAllAggregatingTasksAsync(queue: string, group: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: ARCHIVE_ALL_AGGREGATING_TASKS_BEGIN, queue, group });\n try {\n const response = await archiveAllAggregatingTasks(queue, group);\n dispatch({\n type: ARCHIVE_ALL_AGGREGATING_TASKS_SUCCESS,\n archived: response.archived,\n queue,\n group,\n });\n } catch (error) {\n console.error(\n \"archiveAllAggregatingTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: ARCHIVE_ALL_AGGREGATING_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n group,\n });\n }\n };\n}\n\nexport function runAllAggregatingTasksAsync(queue: string, group: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: RUN_ALL_AGGREGATING_TASKS_BEGIN, queue, group });\n try {\n const resp = await runAllAggregatingTasks(queue, group);\n dispatch({\n type: RUN_ALL_AGGREGATING_TASKS_SUCCESS,\n scheduled: resp.scheduled,\n queue,\n group,\n });\n } catch (error) {\n console.error(\n \"runAllAggregatingTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: RUN_ALL_AGGREGATING_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n group,\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 batchRunAggregatingTasksAsync(\n queue: string,\n group: string,\n taskIds: string[]\n) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({\n type: BATCH_RUN_AGGREGATING_TASKS_BEGIN,\n queue,\n group,\n taskIds,\n });\n try {\n const response = await batchRunAggregatingTasks(queue, group, taskIds);\n dispatch({\n type: BATCH_RUN_AGGREGATING_TASKS_SUCCESS,\n payload: response,\n queue,\n group,\n });\n } catch (error) {\n console.error(\n \"batchRunAggregatingTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: BATCH_RUN_AGGREGATING_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n group,\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 batchDeleteAggregatingTasksAsync(\n queue: string,\n group: string,\n taskIds: string[]\n) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({\n type: BATCH_DELETE_AGGREGATING_TASKS_BEGIN,\n queue,\n group,\n taskIds,\n });\n try {\n const response = await batchDeleteAggregatingTasks(queue, group, taskIds);\n dispatch({\n type: BATCH_DELETE_AGGREGATING_TASKS_SUCCESS,\n payload: response,\n queue,\n group,\n });\n } catch (error) {\n console.error(\n \"batchDeleteAggregatingTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: BATCH_DELETE_AGGREGATING_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n group,\n taskIds,\n });\n }\n };\n}\n\nexport function deleteAllCompletedTasksAsync(queue: string) {\n return async (dispatch: Dispatch<TasksActionTypes>) => {\n dispatch({ type: DELETE_ALL_COMPLETED_TASKS_BEGIN, queue });\n try {\n const response = await deleteAllCompletedTasks(queue);\n dispatch({\n type: DELETE_ALL_COMPLETED_TASKS_SUCCESS,\n deleted: response.deleted,\n queue,\n });\n } catch (error) {\n console.error(\n \"deleteAllCompletedTasksAsync: \",\n toErrorStringWithHttpStatus(error)\n );\n dispatch({\n type: DELETE_ALL_COMPLETED_TASKS_ERROR,\n error: toErrorString(error),\n queue,\n });\n }\n };\n}\n","import React, { useState } from \"react\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Menu from \"@material-ui/core/Menu\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\nimport MoreHorizIcon from \"@material-ui/icons/MoreHoriz\";\n\nconst useStyles = makeStyles((theme) => ({\n actionsContainer: {\n display: \"flex\",\n padding: \"4px\",\n },\n moreIcon: {\n marginRight: \"8px\",\n },\n iconGroup: {\n paddingLeft: theme.spacing(1),\n borderLeft: `1px solid ${theme.palette.grey[100]}`,\n },\n}));\n\ninterface MenuItemAction {\n label: string;\n onClick: () => void;\n disabled: boolean;\n}\n\ninterface IconButtonAction {\n icon: React.ReactElement;\n tooltip: string;\n onClick: () => void;\n disabled: boolean;\n}\n\ninterface Props {\n menuItemActions: MenuItemAction[];\n iconButtonActions: IconButtonAction[];\n showIconButtons: boolean;\n}\n\nexport default function TableActions(props: Props) {\n const classes = useStyles();\n const [menuAnchor, setMenuAnchor] = useState<null | HTMLElement>(null);\n\n const handleMenuClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n setMenuAnchor(event.currentTarget);\n };\n\n const closeMenu = () => setMenuAnchor(null);\n\n return (\n <div className={classes.actionsContainer}>\n <Tooltip title=\"More Actions\">\n <IconButton\n aria-label=\"actions\"\n className={classes.moreIcon}\n onClick={handleMenuClick}\n >\n <MoreHorizIcon />\n </IconButton>\n </Tooltip>\n <Menu\n id=\"action-menu\"\n keepMounted\n anchorEl={menuAnchor}\n open={Boolean(menuAnchor)}\n onClose={closeMenu}\n >\n {props.menuItemActions.map((action) => (\n <MenuItem\n key={action.label}\n onClick={() => {\n action.onClick();\n closeMenu();\n }}\n disabled={action.disabled}\n >\n {action.label}\n </MenuItem>\n ))}\n </Menu>\n {props.showIconButtons && (\n <div className={classes.iconGroup}>\n {props.iconButtonActions.map((action) => (\n <Tooltip key={action.tooltip} title={action.tooltip}>\n <IconButton onClick={action.onClick} disabled={action.disabled}>\n {action.icon}\n </IconButton>\n </Tooltip>\n ))}\n </div>\n )}\n </div>\n );\n}\n","import React, { useState, useCallback } from \"react\";\nimport { 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 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 CancelIcon from \"@material-ui/icons/Cancel\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport AlertTitle from \"@material-ui/lab/AlertTitle\";\nimport TablePaginationActions, {\n rowsPerPageOptions,\n} from \"./TablePaginationActions\";\nimport TableActions from \"./TableActions\";\nimport { usePolling } from \"../hooks\";\nimport { TaskInfoExtended } from \"../reducers/tasksReducer\";\nimport { TableColumn } from \"../types/table\";\nimport { PaginationOptions } from \"../api\";\nimport { TaskState } from \"../types/taskState\";\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\ninterface Props {\n queue: string; // name of the queue.\n totalTaskCount: number; // totoal number of tasks in the given state.\n taskState: TaskState;\n loading: boolean;\n error: string;\n tasks: TaskInfoExtended[];\n batchActionPending: boolean;\n allActionPending: boolean;\n pollInterval: number;\n pageSize: number;\n columns: TableColumn[];\n\n // actions\n listTasks: (qname: string, pgn: PaginationOptions) => void;\n batchDeleteTasks?: (qname: string, taskIds: string[]) => Promise<void>;\n batchRunTasks?: (qname: string, taskIds: string[]) => Promise<void>;\n batchArchiveTasks?: (qname: string, taskIds: string[]) => Promise<void>;\n batchCancelTasks?: (qname: string, taskIds: string[]) => Promise<void>;\n deleteAllTasks?: (qname: string) => Promise<void>;\n runAllTasks?: (qname: string) => Promise<void>;\n archiveAllTasks?: (qname: string) => Promise<void>;\n cancelAllTasks?: (qname: string) => Promise<void>;\n deleteTask?: (qname: string, taskId: string) => Promise<void>;\n runTask?: (qname: string, taskId: string) => Promise<void>;\n archiveTask?: (qname: string, taskId: string) => Promise<void>;\n cancelTask?: (qname: string, taskId: string) => Promise<void>;\n taskRowsPerPageChange: (n: number) => void;\n\n renderRow: (rowProps: RowProps) => JSX.Element;\n}\n\nexport default function TasksTable(props: Props) {\n const { pollInterval, listTasks, 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 function createAllActionHandler(action: (qname: string) => Promise<void>) {\n return () => action(queue);\n }\n\n function createBatchActionHandler(\n action: (qname: string, taskIds: string[]) => Promise<void>\n ) {\n return () => action(queue, selectedIds).then(() => setSelectedIds([]));\n }\n\n function createSingleActionHandler(\n action: (qname: string, taskId: string) => Promise<void>,\n taskId: string\n ) {\n return () => action(queue, taskId);\n }\n\n let allActions = [];\n if (props.deleteAllTasks) {\n allActions.push({\n label: \"Delete All\",\n onClick: createAllActionHandler(props.deleteAllTasks),\n disabled: props.allActionPending,\n });\n }\n if (props.archiveAllTasks) {\n allActions.push({\n label: \"Archive All\",\n onClick: createAllActionHandler(props.archiveAllTasks),\n disabled: props.allActionPending,\n });\n }\n if (props.runAllTasks) {\n allActions.push({\n label: \"Run All\",\n onClick: createAllActionHandler(props.runAllTasks),\n disabled: props.allActionPending,\n });\n }\n if (props.cancelAllTasks) {\n allActions.push({\n label: \"Cancel All\",\n onClick: createAllActionHandler(props.cancelAllTasks),\n disabled: props.allActionPending,\n });\n }\n\n let batchActions = [];\n if (props.batchDeleteTasks) {\n batchActions.push({\n tooltip: \"Delete\",\n icon: <DeleteIcon />,\n disabled: props.batchActionPending,\n onClick: createBatchActionHandler(props.batchDeleteTasks),\n });\n }\n if (props.batchArchiveTasks) {\n batchActions.push({\n tooltip: \"Archive\",\n icon: <ArchiveIcon />,\n disabled: props.batchActionPending,\n onClick: createBatchActionHandler(props.batchArchiveTasks),\n });\n }\n if (props.batchRunTasks) {\n batchActions.push({\n tooltip: \"Run\",\n icon: <PlayArrowIcon />,\n disabled: props.batchActionPending,\n onClick: createBatchActionHandler(props.batchRunTasks),\n });\n }\n if (props.batchCancelTasks) {\n batchActions.push({\n tooltip: \"Cancel\",\n icon: <CancelIcon />,\n disabled: props.batchActionPending,\n onClick: createBatchActionHandler(props.batchCancelTasks),\n });\n }\n\n const fetchData = useCallback(() => {\n const pageOpts = { page: page + 1, size: pageSize };\n listTasks(queue, pageOpts);\n }, [page, pageSize, queue, listTasks]);\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 {props.taskState === \"aggregating\" ? (\n <div>Selected group is empty.</div>\n ) : (\n <div>No {props.taskState} tasks at this time.</div>\n )}\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={batchActions}\n menuItemActions={allActions}\n />\n )}\n <TableContainer component={Paper}>\n <Table\n stickyHeader={true}\n className={classes.table}\n aria-label={`${props.taskState} 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 {props.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 return props.renderRow({\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: props.runTask\n ? createSingleActionHandler(props.runTask, task.id)\n : undefined,\n onDeleteClick: props.deleteTask\n ? createSingleActionHandler(props.deleteTask, task.id)\n : undefined,\n onArchiveClick: props.archiveTask\n ? createSingleActionHandler(props.archiveTask, task.id)\n : undefined,\n onCancelClick: props.cancelTask\n ? createSingleActionHandler(props.cancelTask, task.id)\n : undefined,\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={props.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\nexport const 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\nexport interface RowProps {\n key: string;\n task: TaskInfoExtended;\n isSelected: boolean;\n onSelectChange: (checked: boolean) => void;\n onRunClick?: () => void;\n onDeleteClick?: () => void;\n onArchiveClick?: () => void;\n onCancelClick?: () => void;\n allActionPending: boolean;\n showActions: boolean;\n onActionCellEnter: () => void;\n onActionCellLeave: () => void;\n}\n","import Checkbox from \"@material-ui/core/Checkbox\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport TableCell from \"@material-ui/core/TableCell\";\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 React 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 { taskDetailsPath } from \"../paths\";\nimport { AppState } from \"../store\";\nimport { TableColumn } from \"../types/table\";\nimport { durationBefore, prettifyPayload, timeAgo, uuidPrefix } from \"../utils\";\nimport SyntaxHighlighter from \"./SyntaxHighlighter\";\nimport TasksTable, { RowProps, useRowStyles } from \"./TasksTable\";\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 listTasks: listActiveTasksAsync,\n cancelTask: cancelActiveTaskAsync,\n batchCancelTasks: batchCancelActiveTasksAsync,\n cancelAllTasks: 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 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\nfunction ActiveTasksTable(props: Props & ReduxProps) {\n return (\n <TasksTable\n taskState=\"active\"\n columns={columns}\n renderRow={(rowProps: RowProps) => <Row {...rowProps} />}\n {...props}\n />\n );\n}\n\nexport default connector(ActiveTasksTable);\n","import Checkbox from \"@material-ui/core/Checkbox\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport TableCell from \"@material-ui/core/TableCell\";\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 React 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 { taskDetailsPath } from \"../paths\";\nimport { AppState } from \"../store\";\nimport { TableColumn } from \"../types/table\";\nimport { prettifyPayload, uuidPrefix } from \"../utils\";\nimport SyntaxHighlighter from \"./SyntaxHighlighter\";\nimport TasksTable, { RowProps, useRowStyles } from \"./TasksTable\";\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 listTasks: listPendingTasksAsync,\n deleteTask: deletePendingTaskAsync,\n batchDeleteTasks: batchDeletePendingTasksAsync,\n deleteAllTasks: deleteAllPendingTasksAsync,\n archiveTask: archivePendingTaskAsync,\n batchArchiveTasks: batchArchivePendingTasksAsync,\n archiveAllTasks: 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\nconst 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\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\nfunction PendingTasksTable(props: Props & ReduxProps) {\n return (\n <TasksTable\n taskState=\"pending\"\n columns={columns}\n renderRow={(rowProps: RowProps) => <Row {...rowProps} />}\n {...props}\n />\n );\n}\n\nexport default connector(PendingTasksTable);\n","import React from \"react\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport { useHistory } from \"react-router-dom\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport TableCell from \"@material-ui/core/TableCell\";\nimport Checkbox from \"@material-ui/core/Checkbox\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport FileCopyOutlinedIcon from \"@material-ui/icons/FileCopyOutlined\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport ArchiveIcon from \"@material-ui/icons/Archive\";\nimport MoreHorizIcon from \"@material-ui/icons/MoreHoriz\";\nimport PlayArrowIcon from \"@material-ui/icons/PlayArrow\";\nimport SyntaxHighlighter from \"./SyntaxHighlighter\";\nimport TasksTable, { RowProps, useRowStyles } from \"./TasksTable\";\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 { TableColumn } from \"../types/table\";\nimport { durationBefore, prettifyPayload, uuidPrefix } from \"../utils\";\nimport { taskDetailsPath } from \"../paths\";\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 listTasks: listScheduledTasksAsync,\n batchDeleteTasks: batchDeleteScheduledTasksAsync,\n batchRunTasks: batchRunScheduledTasksAsync,\n batchArchiveTasks: batchArchiveScheduledTasksAsync,\n deleteAllTasks: deleteAllScheduledTasksAsync,\n runAllTasks: runAllScheduledTasksAsync,\n archiveAllTasks: archiveAllScheduledTasksAsync,\n deleteTask: deleteScheduledTaskAsync,\n runTask: runScheduledTaskAsync,\n archiveTask: 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\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: \"process_in\", label: \"Process In\", align: \"left\" },\n { key: \"actions\", label: \"Actions\", align: \"center\" },\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}\n\nfunction ScheduledTasksTable(props: Props & ReduxProps) {\n return (\n <TasksTable\n taskState=\"scheduled\"\n columns={columns}\n renderRow={(rowProps: RowProps) => <Row {...rowProps} />}\n {...props}\n />\n );\n}\n\nexport default connector(ScheduledTasksTable);\n","import Checkbox from \"@material-ui/core/Checkbox\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport TableCell from \"@material-ui/core/TableCell\";\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 React 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 TasksTable, { RowProps, useRowStyles } from \"./TasksTable\";\nimport { taskDetailsPath } from \"../paths\";\nimport { AppState } from \"../store\";\nimport { TableColumn } from \"../types/table\";\nimport { durationBefore, prettifyPayload, uuidPrefix } from \"../utils\";\nimport SyntaxHighlighter from \"./SyntaxHighlighter\";\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 batchDeleteTasks: batchDeleteRetryTasksAsync,\n batchRunTasks: batchRunRetryTasksAsync,\n batchArchiveTasks: batchArchiveRetryTasksAsync,\n deleteAllTasks: deleteAllRetryTasksAsync,\n runAllTasks: runAllRetryTasksAsync,\n archiveAllTasks: archiveAllRetryTasksAsync,\n listTasks: listRetryTasksAsync,\n deleteTask: deleteRetryTaskAsync,\n runTask: runRetryTaskAsync,\n archiveTask: 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\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: \"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\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\nfunction RetryTasksTable(props: Props & ReduxProps) {\n return (\n <TasksTable\n taskState=\"retry\"\n columns={columns}\n renderRow={(rowProps: RowProps) => <Row {...rowProps} />}\n {...props}\n />\n );\n}\n\nexport default connector(RetryTasksTable);\n","import Checkbox from \"@material-ui/core/Checkbox\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport TableCell from \"@material-ui/core/TableCell\";\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 React 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 { taskDetailsPath } from \"../paths\";\nimport { AppState } from \"../store\";\nimport { TableColumn } from \"../types/table\";\nimport { prettifyPayload, timeAgo, uuidPrefix } from \"../utils\";\nimport SyntaxHighlighter from \"./SyntaxHighlighter\";\nimport TasksTable, { RowProps, useRowStyles } from \"./TasksTable\";\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 listTasks: listArchivedTasksAsync,\n runTask: runArchivedTaskAsync,\n runAllTasks: runAllArchivedTasksAsync,\n deleteTask: deleteArchivedTaskAsync,\n deleteAllTasks: deleteAllArchivedTasksAsync,\n batchRunTasks: batchRunArchivedTasksAsync,\n batchDeleteTasks: 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\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: \"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\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\nfunction ArchivedTasksTable(props: Props & ReduxProps) {\n return (\n <TasksTable\n taskState=\"archived\"\n columns={columns}\n renderRow={(rowProps: RowProps) => <Row {...rowProps} />}\n {...props}\n />\n );\n}\n\nexport default connector(ArchivedTasksTable);\n","import Checkbox from \"@material-ui/core/Checkbox\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport TableCell from \"@material-ui/core/TableCell\";\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 React 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 { taskDetailsPath } from \"../paths\";\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 TasksTable, { RowProps, useRowStyles } from \"./TasksTable\";\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 listTasks: listCompletedTasksAsync,\n deleteTask: deleteCompletedTaskAsync,\n deleteAllTasks: deleteAllCompletedTasksAsync,\n batchDeleteTasks: 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\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: \"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\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\nfunction CompletedTasksTable(props: Props & ReduxProps) {\n return (\n <TasksTable\n taskState=\"completed\"\n columns={columns}\n renderRow={(rowProps: RowProps) => <Row {...rowProps} />}\n {...props}\n />\n );\n}\nexport default connector(CompletedTasksTable);\n","import { Dispatch } from \"redux\";\nimport { listGroups, ListGroupsResponse } from \"../api\";\nimport { toErrorString, toErrorStringWithHttpStatus } from \"../utils\";\n\n// List of groups related action types.\nexport const LIST_GROUPS_BEGIN = \"LIST_GROUPS_BEGIN\";\nexport const LIST_GROUPS_SUCCESS = \"LIST_GROUPS_SUCCESS\";\nexport const LIST_GROUPS_ERROR = \"LIST_GROUPS_ERROR\";\n\ninterface ListGroupsBeginAction {\n type: typeof LIST_GROUPS_BEGIN;\n queue: string;\n}\n\ninterface ListGroupsSuccessAction {\n type: typeof LIST_GROUPS_SUCCESS;\n payload: ListGroupsResponse;\n queue: string;\n}\n\ninterface ListGroupsErrorAction {\n type: typeof LIST_GROUPS_ERROR;\n queue: string;\n error: string;\n}\n\n// Union of all groups related action types.\nexport type GroupsActionTypes =\n | ListGroupsBeginAction\n | ListGroupsSuccessAction\n | ListGroupsErrorAction;\n\nexport function listGroupsAsync(qname: string) {\n return async (dispatch: Dispatch<GroupsActionTypes>) => {\n dispatch({ type: LIST_GROUPS_BEGIN, queue: qname });\n try {\n const response = await listGroups(qname);\n dispatch({\n type: LIST_GROUPS_SUCCESS,\n payload: response,\n queue: qname,\n });\n } catch (error) {\n console.error(`listGroupsAsync: ${toErrorStringWithHttpStatus(error)}`);\n dispatch({\n type: LIST_GROUPS_ERROR,\n error: toErrorString(error),\n queue: qname,\n });\n }\n };\n}\n","import Checkbox from \"@material-ui/core/Checkbox\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport TableCell from \"@material-ui/core/TableCell\";\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 React from \"react\";\nimport { connect, ConnectedProps } from \"react-redux\";\nimport { useHistory } from \"react-router-dom\";\nimport { taskRowsPerPageChange } from \"../actions/settingsActions\";\nimport {\n archiveAggregatingTaskAsync,\n archiveAllAggregatingTasksAsync,\n batchArchiveAggregatingTasksAsync,\n batchDeleteAggregatingTasksAsync,\n batchRunAggregatingTasksAsync,\n deleteAggregatingTaskAsync,\n deleteAllAggregatingTasksAsync,\n listAggregatingTasksAsync,\n runAggregatingTaskAsync,\n runAllAggregatingTasksAsync,\n} from \"../actions/tasksActions\";\nimport { PaginationOptions } from \"../api\";\nimport { taskDetailsPath } from \"../paths\";\nimport { AppState } from \"../store\";\nimport { TableColumn } from \"../types/table\";\nimport { prettifyPayload, uuidPrefix } from \"../utils\";\nimport SyntaxHighlighter from \"./SyntaxHighlighter\";\nimport TasksTable, { RowProps, useRowStyles } from \"./TasksTable\";\n\nfunction mapStateToProps(state: AppState) {\n return {\n groups: state.groups.data,\n groupsError: state.groups.error,\n loading: state.tasks.aggregatingTasks.loading,\n allActionPending: state.tasks.aggregatingTasks.allActionPending,\n batchActionPending: state.tasks.aggregatingTasks.batchActionPending,\n error: state.tasks.aggregatingTasks.error,\n group: state.tasks.aggregatingTasks.group,\n tasks: state.tasks.aggregatingTasks.data,\n pollInterval: state.settings.pollInterval,\n pageSize: state.settings.taskRowsPerPage,\n };\n}\n\nconst mapDispatchToProps = {\n listAggregatingTasksAsync,\n deleteAllAggregatingTasksAsync,\n archiveAllAggregatingTasksAsync,\n runAllAggregatingTasksAsync,\n batchDeleteAggregatingTasksAsync,\n batchRunAggregatingTasksAsync,\n batchArchiveAggregatingTasksAsync,\n deleteAggregatingTaskAsync,\n runAggregatingTaskAsync,\n archiveAggregatingTaskAsync,\n taskRowsPerPageChange,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\ntype ReduxProps = ConnectedProps<typeof connector>;\n\ninterface Props {\n queue: string;\n selectedGroup: string;\n totalTaskCount: number; // total number of tasks in the group\n}\n\nconst 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: \"group\", label: \"Group\", align: \"left\" },\n { key: \"actions\", label: \"Actions\", align: \"center\" },\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>{task.group}</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\nfunction AggregatingTasksTable(props: Props & ReduxProps) {\n const listTasks = (qname: string, pgn?: PaginationOptions) =>\n props.listAggregatingTasksAsync(qname, props.selectedGroup, pgn);\n\n const deleteAllTasks = (qname: string) =>\n props.deleteAllAggregatingTasksAsync(qname, props.selectedGroup);\n\n const archiveAllTasks = (qname: string) =>\n props.archiveAllAggregatingTasksAsync(qname, props.selectedGroup);\n\n const runAllTasks = (qname: string) =>\n props.runAllAggregatingTasksAsync(qname, props.selectedGroup);\n\n const batchDeleteTasks = (qname: string, taskIds: string[]) =>\n props.batchDeleteAggregatingTasksAsync(qname, props.selectedGroup, taskIds);\n\n const batchArchiveTasks = (qname: string, taskIds: string[]) =>\n props.batchArchiveAggregatingTasksAsync(\n qname,\n props.selectedGroup,\n taskIds\n );\n\n const batchRunTasks = (qname: string, taskIds: string[]) =>\n props.batchRunAggregatingTasksAsync(qname, props.selectedGroup, taskIds);\n\n const deleteTask = (qname: string, taskId: string) =>\n props.deleteAggregatingTaskAsync(qname, props.selectedGroup, taskId);\n\n const archiveTask = (qname: string, taskId: string) =>\n props.archiveAggregatingTaskAsync(qname, props.selectedGroup, taskId);\n\n const runTask = (qname: string, taskId: string) =>\n props.runAggregatingTaskAsync(qname, props.selectedGroup, taskId);\n\n return (\n <TasksTable\n queue={props.queue}\n totalTaskCount={props.totalTaskCount}\n taskState=\"aggregating\"\n loading={props.loading}\n error={props.error}\n tasks={props.tasks}\n batchActionPending={props.batchActionPending}\n allActionPending={props.allActionPending}\n pollInterval={props.pollInterval}\n pageSize={props.pageSize}\n listTasks={listTasks}\n deleteAllTasks={deleteAllTasks}\n archiveAllTasks={archiveAllTasks}\n runAllTasks={runAllTasks}\n batchDeleteTasks={batchDeleteTasks}\n batchArchiveTasks={batchArchiveTasks}\n batchRunTasks={batchRunTasks}\n deleteTask={deleteTask}\n archiveTask={archiveTask}\n runTask={runTask}\n taskRowsPerPageChange={props.taskRowsPerPageChange}\n columns={columns}\n renderRow={(rowProps: RowProps) => <Row {...rowProps} />}\n />\n );\n}\n\nexport default connector(AggregatingTasksTable);\n","import React from \"react\";\nimport { makeStyles, useTheme } from \"@material-ui/core/styles\";\nimport TextField from \"@material-ui/core/TextField\";\nimport Autocomplete from \"@material-ui/lab/Autocomplete\";\nimport useMediaQuery from \"@material-ui/core/useMediaQuery\";\nimport ListSubheader from \"@material-ui/core/ListSubheader\";\nimport { VariableSizeList, ListChildComponentProps } from \"react-window\";\nimport { GroupInfo } from \"../api\";\nimport { isDarkTheme } from \"../theme\";\n\nconst useStyles = makeStyles((theme) => ({\n groupSelectOption: {\n display: \"flex\",\n justifyContent: \"space-between\",\n width: \"100%\",\n },\n groupSize: {\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 marginRight: \"2px\",\n },\n inputRoot: {\n borderRadius: 20,\n paddingLeft: \"12px !important\",\n },\n}));\n\ninterface Props {\n selected: GroupInfo | null;\n onSelect: (newVal: GroupInfo | null) => void;\n groups: GroupInfo[];\n error: string;\n}\n\nexport default function GroupSelect(props: Props) {\n const classes = useStyles();\n const [inputValue, setInputValue] = React.useState(\"\");\n\n return (\n <Autocomplete\n id=\"task-group-selector\"\n value={props.selected}\n onChange={(event: any, newValue: GroupInfo | null) => {\n props.onSelect(newValue);\n }}\n inputValue={inputValue}\n onInputChange={(event, newInputValue) => {\n setInputValue(newInputValue);\n }}\n disableListWrap\n ListboxComponent={\n ListboxComponent as React.ComponentType<\n React.HTMLAttributes<HTMLElement>\n >\n }\n options={props.groups}\n getOptionLabel={(option: GroupInfo) => option.group}\n style={{ width: 300 }}\n renderOption={(option: GroupInfo) => (\n <div className={classes.groupSelectOption}>\n <span>{option.group}</span>\n <span className={classes.groupSize}>{option.size}</span>\n </div>\n )}\n renderInput={(params) => (\n <TextField {...params} label=\"Select group\" variant=\"outlined\" />\n )}\n classes={{\n inputRoot: classes.inputRoot,\n }}\n size=\"small\"\n />\n );\n}\n\n// Virtualized list.\n// Reference: https://v4.mui.com/components/autocomplete/#virtualization\n\nconst LISTBOX_PADDING = 8; // px\n\nfunction renderRow(props: ListChildComponentProps) {\n const { data, index, style } = props;\n return React.cloneElement(data[index], {\n style: {\n ...style,\n top: (style.top as number) + LISTBOX_PADDING,\n },\n });\n}\n\nconst OuterElementContext = React.createContext({});\n\nconst OuterElementType = React.forwardRef<HTMLDivElement>((props, ref) => {\n const outerProps = React.useContext(OuterElementContext);\n return <div ref={ref} {...props} {...outerProps} />;\n});\n\nfunction useResetCache(data: any) {\n const ref = React.useRef<VariableSizeList>(null);\n React.useEffect(() => {\n if (ref.current != null) {\n ref.current.resetAfterIndex(0, true);\n }\n }, [data]);\n return ref;\n}\n\n// Adapter for react-window\nconst ListboxComponent = React.forwardRef<HTMLDivElement>(\n function ListboxComponent(props, ref) {\n const { children, ...other } = props;\n const itemData = React.Children.toArray(children);\n const theme = useTheme();\n const smUp = useMediaQuery(theme.breakpoints.up(\"sm\"), { noSsr: true });\n const itemCount = itemData.length;\n const itemSize = smUp ? 36 : 48;\n\n const getChildSize = (child: React.ReactNode) => {\n if (React.isValidElement(child) && child.type === ListSubheader) {\n return 48;\n }\n return itemSize;\n };\n\n const getHeight = () => {\n if (itemCount > 8) {\n return 8 * itemSize;\n }\n return itemData.map(getChildSize).reduce((a, b) => a + b, 0);\n };\n\n const gridRef = useResetCache(itemCount);\n\n return (\n <div ref={ref}>\n <OuterElementContext.Provider value={other}>\n <VariableSizeList\n itemData={itemData}\n height={getHeight() + 2 * LISTBOX_PADDING}\n width=\"100%\"\n ref={gridRef}\n outerElementType={OuterElementType}\n innerElementType=\"ul\"\n itemSize={(index) => getChildSize(itemData[index])}\n overscanCount={5}\n itemCount={itemCount}\n >\n {renderRow}\n </VariableSizeList>\n </OuterElementContext.Provider>\n </div>\n );\n }\n);\n","import { makeStyles } from \"@material-ui/core/styles\";\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 { listGroupsAsync } from \"../actions/groupsActions\";\nimport { GroupInfo } from \"../api\";\nimport { usePolling } from \"../hooks\";\nimport { AppState } from \"../store\";\nimport AggregatingTasksTable from \"./AggregatingTasksTable\";\nimport GroupSelect from \"./GroupSelect\";\n\nconst useStyles = makeStyles((theme) => ({\n groupSelector: {\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n alert: {\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n },\n}));\n\nfunction mapStateToProps(state: AppState) {\n return {\n groups: state.groups.data,\n groupsError: state.groups.error,\n pollInterval: state.settings.pollInterval,\n };\n}\n\nconst mapDispatchToProps = {\n listGroupsAsync,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\ninterface Props {\n queue: string;\n}\n\nfunction AggregatingTasksTableContainer(\n props: Props & ConnectedProps<typeof connector>\n) {\n const [selectedGroup, setSelectedGroup] = useState<GroupInfo | null>(null);\n const { pollInterval, listGroupsAsync, queue } = props;\n const classes = useStyles();\n\n const fetchGroups = useCallback(() => {\n listGroupsAsync(queue);\n }, [listGroupsAsync, queue]);\n\n usePolling(fetchGroups, pollInterval);\n\n if (props.groupsError.length > 0) {\n return (\n <Alert severity=\"error\" className={classes.alert}>\n <AlertTitle>Error</AlertTitle>\n {props.groupsError}\n </Alert>\n );\n }\n if (props.groups.length === 0) {\n return (\n <Alert severity=\"info\" className={classes.alert}>\n <AlertTitle>Info</AlertTitle>\n No aggregating tasks at this time.\n </Alert>\n );\n }\n\n return (\n <div>\n <div className={classes.groupSelector}>\n <GroupSelect\n selected={selectedGroup}\n onSelect={setSelectedGroup}\n groups={props.groups}\n error={props.groupsError}\n />\n </div>\n {selectedGroup !== null ? (\n <AggregatingTasksTable\n queue={props.queue}\n totalTaskCount={selectedGroup.size}\n selectedGroup={selectedGroup.group}\n />\n ) : (\n <Alert severity=\"info\" className={classes.alert}>\n <AlertTitle>Info</AlertTitle>\n <div>Please select group</div>\n </Alert>\n )}\n </div>\n );\n}\n\nexport default connector(AggregatingTasksTableContainer);\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 AggregatingTasksTableContainer from \"./AggregatingTasksTableContainer\";\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 groups: 0,\n active: 0,\n pending: 0,\n aggregating: 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(1),\n paddingRight: theme.spacing(1),\n marginRight: theme.spacing(1),\n flex: 1,\n },\n search: {\n position: \"relative\",\n maxWidth: 400,\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 TasksTableContainer(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 {\n key: \"aggregating\",\n label: \"Aggregating\",\n count: currentStats.aggregating,\n },\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=\"aggregating\" selected={props.selected}>\n <AggregatingTasksTableContainer queue={props.queue} />\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(TasksTableContainer);\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 Task groups\n </Typography>\n <Typography color=\"textSecondary\">\n {queue ? queue.groups : \"-\"}\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 TasksTableContainer from \"../components/TasksTableContainer\";\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 \"aggregating\",\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 <TasksTableContainer 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","function _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\nvar _ref2 = /*#__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}));\n\nvar _ref3 = /*#__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\nfunction SvgLogoColor(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\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, _ref2, _ref3);\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgLogoColor);\nexport default __webpack_public_path__ + \"static/media/logo-color.c2b0c1f3.svg\";\nexport { ForwardRef as ReactComponent };","function _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\nvar _ref2 = /*#__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\nfunction SvgLogoWhite(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\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, _ref2);\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 GroupsActionTypes,\n LIST_GROUPS_SUCCESS,\n} from \"../actions/groupsActions\";\nimport {\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 DELETE_ALL_AGGREGATING_TASKS_SUCCESS,\n ARCHIVE_ALL_AGGREGATING_TASKS_SUCCESS,\n RUN_ALL_AGGREGATING_TASKS_SUCCESS,\n BATCH_DELETE_AGGREGATING_TASKS_SUCCESS,\n BATCH_RUN_AGGREGATING_TASKS_SUCCESS,\n BATCH_ARCHIVE_AGGREGATING_TASKS_SUCCESS,\n DELETE_AGGREGATING_TASK_SUCCESS,\n RUN_AGGREGATING_TASK_SUCCESS,\n ARCHIVE_AGGREGATING_TASK_SUCCESS,\n LIST_AGGREGATING_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 | GroupsActionTypes\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_AGGREGATING_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_AGGREGATING_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 aggregating: queueInfo.currentStats.aggregating - 1,\n },\n };\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_AGGREGATING_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 aggregating: queueInfo.currentStats.aggregating - 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 DELETE_AGGREGATING_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 aggregating: queueInfo.currentStats.aggregating - 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 ARCHIVE_ALL_AGGREGATING_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 groups: queueInfo.currentStats.groups - 1,\n archived: queueInfo.currentStats.archived + action.archived,\n aggregating: queueInfo.currentStats.aggregating - action.archived,\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_AGGREGATING_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 groups: queueInfo.currentStats.groups - 1,\n pending: queueInfo.currentStats.pending + action.scheduled,\n aggregating: queueInfo.currentStats.aggregating - action.scheduled,\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_AGGREGATING_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 groups: queueInfo.currentStats.groups - 1,\n aggregating: queueInfo.currentStats.aggregating - action.deleted,\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 BATCH_RUN_AGGREGATING_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 aggregating:\n queueInfo.currentStats.aggregating -\n action.payload.pending_ids.length,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case BATCH_ARCHIVE_AGGREGATING_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 aggregating:\n queueInfo.currentStats.aggregating -\n action.payload.archived_ids.length,\n },\n };\n });\n return { ...state, data: newData };\n }\n\n case BATCH_DELETE_AGGREGATING_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 aggregating:\n queueInfo.currentStats.aggregating -\n 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 case LIST_GROUPS_SUCCESS: {\n const newData = state.data.map((queueInfo) => {\n if (queueInfo.name !== action.queue) {\n return queueInfo;\n }\n return {\n ...queueInfo,\n currentStats: action.payload.stats,\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 LIST_AGGREGATING_TASKS_BEGIN,\n LIST_AGGREGATING_TASKS_SUCCESS,\n LIST_AGGREGATING_TASKS_ERROR,\n DELETE_ALL_AGGREGATING_TASKS_BEGIN,\n DELETE_ALL_AGGREGATING_TASKS_SUCCESS,\n DELETE_ALL_AGGREGATING_TASKS_ERROR,\n ARCHIVE_ALL_AGGREGATING_TASKS_BEGIN,\n ARCHIVE_ALL_AGGREGATING_TASKS_SUCCESS,\n ARCHIVE_ALL_AGGREGATING_TASKS_ERROR,\n RUN_ALL_AGGREGATING_TASKS_BEGIN,\n RUN_ALL_AGGREGATING_TASKS_SUCCESS,\n RUN_ALL_AGGREGATING_TASKS_ERROR,\n BATCH_ARCHIVE_AGGREGATING_TASKS_BEGIN,\n BATCH_RUN_AGGREGATING_TASKS_BEGIN,\n BATCH_DELETE_AGGREGATING_TASKS_BEGIN,\n BATCH_RUN_AGGREGATING_TASKS_ERROR,\n BATCH_ARCHIVE_AGGREGATING_TASKS_ERROR,\n BATCH_DELETE_AGGREGATING_TASKS_ERROR,\n BATCH_DELETE_AGGREGATING_TASKS_SUCCESS,\n BATCH_RUN_AGGREGATING_TASKS_SUCCESS,\n BATCH_ARCHIVE_AGGREGATING_TASKS_SUCCESS,\n RUN_AGGREGATING_TASK_BEGIN,\n ARCHIVE_AGGREGATING_TASK_BEGIN,\n DELETE_AGGREGATING_TASK_BEGIN,\n RUN_AGGREGATING_TASK_ERROR,\n ARCHIVE_AGGREGATING_TASK_ERROR,\n DELETE_AGGREGATING_TASK_ERROR,\n RUN_AGGREGATING_TASK_SUCCESS,\n ARCHIVE_AGGREGATING_TASK_SUCCESS,\n DELETE_AGGREGATING_TASK_SUCCESS,\n} from \"../actions/tasksActions\";\nimport { TaskInfo } from \"../api\";\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 // Incidates that a cancelation signal has been\n // published for this task.\n //\n // Only applies to active tasks\n canceling?: boolean;\n}\n\ninterface TasksState {\n activeTasks: {\n loading: boolean;\n batchActionPending: boolean;\n allActionPending: boolean;\n error: string;\n data: TaskInfoExtended[];\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 aggregatingTasks: {\n group: string;\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 aggregatingTasks: {\n group: \"\",\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 LIST_AGGREGATING_TASKS_BEGIN:\n return {\n ...state,\n aggregatingTasks: {\n ...state.aggregatingTasks,\n group: action.group,\n loading: true,\n },\n };\n\n case LIST_AGGREGATING_TASKS_SUCCESS:\n return {\n ...state,\n aggregatingTasks: {\n ...state.aggregatingTasks,\n group: action.group,\n loading: false,\n error: \"\",\n data: action.payload.tasks.map((task) => ({\n ...task,\n requestPending: false,\n })),\n },\n };\n\n case LIST_AGGREGATING_TASKS_ERROR:\n return {\n ...state,\n aggregatingTasks: {\n ...state.aggregatingTasks,\n group: action.group,\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_AGGREGATING_TASK_BEGIN:\n case ARCHIVE_AGGREGATING_TASK_BEGIN:\n case DELETE_AGGREGATING_TASK_BEGIN:\n return {\n ...state,\n aggregatingTasks: {\n ...state.aggregatingTasks,\n data: state.aggregatingTasks.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_AGGREGATING_TASK_ERROR:\n case ARCHIVE_AGGREGATING_TASK_ERROR:\n case DELETE_AGGREGATING_TASK_ERROR:\n return {\n ...state,\n aggregatingTasks: {\n ...state.aggregatingTasks,\n data: state.aggregatingTasks.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_AGGREGATING_TASK_SUCCESS:\n case ARCHIVE_AGGREGATING_TASK_SUCCESS:\n case DELETE_AGGREGATING_TASK_SUCCESS:\n return {\n ...state,\n aggregatingTasks: {\n ...state.aggregatingTasks,\n data: state.aggregatingTasks.data.filter(\n (task) => task.id !== action.taskId\n ),\n },\n };\n\n case BATCH_RUN_AGGREGATING_TASKS_BEGIN:\n case BATCH_ARCHIVE_AGGREGATING_TASKS_BEGIN:\n case BATCH_DELETE_AGGREGATING_TASKS_BEGIN:\n if (action.group !== state.aggregatingTasks.group) {\n return state;\n }\n return {\n ...state,\n aggregatingTasks: {\n ...state.aggregatingTasks,\n batchActionPending: true,\n data: state.aggregatingTasks.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_AGGREGATING_TASKS_ERROR:\n case BATCH_ARCHIVE_AGGREGATING_TASKS_ERROR:\n case BATCH_DELETE_AGGREGATING_TASKS_ERROR:\n if (action.group !== state.aggregatingTasks.group) {\n return state;\n }\n return {\n ...state,\n aggregatingTasks: {\n ...state.aggregatingTasks,\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 BATCH_DELETE_AGGREGATING_TASKS_SUCCESS: {\n if (action.group !== state.aggregatingTasks.group) {\n return state;\n }\n const newData = state.aggregatingTasks.data.filter(\n (task) => !action.payload.deleted_ids.includes(task.id)\n );\n return {\n ...state,\n aggregatingTasks: {\n ...state.aggregatingTasks,\n batchActionPending: false,\n data: newData,\n },\n };\n }\n\n case BATCH_RUN_AGGREGATING_TASKS_SUCCESS: {\n if (action.group !== state.aggregatingTasks.group) {\n return state;\n }\n const newData = state.aggregatingTasks.data.filter(\n (task) => !action.payload.pending_ids.includes(task.id)\n );\n return {\n ...state,\n aggregatingTasks: {\n ...state.aggregatingTasks,\n batchActionPending: false,\n data: newData,\n },\n };\n }\n\n case BATCH_ARCHIVE_AGGREGATING_TASKS_SUCCESS: {\n if (action.group !== state.aggregatingTasks.group) {\n return state;\n }\n const newData = state.aggregatingTasks.data.filter(\n (task) => !action.payload.archived_ids.includes(task.id)\n );\n return {\n ...state,\n aggregatingTasks: {\n ...state.aggregatingTasks,\n batchActionPending: false,\n data: newData,\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 case RUN_ALL_AGGREGATING_TASKS_BEGIN:\n case ARCHIVE_ALL_AGGREGATING_TASKS_BEGIN:\n case DELETE_ALL_AGGREGATING_TASKS_BEGIN:\n if (state.aggregatingTasks.group !== action.group) {\n return state;\n }\n return {\n ...state,\n aggregatingTasks: {\n ...state.aggregatingTasks,\n allActionPending: true,\n },\n };\n\n case RUN_ALL_AGGREGATING_TASKS_SUCCESS:\n case ARCHIVE_ALL_AGGREGATING_TASKS_SUCCESS:\n case DELETE_ALL_AGGREGATING_TASKS_SUCCESS:\n if (state.aggregatingTasks.group !== action.group) {\n return state;\n }\n return {\n ...state,\n aggregatingTasks: {\n ...state.aggregatingTasks,\n allActionPending: false,\n data: [],\n },\n };\n\n case RUN_ALL_AGGREGATING_TASKS_ERROR:\n case ARCHIVE_ALL_AGGREGATING_TASKS_ERROR:\n case DELETE_ALL_AGGREGATING_TASKS_ERROR:\n if (state.aggregatingTasks.group !== action.group) {\n return state;\n }\n return {\n ...state,\n aggregatingTasks: {\n ...state.aggregatingTasks,\n allActionPending: false,\n error: action.error,\n },\n };\n\n default:\n return state;\n }\n}\n\nexport default tasksReducer;\n","import {\n GroupsActionTypes,\n LIST_GROUPS_BEGIN,\n LIST_GROUPS_ERROR,\n LIST_GROUPS_SUCCESS,\n} from \"../actions/groupsActions\";\nimport {\n LIST_AGGREGATING_TASKS_SUCCESS,\n TasksActionTypes,\n} from \"../actions/tasksActions\";\nimport { GroupInfo } from \"../api\";\n\ninterface GroupsState {\n loading: boolean;\n data: GroupInfo[];\n error: string;\n}\n\nconst initialState: GroupsState = {\n data: [],\n loading: false,\n error: \"\",\n};\n\nfunction groupsReducer(\n state = initialState,\n action: GroupsActionTypes | TasksActionTypes\n): GroupsState {\n switch (action.type) {\n case LIST_GROUPS_BEGIN:\n return { ...state, loading: true };\n\n case LIST_GROUPS_ERROR:\n return { ...state, loading: false, error: action.error };\n\n case LIST_GROUPS_SUCCESS:\n return {\n ...state,\n loading: false,\n error: \"\",\n data: action.payload.groups,\n };\n\n case LIST_AGGREGATING_TASKS_SUCCESS:\n return {\n ...state,\n data: action.payload.groups,\n };\n\n default:\n return state;\n }\n}\n\nexport default groupsReducer;\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 RUN_AGGREGATING_TASK_SUCCESS,\n ARCHIVE_AGGREGATING_TASK_SUCCESS,\n DELETE_AGGREGATING_TASK_SUCCESS,\n BATCH_RUN_AGGREGATING_TASKS_SUCCESS,\n BATCH_ARCHIVE_AGGREGATING_TASKS_SUCCESS,\n BATCH_DELETE_AGGREGATING_TASKS_SUCCESS,\n RUN_ALL_AGGREGATING_TASKS_SUCCESS,\n ARCHIVE_ALL_AGGREGATING_TASKS_SUCCESS,\n DELETE_ALL_AGGREGATING_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 RUN_AGGREGATING_TASK_SUCCESS:\n return {\n isOpen: true,\n message: `Aggregating 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 ARCHIVE_AGGREGATING_TASK_SUCCESS:\n return {\n isOpen: true,\n message: `Aggregating 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 DELETE_AGGREGATING_TASK_SUCCESS:\n return {\n isOpen: true,\n message: `Aggregating 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_RUN_AGGREGATING_TASKS_SUCCESS: {\n const n = action.payload.pending_ids.length;\n return {\n isOpen: true,\n message: `${n} aggregating ${\n n === 1 ? \"task is\" : \"tasks are\"\n } now pending`,\n };\n }\n\n case BATCH_ARCHIVE_AGGREGATING_TASKS_SUCCESS: {\n const n = action.payload.archived_ids.length;\n return {\n isOpen: true,\n message: `${n} aggregating ${\n n === 1 ? \"task is\" : \"tasks are\"\n } now archived`,\n };\n }\n\n case BATCH_DELETE_AGGREGATING_TASKS_SUCCESS: {\n const n = action.payload.deleted_ids.length;\n return {\n isOpen: true,\n message: `${n} aggregating ${n === 1 ? \"task\" : \"tasks\"} deleted`,\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_AGGREGATING_TASKS_SUCCESS:\n return {\n isOpen: true,\n message: `All tasks in group ${action.group} are now pending`,\n };\n\n case ARCHIVE_ALL_AGGREGATING_TASKS_SUCCESS:\n return {\n isOpen: true,\n message: `All tasks in group ${action.group} are now archived`,\n };\n\n case DELETE_ALL_AGGREGATING_TASKS_SUCCESS:\n return {\n isOpen: true,\n message: `All tasks in group ${action.group} 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 groupsReducer from \"./reducers/groupsReducer\";\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 groups: groupsReducer,\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 window.PROMETHEUS_SERVER_ADDRESS = window.FLAG_PROMETHEUS_SERVER_ADDRESS;\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":""} |