{"version":3,"sources":["store/auth/stateTypes.ts","store/auth/reducer.ts","components/monitoring/dashboard/types.ts","components/monitoring/dashboard/const.ts","store/dashboard/types.ts","components/monitoring/dashboard/utils.ts","store/dashboard/reducer.ts","components/snackbar/types.ts","components/snackbar/reducer.ts","pages/users/types.ts","pages/users/reducer.ts","pages/management/cluster/types.ts","store/cluster/reducer.ts","pages/management/node/types.ts","store/node/reducer.ts","pages/management/host/types.ts","store/host/reducer.ts","store/jobsMonitor/types.ts","services/jobs/types.ts","pages/management/cluster/clusterCreateWizard/types.ts","store/jobsMonitor/utils.ts","store/jobsMonitor/reducer.ts","pages/management/cluster/clusterCreateWizard/reducer.ts","pages/management/node/nodeDeploymentDialog/types.ts","pages/management/host/const.ts","components/preloader/types.ts","pages/management/cluster/const.ts","pages/management/node/const.ts","pages/management/node/nodeDeploymentDialog/reducer.ts","store/preloader/reducer.ts","pages/users/userCreateWizard/types.ts","pages/users/userCreateWizard/reducer.ts","store/metricsStore/storeTypes.ts","store/systemStatus/types.ts","store/metricsStore/utils.ts","store/metricsStore/reducer.ts","store/systemStatus/reducer.ts","store/version/types.ts","store/version/reducer.ts","AppState.ts","store/cluster/actions.ts","services/appEnvironment.ts","services/api/utils.ts","services/api/ClustersAPI.ts","store/cluster/sideEffects.ts","store/host/actions.ts","services/api/const.ts","services/api/HostsAPI.ts","store/host/sideEffects.ts","services/api/NodesAPI.ts","store/node/actions.ts","store/node/sideEffects.ts","assets/images/gc_logo_orange.png","store/auth/actions.ts","pages/login/LoginComponent.tsx","pages/login/styles.ts","store/version/selectors.ts","pages/about/styles.ts","pages/about/AboutPage.tsx","pages/management/cluster/clusterCreateWizard/actions.ts","components/snackbar/actionCreators.ts","pages/management/node/nodeDeploymentDialog/actions.ts","pages/management/cluster/utils.ts","pages/management/host/utils.ts","components/form/dbEngineConfigEditor/styles.ts","components/form/const.ts","components/form/dbEngineConfigEditor/DbEngineConfigEditorComponent.tsx","components/form/dbEngineConfigEditor/DbEngineConfigButtonComponent.tsx","components/form/digitalOceanConfig/regionSelect/RegionSelectComponent.tsx","components/form/digitalOceanConfig/sizeSelect/sizeOption/SizeOptionComponent.tsx","components/form/digitalOceanConfig/sizeSelect/SizeSelectComponents.tsx","components/form/digitalOceanConfig/utils.ts","components/form/inputAdornments/LoadingAdornment.tsx","components/form/inputAdornments/VerifiedAdornment.tsx","services/api/DigitalOceanAPI.ts","components/form/digitalOceanConfig/DigitalOceanConfigComponent.tsx","components/form/ec2Config/AWSUtils.ts","components/form/ec2Config/EC2ConfigComponent.tsx","components/form/firewallRulesEditor/IPAddressFieldComponent.tsx","components/connectionTestDialog/types.ts","components/form/firewallRulesEditor/FirewallRulesEditorComponent.tsx","components/form/firewallRulesEditor/styles.ts","components/form/passwordField/passwordFieldComponent.tsx","components/form/SSHKeysEditor/styles.ts","components/form/SSHKeysEditor/SSHKeysEditorComponent.tsx","services/config/Config.ts","services/supportMatrix/SupportMatrix.ts","pages/management/cluster/clusterForm/styles.ts","components/form/styles.ts","components/form/title/FormTitle.tsx","pages/management/node/utils.ts","components/form/formFields/DbEngine.component.tsx","components/form/formFields/HostSystemFieldComponent.tsx","pages/management/cluster/clusterForm/ClusterFormComponent.tsx","store/jobsMonitor/actions.ts","services/jobs/jobsService.ts","utils/checkIfDesktop.tsx","components/dialog/DialogService.tsx","pages/management/cluster/clusterCreateWizard/ClusterCreateDialogComponent.tsx","pages/management/cluster/clusterCreateWizard/styles.ts","services/api/JobsApi.ts","pages/management/node/jobs/jobStatus/jobStatusComponent.tsx","pages/management/node/jobs/jobStatus/styles.ts","components/JobErrorDetails/styles.ts","components/JobErrorDetails/JobErrorDetailsComp.tsx","pages/management/node/jobs/jobComponent/styles.ts","pages/management/node/jobs/jobComponent/JobComponent.tsx","store/jobsMonitor/selectors.ts","pages/management/node/jobs/JobListComponent.tsx","pages/management/node/jobs/styles.ts","components/monitoring/charts/chartMessage/chartMessage.tsx","components/monitoring/charts/const.ts","components/monitoring/charts/timeSeries/liveValue/LiveValueComponent.tsx","components/monitoring/charts/timeSeries/liveValue/styles.ts","components/logViewer/const.ts","components/monitoring/charts/utils.ts","services/reactPlotlyPlot.js","components/monitoring/charts/timeSeries/TimeSeriesChartComponent.tsx","components/monitoring/charts/timeSeries/styles.ts","components/monitoring/dashboard/AddElement/Autocomplete/availableMetrics.ts","components/monitoring/dashboard/AddElement/Autocomplete/Autocomplete.tsx","components/monitoring/dashboard/AddElement/Autocomplete/styles.ts","components/monitoring/dashboard/AddElement/AddElement.tsx","components/monitoring/dashboard/AddElement/styles.ts","components/monitoring/dashboard/ChartActions/ChartActionsComponent.tsx","components/monitoring/dashboard/ChartActions/styles.ts","store/dashboard/actions.ts","store/dashboard/selectors.ts","components/monitoring/dashboard/DashboardComponent.tsx","components/monitoring/dashboard/styles.ts","components/BlinkingBadge/BlinkingBadge.tsx","components/logViewer/styles.ts","components/logViewer/LogMessageComponent.tsx","components/logViewer/LogViewerService.tsx","utils/utils.ts","components/logViewer/LogViewerComponent.tsx","store/metricsStore/selectors.ts","pages/management/cluster/ClusterManagerComponent.tsx","pages/management/cluster/styles.ts","pages/management/host/hostForm/HostFormComponent.tsx","components/monitoring/hostState/HostStateComponent.tsx","components/logViewer/HostLogTableComponent.tsx","services/api/LogsApi.ts","pages/management/host/HostManagerComponent.tsx","pages/management/host/styles.ts","components/logViewer/DeploymentLogMessage.tsx","services/api/AuthAPI.ts","store/systemStatus/actions.ts","services/webSocketHandler/WSHandler.ws.ts","pages/management/node/nodeDeploymentDialog/nodeDeploymentMonitor/NodeDeploymentMonitorComponent.tsx","pages/management/node/nodeDeploymentDialog/nodeDeploymentMonitor/styles.ts","pages/management/node/nodeForm/NodeFormComponent.tsx","pages/management/node/nodeForm/styles.ts","components/connectionTestDialog/utils.tsx","pages/management/node/NodeManagerComponent.tsx","components/connectionTestDialog/ConnectionTestComponent.tsx","components/connectionTestDialog/styles.ts","components/form/wrappers/FormWrapper.tsx","pages/management/node/nodeDeploymentDialog/NodeDeploymentDialogComponent.tsx","pages/management/node/nodeDeploymentDialog/styles.ts","components/monitoring/nodeState/nodeStateComponent.tsx","components/monitoring/nodeState/styles.ts","pages/management/node/styles.ts","pages/management/treeView/clusterItem/styles.ts","sharedStyles.ts","pages/management/treeView/nodeItem/NodeItemComponent.tsx","pages/management/treeView/nodeItem/styles.ts","pages/management/treeView/segmentItem/SegmentItemComponent.tsx","pages/management/treeView/segmentItem/styles.ts","pages/management/treeView/strayHostItem/StrayHostItemComponent.tsx","pages/management/treeView/clusterItem/ClusterItemComponent.tsx","pages/management/treeView/clusterItem/NoClusterItemComponent.tsx","pages/management/treeView/TreeViewComponent.tsx","pages/management/treeView/styles.ts","pages/systemLog/styles.ts","pages/systemLog/SystemLogMessage.tsx","pages/systemLog/SystemLogComponent.tsx","pages/users/styles.ts","pages/users/UserFormComponent.tsx","services/api/UsersApi.ts","pages/users/actions.ts","pages/users/userCreateWizard/UserCreateWizard.tsx","pages/users/userCreateWizard/styles.ts","pages/users/userCreateWizard/actions.ts","pages/users/utils.ts","pages/users/UserListComponent.tsx","pages/users/UserManagerComponent.tsx","components/sidebar/styles.ts","components/sidebar/SidebarItem.tsx","components/sidebar/Sidebar.tsx","components/monitoring/connectionStatus/styles.ts","components/monitoring/connectionStatus/ConnectionStatusComp.tsx","components/preloader/PreloaderComponentHtml.tsx","components/preloader/SecurePreloaderComponent.tsx","pages/root/RootComponent.tsx","pages/root/styles.ts","store/preloader/actions.ts","components/preloader/PublicPreloaderComponent.tsx","components/appInfo/AppInfoComponent.tsx","components/appInfo/styles.ts","Router.tsx","services/longPress/LongPress.ts","components/dialog/DialogComponent.tsx","components/dialog/styles.ts","components/snackbar/sideEffects.ts","components/snackbar/SnackbarComponent.tsx","pages/users/sideEffects.ts","store/metricsStore/actions.ts","store/auth/sideEffects.ts","services/api/DashboardsApi.ts","store/dashboard/sideEffects.ts","services/Interceptors.ts","store/jobsMonitor/sideEffects.ts","store/metricsStore/types.ts","services/api/MetricsApi.ts","store/systemStatus/const.ts","store/metricsStore/sideEffects.ts","services/api/EnvAPI.ts","services/api/SupportMatrixApi.ts","store/version/actions.ts","store/preloader/sideEffects.ts","theme.ts","serviceWorker.ts","index.tsx"],"names":["AUTH_ACTION","defaultState","isAuthenticated","isLoggingIn","isLoggingOut","DASHBOARD_TILE_SIZE","AGGREGATION","DASHBOARD_ACTION","DEFAULT_DASHBOARD_CONFIG","name","config","charts","id","title","metric","table","position","aggregation","DIFFERENTIAL","unit","dataScaling","RAW","yAxisMax","tileSize","MEDIUM","period","DASHBOARD_PERIOD_SELECT_OPTIONS","DASHBOARD_NO_OF_COLUMNS","DASHBOARD_NO_OF_ROWS","DashboardUtils","dashboards","reduce","dashboardMap","dashboard","set","Map","Array","from","values","cluster","node","defaultConfig","cloneDeep","visibleInitialDashHeight","window","innerHeight","columns","rowHeight","getGridSize","i","x","y","parseInt","w","h","layout","saveInProgress","SNACKBAR_TYPE","SNACKBAR_ACTION","USER_ROLE","USER_ACTION","initialState","msg","snackbarType","DEFAULT","open","WSREP_MEMBER_STATE","DEPLOYMENT_STATUS","CLUSTER_ACTION","NODE_DB_ENGINE","DB_STATE","NODE_ACTION","HOST_TYPE","HOST_SYSTEM","HOST_STATUS","HOST_ACTION","JOB_MONITOR_ACTION","JOB_STATUS","CLUSTER_TYPE","CLUSTER_CREATE_WIZARD_ACTION","JobUtils","jobStatusWeights","new","running","success","failure","aborted","missing","job","status","executionInfo","meta","NEW","RUNNING","SUCCESS","ABORTED","FAILURE","MISSING","status1","status2","this","getJobStatusWeight","trackedJobList","jobsToTrack","runningJobList","jobsDoneDuringBoot","isBootDone","isWsConnected","DEPLOYMENT_TYPE","DEPLOYMENT_STEP_TYPE","DEPLOYMENT_STEP_STATUS","NODE_CREATE_WIZARD_ACTION","isOpen","SECURE_PRELOADER_ACTION","PUBLIC_PRELOADER_ACTION","HOST_TYPE_SPECIFIC_AWS_DEFAULT_CONFIG","region","instanceType","accessKeyID","secretAccessKey","HOST_TYPE_SPECIFIC_DIGITAL_OCEAN_DEFAULT_CONFIG","accessToken","size","DEFAULT_CLUSTER","sharedConfig","host","type","EC2","system","UBUNTU_20","hostTypeSpecific","databaseSizeGiB","dbEngine","MARIADB_10_7","settings","logs","generalLog","enabled","unmanaged","firewallRules","getInitialState","USER_CREATE_WIZARD_ACTION","publicPreloader","isPreloadDone","securePreloader","METRICS_ACTION","isUserCreateWizardOpen","CONNECTION_STATUS","SYSTEM_STATUS_ACTION","MetricsUtils","localStateMetrics","newLocalStateMetricRecords","forEach","joinedNodesPerClusterRecord","value","DONOR","JOINED","SYNCED","isMonitorEnabled","wsrepLastCommittedMetrics","wsrepLocalStateMetrics","joinedNodes","VERSION_ACTION","backendConnectionStatus","ONLINE","influxDBConnectionStatus","wsConnectionStatus","OFFLINE","rootReducer","combineReducers","preloader","state","action","PRELOAD_SUCCESS","PRELOAD_FAILED","errorMsg","payload","PRELOAD","console","log","auth","LOGIN","LOGIN_SUCCESS","loginErrorMsg","undefined","userData","LOGIN_FAILED","LOGOUT","LOGOUT_SUCCESS","LOGOUT_FAILED","logoutErrorMsg","FETCH_JWT_SUCCESS","jwtAccessToken","jwtTokenData","jwtAccessTokenErrorMsg","FETCH_JWT_FAILED","GET_SUCCESS","getErrorMsg","arrayToMap","GET_FAILED","SAVE","SAVE_SUCCESS","saveErrorMsg","SAVE_FAILED","snackbar","SHOW","showAction","HIDE","userList","LIST_FETCH_SUCCEEDED","clusterList","LIST_FETCH_SUCCEDED","DELETE_SUCCEDED","filter","clusterName","nodeList","clusterID","hostList","jobMonitor","BOOT_DONE","SET_RUNNING_JOBS","jobs","jobTracking","includes","ADD_RUNNING_JOB","REMOVE_RUNNING_JOB","jobId","TRACK","UNTRACK","CONSOLIDATE_TRACKED_JOBS","existingTrackedJob","find","compareStatuses","push","getJobTracking","SET_TRACKED_JOB","map","REMOVE_TRACKED_JOB","clusterCreateWizard","nodeCreateWizard","userCreateWizard","metrics","START_MONITOR","STOP_MONITOR","FETCH_WSREP_LOCAL_STATE_METRICS_SUCCESS","toRecord","countJoinedNodes","FETCH_WSREP_LAST_COMMITTED_METRICS_SUCCESS","systemStatus","BACKEND_SET_ONLINE","BACKEND_SET_WEAK","WEAK","BACKEND_SET_OFFLINE","INFLUXDB_SET_ONLINE","INFLUXDB_SET_WEAK","INFLUXDB_SET_OFFLINE","WS_SET_ONLINE","WS_SET_OFFLINE","versionInfo","version","clusterListFetchRequested","LIST_FETCH_REQUESTED","clusterListFetchSucceeded","AppEnvironment","process","REACT_APP_API_PROTOCOL","REACT_APP_SERVER_ADDRESS","getApiProtocol","REACT_APP_API_PORT","location","origin","REACT_APP_API_VERSION","getApiAddress","replace","APIUtils","getApiVersion","endpoint","e","response","parseJSONAPIError","message","errorResponse","data","errors","error","detail","join","statusText","ENDPOINT","ClustersAPI","Axios","get","getUrl","clustersResponse","deserializedData","item","deattribute","Error","APIErrorResponseHandler","serialise","post","createdCluster","jobInfo","force","clusterId","attributes","dbRootPassword","password","onlyRecord","user","fetchClusterList","deleteCluster","ClusterSideEffects","call","fetchList","put","takeLatest","takeEvery","DELETE_REQUESTED","hostListFetchRequested","hostListFetchSucceeded","CLUSTERS_ENDPOINT","HOSTS_ENDPOINT","NODES_ENDPOINT","HostsAPI","getBaseURL","hostsResponse","axios","hostData","address","port","privateKey","ssh","db","engine","MARIADB_10_5","rootPassword","fetchHostList","HostSideEffects","NodesAPI","nodesResponse","createdNode","nodeID","logSettings","path","nodeListFetchRequested","nodeListFetchSucceeded","fetchNodeList","createNode","NodeSideEffects","create","CREATE_SUCCEEDED","CREATE_REQUESTED","loginSuccess","logout","logoutSuccess","LoginComponent","props","handleClick","event","preventDefault","login","credentials","classes","Grid","container","alignItems","alignContent","direction","className","logo","src","alt","formGridItem","Card","formContainer","onSubmit","CardContent","Typography","variant","align","spacing","TextField","fullWidth","margin","autoComplete","label","onChange","setState","target","inputProps","color","CardActions","Button","disabled","CircularProgress","loginLoader","React","Component","withStyles","theme","createStyles","height","breakpoints","down","width","marginRight","withTheme","connect","dispatch","versionInfoSelector","useStyles","makeStyles","paper","maxWidth","marginBottom","padding","up","paddingLeft","paddingRight","paddingBottom","logoAndTitleContainer","display","justifyContent","flexWrap","marginTop","logoContainer","minWidth","titleAndVersion","flexDirection","paddingTop","marginLeft","palette","grey","lineHeight","textAlign","paragraph","link","latestChanges","seeChangesBtn","changelogDiv","fontSize","fontWeight","useState","changelogText","setChangelogText","activeTab","setActiveTab","lastChanges","slice","indexOf","a11yProps","index","useEffect","fetch","then","text","parsedText","parseText","replaceAll","aboutPage","Box","component","Link","href","dangerouslySetInnerHTML","__html","onClick","changelogPage","Paper","sx","borderBottom","borderColor","Tabs","newValue","Tab","clusterCreateWizardShow","showSnackbar","nodeCreateWizardShow","ClusterUtils","MONITORED","UNMANAGED","MANAGED","HYBRID","HostUtils","deploymentStatus","PENDING","warn","UNKNOWN","getHostSystemEnum","CENTOS_7","CENTOS_8","REDHAT_8","UBUNTU_18","DEBIAN_10","DEBIAN_11","getHostTypeEnum","getHostTypeSpecificDefaults","hostType","DIGITAL_OCEAN","styles","root","INPUT_VARIANT","DbEngineConfigEditor","readOnly","inheritedConfig","subtitleText","isDialogOpen","onClose","onConfirm","isDisabled","isInherited","dialogContentRender","DialogTitle","DialogContent","DialogContentText","autoFocus","multiline","rows","maxRows","helperText","style","fontFamily","spellCheck","autoCorrect","autoCapitalize","DialogActions","Tooltip","disableHoverListener","disableFocusListener","disableTouchListener","Dialog","scroll","fullScreen","PureComponent","DbEngineConfigButtonComponent","onItemClick","editorConfig","isEditorOpen","onRemoveClick","isNotEmpty","isConfigInherited","ListItemComponent","ListItem","List","button","ListItemAvatar","Avatar","backgroundColor","primary","main","Settings","ListItemText","secondary","ListItemSecondaryAction","IconButton","edge","Delete","DbEngineConfigEditorComponent","RegionSelectComponent","options","helperMsg","setHelperMsg","isError","setIsError","FormControl","required","onInvalid","form","validationMessage","InputLabel","htmlFor","Select","displayEmpty","renderValue","regionSlug","length","MenuItem","available","slug","FormHelperText","SizeOptionComponent","opacity","vcpus","memory","disk","price_monthly","SizeSelectComponent","availableOptions","sizeSlug","categoryName","sizes","ListSubheader","toUpperCase","DigitalOceanUtils","categorizedSizes","sort","size1","size2","description","toLowerCase","localeCompare","sizesInCategory","category","isAccessTokenVerified","isLoading","LoadingAdornment","InputAdornment","tooltipTitle","VerifiedAdornment","VerifiedUser","DigitalOceanAPI","token","abortController","Promise","resolve","reject","a","headers","authorization","signal","account","dots","createApiClient","listRegions","page","per_page","regions","listSizes","DigitalOceanConfigComponent","_accessTokenObservable","_tokenVerifyAbortController","BehaviorSubject","isValid","isTokenVerified","isTokenVerifying","isTokenError","areRegionsLoading","areSizesLoading","allSizes","pipe","tap","tokenMsg","debounceTime","subscribe","verifyToken","unsubscribe","cancelAsyncRequests","prevProps","prevState","snapshot","onValidationChange","abort","AbortController","email","getRegions","getAllSizes","fetchRegions","region1","region2","checkSelectedRegion","regionMsg","availableSizes","updatedConfig","fetchAllSizes","sizesMap","convertSizesToMap","sizeMsg","isSubmitClicked","xs","maxLength","next","InputProps","endAdornment","getSelectFieldMessage","selectedRegionSlug","selectedRegion","r","isSelectedSizeSupported","selectedSizeSlug","AWSUtils","accessKeyId","client","EC2Client","DescribeRegionsCommand","AllRegions","availableRegions","send","destroy","Regions","b","RegionName","defaultRegion","fetchInstanceTypes","DescribeInstanceTypesCommand","availableInstanceTypes","InstanceTypes","nextToken","NextToken","fetchNextInstanceTypes","nextData","InstanceType","class1","split","class2","vcpu1","VCpuInfo","DefaultVCpus","vcpu2","MemoryInfo","SizeInMiB","EC2ConfigComponent","ec2CredentialsVerificationTimeout","formValidation","areAwsCredentialsVerified","areAwsCredentialsBeingVerified","areAvailableInstanceTypesLoading","fetchEC2Data","clearTimeout","setTimeout","ec2Regions","fetchAvailableRegions","awsAccessKeyID","isInvalid","awsSecretAccessKey","ec2InstanceTypes","fetchAvailableInstanceTypes","requirements","field","awsEC2Region","some","instance","awsEC2InstanceType","OptInStatus","isX86","ProcessorInfo","SupportedArchitectures","notEnoughRAM","minRAM","disableReason","dense","ipAddrFieldProps","guide","mask","result","chunks","chunk","fill","endsWith","parts","part","IPAddressField","inputRef","other","CONNECTION_TEST_STATUS","FirewallRulesEditorComponent","isAddRuleDialogOpen","newRule","rule","ranges","protocol","descriptionErrorMessage","portErrorMessage","rangesErrorMessage","maskErrorMessage","openDialog","closeDialog","closeAddRuleDialog","addRule","onAdd","rulesCount","isThereCustom22","isThereCustom3306","isThereCustom33060","renderDialogContent","subheader","Security","activeRuleAvatar","renderRuleItem","inherited","onRemove","renderAddNewRuleDialog","stopPropagation","ip","isIp","sm","persist","setCustomValidity","labelId","onFocus","select","min","max","cidr","newIP","inputComponent","newMask","reason","PasswordField","isPasswordVisible","isReadOnly","OutlinedInput","enterDelay","placement","navigator","clipboard","writeText","err","onMouseDown","Visibility","VisibilityOff","SSHKeysEditor","isPopoverOpen","popoverAnchorEl","popoverContent","addNewKey","expandedKeys","authorizedKeys","inheritedAuthorizedKeys","uniqueKeys","key","array","onPublicKeyChanged","parseKey","clusterType","sshTestStatus","keysCount","inheritedKeysCount","publicKey","renderKeyItem","VpnKey","comment","Collapse","in","Popover","anchorEl","anchorOrigin","vertical","horizontal","transformOrigin","ERROR","ErrorOutline","HelpOutline","renderStatusIcon","wordBreak","Config","_jtw_public_token","_influx_protocol","_influx_host","_influx_port","_influx_username","_influx_password","_influx_db","_gui_version","_gmd_version","_app_version","_public_version","_support_matrix","_support_matrix_ec2","_support_matrix_digitalocean","SupportMatrix","hostSystem","cloudProvider","getSupportMatrix","supportMatrixSystem","supportMatrix","isSupported","dbEngines","supportMatrixDbEngine","deprecated","support_matrix_ec2","support_matrix_digitalocean","support_matrix","getSupportedDbEngines","allDbEngines","Set","getSupportedHostSystems","wrapper","fieldWrapper","primaryTitle","secondaryTitle","FormTitle","isFormTitle","NodeUtils","getNodeDbEngineEnum","MARIADB_10_3","MARIADB_10_4","MARIADB_10_6","MYSQL_5_7","MYSQL_8_0","DbEngineFieldComponent","Object","isDbSupportedOnSystem","isDbDeprecated","HostSystemFieldComponent","isSystemSupported","isSystemSupportedByDb","isSystemDeprecated","ClusterFormComponent","validate","isDeploymentConfigValid","getClusterType","showDBRootPassword","showCloudProvider","showDigitalOcean","showMaxDBSize","showSSHKey","checkValidity","userConfig","deletedKey","filteredKeys","removedRule","addedRule","selectedCloudProvider","defaultHostTypeSpecificConfig","ec2Config","untrackJob","setTrackedJob","JobsService","appStore","getState","trackingStartTimestamp","moment","processJobStatus","subtract","isBefore","checkIfDesktop","innerWidth","GMDialogService","_alertDialog","Subject","_confirmDialog","getInstance","content","ClusterCreateDialogComponent","hideWizard","clusterCreateWizardHide","resetState","setFormIsChangedToTrue","formIsChanged","onClusterTypeSelected","activeStep","getDefaultState","inProgress","hasErrorHappened","errorMessage","addedPublicKeysCheckbox","step","showConfirm","confirmText","declineText","time","timeEnd","trackJob","details","stepper","Stepper","stepperRoot","Step","StepLabel","cancelAddClusterButton","onCloseAttempt","wizardButtons","buttonLoader","flexGrow","clusterTypeSelectionStep","paperContainer","typeSelectionPaper","manageBox","borderTopRightRadius","manageIcon","manageText","borderBottomRightRadius","monitorBox","monitorIcon","monitorText","configureStep","createCluster","finishStep","copyKeyIcon","FormControlLabel","control","Checkbox","checked","dialogContent","px","pb","isDesktop","cursor","border","dark","withRouter","JobsApi","params","jobsResponse","job_ids","pageSize","hostID","cancelToken","list","totalCount","total","JobStatusComponent","jobStatus","play","iterationCount","duration","keyframes","statusSuccess","renderJobStatus","background","borderRadius","JobErrorDetails","formattedYaml","language","wrapLongLines","vs2015","customStyle","SyntaxHighlighter","registerLanguage","yaml","listItem","consoleIcon","avatar","miniAvatar","first","firstType","textTransform","firstName","second","collapsibleItem","openCloseIcon","buttonContainer","showDetailsBtn","copyIconBtn","icon","require","createdAt","setIsOpen","isYamlOpen","setIsYamlOpen","lookForWrapped","setLookForWrapped","jobType","node_name","host_name","getJobType","cluster_name","getName","DeviceHub","getAvatar","msgList","createIconElement","childNumber","iconLeftMargin","SubdirectoryArrowRight","checkIfHasWrapped","wrapped","dump","flowLevel","ListItemButton","md","format","fromNow","KeyboardArrowUp","KeyboardArrowDown","timeout","unmountOnExit","Alert","severity","AlertTitle","Divider","runningJobsCountSelector","nodeId","hostId","matchesCluster","cluster_id","matchesNode","node_id","matchesHost","host_id","jobsToTrackSelector","JobListComponent","isComponentMounted","cancelTokenSource","loadJobs","newCurrentPage","newPageSize","currentPage","cancel","CancelToken","source","showSkeleton","fetchPaginatedList","jobsAreRunning","runningJobsCount","tablePagination","TablePagination","count","onPageChange","newPage","rowsPerPage","onRowsPerPageChange","Skeleton","Icon","DoneAll","ChartMessage","overlay","top","left","right","bottom","zIndex","DEFAULT_REFRESH_INTERVAL","DEFAULT_PERIOD","DEFAULT_AGGREGATION","LiveValueComponent","_isMounted","_scheduledFetch","_cancelRequest","rawValues","prevHostNames","traces","trace","hostNames","shouldFetchAsyncData","differential","refreshInterval","shouldClearExistingData","clearAsyncRequests","fetchData","influx_host","influx_port","influx_password","influx_protocol","username","influx_username","influx_db","url","q","valueOf","c","results","series","tags","isCancel","liveValue","isNaN","Math","round","Number","EPSILON","rawValueRaw","rawValue","line","overflow","LOG_FETCH_PAGE_SIZE","DEFAULT_COLORS","ChartUtils","dateRange","buildQuery","promise","nodeName","buildWhereStatement","toMillis","to","getGroupSeconds","diffInSeconds","toSeconds","ceil","mode","hoverinfo","connectgaps","row","timestamp","Date","scatter","lastRequestTimestamp","now","DateTime","msUntilNextRequest","isThereAnyData","dragToMove","axisRange","getPeriodStartDate","plus","hours","dateTime","fromFormat","amount","substring","minus","minutes","days","PlotComponent","createPlotlyComponent","Plotly","TimeSeriesChartComponent","_requestAbortController","_windowSizeObservable","_lastRequestTimestamp","_zoomRange","_isAutoFetching","isCancelled","getDateRange","parseData","getRemainingIntervalTime","fromEvent","forceUpdate","isEqual","nextProps","nextState","nextContext","didPropsChange","didDataChange","didStateChange","measurementUnit","getMeasurementUnit","getMessage","xAxisRange","yAxisRange","trace1","trace2","spikedistance","hoverdistance","font","autosize","t","l","showlegend","yaxis","rangemode","range","xaxis","showticklabels","linecolor","toISO","onRelayout","newZoomRange","isString","parsePlotlyDateTime","displayModeBar","scrollZoom","progress","progressFadeIn","transition","progressFadeOut","AVAILABLE_METRICS","ref","components","Control","children","innerProps","innerRef","selectProps","TextFieldProps","input","Menu","square","NoOptionsMessage","noOptionsMessage","Option","selected","isFocused","ListItemIcon","startsWith","primaryTypographyProps","noWrap","secondaryTypographyProps","Placeholder","placeholder","SingleValue","singleValue","ValueContainer","valueContainer","MenuList","rowCount","childrenCount","calculateHeight","rowRenderer","param","Autocomplete","createFilter","stringify","obj","selectStyles","base","selectedMetric","inputId","InputLabelProps","shrink","selectedValue","onChanged","getOptionLabel","option","filterOption","flex","chip","chipFocused","emphasize","divider","AddElement","chart","ButtonGroup","parseFloat","containerWidth","containerHeight","disableRender","onCancelClick","onAddClick","autocomplete","ChartActionsComponent","Close","formControl","selectOption","minHeight","dashboardGetSuccess","dashboardSaveSuccess","dashboardsSelector","dashboardSelector","dashboardName","getDefaultConfiguration","dashboardSaveInProgressSelector","dashboardSaveErrorMsgSelector","DashboardComponent","dragInProgress","isAddElementDialogOpen","isEditEnabled","elementResizeDetector","elementResizeDetectorMaker","strategy","monitoringPageContainer","document","getElementById","listenTo","element","offsetWidth","discardChanges","temporaryDashboard","saveDashboard","menuTarget","storedDashboard","moreMenu","MoreVert","Boolean","SMALL","onConfigChanged","LARGE","file","Blob","JSON","createElement","URL","createObjectURL","download","click","remove","newChart","uuid","toolbar","selectMenu","verticalCompact","compactType","isDraggable","isResizable","coordinates","getCoordinates","cols","onLayoutChange","changed","updatedCharts","chartLayout","newPosition","getChartPosition","onDragStart","onDragStop","getDashboardName","isSaveInProgress","dashboardSave","BlinkingBadge","badge","animation","transform","Badge","flexContainer","boxSizing","tableRow","tableRowHover","tableCell","textOverflow","whiteSpace","noClick","logContent","logMessagesTypography","galeraManagerLogMessage","logInfoTypography","warningLog","warning","errorLog","expansionPanelExpanded","LogMessage","logLine","_logLineHash","showNodeName","body2","fpath","LogViewerService","InfluxDB","database","logPaths","where","logPath","Expression","equals","toString","or","and","resultLine","objectHash","dateISOString","buildWhereStatementPaths","lt","toISOString","getInfluxInstance","query","transformResponse","date","gt","Utils","arrayLength","stringLength","String","fromCharCode","random","toNanoDate","arg","acc","val","assign","LogViewer","autoRefreshTimeout","DEFAULT_STATE","hasMessagesBefore","hasMessagesAfter","isLoadingMessagesBefore","isLoadingMessagesAfter","isLoadingLogPaths","availableLogs","selectedLogs","onScroll","scrollTop","clientHeight","scrollHeight","loadLogMessages","toNanoISOString","stopAutoRefresh","isScrolledToBottom","abs","startAutoRefresh","hasClusterChanged","hasNodeChanged","hasHostChanged","hasStateChanged","loadLogPaths","hasDateChanged","hasSelectedLogsChanged","fetchPaths","res","distinct","autoRefresh","logContentElement","querySelector","firstLogMessage","querySelectorAll","firstElementInitialOffset","offsetTop","fetchBefore","wasLogEmpty","reverse","scrollTo","fetchAfter","toDate","_md5hash","infoLogMessage","infoElementInitialOffset","isEmpty","Accordion","expanded","AccordionSummary","expandIcon","ExpandMore","AccordionDetails","selectedLogPath","isMonitorEnabledSelector","makeJoinedNodesSelector","createSelector","metricsStore","ClusterManagerComponent","onRecoverClick","recover","onDeleteClick","destructiveConfirm","pathname","history","reloadClusters","onAddNodeClick","onMoreClick","currentTarget","onMenuClose","committedTransactions","hasRunningJobs","disableRecover","nodes","card","CardHeader","SettingsBackupRestore","DeleteForever","noPaddingCardContent","makeClusterSelector","match","committedTransactionsSelector","lastCommitted","nodeListSelector","nodeMap","hostListSelector","hostMap","clusterSelector","hasRunningJobsSelector","jobList","joinedNodesSelector","reloadNodes","reloadHosts","HostFormComponent","minLength","segment","HostStateComponent","hostState","renderHostState","HostLogTable","getRowClassName","onRowClick","clsx","cellRenderer","cellData","columnIndex","TableCell","headerRenderer","headerHeight","numeric","tableProps","scrollToIndex","rowClassName","dataKey","headerProps","defaultProps","LogsApi","HostManagerComponent","getLogs","fetchHostLog","splitLogs","contents","parse","getHostState","rowGetter","hostSelector","DeploymentLogMessage","trim","padEnd","renderLine","AuthAPI","verifyJwtToken","access","jwt","verify","jtw_public_token","setInfluxDBOffline","WsHandlerClass","connection","hostLogSubscriptions","SEND_RETRIES","SEND_RETRY_TIMEOUT","isConnected","info","WebSocket","getWsHostAddress","onopen","authenticate","onclose","onerror","onmessage","handleLogMessages","handleJobsMessages","close","readyState","OPEN","refreshWsAccessToken","sendMsg","attempt","CLOSED","CONNECTING","CLOSING","subscriptionStr","has","observable","jobUpdate","subscriptionValue","WSHandler","NodeDeploymentMonitorComponent","bottomElement","showLog","isSubscribedToLogs","lastLogMsg","autoScrollToBottom","deploymentJob","$log","subscribeToLogs","bufferTime","newLogs","splice","unsubscribeFromLogs","scrollToBottom","scrollIntoView","getTooltipText","stepType","stepStatus","retText","HOST_DEPLOY","NODE_INSTALL","NODE_START","CANCELLED","DONE","FAILED","renderStepIndicators","steps","step1","step2","isDone","CancelOutlined","jobCancelledIcon","jobPendingIcon","PlayCircleOutline","jobRunningIcon","jobErrorIcon","Done","jobDoneIcon","lastLogText","dialogTitle","Switch","labelPlacement","closeButton","el","actions","logsTypography","hostStderrMessage","NodeFormComponent","isCloudAccessVerified","onHostNameChange","onHostChange","onNodeChange","multipleDeploymentMode","isNodeNameLinkEnabled","hostName","nodeNames","onToggleGeneralLog","sshAddress","sshPort","nodeNamesSelector","hostNamesSelector","ConnectionTestUtils","getStatusMessage","READY","InfoOutlined","renderNotReadyIcon","Info","parseMysqladminMessage","TABS","ConnectionTestComponent","sshConnectionStatus","dbConnectionStatus","updateDBRootPasswordStatus","isDBAccessDenied","updateDBRootPasswordMessage","onTestClick","testDBConnection","onSSHStatusChange","onDBStatusChange","newDBRootPassword","sshConnectionError","dbConnectionError","testSSHConnection","successJob","parsedMysqladminMessage","updateDBRootPassword","changeDBRootPassword","onDBRootPasswordUpdate","isAddressEntered","isDBRootPasswordEntered","isCloseButtonDisabled","isRunButtonDisabled","sshConnectionMsg","dbConnectionMsg","FormWrapper","NodeDeploymentDialogComponent","nodeDefaults","hostDefaults","dbTestStatus","deploymentType","nodesToDeploy","startNodeAfterDeployment","isDeploymentDone","deploymentJobs","generateSteps","hostJob","installNode","nodeJob","startNode","every","start","deploy","initiateBulkDeployment","suffixes","generateRandomStringArray","hosts","nodeCreateWizardHide","isDeployDisabled","step1Content","checkboxCenter","step1Actions","step2Content","step2Actions","NodeStateComponent","nodeState","UNDEFINED","JOINER","stateOk","stateError","MAX","DOWN","renderNodeState","NodeManagerComponent","channelType","onStartClick","onStopClick","stop","onShowLogsClick","onOpenSSHTerminal","onMoreMenuClose","isEnabled","JOBS","toggleGeneralLog","handleCopyDeploymentLogsClick","copyJSON","isLogCopied","MONITORING","hasNodeSwitched","hasNodeUpdated","PlayArrow","Stop","LOGS","CONFIGURATION","copyDeploymentLogsBtn","makeNodeSelector","nodeSelector","privateKeyPassword","nodeStateSelector","localStateMetric","nested","clusterElement","borderTop","strayHostsSubheader","badgeHelpIcon","common","white","alertStyle","clusterItemAvatar","clusterItemAvatarIcon","sharedStyles","nestedTreeViewItem","doubleNestedTreeViewItem","mergedStyles","mergeStyles","pulsating","NodeItemComponent","isSelected","onRouteChanged","metricsRecord","SegmentItemComponent","handleExpandClick","isExpanded","filteredNodeList","Layers","ExpandLess","disablePadding","node1","node2","makeFilteredNodeListSelector","filteredNodeListSelector","nodeIDs","hostIDs","StrayHostItemComponent","badgeQuestionMark","overlap","badgeContent","Help","ClusterItemComponent","onExpandClick","isClusterOpen","isNodeOpen","filteredHostList","unusedHosts","segments","add","getSegments","addNodeItem","AddCircleOutline","strayHostSentence","alertInsideCluster","disableTypography","inset","host1","host2","filteredHostListSelector","unusedHostsSelector","NoClusterItemComponent","TreeViewComponent","cluster1","cluster2","clusterCreateDialogShow","SystemLogMessage","level","SystemLogComponent","fetchLogFile","fetchGMSystemLog","UserFormComponent","usernameError","passwordError","hasUserChanged","role","NONE","OBSERVER","MANAGER","ADMINISTRATOR","UsersApi","sUser","newUser","userListFetchRequested","userListFetchSucceeded","UserCreateWizardComponent","isCreating","reloadUserList","hide","userForm","userCreatedMessage","test","UserUtils","userRole","UserListComponent","Person","getRoleName","userCreateWizardShow","UserManagerComponent","userSelector","userName","drawerMiniWidth","sidebar","drawerPaper","drawerPaperClosed","sidebarItem","sidebarItemVisited","sidebarItemBtn","sidebarItemIcon","sidebarItemIconVisited","sidebarText","sidebarTextVisited","black","tooltip","useHistory","isDrawerOpen","logoutBtn","handleCloseMobileSidebar","SupervisorAccount","ExitToApp","getIcon","useLocation","indexChar","isCurrentlyVisited","logOut","arrow","mr","Sidebar","useMediaQuery","mobileOpen","handleDrawerToggle","drawerVariant","drawerOpen","Drawer","navbarStatus","tooltipStatus","indicatorGreen","indicatorWeak","indicatorError","space","ConnectionStatusComp","useSelector","mainStatus","getIndicatorClass","circleMain","mainStatusComponent","PreloaderComponentHtml","SecurePreloader","RootComponent","localStorage","setItem","showBackButton","updateDimensions","bind","sidebarStatus","getItem","addEventListener","updateShowBackButton","removeEventListener","isNodeDeploymentWizardOpen","mainPaddingLeft","CssBaseline","AppBar","appBar","Toolbar","menuButton","goBack","ArrowBack","exact","UserCreateWizard","AboutPage","publicPreloadFailed","PublicPreloader","preloadRequested","AppInfo","appInfo","createBrowserHistory","basename","GMRouter","Login","LongPress","triggerDelay","mouseDownTimestamp","isMouseDown","mouseUpTimestamp","mouseEnterTimestamp","isMouseOn","mouseLeaveTimestamp","_activeTime","getTime","upTime","activeTime","onTarget","downTime","offTime","onTime","GMDialog","messages","longPress","show","confirm","dialogType","confirmDialogContent","alertDialog","dialog","confirmDialog","onMouseUp","mouseUpTriggered","holdToConfirmButton","mouseDownTriggered","onMouseEnter","mouseEnterTriggered","onMouseLeave","mouseLeaveTriggered","backgroundSize","backgroundPosition","SnackbarSideEffects","args","GMSnackbar","Snackbar","ClickAwayListenerProps","mouseEvent","autoHideDuration","hideSnackbar","ContentProps","fetchUserList","UserSideEffects","fetchWsrepLocalStateMetricsSuccess","bootAuthCheckSideEffect","loginSideEffect","authSuccessfulSideEffect","logoutSideEffect","logoutSuccessSideEffect","AuthSideEffects","getMe","currentUser","BOOT_CHECK","DashboardsApi","currentUserID","DashboardSideEffects","mapToArray","save","initializeBackendMonitor","store","interceptors","use","initialize401ResponseHandler","shouldSkip","handleUnauthorized","keepaliveWs","startWS","runConsolidation","JobSideEffects","delay","fetchRunningJobList","runningJobs","runningJobsTracking","stopWS","disconnect","fetchFilteredJobList","trackedJobs","METRIC","MetricsApi","monitorLastCommitted","monitorLocalState","MetricsStoreSideEffects","monitor","startTime","endTime","WSREP_LAST_COMMITTED","WSREP_LOCAL_STATE","EnvAPI","SupportMatrixApi","cloud_provider","supportMatrixSystem1","supportMatrixSystem2","supportMatrixDb1","supportMatrixDb2","versionGetFailedAction","publicPreloadSideEffect","securePreloadSideEffect","securePreloadSuccessSideEffect","PreloaderSideEffects","fetchPublicKey","jwtPublicKeyResponse","app_version_response","clusterIndex","fetchSupportMatrix","fetchKey","influxUrlFetchResponse","fullUrl","influxUrl","hostname","defaultTheme","createTheme","MuiCardHeader","styleOverrides","MuiDivider","MuiButton","MuiFilledInput","MuiFormControl","MuiFormHelperText","MuiIconButton","MuiInputBase","MuiInputLabel","MuiListItem","MuiOutlinedInput","MuiFab","MuiTable","MuiTextField","MuiSelect","MuiToolbar","MuiTabs","indicatorColor","textColor","contrastText","sagaMiddleware","createSagaMiddleware","createStore","compose","applyMiddleware","__REDUX_DEVTOOLS_EXTENSION__","serialize","run","ReactDOM","render","ThemeProvider","serviceWorker","ready","registration","unregister"],"mappings":"iSAcYA,E,2BAAAA,K,6BAAAA,E,mBAAAA,E,mCAAAA,E,iCAAAA,E,qBAAAA,E,qCAAAA,E,uCAAAA,E,2BAAAA,E,2CAAAA,E,0CAAAA,M,KCZL,IAAMC,EAA0B,CACtCC,iBAAiB,EACjBC,aAAa,EACbC,cAAc,G,ICqBHC,EAMAC,E,kCANAD,K,WAAAA,E,YAAAA,E,YAAAA,M,cAMAC,K,UAAAA,E,6BAAAA,M,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R/0B,KAAM,WAEPld,QAAS,CACRkd,KAAM,cCpHW0xB,QACU,cAA7BpxC,OAAOiO,SAASyvD,UAEc,UAA7B19D,OAAOiO,SAASyvD,UAEhB19D,OAAOiO,SAASyvD,SAASvhB,MACxB,2DCMH,IZbuCse,GYajCyE,GAAiBC,eAEVxoC,GAAkByoC,YAC9Bx3D,GACAy3D,YACCC,YAAgBJ,IACdl/D,OAAeu/D,8BACfv/D,OAAeu/D,6BAA6B,CAAEC,WAAW,KAC1DH,MAIHH,GAAeO,IAAI3G,IACnBoG,GAAeO,IAAIjG,IACnB0F,GAAeO,IAAI7uD,IACnBsuD,GAAeO,IAAIxsD,IACnBisD,GAAeO,IAAIntD,IACnB4sD,GAAeO,IAAIvE,IACnBgE,GAAeO,IAAIzC,IACnBkC,GAAeO,IAAI1D,IACnBmD,GAAeO,IAAI1F,IACnBmF,GAAeO,IAAIpF,IZjClBO,GADsCH,GYoChB9jC,IZlCtB6jC,GAAyBC,IYoC1BiF,KAASC,OACR,eAAC,KAAD,CAAUlF,MAAO9jC,GAAjB,SACC,gBAACipC,EAAA,EAAD,CAAexpD,MAAOA,GAAtB,UACC,eAAC,GAAD,IACA,eAAC,GAAD,IACA,eAAC,GAAD,SAGFo6B,SAASC,eAAe,SDgFpB,kBAAmBjhB,WACtBA,UAAUqwC,cAAcC,MAAMnmD,MAAK,SAAComD,GACnCA,EAAaC,gBCzEf13D,QAAQC,IAAM,c","file":"static/js/main.7cecbaf5.chunk.js","sourcesContent":["import { User } from \"pages/users/types\";\nimport { Credentials, JwtData } from \"store/auth/types\";\n\nexport interface AuthState {\n\tisAuthenticated: boolean;\n\tisLoggingIn: boolean;\n\tloginErrorMsg?: string;\n\tisLoggingOut: boolean;\n\tlogoutErrorMsg?: string;\n\tuserData?: User;\n\tjwtAccessToken?: JwtData; // used only for WebSocket auth\n\tjwtAccessTokenErrorMsg?: string; // used only for WebSocket auth\n}\n\nexport enum AUTH_ACTION {\n\tBOOT_CHECK = \"AUTH/BOOT_CHECK\",\n\tLOGIN = \"AUTH/LOGIN\",\n\tLOGIN_SUCCESS = \"AUTH/LOGIN_SUCCESS\",\n\tLOGIN_FAILED = \"AUTH/LOGIN_FAILED\",\n\tLOGOUT = \"AUTH/LOGOUT\",\n\tLOGOUT_SUCCESS = \"AUTH/LOGOUT_SUCCESS\",\n\tLOGOUT_FAILED = \"AUTH/LOGOUT_SUCCESSFUL\",\n\tFETCH_JWT = \"AUTH/FETCH_JWT\",\n\tFETCH_JWT_SUCCESS = \"AUTH/FETCH_JWT_SUCCESS\",\n\tFETCH_JWT_FAILED = \"AUTH/FETCH_JWT_FAILED\"\n}\n\nexport interface AuthBootCheck {\n\ttype: AUTH_ACTION.BOOT_CHECK;\n}\n\nexport interface AuthLogin {\n\ttype: AUTH_ACTION.LOGIN;\n\tpayload: {\n\t\tcredentials: Credentials;\n\t};\n}\n\nexport interface AuthLoginSuccess {\n\ttype: AUTH_ACTION.LOGIN_SUCCESS;\n\tpayload: {\n\t\tuserData: User;\n\t};\n}\n\nexport interface AuthLoginFailed {\n\ttype: AUTH_ACTION.LOGIN_FAILED;\n\tpayload: {\n\t\terrorMsg: string;\n\t};\n}\n\nexport interface AuthLogout {\n\ttype: AUTH_ACTION.LOGOUT;\n}\n\nexport interface AuthLogoutSuccess {\n\ttype: AUTH_ACTION.LOGOUT_SUCCESS;\n}\n\nexport interface AuthLogoutFailed {\n\ttype: AUTH_ACTION.LOGOUT_FAILED;\n\tpayload: {\n\t\terrorMsg: string;\n\t};\n}\n\nexport interface AuthFetchJWT {\n\ttype: AUTH_ACTION.FETCH_JWT;\n}\n\nexport interface AuthFetchJWTSuccess {\n\ttype: AUTH_ACTION.FETCH_JWT_SUCCESS;\n\tpayload: {\n\t\tjwtTokenData: JwtData;\n\t};\n}\n\nexport interface AuthFetchJWTFailed {\n\ttype: AUTH_ACTION.FETCH_JWT_FAILED;\n\tpayload: {\n\t\terrorMsg: string;\n\t};\n}\n\nexport type AuthAction =\n\t| AuthBootCheck\n\t| AuthLogin\n\t| AuthLoginSuccess\n\t| AuthLoginFailed\n\t| AuthLogout\n\t| AuthLogoutSuccess\n\t| AuthLogoutFailed\n\t| AuthFetchJWT\n\t| AuthFetchJWTSuccess\n\t| AuthFetchJWTFailed;\n","import { AUTH_ACTION, AuthAction, AuthState } from \"store/auth/stateTypes\";\n\nexport const defaultState: AuthState = {\n\tisAuthenticated: false,\n\tisLoggingIn: false,\n\tisLoggingOut: false\n};\n\nexport function authReducer(\n\tstate: AuthState = defaultState,\n\taction: AuthAction\n): AuthState {\n\tswitch (action.type) {\n\t\tcase AUTH_ACTION.LOGIN:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tisLoggingIn: true\n\t\t\t};\n\n\t\tcase AUTH_ACTION.LOGIN_SUCCESS:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tisLoggingIn: false,\n\t\t\t\tisAuthenticated: true,\n\t\t\t\tloginErrorMsg: undefined,\n\t\t\t\tuserData: action.payload.userData\n\t\t\t};\n\n\t\tcase AUTH_ACTION.LOGIN_FAILED:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tisLoggingIn: false,\n\t\t\t\tloginErrorMsg: action.payload.errorMsg\n\t\t\t};\n\n\t\tcase AUTH_ACTION.LOGOUT:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tisLoggingOut: true\n\t\t\t};\n\n\t\tcase AUTH_ACTION.LOGOUT_SUCCESS:\n\t\t\treturn defaultState;\n\n\t\tcase AUTH_ACTION.LOGOUT_FAILED:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tisLoggingOut: false,\n\t\t\t\tlogoutErrorMsg: action.payload.errorMsg\n\t\t\t};\n\n\t\tcase AUTH_ACTION.FETCH_JWT_SUCCESS:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tjwtAccessToken: action.payload.jwtTokenData,\n\t\t\t\tjwtAccessTokenErrorMsg: undefined\n\t\t\t};\n\n\t\tcase AUTH_ACTION.FETCH_JWT_FAILED:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tjwtAccessTokenErrorMsg: action.payload.errorMsg\n\t\t\t}\n\n\t\tdefault:\n\t\t\treturn state;\n\t}\n}\n","import { ChartMetric } from \"components/monitoring/charts/const\";\n\nexport interface Chart {\n\tid: string;\n\ttitle: string;\n\tmetric: ChartMetric;\n\tposition: number;\n\t// resolution: string;\n\taggregation: AGGREGATION;\n\tunit?: string;\n\tdataScaling?: number;\n\tyAxisMax?: number;\n}\n\nexport interface Dashboard {\n\tname: string;\n\tconfig: DashboardConfig;\n}\n\nexport interface DashboardConfig {\n\tcharts: Chart[];\n\ttileSize: DASHBOARD_TILE_SIZE;\n\t// refreshInterval: number;\n\tperiod: string;\n}\n\nexport enum DASHBOARD_TILE_SIZE {\n\t\"SMALL\" = \"sm\",\n\t\"MEDIUM\" = \"md\",\n\t\"LARGE\" = \"lg\"\n}\n\nexport enum AGGREGATION {\n\tRAW = \"raw\",\n\tDIFFERENTIAL = \"differential\"\n}\n","import {\n\tAGGREGATION,\n\tDashboard,\n\tDASHBOARD_TILE_SIZE\n} from \"components/monitoring/dashboard/types\";\n\nexport const DEFAULT_DASHBOARD_CONFIG: Dashboard = {\n\tname: \"\",\n\tconfig: {\n\t\tcharts: [\n\t\t\t{\n\t\t\t\tid: \"301186ce-7b7f-41bb-a457-60696aeabba8\",\n\t\t\t\ttitle: \"wsrep_received\",\n\t\t\t\tmetric: {\n\t\t\t\t\tname: \"wsrep_received\",\n\t\t\t\t\ttable: \"mysql\"\n\t\t\t\t},\n\t\t\t\tposition: 3,\n\t\t\t\taggregation: AGGREGATION.DIFFERENTIAL,\n\t\t\t\tunit: \"tx\",\n\t\t\t\tdataScaling: 1\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"8c24b48d-e6f5-4d29-9e66-58f4774e0480\",\n\t\t\t\ttitle: \"wsrep_replicated\",\n\t\t\t\tmetric: {\n\t\t\t\t\tname: \"wsrep_replicated\",\n\t\t\t\t\ttable: \"mysql\"\n\t\t\t\t},\n\t\t\t\tposition: 2,\n\t\t\t\taggregation: AGGREGATION.DIFFERENTIAL,\n\t\t\t\tunit: \"tx\",\n\t\t\t\tdataScaling: 1\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"bbc94d8f-44cf-4764-8b8e-0eeca2f648a2\",\n\t\t\t\ttitle: \"cpu\",\n\t\t\t\tmetric: {\n\t\t\t\t\tname: \"cpu_usage\",\n\t\t\t\t\ttable: \"procstat\"\n\t\t\t\t},\n\t\t\t\tposition: 0,\n\t\t\t\taggregation: AGGREGATION.RAW,\n\t\t\t\tunit: \"%\",\n\t\t\t\tdataScaling: 1,\n\t\t\t\tyAxisMax: 100\n\t\t\t},\n\t\t\t// {\n\t\t\t// \tid: \"8325c2b0-c35a-4735-9def-bf2e4dcb3d30\",\n\t\t\t// \tname: \"host_memory_MemAvailable_bytes\",\n\t\t\t// \tmetric: \"node_memory_MemAvailable_bytes\",\n\t\t\t// \tposition: 1,\n\t\t\t// \tresolution: \"5s\",\n\t\t\t// \taggregation: AGGREGATION.RAW\n\t\t\t// },\n\t\t\t{\n\t\t\t\tid: \"0517a725-4988-4011-91f0-c77202346bea\",\n\t\t\t\ttitle: \"wsrep_flow_control_sent\",\n\t\t\t\tmetric: {\n\t\t\t\t\tname: \"wsrep_flow_control_sent\",\n\t\t\t\t\ttable: \"mysql\"\n\t\t\t\t},\n\t\t\t\tposition: 4,\n\t\t\t\taggregation: AGGREGATION.DIFFERENTIAL,\n\t\t\t\tunit: \"\",\n\t\t\t\tdataScaling: 1\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"a0e25085-19e3-4b4b-b6f4-8285f5bd2e65\",\n\t\t\t\ttitle: \"wsrep_flow_control_paused\",\n\t\t\t\tmetric: {\n\t\t\t\t\tname: \"wsrep_flow_control_paused\",\n\t\t\t\t\ttable: \"mysql\"\n\t\t\t\t},\n\t\t\t\tposition: 5,\n\t\t\t\taggregation: AGGREGATION.DIFFERENTIAL,\n\t\t\t\tunit: \"\",\n\t\t\t\tdataScaling: 1\n\t\t\t}\n\t\t],\n\t\ttileSize: DASHBOARD_TILE_SIZE.MEDIUM,\n\t\tperiod: \"15m\"\n\t}\n};\n\nexport const DASHBOARD_PERIOD_SELECT_OPTIONS = [\n\t\"5m\",\n\t\"15m\",\n\t\"30m\",\n\t\"1h\",\n\t\"3h\",\n\t\"6h\",\n\t\"12h\",\n\t\"1d\",\n\t\"7d\",\n\t\"30d\"\n];\n// export const DASHBOARD_RESOLUTION_SELECT_OPTIONS = [\n// \t\"1s\",\n// \t\"5s\",\n// \t\"15s\",\n// \t\"30s\",\n// \t\"1m\",\n// \t\"5m\",\n// \t\"30m\",\n// \t\"1h\"\n// ];\n// export const DASHBOARD_REFRESH_RATE_SELECT_OPTIONS = [\n// \t{ label: \"1s\", value: 1000 },\n// \t{ label: \"5s\", value: 5000 },\n// \t{ label: \"15s\", value: 15000 },\n// \t{ label: \"30s\", value: 30000 },\n// \t{ label: \"1m\", value: 60000 }\n// ];\n\n// top offset to the charts area\nexport const DASHBOARD_CHARTS_TOP_OFFSET = 270;\nexport const DASHBOARD_NO_OF_COLUMNS = {\n\tSM: 3,\n\tMD: 2,\n\tLG: 1\n};\nexport const DASHBOARD_NO_OF_ROWS = {\n\tSM: 4,\n\tMD: 3,\n\tLG: 2\n};\n","import { Dashboard } from \"components/monitoring/dashboard/types\";\n\nexport interface DashboardState {\n\tdashboards: Map;\n\tsaveInProgress: boolean;\n\tgetErrorMsg?: string;\n\tsaveErrorMsg?: string;\n}\n\nexport enum DASHBOARD_ACTION {\n\tGET = \"DASHBOARD/GET\",\n\tGET_SUCCESS = \"DASHBOARD/GET_SUCCESS\",\n\tGET_FAILED = \"DASHBOARD/GET_FAILED\",\n\tSAVE = \"DASHBOARD/SAVE\",\n\tSAVE_SUCCESS = \"DASHBOARD/SAVE_SUCCESS\",\n\tSAVE_FAILED = \"DASHBOARD/SAVE_FAILED\"\n}\n\nexport interface DashboardGetAction {\n\ttype: DASHBOARD_ACTION.GET;\n}\n\nexport interface DashboardGetSuccessAction {\n\ttype: DASHBOARD_ACTION.GET_SUCCESS;\n\tpayload: {\n\t\tdashboards: Dashboard[];\n\t};\n}\n\nexport interface DashboardGetFailedAction {\n\ttype: DASHBOARD_ACTION.GET_FAILED;\n\tpayload: {\n\t\terrorMsg: string;\n\t};\n}\n\nexport interface DashboardSaveAction {\n\ttype: DASHBOARD_ACTION.SAVE;\n\tpayload: {\n\t\tdashboard: Dashboard;\n\t};\n}\n\nexport interface DashboardSaveSuccessAction {\n\ttype: DASHBOARD_ACTION.SAVE_SUCCESS;\n\tpayload: {\n\t\tdashboards: Dashboard[]\n\t}\n}\n\nexport interface DashboardSaveFailedAction {\n\ttype: DASHBOARD_ACTION.SAVE_FAILED;\n\tpayload: {\n\t\terrorMsg: string;\n\t};\n}\n\nexport type DashboardAction =\n\t| DashboardGetAction\n\t| DashboardGetSuccessAction\n\t| DashboardGetFailedAction\n\t| DashboardSaveAction\n\t| DashboardSaveSuccessAction\n\t| DashboardSaveFailedAction;\n","import { Cluster } from \"pages/management/cluster/types\";\nimport { Node } from \"pages/management/node/types\";\nimport { Dashboard } from \"components/monitoring/dashboard/types\";\nimport { cloneDeep } from \"lodash\";\nimport { Layout } from \"react-grid-layout\";\nimport {\n\tDASHBOARD_CHARTS_TOP_OFFSET,\n\tDASHBOARD_NO_OF_COLUMNS,\n\tDEFAULT_DASHBOARD_CONFIG,\n\tDASHBOARD_NO_OF_ROWS\n} from \"components/monitoring/dashboard/const\";\n\nexport default class DashboardUtils {\n\tstatic arrayToMap(dashboards: Dashboard[] = []): Map {\n\t\treturn dashboards.reduce>(\n\t\t\t(\n\t\t\t\tdashboardMap: Map,\n\t\t\t\tdashboard: Dashboard\n\t\t\t): Map => {\n\t\t\t\treturn dashboardMap.set(dashboard.name, dashboard);\n\t\t\t},\n\t\t\tnew Map()\n\t\t);\n\t}\n\n\tstatic mapToArray(dashboardMap: Map): Dashboard[] {\n\t\treturn Array.from(dashboardMap.values());\n\t}\n\n\tstatic getDashboardName(cluster: Cluster, node?: Node) {\n\t\treturn `cluster-${cluster.id}${node ? \"nodes\" : \"\"}`;\n\t}\n\n\tstatic getDefaultConfiguration(name: string) {\n\t\tlet defaultConfig = cloneDeep(DEFAULT_DASHBOARD_CONFIG);\n\t\tdefaultConfig.name = name;\n\t\treturn defaultConfig;\n\t}\n\n\tstatic getGridSize(tileSize: string): {\n\t\tcolumns: number;\n\t\trowHeight: number;\n\t} {\n\t\tconst visibleInitialDashHeight =\n\t\t\twindow.innerHeight - DASHBOARD_CHARTS_TOP_OFFSET;\n\n\t\tswitch (tileSize) {\n\t\t\tcase \"sm\":\n\t\t\t\treturn {\n\t\t\t\t\tcolumns: DASHBOARD_NO_OF_COLUMNS.SM,\n\t\t\t\t\trowHeight: visibleInitialDashHeight / DASHBOARD_NO_OF_ROWS.SM\n\t\t\t\t};\n\t\t\tcase \"md\":\n\t\t\t\treturn {\n\t\t\t\t\tcolumns: DASHBOARD_NO_OF_COLUMNS.MD,\n\t\t\t\t\trowHeight: visibleInitialDashHeight / DASHBOARD_NO_OF_ROWS.MD\n\t\t\t\t};\n\t\t\tcase \"lg\":\n\t\t\tdefault:\n\t\t\t\treturn {\n\t\t\t\t\tcolumns: DASHBOARD_NO_OF_COLUMNS.LG,\n\t\t\t\t\trowHeight: visibleInitialDashHeight / DASHBOARD_NO_OF_ROWS.LG\n\t\t\t\t};\n\t\t}\n\t}\n\n\tstatic getCoordinates(tileSize: string, position: number): Layout {\n\t\tconst { columns } = DashboardUtils.getGridSize(tileSize);\n\n\t\tconst x = position % columns;\n\t\tconst y = parseInt(`${position / columns}`, 10);\n\n\t\treturn {\n\t\t\ti: \"\",\n\t\t\tx: x,\n\t\t\ty: y,\n\t\t\tw: 1,\n\t\t\th: 1\n\t\t};\n\t}\n\n\tstatic getChartPosition(layout: Layout, tileSize: string): number {\n\t\tconst { columns } = DashboardUtils.getGridSize(tileSize);\n\t\treturn layout.y * columns + layout.x;\n\t}\n}\n","import { Dashboard } from \"components/monitoring/dashboard/types\";\nimport DashboardUtils from \"components/monitoring/dashboard/utils\";\nimport {\n\tDASHBOARD_ACTION,\n\tDashboardAction,\n\tDashboardState\n} from \"store/dashboard/types\";\n\nexport const defaultState: DashboardState = {\n\tsaveInProgress: false,\n\tdashboards: new Map()\n};\n\nexport function dashboardReducer(\n\tstate: DashboardState = defaultState,\n\taction: DashboardAction\n): DashboardState {\n\tswitch (action.type) {\n\t\tcase DASHBOARD_ACTION.GET_SUCCESS:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tgetErrorMsg: undefined,\n\t\t\t\tdashboards: DashboardUtils.arrayToMap(action.payload.dashboards)\n\t\t\t};\n\n\t\tcase DASHBOARD_ACTION.GET_FAILED:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tgetErrorMsg: action.payload.errorMsg\n\t\t\t};\n\n\t\tcase DASHBOARD_ACTION.SAVE:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tsaveInProgress: true,\n\t\t\t\tdashboards: new Map(state.dashboards).set(\n\t\t\t\t\taction.payload.dashboard.name,\n\t\t\t\t\taction.payload.dashboard\n\t\t\t\t)\n\t\t\t};\n\n\t\tcase DASHBOARD_ACTION.SAVE_SUCCESS:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tsaveErrorMsg: undefined,\n\t\t\t\tsaveInProgress: false,\n\t\t\t\tdashboards: DashboardUtils.arrayToMap(action.payload.dashboards)\n\t\t\t};\n\n\t\tcase DASHBOARD_ACTION.SAVE_FAILED:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tsaveErrorMsg: action.payload.errorMsg,\n\t\t\t\tsaveInProgress: false\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn state;\n\t}\n}\n","export enum SNACKBAR_TYPE {\n\tERROR,\n\tWARNING,\n\tINFO,\n\tSUCCESS,\n\tDEFAULT\n}\n\n// redux store state\nexport interface SnackbarState {\n\tmsg: string;\n\tsnackbarType: SNACKBAR_TYPE;\n\topen: boolean;\n}\n\n// redux actions\nexport interface SnackbarActionPayload {\n\tmsg: string;\n\tsnackbarType?: SNACKBAR_TYPE;\n}\n\nexport enum SNACKBAR_ACTION {\n\tSHOW = \"SNACKBAR/SHOW\",\n\tHIDE = \"SNACKBAR/HIDE\"\n}\n\nexport interface SnackbarActionShow {\n\ttype: SNACKBAR_ACTION.SHOW;\n\tsnackbar: SnackbarActionPayload;\n}\n\nexport interface SnackbarActionHide {\n\ttype: SNACKBAR_ACTION.HIDE;\n}\n\nexport type SnackBarAction = SnackbarActionShow | SnackbarActionHide;\n","import {\n\tSnackbarActionShow,\n\tSNACKBAR_ACTION,\n\tSnackbarState,\n\tSNACKBAR_TYPE,\n\tSnackBarAction\n} from \"components/snackbar/types\";\n\n// REDUCERS\nconst initialState: SnackbarState = {\n\tmsg: \"\",\n\tsnackbarType: SNACKBAR_TYPE.DEFAULT,\n\topen: false\n};\n\nexport default function snackbarReducer(\n\tstate: SnackbarState = initialState,\n\taction: SnackBarAction\n): SnackbarState {\n\tswitch (action.type) {\n\t\tcase SNACKBAR_ACTION.SHOW:\n\t\t\tconst showAction = action as SnackbarActionShow;\n\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tmsg: showAction.snackbar.msg,\n\t\t\t\tsnackbarType: showAction.snackbar.snackbarType || SNACKBAR_TYPE.DEFAULT,\n\t\t\t\topen: true\n\t\t\t};\n\n\t\tcase SNACKBAR_ACTION.HIDE:\n\t\t\treturn initialState;\n\n\t\tdefault:\n\t\t\treturn state;\n\t}\n}\n","export interface User {\n\tid: number;\n\tname: string;\n\tpassword?: string;\n\trole: USER_ROLE;\n\tpublicKey?: string;\n\tmeta?: any;\n}\n\nexport interface SerializedUser {\n\tattributes: User;\n\tid?: number;\n\ttype: \"users\";\n}\n\nexport enum USER_ROLE {\n\tNONE = \"ROLE_NONE\",\n\tOBSERVER = \"ROLE_OBSERVER\",\n\tMANAGER = \"ROLE_MANAGER\",\n\tADMINISTRATOR = \"ROLE_ADMINISTRATOR\"\n}\n\n// redux actions\nexport enum USER_ACTION {\n\tLIST_FETCH_REQUESTED = \"USER/LIST_FETCH_REQUESTED\",\n\tLIST_FETCH_SUCCEEDED = \"USER/LIST_FETCH_SUCCEEDED\"\n}\n\nexport interface UserListFetchRequestedAction {\n\ttype: USER_ACTION.LIST_FETCH_REQUESTED;\n}\n\nexport interface UserListFetchSucceededAction {\n\ttype: USER_ACTION.LIST_FETCH_SUCCEEDED;\n\tpayload: {\n\t\tuserList: User[];\n\t};\n}\n\nexport type UserAction =\n\t| UserListFetchRequestedAction\n\t| UserListFetchSucceededAction;\n","import { User, UserAction, USER_ACTION } from \"pages/users/types\";\n\nconst initialState: User[] = [];\n\nexport function userListReducer(\n\tstate: User[] = initialState,\n\taction: UserAction\n): User[] {\n\tswitch (action.type) {\n\t\tcase USER_ACTION.LIST_FETCH_SUCCEEDED:\n\t\t\treturn action.payload.userList;\n\t\tdefault:\n\t\t\treturn state;\n\t}\n}\n","import {\n\tFirewallRule,\n\tHostSharedConfig\n} from \"pages/management/host/types\";\nimport { NodeSharedConfig } from \"pages/management/node/types\";\n\nexport interface Cluster {\n\tid?: number;\n\tname: string;\n\tnodes?: Readonly;\n\thosts?: Readonly;\n\tsharedConfig: {\n\t\tnode: NodeSharedConfig;\n\t\thost: HostSharedConfig;\n\t};\n\tunmanaged: boolean;\n\tfirewallRules: FirewallRule[];\n}\n\nexport interface SerializedCluster {\n\tattributes: Cluster;\n\tid?: number;\n\ttype: \"clusters\";\n\trelationships?: any;\n}\n\n// \tWSREP_MEMBER_UNDEFINED = 0, //!< undefined state\n// \tWSREP_MEMBER_JOINER = 1, //!< incomplete state, requested state transfer\n// \tWSREP_MEMBER_DONOR = 2, //!< complete state, donates state transfer\n// \tWSREP_MEMBER_JOINED = 3, //!< complete state\n// \tWSREP_MEMBER_SYNCED = 4, //!< complete state, synchronized with group\n// \tWSREP_MEMBER_ERROR = 5, //!< this and above is provider-specific error code\n// \tWSREP_MEMBER_MAX = 6\n\nexport enum WSREP_MEMBER_STATE {\n\tUNDEFINED,\n\tJOINER,\n\tDONOR,\n\tJOINED,\n\tSYNCED,\n\tERROR,\n\tMAX\n}\n\nexport enum DEPLOYMENT_STATUS {\n\tPENDING = 998,\n\tFAILURE = 999,\n\tSUCCESS = 1000\n}\n\n// REDUX\nexport enum CLUSTER_ACTION {\n\tLIST_FETCH_REQUESTED = \"CLUSTER/LIST_FETCH_REQUESTED\",\n\tLIST_FETCH_SUCCEDED = \"CLUSTER/LIST_FETCH_SUCCEDED\",\n\t// CREATE_REQUESTED = \"CLUSTER/CREATE_REQUESTED\",\n\t// CREATE_SUCCEEDED = \"CLUSTER/CREATE_SUCCEEDED\",\n\tDELETE_REQUESTED = \"CLUSTER/DELETE_REQUESTED\",\n\tDELETE_SUCCEDED = \"CLUSTER/DELETE_SUCCEDED\"\n}\n\nexport interface ClusterListFetchRequestedAction {\n\ttype: CLUSTER_ACTION.LIST_FETCH_REQUESTED;\n}\n\nexport interface ClusterListFetchSuccededAction {\n\ttype: CLUSTER_ACTION.LIST_FETCH_SUCCEDED;\n\tpayload: {\n\t\tclusterList: Cluster[];\n\t};\n}\nexport interface ClusterDeleteRequestedAction {\n\ttype: CLUSTER_ACTION.DELETE_REQUESTED;\n\tpayload: {\n\t\tcluster: Cluster;\n\t};\n}\n\nexport interface ClusterDeleteSuccededAction {\n\ttype: CLUSTER_ACTION.DELETE_SUCCEDED;\n\tpayload: {\n\t\tclusterName: string;\n\t};\n}\n\nexport type ClusterAction =\n\t| ClusterListFetchRequestedAction\n\t| ClusterListFetchSuccededAction\n\t// | ClusterCreateRequestedAction\n\t// | ClusterCreateSuccededAction\n\t| ClusterDeleteRequestedAction\n\t| ClusterDeleteSuccededAction;\n","import {\n\tCluster,\n\tClusterAction,\n\tCLUSTER_ACTION\n} from \"pages/management/cluster/types\";\n\nconst initialState: Cluster[] = [];\n\nexport function clusterListReducer(\n\tstate: Cluster[] = initialState,\n\taction: ClusterAction\n): Cluster[] {\n\tswitch (action.type) {\n\t\tcase CLUSTER_ACTION.LIST_FETCH_SUCCEDED:\n\t\t\treturn action.payload.clusterList;\n\n\t\t// case CLUSTER_ACTION.CREATE_SUCCEEDED:\n\t\t// \treturn [...state, action.payload.cluster];\n\n\t\tcase CLUSTER_ACTION.DELETE_SUCCEDED:\n\t\t\treturn state.filter(\n\t\t\t\t(cluster: Cluster) => cluster.name !== action.payload.clusterName\n\t\t\t);\n\n\t\tdefault:\n\t\t\treturn state;\n\t}\n}\n","import {\n\tDEPLOYMENT_STATUS,\n\tWSREP_MEMBER_STATE\n} from \"pages/management/cluster/types\";\n\n// ###### API V2 MODELS #####\nexport interface NodeSharedConfig {\n\tdbEngine: NODE_DB_ENGINE;\n\tmonitoringPassword?: Readonly;\n\trootPassword?: Readonly;\n\tuserConfig?: string;\n\tsettings: {\n\t\tlogs: {\n\t\t\tgeneralLog: {\n\t\t\t\tenabled: boolean;\n\t\t\t\tpath?: string;\n\t\t\t};\n\t\t};\n\t};\n}\n\n// ###########################\n\nexport interface Node extends NodeSharedConfig {\n\tid?: number;\n\tunmanaged?: boolean;\n\tname: string;\n\tclusterID: number;\n\thostID: number;\n\tdeploymentStatus?: string;\n\tcreatedAt?: string;\n\tcreatedBy?: string;\n}\n\nexport interface SerializedNode {\n\tattributes: Node;\n\tid?: string;\n\ttype: \"nodes\";\n}\n\nexport interface NodeDefaults {\n\tdbEngine: NODE_DB_ENGINE;\n\trootPassword?: string;\n\tuserConfig?: string;\n\tunmanaged?: boolean;\n}\n\nexport enum NODE_DB_ENGINE {\n\tMARIADB_10_3 = \"mariadb:10.3\",\n\tMARIADB_10_4 = \"mariadb:10.4\",\n\tMARIADB_10_5 = \"mariadb:10.5\",\n\tMARIADB_10_6 = \"mariadb:10.6\",\n\tMARIADB_10_7 = \"mariadb:10.7\",\n\tMYSQL_5_7 = \"mysql:5.7\",\n\tMYSQL_8_0 = \"mysql:8.0\"\n}\n\nexport enum DB_STATE {\n\tUP = 100,\n\tDOWN = 99,\n\tUNKNOWN = -1\n}\n\nexport type NODE_STATE = WSREP_MEMBER_STATE | DB_STATE | DEPLOYMENT_STATUS;\n\nexport enum NODE_ACTION {\n\tLIST_FETCH_REQUESTED = \"NODE/LIST_FETCH_REQUESTED\",\n\tLIST_FETCH_SUCCEEDED = \"NODE/LIST_FETCH_SUCCEEDED\",\n\tCREATE_REQUESTED = \"NODE/CREATE_REQUESTED\",\n\tCREATE_SUCCEEDED = \"NODE/CREATE_SUCCEEDED\"\n}\n\nexport interface NodeListFetchRequestedAction {\n\ttype: NODE_ACTION.LIST_FETCH_REQUESTED;\n\tpayload: {\n\t\tclusterID: number;\n\t};\n}\n\nexport interface NodeListFetchSucceededAction {\n\ttype: NODE_ACTION.LIST_FETCH_SUCCEEDED;\n\tpayload: {\n\t\tclusterID: number;\n\t\tnodeList: Node[];\n\t};\n}\n\nexport interface NodeCreateRequestedAction {\n\ttype: NODE_ACTION.CREATE_REQUESTED;\n\tpayload: {\n\t\tnode: Node;\n\t};\n}\n\nexport interface NodeCreateSucceededAction {\n\ttype: NODE_ACTION.CREATE_SUCCEEDED;\n\tpayload: {\n\t\tnode: Node;\n\t};\n}\n\nexport type NodeAction =\n\t| NodeListFetchRequestedAction\n\t| NodeListFetchSucceededAction\n\t| NodeCreateRequestedAction\n\t| NodeCreateSucceededAction;\n","import {\n\tNode,\n\tNodeAction,\n\tNODE_ACTION\n} from \"pages/management/node/types\";\n\nconst initialState: Map = new Map();\n\nexport function nodeListReducer(\n\tstate: Map = initialState,\n\taction: NodeAction\n): Map {\n\tswitch (action.type) {\n\t\tcase NODE_ACTION.LIST_FETCH_SUCCEEDED:\n\t\t\tconsole.log(\"listFetchSucceeded\", action.payload);\n\t\t\tconst { clusterID, nodeList } = action.payload;\n\t\t\treturn new Map(state).set(clusterID, nodeList);\n\t\tdefault:\n\t\t\treturn state;\n\t}\n}\n","import { DEPLOYMENT_STATUS } from \"pages/management/cluster/types\";\nimport { DigitalOceanConfig } from \"components/form/digitalOceanConfig/types\";\n\nexport interface HostSharedConfig {\n\ttype: HOST_TYPE;\n\tsystem: HOST_SYSTEM;\n\thostTypeSpecific?: EC2Config | DigitalOceanConfig;\n\tauthorizedKeys?: string[];\n\tprivateKey?: string;\n\tfirewallRules?: FirewallRule[];\n\tdatabaseSizeGiB?: number;\n}\n\nexport interface Host {\n\tid?: number;\n\tname: string;\n\tclusterID: number;\n\tnodeID?: number;\n\tsegment: number;\n\ttype: HOST_TYPE;\n\tsystem: HOST_SYSTEM;\n\tdeploymentStatus?: string;\n\tprivateKey: string;\n\tprivateKeyPassword?: string;\n\tssh?: {\n\t\taddress: string;\n\t\tport: string;\n\t};\n\tdb?: {\n\t\taddress: string;\n\t\tport: string;\n\t};\n\tauthorizedKeys: string[];\n\thostTypeSpecific?: EC2Config;\n\tdatabaseSizeGiB?: Readonly;\n}\n\nexport interface EC2Config {\n\taccessKeyID?: string;\n\tsecretAccessKey?: string;\n\tregion?: string;\n\tinstanceType?: string;\n}\n\nexport interface FirewallRule {\n\tdescription: string;\n\tport: number;\n\tprotocol: \"tcp\" | \"udp\";\n\tranges: string[];\n}\n\nexport interface SerializedHost {\n\tattributes: Host;\n\tid?: number;\n\ttype: \"hosts\";\n}\n\nexport enum HOST_TYPE {\n\tEC2 = \"ec2\",\n\tDIGITAL_OCEAN = \"digitalocean\",\n\t// LOCAL_LXD = \"locallxd\",\n\tUNMANAGED = \"unmanaged\"\n}\n\nexport enum HOST_SYSTEM {\n\tCENTOS_7 = \"centos:7\",\n\tCENTOS_8 = \"centos:8\",\n\tDEBIAN_10 = \"debian:10\",\n\tDEBIAN_11 = \"debian:11\",\n\tREDHAT_8 = \"redhat:8\",\n\tUBUNTU_18 = \"ubuntu:18.04\",\n\tUBUNTU_20 = \"ubuntu:20.04\"\n}\n\nexport enum HOST_STATUS {\n\tUNKNOWN = -1\n}\n\nexport type HOST_STATE = DEPLOYMENT_STATUS | HOST_STATUS;\n\nexport interface HostLog {\n\t\"channel-type\": string;\n\t\"host-id\": number;\n\t\"cluster-id\": number;\n\tlevel: string;\n\tmsg: string;\n\ttime: Date;\n}\n\n// redux actions\nexport enum HOST_ACTION {\n\tLIST_FETCH_REQUESTED = \"HOST/LIST_FETCH_REQUESTED\",\n\tLIST_FETCH_SUCCEEDED = \"HOST/LIST_FETCH_SUCCEEDED\"\n}\n\nexport interface HostListFetchRequestedAction {\n\ttype: HOST_ACTION.LIST_FETCH_REQUESTED;\n\tpayload: {\n\t\tclusterID: number;\n\t};\n}\n\nexport interface HostListFetchSucceededAction {\n\ttype: HOST_ACTION.LIST_FETCH_SUCCEEDED;\n\tpayload: {\n\t\tclusterID: number;\n\t\thostList: Host[];\n\t};\n}\n\nexport type HostAction =\n\t| HostListFetchRequestedAction\n\t| HostListFetchSucceededAction;\n","import {\n\tHOST_ACTION,\n\tHostAction,\n\tHost\n} from \"pages/management/host/types\";\n\nconst initialState: Map = new Map();\n\nexport function hostListReducer(\n\tstate: Map = initialState,\n\taction: HostAction\n): Map {\n\tswitch (action.type) {\n\t\tcase HOST_ACTION.LIST_FETCH_SUCCEEDED:\n\t\t\tconsole.log(\"host list fetch succeeded\", action.payload);\n\t\t\tconst { clusterID, hostList } = action.payload;\n\t\t\treturn new Map(state).set(clusterID, hostList);\n\t\tdefault:\n\t\t\treturn state;\n\t}\n}\n","import { Job, JobTracking } from \"services/jobs/types\";\n\nexport interface JobMonitorState {\n\tjobsToTrack: number[];\n\ttrackedJobList: JobTracking[];\n\trunningJobList: JobTracking[];\n\tjobsDoneDuringBoot: number[];\n\tisBootDone: boolean;\n\tisWsConnected: boolean;\n}\n\nexport enum JOB_MONITOR_ACTION {\n\tBOOT_DONE = \"JOB_MONITOR/BOOT_DONE\",\n\tSET_RUNNING_JOBS = \"JOB_MONITOR/SET_RUNNING_JOBS\",\n\tADD_RUNNING_JOB = \"JOB_MONITOR/ADD_RUNNING_JOB\",\n\tREMOVE_RUNNING_JOB = \"JOB_MONITOR/REMOVE_RUNNING_JOB\",\n\n\tTRACK = \"JOB_MONITOR/TRACK\",\n\tUNTRACK = \"JOB_MONITOR/UNTRACK\",\n\n\tCONSOLIDATE_TRACKED_JOBS = \"JOB_MONITOR/CONSOLIDATE_TRACKED_JOBS\",\n\tSET_TRACKED_JOB = \"JOB_MONITOR/SET_TRACKED_JOB\",\n\tREMOVE_TRACKED_JOB = \"JOB_MONITOR/REMOVE_TRACKED_JOB\"\n}\n\nexport interface BootDone {\n\ttype: JOB_MONITOR_ACTION.BOOT_DONE;\n}\n\nexport interface SetRunningJobs {\n\ttype: JOB_MONITOR_ACTION.SET_RUNNING_JOBS;\n\tpayload: {\n\t\tjobs: JobTracking[];\n\t};\n}\n\nexport interface AddRunningJob {\n\ttype: JOB_MONITOR_ACTION.ADD_RUNNING_JOB;\n\tpayload: {\n\t\tjob: JobTracking;\n\t};\n}\n\nexport interface RemoveRunningJob {\n\ttype: JOB_MONITOR_ACTION.REMOVE_RUNNING_JOB;\n\tpayload: {\n\t\tjobId: number;\n\t};\n}\n\nexport interface TrackJob {\n\ttype: JOB_MONITOR_ACTION.TRACK;\n\tpayload: {\n\t\tjobId: number;\n\t};\n}\n\nexport interface UntrackJob {\n\ttype: JOB_MONITOR_ACTION.UNTRACK;\n\tpayload: {\n\t\tjobId: number;\n\t};\n}\n\nexport interface ConsolidateTrackedJobs {\n\ttype: JOB_MONITOR_ACTION.CONSOLIDATE_TRACKED_JOBS;\n\tpayload: {\n\t\tjobs: Job[];\n\t};\n}\n\nexport interface SetTrackedJob {\n\ttype: JOB_MONITOR_ACTION.SET_TRACKED_JOB;\n\tpayload: {\n\t\tjob: JobTracking;\n\t};\n}\n\nexport interface RemoveTrackedJob {\n\ttype: JOB_MONITOR_ACTION.REMOVE_TRACKED_JOB;\n\tpayload: {\n\t\tjobId: number;\n\t};\n}\n\nexport type JobMonitorAction =\n\t| BootDone\n\t| SetRunningJobs\n\t| AddRunningJob\n\t| RemoveRunningJob\n\t| TrackJob\n\t| UntrackJob\n\t| ConsolidateTrackedJobs\n\t| SetTrackedJob\n\t| RemoveTrackedJob;\n","export enum JOB_STATUS {\n\tMISSING = \"missing\",\n\tNEW = \"new\",\n\tRUNNING = \"running\",\n\tSUCCESS = \"success\",\n\tFAILURE = \"failure\",\n\tABORTED = \"aborted\"\n}\n\nexport interface Wrapped {\n\tmsg: string;\n\tstackTrace?: string[];\n\twrapped?: Wrapped;\n}\n\nexport interface Meta {\n\tcluster_id?: number;\n\tcluster_name?: string;\n\thost_id?: number;\n\thost_name?: string;\n\tnode_id?: number;\n\tnode_name?: string;\n}\n\nexport interface JobTracking {\n\tid: number;\n\tstatus: JOB_STATUS;\n\tmeta: Meta;\n}\n\nexport interface Job {\n\tid: number;\n\tdescription: string;\n\tparentId: number;\n\texecutionInfo: {\n\t\tstatus: JOB_STATUS;\n\t\tdetails: string;\n\t\terror?: Wrapped;\n\t\tpayload: any;\n\t};\n\tcreatedAt: string;\n\tstoppedAt: string;\n\tmeta: Meta;\n}\n\nexport interface SerializedJob {\n\tattributes: Job;\n\ttype: \"jobs\";\n\tid?: string;\n}\n\nexport type JobType = \"host\" | \"node\" | \"cluster\" | undefined;\n","export interface ClusterCreateWizardState {\n\tisOpen: boolean;\n}\n\nexport enum CLUSTER_TYPE {\n\tMONITORED,\n\tHYBRID,\n\tMANAGED\n}\n\nexport enum CLUSTER_CREATE_WIZARD_ACTION {\n\tSHOW = \"CLUSTER_CREATE_WIZARD/SHOW\",\n\tHIDE = \"CLUSTER_CREATE_WIZARD/HIDE\",\n}\n\nexport interface ClusterCreateWizardShowAction {\n\ttype: CLUSTER_CREATE_WIZARD_ACTION.SHOW;\n}\n\nexport interface ClusterCreateWizardHideAction {\n\ttype: CLUSTER_CREATE_WIZARD_ACTION.HIDE;\n}\n\nexport type ClusterCreateWizardAction =\n\t| ClusterCreateWizardShowAction\n\t| ClusterCreateWizardHideAction\n","import { Job, JOB_STATUS, JobTracking } from \"../../services/jobs/types\";\n\nexport default class JobUtils {\n\tstatic getJobTracking(job: Job): JobTracking {\n\t\treturn {\n\t\t\tid: job.id,\n\t\t\tstatus: job.executionInfo.status,\n\t\t\tmeta: job.meta\n\t\t};\n\t}\n\n\tprivate jobStatusWeights = {\n\t\tnew: 0,\n\t\trunning: 1,\n\t\tsuccess: 2,\n\t\tfailure: 2,\n\t\taborted: 2,\n\t\tmissing: 2\n\t};\n\n\tprivate static getJobStatusWeight(status: JOB_STATUS): number {\n\t\tswitch (status) {\n\t\t\tcase JOB_STATUS.NEW:\n\t\t\t\treturn 0;\n\t\t\tcase JOB_STATUS.RUNNING:\n\t\t\t\treturn 1;\n\t\t\tcase JOB_STATUS.SUCCESS:\n\t\t\tcase JOB_STATUS.ABORTED:\n\t\t\tcase JOB_STATUS.FAILURE:\n\t\t\tcase JOB_STATUS.MISSING:\n\t\t\t\treturn 2;\n\t\t}\n\t}\n\n\tstatic compareStatuses(status1: JOB_STATUS, status2: JOB_STATUS): -1 | 0 | 1 {\n\t\tif (this.getJobStatusWeight(status1) > this.getJobStatusWeight(status2)) {\n\t\t\treturn 1;\n\t\t} else if (\n\t\t\tthis.getJobStatusWeight(status1) < this.getJobStatusWeight(status2)\n\t\t) {\n\t\t\treturn -1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n}\n","import { JobTracking } from \"services/jobs/types\";\nimport {\n\tJOB_MONITOR_ACTION,\n\tJobMonitorAction,\n\tJobMonitorState\n} from \"store/jobsMonitor/types\";\nimport JobUtils from \"./utils\";\n\nexport const initialState: JobMonitorState = {\n\ttrackedJobList: [], // last state of tracked jobs\n\tjobsToTrack: [], // contains IDs of jobs to monitor\n\trunningJobList: [],\n\tjobsDoneDuringBoot: [],\n\tisBootDone: false,\n\tisWsConnected: false\n};\n\nexport function jobMonitorReducer(\n\tstate: JobMonitorState = initialState,\n\taction: JobMonitorAction\n): JobMonitorState {\n\tswitch (action.type) {\n\t\tcase JOB_MONITOR_ACTION.BOOT_DONE:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tisBootDone: true\n\t\t\t};\n\n\t\tcase JOB_MONITOR_ACTION.SET_RUNNING_JOBS:\n\t\t\tif (!state.isBootDone) {\n\t\t\t\treturn {\n\t\t\t\t\t...state,\n\t\t\t\t\trunningJobList: action.payload.jobs.filter(\n\t\t\t\t\t\t(jobTracking) => !state.jobsDoneDuringBoot.includes(jobTracking.id)\n\t\t\t\t\t)\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\treturn {\n\t\t\t\t\t...state,\n\t\t\t\t\trunningJobList: action.payload.jobs\n\t\t\t\t};\n\t\t\t}\n\n\t\tcase JOB_MONITOR_ACTION.ADD_RUNNING_JOB:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\trunningJobList: [...state.runningJobList, action.payload.job]\n\t\t\t};\n\n\t\tcase JOB_MONITOR_ACTION.REMOVE_RUNNING_JOB:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\trunningJobList: state.runningJobList.filter(\n\t\t\t\t\t(jobTracking: JobTracking) => jobTracking.id !== action.payload.jobId\n\t\t\t\t),\n\t\t\t\t// if boot not finished, add to done jobs\n\t\t\t\tjobsDoneDuringBoot: state.isBootDone\n\t\t\t\t\t? state.jobsDoneDuringBoot\n\t\t\t\t\t: [...state.jobsDoneDuringBoot, action.payload.jobId]\n\t\t\t};\n\n\t\tcase JOB_MONITOR_ACTION.TRACK:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tjobsToTrack: [...state.jobsToTrack, action.payload.jobId]\n\t\t\t};\n\n\t\tcase JOB_MONITOR_ACTION.UNTRACK:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tjobsToTrack: state.jobsToTrack.filter(\n\t\t\t\t\t(jobId) => jobId !== action.payload.jobId\n\t\t\t\t),\n\t\t\t\ttrackedJobList: state.trackedJobList.filter(\n\t\t\t\t\t(jobTracking) => jobTracking.id !== action.payload.jobId\n\t\t\t\t)\n\t\t\t};\n\n\t\tcase JOB_MONITOR_ACTION.CONSOLIDATE_TRACKED_JOBS:\n\t\t\t// update tracked jobs\n\n\t\t\tconst trackedJobList: JobTracking[] = [];\n\n\t\t\taction.payload.jobs.forEach((job) => {\n\t\t\t\t// if job is still being tracked\n\t\t\t\tif (state.jobsToTrack.includes(job.id)) {\n\t\t\t\t\tconst existingTrackedJob = state.trackedJobList.find(\n\t\t\t\t\t\t(jobTracking) => jobTracking.id === job.id\n\t\t\t\t\t);\n\n\t\t\t\t\tif (!existingTrackedJob) {\n\t\t\t\t\t\t// if job is not in existing list - add it\n\t\t\t\t\t\ttrackedJobList.push(JobUtils.getJobTracking(job));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// if job is in existing list and new status is higher - add it\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tJobUtils.compareStatuses(\n\t\t\t\t\t\t\t\tjob.executionInfo.status,\n\t\t\t\t\t\t\t\texistingTrackedJob.status\n\t\t\t\t\t\t\t) === 1\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\ttrackedJobList.push(JobUtils.getJobTracking(job));\n\t\t\t\t\t\t\t// if new job status is not higher - keep it\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttrackedJobList.push(existingTrackedJob);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\ttrackedJobList\n\t\t\t};\n\n\t\tcase JOB_MONITOR_ACTION.SET_TRACKED_JOB:\n\t\t\t// if it exists - update it\n\t\t\tif (\n\t\t\t\tstate.trackedJobList.find(\n\t\t\t\t\t(jobTracking) => jobTracking.id === action.payload.job.id\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn {\n\t\t\t\t\t...state,\n\t\t\t\t\ttrackedJobList: state.trackedJobList.map((jobTracking) =>\n\t\t\t\t\t\tjobTracking.id === action.payload.job.id\n\t\t\t\t\t\t\t? action.payload.job\n\t\t\t\t\t\t\t: jobTracking\n\t\t\t\t\t)\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\t// if it does not exist - add it\n\t\t\t\treturn {\n\t\t\t\t\t...state,\n\t\t\t\t\ttrackedJobList: [...state.trackedJobList, action.payload.job]\n\t\t\t\t};\n\t\t\t}\n\n\t\tcase JOB_MONITOR_ACTION.REMOVE_TRACKED_JOB:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\ttrackedJobList: state.trackedJobList.filter(\n\t\t\t\t\t(jobTracking) => jobTracking.id !== action.payload.jobId\n\t\t\t\t)\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn state;\n\t}\n}\n","import {\n\tCLUSTER_CREATE_WIZARD_ACTION,\n\tClusterCreateWizardAction,\n\tClusterCreateWizardState\n} from \"pages/management/cluster/clusterCreateWizard/types\";\n\nconst initialState: ClusterCreateWizardState = {\n\tisOpen: false,\n};\n\nexport function clusterCreateWizardReducer(\n\tstate: ClusterCreateWizardState = initialState,\n\taction: ClusterCreateWizardAction\n): ClusterCreateWizardState {\n\tswitch (action.type) {\n\t\tcase CLUSTER_CREATE_WIZARD_ACTION.SHOW:\n\t\t\treturn { ...initialState, isOpen: true };\n\t\tcase CLUSTER_CREATE_WIZARD_ACTION.HIDE:\n\t\t\treturn { ...state, isOpen: false };\n\t\tdefault:\n\t\t\treturn state;\n\t}\n}\n","import { Host } from \"pages/management/host/types\";\nimport { Node } from \"pages/management/node/types\";\nimport { JobTracking } from \"services/jobs/types\";\nimport { Cluster } from \"pages/management/cluster/types\";\n\nexport interface DeploymentJob {\n\tcluster: Cluster;\n\thost: Host;\n\tnode: Node;\n\thostJob?: JobTracking;\n\tnodeJob?: JobTracking;\n\tnodeStartJob?: JobTracking;\n\tisDone: boolean;\n\tstartNodeAfterDeployment?: boolean;\n\tlog: any[];\n\tsteps: DeploymentStep[];\n}\n\nexport interface DeploymentStep {\n\ttype: DEPLOYMENT_STEP_TYPE;\n\tstatus: DEPLOYMENT_STEP_STATUS;\n\terrorMessage?: string;\n}\n\nexport enum DEPLOYMENT_TYPE {\n\tMONITORED,\n\tHYBRID,\n\tMANAGED\n}\n\nexport enum DEPLOYMENT_STEP_TYPE {\n\tHOST_DEPLOY,\n\tNODE_INSTALL,\n\tNODE_START\n}\n\nexport enum DEPLOYMENT_STEP_STATUS {\n\tCANCELLED = -1,\n\tPENDING,\n\tRUNNING,\n\tFAILED,\n\tDONE\n}\n\nexport interface NodeCreateWizardState {\n\tisOpen: boolean;\n\tcluster: Cluster;\n}\n\nexport enum NODE_CREATE_WIZARD_ACTION {\n\tSHOW = \"NODE_CREATE_WIZARD/SHOW\",\n\tHIDE = \"NODE_CREATE_WIZARD/HIDE\"\n}\n\nexport interface NodeCreateWizardShowAction {\n\ttype: NODE_CREATE_WIZARD_ACTION.SHOW;\n\tpayload: {\n\t\tcluster: Cluster;\n\t};\n}\n\nexport interface NodeCreateWizardHideAction {\n\ttype: NODE_CREATE_WIZARD_ACTION.HIDE;\n}\n\nexport type NodeCreateWizardAction =\n\t| NodeCreateWizardShowAction\n\t| NodeCreateWizardHideAction;\n","import { Region } from \"@aws-sdk/client-ec2\";\nimport {\n\tEC2Config,\n\tHOST_SYSTEM,\n\tHOST_TYPE,\n\tHostSharedConfig\n} from \"pages/management/host/types\";\nimport { DigitalOceanConfig } from \"components/form/digitalOceanConfig/types\";\n\nexport const HOST_TYPE_SPECIFIC_AWS_DEFAULT_CONFIG: EC2Config = {\n\tregion: \"\",\n\tinstanceType: \"\",\n\taccessKeyID: \"\",\n\tsecretAccessKey: \"\"\n};\n\nexport const HOST_TYPE_SPECIFIC_DIGITAL_OCEAN_DEFAULT_CONFIG: DigitalOceanConfig =\n\t{\n\t\taccessToken: \"\",\n\t\tregion: \"\",\n\t\tsize: \"\"\n\t};\n\nexport const DEFAULT_HOST_SHARED_CONFIG: Readonly = {\n\ttype: HOST_TYPE.EC2,\n\tsystem: HOST_SYSTEM.UBUNTU_20,\n\thostTypeSpecific: HOST_TYPE_SPECIFIC_AWS_DEFAULT_CONFIG,\n\tdatabaseSizeGiB: 60\n};\n\n// Contains only AWS regions with opt-in-not-required.\n// Got the list from https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-regions\nexport const DEFAULT_AWS_REGIONS: Region[] = [\n\t{ RegionName: \"ap-northeast-1\", OptInStatus: \"opt-in-not-required\" },\n\t{ RegionName: \"ap-northeast-2\", OptInStatus: \"opt-in-not-required\" },\n\t{ RegionName: \"ap-northeast-3\", OptInStatus: \"opt-in-not-required\" },\n\t{ RegionName: \"ap-south-1\", OptInStatus: \"opt-in-not-required\" },\n\t{ RegionName: \"ca-central-1\", OptInStatus: \"opt-in-not-required\" },\n\t{ RegionName: \"eu-central-1\", OptInStatus: \"opt-in-not-required\" },\n\t{ RegionName: \"eu-north-1\", OptInStatus: \"opt-in-not-required\" },\n\t{ RegionName: \"eu-west-1\", OptInStatus: \"opt-in-not-required\" },\n\t{ RegionName: \"eu-west-2\", OptInStatus: \"opt-in-not-required\" },\n\t{ RegionName: \"eu-west-3\", OptInStatus: \"opt-in-not-required\" },\n\t{ RegionName: \"sa-east-1\", OptInStatus: \"opt-in-not-required\" },\n\t{ RegionName: \"us-east-1\", OptInStatus: \"opt-in-not-required\" },\n\t{ RegionName: \"us-east-2\", OptInStatus: \"opt-in-not-required\" },\n\t{ RegionName: \"us-west-1\", OptInStatus: \"opt-in-not-required\" },\n\t{ RegionName: \"us-west-2\", OptInStatus: \"opt-in-not-required\" }\n];\n","export interface PreloaderState {\n\tpublicPreloader: PublicPreloaderState;\n\tsecurePreloader: SecurePreloaderState;\n}\n\nexport interface SecurePreloaderState {\n\tisPreloadDone: boolean;\n\terrorMsg?: string;\n}\n\nexport enum SECURE_PRELOADER_ACTION {\n\tPRELOAD = \"SECURE_PRELOADER/PRELOAD\",\n\tPRELOAD_SUCCESS = \"SECURE_PRELOADER/PRELOAD_SUCCESS\",\n\tPRELOAD_FAILED = \"SECURE_PRELOADER/PRELOAD_FAILED\"\n}\n\nexport interface SecurePreloadAction {\n\ttype: SECURE_PRELOADER_ACTION.PRELOAD;\n}\n\nexport interface SecurePreloadSuccessAction {\n\ttype: SECURE_PRELOADER_ACTION.PRELOAD_SUCCESS;\n}\n\nexport interface SecurePreloadFailedAction {\n\ttype: SECURE_PRELOADER_ACTION.PRELOAD_FAILED;\n\tpayload: {\n\t\terrorMsg: string;\n\t};\n}\n\nexport type SecurePreloaderAction =\n\t| SecurePreloadAction\n\t| SecurePreloadSuccessAction\n\t| SecurePreloadFailedAction;\n\n// public preloader types\nexport interface PublicPreloaderState {\n\tisPreloadDone: boolean;\n\terrorMsg?: string;\n}\n\nexport enum PUBLIC_PRELOADER_ACTION {\n\tPRELOAD = \"PUBLIC_PRELOADER/PRELOAD\",\n\tPRELOAD_SUCCESS = \"PUBLIC_PRELOADER/PRELOAD_SUCCESS\",\n\tPRELOAD_FAILED = \"PUBLIC_PRELOADER/PRELOAD_FAILED\"\n}\n\nexport interface PublicPreloadAction {\n\ttype: PUBLIC_PRELOADER_ACTION.PRELOAD;\n}\n\nexport interface PublicPreloadSuccessAction {\n\ttype: PUBLIC_PRELOADER_ACTION.PRELOAD_SUCCESS;\n}\n\nexport interface PublicPreloadFailedAction {\n\ttype: PUBLIC_PRELOADER_ACTION.PRELOAD_FAILED;\n\tpayload: {\n\t\terrorMsg: string;\n\t};\n}\n\nexport type PublicPreloaderAction =\n\t| PublicPreloadAction\n\t| PublicPreloadSuccessAction\n\t| PublicPreloadFailedAction;\n","import { Cluster } from \"pages/management/cluster/types\";\nimport { DEFAULT_HOST_SHARED_CONFIG } from \"pages/management/host/const\";\nimport { DEFAULT_NODE_SHARED_CONFIG } from \"pages/management/node/const\";\n\nexport const DEFAULT_CLUSTER: Readonly = {\n\tname: \"\",\n\tsharedConfig: {\n\t\thost: DEFAULT_HOST_SHARED_CONFIG,\n\t\tnode: DEFAULT_NODE_SHARED_CONFIG\n\t},\n\tunmanaged: false,\n\tfirewallRules: []\n};\n","import { NODE_DB_ENGINE, NodeSharedConfig } from \"pages/management/node/types\";\n\nexport const DEFAULT_NODE_SHARED_CONFIG: Readonly = {\n\tdbEngine: NODE_DB_ENGINE.MARIADB_10_7,\n\tsettings: {\n\t\tlogs: {\n\t\t\tgeneralLog: {\n\t\t\t\tenabled: false\n\t\t\t}\n\t\t}\n\t}\n};\n","import {\n\tNODE_CREATE_WIZARD_ACTION,\n\tNodeCreateWizardAction,\n\tNodeCreateWizardState\n} from \"pages/management/node/nodeDeploymentDialog/types\";\nimport { cloneDeep } from \"lodash\";\nimport { DEFAULT_CLUSTER } from \"pages/management/cluster/const\";\n\nconst getInitialState = (): NodeCreateWizardState => {\n\tconst initialState = {\n\t\tisOpen: false,\n\t\tcluster: DEFAULT_CLUSTER\n\t};\n\n\treturn cloneDeep(initialState);\n};\n\nconst initialState: NodeCreateWizardState = getInitialState();\n\nexport function nodeCreateWizardReducer(\n\tstate: NodeCreateWizardState = getInitialState(),\n\taction: NodeCreateWizardAction\n): NodeCreateWizardState {\n\tswitch (action.type) {\n\t\tcase NODE_CREATE_WIZARD_ACTION.SHOW:\n\t\t\tconsole.log(\"show node deployment wizard\");\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tisOpen: true,\n\t\t\t\tcluster: action.payload.cluster\n\t\t\t};\n\n\t\tcase NODE_CREATE_WIZARD_ACTION.HIDE:\n\t\t\treturn initialState;\n\n\t\tdefault:\n\t\t\treturn state;\n\t}\n}\n","import {\n\tPreloaderState,\n\tPUBLIC_PRELOADER_ACTION,\n\tPublicPreloaderAction,\n\tSECURE_PRELOADER_ACTION,\n\tSecurePreloaderAction\n} from \"components/preloader/types\";\n\nconst initialState: PreloaderState = {\n\tpublicPreloader: {\n\t\tisPreloadDone: false\n\t},\n\tsecurePreloader: {\n\t\tisPreloadDone: false\n\t}\n};\n\nexport function preloaderReducer(\n\tstate: PreloaderState = initialState,\n\taction: PublicPreloaderAction | SecurePreloaderAction\n): PreloaderState {\n\tswitch (action.type) {\n\t\tcase PUBLIC_PRELOADER_ACTION.PRELOAD_SUCCESS:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tpublicPreloader: {\n\t\t\t\t\tisPreloadDone: true\n\t\t\t\t}\n\t\t\t};\n\t\tcase PUBLIC_PRELOADER_ACTION.PRELOAD_FAILED:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tpublicPreloader: {\n\t\t\t\t\t...state.securePreloader,\n\t\t\t\t\terrorMsg: action.payload.errorMsg\n\t\t\t\t}\n\t\t\t};\n\t\tcase SECURE_PRELOADER_ACTION.PRELOAD:\n\t\t\tconsole.log(\"secure preload requested\");\n\t\t\treturn { ...state };\n\t\tcase SECURE_PRELOADER_ACTION.PRELOAD_SUCCESS:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tsecurePreloader: {\n\t\t\t\t\tisPreloadDone: true\n\t\t\t\t}\n\t\t\t};\n\t\tcase SECURE_PRELOADER_ACTION.PRELOAD_FAILED:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tsecurePreloader: {\n\t\t\t\t\t...state.securePreloader,\n\t\t\t\t\terrorMsg: action.payload.errorMsg\n\t\t\t\t}\n\t\t\t};\n\t\tdefault:\n\t\t\treturn state;\n\t}\n}\n","import { USER_ROLE } from \"pages/users/types\";\n\nexport interface NewUser {\n\tname: string;\n\tpassword: string;\n\trole: USER_ROLE;\n\tpublicKey?: string;\n}\n\nexport interface UserCreateWizardState {\n\tisUserCreateWizardOpen: boolean;\n}\n\nexport enum USER_CREATE_WIZARD_ACTION {\n\tSHOW = \"USER_CREATE_WIZARD/SHOW\",\n\tHIDE = \"USER_CREATE_WIZARD/HIDE\"\n}\n\nexport interface UserCreateWizardShow {\n\ttype: USER_CREATE_WIZARD_ACTION.SHOW;\n}\n\nexport interface UserCreateWizardHide {\n\ttype: USER_CREATE_WIZARD_ACTION.HIDE;\n}\n\nexport type UserCreateWizardAction =\n\t| UserCreateWizardShow\n\t| UserCreateWizardHide;\n","import {\n\tUSER_CREATE_WIZARD_ACTION,\n\tUserCreateWizardAction,\n\tUserCreateWizardState\n} from \"pages/users/userCreateWizard/types\";\n\nconst initialState: UserCreateWizardState = {\n\tisUserCreateWizardOpen: false\n};\n\nexport function userCreateWizardReducer(\n\tstate: UserCreateWizardState = initialState,\n\taction: UserCreateWizardAction\n): UserCreateWizardState {\n\tswitch (action.type) {\n\t\tcase USER_CREATE_WIZARD_ACTION.SHOW:\n\t\t\treturn {...state, isUserCreateWizardOpen: true};\n\t\tcase USER_CREATE_WIZARD_ACTION.HIDE:\n\t\t\treturn {...state, isUserCreateWizardOpen: false};\n\t\tdefault:\n\t\t\treturn state;\n\t}\n}\n","// redux\n// todo identifications are now numbers (clusterID, nodeID)\nimport {\n\tWsrepLastCommittedMetric,\n\tWsrepLocalStateMetric\n} from \"store/metricsStore/types\";\n\nexport interface MetricsStoreState {\n\tisMonitorEnabled: boolean;\n\twsrepLocalStateMetrics: Record;\n\twsrepLastCommittedMetrics: Record;\n\tjoinedNodes: Record;\n}\n\nexport enum METRICS_ACTION {\n\tSTART_MONITOR = \"METRICS_ACTION/START_MONITOR\",\n\tSTOP_MONITOR = \"METRICS_ACTION/STOP_MONITOR\",\n\tFETCH_WSREP_LOCAL_STATE_METRICS = \"METRICS_ACTION/FETCH_WSREP_LOCAL_STATE_METRICS\",\n\tFETCH_WSREP_LOCAL_STATE_METRICS_SUCCESS = \"METRICS_ACTION/FETCH_WSREP_LOCAL_STATE_METRICS_SUCCESS\",\n\tFETCH_WSREP_LAST_COMMITTED_METRICS = \"METRICS_ACTION/FETCH_WSREP_LAST_COMMITTED_METRICS\",\n\tFETCH_WSREP_LAST_COMMITTED_METRICS_SUCCESS = \"METRICS/FETCH_WSREP_LAST_COMMITTED_METRICS_SUCCESS\"\n}\n\nexport interface StartMonitorMetricsAction {\n\ttype: METRICS_ACTION.START_MONITOR;\n}\n\nexport interface StopMonitorMetricsAction {\n\ttype: METRICS_ACTION.STOP_MONITOR;\n}\n\nexport interface FetchWsrepLocalStateMetricsAction {\n\ttype: METRICS_ACTION.FETCH_WSREP_LOCAL_STATE_METRICS;\n}\n\nexport interface FetchWsrepLocalStateMetricsSuccessAction {\n\ttype: METRICS_ACTION.FETCH_WSREP_LOCAL_STATE_METRICS_SUCCESS;\n\tpayload: {\n\t\tmetrics: WsrepLocalStateMetric[];\n\t};\n}\n\nexport interface FetchLastCommittedMetricsAction {\n\ttype: METRICS_ACTION.FETCH_WSREP_LAST_COMMITTED_METRICS;\n}\n\nexport interface FetchLastCommittedMetricsSuccessAction {\n\ttype: METRICS_ACTION.FETCH_WSREP_LAST_COMMITTED_METRICS_SUCCESS;\n\tpayload: {\n\t\tmetrics: Record;\n\t};\n}\n\nexport type MetricsAction =\n\t| StartMonitorMetricsAction\n\t| StopMonitorMetricsAction\n\t| FetchLastCommittedMetricsAction\n\t| FetchLastCommittedMetricsSuccessAction\n\t| FetchWsrepLocalStateMetricsAction\n\t| FetchWsrepLocalStateMetricsSuccessAction;\n","export enum CONNECTION_STATUS {\n\tONLINE = \"ONLINE\",\n\tWEAK = \"WEAK\",\n\tOFFLINE = \"OFFLINE\"\n}\n\nexport interface SystemStatusState {\n\tbackendConnectionStatus: CONNECTION_STATUS;\n\tinfluxDBConnectionStatus: CONNECTION_STATUS;\n\twsConnectionStatus: CONNECTION_STATUS;\n}\n\nexport enum SYSTEM_STATUS_ACTION {\n\tBACKEND_SET_ONLINE = \"SYSTEM_STATUS/BACKEND_SET_ONLINE\",\n\tBACKEND_SET_WEAK = \"SYSTEM_STATUS/BACKEND_SET_WEAK\",\n\tBACKEND_SET_OFFLINE = \"SYSTEM_STATUS/BACKEND_SET_OFFLINE\",\n\tINFLUXDB_SET_ONLINE = \"SYSTEM_STATUS/INFLUXDB_SET_ONLINE\",\n\tINFLUXDB_SET_WEAK = \"SYSTEM_STATUS/INFLUXDB_SET_WEAK\",\n\tINFLUXDB_SET_OFFLINE = \"SYSTEM_STATUS/INFLUXDB_SET_OFFLINE\",\n\tWS_SET_ONLINE = \"SYSTEM_STATUS/WS_SET_ONLINE\",\n\tWS_SET_OFFLINE = \"SYSTEM_STATUS/WS_SET_OFFLINE\"\n}\n\nexport interface BackendSetOnlineAction {\n\ttype: SYSTEM_STATUS_ACTION.BACKEND_SET_ONLINE;\n}\n\nexport interface BackendSetWeakAction {\n\ttype: SYSTEM_STATUS_ACTION.BACKEND_SET_WEAK;\n}\n\nexport interface BackendSetOfflineAction {\n\ttype: SYSTEM_STATUS_ACTION.BACKEND_SET_OFFLINE;\n}\n\nexport interface InfluxDBSetOnlineAction {\n\ttype: SYSTEM_STATUS_ACTION.INFLUXDB_SET_ONLINE;\n}\n\nexport interface InfluxDBSetWeakAction {\n\ttype: SYSTEM_STATUS_ACTION.INFLUXDB_SET_WEAK;\n}\n\nexport interface InfluxDBSetOfflineAction {\n\ttype: SYSTEM_STATUS_ACTION.INFLUXDB_SET_OFFLINE;\n}\n\nexport interface WsSetOnlineAction {\n\ttype: SYSTEM_STATUS_ACTION.WS_SET_ONLINE;\n}\n\nexport interface WsSetOfflineAction {\n\ttype: SYSTEM_STATUS_ACTION.WS_SET_OFFLINE;\n}\n\nexport type SystemStatusAction =\n\t| BackendSetOnlineAction\n\t| BackendSetWeakAction\n\t| BackendSetOfflineAction\n\t| InfluxDBSetOnlineAction\n\t| InfluxDBSetWeakAction\n\t| InfluxDBSetOfflineAction\n\t| WsSetOnlineAction\n\t| WsSetOfflineAction;\n","import { WsrepLocalStateMetric } from \"store/metricsStore/types\";\nimport { WSREP_MEMBER_STATE } from \"pages/management/cluster/types\";\n\nexport default class MetricsUtils {\n\tstatic toRecord(localStateMetrics: WsrepLocalStateMetric[]) {\n\t\tlet newLocalStateMetricRecords: Record = {};\n\n\t\tlocalStateMetrics.forEach((metric: WsrepLocalStateMetric) => {\n\t\t\t// newLocalStateMetricRecords[`${metric.cluster}`] = metric;\n\t\t\tnewLocalStateMetricRecords[`${metric.cluster},${metric.node}`] = metric;\n\t\t});\n\n\t\treturn newLocalStateMetricRecords;\n\t}\n\n\tstatic countJoinedNodes(\n\t\tlocalStateMetrics: WsrepLocalStateMetric[]\n\t): Record {\n\t\t// console.log(\"countJoinedNodes\", localStateMetrics);\n\t\tlet joinedNodesPerClusterRecord: Record = {};\n\n\t\tlocalStateMetrics.forEach((metric: WsrepLocalStateMetric) => {\n\t\t\tif (\n\t\t\t\tmetric.value === WSREP_MEMBER_STATE.DONOR ||\n\t\t\t\tmetric.value === WSREP_MEMBER_STATE.JOINED ||\n\t\t\t\tmetric.value === WSREP_MEMBER_STATE.SYNCED\n\t\t\t) {\n\t\t\t\tjoinedNodesPerClusterRecord[metric.cluster] =\n\t\t\t\t\tjoinedNodesPerClusterRecord[metric.cluster]\n\t\t\t\t\t\t? joinedNodesPerClusterRecord[metric.cluster] + 1\n\t\t\t\t\t\t: 1;\n\t\t\t}\n\t\t});\n\n\t\treturn joinedNodesPerClusterRecord;\n\t}\n}\n","import {\n\tMETRICS_ACTION,\n\tMetricsAction,\n\tMetricsStoreState\n} from \"store/metricsStore/storeTypes\";\nimport MetricsUtils from \"store/metricsStore/utils\";\n\nconst defaultState: MetricsStoreState = {\n\tisMonitorEnabled: false,\n\twsrepLastCommittedMetrics: {},\n\twsrepLocalStateMetrics: {},\n\tjoinedNodes: {}\n};\n\nexport function metricsReducer(\n\tstate: MetricsStoreState = defaultState,\n\taction: MetricsAction\n): MetricsStoreState {\n\tswitch (action.type) {\n\t\tcase METRICS_ACTION.START_MONITOR:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tisMonitorEnabled: true\n\t\t\t};\n\n\t\tcase METRICS_ACTION.STOP_MONITOR:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tisMonitorEnabled: false\n\t\t\t};\n\n\t\tcase METRICS_ACTION.FETCH_WSREP_LOCAL_STATE_METRICS_SUCCESS:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\twsrepLocalStateMetrics: MetricsUtils.toRecord(action.payload.metrics),\n\t\t\t\tjoinedNodes: MetricsUtils.countJoinedNodes(action.payload.metrics)\n\t\t\t};\n\n\t\tcase METRICS_ACTION.FETCH_WSREP_LAST_COMMITTED_METRICS_SUCCESS:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\twsrepLastCommittedMetrics: {\n\t\t\t\t\t...state.wsrepLastCommittedMetrics,\n\t\t\t\t\t...action.payload.metrics\n\t\t\t\t}\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn state;\n\t}\n}\n","import {\n\tCONNECTION_STATUS,\n\tSYSTEM_STATUS_ACTION,\n\tSystemStatusAction,\n\tSystemStatusState\n} from \"store/systemStatus/types\";\n\nconst initialState: SystemStatusState = {\n\tbackendConnectionStatus: CONNECTION_STATUS.ONLINE,\n\tinfluxDBConnectionStatus: CONNECTION_STATUS.ONLINE,\n\twsConnectionStatus: CONNECTION_STATUS.OFFLINE\n};\n\nexport function systemStatusReducer(\n\tstate: SystemStatusState = initialState,\n\taction: SystemStatusAction\n): SystemStatusState {\n\tswitch (action.type) {\n\t\tcase SYSTEM_STATUS_ACTION.BACKEND_SET_ONLINE:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tbackendConnectionStatus: CONNECTION_STATUS.ONLINE\n\t\t\t};\n\n\t\tcase SYSTEM_STATUS_ACTION.BACKEND_SET_WEAK:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tbackendConnectionStatus: CONNECTION_STATUS.WEAK\n\t\t\t};\n\n\t\tcase SYSTEM_STATUS_ACTION.BACKEND_SET_OFFLINE:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tbackendConnectionStatus: CONNECTION_STATUS.OFFLINE\n\t\t\t};\n\n\t\tcase SYSTEM_STATUS_ACTION.INFLUXDB_SET_ONLINE:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tinfluxDBConnectionStatus: CONNECTION_STATUS.ONLINE\n\t\t\t};\n\n\t\tcase SYSTEM_STATUS_ACTION.INFLUXDB_SET_WEAK:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tinfluxDBConnectionStatus: CONNECTION_STATUS.WEAK\n\t\t\t};\n\n\t\tcase SYSTEM_STATUS_ACTION.INFLUXDB_SET_OFFLINE:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tinfluxDBConnectionStatus: CONNECTION_STATUS.OFFLINE\n\t\t\t};\n\n\t\tcase SYSTEM_STATUS_ACTION.WS_SET_ONLINE:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\twsConnectionStatus: CONNECTION_STATUS.ONLINE\n\t\t\t}\n\n\t\tcase SYSTEM_STATUS_ACTION.WS_SET_OFFLINE:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\twsConnectionStatus: CONNECTION_STATUS.OFFLINE\n\t\t\t}\n\n\t\tdefault:\n\t\t\treturn state;\n\t}\n}\n","export enum VERSION_ACTION {\n\tGET_SUCCESS = \"VERSION/GET_SUCCESS\",\n\tGET_FAILED = \"VERSION/GET_FAILED\"\n}\n\nexport interface VersionGetSuccessAction {\n\ttype: VERSION_ACTION.GET_SUCCESS;\n\tpayload: {\n\t\tversion: string;\n\t};\n}\n\nexport interface VersionGetFailedAction {\n\ttype: VERSION_ACTION.GET_FAILED;\n\tpayload: {\n\t\terrorMsg: string;\n\t};\n}\n\nexport type VersionAction = VersionGetSuccessAction | VersionGetFailedAction;\n","import {\n\tVERSION_ACTION,\n\tVersionAction,\n} from \"store/version/types\";\n\nexport const defaultState: string = \"Loading...\"\n\nexport function versionReducer(\n\tstate: string = defaultState,\n\taction: VersionAction\n): string {\n\tswitch (action.type) {\n\t\tcase VERSION_ACTION.GET_SUCCESS:\n\t\t\treturn action.payload.version\n\n\t\tcase VERSION_ACTION.GET_FAILED:\n\t\t\treturn action.payload.errorMsg;\n\n\t\tdefault:\n\t\t\treturn state;\n\t}\n}\n","import { authReducer } from \"store/auth/reducer\";\nimport { dashboardReducer } from \"store/dashboard/reducer\";\nimport { combineReducers } from \"redux\";\nimport snackbarReducer from \"components/snackbar/reducer\";\nimport { userListReducer } from \"pages/users/reducer\";\nimport { clusterListReducer } from \"store/cluster/reducer\";\nimport { nodeListReducer } from \"store/node/reducer\";\nimport { hostListReducer } from \"store/host/reducer\";\nimport { jobMonitorReducer } from \"store/jobsMonitor/reducer\";\nimport { clusterCreateWizardReducer } from \"pages/management/cluster/clusterCreateWizard/reducer\";\nimport { nodeCreateWizardReducer } from \"pages/management/node/nodeDeploymentDialog/reducer\";\nimport { preloaderReducer } from \"store/preloader/reducer\";\nimport { userCreateWizardReducer } from \"pages/users/userCreateWizard/reducer\";\nimport { metricsReducer } from \"store/metricsStore/reducer\";\nimport { systemStatusReducer } from \"store/systemStatus/reducer\";\nimport { versionReducer } from \"store/version/reducer\";\n\nexport const rootReducer = combineReducers({\n\tpreloader: preloaderReducer,\n\tauth: authReducer,\n\tdashboard: dashboardReducer,\n\tsnackbar: snackbarReducer,\n\tuserList: userListReducer,\n\tclusterList: clusterListReducer,\n\tnodeList: nodeListReducer,\n\thostList: hostListReducer,\n\tjobMonitor: jobMonitorReducer,\n\tclusterCreateWizard: clusterCreateWizardReducer,\n\tnodeCreateWizard: nodeCreateWizardReducer,\n\tuserCreateWizard: userCreateWizardReducer,\n\tmetrics: metricsReducer,\n\tsystemStatus: systemStatusReducer,\n\tversionInfo: versionReducer\n});\n\nexport type AppState = ReturnType;\n","import {\n\tCLUSTER_ACTION,\n\tClusterListFetchSuccededAction,\n\tCluster\n} from \"pages/management/cluster/types\";\n\nexport const clusterListFetchRequested = () => ({\n\ttype: CLUSTER_ACTION.LIST_FETCH_REQUESTED\n});\n\nexport const clusterListFetchSucceeded = (\n\tclusterList: Cluster[]\n): ClusterListFetchSuccededAction => ({\n\ttype: CLUSTER_ACTION.LIST_FETCH_SUCCEDED,\n\tpayload: {\n\t\tclusterList\n\t}\n});\n\n// export const clusterCreateWizardCreateRequested = (cluster: Cluster) => ({\n// \ttype: CLUSTER_ACTION.CREATE_REQUESTED,\n// \tpayload: {\n// \t\tcluster\n// \t}\n// });\n//\n// export const clusterCreateSucceded = (cluster: Cluster) => ({\n// \ttype: CLUSTER_ACTION.CREATE_SUCCEEDED,\n// \tpayload: {\n// \t\tcluster\n// \t}\n// });\n\nexport const clusterDeleteRequested = (cluster: Cluster) => ({\n\ttype: CLUSTER_ACTION.DELETE_REQUESTED,\n\tpayload: {\n\t\tcluster\n\t}\n});\n\nexport const clusterDeleteSucceded = (clusterName: string) => ({\n\ttype: CLUSTER_ACTION.DELETE_SUCCEDED,\n\tpayload: {\n\t\tclusterName\n\t}\n});\n","export default class AppEnvironment {\n\tprivate static getApiProtocol(): string {\n\t\treturn process.env.REACT_APP_API_PROTOCOL || \"http\";\n\t}\n\n\tpublic static getApiAddress(): string {\n\t\tif (process.env.REACT_APP_SERVER_ADDRESS) {\n\t\t\treturn `${this.getApiProtocol()}://${\n\t\t\t\tprocess.env.REACT_APP_SERVER_ADDRESS\n\t\t\t}:${process.env.REACT_APP_API_PORT || 8000}`;\n\t\t} else {\n\t\t\treturn window.location.origin;\n\t\t}\n\t}\n\n\tpublic static getApiVersion(): string {\n\t\treturn process.env.REACT_APP_API_VERSION || \"v2\";\n\t}\n\n\tpublic static getWsHostAddress(): string {\n\t\treturn this.getApiAddress().replace(\"http\", \"ws\");\n\t}\n}\n","import AppEnvironment from \"services/appEnvironment\";\nimport { JSONAPIError, JSONAPIErrorResponse } from \"services/api/types\";\n\nexport default class APIUtils {\n\tstatic getBaseURL() {\n\t\treturn `${AppEnvironment.getApiAddress()}/\n\t\t${AppEnvironment.getApiVersion()}`;\n\t}\n\n\tstatic getUrl(endpoint: string) {\n\t\treturn `${AppEnvironment.getApiAddress()}/\n\t\t${AppEnvironment.getApiVersion()}/${endpoint}`;\n\t}\n\n\tstatic APIErrorResponseHandler(e: any) {\n\t\tif (e.response) {\n\t\t\treturn APIUtils.parseJSONAPIError(e.response as JSONAPIErrorResponse);\n\t\t} else {\n\t\t\treturn e.message;\n\t\t}\n\t}\n\n\tstatic parseJSONAPIError(errorResponse: JSONAPIErrorResponse) {\n\t\t// console.log(\"parseJSONAPIERROR\", errorResponse);\n\t\tif (errorResponse.data.errors) {\n\t\t\treturn errorResponse.data.errors\n\t\t\t\t.map(\n\t\t\t\t\t(error: JSONAPIError) =>\n\t\t\t\t\t\t`${error.title}${error.detail ? \" - \" + error.detail : \"\"}`\n\t\t\t\t)\n\t\t\t\t.join(\", \");\n\t\t} else {\n\t\t\treturn errorResponse.statusText;\n\t\t}\n\t}\n}\n","import Axios from \"axios\";\nimport { deattribute, serialise } from \"kitsu-core\";\nimport { Cluster, SerializedCluster } from \"pages/management/cluster/types\";\nimport APIUtils from \"services/api/utils\";\nimport AppEnvironment from \"services/appEnvironment\";\nimport { Job } from \"services/jobs/types\";\n\nconst ENDPOINT = \"clusters\";\n\nlet clusterList: Cluster[] = [];\n\nclass ClustersAPI {\n\tstatic async fetchList(): Promise {\n\t\ttry {\n\t\t\tconst clustersResponse = await Axios.get(APIUtils.getUrl(ENDPOINT));\n\t\t\t// console.log(\"cluster response\", clustersResponse);\n\n\t\t\tconst deserializedData = clustersResponse.data.data.map(\n\t\t\t\t(item: SerializedCluster) => deattribute({ ...item })\n\t\t\t);\n\t\t\t// console.log(\"deserializedData\", deserializedData);\n\n\t\t\tclusterList = [...deserializedData];\n\n\t\t\t// console.log(\"cluster list\", clusterList);\n\t\t\treturn deserializedData;\n\t\t} catch (e) {\n\t\t\tthrow new Error(APIUtils.APIErrorResponseHandler(e));\n\t\t}\n\t}\n\n\tstatic fetch(clusterID: number): any {\n\t\treturn clusterList.find((cluster: Cluster) => {\n\t\t\treturn cluster.id === clusterID;\n\t\t});\n\t}\n\n\tstatic async create(\n\t\tcluster: Cluster\n\t): Promise<{ job: Job; cluster: Cluster }> {\n\t\t// console.log(\"cluster create\", cluster);\n\n\t\ttry {\n\t\t\tconst data = serialise(\"clusters\", cluster, \"POST\");\n\t\t\t// console.log(\"cluster request data\", data);\n\t\t\tconst response = await Axios.post(APIUtils.getUrl(ENDPOINT), data);\n\n\t\t\t// console.log(\"response\", response);\n\t\t\tconst createdCluster = deattribute(response.data.data) as Cluster;\n\n\t\t\t// this endpoint call creates a new job which is returned in the meta\n\t\t\tconst job = response.data.meta.jobInfo as Job;\n\n\t\t\treturn { job: { ...job }, cluster: { ...createdCluster } };\n\t\t} catch (e) {\n\t\t\tthrow new Error(APIUtils.APIErrorResponseHandler(e));\n\t\t}\n\t}\n\n\tstatic async delete(cluster: Cluster, force: boolean = false): Promise {\n\t\tconst response = await Axios.delete(\n\t\t\t`${APIUtils.getUrl(ENDPOINT)}/${cluster.id}?recursive=1${\n\t\t\t\tforce ? \"&force=1\" : \"\"\n\t\t\t}`\n\t\t);\n\n\t\tconst job = { ...response.data.meta.jobInfo } as Job;\n\t\t// we will add that job to the redux store so we can start monitoring it immediately\n\t\t// appStore.dispatch(jobCreated(job));\n\n\t\treturn { ...job };\n\t}\n\n\tstatic async recover(clusterId: number): Promise {\n\t\ttry {\n\t\t\tconst response = await Axios.post(\n\t\t\t\t`${AppEnvironment.getApiAddress()}/${AppEnvironment.getApiVersion()}/tasks`,\n\t\t\t\t{\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\tclusterID: clusterId\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttype: \"cluster-restore\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttype: \"tasks\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tconst job = response.data.meta.jobInfo as Job;\n\t\t\t// appStore.dispatch(jobCreated(job));\n\n\t\t\treturn job;\n\t\t} catch (e) {\n\t\t\tthrow new Error(APIUtils.APIErrorResponseHandler(e));\n\t\t}\n\t}\n\n\tstatic async changeDBRootPassword(\n\t\tclusterId: number,\n\t\tdbRootPassword: string\n\t): Promise {\n\t\ttry {\n\t\t\tconst response = await Axios.post(\n\t\t\t\t`${AppEnvironment.getApiAddress()}/${AppEnvironment.getApiVersion()}/tasks`,\n\t\t\t\t{\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\tclusterID: clusterId,\n\t\t\t\t\t\t\t\tpassword: dbRootPassword,\n\t\t\t\t\t\t\t\tonlyRecord: true,\n\t\t\t\t\t\t\t\tuser: \"root\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttype: \"db-password-change\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttype: \"tasks\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tconst job = response.data.meta.jobInfo as Job;\n\t\t\t// appStore.dispatch(jobCreated(job));\n\n\t\t\treturn job;\n\t\t} catch (e) {\n\t\t\tthrow new Error(APIUtils.APIErrorResponseHandler(e));\n\t\t}\n\t}\n}\n\nexport default ClustersAPI;\n","import {\n\tclusterDeleteSucceded,\n\tclusterListFetchSucceeded\n} from \"store/cluster/actions\";\nimport {\n\tCLUSTER_ACTION,\n\tClusterDeleteRequestedAction\n} from \"pages/management/cluster/types\";\nimport ClustersAPI from \"services/api/ClustersAPI\";\nimport { call, put } from \"typed-redux-saga\";\nimport { takeEvery, takeLatest } from \"redux-saga/effects\";\n\nfunction* fetchClusterList() {\n\t// console.log(\"fetchClusterList saga\");\n\n\ttry {\n\t\tconst clusterList = yield* call(ClustersAPI.fetchList);\n\t\t// console.log(\"saga cluster list fetched\", clusterList);\n\n\t\tyield put(clusterListFetchSucceeded(clusterList));\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n}\n\n// function* createCluster(action: ClusterCreateRequestedAction) {\n// \tyield call(ClustersAPI.create, action.payload.cluster);\n// \tyield put(clusterCreateSucceded(action.payload.cluster));\n// }\n\nfunction* deleteCluster(action: ClusterDeleteRequestedAction) {\n\tyield call(ClustersAPI.delete, action.payload.cluster);\n\tyield put(clusterDeleteSucceded(action.payload.cluster.name));\n}\n\nfunction* ClusterSideEffects() {\n\tyield takeLatest(CLUSTER_ACTION.LIST_FETCH_REQUESTED, fetchClusterList);\n\t// yield takeEvery(CLUSTER_ACTION.CREATE_REQUESTED, createCluster);\n\tyield takeEvery(CLUSTER_ACTION.DELETE_REQUESTED, deleteCluster);\n}\n\nexport default ClusterSideEffects;\n","import {\n\tHOST_ACTION,\n\tHost,\n\tHostListFetchSucceededAction,\n\tHostListFetchRequestedAction\n} from \"pages/management/host/types\";\n\nexport const hostListFetchRequested = (\n\tclusterID: number\n): HostListFetchRequestedAction => ({\n\ttype: HOST_ACTION.LIST_FETCH_REQUESTED,\n\tpayload: {\n\t\tclusterID\n\t}\n});\n\nexport const hostListFetchSucceeded = (\n\tclusterID: number,\n\thostList: Host[]\n): HostListFetchSucceededAction => ({\n\ttype: HOST_ACTION.LIST_FETCH_SUCCEEDED,\n\tpayload: {\n\t\tclusterID,\n\t\thostList\n\t}\n});\n","export const CLUSTERS_ENDPOINT: string = \"clusters\";\nexport const HOSTS_ENDPOINT: string = \"hosts\";\nexport const NODES_ENDPOINT: string = \"nodes\";\nexport const JOBS_ENDPOINT: string = \"jobs\";\n","import Axios from \"axios\";\nimport axios from \"axios\";\nimport {\n\tHost,\n\tHOST_SYSTEM,\n\tSerializedHost\n} from \"pages/management/host/types\";\nimport APIUtils from \"services/api/utils\";\nimport { deattribute, serialise } from \"kitsu-core\";\nimport { Job } from \"services/jobs/types\";\nimport { CLUSTERS_ENDPOINT, HOSTS_ENDPOINT } from \"services/api/const\";\nimport { NODE_DB_ENGINE } from \"pages/management/node/types\";\nimport AppEnvironment from \"services/appEnvironment\";\n\nclass HostsAPI {\n\tstatic async fetchList(clusterID: number): Promise {\n\t\ttry {\n\t\t\tconst hostsResponse = await Axios.get(\n\t\t\t\t`${APIUtils.getBaseURL()}/${CLUSTERS_ENDPOINT}/${clusterID}/${HOSTS_ENDPOINT}`\n\t\t\t);\n\n\t\t\treturn hostsResponse.data.data.map((item: SerializedHost) =>\n\t\t\t\tdeattribute({ ...item })\n\t\t\t);\n\t\t} catch (e) {\n\t\t\tthrow new Error(APIUtils.APIErrorResponseHandler(e));\n\t\t}\n\t}\n\n\tstatic async create(host: Host): Promise<{ job: Job; host: Host }> {\n\t\ttry {\n\t\t\tconsole.log(\"create host API\", host);\n\t\t\tconst data = serialise(\"hosts\", host, \"POST\");\n\n\t\t\t// need to copy host type because serializer ignores it\n\t\t\tdata.data.attributes.type = host.type;\n\n\t\t\tconsole.log(\"serialized host data\", data);\n\t\t\tconst response = await axios.post(\n\t\t\t\t`${APIUtils.getBaseURL()}/${CLUSTERS_ENDPOINT}/${\n\t\t\t\t\thost.clusterID\n\t\t\t\t}/${HOSTS_ENDPOINT}`,\n\t\t\t\tdata\n\t\t\t);\n\n\t\t\tconsole.log(\"response\", response);\n\n\t\t\tconst job = response.data.meta.jobInfo as Job;\n\t\t\tconst hostData = deattribute(response.data.data);\n\n\t\t\t// appStore.dispatch(jobCreated(job));\n\n\t\t\treturn { job: { ...job }, host: { ...hostData } };\n\t\t} catch (e) {\n\t\t\tthrow new Error(APIUtils.APIErrorResponseHandler(e));\n\t\t}\n\t}\n\n\tstatic async delete(host: Host, force: boolean = false): Promise {\n\t\ttry {\n\t\t\tconsole.log(\"delete host\", host);\n\t\t\t// need to copy host type because serializer ignores it\n\n\t\t\tconst response = await axios.delete(\n\t\t\t\t`${APIUtils.getBaseURL()}/${CLUSTERS_ENDPOINT}/${\n\t\t\t\t\thost.clusterID\n\t\t\t\t}/${HOSTS_ENDPOINT}/${host.id}?withNode=true${\n\t\t\t\t\tforce ? \"&force=true\" : \"\"\n\t\t\t\t}`\n\t\t\t);\n\n\t\t\tconsole.log(\"response\", response);\n\n\t\t\tconst job = response.data.meta.jobInfo as Job;\n\n\t\t\t// appStore.dispatch(jobCreated(job));\n\n\t\t\treturn { ...job };\n\t\t} catch (e) {\n\t\t\tthrow new Error(APIUtils.APIErrorResponseHandler(e));\n\t\t}\n\n\t\t// return await Axios.delete(\n\t\t// \t`${AppEnvironment.getApiAddress()}/${AppEnvironment.getApiVersion()}/hosts/${\n\t\t// \t\thost.name\n\t\t// \t}?with_node=1${force ? \"&force=1\" : \"\"}`\n\t\t// );\n\t}\n\n\tstatic async testSSHConnection(\n\t\tsystem: HOST_SYSTEM,\n\t\taddress: string,\n\t\tport: string,\n\t\tprivateKey: string,\n\t\tdbRootPassword?: string,\n\t\tdbEngine?: string\n\t) {\n\t\ttry {\n\t\t\tlet data: any = {\n\t\t\t\tssh: {\n\t\t\t\t\tsystem,\n\t\t\t\t\taddress: {\n\t\t\t\t\t\taddress,\n\t\t\t\t\t\tport: \"\" + port\n\t\t\t\t\t},\n\t\t\t\t\tprivateKey\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tif (dbRootPassword) {\n\t\t\t\tdata = {\n\t\t\t\t\t...data,\n\t\t\t\t\tdb: {\n\t\t\t\t\t\tengine: dbEngine || NODE_DB_ENGINE.MARIADB_10_5,\n\t\t\t\t\t\taddress: {\n\t\t\t\t\t\t\taddress,\n\t\t\t\t\t\t\tport: \"\" + port\n\t\t\t\t\t\t},\n\t\t\t\t\t\trootPassword: dbRootPassword\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst response = await Axios.post(\n\t\t\t\t`${AppEnvironment.getApiAddress()}/${AppEnvironment.getApiVersion()}/tasks`,\n\t\t\t\t{\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\tdata,\n\t\t\t\t\t\t\ttype: \"server-access-check\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttype: \"tasks\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tconsole.log(\"test ssh response\", response);\n\t\t\treturn response.data.meta.jobInfo as Job;\n\t\t\t// appStore.dispatch(jobCreated(job));\n\t\t} catch (e) {\n\t\t\tconsole.log(\"error\", e);\n\t\t\tthrow new Error(APIUtils.APIErrorResponseHandler(e));\n\t\t}\n\t}\n}\n\nexport default HostsAPI;\n","import { hostListFetchSucceeded } from \"store/host/actions\";\nimport {\n\tHOST_ACTION,\n\tHostListFetchRequestedAction\n} from \"pages/management/host/types\";\nimport HostsAPI from \"services/api/HostsAPI\";\nimport { call, put } from \"typed-redux-saga\";\nimport { takeLatest } from \"redux-saga/effects\";\n\nfunction* fetchHostList(action: HostListFetchRequestedAction) {\n\t// console.log(\"fetchHostList saga\");\n\tconst { clusterID } = action.payload;\n\n\ttry {\n\t\tconst hostList = yield* call(HostsAPI.fetchList, clusterID);\n\t\t// console.log(\"saga host list fetched\", hostList);\n\n\t\tyield put(hostListFetchSucceeded(clusterID, hostList));\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n}\n\nfunction* HostSideEffects() {\n\tyield takeLatest(HOST_ACTION.LIST_FETCH_REQUESTED, fetchHostList);\n}\n\nexport default HostSideEffects;\n","import Axios from \"axios\";\nimport axios from \"axios\";\nimport { Node, SerializedNode } from \"pages/management/node/types\";\nimport AppEnvironment from \"services/appEnvironment\";\nimport APIUtils from \"services/api/utils\";\nimport { deattribute, serialise } from \"kitsu-core\";\nimport { Job } from \"services/jobs/types\";\nimport { CLUSTERS_ENDPOINT, NODES_ENDPOINT } from \"services/api/const\";\n\nclass NodesAPI {\n\tstatic async fetchList(clusterID: number): Promise {\n\t\ttry {\n\t\t\tconst nodesResponse = await Axios.get(\n\t\t\t\t`${APIUtils.getBaseURL()}/${CLUSTERS_ENDPOINT}/${clusterID}/${NODES_ENDPOINT}`\n\t\t\t);\n\n\t\t\treturn nodesResponse.data.data.map((item: SerializedNode) =>\n\t\t\t\tdeattribute({ ...item })\n\t\t\t);\n\t\t} catch (e) {\n\t\t\tthrow new Error(APIUtils.APIErrorResponseHandler(e));\n\t\t}\n\t}\n\n\tstatic async create(node: Node): Promise<{ job: Job; node: Node }> {\n\t\ttry {\n\t\t\tconst data = serialise(\"nodes\", node, \"POST\");\n\t\t\tconsole.log(\"create node\", data);\n\t\t\tconst response = await axios.post(\n\t\t\t\t`${APIUtils.getBaseURL()}/${CLUSTERS_ENDPOINT}/${\n\t\t\t\t\tnode.clusterID\n\t\t\t\t}/${NODES_ENDPOINT}`,\n\t\t\t\tdata\n\t\t\t);\n\n\t\t\tconsole.log(\"response\", response);\n\t\t\tconst createdNode = deattribute(response.data.data) as Node;\n\t\t\tconst job = response.data.meta.jobInfo as Job;\n\n\t\t\t// appStore.dispatch(jobCreated(job));\n\n\t\t\treturn { job: { ...job }, node: { ...createdNode } };\n\t\t} catch (e) {\n\t\t\tthrow new Error(APIUtils.APIErrorResponseHandler(e));\n\t\t}\n\n\t\t// return await Axios.post(\n\t\t// \t`${AppEnvironment.getApiAddress()}/${AppEnvironment.getApiVersion()}/nodes`,\n\t\t// \tnode,\n\t\t// \t{\n\t\t// \t\ttransformRequest: (requestData: Node) => {\n\t\t// \t\t\t// console.log(\"requestData\", requestData);\n\t\t// \t\t\treturn JSON.stringify({\n\t\t// \t\t\t\t...requestData,\n\t\t// \t\t\t\tsettings: {\n\t\t// \t\t\t\t\tlogs: {\n\t\t// \t\t\t\t\t\tgeneralLog: {\n\t\t// \t\t\t\t\t\t\tenabled: requestData.settings.logs.generalLog.enabled\n\t\t// \t\t\t\t\t\t\t\t? \"ON\"\n\t\t// \t\t\t\t\t\t\t\t: \"OFF\"\n\t\t// \t\t\t\t\t\t}\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t}\n\t\t// \t\t\t});\n\t\t// \t\t}\n\t\t// \t}\n\t\t// );\n\t}\n\n\tstatic async start(node: Node): Promise {\n\t\tconsole.log(\"start node\", node);\n\t\ttry {\n\t\t\tconst response = await Axios.post(\n\t\t\t\t`${AppEnvironment.getApiAddress()}/${AppEnvironment.getApiVersion()}/tasks`,\n\t\t\t\t{\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\tclusterID: node.clusterID,\n\t\t\t\t\t\t\t\tnodeID: node.id\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttype: \"node-start\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttype: \"tasks\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tconst job = response.data.meta.jobInfo as Job;\n\t\t\t// appStore.dispatch(jobCreated(job));\n\n\t\t\treturn job;\n\t\t} catch (e) {\n\t\t\tthrow new Error(APIUtils.APIErrorResponseHandler(e));\n\t\t}\n\t}\n\n\tstatic async stop(node: Node): Promise {\n\t\ttry {\n\t\t\tconst response = await Axios.post(\n\t\t\t\t`${AppEnvironment.getApiAddress()}/${AppEnvironment.getApiVersion()}/tasks`,\n\t\t\t\t{\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\tclusterID: node.clusterID,\n\t\t\t\t\t\t\t\tnodeID: node.id\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttype: \"node-stop\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttype: \"tasks\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tconst job = response.data.meta.jobInfo as Job;\n\t\t\t// appStore.dispatch(jobCreated(job));\n\n\t\t\treturn job;\n\t\t} catch (e) {\n\t\t\tthrow new Error(APIUtils.APIErrorResponseHandler(e));\n\t\t}\n\t}\n\n\tstatic async toggleGeneralLog(node: Node): Promise {\n\t\t// console.log(\"toggle\", node);\n\t\ttry {\n\t\t\tconst response = await Axios.post(\n\t\t\t\t`${AppEnvironment.getApiAddress()}/${AppEnvironment.getApiVersion()}/tasks`,\n\t\t\t\t{\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\tclusterID: node.clusterID,\n\t\t\t\t\t\t\t\tlogSettings: {\n\t\t\t\t\t\t\t\t\tenabled: !node.settings.logs.generalLog.enabled,\n\t\t\t\t\t\t\t\t\tpath: node.settings.logs.generalLog.path\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tnodeID: node.id\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttype: \"node-general-log-settings\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttype: \"tasks\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tconst job = response.data.meta.jobInfo as Job;\n\t\t\t// appStore.dispatch(jobCreated(job));\n\n\t\t\treturn job;\n\t\t} catch (e) {\n\t\t\tthrow new Error(APIUtils.APIErrorResponseHandler(e));\n\t\t}\n\t}\n}\n\nexport default NodesAPI;\n","import {\n\tNODE_ACTION,\n\tNodeListFetchSucceededAction\n} from \"pages/management/node/types\";\nimport { Node } from \"pages/management/node/types\";\n\nexport const nodeListFetchRequested = (clusterID: number) => ({\n\ttype: NODE_ACTION.LIST_FETCH_REQUESTED,\n\tpayload: {\n\t\tclusterID\n\t}\n});\n\nexport const nodeListFetchSucceeded = (\n\tclusterID: number,\n\tnodeList: Node[]\n): NodeListFetchSucceededAction => ({\n\ttype: NODE_ACTION.LIST_FETCH_SUCCEEDED,\n\tpayload: {\n\t\tclusterID,\n\t\tnodeList\n\t}\n});\n\nexport const nodeCreateRequested = (node: Node) => ({\n\ttype: NODE_ACTION.CREATE_REQUESTED,\n\tpayload: {\n\t\tnode\n\t}\n});\n\nexport const nodeCreateSucceeded = (node: Node) => ({\n\ttype: NODE_ACTION.CREATE_SUCCEEDED,\n\tpayload: {\n\t\tnode\n\t}\n});\n","import { call, put } from \"typed-redux-saga\";\nimport { takeLatest } from \"redux-saga/effects\";\nimport NodesAPI from \"services/api/NodesAPI\";\nimport {\n\tNODE_ACTION,\n\tNodeCreateRequestedAction,\n\tNodeListFetchRequestedAction\n} from \"pages/management/node/types\";\nimport {\n\tnodeCreateSucceeded,\n\tnodeListFetchSucceeded\n} from \"store/node/actions\";\n\nfunction* fetchNodeList(action: NodeListFetchRequestedAction) {\n\t// console.log(\"fetchNodeList saga\");\n\n\tconst { clusterID } = action.payload;\n\ttry {\n\t\t// todo:\n\t\tconst nodeList = yield* call(NodesAPI.fetchList, clusterID);\n\t\t// console.log(\"saga node list fetched\", nodeList);\n\n\t\tyield put(nodeListFetchSucceeded(clusterID, nodeList));\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n}\n\nfunction* createNode(action: NodeCreateRequestedAction) {\n\tyield call(NodesAPI.create, action.payload.node);\n\tyield put(nodeCreateSucceeded(action.payload.node));\n}\n\nfunction* NodeSideEffects() {\n\tyield takeLatest(NODE_ACTION.LIST_FETCH_REQUESTED, fetchNodeList);\n\tyield takeLatest(NODE_ACTION.CREATE_REQUESTED, createNode);\n}\n\nexport default NodeSideEffects;\n","export default __webpack_public_path__ + \"static/media/gc_logo_orange.8c3f09e7.png\";","import { User } from \"pages/users/types\";\nimport {\n\tAUTH_ACTION,\n\tAuthBootCheck,\n\tAuthFetchJWT,\n\tAuthFetchJWTFailed,\n\tAuthFetchJWTSuccess,\n\tAuthLogin,\n\tAuthLoginFailed,\n\tAuthLoginSuccess,\n\tAuthLogout,\n\tAuthLogoutFailed,\n\tAuthLogoutSuccess\n} from \"store/auth/stateTypes\";\nimport { Credentials, JwtData } from \"store/auth/types\";\n\nexport const bootAuthCheck = (): AuthBootCheck => ({\n\ttype: AUTH_ACTION.BOOT_CHECK\n});\n\nexport const login = (credentials: Credentials): AuthLogin => ({\n\ttype: AUTH_ACTION.LOGIN,\n\tpayload: {\n\t\tcredentials\n\t}\n});\n\nexport const loginSuccess = (userData: User): AuthLoginSuccess => ({\n\ttype: AUTH_ACTION.LOGIN_SUCCESS,\n\tpayload: {\n\t\tuserData\n\t}\n});\n\nexport const loginFailed = (errorMsg: string): AuthLoginFailed => ({\n\ttype: AUTH_ACTION.LOGIN_FAILED,\n\tpayload: {\n\t\terrorMsg\n\t}\n});\n\nexport const logout = (): AuthLogout => ({\n\ttype: AUTH_ACTION.LOGOUT\n});\n\nexport const logoutSuccess = (): AuthLogoutSuccess => ({\n\ttype: AUTH_ACTION.LOGOUT_SUCCESS\n});\n\nexport const logoutFailed = (errorMsg: string): AuthLogoutFailed => ({\n\ttype: AUTH_ACTION.LOGOUT_FAILED,\n\tpayload: {\n\t\terrorMsg: errorMsg\n\t}\n});\n\nexport const fetchJWT = (): AuthFetchJWT => ({\n\ttype: AUTH_ACTION.FETCH_JWT\n});\n\nexport const fetchJWTSuccess = (\n\tjwtTokenData: JwtData\n): AuthFetchJWTSuccess => ({\n\ttype: AUTH_ACTION.FETCH_JWT_SUCCESS,\n\tpayload: {\n\t\tjwtTokenData\n\t}\n});\n\nexport const fetchJWTFailed = (errorMsg: string): AuthFetchJWTFailed => ({\n\ttype: AUTH_ACTION.FETCH_JWT_FAILED,\n\tpayload: {\n\t\terrorMsg\n\t}\n});\n","import { Button, Typography } from \"@mui/material\";\nimport Card from \"@mui/material/Card\";\nimport CardActions from \"@mui/material/CardActions\";\nimport CardContent from \"@mui/material/CardContent\";\nimport CircularProgress from \"@mui/material/CircularProgress\";\nimport Grid from \"@mui/material/Grid\";\nimport TextField from \"@mui/material/TextField\";\nimport { WithStyles } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { AppState } from \"AppState\";\nimport logo from \"assets/images/gc_logo_orange.png\";\nimport { login } from \"store/auth/actions\";\nimport { Credentials } from \"store/auth/types\";\nimport React, { FormEvent } from \"react\";\nimport { connect } from \"react-redux\";\nimport { styles } from \"pages/login/styles\";\n\n// component local state interface\ninterface LoginComponentState {\n\tcredentials: Credentials;\n}\n\n// PROPS\ninterface LocalProps {}\n\ninterface DispatchProps {\n\tlogin: (credentials: Credentials) => void;\n}\n\ninterface ReduxStateProps {\n\tisLoggingIn: boolean;\n\tloginErrorMsg?: string;\n}\n\ntype LoginComponentProps = LocalProps &\n\tDispatchProps &\n\tReduxStateProps &\n\tWithStyles;\n\n// COMPONENT\nclass LoginComponent extends React.Component<\n\tLoginComponentProps,\n\tLoginComponentState\n> {\n\tconstructor(props: LoginComponentProps) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\tcredentials: {\n\t\t\t\tname: \"\",\n\t\t\t\tpassword: \"\"\n\t\t\t}\n\t\t};\n\t}\n\n\treadonly handleClick = (event: FormEvent) => {\n\t\tevent.preventDefault();\n\n\t\tthis.props.login(this.state.credentials);\n\t};\n\n\trender(): React.ReactNode {\n\t\tconst { credentials } = this.state;\n\t\tconst { classes, isLoggingIn, loginErrorMsg } = this.props;\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tGalera Manager Login\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\t\t\t\tcredentials: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...this.state.credentials,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tname: e.target.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tinputProps={{\n\t\t\t\t\t\t\t\t\t\t\t\t\"data-testid\": \"username\"\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\t\t\t\tcredentials: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...this.state.credentials,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpassword: e.target.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tinputProps={{\n\t\t\t\t\t\t\t\t\t\t\t\t\"data-testid\": \"password\"\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t{!isLoggingIn && loginErrorMsg && (\n\t\t\t\t\t\t\t\t\t\t\t{loginErrorMsg}\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{isLoggingIn && (\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\tLogin\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\n// REDUX MAPPINGS\nconst mapGlobalStateToProps = (state: AppState) => {\n\treturn {\n\t\tisLoggingIn: state.auth.isLoggingIn,\n\t\tloginErrorMsg: state.auth.loginErrorMsg\n\t};\n};\n\nconst mapGlobalDispatchToProps = (dispatch: any) => {\n\treturn {\n\t\tlogin: (credentials: Credentials) => {\n\t\t\tdispatch(login(credentials));\n\t\t}\n\t};\n};\n\nexport default withStyles(styles, { withTheme: true })(\n\tconnect(mapGlobalStateToProps, mapGlobalDispatchToProps)(LoginComponent)\n);\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from \"@mui/styles/createStyles\";\n\nconst loginFormWidth = 340;\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\tlogo: {\n\t\t\tmargin: \"40px\",\n\t\t\theight: \"200px\",\n\t\t\t[theme.breakpoints.down(600)]: {\n\t\t\t\tmargin: \"15px\",\n\t\t\t\theight: \"150px\"\n\t\t\t}\n\t\t},\n\t\tformGridItem: {\n\t\t\t[theme.breakpoints.down(loginFormWidth)]: {\n\t\t\t\twidth: \"100%\"\n\t\t\t}\n\t\t},\n\t\tformContainer: {\n\t\t\twidth: loginFormWidth,\n\t\t\t[theme.breakpoints.down(loginFormWidth)]: {\n\t\t\t\twidth: \"100%\"\n\t\t\t}\n\t\t},\n\t\tloginLoader: {\n\t\t\tmarginRight: 10\n\t\t}\n\t});\n","import { AppState } from \"AppState\";\n\nexport const versionInfoSelector = (state: AppState): string =>\n\tstate.versionInfo;\n","import { Theme } from \"@mui/material\";\nimport { makeStyles } from \"@mui/styles\";\n\nconst useStyles = makeStyles((theme: Theme) => ({\n\tpaper: {\n\t\tmaxWidth: 900,\n\t\tmargin: \"auto\",\n\t\tmarginBottom: theme.spacing(6)\n\t},\n\tcontainer: {\n\t\tpadding: theme.spacing(3),\n\t\t[theme.breakpoints.up(\"sm\")]: {\n\t\t\tpaddingLeft: theme.spacing(6),\n\t\t\tpaddingRight: theme.spacing(6),\n\t\t\tpaddingBottom: theme.spacing(6)\n\t\t}\n\t},\n\tlogoAndTitleContainer: {\n\t\tdisplay: \"flex\",\n\t\tjustifyContent: \"center\",\n\t\talignItems: \"center\",\n\t\tflexWrap: \"wrap\",\n\t\tmarginTop: 10,\n\t\tmarginBottom: 30\n\t},\n\tlogoContainer: {\n\t\tdisplay: \"inline-block\",\n\t\twidth: 100,\n\t\theight: 100,\n\t\tminWidth: 100,\n\t\tmarginRight: theme.spacing(5)\n\t},\n\tlogo: {\n\t\twidth: \"100%\",\n\t\theight: \"100%\"\n\t},\n\ttitle: {\n\t\tdisplay: \"inline-block\"\n\t},\n\ttitleAndVersion: {\n\t\tdisplay: \"flex\",\n\t\tflexDirection: \"column\",\n\t\talignContent: \"flex-end\",\n\t\tpaddingTop: theme.spacing(4)\n\t},\n\tversion: {\n\t\tmarginLeft: theme.spacing(2),\n\t\tcolor: theme.palette.grey[600],\n\t\tlineHeight: 1.2,\n\t\ttextAlign: \"center\",\n\t\t[theme.breakpoints.up(\"sm\")]: {\n\t\t\ttextAlign: \"left\"\n\t\t}\n\t},\n\tparagraph: {},\n\tlink: {},\n\tlatestChanges: {\n\t\tpaddingTop: theme.spacing(8)\n\t},\n\tseeChangesBtn: {\n\t\tmarginTop: theme.spacing(4)\n\t},\n\tchangelogDiv: {\n\t\t\"& h3\": {\n\t\t\tfontSize: 24,\n\t\t\tmarginTop: theme.spacing(4),\n\t\t\tmarginBottom: theme.spacing(3)\n\t\t},\n\t\t\"& ul\": {\n\t\t\tmarginTop: theme.spacing(3)\n\t\t},\n\t\t\"& li\": {\n\t\t\tcolor: theme.palette.grey[700],\n\t\t\tmarginBottom: \"0.5rem\"\n\t\t},\n\t\t\"& span.type\": {\n\t\t\tfontWeight: \"bold\"\n\t\t}\n\t}\n}));\n\nexport default useStyles;\n","import { useEffect, useState } from \"react\";\n// redux\nimport { connect } from \"react-redux\";\nimport { AppState } from \"AppState\";\nimport { versionInfoSelector } from \"store/version/selectors\";\n// MUI\nimport { Box, Button, Link, Paper, Tab, Tabs, Typography } from \"@mui/material\";\nimport useStyles from \"pages/about/styles\";\n// assets\nimport logo from \"assets/images/gc_logo_orange.png\";\n\ninterface ReduxStateProps {\n\tversionInfo: string;\n}\n\ntype Props = ReduxStateProps;\n\nfunction AboutPage(props: Props) {\n\tconst [changelogText, setChangelogText] = useState(\"\");\n\tconst [activeTab, setActiveTab] = useState(0);\n\n\tconst classes = useStyles();\n\n\t// length of \"\" is 5 characters, we want to copy entire unordered list (
    ...
)\n\tconst lastChanges = changelogText.slice(\n\t\t0,\n\t\tchangelogText.indexOf(\"\") + 5\n\t);\n\n\tconst { versionInfo } = props;\n\n\tconst handleChange = (event: any, newValue: number) => {\n\t\tsetActiveTab(newValue);\n\t};\n\n\tconst handleOpenChangelog = () => {\n\t\tsetActiveTab(1);\n\t};\n\n\t// used for MUI tabs\n\tfunction a11yProps(index: number) {\n\t\treturn {\n\t\t\tid: `simple-tab-${index}`,\n\t\t\t\"aria-controls\": `simple-tabpanel-${index}`\n\t\t};\n\t}\n\n\tuseEffect(() => {\n\t\tfetch(\"/docs/changelog-mini/\")\n\t\t\t.then((response) => {\n\t\t\t\treturn response.text();\n\t\t\t})\n\t\t\t.then((data) => {\n\t\t\t\tconst parsedText = parseText(data);\n\t\t\t\tsetChangelogText(parsedText);\n\t\t\t});\n\t}, []); // only fetch during initial page load\n\n\tconst parseText = (text: string) => {\n\t\tlet newText = \"\";\n\t\t// give special design to words for all 3 types of changes\n\t\tnewText = text.replaceAll(\"feature:\", 'feature:');\n\t\tnewText = newText.replaceAll(\"fix:\", 'fix:');\n\t\tnewText = newText.replaceAll(\"misc:\", 'misc:');\n\t\treturn newText;\n\t};\n\n\tconst aboutPage = (\n\t\t<>\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\"Galera\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tGalera Manager\n\t\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t\t\tVersion: {versionInfo}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\n\t\t\t\tRead our{\" \"}\n\t\t\t\t\n\t\t\t\t\tblog post on the new features we have developed\n\t\t\t\t\n\t\t\t\t.\n\t\t\t\n\t\t\t\n\t\t\t\tNeed help with Galera Manager? Contact us on{\" \"}\n\t\t\t\t\n\t\t\t\t\tGithub\n\t\t\t\t\n\t\t\t\t.\n\t\t\t\n\t\t\t\n\t\t\t\tLatest changes\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\tSee previous changes\n\t\t\t\n\t\t\n\t);\n\n\tconst changelogPage = (\n\t\t\n\t);\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\tAbout} {...a11yProps(0)}>\n\t\t\t\t\tChangelog} {...a11yProps(1)} />\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t{(activeTab === 0 && aboutPage) || (activeTab === 1 && changelogPage)}\n\t\t\t\n\t\t\n\t);\n}\n\n// REDUX MAPPINGS\nconst mapStateToProps = (state: AppState) => {\n\treturn {\n\t\tversionInfo: versionInfoSelector(state)\n\t};\n};\n\nexport default connect(mapStateToProps, undefined)(AboutPage);\n","import {\n\tCLUSTER_CREATE_WIZARD_ACTION,\n\tClusterCreateWizardHideAction,\n\tClusterCreateWizardShowAction,\n} from \"pages/management/cluster/clusterCreateWizard/types\";\n\nexport const clusterCreateWizardShow = (): ClusterCreateWizardShowAction => ({\n\ttype: CLUSTER_CREATE_WIZARD_ACTION.SHOW\n});\n\nexport const clusterCreateWizardHide = (): ClusterCreateWizardHideAction => ({\n\ttype: CLUSTER_CREATE_WIZARD_ACTION.HIDE\n});\n","import {\n\tSnackbarActionPayload,\n\tSnackbarActionShow,\n\tSNACKBAR_ACTION,\n\tSnackbarActionHide\n} from \"components/snackbar/types\";\n\nexport const showSnackbar = (\n\tsnackbar: SnackbarActionPayload\n): SnackbarActionShow => ({\n\ttype: SNACKBAR_ACTION.SHOW,\n\tsnackbar\n});\n\nexport const hideSnackbar = (): SnackbarActionHide => ({\n\ttype: SNACKBAR_ACTION.HIDE\n});\n","import {\n\tNODE_CREATE_WIZARD_ACTION,\n\tNodeCreateWizardHideAction,\n\tNodeCreateWizardShowAction\n} from \"pages/management/node/nodeDeploymentDialog/types\";\nimport { Cluster } from \"pages/management/cluster/types\";\n\nexport const nodeCreateWizardShow = (\n\tcluster: Cluster\n): NodeCreateWizardShowAction => ({\n\ttype: NODE_CREATE_WIZARD_ACTION.SHOW,\n\tpayload: {\n\t\tcluster\n\t}\n});\n\nexport const nodeCreateWizardHide = (): NodeCreateWizardHideAction => ({\n\ttype: NODE_CREATE_WIZARD_ACTION.HIDE\n});\n","import { CLUSTER_TYPE } from \"pages/management/cluster/clusterCreateWizard/types\";\nimport { Cluster } from \"pages/management/cluster/types\";\nimport { HOST_TYPE } from \"pages/management/host/types\";\n\nexport default class ClusterUtils {\n\tstatic getClusterType(cluster: Cluster): CLUSTER_TYPE {\n\t\tif (cluster.unmanaged) {\n\t\t\treturn CLUSTER_TYPE.MONITORED;\n\t\t} else if (\n\t\t\t!cluster.unmanaged &&\n\t\t\tcluster.sharedConfig.host.type === HOST_TYPE.UNMANAGED\n\t\t) {\n\t\t\treturn CLUSTER_TYPE.HYBRID;\n\t\t} else if (\n\t\t\t!cluster.unmanaged &&\n\t\t\tcluster.sharedConfig.host.type !== HOST_TYPE.UNMANAGED\n\t\t) {\n\t\t\treturn CLUSTER_TYPE.MANAGED;\n\t\t} else {\n\t\t\tthrow new Error(\"Unknown cluster type.\");\n\t\t}\n\t}\n}\n","import {\n\tCluster,\n\tDEPLOYMENT_STATUS\n} from \"pages/management/cluster/types\";\nimport {\n\tHOST_TYPE_SPECIFIC_AWS_DEFAULT_CONFIG,\n\tHOST_TYPE_SPECIFIC_DIGITAL_OCEAN_DEFAULT_CONFIG\n} from \"pages/management/host/const\";\nimport {\n\tHOST_STATE,\n\tHOST_STATUS,\n\tHOST_SYSTEM,\n\tHOST_TYPE\n} from \"pages/management/host/types\";\n\nclass HostUtils {\n\tstatic getHostSystemEnum = (value: string): HOST_SYSTEM => {\n\t\tswitch (value) {\n\t\t\tcase HOST_SYSTEM.CENTOS_7:\n\t\t\t\treturn HOST_SYSTEM.CENTOS_7;\n\t\t\tcase HOST_SYSTEM.CENTOS_8:\n\t\t\t\treturn HOST_SYSTEM.CENTOS_8;\n\t\t\tcase HOST_SYSTEM.REDHAT_8:\n\t\t\t\treturn HOST_SYSTEM.REDHAT_8;\n\t\t\tcase HOST_SYSTEM.UBUNTU_18:\n\t\t\t\treturn HOST_SYSTEM.UBUNTU_18;\n\t\t\tcase HOST_SYSTEM.UBUNTU_20:\n\t\t\t\treturn HOST_SYSTEM.UBUNTU_20;\n\t\t\tcase HOST_SYSTEM.DEBIAN_10:\n\t\t\t\treturn HOST_SYSTEM.DEBIAN_10;\n\t\t\tcase HOST_SYSTEM.DEBIAN_11:\n\t\t\t\treturn HOST_SYSTEM.DEBIAN_11;\n\t\t\tdefault:\n\t\t\t\tconsole.warn(\n\t\t\t\t\t`Unrecognised host system: ${value}. Returning default value instead.`\n\t\t\t\t);\n\t\t\t\treturn HOST_SYSTEM.UBUNTU_20;\n\t\t}\n\t};\n\n\tstatic getHostTypeEnum = (value: string): HOST_TYPE => {\n\t\tswitch (value) {\n\t\t\t// case HOST_TYPE.LOCAL_LXD:\n\t\t\t// \treturn HOST_TYPE.LOCAL_LXD;\n\t\t\tcase HOST_TYPE.EC2:\n\t\t\t\treturn HOST_TYPE.EC2;\n\t\t\tcase HOST_TYPE.UNMANAGED:\n\t\t\t\treturn HOST_TYPE.UNMANAGED;\n\t\t\tdefault:\n\t\t\t\treturn HOST_TYPE.EC2;\n\t\t}\n\t};\n\n\tstatic getHostTypeSpecificDefaults = (\n\t\thostType: HOST_TYPE,\n\t\tcluster?: Cluster\n\t): any => {\n\t\tswitch (hostType) {\n\t\t\tcase HOST_TYPE.EC2:\n\t\t\t\treturn (\n\t\t\t\t\tcluster?.sharedConfig.host.hostTypeSpecific ||\n\t\t\t\t\tHOST_TYPE_SPECIFIC_AWS_DEFAULT_CONFIG\n\t\t\t\t);\n\t\t\tcase HOST_TYPE.DIGITAL_OCEAN:\n\t\t\t\treturn (\n\t\t\t\t\tcluster?.sharedConfig.host.hostTypeSpecific ||\n\t\t\t\t\tHOST_TYPE_SPECIFIC_DIGITAL_OCEAN_DEFAULT_CONFIG\n\t\t\t\t);\n\t\t\tcase HOST_TYPE.UNMANAGED:\n\t\t\t\treturn {};\n\t\t\t// case HOST_TYPE.LOCAL_LXD:\n\t\t\tdefault:\n\t\t\t\treturn undefined;\n\t\t}\n\t};\n\n\tstatic getHostState(deploymentStatus?: string): HOST_STATE {\n\t\tswitch (deploymentStatus) {\n\t\t\tcase \"pending\":\n\t\t\t\treturn DEPLOYMENT_STATUS.PENDING;\n\t\t\tcase \"error\":\n\t\t\t\treturn DEPLOYMENT_STATUS.FAILURE;\n\t\t\tcase \"ok\":\n\t\t\t\treturn DEPLOYMENT_STATUS.SUCCESS;\n\n\t\t\tdefault:\n\t\t\t\tconsole.warn(\"Unknown host status:\", deploymentStatus);\n\t\t\t\treturn HOST_STATUS.UNKNOWN;\n\t\t}\n\t}\n}\n\nexport default HostUtils;\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from '@mui/styles/createStyles';\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\troot: {\n\t\t\twidth: \"100%\"\n\t\t}\n\t});\n","import { InputVariant } from \"components/form/types\";\n\nexport const INPUT_VARIANT: InputVariant = \"outlined\";\n","import React, { ChangeEvent } from \"react\";\nimport { WithStyles, WithTheme } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { styles } from \"components/form/dbEngineConfigEditor/styles\";\nimport {\n\tButton,\n\tDialog,\n\tDialogActions,\n\tDialogContent,\n\tDialogContentText,\n\tDialogTitle,\n\tTextField,\n\tTooltip\n} from \"@mui/material\";\nimport { INPUT_VARIANT } from \"components/form/const\";\n\n// default config is used only as indicator that\ninterface LocalProps {\n\tisDialogOpen: boolean;\n\tconfig: string;\n\tonChange: (config: string) => void;\n\tonConfirm: () => void;\n\tonClose: () => void;\n\tinheritedConfig?: string;\n\treadOnly?: boolean;\n\tsubtitleText?: string;\n}\n\ntype Props = LocalProps & WithStyles & WithTheme;\n\nclass DbEngineConfigEditor extends React.PureComponent {\n\trender() {\n\t\tconst {\n\t\t\treadOnly,\n\t\t\tconfig,\n\t\t\tinheritedConfig,\n\t\t\tsubtitleText,\n\t\t\tisDialogOpen,\n\t\t\tonClose,\n\t\t\tonConfirm,\n\t\t\tonChange,\n\t\t\ttheme\n\t\t} = this.props;\n\n\t\tconst isDisabled = readOnly !== undefined ? readOnly : false;\n\t\tconst isInherited = !config && !!inheritedConfig;\n\n\t\tconst dialogRender = () => (\n\t\t\t<>\n\t\t\t\t{theme.breakpoints.up(\"sm\") ? (\n\t\t\t\t\t\n\t\t\t\t\t\t{dialogContentRender()}\n\t\t\t\t\t\n\t\t\t\t) : (\n\t\t\t\t\t\n\t\t\t\t\t\t{dialogContentRender()}\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t{/*Mobile */}\n\t\t\t\n\t\t);\n\n\t\tconst dialogContentRender = () => (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\tCustom DB engine configuration editor\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{subtitleText && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{subtitleText}\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\n\t\t\t\t\t) => {\n\t\t\t\t\t\t\tonChange(e.target.value);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\thelperText={isInherited && \"Inherited from cluster\"}\n\t\t\t\t\t\tinputProps={{\n\t\t\t\t\t\t\t\"data-testid\": \"db-engine-config-text-field\",\n\t\t\t\t\t\t\tstyle: { fontFamily: \"monospace\" },\n\t\t\t\t\t\t\tspellCheck: false,\n\t\t\t\t\t\t\tautoComplete: \"off\",\n\t\t\t\t\t\t\tautoCorrect: \"off\",\n\t\t\t\t\t\t\tautoCapitalize: \"off\",\n\t\t\t\t\t\t\treadOnly: readOnly\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{readOnly ? (\n\t\t\t\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{inheritedConfig && (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\tonChange(\"\");\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tReset\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tSet\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t\n\t\t);\n\n\t\treturn <>{dialogRender()};\n\t}\n}\n\nexport default withStyles(styles, { withTheme: true })(DbEngineConfigEditor);\n","import React from \"react\";\nimport { WithStyles, WithTheme } from '@mui/styles';\nimport withStyles from '@mui/styles/withStyles';\nimport { styles } from \"components/form/dbEngineConfigEditor/styles\";\nimport {\n\tAvatar,\n\tIconButton,\n\tList,\n\tListItem,\n\tListItemAvatar,\n\tListItemSecondaryAction,\n\tListItemText,\n\tTooltip\n} from \"@mui/material\";\nimport { Delete, Settings } from \"@mui/icons-material\";\nimport DbEngineConfigEditorComponent from \"components/form/dbEngineConfigEditor/DbEngineConfigEditorComponent\";\n\ninterface LocalState {\n\teditorConfig: string;\n\tisEditorOpen: boolean;\n}\n\ninterface LocalProps {\n\treadOnly?: boolean;\n\tconfig?: string;\n\tinheritedConfig?: string;\n\tonChange?: (config: string) => void;\n\tsubtitleText?: string;\n}\n\ntype Props = LocalProps & WithStyles & WithTheme;\n\nclass DbEngineConfigButtonComponent extends React.PureComponent<\n\tProps,\n\tLocalState\n> {\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tthis.state = { editorConfig: props.config || \"\", isEditorOpen: false };\n\t}\n\n\tonItemClick = (): void => {\n\t\tthis.setState({\n\t\t\teditorConfig: this.props.config || \"\",\n\t\t\tisEditorOpen: true\n\t\t});\n\t};\n\n\t// onConfigChanged = (e: ChangeEvent): void => {\n\t// \te.persist();\n\t// \tconst config = e.target.value;\n\t// \tconsole.log(\"config changed\", config);\n\t// \tthis.setState({ config });\n\t// };\n\n\tonRemoveClick = (): void => {\n\t\tthis.props.onChange && this.props.onChange(\"\");\n\t};\n\n\trender() {\n\t\tconst {\n\t\t\tclasses,\n\t\t\treadOnly,\n\t\t\ttheme,\n\t\t\tconfig,\n\t\t\tinheritedConfig,\n\t\t\tsubtitleText\n\t\t} = this.props;\n\t\tconst { editorConfig, isEditorOpen } = this.state;\n\n\t\tconst isNotEmpty = config || inheritedConfig;\n\t\tconst isConfigInherited = !config && !!inheritedConfig;\n\n\t\tconst ListItemComponent = ListItem as any; // temporary workaround because of bug in TS/MUI: https://github.com/mui-org/material-ui/issues/14971\n\n\t\treturn <>\n \n \n \n \n \n \n \n \n {config && !readOnly && (\n \n \n \n \n \n \n \n )}\n \n \n {\n // console.log(\"on change\", config);\n this.setState({ editorConfig: config });\n }}\n onClose={() => {\n this.setState({ isEditorOpen: false });\n }}\n onConfirm={() => {\n this.setState({ isEditorOpen: false });\n this.props.onChange && this.props.onChange(editorConfig);\n }}\n readOnly={readOnly}\n subtitleText={subtitleText}\n />\n ;\n\t}\n}\n\nexport default withStyles(styles, { withTheme: true })(\n\tDbEngineConfigButtonComponent\n);\n","import {\n\tFormControl,\n\tFormHelperText,\n\tInputLabel,\n\tMenuItem,\n\tSelect\n} from \"@mui/material\";\nimport { IRegion } from \"dots-wrapper/dist/region\";\nimport React, { FormEvent, useState } from \"react\";\n\ninterface LocalProps {\n\toptions: IRegion[];\n\tvalue: string;\n\treadOnly?: boolean;\n\tonChange?: (selectedRegion: string) => void;\n\thelperMsg?: string;\n}\n\nfunction RegionSelectComponent(props: LocalProps) {\n\tconst { readOnly, options, value, onChange } = props;\n\n\tconst [helperMsg, setHelperMsg] = useState(\"\");\n\tconst [isError, setIsError] = useState(false);\n\n\treturn (\n\t\t {\n\t\t\t\te.preventDefault();\n\t\t\t\tconst form = e.target as HTMLFormElement;\n\n\t\t\t\tsetIsError(true);\n\t\t\t\tsetHelperMsg(form.validationMessage);\n\t\t\t}}\n\t\t\terror={isError}\n\t\t>\n\t\t\tRegion\n\t\t\t value}\n\t\t\t\tonChange={(e) => {\n\t\t\t\t\tconst regionSlug = e.target.value as string;\n\n\t\t\t\t\tsetIsError(false);\n\t\t\t\t\tsetHelperMsg(\"\");\n\n\t\t\t\t\tonChange && onChange(regionSlug);\n\t\t\t\t}}\n\t\t\t\tinputProps={{\n\t\t\t\t\tid: \"digital-ocean-region\",\n\t\t\t\t\t\"data-testid\": \"digital-ocean-region-select\"\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{options && options.length > 0 ? (\n\t\t\t\t\toptions.map((region: IRegion) => (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{region.name} {(!region.available && \" (Unavailable)\") || \"\"}\n\t\t\t\t\t\t\n\t\t\t\t\t))\n\t\t\t\t) : (\n\t\t\t\t\t\n\t\t\t\t\t\t{value}\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\n\t\t\t{!readOnly && (\n\t\t\t\t{props.helperMsg || helperMsg}\n\t\t\t)}\n\t\t\n\t);\n}\n\nexport default RegionSelectComponent;\n","// @flow\nimport { Grid, Typography } from \"@mui/material\";\nimport { ISizeExt } from \"components/form/digitalOceanConfig/types\";\n\ninterface Props {\n\tsize: ISizeExt;\n\tdisabled: boolean;\n}\n\nexport function SizeOptionComponent(props: Props) {\n\tconst { size, disabled } = props;\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t{size.slug} {disabled ? \" (Not available)\" : \"\"}\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t{size.vcpus} CPU, {size.memory / 1024} GB RAM, {size.disk} GB Disk,{\" \"}\n\t\t\t\t\t{size.price_monthly} $/mo\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n","import {\n\tFormControl,\n\tFormHelperText,\n\tInputLabel,\n\tListSubheader,\n\tMenuItem,\n\tSelect\n} from \"@mui/material\";\nimport { SizeOptionComponent } from \"components/form/digitalOceanConfig/sizeSelect/sizeOption/SizeOptionComponent\";\nimport { ISizeExt } from \"components/form/digitalOceanConfig/types\";\nimport React, { FormEvent, useState } from \"react\";\n\ninterface LocalProps {\n\toptions: Map;\n\tavailableOptions?: string[];\n\tvalue: string;\n\treadOnly?: boolean;\n\tonChange?: (selectedSizeSlug: string) => void;\n\thelperMsg?: string;\n}\n\nfunction SizeSelectComponent(props: LocalProps) {\n\tconst { readOnly, options, value, onChange, availableOptions } = props;\n\n\tconst [helperMsg, setHelperMsg] = useState(\"\");\n\tconst [isError, setIsError] = useState(false);\n\n\treturn (\n\t\t {\n\t\t\t\te.preventDefault();\n\t\t\t\tconst form = e.target as HTMLFormElement;\n\n\t\t\t\tsetIsError(true);\n\t\t\t\tsetHelperMsg(form.validationMessage);\n\t\t\t}}\n\t\t\terror={isError}\n\t\t>\n\t\t\tDroplet size\n\t\t\t value}\n\t\t\t\tdisabled={!options || readOnly}\n\t\t\t\tvalue={value}\n\t\t\t\tonChange={(e) => {\n\t\t\t\t\tconst sizeSlug = e.target.value as string;\n\n\t\t\t\t\tsetIsError(false);\n\t\t\t\t\tsetHelperMsg(\"\");\n\n\t\t\t\t\tonChange && onChange(sizeSlug);\n\t\t\t\t}}\n\t\t\t\tinputProps={{\n\t\t\t\t\tid: \"digital-ocean-size\",\n\t\t\t\t\t\"data-testid\": \"digital-ocean-size-select\"\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{options && options.size > 0 ? (\n\t\t\t\t\tArray.from(options).map((value: [string, ISizeExt[]]) => {\n\t\t\t\t\t\tconst categoryName = value[0];\n\t\t\t\t\t\tconst sizes = value[1];\n\n\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\t{categoryName.toUpperCase()},\n\t\t\t\t\t\t\tsizes.map((size: ISizeExt) => (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t))\n\t\t\t\t\t\t];\n\t\t\t\t\t})\n\t\t\t\t) : (\n\t\t\t\t\t\n\t\t\t\t\t\t{value}\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\n\t\t\t{!readOnly && (\n\t\t\t\t{props.helperMsg || helperMsg}\n\t\t\t)}\n\t\t\n\t);\n}\n\nexport default SizeSelectComponent;\n","import { ISizeExt } from \"components/form/digitalOceanConfig/types\";\n\nexport default class DigitalOceanUtils {\n\t/**\n\t * @desc coverts array of sizes to map (with description being a key) and sorts\n\t * @param {ISizeExt[]} sizes\n\t * @returns {Map}\n\t */\n\tstatic convertSizesToMap(sizes: ISizeExt[]): Map {\n\t\tlet categorizedSizes: Map = new Map<\n\t\t\tstring,\n\t\t\tISizeExt[]\n\t\t>();\n\n\t\t// sort by description and fills into map\n\t\tsizes\n\t\t\t.sort((size1: ISizeExt, size2: ISizeExt) =>\n\t\t\t\tsize1.description\n\t\t\t\t\t.toLowerCase()\n\t\t\t\t\t.localeCompare(size2.description.toLowerCase())\n\t\t\t)\n\t\t\t.forEach((size: ISizeExt) => {\n\t\t\t\tconst categoryName = size.description;\n\t\t\t\tconst sizesInCategory = categorizedSizes.get(categoryName);\n\n\t\t\t\tif (!sizesInCategory) {\n\t\t\t\t\tcategorizedSizes.set(categoryName, [size]);\n\t\t\t\t} else {\n\t\t\t\t\tcategorizedSizes.set(categoryName, [...sizesInCategory, size]);\n\t\t\t\t}\n\t\t\t});\n\n\t\t// sort sizes in map by price\n\t\tcategorizedSizes.forEach((sizes: ISizeExt[], category: string) => {\n\t\t\t// console.log(\"category\", category);\n\t\t\tcategorizedSizes.set(\n\t\t\t\tcategory,\n\t\t\t\tsizes.sort(\n\t\t\t\t\t(size1: ISizeExt, size2: ISizeExt) =>\n\t\t\t\t\t\tsize1.price_monthly - size2.price_monthly\n\t\t\t\t)\n\t\t\t);\n\t\t});\n\n\t\treturn categorizedSizes;\n\t}\n\n\tstatic getSelectFieldMessage(\n\t\tisAccessTokenVerified: boolean,\n\t\tisLoading: boolean,\n\t\tmsg: string = \"\"\n\t): string {\n\t\tif (!isAccessTokenVerified) {\n\t\t\treturn \"Enter valid DigitalOcean access token\";\n\t\t} else if (isLoading) {\n\t\t\treturn \"Loading options from DigitalOcean...\";\n\t\t} else {\n\t\t\treturn msg;\n\t\t}\n\t}\n}\n","// @flow\nimport { CircularProgress, InputAdornment, Tooltip } from \"@mui/material\";\n\ninterface LocalProps {\n\ttooltipTitle?: string;\n}\n\nexport function LoadingAdornment(props: LocalProps) {\n\treturn (\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
\n\t);\n};","// @flow\nimport { VerifiedUser } from \"@mui/icons-material\";\nimport { InputAdornment, Tooltip } from \"@mui/material\";\n\nexport function VerifiedAdornment() {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n","import axios from \"axios\";\nimport { ISizeExt } from \"components/form/digitalOceanConfig/types\";\nimport { createApiClient } from \"dots-wrapper/dist\";\nimport { IAccount } from \"dots-wrapper/dist/account\";\nimport { IRegion } from \"dots-wrapper/dist/region\";\n\nconst URL = \"https://api.digitalocean.com/v2\";\n\nexport default class DigitalOceanAPI {\n\tstatic async verifyToken(\n\t\ttoken: string,\n\t\tabortController?: AbortController\n\t): Promise {\n\t\treturn new Promise(async (resolve, reject) => {\n\t\t\ttry {\n\t\t\t\tconst { data } = await axios.get(`${URL}/account`, {\n\t\t\t\t\theaders: {\n\t\t\t\t\t\tauthorization: `Bearer ${token}}`\n\t\t\t\t\t},\n\t\t\t\t\tsignal: abortController?.signal\n\t\t\t\t});\n\t\t\t\tresolve(data.account);\n\t\t\t} catch (error: any) {\n\t\t\t\treject(error);\n\t\t\t}\n\t\t});\n\t}\n\n\tstatic async fetchRegions(token: string): Promise {\n\t\tconst dots = createApiClient({ token });\n\n\t\tconst {\n\t\t\tdata: { regions }\n\t\t} = await dots.region.listRegions({ page: 1, per_page: 500 });\n\n\t\treturn regions;\n\t}\n\n\tstatic async fetchAllSizes(token: string): Promise {\n\t\tconst dots = createApiClient({ token });\n\n\t\tconst {\n\t\t\tdata: { sizes }\n\t\t} = await dots.size.listSizes({ page: 1, per_page: 500 });\n\n\t\treturn sizes as ISizeExt[];\n\t}\n}\n","import { FormControl, Grid, TextField } from \"@mui/material\";\nimport RegionSelectComponent from \"components/form/digitalOceanConfig/regionSelect/RegionSelectComponent\";\nimport SizeSelectComponent from \"components/form/digitalOceanConfig/sizeSelect/SizeSelectComponents\";\nimport {\n\tDigitalOceanConfig,\n\tISizeExt\n} from \"components/form/digitalOceanConfig/types\";\nimport DigitalOceanUtils from \"components/form/digitalOceanConfig/utils\";\nimport { LoadingAdornment } from \"components/form/inputAdornments/LoadingAdornment\";\nimport { VerifiedAdornment } from \"components/form/inputAdornments/VerifiedAdornment\";\nimport { IRegion } from \"dots-wrapper/dist/region\";\nimport React, { ChangeEvent, FormEvent } from \"react\";\nimport { BehaviorSubject, debounceTime, filter, tap } from \"rxjs\";\nimport DigitalOceanAPI from \"services/api/DigitalOceanAPI\";\nimport { INPUT_VARIANT } from \"components/form/const\";\n\ninterface LocalState {\n\tisValid: boolean;\n\tisTokenVerified: boolean;\n\tisTokenVerifying: boolean;\n\tisTokenError: boolean;\n\ttokenMsg?: string;\n\tregions?: IRegion[];\n\tareRegionsLoading: boolean;\n\tregionMsg?: string;\n\tavailableSizes?: string[];\n\tallSizes: Map;\n\tareSizesLoading: boolean;\n\tsizeMsg?: string;\n}\n\ninterface LocalProps {\n\tconfig: DigitalOceanConfig;\n\tonChange?: (config: DigitalOceanConfig) => void;\n\treadOnly?: boolean;\n\tonValidationChange?: (isValid: boolean) => void;\n\tisSubmitClicked?: boolean;\n}\n\nclass DigitalOceanConfigComponent extends React.PureComponent<\n\tLocalProps,\n\tLocalState\n> {\n\t_accessTokenObservable?: BehaviorSubject;\n\t_tokenVerifyAbortController?: AbortController;\n\n\tconstructor(props: LocalProps) {\n\t\tsuper(props);\n\n\t\tthis._accessTokenObservable = new BehaviorSubject(\n\t\t\tprops.config?.accessToken || \"\"\n\t\t);\n\n\t\tthis.state = {\n\t\t\tisValid: false,\n\t\t\tisTokenVerified: false,\n\t\t\tisTokenVerifying: false,\n\t\t\tisTokenError: false,\n\t\t\tareRegionsLoading: false,\n\t\t\tareSizesLoading: false,\n\t\t\tallSizes: new Map()\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\tthis._accessTokenObservable\n\t\t\t?.pipe(\n\t\t\t\ttap((accessToken: string) => {\n\t\t\t\t\tif (accessToken) {\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tisTokenVerified: false,\n\t\t\t\t\t\t\tisTokenVerifying: true,\n\t\t\t\t\t\t\tisTokenError: false,\n\t\t\t\t\t\t\ttokenMsg: \"Verifying...\"\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tisTokenVerified: false,\n\t\t\t\t\t\t\tisTokenVerifying: false,\n\t\t\t\t\t\t\ttokenMsg: \"Please enter access token\"\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tfilter((accessToken: string) => !!accessToken && !this.props.readOnly),\n\t\t\t\tdebounceTime(2000)\n\t\t\t)\n\t\t\t.subscribe((accessToken: string) => {\n\t\t\t\t// console.log(\"accessToken subject changed\", accessToken);\n\t\t\t\tthis.verifyToken(accessToken);\n\t\t\t});\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis._accessTokenObservable?.unsubscribe();\n\t\tthis.cancelAsyncRequests();\n\t}\n\n\tcomponentDidUpdate(\n\t\tprevProps: Readonly,\n\t\tprevState: Readonly,\n\t\tsnapshot?: any\n\t) {\n\t\tif (\n\t\t\tprevState.isTokenVerified !== this.state.isTokenVerified ||\n\t\t\tprevState.areRegionsLoading !== this.state.areRegionsLoading ||\n\t\t\tprevState.areSizesLoading !== this.state.areSizesLoading\n\t\t) {\n\t\t\tthis.props.onValidationChange &&\n\t\t\t\tthis.props.onValidationChange(\n\t\t\t\t\tthis.state.isTokenVerified &&\n\t\t\t\t\t\t!this.state.areRegionsLoading &&\n\t\t\t\t\t\t!this.state.areSizesLoading\n\t\t\t\t);\n\t\t}\n\t}\n\n\tcancelAsyncRequests() {\n\t\tif (this._tokenVerifyAbortController) {\n\t\t\tthis._tokenVerifyAbortController.abort();\n\t\t\tdelete this._tokenVerifyAbortController;\n\t\t}\n\t}\n\n\tasync verifyToken(accessToken: string) {\n\t\tthis.cancelAsyncRequests();\n\n\t\ttry {\n\t\t\tthis._tokenVerifyAbortController = new AbortController();\n\t\t\tconst account = await DigitalOceanAPI.verifyToken(\n\t\t\t\taccessToken,\n\t\t\t\tthis._tokenVerifyAbortController\n\t\t\t);\n\t\t\tdelete this._tokenVerifyAbortController;\n\n\t\t\tconsole.log(\"token verified\", account);\n\t\t\tthis.setState({\n\t\t\t\tisTokenVerified: true,\n\t\t\t\tisTokenVerifying: false,\n\t\t\t\ttokenMsg: `Account: ${account.email}`\n\t\t\t});\n\n\t\t\tthis.getRegions(accessToken);\n\t\t\tthis.getAllSizes(accessToken);\n\t\t} catch (error: any) {\n\t\t\tconsole.error(\"DigitalOcean access token validation failed\", error);\n\t\t\tthis.setState({\n\t\t\t\tisTokenVerified: false,\n\t\t\t\tisTokenVerifying: false,\n\t\t\t\tisTokenError: true,\n\t\t\t\ttokenMsg:\n\t\t\t\t\terror.response?.data?.message ||\n\t\t\t\t\terror.message ||\n\t\t\t\t\t\"Failed to validate with DigitalOcean\"\n\t\t\t});\n\t\t}\n\t}\n\n\tasync getRegions(accessToken: string) {\n\t\tthis.setState({\n\t\t\tareRegionsLoading: true,\n\t\t\tregions: []\n\t\t});\n\n\t\ttry {\n\t\t\tconst regions = await DigitalOceanAPI.fetchRegions(accessToken);\n\n\t\t\t// console.log(\"regions\", regions);\n\n\t\t\tthis.setState({\n\t\t\t\tregions: regions.sort((region1: IRegion, region2: IRegion) =>\n\t\t\t\t\tregion1.name.toLowerCase().localeCompare(region2.name.toLowerCase())\n\t\t\t\t),\n\t\t\t\tareRegionsLoading: false\n\t\t\t});\n\n\t\t\tthis.checkSelectedRegion(regions);\n\t\t} catch (error: any) {\n\t\t\tconsole.error(\"DigitalOcean regions fetch failed\", error);\n\t\t\tthis.setState({\n\t\t\t\tareRegionsLoading: false,\n\t\t\t\tregionMsg:\n\t\t\t\t\terror.response?.data?.message ||\n\t\t\t\t\terror.message ||\n\t\t\t\t\t\"Failed to load regions from DigitalOcean\"\n\t\t\t});\n\t\t}\n\t}\n\n\tcheckSelectedRegion(regions: IRegion[]) {\n\t\tif (\n\t\t\tthis.props.config.region &&\n\t\t\t!regions\n\t\t\t\t.map((region: IRegion) => region.slug)\n\t\t\t\t.includes(this.props.config.region)\n\t\t) {\n\t\t\tthis.setState({\n\t\t\t\tavailableSizes: [],\n\t\t\t\tregionMsg: `${this.props.config.region} is not available`\n\t\t\t});\n\n\t\t\tconst updatedConfig = {\n\t\t\t\t...this.props.config,\n\t\t\t\tregion: \"\"\n\t\t\t};\n\n\t\t\tthis.props.onChange && this.props.onChange(updatedConfig);\n\t\t}\n\t}\n\n\tasync getAllSizes(accessToken: string) {\n\t\tthis.setState({\n\t\t\tallSizes: new Map(),\n\t\t\tareSizesLoading: true\n\t\t});\n\n\t\ttry {\n\t\t\tconst sizes = await DigitalOceanAPI.fetchAllSizes(accessToken);\n\t\t\tconst sizesMap = DigitalOceanUtils.convertSizesToMap(sizes);\n\n\t\t\tthis.setState({\n\t\t\t\tallSizes: sizesMap,\n\t\t\t\tareSizesLoading: false\n\t\t\t});\n\t\t} catch (error: any) {\n\t\t\tconsole.error(\"DigitalOcean sizes fetch failed\", error);\n\t\t\tthis.setState({\n\t\t\t\tareSizesLoading: false,\n\t\t\t\tsizeMsg:\n\t\t\t\t\terror.response?.data?.message ||\n\t\t\t\t\terror.message ||\n\t\t\t\t\t\"Failed to load sizes from DigitalOcean\"\n\t\t\t});\n\t\t}\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tisTokenVerified,\n\t\t\tisTokenVerifying,\n\t\t\tisTokenError,\n\t\t\ttokenMsg,\n\t\t\tareRegionsLoading,\n\t\t\tregionMsg,\n\t\t\tareSizesLoading,\n\t\t\tsizeMsg,\n\t\t\tregions,\n\t\t\tavailableSizes,\n\t\t\tallSizes\n\t\t} = this.state;\n\t\tconst { config, onChange, readOnly, isSubmitClicked } = this.props;\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\tconst form = e.target as HTMLFormElement;\n\n\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\tisTokenError: true,\n\t\t\t\t\t\t\t\t\ttokenMsg: form.validationMessage as string\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\terror={isTokenError || (isSubmitClicked && isTokenVerifying)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tconst field = e.target as HTMLFormElement;\n\t\t\t\t\t\t\t\t\tconst accessToken = field.value as string;\n\n\t\t\t\t\t\t\t\t\tconst updatedConfig = {\n\t\t\t\t\t\t\t\t\t\t...config,\n\t\t\t\t\t\t\t\t\t\taccessToken\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t\t\tonChange && onChange(updatedConfig);\n\n\t\t\t\t\t\t\t\t\tthis._accessTokenObservable?.next(accessToken);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tInputProps={{\n\t\t\t\t\t\t\t\t\tendAdornment:\n\t\t\t\t\t\t\t\t\t\t!readOnly &&\n\t\t\t\t\t\t\t\t\t\t((isTokenVerified && ) ||\n\t\t\t\t\t\t\t\t\t\t\t(isTokenVerifying && (\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t)))\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t// get available sizes in this region\n\t\t\t\t\t\t\t\tconst selectedRegion = regions?.find((r: IRegion) => {\n\t\t\t\t\t\t\t\t\treturn r.slug === selectedRegionSlug;\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tconst availableSizes = selectedRegion?.sizes || [];\n\n\t\t\t\t\t\t\t\t// check if currently selected size is available in this region\n\t\t\t\t\t\t\t\tconst isSelectedSizeSupported =\n\t\t\t\t\t\t\t\t\t!config.size || availableSizes.includes(config.size);\n\n\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\tavailableSizes,\n\t\t\t\t\t\t\t\t\tregionMsg: \"\",\n\t\t\t\t\t\t\t\t\tsizeMsg: isSelectedSizeSupported\n\t\t\t\t\t\t\t\t\t\t? state.sizeMsg\n\t\t\t\t\t\t\t\t\t\t: `${config.size} not available in ${\n\t\t\t\t\t\t\t\t\t\t\t\tselectedRegion?.name || selectedRegionSlug\n\t\t\t\t\t\t\t\t\t\t } region`\n\t\t\t\t\t\t\t\t}));\n\n\t\t\t\t\t\t\t\tconst updatedConfig = {\n\t\t\t\t\t\t\t\t\t...config,\n\t\t\t\t\t\t\t\t\tregion: selectedRegionSlug,\n\t\t\t\t\t\t\t\t\tsize: isSelectedSizeSupported ? config.size : \"\"\n\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t\tonChange && onChange(updatedConfig);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tconst updatedConfig = {\n\t\t\t\t\t\t\t\t\t...config,\n\t\t\t\t\t\t\t\t\tsize: selectedSizeSlug\n\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t\tonChange && onChange(updatedConfig);\n\n\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\tsizeMsg: \"\"\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default DigitalOceanConfigComponent;\n","import {\n\tDescribeInstanceTypesCommand,\n\tDescribeRegionsCommand,\n\tDescribeRegionsCommandOutput,\n\tEC2Client,\n\tInstanceTypeInfo,\n\tRegion\n} from \"@aws-sdk/client-ec2\";\n\nexport default class AWSUtils {\n\tstatic async fetchAvailableRegions(\n\t\taccessKeyId: string,\n\t\tsecretAccessKey: string\n\t): Promise {\n\t\tconst client = new EC2Client({\n\t\t\tregion: \"eu-central-1\",\n\t\t\tcredentials: {\n\t\t\t\taccessKeyId,\n\t\t\t\tsecretAccessKey\n\t\t\t}\n\t\t});\n\n\t\tconst fetchRegions = new DescribeRegionsCommand({ AllRegions: true });\n\t\tlet availableRegions: Region[] = [];\n\n\t\tconst data: DescribeRegionsCommandOutput = await client.send(fetchRegions);\n\n\t\t// console.log(\"EC2 available regions\", data);\n\n\t\tclient.destroy();\n\t\tavailableRegions = data.Regions || [];\n\t\t// console.log(\"availableRegions\", availableRegions);\n\t\treturn availableRegions.sort((a: Region, b: Region) => {\n\t\t\tif (!a.RegionName) {\n\t\t\t\treturn -1;\n\t\t\t} else if (!b.RegionName) {\n\t\t\t\treturn 1;\n\t\t\t} else {\n\t\t\t\treturn a.RegionName.toLowerCase().localeCompare(\n\t\t\t\t\tb.RegionName.toLowerCase()\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\t}\n\n\tstatic async fetchAvailableInstanceTypes(\n\t\taccessKeyId: string,\n\t\tsecretAccessKey: string,\n\t\tdefaultRegion: string = \"eu-central-1\"\n\t): Promise {\n\t\t// console.log(\"fetchAvailableInstanceTypes\", defaultRegion);\n\t\tconst client = new EC2Client({\n\t\t\tregion: defaultRegion,\n\t\t\tcredentials: {\n\t\t\t\taccessKeyId,\n\t\t\t\tsecretAccessKey\n\t\t\t}\n\t\t});\n\n\t\tconst fetchInstanceTypes = new DescribeInstanceTypesCommand({});\n\t\tlet availableInstanceTypes: InstanceTypeInfo[] = [];\n\n\t\tconst data = await client.send(fetchInstanceTypes);\n\t\t// console.log(\"instance types data\", data);\n\n\t\tdata.InstanceTypes && availableInstanceTypes.push(...data.InstanceTypes);\n\n\t\tlet nextToken = data.NextToken;\n\n\t\twhile (nextToken) {\n\t\t\tconst fetchNextInstanceTypes = new DescribeInstanceTypesCommand({\n\t\t\t\tNextToken: nextToken\n\t\t\t});\n\t\t\tconst nextData = await client.send(fetchNextInstanceTypes);\n\t\t\t// console.log(\"instance types next\", nextData);\n\n\t\t\tnextData.InstanceTypes &&\n\t\t\t\tavailableInstanceTypes.push(...nextData.InstanceTypes);\n\n\t\t\tnextToken = nextData.NextToken;\n\t\t}\n\n\t\tclient.destroy();\n\n\t\treturn availableInstanceTypes.sort(\n\t\t\t(a: InstanceTypeInfo, b: InstanceTypeInfo) => {\n\t\t\t\tif (!a.InstanceType) {\n\t\t\t\t\treturn -1;\n\t\t\t\t} else if (!b.InstanceType) {\n\t\t\t\t\treturn 1;\n\t\t\t\t} else {\n\t\t\t\t\t// sort by prefix, then by # of VCPUs and then RAM\n\t\t\t\t\tconst class1 = a.InstanceType.split(\".\")[0];\n\t\t\t\t\tconst class2 = b.InstanceType.split(\".\")[0];\n\t\t\t\t\tif (class1 > class2) return 1;\n\t\t\t\t\telse if (class1 < class2) return -1;\n\t\t\t\t\telse {\n\t\t\t\t\t\tconst vcpu1 = a.VCpuInfo?.DefaultVCpus || 0;\n\t\t\t\t\t\tconst vcpu2 = b.VCpuInfo?.DefaultVCpus || 0;\n\t\t\t\t\t\tif (vcpu1 > vcpu2) return 1;\n\t\t\t\t\t\telse if (vcpu1 < vcpu2) return -1;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tconst mem1 = a.MemoryInfo?.SizeInMiB || 0;\n\t\t\t\t\t\t\tconst mem2 = b.MemoryInfo?.SizeInMiB || 0;\n\n\t\t\t\t\t\t\treturn mem1 - mem2;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n}\n","// AWS\nimport { InstanceTypeInfo, Region } from \"@aws-sdk/client-ec2\";\nimport { VerifiedUser } from \"@mui/icons-material\";\n// MUI\nimport {\n\tCircularProgress,\n\tFormControl,\n\tFormHelperText,\n\tGrid,\n\tInputAdornment,\n\tInputLabel,\n\tMenuItem,\n\tSelect,\n\tTextField,\n\tTooltip\n} from \"@mui/material\";\n\nimport { EC2Config } from \"pages/management/host/types\";\nimport AWSUtils from \"components/form/ec2Config/AWSUtils\";\nimport { LoadingAdornment } from \"components/form/inputAdornments/LoadingAdornment\";\nimport { VerifiedAdornment } from \"components/form/inputAdornments/VerifiedAdornment\";\nimport React, { ChangeEvent, FormEvent } from \"react\";\nimport { INPUT_VARIANT } from \"components/form/const\";\n\ninterface LocalState {\n\tformValidation: {\n\t\tawsAccessKeyID?: {\n\t\t\tisInvalid: boolean;\n\t\t\tmessage: string;\n\t\t};\n\t\tawsSecretAccessKey?: {\n\t\t\tisInvalid: boolean;\n\t\t\tmessage: string;\n\t\t};\n\t\tawsEC2Region?: {\n\t\t\tisInvalid: boolean;\n\t\t\tmessage: string;\n\t\t};\n\t\tawsEC2InstanceType?: {\n\t\t\tisInvalid: boolean;\n\t\t\tmessage: string;\n\t\t};\n\t\tareAwsCredentialsVerified: boolean;\n\t\tareAwsCredentialsBeingVerified: boolean;\n\t\tareAvailableInstanceTypesLoading: boolean;\n\t};\n\tavailableRegions?: Region[];\n\tavailableInstanceTypes?: InstanceTypeInfo[];\n}\n\ninterface LocalProps {\n\tconfig: EC2Config;\n\tonChange?: (ec2Config: EC2Config, isValid?: boolean) => void;\n\treadOnly?: boolean;\n\trequirements: {\n\t\tminRAM: number;\n\t};\n\tonValidationChange?: (isValid: boolean) => void;\n}\n\ntype Props = LocalProps;\n\nclass EC2ConfigComponent extends React.PureComponent {\n\tec2CredentialsVerificationTimeout?: ReturnType;\n\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tlet availableRegions: Region[] = [];\n\n\t\tif (props.config.region) {\n\t\t\tavailableRegions.push({ RegionName: props.config.region });\n\t\t}\n\n\t\tthis.state = {\n\t\t\tformValidation: {\n\t\t\t\tareAwsCredentialsVerified: false,\n\t\t\t\tareAwsCredentialsBeingVerified: false,\n\t\t\t\tareAvailableInstanceTypesLoading: false\n\t\t\t},\n\t\t\tavailableRegions\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\tif (\n\t\t\t!this.props.readOnly &&\n\t\t\tthis.props.config.accessKeyID &&\n\t\t\tthis.props.config.secretAccessKey\n\t\t) {\n\t\t\tthis.fetchEC2Data(\n\t\t\t\tthis.props.config.accessKeyID,\n\t\t\t\tthis.props.config.secretAccessKey\n\t\t\t);\n\t\t}\n\t}\n\n\tvalidate() {}\n\n\tcomponentDidUpdate(\n\t\tprevProps: Readonly,\n\t\tprevState: Readonly,\n\t\tsnapshot?: any\n\t) {\n\t\t// update validation status\n\t\tif (\n\t\t\tprevState.formValidation.areAwsCredentialsVerified !==\n\t\t\t\tthis.state.formValidation.areAwsCredentialsVerified ||\n\t\t\tprevState.formValidation.areAvailableInstanceTypesLoading !==\n\t\t\t\tthis.state.formValidation.areAvailableInstanceTypesLoading\n\t\t) {\n\t\t\tthis.props.onValidationChange &&\n\t\t\t\tthis.props.onValidationChange(\n\t\t\t\t\tthis.state.formValidation.areAwsCredentialsVerified &&\n\t\t\t\t\t\t!this.state.formValidation.areAvailableInstanceTypesLoading\n\t\t\t\t);\n\t\t}\n\n\t\t// check min system requirements\n\t\t// if (prevProps.requirements.minRAM !== this.props.requirements.minRAM) {\n\t\t// \t// fetch instance type properties\n\t\t// \tconst selectedInstanceType = this.state.availableInstanceTypes?.find(\n\t\t// \t\t(instanceType: InstanceTypeInfo) =>\n\t\t// \t\t\tinstanceType.InstanceType === this.props.config.instanceType\n\t\t// \t);\n\t\t//\n\t\t// \t// console.log(\"selectedInstanceType\", selectedInstanceType);\n\t\t//\n\t\t// \tif (\n\t\t// \t\tselectedInstanceType &&\n\t\t// \t\tselectedInstanceType.MemoryInfo &&\n\t\t// \t\tselectedInstanceType.MemoryInfo.SizeInMiB &&\n\t\t// \t\tselectedInstanceType.MemoryInfo.SizeInMiB <\n\t\t// \t\t\tthis.props.requirements.minRAM\n\t\t// \t) {\n\t\t// \t\tthis.props.onChange &&\n\t\t// \t\t\tthis.props.onChange({\n\t\t// \t\t\t\t...this.props.config,\n\t\t// \t\t\t\tinstanceType: \"\"\n\t\t// \t\t\t});\n\t\t//\n\t\t// \t\tthis.setState((state: LocalState) => ({\n\t\t// \t\t\t...state,\n\t\t// \t\t\tformValidation: {\n\t\t// \t\t\t\t...state.formValidation,\n\t\t// \t\t\t\tawsEC2InstanceType: {\n\t\t// \t\t\t\t\tisInvalid: true,\n\t\t// \t\t\t\t\tmessage: `${selectedInstanceType.InstanceType} does not have enough RAM to support selected DB engine.`\n\t\t// \t\t\t\t}\n\t\t// \t\t\t}\n\t\t// \t\t}));\n\t\t// \t}\n\t\t// }\n\t}\n\n\tasync fetchEC2Data(accessKeyId: string, secretAccessKey: string) {\n\t\t// console.log(\"fetchEC2Data\");\n\t\tthis.setState((state: LocalState) => ({\n\t\t\t...state,\n\t\t\tformValidation: {\n\t\t\t\t...state.formValidation,\n\t\t\t\tareAwsCredentialsVerified: false,\n\t\t\t\tareAwsCredentialsBeingVerified: true\n\t\t\t}\n\t\t}));\n\n\t\tif (this.ec2CredentialsVerificationTimeout) {\n\t\t\t// console.log(\"timeout active, clearing\");\n\t\t\tclearTimeout(this.ec2CredentialsVerificationTimeout);\n\t\t\tthis.ec2CredentialsVerificationTimeout = undefined;\n\t\t} else {\n\t\t\t// console.log(\"timeout not active\");\n\t\t}\n\n\t\tthis.ec2CredentialsVerificationTimeout = setTimeout(async () => {\n\t\t\tif (this.ec2CredentialsVerificationTimeout) {\n\t\t\t\t// console.log(\"timeout finished\");\n\t\t\t\tclearTimeout(this.ec2CredentialsVerificationTimeout);\n\t\t\t\tthis.ec2CredentialsVerificationTimeout = undefined;\n\t\t\t}\n\t\t\tlet ec2Regions: Region[] = [];\n\n\t\t\ttry {\n\t\t\t\tec2Regions = await AWSUtils.fetchAvailableRegions(\n\t\t\t\t\taccessKeyId,\n\t\t\t\t\tsecretAccessKey\n\t\t\t\t);\n\t\t\t} catch (error: any) {\n\t\t\t\tconsole.warn(\"Error fetching available EC2 regions:\", error);\n\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t...state,\n\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\tawsAccessKeyID: {\n\t\t\t\t\t\t\tisInvalid: true,\n\t\t\t\t\t\t\tmessage: error.message\n\t\t\t\t\t\t},\n\t\t\t\t\t\tawsSecretAccessKey: {\n\t\t\t\t\t\t\tisInvalid: true,\n\t\t\t\t\t\t\tmessage: error.message\n\t\t\t\t\t\t},\n\t\t\t\t\t\tareAwsCredentialsVerified: false,\n\t\t\t\t\t\tareAwsCredentialsBeingVerified: false\n\t\t\t\t\t}\n\t\t\t\t}));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet ec2InstanceTypes: InstanceTypeInfo[] = [];\n\n\t\t\ttry {\n\t\t\t\tec2InstanceTypes = await AWSUtils.fetchAvailableInstanceTypes(\n\t\t\t\t\taccessKeyId,\n\t\t\t\t\tsecretAccessKey\n\t\t\t\t);\n\n\t\t\t\t// console.log(\"all instance types\", ec2InstanceTypes);\n\t\t\t} catch (error: any) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t\"Error fetching available EC2 instance types\",\n\t\t\t\t\terror.message\n\t\t\t\t);\n\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t...state,\n\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\tawsAccessKeyID: {\n\t\t\t\t\t\t\tisInvalid: true,\n\t\t\t\t\t\t\tmessage: error.message\n\t\t\t\t\t\t},\n\t\t\t\t\t\tawsSecretAccessKey: {\n\t\t\t\t\t\t\tisInvalid: true,\n\t\t\t\t\t\t\tmessage: error.message\n\t\t\t\t\t\t},\n\t\t\t\t\t\tareAwsCredentialsVerified: false,\n\t\t\t\t\t\tareAwsCredentialsBeingVerified: false\n\t\t\t\t\t}\n\t\t\t\t}));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t...state,\n\t\t\t\tformValidation: {\n\t\t\t\t\t...state.formValidation,\n\t\t\t\t\tawsAccessKeyID: undefined,\n\t\t\t\t\tawsSecretAccessKey: undefined,\n\t\t\t\t\tareAwsCredentialsVerified: true,\n\t\t\t\t\tareAwsCredentialsBeingVerified: false\n\t\t\t\t},\n\t\t\t\tavailableRegions: ec2Regions,\n\t\t\t\tavailableInstanceTypes: ec2InstanceTypes\n\t\t\t}));\n\t\t}, 2000);\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tformValidation,\n\t\t\tavailableRegions,\n\t\t\tavailableInstanceTypes,\n\t\t\tformValidation: { areAwsCredentialsVerified }\n\t\t} = this.state;\n\t\tconst { config, readOnly, onChange, requirements } = this.props;\n\t\t// console.log(\"render\", formValidation.areAwsCredentialsBeingVerified);\n\t\tconst isDisabled = readOnly !== undefined ? readOnly : false;\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\tconst form = e.target as HTMLFormElement;\n\n\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\tawsAccessKeyID: {\n\t\t\t\t\t\t\t\t\t\t\tisInvalid: true,\n\t\t\t\t\t\t\t\t\t\t\tmessage: form.validationMessage\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\terror={formValidation.awsAccessKeyID?.isInvalid}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tconst field = e.target as HTMLFormElement;\n\n\t\t\t\t\t\t\t\t\tonChange &&\n\t\t\t\t\t\t\t\t\t\tonChange({\n\t\t\t\t\t\t\t\t\t\t\t...config,\n\t\t\t\t\t\t\t\t\t\t\taccessKeyID: field.value as string\n\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\tawsAccessKeyID: undefined,\n\t\t\t\t\t\t\t\t\t\t\tawsSecretAccessKey: undefined\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}));\n\n\t\t\t\t\t\t\t\t\tif (config.secretAccessKey && field.value) {\n\t\t\t\t\t\t\t\t\t\tthis.fetchEC2Data(field.value, config.secretAccessKey);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tInputProps={{\n\t\t\t\t\t\t\t\t\tendAdornment:\n\t\t\t\t\t\t\t\t\t\t(formValidation.areAwsCredentialsVerified && (\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t)) ||\n\t\t\t\t\t\t\t\t\t\t(formValidation.areAwsCredentialsBeingVerified && (\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t))\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\tconst form = e.target as HTMLFormElement;\n\n\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\tawsSecretAccessKey: {\n\t\t\t\t\t\t\t\t\t\t\tisInvalid: true,\n\t\t\t\t\t\t\t\t\t\t\tmessage: form.validationMessage\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\terror={formValidation.awsSecretAccessKey?.isInvalid}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tconst field = e.target as HTMLFormElement;\n\n\t\t\t\t\t\t\t\t\tonChange &&\n\t\t\t\t\t\t\t\t\t\tonChange({\n\t\t\t\t\t\t\t\t\t\t\t...config,\n\t\t\t\t\t\t\t\t\t\t\tsecretAccessKey: field.value as string\n\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\tawsSecretAccessKey: undefined,\n\t\t\t\t\t\t\t\t\t\t\tawsAccessKeyID: undefined\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}));\n\n\t\t\t\t\t\t\t\t\tif (config.accessKeyID && field.value) {\n\t\t\t\t\t\t\t\t\t\tthis.fetchEC2Data(config.accessKeyID, field.value);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tInputProps={{\n\t\t\t\t\t\t\t\t\tendAdornment:\n\t\t\t\t\t\t\t\t\t\t(formValidation.areAwsCredentialsVerified && (\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t)) ||\n\t\t\t\t\t\t\t\t\t\t(formValidation.areAwsCredentialsBeingVerified && (\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t))\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\tconst form = e.target as HTMLFormElement;\n\n\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\tawsEC2Region: {\n\t\t\t\t\t\t\t\t\t\t\tisInvalid: true,\n\t\t\t\t\t\t\t\t\t\t\tmessage: form.validationMessage\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\terror={formValidation.awsEC2Region?.isInvalid}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tAWS Region\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tconst value = e.target.value as string;\n\n\t\t\t\t\t\t\t\t\t// console.log(\"selected region\", value);\n\n\t\t\t\t\t\t\t\t\tonChange &&\n\t\t\t\t\t\t\t\t\t\tonChange({\n\t\t\t\t\t\t\t\t\t\t\t...config,\n\t\t\t\t\t\t\t\t\t\t\tregion: value\n\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\tawsEC2Region: undefined\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}));\n\n\t\t\t\t\t\t\t\t\t// if credentials are entered, load available instance types\n\t\t\t\t\t\t\t\t\tif (config.accessKeyID && config.secretAccessKey && value) {\n\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\t\tareAvailableInstanceTypesLoading: true\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\tAWSUtils.fetchAvailableInstanceTypes(\n\t\t\t\t\t\t\t\t\t\t\tconfig.accessKeyID,\n\t\t\t\t\t\t\t\t\t\t\tconfig.secretAccessKey,\n\t\t\t\t\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\t\t\t\t).then((data: InstanceTypeInfo[]) => {\n\t\t\t\t\t\t\t\t\t\t\t// console.log(\"all instance types\", data);\n\n\t\t\t\t\t\t\t\t\t\t\t// clear instance type selection if not available in this region\n\t\t\t\t\t\t\t\t\t\t\tconst isInstanceTypeStillAvailable =\n\t\t\t\t\t\t\t\t\t\t\t\tconfig.instanceType &&\n\t\t\t\t\t\t\t\t\t\t\t\t!data.some(\n\t\t\t\t\t\t\t\t\t\t\t\t\t(instance) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tinstance.InstanceType === config.instanceType\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\tif (isInstanceTypeStillAvailable) {\n\t\t\t\t\t\t\t\t\t\t\t\tonChange &&\n\t\t\t\t\t\t\t\t\t\t\t\t\tonChange({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...config,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tregion: value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tinstanceType: \"\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\t\t\t\tavailableInstanceTypes: data,\n\t\t\t\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tareAvailableInstanceTypesLoading: false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tawsEC2InstanceType: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisInvalid: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmessage: `'${config.instanceType}' instance is not available in '${config.region}' region`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\t\t\t\tavailableInstanceTypes: data,\n\t\t\t\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tareAvailableInstanceTypesLoading: false\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tinputProps={{\n\t\t\t\t\t\t\t\t\tid: \"aws-region\",\n\t\t\t\t\t\t\t\t\t\"data-testid\": \"aws-region-select\"\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{availableRegions?.map((region: Region) => (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{`${region.RegionName}${\n\t\t\t\t\t\t\t\t\t\t\tregion.OptInStatus === \"not-opted-in\"\n\t\t\t\t\t\t\t\t\t\t\t\t? \" (Not opted in)\"\n\t\t\t\t\t\t\t\t\t\t\t\t: \"\"\n\t\t\t\t\t\t\t\t\t\t} `}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{formValidation.areAwsCredentialsBeingVerified ? (\n\t\t\t\t\t\t\t\tLoading...\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t!readOnly &&\n\t\t\t\t\t\t\t\t(!areAwsCredentialsVerified ? (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tEnter valid AWS Access Key ID and Secret Access Key\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\tformValidation.awsEC2Region?.isInvalid && (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t{formValidation.awsEC2Region?.message}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t))\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\tconst form = e.target as HTMLFormElement;\n\n\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\tawsEC2InstanceType: {\n\t\t\t\t\t\t\t\t\t\t\tisInvalid: true,\n\t\t\t\t\t\t\t\t\t\t\tmessage: form.validationMessage\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\terror={formValidation.awsEC2InstanceType?.isInvalid}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tEC2 Instance Type\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tconst value = e.target.value as string;\n\n\t\t\t\t\t\t\t\t\tonChange &&\n\t\t\t\t\t\t\t\t\t\tonChange({\n\t\t\t\t\t\t\t\t\t\t\t...config,\n\t\t\t\t\t\t\t\t\t\t\tinstanceType: value\n\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\tawsEC2InstanceType: undefined\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tinputProps={{\n\t\t\t\t\t\t\t\t\tid: \"ec2-instance-type\",\n\t\t\t\t\t\t\t\t\t\"data-testid\": \"ec2-instance-type-select\"\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{availableInstanceTypes?.map(\n\t\t\t\t\t\t\t\t\t(instanceType: InstanceTypeInfo) => {\n\t\t\t\t\t\t\t\t\t\tconst isX86 =\n\t\t\t\t\t\t\t\t\t\t\tinstanceType.ProcessorInfo?.SupportedArchitectures?.includes(\n\t\t\t\t\t\t\t\t\t\t\t\t\"x86_64\"\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\tconst notEnoughRAM = instanceType.MemoryInfo?.SizeInMiB\n\t\t\t\t\t\t\t\t\t\t\t? instanceType.MemoryInfo?.SizeInMiB < requirements.minRAM\n\t\t\t\t\t\t\t\t\t\t\t: false;\n\n\t\t\t\t\t\t\t\t\t\tconst isDisabled = !isX86 || notEnoughRAM;\n\n\t\t\t\t\t\t\t\t\t\tconst disableReason =\n\t\t\t\t\t\t\t\t\t\t\t(!isX86 && \"CPU architecture not supported\") ||\n\t\t\t\t\t\t\t\t\t\t\t(notEnoughRAM && \"Not enough resources\");\n\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t{instanceType.InstanceType}{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t{!isDisabled\n\t\t\t\t\t\t\t\t\t\t\t\t\t? `(${\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinstanceType.VCpuInfo?.DefaultVCpus || \"N/A\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t } VCPUs, ${\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(instanceType.MemoryInfo?.SizeInMiB &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinstanceType.MemoryInfo.SizeInMiB / 1024) ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"N/A\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t } GB RAM)`\n\t\t\t\t\t\t\t\t\t\t\t\t\t: `(${disableReason})`}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) || (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{config.instanceType}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{formValidation.areAwsCredentialsBeingVerified ||\n\t\t\t\t\t\t\tformValidation.areAvailableInstanceTypesLoading ? (\n\t\t\t\t\t\t\t\tLoading...\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t!readOnly &&\n\t\t\t\t\t\t\t\t(!areAwsCredentialsVerified ? (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tEnter valid AWS Access Key ID and Secret Access Key\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\tformValidation.awsEC2InstanceType?.isInvalid && (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t{formValidation.awsEC2InstanceType?.message}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t))\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default EC2ConfigComponent;\n","import MaskedInput from \"react-text-mask\";\nimport React from \"react\";\n\ninterface TextMaskCustomProps {\n\tinputRef: (ref: HTMLInputElement | null) => void;\n}\n\nconst ipAddrFieldProps = {\n\tguide: true,\n\tmask: (value: string) => {\n\t\tlet result = [];\n\t\tconst chunks = value.split(\".\");\n\n\t\tfor (let i = 0; i < 4; ++i) {\n\t\t\tconst chunk = (chunks[i] || \"\").replace(/_/gi, \"\");\n\n\t\t\tif (chunk === \"\") {\n\t\t\t\tresult.push(/\\d/, /\\d/, /\\d/, \".\");\n\t\t\t} else if (+chunk === 0) {\n\t\t\t\tresult.push(/\\d/, \".\");\n\t\t\t} else if (\n\t\t\t\tchunks.length < 4 ||\n\t\t\t\t(chunk.length < 3 && chunks[i].indexOf(\"_\") !== -1)\n\t\t\t) {\n\t\t\t\tif (\n\t\t\t\t\t(chunk.length < 2 && +`${chunk}00` > 255) ||\n\t\t\t\t\t(chunk.length < 3 && +`${chunk}0` > 255)\n\t\t\t\t) {\n\t\t\t\t\tresult.push(/\\d/, /\\d/, \".\");\n\t\t\t\t} else {\n\t\t\t\t\tresult.push(/\\d/, /\\d/, /\\d/, \".\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tresult.push(...new Array(chunk.length).fill(/\\d/), \".\");\n\t\t\t}\n\t\t}\n\n\t\tresult = result.slice(0, -1);\n\t\treturn result;\n\t},\n\tpipe: (value: string) => {\n\t\tif (value === \".\" || value.endsWith(\"..\")) return false;\n\n\t\tconst parts = value.split(\".\");\n\n\t\tif (\n\t\t\tparts.length > 4 ||\n\t\t\tparts.some(\n\t\t\t\t(part) => part === \"00\" || parseInt(part) < 0 || parseInt(part) > 255\n\t\t\t)\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn value;\n\t}\n};\n\nexport function IPAddressField(props: TextMaskCustomProps) {\n\tconst { inputRef, ...other } = props;\n\n\treturn (\n\t\t {\n\t\t\t// \tinputRef(ref ? ref.inputElement : null);\n\t\t\t// }}\n\t\t\t// mask={[\n\t\t\t// \t\"(\",\n\t\t\t// \t/[1-9]/,\n\t\t\t// \t/\\d/,\n\t\t\t// \t/\\d/,\n\t\t\t// \t\")\",\n\t\t\t// \t\" \",\n\t\t\t// \t/\\d/,\n\t\t\t// \t/\\d/,\n\t\t\t// \t/\\d/,\n\t\t\t// \t\"-\",\n\t\t\t// \t/\\d/,\n\t\t\t// \t/\\d/,\n\t\t\t// \t/\\d/,\n\t\t\t// \t/\\d/\n\t\t\t// ]}\n\t\t\t// placeholderChar={\"\\u2000\"}\n\t\t\t// showMask\n\t\t/>\n\t);\n}\n","export enum CONNECTION_TEST_STATUS {\n\tREADY = 1,\n\tRUNNING,\n\tSUCCESS,\n\tERROR\n}\n","import { FirewallRule } from \"pages/management/host/types\";\nimport { WithStyles, WithTheme } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { styles } from \"components/form/firewallRulesEditor/styles\";\nimport {\n\tAvatar,\n\tButton,\n\tDialog,\n\tDialogActions,\n\tDialogContent,\n\tDialogContentText,\n\tDialogTitle,\n\tFormControl,\n\tGrid,\n\tIconButton,\n\tInputLabel,\n\tList,\n\tListItem,\n\tListItemAvatar,\n\tListItemSecondaryAction,\n\tListItemText,\n\tListSubheader,\n\tMenuItem,\n\tSelect,\n\tTextField,\n\tTooltip,\n\tTypography\n} from \"@mui/material\";\nimport React, { ChangeEvent, FormEvent } from \"react\";\nimport { Delete, Security } from \"@mui/icons-material\";\nimport { IPAddressField } from \"components/form/firewallRulesEditor/IPAddressFieldComponent\";\nimport isIp from \"is-ip\";\n\ninterface LocalState {\n\tisDialogOpen: boolean;\n\tisAddRuleDialogOpen: boolean;\n\tnewRule: {\n\t\trule: FirewallRule;\n\t\tdescriptionErrorMessage: string;\n\t\tportErrorMessage: string;\n\t\trangesErrorMessage: string;\n\t\tmaskErrorMessage: string;\n\t};\n}\n\ninterface LocalProps {\n\tfirewallRules: FirewallRule[];\n\t// inheritedFirewallRules?: FirewallRule[];\n\treadOnly?: boolean;\n\tonRemove?: (rule: FirewallRule, index: number) => void;\n\tonAdd?: (rule: FirewallRule) => void;\n}\n\ntype Props = LocalProps & WithStyles & WithTheme;\n\nclass FirewallRulesEditorComponent extends React.PureComponent<\n\tProps,\n\tLocalState\n> {\n\tdefaultState: LocalState = {\n\t\tisDialogOpen: false,\n\t\tisAddRuleDialogOpen: false,\n\t\tnewRule: {\n\t\t\trule: {\n\t\t\t\tdescription: \"\",\n\t\t\t\tport: 3306,\n\t\t\t\tranges: [\"/32\"],\n\t\t\t\tprotocol: \"tcp\"\n\t\t\t},\n\t\t\tdescriptionErrorMessage: \"\",\n\t\t\tportErrorMessage: \"\",\n\t\t\trangesErrorMessage: \"\",\n\t\t\tmaskErrorMessage: \"\"\n\t\t}\n\t};\n\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tthis.state = this.defaultState;\n\t}\n\n\topenDialog = () => {\n\t\tthis.setState((state: LocalState) => ({\n\t\t\t...state,\n\t\t\tisDialogOpen: true\n\t\t}));\n\t};\n\n\tcloseDialog = () => {\n\t\tthis.setState({ isDialogOpen: false });\n\t};\n\n\tcloseAddRuleDialog = () => {\n\t\tthis.setState({\n\t\t\tisAddRuleDialogOpen: false,\n\t\t\tnewRule: { ...this.defaultState.newRule }\n\t\t});\n\t};\n\n\taddRule = (newRule: FirewallRule) => {\n\t\tthis.props.onAdd && this.props.onAdd(newRule);\n\t};\n\n\trender() {\n\t\tconst { classes, firewallRules, readOnly, theme } = this.props;\n\t\tconst { isDialogOpen, isAddRuleDialogOpen, newRule } = this.state;\n\n\t\tconst ListItemComponent = ListItem as any; // temporary workaround because of bug in TS/MUI: https://github.com/mui-org/material-ui/issues/14971\n\n\t\tlet rulesCount = firewallRules?.length || 0;\n\n\t\t// check if there are custom rules for ports 22, 3306 and 33060\n\t\tconst isThereCustom22 = firewallRules?.some(\n\t\t\t(rule: FirewallRule) => rule.port === 22\n\t\t);\n\t\tconst isThereCustom3306 = firewallRules?.some(\n\t\t\t(rule: FirewallRule) => rule.port === 3306\n\t\t);\n\t\tconst isThereCustom33060 = firewallRules?.some(\n\t\t\t(rule: FirewallRule) => rule.port === 33060\n\t\t);\n\n\t\t// increase counter if there are no custom rules for those ports\n\t\t// in that case we need to count default rules\n\t\t!isThereCustom22 && rulesCount++;\n\t\t!isThereCustom3306 && rulesCount++;\n\t\t!isThereCustom33060 && rulesCount++;\n\n\t\tconst renderDialog = () => (\n\t\t\t<>\n\t\t\t\t{theme.breakpoints.up(\"sm\") ? (\n\t\t\t\t\t {\n\t\t\t\t\t\t\tif (reason === \"escapeKeyDown\") {\n\t\t\t\t\t\t\t\tthis.closeDialog();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tfullWidth={true}\n\t\t\t\t\t\tmaxWidth={\"sm\"}\n\t\t\t\t\t\taria-labelledby=\"form-dialog-title\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{renderDialogContent()}\n\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tif (reason === \"escapeKeyDown\") {\n\t\t\t\t\t\t\t\t\tthis.closeAddRuleDialog();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tfullWidth={true}\n\t\t\t\t\t\t\tmaxWidth={\"sm\"}\n\t\t\t\t\t\t\taria-labelledby=\"form-dialog-title\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{renderAddNewRuleDialog()}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t) : (\n\t\t\t\t\t {\n\t\t\t\t\t\t\tif (reason === \"escapeKeyDown\") {\n\t\t\t\t\t\t\t\tthis.closeDialog();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tfullWidth={true}\n\t\t\t\t\t\tfullScreen={true}\n\t\t\t\t\t\taria-labelledby=\"form-dialog-title\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{renderDialogContent()}\n\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tif (reason === \"escapeKeyDown\") {\n\t\t\t\t\t\t\t\t\tthis.closeDialog();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tfullWidth={true}\n\t\t\t\t\t\t\tfullScreen={true}\n\t\t\t\t\t\t\taria-labelledby=\"form-dialog-title\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{renderAddNewRuleDialog()}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\n\t\t);\n\n\t\tconst renderDialogContent = () => (\n\t\t\t<>\n\t\t\t\tFirewall\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tRules below are used to allow access to the nodes. Rules will be\n\t\t\t\t\t\tapplied using EC2 Security Groups, and will be applied to all nodes\n\t\t\t\t\t\tin the cluster.\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\tBase rules\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\tAllow list\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{/*Don't render if read only and has custom rule*/}\n\t\t\t\t\t\t{!readOnly || (readOnly && !isThereCustom3306) ? (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{/*Don't render if read only and has custom rule*/}\n\t\t\t\t\t\t{!readOnly || (readOnly && !isThereCustom33060) ? (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{/*Don't render if read only and has custom rule*/}\n\t\t\t\t\t\t{!readOnly || (readOnly && !isThereCustom22) ? (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{firewallRules?.map((rule: FirewallRule, index) => {\n\t\t\t\t\t\t\treturn renderRuleItem(rule, index);\n\t\t\t\t\t\t})}\n\t\t\t\t\t\n\t\t\t\t\t{!readOnly && (\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tthis.setState({ isAddRuleDialogOpen: true });\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tAdd custom rule\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tthis.closeDialog();\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tClose\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\n\t\tconst renderRuleItem = (\n\t\t\trule: FirewallRule,\n\t\t\tindex: number,\n\t\t\tinherited = false\n\t\t) => {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{!inherited && !readOnly && this.props.onRemove && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tthis.props.onRemove && this.props.onRemove(rule, index);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tedge=\"end\"\n\t\t\t\t\t\t\t\t\taria-label=\"Delete\"\n\t\t\t\t\t\t\t\t\tsize=\"large\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t);\n\t\t};\n\n\t\tconst renderAddNewRuleDialog = () => (\n\t\t\t {\n\t\t\t\t\t// console.log(\"onSubmit\", e);\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\te.stopPropagation();\n\n\t\t\t\t\tconst rule: FirewallRule = {\n\t\t\t\t\t\t...this.state.newRule.rule,\n\t\t\t\t\t\tranges: this.state.newRule.rule.ranges.map((ip: string) => {\n\t\t\t\t\t\t\treturn ip.replace(/_/g, \"\");\n\t\t\t\t\t\t})\n\t\t\t\t\t};\n\n\t\t\t\t\t// validate IP addresses\n\t\t\t\t\tif (!isIp(rule.ranges[0].split(\"/\")[0])) {\n\t\t\t\t\t\tthis.setState(\n\t\t\t\t\t\t\t(state: LocalState): LocalState => ({\n\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\tnewRule: {\n\t\t\t\t\t\t\t\t\t...state.newRule,\n\t\t\t\t\t\t\t\t\trangesErrorMessage: \"Please enter valid IPv4 address\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.addRule(rule);\n\t\t\t\t\tthis.closeAddRuleDialog();\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\tAdd Firewall rule\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\tconst form = e.target as HTMLFormElement;\n\n\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\t\tnewRule: {\n\t\t\t\t\t\t\t\t\t\t\t\t...state.newRule,\n\t\t\t\t\t\t\t\t\t\t\t\tdescriptionErrorMessage: form.validationMessage\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\t\t\t\te.persist();\n\t\t\t\t\t\t\t\t\t\t\tconst field = e.target;\n\t\t\t\t\t\t\t\t\t\t\tconst description = field.value;\n\t\t\t\t\t\t\t\t\t\t\t// console.log(\"onDescriptionChange\", description);\n\n\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\t\t\tnewRule: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t...state.newRule,\n\t\t\t\t\t\t\t\t\t\t\t\t\trule: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.newRule.rule,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdescription: description\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\tdescriptionErrorMessage: \"\"\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}));\n\n\t\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t\tfirewallRules.some(\n\t\t\t\t\t\t\t\t\t\t\t\t\t(rule: FirewallRule) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\trule.description === description\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t\tfield.setCustomValidity(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Rule exists with this description. Please enter another description.\"\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tfield.setCustomValidity(\"\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tinputProps={{\n\t\t\t\t\t\t\t\t\t\t\t\"data-testid\": \"firewall-rule-description\",\n\t\t\t\t\t\t\t\t\t\t\tstyle: { fontFamily: \"monospace\" },\n\t\t\t\t\t\t\t\t\t\t\tspellCheck: false,\n\t\t\t\t\t\t\t\t\t\t\tautoComplete: \"off\",\n\t\t\t\t\t\t\t\t\t\t\tautoCorrect: \"off\",\n\t\t\t\t\t\t\t\t\t\t\tautoCapitalize: \"off\",\n\t\t\t\t\t\t\t\t\t\t\tmaxLength: 80\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tProtocol\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\tconst value = e.target.value as string;\n\n\t\t\t\t\t\t\t\t\t\t\tif (value === \"tcp\") {\n\t\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\t\t\t\tnewRule: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.newRule,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\trule: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.newRule.rule,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tprotocol: \"tcp\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\t\t\t\tnewRule: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.newRule,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\trule: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.newRule.rule,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tprotocol: \"udp\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tinputProps={{\n\t\t\t\t\t\t\t\t\t\t\tid: \"add-firewall-rule-protocol\",\n\t\t\t\t\t\t\t\t\t\t\t\"data-testid\": \"add-firewall-rule-protocol-select\"\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tTCP\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tUDP\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\tconst form = e.target as HTMLFormElement;\n\n\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\t\tnewRule: {\n\t\t\t\t\t\t\t\t\t\t\t\t...state.newRule,\n\t\t\t\t\t\t\t\t\t\t\t\tportErrorMessage: form.validationMessage\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\tevent.target.select();\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tvariant=\"outlined\"\n\t\t\t\t\t\t\t\t\t\tvalue={newRule.rule.port}\n\t\t\t\t\t\t\t\t\t\tonChange={(e: ChangeEvent) => {\n\t\t\t\t\t\t\t\t\t\t\te.persist();\n\t\t\t\t\t\t\t\t\t\t\tconst field = e.target;\n\t\t\t\t\t\t\t\t\t\t\tconst port = parseInt(field.value);\n\n\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\t\t\tnewRule: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t...state.newRule,\n\t\t\t\t\t\t\t\t\t\t\t\t\trule: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.newRule.rule,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tport: port\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\tportErrorMessage: \"\"\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tinputProps={{\n\t\t\t\t\t\t\t\t\t\t\t\"data-testid\": \"add-firewall-rule-port\",\n\t\t\t\t\t\t\t\t\t\t\tstyle: { fontFamily: \"monospace\" },\n\t\t\t\t\t\t\t\t\t\t\tmin: 1,\n\t\t\t\t\t\t\t\t\t\t\tmax: 65535\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t{newRule.rule.ranges.map((cidr: string, index: number) => {\n\t\t\t\t\t\t\tconst ip = cidr.split(\"/\")[0];\n\t\t\t\t\t\t\tconst mask = `${cidr.split(\"/\")[1]}`;\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\t\tconst form = e.target as HTMLFormElement;\n\n\t\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\t\t\t\tnewRule: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.newRule,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\trangesErrorMessage: form.validationMessage\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\te.persist();\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst field = e.target;\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst newIP = field.value;\n\t\t\t\t\t\t\t\t\t\t\t\t\t// console.log(\"onRangesChange\", ranges);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnewRule: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.newRule,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trule: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.newRule.rule,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tranges: [`${newIP}/${mask}`]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trangesErrorMessage: \"\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\tinputProps={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"data-testid\": `rule-ip-text-field-${index}`,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyle: { fontFamily: \"monospace\" }\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\tInputProps={{\n\t\t\t\t\t\t\t\t\t\t\t\t\tinputComponent: IPAddressField as any\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t/\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst form = e.target as HTMLFormElement;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnewRule: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.newRule,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmaskErrorMessage: form.validationMessage\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\te.persist();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst field = e.target;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst newMask = field.value;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// console.log(\"onRangesChange\", ranges);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnewRule: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.newRule,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trule: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.newRule.rule,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tranges: [`${ip}/${newMask}`]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmaskErrorMessage: \"\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\tinputProps={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"data-testid\": `rule-mask-text-field-${index}`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstyle: { fontFamily: \"monospace\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treadOnly: readOnly,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmin: 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmax: 32\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tthis.closeAddRuleDialog();\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tClose\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tAdd\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{renderDialog()}\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default withStyles(styles, { withTheme: true })(\n\tFirewallRulesEditorComponent\n);\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from '@mui/styles/createStyles';\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\troot: {\n\t\t\twidth: \"100%\"\n\t\t},\n\t\tactiveRuleAvatar: {\n\t\t\tbackgroundColor: theme.palette.primary.main\n\t\t}\n\t});\n","import React, { ChangeEvent, FormEvent } from \"react\";\nimport {\n\tFormControl,\n\tFormHelperText,\n\tIconButton,\n\tOutlinedInput,\n\tInputAdornment,\n\tInputLabel,\n\tTooltip\n} from \"@mui/material\";\nimport { Visibility, VisibilityOff } from \"@mui/icons-material\";\nimport { SnackbarActionPayload } from \"components/snackbar/types\";\nimport { showSnackbar } from \"components/snackbar/actionCreators\";\nimport { connect } from \"react-redux\";\nimport { ContentCopy } from \"mdi-material-ui\";\nimport { INPUT_VARIANT } from \"components/form/const\";\n\ninterface LocalState {\n\tisPasswordVisible: boolean;\n\tformValidation: {\n\t\tisValid: boolean;\n\t\tmessage: string;\n\t};\n}\n\ninterface LocalProps {\n\tvalue?: string;\n\tlabel: string;\n\trequired?: boolean;\n\tdisabled?: boolean;\n\tonChange?: (e: ChangeEvent) => void;\n}\n\ninterface DispatchProps {\n\tshowSnackbar: (snackbar: SnackbarActionPayload) => void;\n}\n\ntype Props = LocalProps & DispatchProps;\n\nclass PasswordField extends React.PureComponent {\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\tisPasswordVisible: false,\n\t\t\tformValidation: { isValid: true, message: \"\" }\n\t\t};\n\t}\n\n\trender() {\n\t\tconst { isPasswordVisible, formValidation } = this.state;\n\t\tconst { value, label, onChange, required, disabled } = this.props;\n\n\t\tconst isReadOnly = !onChange;\n\n\t\treturn (\n\t\t\t {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tconst form = e.target as HTMLFormElement;\n\n\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\tisValid: false,\n\t\t\t\t\t\t\tmessage: form.validationMessage\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\t\t\t\t}}\n\t\t\t\terror={!formValidation.isValid}\n\t\t\t>\n\t\t\t\t{label}\n\t\t\t\t {\n\t\t\t\t\t\tthis.setState(() => ({\n\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\tisValid: true,\n\t\t\t\t\t\t\t\tmessage: \"\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}));\n\n\t\t\t\t\t\tonChange && onChange(e);\n\t\t\t\t\t}}\n\t\t\t\t\tendAdornment={\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{isReadOnly && (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\t\t\t\t\t\tif (navigator.clipboard) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tnavigator.clipboard.writeText(value).then(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmsg: \"Password copied to clipboard\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t(err: Error) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconsole.error(\"Password copy error:\", err);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmsg: \"Couldn't copy password to clipboard\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmsg: \"Couldn't copy password because the application is not served over HTTPS\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\t\t\t\t\t\t\tmsg: \"Didn't copy because password is empty\"\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tonMouseDown={(\n\t\t\t\t\t\t\t\t\t\t\tevent: React.MouseEvent\n\t\t\t\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tsize=\"large\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\tisPasswordVisible: !state.isPasswordVisible\n\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tonMouseDown={(event: React.MouseEvent) => {\n\t\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tsize=\"large\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{isPasswordVisible ? : }\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t{formValidation.message}\n\t\t\t\n\t\t);\n\t}\n}\n\nconst mapGlobalDispatchToProps = (dispatch: any) => {\n\treturn {\n\t\tshowSnackbar: (snackbar: SnackbarActionPayload) => {\n\t\t\tdispatch(showSnackbar(snackbar));\n\t\t}\n\t};\n};\n\nexport default connect(undefined, mapGlobalDispatchToProps)(PasswordField);\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from '@mui/styles/createStyles';\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\troot: {\n\t\t\twidth: \"100%\"\n\t\t},\n\t\tpublicKey: {\n\t\t\tfontSize: \"0.9em\",\n\t\t\twordBreak: \"break-all\",\n\t\t\tcolor: \"white\",\n\t\t\tbackgroundColor: \"black\",\n\t\t\tfontFamily: \"monospace\",\n\t\t\tpadding: theme.spacing(1)\n\t\t}\n\t});\n","import {\n\tDelete,\n\tError,\n\tErrorOutline,\n\tHelpOutline,\n\tVerifiedUser,\n\tVpnKey\n} from \"@mui/icons-material\";\nimport {\n\tAvatar,\n\tButton,\n\tCollapse,\n\tDialog,\n\tDialogActions,\n\tDialogContent,\n\tDialogContentText,\n\tDialogTitle,\n\tGrid,\n\tIconButton,\n\tList,\n\tListItem,\n\tListItemAvatar,\n\tListItemSecondaryAction,\n\tListItemText,\n\tPopover,\n\tTextField,\n\tTooltip,\n\tTypography\n} from \"@mui/material\";\nimport { WithStyles, WithTheme } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { CLUSTER_TYPE } from \"pages/management/cluster/clusterCreateWizard/types\";\nimport { CONNECTION_TEST_STATUS } from \"components/connectionTestDialog/types\";\nimport { showSnackbar } from \"components/snackbar/actionCreators\";\nimport { SnackbarActionPayload } from \"components/snackbar/types\";\nimport { ContentCopy } from \"mdi-material-ui\";\nimport React, { ChangeEvent, Fragment } from \"react\";\nimport { connect } from \"react-redux\";\nimport { styles } from \"components/form/SSHKeysEditor/styles\";\nimport { parseKey } from \"sshpk\";\n\ninterface LocalState {\n\tisDialogOpen: boolean;\n\tisPopoverOpen: boolean;\n\tpopoverAnchorEl: Element | null;\n\tpopoverContent: string;\n\taddNewKey: {\n\t\tvalue: string;\n\t\tisValid: boolean;\n\t\tmessage: string;\n\t};\n\texpandedKeys: string[];\n}\n\ninterface LocalProps {\n\tauthorizedKeys: string[];\n\tinheritedAuthorizedKeys?: string[];\n\treadOnly: boolean;\n\tclusterType: CLUSTER_TYPE;\n\tonRemove?: (publicKey: string, index: number) => void;\n\tonAdd?: (publicKey: string) => void;\n\tsshTestStatus?: CONNECTION_TEST_STATUS;\n}\n\ninterface DispatchProps {\n\tshowSnackbar: (snackbar: SnackbarActionPayload) => void;\n}\n\ntype Props = LocalProps & DispatchProps & WithStyles & WithTheme;\n\nclass SSHKeysEditor extends React.PureComponent {\n\tdefaultState: LocalState = {\n\t\tisDialogOpen: false,\n\t\tisPopoverOpen: false,\n\t\tpopoverAnchorEl: null,\n\t\tpopoverContent: \"\",\n\t\taddNewKey: {\n\t\t\tvalue: \"\",\n\t\t\tisValid: false,\n\t\t\tmessage: \"\"\n\t\t},\n\t\texpandedKeys: []\n\t};\n\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tthis.state = this.defaultState;\n\t}\n\n\topenDialog = (): void => {\n\t\tconst { authorizedKeys, inheritedAuthorizedKeys = [] } = this.props;\n\n\t\tlet expandedKeys: string[] = [];\n\n\t\tlet uniqueKeys = [...authorizedKeys, ...inheritedAuthorizedKeys].filter(\n\t\t\t(key: string, index: number, array: string[]) =>\n\t\t\t\tarray.indexOf(key) === index\n\t\t);\n\n\t\tif (uniqueKeys.length === 1) {\n\t\t\texpandedKeys = uniqueKeys;\n\t\t}\n\n\t\tthis.setState((state: LocalState) => ({\n\t\t\t...state,\n\t\t\tauthorizedKeys: this.props.authorizedKeys,\n\t\t\tisDialogOpen: true,\n\t\t\texpandedKeys\n\t\t}));\n\t};\n\n\tcloseDialog = (): void => {\n\t\tthis.setState((state: LocalState) => ({ ...state, isDialogOpen: false }));\n\t};\n\n\tonPublicKeyChanged = (e: ChangeEvent): void => {\n\t\te.persist();\n\t\tlet isValid = false;\n\t\tlet message = \"\";\n\t\tconst value = e.target.value;\n\n\t\tif (value) {\n\t\t\ttry {\n\t\t\t\tparseKey(value, \"auto\");\n\t\t\t\tisValid = true;\n\t\t\t\t// message = `Valid ${key.type.toUpperCase()} ${\n\t\t\t\t// \tkey.size\n\t\t\t\t// }bit key. Press ENTER or click \"add\" icon on the right to save the key.`;\n\t\t\t} catch (e) {\n\t\t\t\t// console.warn(\"Not valid public key\");\n\t\t\t\tmessage = \"Please enter valid SSH public key\";\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tthis.props.authorizedKeys.includes(value) ||\n\t\t\t\t(this.props.inheritedAuthorizedKeys &&\n\t\t\t\t\tthis.props.inheritedAuthorizedKeys.includes(value))\n\t\t\t) {\n\t\t\t\tisValid = false;\n\t\t\t\tmessage = \"Key already exists\";\n\t\t\t}\n\t\t}\n\n\t\tif (isValid) {\n\t\t\tthis.props.onAdd\n\t\t\t\t? this.props.onAdd(value)\n\t\t\t\t: console.warn(\"Trying to add key, but props.onAdd is not defined.\");\n\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t...state,\n\t\t\t\taddNewKey: {\n\t\t\t\t\t...state.addNewKey,\n\t\t\t\t\tvalue: \"\",\n\t\t\t\t\tisValid: false,\n\t\t\t\t\tmessage: \"\"\n\t\t\t\t}\n\t\t\t}));\n\t\t} else {\n\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t...state,\n\t\t\t\taddNewKey: {\n\t\t\t\t\t...state.addNewKey,\n\t\t\t\t\tvalue,\n\t\t\t\t\tisValid,\n\t\t\t\t\tmessage: message\n\t\t\t\t}\n\t\t\t}));\n\t\t}\n\t};\n\n\trender() {\n\t\tconst {\n\t\t\tclasses,\n\t\t\treadOnly,\n\t\t\ttheme,\n\t\t\tauthorizedKeys,\n\t\t\tinheritedAuthorizedKeys,\n\t\t\tclusterType,\n\t\t\tsshTestStatus\n\t\t} = this.props;\n\t\tconst {\n\t\t\tisDialogOpen,\n\t\t\tisPopoverOpen,\n\t\t\tpopoverAnchorEl,\n\t\t\tpopoverContent,\n\t\t\taddNewKey,\n\t\t\texpandedKeys\n\t\t} = this.state;\n\n\t\tlet keysCount = authorizedKeys.length;\n\t\tlet inheritedKeysCount = 0;\n\n\t\tif (inheritedAuthorizedKeys) {\n\t\t\tinheritedKeysCount = inheritedAuthorizedKeys.filter(\n\t\t\t\t(publicKey: string) => !authorizedKeys?.includes(publicKey)\n\t\t\t).length;\n\t\t\tkeysCount += inheritedKeysCount;\n\t\t}\n\n\t\tconst ListItemComponent = ListItem as any; // temporary workaround because of bug in TS/MUI: https://github.com/mui-org/material-ui/issues/14971\n\n\t\tlet subtitleText = \"\";\n\n\t\tif (clusterType === CLUSTER_TYPE.MANAGED) {\n\t\t\tif (readOnly) {\n\t\t\t\tsubtitleText =\n\t\t\t\t\t\"Below is the list of keys that have root access to nodes.\";\n\t\t\t} else {\n\t\t\t\tsubtitleText =\n\t\t\t\t\t\"If you want to have access to nodes, add your public key here. Keys will be added as authorized keys on nodes under root user (/root/.ssh/authorized_keys).\";\n\t\t\t}\n\t\t} else if (\n\t\t\tclusterType === CLUSTER_TYPE.HYBRID ||\n\t\t\tclusterType === CLUSTER_TYPE.MONITORED\n\t\t) {\n\t\t\tif (readOnly) {\n\t\t\t\tsubtitleText =\n\t\t\t\t\t\"Below is the public key that must have access to the node.\";\n\t\t\t} else {\n\t\t\t\tsubtitleText =\n\t\t\t\t\t\"Below is the public key that must have access to the node. Make sure you have added this key to the node's authorized keys file under root user (/root/.ssh/authorized_keys).\";\n\t\t\t}\n\t\t}\n\n\t\tconst renderKeyItem = (\n\t\t\tpublicKey: string,\n\t\t\tindex: number,\n\t\t\tinherited = false\n\t\t) => {\n\t\t\tconst key = parseKey(publicKey, \"auto\");\n\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tconst expanded = expandedKeys.includes(publicKey);\n\n\t\t\t\t\t\t\tif (expanded) {\n\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\texpandedKeys: state.expandedKeys.filter(\n\t\t\t\t\t\t\t\t\t\t(key: string) => key !== publicKey\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\texpandedKeys: [...state.expandedKeys, publicKey]\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tif (navigator.clipboard) {\n\t\t\t\t\t\t\t\t\t\t\tnavigator.clipboard.writeText(publicKey).then(\n\t\t\t\t\t\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmsg: \"Public key copied to clipboard\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t(err: Error) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconsole.error(\"Password copy error:\", err);\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmsg: \"Couldn't copy public key to clipboard\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\t\t\t\t\t\tmsg: \"Couldn't copy public key because the application is not served over HTTPS\"\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tedge=\"end\"\n\t\t\t\t\t\t\t\t\taria-label=\"Copy\"\n\t\t\t\t\t\t\t\t\tsize=\"large\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{!inherited && !readOnly && (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\tthis.props.onRemove\n\t\t\t\t\t\t\t\t\t\t\t\t? this.props.onRemove(publicKey, index)\n\t\t\t\t\t\t\t\t\t\t\t\t: console.warn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Trying to remove key, but props.onRemove is not defined\"\n\t\t\t\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tedge=\"end\"\n\t\t\t\t\t\t\t\t\t\taria-label=\"Delete\"\n\t\t\t\t\t\t\t\t\t\tsize=\"large\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{publicKey}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t);\n\t\t};\n\n\t\tconst renderDialog = () => (\n\t\t\t<>\n\t\t\t\t{theme.breakpoints.up(\"sm\") ? (\n\t\t\t\t\t {\n\t\t\t\t\t\t\tif (reason === \"escapeKeyDown\") {\n\t\t\t\t\t\t\t\tthis.closeDialog();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tfullWidth={true}\n\t\t\t\t\t\tmaxWidth={\"sm\"}\n\t\t\t\t\t\taria-labelledby=\"form-dialog-title\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{dialogContentRender()}\n\t\t\t\t\t\n\t\t\t\t) : (\n\t\t\t\t\t {\n\t\t\t\t\t\t\tif (reason === \"escapeKeyDown\") {\n\t\t\t\t\t\t\t\tthis.closeDialog();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tfullWidth={true}\n\t\t\t\t\t\tfullScreen={true}\n\t\t\t\t\t\taria-labelledby=\"form-dialog-title\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{dialogContentRender()}\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\n\t\t);\n\n\t\tconst dialogContentRender = () => (\n\t\t\t<>\n\t\t\t\tSSH keys\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{subtitleText}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{inheritedAuthorizedKeys &&\n\t\t\t\t\t\t\t\tinheritedAuthorizedKeys.map((publicKey: string, index) => {\n\t\t\t\t\t\t\t\t\treturn renderKeyItem(publicKey, index, true);\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t{authorizedKeys\n\t\t\t\t\t\t\t\t.filter(\n\t\t\t\t\t\t\t\t\t(publicKey: string) =>\n\t\t\t\t\t\t\t\t\t\t!inheritedAuthorizedKeys?.includes(publicKey)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t.map((publicKey: string, index) => {\n\t\t\t\t\t\t\t\t\treturn renderKeyItem(publicKey, index);\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\n\t\t\t\t\t\t{!readOnly && clusterType === CLUSTER_TYPE.MANAGED ? (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tconsole.log(\"onClose\");\n\t\t\t\t\t\t\t\tthis.setState(\n\t\t\t\t\t\t\t\t\t(state: LocalState): LocalState => ({\n\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\tisPopoverOpen: false,\n\t\t\t\t\t\t\t\t\t\tpopoverAnchorEl: null\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tanchorOrigin={{\n\t\t\t\t\t\t\t\tvertical: \"bottom\",\n\t\t\t\t\t\t\t\thorizontal: \"center\"\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\ttransformOrigin={{\n\t\t\t\t\t\t\t\tvertical: \"top\",\n\t\t\t\t\t\t\t\thorizontal: \"center\"\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{popoverContent}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tthis.closeDialog();\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tClose\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\n\t\tconst renderStatusIcon = (sshTestStatus: CONNECTION_TEST_STATUS) => {\n\t\t\tswitch (sshTestStatus) {\n\t\t\t\tcase CONNECTION_TEST_STATUS.SUCCESS:\n\t\t\t\t\treturn (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t);\n\t\t\t\tcase CONNECTION_TEST_STATUS.ERROR:\n\t\t\t\t\treturn (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t);\n\t\t\t\tdefault:\n\t\t\t\t\treturn (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t);\n\t\t\t}\n\t\t};\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t 0\n\t\t\t\t\t\t\t\t\t\t? { backgroundColor: theme.palette.primary.main }\n\t\t\t\t\t\t\t\t\t\t: {}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t 0\n\t\t\t\t\t\t\t\t\t? `${keysCount} key/s ${\n\t\t\t\t\t\t\t\t\t\t\tinheritedKeysCount > 0\n\t\t\t\t\t\t\t\t\t\t\t\t? `(${inheritedKeysCount} inherited)`\n\t\t\t\t\t\t\t\t\t\t\t\t: \"\"\n\t\t\t\t\t\t\t\t\t }`\n\t\t\t\t\t\t\t\t\t: \"No keys\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{clusterType !== CLUSTER_TYPE.MANAGED && sshTestStatus\n\t\t\t\t\t\t\t? renderStatusIcon(sshTestStatus)\n\t\t\t\t\t\t\t: \"\"}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{renderDialog()}\n\t\t\t\n\t\t);\n\t}\n}\n\nconst mapGlobalDispatchToProps = (dispatch: any) => {\n\treturn {\n\t\tshowSnackbar: (snackbar: SnackbarActionPayload) => {\n\t\t\tdispatch(showSnackbar(snackbar));\n\t\t}\n\t};\n};\n\nexport default withStyles(styles, { withTheme: true })(\n\tconnect(undefined, mapGlobalDispatchToProps)(SSHKeysEditor)\n);\n","import { SupportMatrixSystem } from \"../supportMatrix/types\";\n\nclass ConfigClass {\n\tprivate _jtw_public_token?: string;\n\tprivate _influx_protocol?: \"http\" | \"https\";\n\tprivate _influx_host?: string;\n\tprivate _influx_port?: number;\n\tprivate _influx_username?: string;\n\tprivate _influx_password?: string;\n\tprivate _influx_db?: string;\n\tprivate _gui_version?: string;\n\tprivate _gmd_version?: string;\n\tprivate _app_version?: string;\n\tprivate _public_version?: string;\n\tprivate _support_matrix: SupportMatrixSystem[] = [];\n\tprivate _support_matrix_ec2: SupportMatrixSystem[] = [];\n\tprivate _support_matrix_digitalocean: SupportMatrixSystem[] = [];\n\n\tset jtw_public_token(value: string) {\n\t\tthis._jtw_public_token = value;\n\t}\n\n\tget jtw_public_token(): string {\n\t\tif (!this._jtw_public_token) throw Error(\"JWT_PUBLIC_TOKEN is missing.\");\n\n\t\treturn this._jtw_public_token;\n\t}\n\n\tget influx_protocol(): \"http\" | \"https\" {\n\t\treturn this._influx_protocol || \"http\";\n\t}\n\n\tset influx_protocol(value: \"http\" | \"https\") {\n\t\tthis._influx_protocol = value;\n\t}\n\n\tget influx_host(): string {\n\t\treturn this._influx_host || \"\";\n\t}\n\n\tset influx_host(value: string) {\n\t\tthis._influx_host = value;\n\t}\n\n\tget influx_port(): number {\n\t\treturn this._influx_port || 8086;\n\t}\n\n\tset influx_port(value: number) {\n\t\tthis._influx_port = value;\n\t}\n\n\tget influx_username(): string {\n\t\treturn this._influx_username || \"\";\n\t}\n\n\tset influx_username(value: string) {\n\t\tthis._influx_username = value;\n\t}\n\n\tget influx_password(): string {\n\t\treturn this._influx_password || \"\";\n\t}\n\n\tset influx_password(value: string) {\n\t\tthis._influx_password = value;\n\t}\n\n\tget influx_db(): string {\n\t\treturn this._influx_db || \"gmd\";\n\t}\n\n\tset influx_db(value: string) {\n\t\tthis._influx_db = value;\n\t}\n\n\tget gmd_version(): string {\n\t\treturn this._gmd_version || \"\";\n\t}\n\n\tset gmd_version(value: string) {\n\t\tthis._gmd_version = value;\n\t}\n\n\tget gui_version(): string {\n\t\treturn this._gui_version || \"\";\n\t}\n\n\tset gui_version(value: string) {\n\t\tthis._gui_version = value;\n\t}\n\n\tget app_version(): string {\n\t\treturn this._app_version || \"\";\n\t}\n\n\tset app_version(value: string) {\n\t\tthis._app_version = value;\n\t}\n\n\tget public_version(): string {\n\t\treturn this._public_version || \"\";\n\t}\n\n\tset public_version(value: string) {\n\t\tthis._public_version = value;\n\t}\n\n\tget support_matrix(): SupportMatrixSystem[] {\n\t\treturn this._support_matrix;\n\t}\n\n\tset support_matrix(value: SupportMatrixSystem[]) {\n\t\tthis._support_matrix = value;\n\t}\n\n\tget support_matrix_digitalocean(): SupportMatrixSystem[] {\n\t\treturn this._support_matrix_digitalocean;\n\t}\n\n\tset support_matrix_digitalocean(value: SupportMatrixSystem[]) {\n\t\tthis._support_matrix_digitalocean = value;\n\t}\n\n\tget support_matrix_ec2(): SupportMatrixSystem[] {\n\t\treturn this._support_matrix_ec2;\n\t}\n\n\tset support_matrix_ec2(value: SupportMatrixSystem[]) {\n\t\tthis._support_matrix_ec2 = value;\n\t}\n}\n\nexport const Config = new ConfigClass();\n","import { HOST_SYSTEM, HOST_TYPE } from \"pages/management/host/types\";\nimport { NODE_DB_ENGINE } from \"pages/management/node/types\";\nimport { Config } from \"services/config/Config\";\nimport { SupportMatrixSystem } from \"./types\";\n\nexport default class SupportMatrix {\n\t/**\n\t * @desc Returns support matrix for given cloud provider\n\t * @param {HOST_TYPE} cloudProvider\n\t * @returns {any}\n\t */\n\tstatic getSupportMatrix = (\n\t\tcloudProvider?: HOST_TYPE\n\t): SupportMatrixSystem[] => {\n\t\tswitch (cloudProvider) {\n\t\t\tcase HOST_TYPE.EC2:\n\t\t\t\treturn Config.support_matrix_ec2;\n\t\t\tcase HOST_TYPE.DIGITAL_OCEAN:\n\t\t\t\treturn Config.support_matrix_digitalocean;\n\t\t\tdefault:\n\t\t\t\treturn Config.support_matrix;\n\t\t}\n\t};\n\n\t/**\n\t * Returns list of supported DBs\n\t * @param {HOST_SYSTEM} system\n\t * @param cloudProvider\n\t * @returns {NODE_DB_ENGINE[]}\n\t */\n\tstatic getSupportedDbEngines = (\n\t\tsystem?: HOST_SYSTEM,\n\t\tcloudProvider?: HOST_TYPE\n\t): NODE_DB_ENGINE[] => {\n\t\tconst support_matrix = SupportMatrix.getSupportMatrix(cloudProvider);\n\n\t\tif (!support_matrix) {\n\t\t\treturn [];\n\t\t} else {\n\t\t\t// get all supported and non-deprecated db engines\n\t\t\tlet allDbEngines: NODE_DB_ENGINE[] = [];\n\n\t\t\tsupport_matrix.forEach((supportMatrixSystem) => {\n\t\t\t\tif (system) {\n\t\t\t\t\tif (system === supportMatrixSystem.id) {\n\t\t\t\t\t\tconst dbEngines = supportMatrixSystem.dbEngines\n\t\t\t\t\t\t\t// .filter(\n\t\t\t\t\t\t\t// \t(supportMatrixDbEngine) => !supportMatrixDbEngine.deprecated\n\t\t\t\t\t\t\t// )\n\t\t\t\t\t\t\t.map((supportMatrixDbEngine) => supportMatrixDbEngine.id);\n\t\t\t\t\t\tallDbEngines = [...allDbEngines, ...dbEngines];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tconst dbEngines = supportMatrixSystem.dbEngines\n\t\t\t\t\t\t// .filter(\n\t\t\t\t\t\t// \t(supportMatrixDbEngine) => !supportMatrixDbEngine.deprecated\n\t\t\t\t\t\t// )\n\t\t\t\t\t\t.map((supportMatrixDbEngine) => supportMatrixDbEngine.id);\n\t\t\t\t\tallDbEngines = [...allDbEngines, ...dbEngines];\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tallDbEngines = [...new Set(allDbEngines)];\n\n\t\t\treturn allDbEngines;\n\t\t}\n\t};\n\n\t/**\n\t * Returns list of supported systems\n\t * @param {NODE_DB_ENGINE} dbEngine\n\t * @param cloudProvider\n\t * @returns {HOST_SYSTEM[]}\n\t */\n\tstatic getSupportedHostSystems = (\n\t\tdbEngine?: NODE_DB_ENGINE,\n\t\tcloudProvider?: HOST_TYPE\n\t): HOST_SYSTEM[] => {\n\t\tconst support_matrix = SupportMatrix.getSupportMatrix(cloudProvider);\n\n\t\tif (!support_matrix) {\n\t\t\treturn [];\n\t\t} else {\n\t\t\t// if no db engine, get all supported and non-deprecated systems\n\t\t\tif (!dbEngine) {\n\t\t\t\treturn (\n\t\t\t\t\tsupport_matrix\n\t\t\t\t\t\t// .filter((supportMatrixSystem) => !supportMatrixSystem.deprecated)\n\t\t\t\t\t\t.map((supportMatrixSystem) => supportMatrixSystem.id)\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\treturn (\n\t\t\t\t\tsupport_matrix\n\t\t\t\t\t\t// .filter((supportMatrixSystem) => !supportMatrixSystem.deprecated)\n\t\t\t\t\t\t.filter((supportMatrixSystem) =>\n\t\t\t\t\t\t\tsupportMatrixSystem.dbEngines\n\t\t\t\t\t\t\t\t.map((supportMatrixDbEngine) => supportMatrixDbEngine.id)\n\t\t\t\t\t\t\t\t.includes(dbEngine)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.map((supportMatrixSystem) => supportMatrixSystem.id)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Checks if system is supported by Galera Manager\n\t * @param {string} hostSystem\n\t * @param cloudProvider\n\t * @returns {boolean}\n\t */\n\tstatic isSystemSupported(\n\t\thostSystem: HOST_SYSTEM,\n\t\tcloudProvider?: HOST_TYPE\n\t): boolean {\n\t\treturn (\n\t\t\tSupportMatrix.getSupportMatrix(cloudProvider)\n\t\t\t\t// .filter((supportMatrixSystem) => !supportMatrixSystem.deprecated)\n\t\t\t\t.some((supportMatrixSystem) => supportMatrixSystem.id === hostSystem)\n\t\t);\n\t}\n\n\t/**\n\t * Checks if db engine is supported by Galera Manager\n\t * @param {string} dbEngine\n\t * @param cloudProvider\n\t * @returns {boolean}\n\t */\n\tstatic isDbSupported(\n\t\tdbEngine: NODE_DB_ENGINE,\n\t\tcloudProvider?: HOST_TYPE\n\t): boolean {\n\t\tconst supportMatrix = SupportMatrix.getSupportMatrix(cloudProvider);\n\n\t\tlet isSupported = false;\n\n\t\tsupportMatrix\n\t\t\t// .filter((supportMatrixSystem) => !supportMatrixSystem.deprecated)\n\t\t\t.forEach((supportMatrixSystem) => {\n\t\t\t\tsupportMatrixSystem.dbEngines.forEach((supportMatrixDbEngine) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\t// !supportMatrixDbEngine.deprecated &&\n\t\t\t\t\t\tsupportMatrixDbEngine.id === dbEngine\n\t\t\t\t\t)\n\t\t\t\t\t\tisSupported = true;\n\t\t\t\t});\n\t\t\t});\n\n\t\treturn isSupported;\n\t}\n\n\t/**\n\t * Checks if system is supported by db engine\n\t * @param {string} hostSystem\n\t * @param {string} dbEngine\n\t * @param cloudProvider\n\t * @returns {boolean}\n\t */\n\tstatic isSystemSupportedByDb(\n\t\thostSystem: HOST_SYSTEM,\n\t\tdbEngine: NODE_DB_ENGINE,\n\t\tcloudProvider?: HOST_TYPE\n\t): boolean {\n\t\tconst supportMatrix = SupportMatrix.getSupportMatrix(cloudProvider);\n\n\t\tconst supportMatrixSystem = supportMatrix\n\t\t\t// .filter((supportMatrixSystem) => !supportMatrixSystem.deprecated)\n\t\t\t.find((supportMatrixSystem) => supportMatrixSystem.id === hostSystem);\n\n\t\treturn supportMatrixSystem\n\t\t\t? supportMatrixSystem.dbEngines\n\t\t\t\t\t// .filter((supportMatrixDbEngine) => !supportMatrixDbEngine.deprecated)\n\t\t\t\t\t.some(\n\t\t\t\t\t\t(supportMatrixDbEngine) => supportMatrixDbEngine.id === dbEngine\n\t\t\t\t\t)\n\t\t\t: false;\n\t}\n\n\t/**\n\t * Checks if db is supported on system\n\t * @param {string} dbEngine\n\t * @param {string} hostSystem\n\t * @param cloudProvider\n\t * @returns {boolean}\n\t */\n\tstatic isDbSupportedOnSystem(\n\t\tdbEngine: NODE_DB_ENGINE,\n\t\thostSystem: HOST_SYSTEM,\n\t\tcloudProvider?: HOST_TYPE\n\t): boolean {\n\t\tconst supportMatrix = SupportMatrix.getSupportMatrix(cloudProvider);\n\n\t\treturn supportMatrix\n\t\t\t? supportMatrix\n\t\t\t\t\t// .filter((supportMatrixSystem) => !supportMatrixSystem.deprecated)\n\t\t\t\t\t.find((supportMatrixSystem) => supportMatrixSystem.id === hostSystem)\n\t\t\t\t\t?.dbEngines // .filter(\n\t\t\t\t\t// \t(supportMatrixDbEngine) => !supportMatrixDbEngine.deprecated\n\t\t\t\t\t// )\n\t\t\t\t\t.some(\n\t\t\t\t\t\t(supportMatrixDbEngine) => supportMatrixDbEngine.id === dbEngine\n\t\t\t\t\t) || false\n\t\t\t: false;\n\t}\n\n\t/**\n\t * Checks if system is marked as deprecated in support matrix\n\t * @param hostSystem\n\t * @param cloudProvider\n\t */\n\tstatic isSystemDeprecated(\n\t\thostSystem: HOST_SYSTEM,\n\t\tcloudProvider?: HOST_TYPE\n\t) {\n\t\tconst supportMatrix = SupportMatrix.getSupportMatrix(cloudProvider);\n\n\t\tconst supportMatrixSystem = supportMatrix\n\t\t\t// .filter((supportMatrixSystem) => !supportMatrixSystem.deprecated)\n\t\t\t.find((supportMatrixSystem) => supportMatrixSystem.id === hostSystem);\n\n\t\treturn supportMatrixSystem ? supportMatrixSystem.deprecated : false;\n\t}\n\n\t/**\n\t * Checks is db engine is marked as deprecated in support matrix\n\t * @param dbEngine\n\t * @param hostSystem\n\t * @param cloudProvider\n\t */\n\tstatic isDbDeprecated(\n\t\tdbEngine: NODE_DB_ENGINE,\n\t\thostSystem: HOST_SYSTEM,\n\t\tcloudProvider?: HOST_TYPE\n\t): boolean {\n\t\tconst supportMatrix = SupportMatrix.getSupportMatrix(cloudProvider);\n\n\t\tconst deprecated =\n\t\t\tsupportMatrix &&\n\t\t\tsupportMatrix\n\t\t\t\t.find((supportMatrixSystem) => supportMatrixSystem.id === hostSystem)\n\t\t\t\t?.dbEngines.find(\n\t\t\t\t\t(supportMatrixDbEngine) => supportMatrixDbEngine.id === dbEngine\n\t\t\t\t)?.deprecated;\n\n\t\treturn !!deprecated;\n\t}\n}\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from '@mui/styles/createStyles';\n\nexport const styles = (theme: Theme) => createStyles({});\n","import { Theme } from \"@mui/material\";\nimport { makeStyles } from \"@mui/styles\";\n\nconst useStyles = makeStyles((theme: Theme) => ({\n\twrapper: {\n\t\tmaxWidth: 600,\n\t\tmargin: \"auto\",\n\t\tmarginBottom: theme.spacing(4)\n\t},\n\tfieldWrapper: {\n\t\tmarginTop: theme.spacing(2),\n\t\tmarginBottom: theme.spacing(2)\n\t},\n\tprimaryTitle: {\n\t\tmarginTop: theme.spacing(10),\n\t\tmarginBottom: theme.spacing(3),\n\t\ttextAlign: \"center\"\n\t},\n\tsecondaryTitle: {\n\t\tmarginTop: theme.spacing(6),\n\t\tmarginBottom: theme.spacing(1)\n\t},\n\tcontainer: {\n\t\tpadding: theme.spacing(3),\n\t\t[theme.breakpoints.up(\"sm\")]: {\n\t\t\tpaddingLeft: theme.spacing(6),\n\t\t\tpaddingRight: theme.spacing(6),\n\t\t\tpaddingBottom: theme.spacing(6)\n\t\t}\n\t}\n}));\n\nexport default useStyles;\n","// MUI\nimport { Typography } from \"@mui/material\";\nimport useStyles from \"components/form/styles\";\n\ninterface Props {\n\t/** Subtitle that will be displayed */\n\ttitle: string | boolean;\n\tisFormTitle?: boolean;\n}\n\nconst FormTitle = (props: Props) => {\n\tconst { title, isFormTitle } = props;\n\tconst classes = useStyles();\n\n\treturn (\n\t\t\n\t\t\t{title}\n\t\t\n\t);\n};\n\nexport default FormTitle;\n","import { NODE_DB_ENGINE } from \"pages/management/node/types\";\n\nclass NodeUtils {\n\tstatic getNodeDbEngineEnum = (value: string): NODE_DB_ENGINE => {\n\t\tswitch (value) {\n\t\t\tcase NODE_DB_ENGINE.MARIADB_10_3:\n\t\t\t\treturn NODE_DB_ENGINE.MARIADB_10_3;\n\t\t\tcase NODE_DB_ENGINE.MARIADB_10_4:\n\t\t\t\treturn NODE_DB_ENGINE.MARIADB_10_4;\n\t\t\tcase NODE_DB_ENGINE.MARIADB_10_5:\n\t\t\t\treturn NODE_DB_ENGINE.MARIADB_10_5;\n\t\t\tcase NODE_DB_ENGINE.MARIADB_10_6:\n\t\t\t\treturn NODE_DB_ENGINE.MARIADB_10_6;\n\t\t\tcase NODE_DB_ENGINE.MARIADB_10_7:\n\t\t\t\treturn NODE_DB_ENGINE.MARIADB_10_7;\n\t\t\tcase NODE_DB_ENGINE.MYSQL_5_7:\n\t\t\t\treturn NODE_DB_ENGINE.MYSQL_5_7;\n\t\t\tcase NODE_DB_ENGINE.MYSQL_8_0:\n\t\t\t\treturn NODE_DB_ENGINE.MYSQL_8_0;\n\t\t\tdefault:\n\t\t\t\tconsole.warn(\n\t\t\t\t\t`Unrecognised node DB engine: ${value}. Returning default value instead.`\n\t\t\t\t);\n\t\t\t\treturn NODE_DB_ENGINE.MARIADB_10_6;\n\t\t}\n\t};\n}\n\nexport default NodeUtils;\n","import { INPUT_VARIANT } from \"../const\";\nimport React from \"react\";\nimport {\n\tFormControl,\n\tFormHelperText,\n\tInputLabel,\n\tMenuItem,\n\tSelect\n} from \"@mui/material\";\nimport NodeUtils from \"../../../pages/management/node/utils\";\nimport SupportMatrix from \"../../../services/supportMatrix/SupportMatrix\";\nimport { NODE_DB_ENGINE } from \"../../../pages/management/node/types\";\nimport { HOST_SYSTEM, HOST_TYPE } from \"../../../pages/management/host/types\";\n\ninterface Props {\n\tvalue: NODE_DB_ENGINE;\n\n\thostType: HOST_TYPE;\n\thostSystem: HOST_SYSTEM;\n\n\treadOnly: boolean;\n\tdisabled: boolean;\n\n\tonChange: (value: NODE_DB_ENGINE) => void;\n}\n\nexport const DbEngineFieldComponent = (props: Props) => {\n\tconst { value, disabled, readOnly, hostType, hostSystem, onChange } = props;\n\n\t// const [validationMessage, setValidationMessage] = useState(\"\");\n\t// const [invalid, setInvalid] = useState(false);\n\tconst getInfoMessage = (): string => {\n\t\tif (\n\t\t\t!readOnly &&\n\t\t\tSupportMatrix.isDbDeprecated(value, hostSystem, hostType)\n\t\t) {\n\t\t\treturn `${value} is deprecated. It's not recommended to create new clusters using deprecated db engines.`;\n\t\t} else {\n\t\t\treturn \"\";\n\t\t}\n\t};\n\n\treturn (\n\t\t\n\t\t\tNode DB Engine\n\t\t\t {\n\t\t\t\t\tconst dbEngine = NodeUtils.getNodeDbEngineEnum(\n\t\t\t\t\t\te.target.value as string\n\t\t\t\t\t);\n\n\t\t\t\t\tonChange(dbEngine);\n\t\t\t\t}}\n\t\t\t\tinputProps={{\n\t\t\t\t\tid: \"node-db-engine\",\n\t\t\t\t\t\"data-testid\": \"node-db-engine-select\"\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{Object.values(NODE_DB_ENGINE).map((dbEngine: NODE_DB_ENGINE) => (\n\t\t\t\t\t\n\t\t\t\t\t\t{`${dbEngine}${\n\t\t\t\t\t\t\t!SupportMatrix.isDbSupportedOnSystem(\n\t\t\t\t\t\t\t\tdbEngine,\n\t\t\t\t\t\t\t\thostSystem,\n\t\t\t\t\t\t\t\thostType\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t? \" (Not supported on \" + hostSystem + \")\"\n\t\t\t\t\t\t\t\t: \"\"\n\t\t\t\t\t\t}${\n\t\t\t\t\t\t\tSupportMatrix.isDbDeprecated(dbEngine, hostSystem, hostType)\n\t\t\t\t\t\t\t\t? \" (Deprecated)\"\n\t\t\t\t\t\t\t\t: \"\"\n\t\t\t\t\t\t}`}\n\t\t\t\t\t\n\t\t\t\t))}\n\t\t\t\n\t\t\t{getInfoMessage()}\n\t\t\n\t);\n};\n","import { HOST_SYSTEM, HOST_TYPE } from \"../../../pages/management/host/types\";\nimport { NODE_DB_ENGINE } from \"../../../pages/management/node/types\";\nimport { INPUT_VARIANT } from \"../const\";\nimport React from \"react\";\nimport {\n\tFormControl,\n\tFormHelperText,\n\tInputLabel,\n\tMenuItem,\n\tSelect\n} from \"@mui/material\";\nimport HostUtils from \"../../../pages/management/host/utils\";\nimport SupportMatrix from \"../../../services/supportMatrix/SupportMatrix\";\n\ninterface Props {\n\tvalue: HOST_SYSTEM;\n\n\thostType: HOST_TYPE;\n\tdbEngine: NODE_DB_ENGINE;\n\n\treadOnly: boolean;\n\tdisabled: boolean;\n\n\tonChange: (value: HOST_SYSTEM) => void;\n}\n\nexport const HostSystemFieldComponent = (props: Props) => {\n\tconst { value, disabled, readOnly, hostType, dbEngine, onChange } = props;\n\n\tconst getInfoMessage = (): string => {\n\t\tif (!readOnly && SupportMatrix.isSystemDeprecated(value, hostType)) {\n\t\t\treturn `${value} is deprecated. It's not recommended to create new clusters using deprecated systems.`;\n\t\t} else {\n\t\t\treturn \"\";\n\t\t}\n\t};\n\n\treturn (\n\t\t\n\t\t\tHost system\n\t\t\t {\n\t\t\t\t\tconst system = HostUtils.getHostSystemEnum(e.target.value as string);\n\t\t\t\t\tonChange(system);\n\t\t\t\t}}\n\t\t\t\tinputProps={{\n\t\t\t\t\tid: \"host-system\",\n\t\t\t\t\t\"data-testid\": \"host-system-select\"\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{Object.values(HOST_SYSTEM)\n\t\t\t\t\t.filter((system: HOST_SYSTEM) =>\n\t\t\t\t\t\tSupportMatrix.isSystemSupported(system)\n\t\t\t\t\t)\n\t\t\t\t\t.map((system: HOST_SYSTEM) => (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{`${system}${\n\t\t\t\t\t\t\t\t!SupportMatrix.isSystemSupported(system, hostType)\n\t\t\t\t\t\t\t\t\t? ` (Not supported by ${hostType})`\n\t\t\t\t\t\t\t\t\t: !SupportMatrix.isSystemSupportedByDb(\n\t\t\t\t\t\t\t\t\t\t\tsystem,\n\t\t\t\t\t\t\t\t\t\t\tdbEngine,\n\t\t\t\t\t\t\t\t\t\t\thostType\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t? ` (Not supported by ${dbEngine})`\n\t\t\t\t\t\t\t\t\t: \"\"\n\t\t\t\t\t\t\t}${\n\t\t\t\t\t\t\t\tSupportMatrix.isSystemDeprecated(system, hostType)\n\t\t\t\t\t\t\t\t\t? \" (Deprecated)\"\n\t\t\t\t\t\t\t\t\t: \"\"\n\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t\n\t\t\t\t\t))}\n\t\t\t\n\t\t\t{getInfoMessage()}\n\t\t\n\t);\n};\n","import { HelpOutline } from \"@mui/icons-material\";\nimport {\n\tFormControl,\n\tGrid,\n\tInputAdornment,\n\tInputLabel,\n\tMenuItem,\n\tSelect,\n\tTextField,\n\tTooltip,\n\tTypography\n} from \"@mui/material\";\nimport { WithStyles, WithTheme } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { CLUSTER_TYPE } from \"pages/management/cluster/clusterCreateWizard/types\";\nimport { Cluster } from \"pages/management/cluster/types\";\nimport ClusterUtils from \"pages/management/cluster/utils\";\nimport {\n\tEC2Config,\n\tFirewallRule,\n\tHOST_SYSTEM,\n\tHOST_TYPE\n} from \"pages/management/host/types\";\nimport HostUtils from \"pages/management/host/utils\";\nimport { NODE_DB_ENGINE } from \"pages/management/node/types\";\nimport DbEngineConfigButtonComponent from \"components/form/dbEngineConfigEditor/DbEngineConfigButtonComponent\";\nimport DigitalOceanConfigComponent from \"components/form/digitalOceanConfig/DigitalOceanConfigComponent\";\nimport { DigitalOceanConfig } from \"components/form/digitalOceanConfig/types\";\nimport EC2ConfigComponent from \"components/form/ec2Config/EC2ConfigComponent\";\nimport FirewallRulesEditorComponent from \"components/form/firewallRulesEditor/FirewallRulesEditorComponent\";\nimport PasswordField from \"components/form/passwordField/passwordFieldComponent\";\nimport SSHKeysEditor from \"components/form/SSHKeysEditor/SSHKeysEditorComponent\";\nimport SupportMatrix from \"services/supportMatrix/SupportMatrix\";\nimport React, { ChangeEvent, FormEvent } from \"react\";\nimport { styles } from \"pages/management/cluster/clusterForm/styles\";\nimport FormTitle from \"components/form/title/FormTitle\";\n\nimport { INPUT_VARIANT } from \"components/form/const\";\nimport { DbEngineFieldComponent } from \"../../../../components/form/formFields/DbEngine.component\";\nimport { HostSystemFieldComponent } from \"../../../../components/form/formFields/HostSystemFieldComponent\";\n\n// component local state interface\ninterface LocalState {\n\tformValidation: {\n\t\tclusterName?: {\n\t\t\tisInvalid: boolean;\n\t\t\tmessage: string;\n\t\t};\n\t\tdbEngine?: {\n\t\t\tisInvalid: boolean;\n\t\t\tmessage: string;\n\t\t};\n\t\tdatabaseSizeGiB?: {\n\t\t\tisInvalid: boolean;\n\t\t\tmessage: string;\n\t\t};\n\t\thostSystem?: {\n\t\t\tisInvalid: boolean;\n\t\t\tmessage: string;\n\t\t};\n\t};\n\tisDeploymentConfigValid?: boolean;\n}\n\ninterface LocalProps {\n\tcluster: Cluster;\n\tonSubmit?: (cluster: Cluster) => void;\n\tonChange?: (cluster: Cluster) => void;\n\treadOnly?: boolean;\n}\n\n// PROPS\ntype Props = LocalProps & WithStyles & WithTheme;\n\n// COMPONENT\nclass ClusterFormComponent extends React.Component {\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\t\t// console.log(\"clusterForm\", DEFAULT_CLUSTER);\n\n\t\tthis.state = {\n\t\t\tformValidation: {}\n\t\t};\n\t}\n\n\tonSubmit = (e: FormEvent) => {\n\t\te.preventDefault();\n\t\t// console.log(\"onSubmit\", e.type, e.);\n\n\t\tif (this.validate()) {\n\t\t\t!this.props.readOnly &&\n\t\t\t\tthis.props.onSubmit &&\n\t\t\t\tthis.props.onSubmit(this.props.cluster);\n\t\t}\n\t};\n\n\tvalidate = (): boolean => {\n\t\tlet isValid = true;\n\n\t\t// check if cluster name already exists\n\t\t// const existingClusterNames = appStore\n\t\t// \t.getState()\n\t\t// \t.clusterList.map((cluster: Cluster) => cluster.name);\n\t\t//\n\t\t// if (existingClusterNames.includes(this.props.cluster.name)) {\n\t\t// \tconsole.log(\"cluster name taken!\");\n\t\t//\n\t\t// \tthis.setState((state: LocalState) => ({\n\t\t// \t\t...state,\n\t\t// \t\tformValidation: {\n\t\t// \t\t\t...state.formValidation,\n\t\t// \t\t\tclusterName: {\n\t\t// \t\t\t\t...state.formValidation.clusterName,\n\t\t// \t\t\t\tisInvalid: true,\n\t\t// \t\t\t\tmessage: \"Cluster with that name already exists.\"\n\t\t// \t\t\t}\n\t\t// \t\t}\n\t\t// \t}));\n\t\t//\n\t\t// \tisValid = false;\n\t\t// }\n\n\t\t// check if cloud access is verified\n\t\tif (\n\t\t\t[HOST_TYPE.DIGITAL_OCEAN, HOST_TYPE.EC2].includes(\n\t\t\t\tthis.props.cluster.sharedConfig.host.type || HOST_TYPE.UNMANAGED\n\t\t\t) &&\n\t\t\t!this.state.isDeploymentConfigValid\n\t\t) {\n\t\t\tisValid = false;\n\t\t\t// console.log(\"cloud access is not verified\");\n\t\t}\n\n\t\t// console.log(\"isValid\", isValid);\n\t\treturn isValid;\n\t};\n\n\trender(): React.ReactNode {\n\t\tconst { readOnly, cluster, onChange } = this.props;\n\t\tconst { formValidation } = this.state;\n\t\tconst disabled = readOnly !== undefined ? readOnly : false;\n\n\t\tconst clusterType = ClusterUtils.getClusterType(cluster);\n\n\t\tconst showDBRootPassword = clusterType === CLUSTER_TYPE.MONITORED;\n\n\t\tconst showCloudProvider = [HOST_TYPE.DIGITAL_OCEAN, HOST_TYPE.EC2].includes(\n\t\t\tcluster.sharedConfig.host.type || HOST_TYPE.UNMANAGED\n\t\t);\n\t\tconst showDigitalOcean =\n\t\t\tcluster.sharedConfig.host.type === HOST_TYPE.DIGITAL_OCEAN &&\n\t\t\tcluster.sharedConfig.host.hostTypeSpecific;\n\n\t\tconst showMaxDBSize =\n\t\t\tclusterType === CLUSTER_TYPE.MANAGED &&\n\t\t\t[HOST_TYPE.EC2, HOST_TYPE.DIGITAL_OCEAN].includes(\n\t\t\t\tcluster.sharedConfig.host.type\n\t\t\t);\n\n\t\tconst showSSHKey = [HOST_TYPE.DIGITAL_OCEAN, HOST_TYPE.EC2].includes(\n\t\t\tcluster.sharedConfig.host.type || HOST_TYPE.UNMANAGED\n\t\t);\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\t{/* Cluster Name */}\n\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\tconst form = e.target as HTMLFormElement;\n\n\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\tclusterName: {\n\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation.clusterName,\n\t\t\t\t\t\t\t\t\t\t\t\tisInvalid: true,\n\t\t\t\t\t\t\t\t\t\t\t\tmessage: form.validationMessage\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\terror={formValidation.clusterName?.isInvalid}\n\t\t\t\t\t\t\t\tfullWidth={true}\n\t\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t\t// disabled={disabled}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tconst field = e.target as HTMLFormElement;\n\n\t\t\t\t\t\t\t\t\t\tonChange &&\n\t\t\t\t\t\t\t\t\t\t\tonChange({\n\t\t\t\t\t\t\t\t\t\t\t\t...cluster,\n\t\t\t\t\t\t\t\t\t\t\t\tname: field.value\n\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\tif (field.checkValidity()) {\n\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\t\t\tclusterName: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation.clusterName,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tisInvalid: false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmessage: \"\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\t\t\tclusterName: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation.clusterName,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tisInvalid: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmessage: field.validationMessage\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t{/* Node DB Engine */}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tonChange &&\n\t\t\t\t\t\t\t\t\t\tonChange({\n\t\t\t\t\t\t\t\t\t\t\t...cluster,\n\t\t\t\t\t\t\t\t\t\t\tsharedConfig: {\n\t\t\t\t\t\t\t\t\t\t\t\t...cluster.sharedConfig,\n\t\t\t\t\t\t\t\t\t\t\t\tnode: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t...cluster.sharedConfig.node,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdbEngine: value\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t{/* Host system */}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tonChange &&\n\t\t\t\t\t\t\t\t\t\tonChange({\n\t\t\t\t\t\t\t\t\t\t\t...cluster,\n\t\t\t\t\t\t\t\t\t\t\tsharedConfig: {\n\t\t\t\t\t\t\t\t\t\t\t\t...cluster.sharedConfig,\n\t\t\t\t\t\t\t\t\t\t\t\thost: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t...cluster.sharedConfig.host,\n\t\t\t\t\t\t\t\t\t\t\t\t\tsystem\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t{/* Custom DB engine configuration */}\n\t\t\t\t\t\t{!cluster.unmanaged && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tonChange &&\n\t\t\t\t\t\t\t\t\t\t\tonChange({\n\t\t\t\t\t\t\t\t\t\t\t\t...cluster,\n\t\t\t\t\t\t\t\t\t\t\t\tsharedConfig: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t...cluster.sharedConfig,\n\t\t\t\t\t\t\t\t\t\t\t\t\tnode: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...cluster.sharedConfig.node,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tuserConfig: config\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tsubtitleText={\n\t\t\t\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\t\t\t\t\t? \"This is default DB engine configuration that will be used as default when deploying nodes\"\n\t\t\t\t\t\t\t\t\t\t\t: \"Here you can enter custom DB engine configuration that will be used as default when deploying nodes\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{(clusterType === CLUSTER_TYPE.MANAGED ||\n\t\t\t\t\t\t\tclusterType === CLUSTER_TYPE.HYBRID) && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{/*\n\n\t\t\t\t\t\t\tSSH Keys\n\n\t\t\t\t\t\t*/}\n\t\t\t\t\t\t{showSSHKey && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{/*\n\n\t\t\t\t\t\t\t\t\tSSH Keys\n\n\t\t\t\t\t\t\t\t*/}\n\n\t\t\t\t\t\t\t\t{(readOnly && cluster.id) ||\n\t\t\t\t\t\t\t\tclusterType === CLUSTER_TYPE.MANAGED ? (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tDefault node configuration{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\tonChange &&\n\t\t\t\t\t\t\t\t\t\t\t\t\tonChange({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...cluster,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsharedConfig: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thost: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...cluster.sharedConfig.host,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tauthorizedKeys: [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...(cluster.sharedConfig.host\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.authorizedKeys || []),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnode: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...cluster.sharedConfig.node\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\tonRemove={(deletedKey: string): void => {\n\t\t\t\t\t\t\t\t\t\t\t\tconst filteredKeys =\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.props.cluster.sharedConfig.host.authorizedKeys?.filter(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t(publicKey: string) => publicKey !== deletedKey\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t\t\tonChange &&\n\t\t\t\t\t\t\t\t\t\t\t\t\tonChange({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...cluster,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsharedConfig: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thost: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...cluster.sharedConfig.host,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tauthorizedKeys: filteredKeys\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnode: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...cluster.sharedConfig.node\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t) : undefined}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{/*\n\n\t\t\t\t\t\t\tFirewall\n\t\t\t\t\t\t\tor\n\t\t\t\t\t\t\tRemote Acces Control ( item )\n\n\t\t\t\t\t\t*/}\n\t\t\t\t\t\t{/* FireWall start */}\n\t\t\t\t\t\t{(clusterType === CLUSTER_TYPE.MANAGED ||\n\t\t\t\t\t\t\tclusterType === CLUSTER_TYPE.HYBRID) && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tonChange &&\n\t\t\t\t\t\t\t\t\t\t\tonChange({\n\t\t\t\t\t\t\t\t\t\t\t\t...cluster,\n\t\t\t\t\t\t\t\t\t\t\t\tfirewallRules: cluster.firewallRules.filter(\n\t\t\t\t\t\t\t\t\t\t\t\t\t(rule: FirewallRule) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\trule.description !== removedRule.description\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tonAdd={(addedRule: FirewallRule) => {\n\t\t\t\t\t\t\t\t\t\tonChange &&\n\t\t\t\t\t\t\t\t\t\t\tonChange({\n\t\t\t\t\t\t\t\t\t\t\t\t...cluster,\n\t\t\t\t\t\t\t\t\t\t\t\tfirewallRules: [...cluster.firewallRules, addedRule]\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{/* FireWall end */}\n\n\t\t\t\t\t\t{(clusterType === CLUSTER_TYPE.MANAGED ||\n\t\t\t\t\t\t\tclusterType === CLUSTER_TYPE.MONITORED) && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{/*\n\n\t\t\t\t\t\t\t\tDB Root Password\n\n\t\t\t\t\t\t\t*/}\n\t\t\t\t\t\t{showDBRootPassword && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tconst target = e.target as HTMLFormElement;\n\n\t\t\t\t\t\t\t\t\t\tonChange &&\n\t\t\t\t\t\t\t\t\t\t\tonChange({\n\t\t\t\t\t\t\t\t\t\t\t\t...cluster,\n\t\t\t\t\t\t\t\t\t\t\t\tsharedConfig: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t...cluster.sharedConfig,\n\t\t\t\t\t\t\t\t\t\t\t\t\tnode: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...cluster.sharedConfig.node,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\trootPassword: target.value as string\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t{/*\n\n\t\t\t\t\t\t\t\tEntire Access Control ---\n\n\t\t\t\t\t\t\t*/}\n\n\t\t\t\t\t{showCloudProvider && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{/*\n\n\t\t\t\t\t\t\t\t\tCloud Provider\n\n\t\t\t\t\t\t\t\t*/}\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tCloud provider\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\tconst selectedCloudProvider = e.target.value as HOST_TYPE;\n\n\t\t\t\t\t\t\t\t\t\t\tconst defaultHostTypeSpecificConfig =\n\t\t\t\t\t\t\t\t\t\t\t\tHostUtils.getHostTypeSpecificDefaults(\n\t\t\t\t\t\t\t\t\t\t\t\t\tselectedCloudProvider\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t\tconst isCurrentSystemSupported =\n\t\t\t\t\t\t\t\t\t\t\t\tSupportMatrix.isSystemSupported(\n\t\t\t\t\t\t\t\t\t\t\t\t\tcluster.sharedConfig.host.system,\n\t\t\t\t\t\t\t\t\t\t\t\t\tselectedCloudProvider\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t\tif (!isCurrentSystemSupported) {\n\t\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thostSystem: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisInvalid: false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmessage: `${cluster.sharedConfig.host.system} is not supported on ${selectedCloudProvider}`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tonChange &&\n\t\t\t\t\t\t\t\t\t\t\t\tonChange({\n\t\t\t\t\t\t\t\t\t\t\t\t\t...cluster,\n\t\t\t\t\t\t\t\t\t\t\t\t\tsharedConfig: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...cluster.sharedConfig,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thost: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...cluster.sharedConfig.host,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype: selectedCloudProvider,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thostTypeSpecific: defaultHostTypeSpecificConfig,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsystem: cluster.sharedConfig.host.system\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tinputProps={{\n\t\t\t\t\t\t\t\t\t\t\tid: \"host-type\",\n\t\t\t\t\t\t\t\t\t\t\t\"data-testid\": \"cloud-provider-select\"\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tAWS EC2\n\t\t\t\t\t\t\t\t\t\t\t{!SupportMatrix.isSystemSupported(\n\t\t\t\t\t\t\t\t\t\t\t\tcluster.sharedConfig.host.system,\n\t\t\t\t\t\t\t\t\t\t\t\tHOST_TYPE.EC2\n\t\t\t\t\t\t\t\t\t\t\t) &&\n\t\t\t\t\t\t\t\t\t\t\t\t` (${cluster.sharedConfig.host.system} cannot be deployed on AWS EC2)`}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tDigitalOcean\n\t\t\t\t\t\t\t\t\t\t\t{!SupportMatrix.isSystemSupported(\n\t\t\t\t\t\t\t\t\t\t\t\tcluster.sharedConfig.host.system,\n\t\t\t\t\t\t\t\t\t\t\t\tHOST_TYPE.DIGITAL_OCEAN\n\t\t\t\t\t\t\t\t\t\t\t) &&\n\t\t\t\t\t\t\t\t\t\t\t\t` (${cluster.sharedConfig.host.system} cannot be deployed on DigitalOcean)`}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\n\t\t\t\t\t{showMaxDBSize && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\tconst form = e.target as HTMLFormElement;\n\n\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\t\tdatabaseSizeGiB: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation.databaseSizeGiB,\n\t\t\t\t\t\t\t\t\t\t\t\t\tisInvalid: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\tmessage: form.validationMessage\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\terror={formValidation.databaseSizeGiB?.isInvalid}\n\t\t\t\t\t\t\t\t\tfullWidth={true}\n\t\t\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\tconst databaseSizeGiB = parseInt(e.target.value);\n\n\t\t\t\t\t\t\t\t\t\t\tonChange &&\n\t\t\t\t\t\t\t\t\t\t\t\tonChange({\n\t\t\t\t\t\t\t\t\t\t\t\t\t...cluster,\n\t\t\t\t\t\t\t\t\t\t\t\t\tsharedConfig: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...cluster.sharedConfig,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thost: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...cluster.sharedConfig.host,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdatabaseSizeGiB\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdatabaseSizeGiB: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation.databaseSizeGiB,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tisInvalid: false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmessage: \"\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tinputProps={{\n\t\t\t\t\t\t\t\t\t\t\tid: \"ebs-volume-size\",\n\t\t\t\t\t\t\t\t\t\t\t\"data-testid\": \"ebs-volume-size\",\n\t\t\t\t\t\t\t\t\t\t\treadOnly: readOnly,\n\t\t\t\t\t\t\t\t\t\t\tmin: 1,\n\t\t\t\t\t\t\t\t\t\t\tmax: 65536\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tInputProps={{\n\t\t\t\t\t\t\t\t\t\t\tendAdornment: (\n\t\t\t\t\t\t\t\t\t\t\t\tGiB\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\n\t\t\t\t\t{showDigitalOcean && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t// console.log(\"onDOChange\", config);\n\n\t\t\t\t\t\t\t\t\tonChange &&\n\t\t\t\t\t\t\t\t\t\tonChange({\n\t\t\t\t\t\t\t\t\t\t\t...cluster,\n\t\t\t\t\t\t\t\t\t\t\tsharedConfig: {\n\t\t\t\t\t\t\t\t\t\t\t\t...cluster.sharedConfig,\n\t\t\t\t\t\t\t\t\t\t\t\thost: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t...cluster.sharedConfig.host,\n\t\t\t\t\t\t\t\t\t\t\t\t\thostTypeSpecific: config\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tonValidationChange={(isValid: boolean) => {\n\t\t\t\t\t\t\t\t\tconsole.log(\"onValidationChange\", isValid);\n\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\tisDeploymentConfigValid: isValid\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\n\t\t\t\t\t{/* {console.log(\n\t\t\t\t\t\t\"cluster.sharedConfig.host.type === HOST_TYPE.EC2 - \",\n\t\t\t\t\t\tcluster.sharedConfig.host.type === HOST_TYPE.EC2\n\t\t\t\t\t)}\n\t\t\t\t\t{console.log(\n\t\t\t\t\t\t\"cluster.sharedConfig.host.hostTypeSpecific - \",\n\t\t\t\t\t\tcluster.sharedConfig.host.hostTypeSpecific\n\t\t\t\t\t)}\n\t\t\t\t\t{console.log(\"showEC2 - \", showEC2)} */}\n\n\t\t\t\t\t{cluster.sharedConfig.host.type === HOST_TYPE.EC2 &&\n\t\t\t\t\t\tcluster.sharedConfig.host.hostTypeSpecific && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t// console.log(\"onEC2 config change\", ec2Config);\n\n\t\t\t\t\t\t\t\t\t\tonChange &&\n\t\t\t\t\t\t\t\t\t\t\tonChange({\n\t\t\t\t\t\t\t\t\t\t\t\t...cluster,\n\t\t\t\t\t\t\t\t\t\t\t\tsharedConfig: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t...cluster.sharedConfig,\n\t\t\t\t\t\t\t\t\t\t\t\t\thost: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...cluster.sharedConfig.host,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thostTypeSpecific: ec2Config\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tonValidationChange={(isValid: boolean) => {\n\t\t\t\t\t\t\t\t\t\t// console.log(\"onValidationChange\", isValid);\n\t\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\t\tisDeploymentConfigValid: isValid\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\t// private getDbEngineValidationMessage(): string {\n\t// \tif (this.state.formValidation.dbEngine?.message) {\n\t// \t\treturn this.state.formValidation.dbEngine.message;\n\t// \t} else if (\n\t// \t\t!this.props.readOnly &&\n\t// \t\tSupportMatrix.isDbDeprecated(\n\t// \t\t\tthis.props.cluster.sharedConfig.node.dbEngine,\n\t// \t\t\tthis.props.cluster.sharedConfig.host.system,\n\t// \t\t\tthis.props.cluster.sharedConfig.host.type\n\t// \t\t)\n\t// \t) {\n\t// \t\treturn `${this.props.cluster.sharedConfig.node.dbEngine} is deprecated. It's not recommended to create new clusters using deprecated db engines.`;\n\t// \t} else {\n\t// \t\treturn \"\";\n\t// \t}\n\t// }\n\n\tprivate getHostSystemValidationMessage(): string {\n\t\tif (this.state.formValidation.hostSystem?.message) {\n\t\t\treturn this.state.formValidation.hostSystem?.message;\n\t\t} else if (\n\t\t\t!this.props.readOnly &&\n\t\t\tSupportMatrix.isSystemDeprecated(\n\t\t\t\tthis.props.cluster.sharedConfig.host.system,\n\t\t\t\tthis.props.cluster.sharedConfig.host.type\n\t\t\t)\n\t\t) {\n\t\t\treturn `${this.props.cluster.sharedConfig.host.system} is deprecated. It's not recommended to create new clusters using deprecated systems.`;\n\t\t} else {\n\t\t\treturn \"\";\n\t\t}\n\t}\n}\n\nexport default withStyles(styles, { withTheme: true })(ClusterFormComponent);\n","import { Job, JobTracking } from \"services/jobs/types\";\nimport {\n\tAddRunningJob,\n\tBootDone,\n\tJOB_MONITOR_ACTION,\n\tRemoveRunningJob,\n\tRemoveTrackedJob,\n\tSetRunningJobs,\n\tSetTrackedJob,\n\tConsolidateTrackedJobs,\n\tTrackJob,\n\tUntrackJob\n} from \"store/jobsMonitor/types\";\n\nexport const bootDone = (): BootDone => ({\n\ttype: JOB_MONITOR_ACTION.BOOT_DONE\n});\n\nexport const setRunningJobs = (jobs: JobTracking[]): SetRunningJobs => ({\n\ttype: JOB_MONITOR_ACTION.SET_RUNNING_JOBS,\n\tpayload: {\n\t\tjobs\n\t}\n});\n\nexport const addRunningJob = (job: JobTracking): AddRunningJob => ({\n\ttype: JOB_MONITOR_ACTION.ADD_RUNNING_JOB,\n\tpayload: {\n\t\tjob\n\t}\n});\n\nexport const removeRunningJob = (jobId: number): RemoveRunningJob => ({\n\ttype: JOB_MONITOR_ACTION.REMOVE_RUNNING_JOB,\n\tpayload: {\n\t\tjobId\n\t}\n});\n\nexport const trackJob = (jobId: number): TrackJob => ({\n\ttype: JOB_MONITOR_ACTION.TRACK,\n\tpayload: {\n\t\tjobId\n\t}\n});\n\nexport const untrackJob = (jobId: number): UntrackJob => ({\n\ttype: JOB_MONITOR_ACTION.UNTRACK,\n\tpayload: {\n\t\tjobId\n\t}\n});\n\nexport const consolidateTrackedJobs = (jobs: Job[]): ConsolidateTrackedJobs => ({\n\ttype: JOB_MONITOR_ACTION.CONSOLIDATE_TRACKED_JOBS,\n\tpayload: {\n\t\tjobs\n\t}\n});\n\nexport const setTrackedJob = (job: JobTracking): SetTrackedJob => ({\n\ttype: JOB_MONITOR_ACTION.SET_TRACKED_JOB,\n\tpayload: {\n\t\tjob\n\t}\n});\n\nexport const removeTrackedJob = (jobId: number): RemoveTrackedJob => ({\n\ttype: JOB_MONITOR_ACTION.REMOVE_TRACKED_JOB,\n\tpayload: {\n\t\tjobId\n\t}\n});\n","import { Job, JOB_STATUS, JobTracking } from \"services/jobs/types\";\nimport { appStore } from \"index\";\nimport { AppState } from \"AppState\";\nimport moment from \"moment\";\nimport { setTrackedJob, trackJob, untrackJob } from \"store/jobsMonitor/actions\";\n\nconst TIME_TO_MISSING = 30000; // ms to wait before reporting missing jobs\n\nclass JobsService {\n\tprivate static getJobTracking(jobId: number): JobTracking | undefined {\n\t\tconst state = appStore.getState() as AppState;\n\n\t\treturn state.jobMonitor.trackedJobList.find(\n\t\t\t(jobTracking: JobTracking) => jobTracking.id === jobId\n\t\t);\n\t}\n\n\tpublic static async trackJob(job: Job): Promise {\n\t\tconst trackingStartTimestamp = moment();\n\n\t\tconst {\n\t\t\tid,\n\t\t\texecutionInfo: { status },\n\t\t\tmeta\n\t\t} = job;\n\t\t// console.log(\"dispatch trackJob\", id);\n\t\tappStore.dispatch(trackJob(id));\n\t\tappStore.dispatch(\n\t\t\tsetTrackedJob({\n\t\t\t\tid,\n\t\t\t\tstatus,\n\t\t\t\tmeta\n\t\t\t})\n\t\t);\n\n\t\t// create new promise and return it\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst jobTracking = this.getJobTracking(id);\n\t\t\t// console.log(\"tracking job\", jobId, job);\n\n\t\t\tprocessJobStatus(jobTracking);\n\n\t\t\t// TODO: optimize - run only when jobMonitor state is changed\n\t\t\tconst unsubscribe = appStore.subscribe(() => {\n\t\t\t\tconst job = this.getJobTracking(id);\n\t\t\t\t// console.log(\"checking job status\", job);\n\t\t\t\tprocessJobStatus(job);\n\t\t\t});\n\n\t\t\tasync function processJobStatus(jobTracking: JobTracking | undefined) {\n\t\t\t\t// console.log(\"processJobStatus\", job?.executionInfo.status);\n\n\t\t\t\tif (\n\t\t\t\t\t!jobTracking &&\n\t\t\t\t\tmoment()\n\t\t\t\t\t\t.subtract(TIME_TO_MISSING, \"ms\")\n\t\t\t\t\t\t.isBefore(trackingStartTimestamp)\n\t\t\t\t) {\n\t\t\t\t\t// console.info(\n\t\t\t\t\t// \t`Couldn't find job ${jobId}, but it's still too early to stop tracking...`\n\t\t\t\t\t// );\n\t\t\t\t} else if (!jobTracking) {\n\t\t\t\t\tconsole.warn(`Could not find job ${id}!`);\n\t\t\t\t\treject({\n\t\t\t\t\t\tid: -1,\n\t\t\t\t\t\texecutionInfo: {\n\t\t\t\t\t\t\tstatus: JOB_STATUS.MISSING\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tunsubscribe && unsubscribe();\n\t\t\t\t\tappStore.dispatch(untrackJob(id));\n\t\t\t\t\treject(jobTracking);\n\t\t\t\t} else {\n\t\t\t\t\tif (jobTracking.status === JOB_STATUS.SUCCESS) {\n\t\t\t\t\t\tunsubscribe && unsubscribe();\n\t\t\t\t\t\tappStore.dispatch(untrackJob(id));\n\t\t\t\t\t\tresolve(jobTracking);\n\t\t\t\t\t} else if (\n\t\t\t\t\t\tjobTracking.status === JOB_STATUS.ABORTED ||\n\t\t\t\t\t\tjobTracking.status === JOB_STATUS.FAILURE ||\n\t\t\t\t\t\tjobTracking.status === JOB_STATUS.MISSING\n\t\t\t\t\t) {\n\t\t\t\t\t\t// TODO: fetch full job from REST API to get error details\n\t\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t\t`Job ${id} failed with status ${jobTracking.status}`,\n\t\t\t\t\t\t\tjobTracking\n\t\t\t\t\t\t);\n\t\t\t\t\t\tunsubscribe && unsubscribe();\n\t\t\t\t\t\tappStore.dispatch(untrackJob(id));\n\n\t\t\t\t\t\treject(jobTracking);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport default JobsService;\n","export const checkIfDesktop = (width: number) => {\n\treturn window.innerWidth >= width;\n};\n","import { Subject } from \"rxjs\";\nimport {\n\tAlertDialog,\n\tConfirmDialog\n} from \"components/dialog/types\";\n\nexport class GMDialogService {\n\tprivate static instance: GMDialogService;\n\n\tstatic getInstance(): GMDialogService {\n\t\tif (!GMDialogService.instance) {\n\t\t\tGMDialogService.instance = new GMDialogService();\n\t\t}\n\t\treturn GMDialogService.instance;\n\t}\n\n\t// ALERT\n\tprivate _alertDialog: Subject = new Subject();\n\n\tstatic get alertDialog(): Subject {\n\t\tconst instance = this.getInstance();\n\t\treturn instance._alertDialog;\n\t}\n\n\tpublic static async showInfo(content: AlertDialog): Promise {\n\t\tconst instance = this.getInstance();\n\n\t\treturn new Promise((resolve) => {\n\t\t\tinstance._alertDialog.next({ ...content, resolve });\n\t\t});\n\t}\n\n\t// CONFIRM\n\tprivate _confirmDialog: Subject = new Subject();\n\n\tstatic get confirmDialog(): Subject {\n\t\tconst instance = this.getInstance();\n\t\treturn instance._confirmDialog;\n\t}\n\n\tpublic static async showConfirm(content: ConfirmDialog): Promise {\n\t\tconst instance = this.getInstance();\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tinstance._confirmDialog.next({ ...content, resolve, reject });\n\t\t});\n\t}\n}\n","import React from \"react\";\nimport { RouteComponentProps, StaticContext, withRouter } from \"react-router\";\n// MUI\nimport {\n\tBox,\n\tButton,\n\tCheckbox,\n\tDialog,\n\tDialogActions,\n\tDialogContent,\n\tDialogTitle,\n\tFormControlLabel,\n\tGrid,\n\tIconButton,\n\tPaper,\n\tStep,\n\tStepLabel,\n\tStepper,\n\tTooltip,\n\tTypography\n} from \"@mui/material\";\nimport { WithStyles, WithTheme } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { styles } from \"pages/management/cluster/clusterCreateWizard/styles\";\nimport {\n\tContentCopy as ContentCopyIcon,\n\tDatabase as DatabaseIcon,\n\tServer as ServerIcon\n} from \"mdi-material-ui\";\n// redux\nimport { connect } from \"react-redux\";\nimport { AppState } from \"AppState\";\nimport {\n\tCLUSTER_TYPE,\n\tClusterCreateWizardState\n} from \"pages/management/cluster/clusterCreateWizard/types\";\nimport { clusterCreateWizardHide } from \"pages/management/cluster/clusterCreateWizard/actions\";\n\nimport { HOST_TYPE } from \"pages/management/host/types\";\nimport { showSnackbar } from \"components/snackbar/actionCreators\";\nimport { Cluster } from \"pages/management/cluster/types\";\nimport { SnackbarActionPayload } from \"components/snackbar/types\";\nimport { nodeCreateWizardShow } from \"pages/management/node/nodeDeploymentDialog/actions\";\nimport ClusterFormComponent from \"pages/management/cluster/clusterForm/ClusterFormComponent\";\nimport { DEFAULT_CLUSTER } from \"pages/management/cluster/const\";\nimport ClustersAPI from \"services/api/ClustersAPI\";\nimport { Job, JobTracking } from \"services/jobs/types\";\nimport JobsService from \"services/jobs/jobsService\";\nimport { clusterListFetchRequested } from \"store/cluster/actions\";\nimport CircularProgress from \"@mui/material/CircularProgress\";\nimport { checkIfDesktop } from \"utils/checkIfDesktop\";\n\nimport { GMDialogService } from \"components/dialog/DialogService\";\n\n// component local state interface\ninterface LocalState {\n\tcluster: Cluster;\n\tactiveStep: number;\n\tinProgress: boolean;\n\thasErrorHappened: boolean;\n\terrorMessage: string;\n\tclusterType: CLUSTER_TYPE;\n\taddedPublicKeysCheckbox: boolean;\n\tformIsChanged: boolean;\n}\n\n// PROPS\ninterface ReduxStateProps {\n\tclusterCreateWizard: ClusterCreateWizardState;\n}\n\ninterface ReduxDispatchProps {\n\tshowSnackbar: (snackbar: SnackbarActionPayload) => void;\n\tclusterCreateWizardHide: () => void;\n\tclusterListFetchRequested: () => void;\n\tnodeCreateWizardShow: (cluster: Cluster) => void;\n}\n\ntype Props = ReduxStateProps &\n\tReduxDispatchProps &\n\tWithStyles &\n\tWithTheme &\n\tRouteComponentProps;\n\nclass ClusterCreateDialogComponent extends React.Component {\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\t\tthis.state = { ...this.getDefaultState() };\n\t}\n\n\tresetState() {\n\t\tthis.setState({ ...this.getDefaultState() });\n\t}\n\n\tgetDefaultState(): LocalState {\n\t\treturn {\n\t\t\tcluster: DEFAULT_CLUSTER,\n\t\t\tactiveStep: 0,\n\t\t\tinProgress: false,\n\t\t\thasErrorHappened: false,\n\t\t\terrorMessage: \"\",\n\t\t\tclusterType: CLUSTER_TYPE.MANAGED,\n\t\t\taddedPublicKeysCheckbox: false,\n\t\t\tformIsChanged: false // if form is modified, ask user if they want to abandon changes they made\n\t\t};\n\n\t\t// @ts-ignore\n\t\t// const pk = sshpk.generatePrivateKey(\"ed25519\");\n\n\t\t// console.log(\n\t\t// \t\"private key\",\n\t\t// \tpk,\n\t\t// \tpk.toString(\"openssh\"),\n\t\t// \tpk.toPublic().toString(\"ssh\")\n\t\t// );\n\n\t\t// defaultState.cluster.sharedConfig.host.privateKey = pk.toString(\"openssh\");\n\t\t// defaultState.cluster.sharedConfig.host.authorizedKeys = [\n\t\t// \tpk.toPublic().toString(\"ssh\")\n\t\t// ];\n\n\t}\n\n\thideWizard = () => {\n\t\tthis.props.clusterCreateWizardHide();\n\t\tsetTimeout(() => {\n\t\t\tthis.resetState();\n\t\t}, 500);\n\t};\n\n\tonCloseAttempt(step: number): void {\n\t\tif (step === 0 || step === 1) {\n\t\t\tif (this.state.formIsChanged) {\n\t\t\t\tGMDialogService.showConfirm({\n\t\t\t\t\ttitle: \"Unsaved changes\",\n\t\t\t\t\tmessage:\n\t\t\t\t\t\t\"Are you sure you want to exit the dialog? Changes will be lost.\",\n\t\t\t\t\tconfirmText: \"Exit\",\n\t\t\t\t\tdeclineText: \"Keep editing\"\n\t\t\t\t}).then(\n\t\t\t\t\t() => {\n\t\t\t\t\t\tthis.hideWizard();\n\t\t\t\t\t},\n\t\t\t\t\t() => {}\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tthis.hideWizard();\n\t\t\t}\n\t\t}\n\t}\n\n\t// set formIsChanged to true, so user is asked to confirm that they want to leave the form editing\n\tsetFormIsChangedToTrue = () => {\n\t\tif (!this.state.formIsChanged) {\n\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t...state,\n\t\t\t\tformIsChanged: true\n\t\t\t}));\n\t\t}\n\t};\n\n\tonClusterTypeSelected = (clusterType: CLUSTER_TYPE) => {\n\t\t// console.log(\"cluster type selected\", clusterType);\n\n\t\tswitch (clusterType) {\n\t\t\tcase CLUSTER_TYPE.MANAGED:\n\t\t\t\tthis.setState({ activeStep: 1 });\n\t\t\t\tbreak;\n\n\t\t\tcase CLUSTER_TYPE.HYBRID:\n\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\tclusterType: CLUSTER_TYPE.HYBRID,\n\t\t\t\t\tactiveStep: 1,\n\t\t\t\t\tcluster: {\n\t\t\t\t\t\t...state.cluster,\n\t\t\t\t\t\tsharedConfig: {\n\t\t\t\t\t\t\t...state.cluster.sharedConfig,\n\t\t\t\t\t\t\thost: {\n\t\t\t\t\t\t\t\t...state.cluster.sharedConfig.host,\n\t\t\t\t\t\t\t\ttype: HOST_TYPE.UNMANAGED\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}));\n\t\t\t\tbreak;\n\n\t\t\tcase CLUSTER_TYPE.MONITORED:\n\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\tclusterType: CLUSTER_TYPE.MONITORED,\n\t\t\t\t\tactiveStep: 1,\n\t\t\t\t\tcluster: {\n\t\t\t\t\t\t...state.cluster,\n\t\t\t\t\t\tunmanaged: true,\n\t\t\t\t\t\tsharedConfig: {\n\t\t\t\t\t\t\t...state.cluster.sharedConfig,\n\t\t\t\t\t\t\thost: {\n\t\t\t\t\t\t\t\t...state.cluster.sharedConfig.host,\n\t\t\t\t\t\t\t\ttype: HOST_TYPE.UNMANAGED\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tnode: {\n\t\t\t\t\t\t\t\t...state.cluster.sharedConfig.node,\n\t\t\t\t\t\t\t\trootPassword: \"\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}));\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n\tasync createCluster(cluster: Cluster) {\n\t\tconsole.log(\"add cluster\", cluster);\n\t\tthis.setState({\n\t\t\tinProgress: true,\n\t\t\thasErrorHappened: false,\n\t\t\terrorMessage: \"\"\n\t\t});\n\n\t\ttry {\n\t\t\tconsole.time('clusterCreate')\n\t\t\tconst response: { job: Job; cluster: Cluster } = await ClustersAPI.create(\n\t\t\t\tcluster\n\t\t\t);\n\t\t\tconsole.timeEnd(\"clusterCreate\")\n\t\t\tconst { job, cluster: createdCluster } = response;\n\n\t\t\tconsole.log('tracking cluster create job', job.id);\n\t\t\tJobsService.trackJob(job).then(\n\t\t\t\t(job: JobTracking) => {\n\t\t\t\t\tconsole.log(\"Cluster created!\", createdCluster.name, job);\n\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tinProgress: false,\n\t\t\t\t\t\tactiveStep: 2,\n\t\t\t\t\t\tcluster: createdCluster\n\t\t\t\t\t});\n\t\t\t\t\tthis.props.clusterListFetchRequested();\n\t\t\t\t},\n\t\t\t\t(job: Job) => {\n\t\t\t\t\tconsole.error(\"Cluster create job failed\", createdCluster.name, job);\n\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tinProgress: false,\n\t\t\t\t\t\thasErrorHappened: true,\n\t\t\t\t\t\terrorMessage: `Cluster creation failed. ${job.executionInfo.details}`\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t);\n\t\t} catch (e: any) {\n\t\t\tconsole.error(\"Cluster creation error.\", e);\n\t\t\tthis.setState({\n\t\t\t\tinProgress: false,\n\t\t\t\thasErrorHappened: true,\n\t\t\t\terrorMessage: `Failed to create a cluster. ${e.message}`\n\t\t\t});\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { isOpen } = this.props.clusterCreateWizard;\n\t\tconst { classes } = this.props;\n\n\t\tconst {\n\t\t\tactiveStep,\n\t\t\tcluster,\n\t\t\tinProgress,\n\t\t\thasErrorHappened,\n\t\t\terrorMessage,\n\t\t\tclusterType,\n\t\t\taddedPublicKeysCheckbox\n\t\t} = this.state;\n\n\t\tconst stepper = (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{\"Select cluster type\"}\n\t\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t\t\t{\"Configure\"}\n\t\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t\t\t{\"Finish\"}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\n\t\tconst cancelAddClusterButton = (\n\t\t\t {\n\t\t\t\t\tthis.onCloseAttempt(activeStep);\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\tCancel\n\t\t\t\n\t\t);\n\n\t\tconst wizardButtons = (\n\t\t\t<>\n\t\t\t\t{(activeStep === 0 && <>{cancelAddClusterButton}) ||\n\t\t\t\t\t(activeStep === 1 && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{cancelAddClusterButton}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{inProgress && (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{inProgress ? \"Creating...\" : \"Create\"}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t)) ||\n\t\t\t\t\t(activeStep === 2 && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tthis.hideWizard();\n\t\t\t\t\t\t\t\t\tthis.props.nodeCreateWizardShow(cluster);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tAdd nodes\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tthis.hideWizard();\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tFinish\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t))}\n\t\t\t\n\t\t);\n\n\t\tconst clusterTypeSelectionStep = (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tthis.onClusterTypeSelected(CLUSTER_TYPE.MANAGED);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tdata-testid=\"cluster-type-managed\"\n\t\t\t\t\t>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tDeploy fully managed cluster\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tRequires AWS EC2 or DigitalOcean account\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
  • nodes monitoring
  • \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\t\t\t\t\t\tdeploy nodes on selected cloud provider (AWS EC2,\n\t\t\t\t\t\t\t\t\t\t\t\tDigitalOcean)\n\t\t\t\t\t\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
  • deploy multiple nodes at once
  • \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
  • start / stop nodes
  • \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
  • enable / disable node general log
  • \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tMANAGED NODE\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tMANAGED HOST\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tthis.onClusterTypeSelected(CLUSTER_TYPE.HYBRID);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tdata-testid=\"cluster-type-hybrid\"\n\t\t\t\t\t>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tDeploy cluster on user-provided hosts\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tRequires access to user-provided hosts\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
  • nodes monitoring
  • \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\t\t\t\t\t\tinstall and uninstall node on the user-provided hosts\n\t\t\t\t\t\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
  • start / stop nodes
  • \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
  • enable / disable node general log
  • \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tMANAGED NODE\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tMONITORED HOST\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tthis.onClusterTypeSelected(CLUSTER_TYPE.MONITORED);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tdata-testid=\"cluster-type-monitored\"\n\t\t\t\t\t\tvariant=\"outlined\"\n\t\t\t\t\t\tclassName={classes.paperContainer}\n\t\t\t\t\t>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tMonitor existing cluster\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tRequires access to existing Galera Cluster nodes\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
  • chart node and host metrics
  • \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
  • view node logs
  • \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tMONITORED NODE\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tMONITORED HOST\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\n\t\tconst configureStep = (\n\t\t\t<>\n\t\t\t\t {\n\t\t\t\t\t\tconsole.log(\"clusterSubmitted\", cluster);\n\t\t\t\t\t\tthis.createCluster(cluster);\n\t\t\t\t\t}}\n\t\t\t\t\tonChange={(cluster: Cluster) => {\n\t\t\t\t\t\t// console.log(\"onChange\", cluster);\n\t\t\t\t\t\tthis.setFormIsChangedToTrue();\n\t\t\t\t\t\tthis.setState({ cluster });\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t\n\t\t);\n\n\t\tconst finishStep = (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\tCluster has been successfully created.\n\t\t\t\t\n\t\t\t\t{clusterType !== CLUSTER_TYPE.MANAGED && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tGalera Manager must have root access to your nodes. To make sure\n\t\t\t\t\t\t\tit does, please add following public key to the\n\t\t\t\t\t\t\t/root/.ssh/authorized_keys file on all nodes.\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{cluster.sharedConfig.host.authorizedKeys &&\n\t\t\t\t\t\t\t\tcluster.sharedConfig.host.authorizedKeys[0]}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\tnavigator.clipboard &&\n\t\t\t\t\t\t\t\t\t\t\tcluster.sharedConfig.host.authorizedKeys\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\tnavigator.clipboard\n\t\t\t\t\t\t\t\t\t\t\t\t.writeText(cluster.sharedConfig.host.authorizedKeys[0])\n\t\t\t\t\t\t\t\t\t\t\t\t.then(\n\t\t\t\t\t\t\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmsg: \"Public key copied to clipboard\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t(err: Error) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconsole.error(\"Password copy error:\", err);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmsg: \"Couldn't copy public key to clipboard\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\t\t\t\t\t\tmsg: \"Couldn't copy public key\"\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tedge=\"end\"\n\t\t\t\t\t\t\t\t\taria-label=\"Copy\"\n\t\t\t\t\t\t\t\t\tsize=\"large\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\taddedPublicKeysCheckbox: !state.addedPublicKeysCheckbox\n\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tlabel=\"I have added public key to /root/.ssh/authorized_keys file on all nodes\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\n\t\t);\n\n\t\tconst dialogContent = (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t{stepper}\n\t\t\t\t\t{hasErrorHappened && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{errorMessage}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\t{(activeStep === 0 && clusterTypeSelectionStep) ||\n\t\t\t\t\t\t(activeStep === 1 && configureStep) ||\n\t\t\t\t\t\t(activeStep === 2 && finishStep)}\n\t\t\t\t\n\t\t\t\t{wizardButtons}\n\t\t\t\n\t\t);\n\n\t\tconst isDesktop = checkIfDesktop(600);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t {\n\t\t\t\t\t\tthis.onCloseAttempt(activeStep);\n\t\t\t\t\t}}\n\t\t\t\t\tscroll=\"body\"\n\t\t\t\t\tfullScreen={!isDesktop}\n\t\t\t\t\tfullWidth={isDesktop}\n\t\t\t\t\tmaxWidth={activeStep === 2 ? \"sm\" : \"md\"}\n\t\t\t\t\topen={isOpen}\n\t\t\t\t>\n\t\t\t\t\tAdd cluster\n\t\t\t\t\t{dialogContent}\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\n// REDUX MAPPINGS\nconst mapGlobalStateToProps = (state: AppState) => ({\n\tclusterCreateWizard: state.clusterCreateWizard\n});\n\nconst mapGlobalDispatchToProps = (dispatch: any) => ({\n\tclusterCreateWizardHide: (): void => {\n\t\tdispatch(clusterCreateWizardHide());\n\t},\n\tclusterListFetchRequested: (): void => {\n\t\tdispatch(clusterListFetchRequested());\n\t},\n\tnodeCreateWizardShow: (cluster: Cluster) => {\n\t\tdispatch(nodeCreateWizardShow(cluster));\n\t},\n\tshowSnackbar: (snackbar: SnackbarActionPayload) => {\n\t\tdispatch(showSnackbar(snackbar));\n\t}\n});\n\nexport default withStyles(styles, { withTheme: true })(\n\twithRouter(\n\t\tconnect(\n\t\t\tmapGlobalStateToProps,\n\t\t\tmapGlobalDispatchToProps\n\t\t)(ClusterCreateDialogComponent)\n\t)\n);\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from \"@mui/styles/createStyles\";\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\tstepperRoot: {\n\t\t\tpadding: \"0 0 20px 0\"\n\t\t},\n\t\tbuttonLoader: {\n\t\t\tmarginRight: \"10px\"\n\t\t},\n\t\tpaperContainer: {\n\t\t\tcursor: \"pointer\",\n\t\t\t\"&:hover\": {\n\t\t\t\tbackgroundColor: \"#f6f6f6\"\n\t\t\t},\n\t\t\t\"&:active\": {\n\t\t\t\tbackgroundColor: \"#f0f0f0\"\n\t\t\t}\n\t\t},\n\t\ttypeSelectionPaper: {\n\t\t\tpadding: \"10px\"\n\t\t\t// backgroundColor: \"#f0f0f0\"\n\t\t},\n\t\tmonitorBox: {\n\t\t\twidth: \"120px\",\n\t\t\theight: \"95px\",\n\t\t\ttextAlign: \"center\",\n\t\t\tborder: \"2px solid\",\n\t\t\tborderColor: \"#646464\"\n\t\t},\n\t\tmonitorIcon: {\n\t\t\tcolor: \"#646464\",\n\t\t\tfontSize: \"4.5em\",\n\t\t\tpadding: \"10px 10px 0 10px\"\n\t\t},\n\t\tmonitorText: {\n\t\t\tmarginTop: -10,\n\t\t\tcolor: \"#646464\",\n\t\t\tfontSize: \"0.7em\"\n\t\t},\n\t\tmanageBox: {\n\t\t\twidth: \"120px\",\n\t\t\theight: \"95px\",\n\t\t\ttextAlign: \"center\",\n\t\t\tborder: \"2px solid\",\n\t\t\tborderColor: theme.palette.primary.main\n\t\t},\n\t\tmanageIcon: {\n\t\t\tcolor: theme.palette.primary.main,\n\t\t\tfontSize: \"4.5em\",\n\t\t\tpadding: \"10px 10px 0 10px\"\n\t\t},\n\t\tmanageText: {\n\t\t\tcolor: theme.palette.primary.dark,\n\t\t\tfontSize: \"0.7em\",\n\t\t\tmarginTop: -10\n\t\t},\n\t\tpublicKey: {\n\t\t\tfontSize: \"0.9em\",\n\t\t\twordBreak: \"break-all\",\n\t\t\tcolor: \"white\",\n\t\t\tbackgroundColor: \"black\",\n\t\t\tfontFamily: \"monospace\",\n\t\t\tpadding: theme.spacing(1)\n\t\t},\n\t\tcopyKeyIcon: {\n\t\t\tcolor: \"white\"\n\t\t}\n\t});\n","import Axios, { CancelToken } from \"axios\";\nimport { deattribute } from \"kitsu-core\";\nimport APIUtils from \"services/api/utils\";\nimport AppEnvironment from \"services/appEnvironment\";\nimport { Job, JobTracking, SerializedJob } from \"services/jobs/types\";\n\nconst ENDPOINT = \"jobs\";\n\nclass JobsApi {\n\tstatic async fetchRunningJobList(): Promise {\n\t\tlet params: any = {\n\t\t\t\"page[number]\": 1,\n\t\t\t\"page[size]\": 100,\n\t\t\t\"filter[job_status]\": \"running\"\n\t\t};\n\n\t\ttry {\n\t\t\tconst jobsResponse = await Axios.get(APIUtils.getUrl(ENDPOINT), {\n\t\t\t\tparams\n\t\t\t});\n\n\t\t\treturn jobsResponse.data.data.map((item: SerializedJob) =>\n\t\t\t\tdeattribute({ ...item })\n\t\t\t);\n\t\t} catch (e) {\n\t\t\tthrow new Error(APIUtils.APIErrorResponseHandler(e));\n\t\t}\n\t}\n\n\tstatic async fetchFilteredJobList(job_ids: number[]): Promise {\n\t\tlet params: any = {\n\t\t\t\"page[number]\": 1,\n\t\t\t\"page[size]\": 100\n\t\t};\n\n\t\tparams[\"filter[job_id]\"] = job_ids.join(\",\");\n\n\t\ttry {\n\t\t\tconst jobsResponse = await Axios.get(APIUtils.getUrl(ENDPOINT), {\n\t\t\t\tparams\n\t\t\t});\n\t\t\t// console.log(\"tracked jobList\", jobsResponse.data.data);\n\n\t\t\treturn jobsResponse.data.data.map((item: SerializedJob) =>\n\t\t\t\tdeattribute({ ...item })\n\t\t\t);\n\t\t} catch (e) {\n\t\t\tthrow new Error(APIUtils.APIErrorResponseHandler(e));\n\t\t}\n\t}\n\n\tstatic async fetchPaginatedList(\n\t\tpage: number,\n\t\tpageSize: number,\n\t\tclusterID: number,\n\t\thostID?: number,\n\t\tcancelToken?: CancelToken\n\t): Promise<{ list: Job[]; totalCount: number }> {\n\t\ttry {\n\t\t\tconst jobsResponse = await Axios.get(APIUtils.getUrl(ENDPOINT), {\n\t\t\t\tcancelToken: cancelToken,\n\t\t\t\tparams: {\n\t\t\t\t\t\"page[number]\": page,\n\t\t\t\t\t\"page[size]\": pageSize,\n\t\t\t\t\t\"filter[cluster_id]\": clusterID,\n\t\t\t\t\t\"filter[host_id]\": hostID\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tconst list = jobsResponse.data.data.map((item: SerializedJob) =>\n\t\t\t\tdeattribute({ ...item })\n\t\t\t);\n\n\t\t\tconst totalCount: number = jobsResponse.data.meta.total;\n\n\t\t\treturn { list, totalCount };\n\t\t} catch (e) {\n\t\t\tthrow new Error(APIUtils.APIErrorResponseHandler(e));\n\t\t}\n\t}\n\n\tstatic async fetch(id: number): Promise {\n\t\ttry {\n\t\t\tconst response = await Axios.get(\n\t\t\t\t`${AppEnvironment.getApiAddress()}/${AppEnvironment.getApiVersion()}/jobs/${id}`\n\t\t\t);\n\n\t\t\treturn deattribute(response.data.data);\n\t\t} catch (e) {\n\t\t\tthrow new Error(APIUtils.APIErrorResponseHandler(e));\n\t\t}\n\t}\n}\n\nexport default JobsApi;\n","import React from \"react\";\nimport { Typography } from \"@mui/material\";\nimport { WithStyles } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { JOB_STATUS } from \"services/jobs/types\";\nimport { styles } from \"pages/management/node/jobs/jobStatus/styles\";\nimport { AnimateKeyframes } from \"react-simple-animate/dist\";\n\ninterface LocalState {}\n\n// default private key is used only as indicator that\ninterface LocalProps {\n\tjobStatus: JOB_STATUS;\n}\n\ntype Props = LocalProps & WithStyles;\n\nclass JobStatusComponent extends React.PureComponent {\n\trender() {\n\t\tconst { jobStatus, classes } = this.props;\n\n\t\tconst renderJobStatus = (jobStatus: JOB_STATUS) => {\n\t\t\tswitch (jobStatus) {\n\t\t\t\tcase JOB_STATUS.NEW:\n\t\t\t\t\treturn NEW;\n\t\t\t\tcase JOB_STATUS.RUNNING:\n\t\t\t\t\treturn (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tRUNNING\n\t\t\t\t\t\t\n\t\t\t\t\t);\n\t\t\t\tcase JOB_STATUS.SUCCESS:\n\t\t\t\t\treturn (\n\t\t\t\t\t\tSUCCESS\n\t\t\t\t\t);\n\t\t\t\tcase JOB_STATUS.FAILURE:\n\t\t\t\t\treturn FAILURE;\n\t\t\t\tcase JOB_STATUS.ABORTED:\n\t\t\t\t\treturn ABORTED;\n\t\t\t\tcase JOB_STATUS.MISSING:\n\t\t\t\t\treturn MISSING;\n\n\t\t\t\tdefault:\n\t\t\t\t\treturn UNKNOWN;\n\t\t\t}\n\t\t};\n\n\t\treturn <>{renderJobStatus(jobStatus)};\n\t}\n}\n\nexport default withStyles(styles, {})(JobStatusComponent);\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from '@mui/styles/createStyles';\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\tstatusSuccess: {\n\t\t\tcolor: theme.palette.success.main\n\t\t}\n\t});\n","import { Theme } from \"@mui/material\";\nimport { makeStyles } from \"@mui/styles\";\n\nconst useStyles = makeStyles((theme: Theme) => ({\n\tcontainer: {\n\t\tpaddingLeft: 8,\n\t\tpaddingRight: 8,\n\t\tbackground: \"rgb(30, 30, 30) none repeat scroll 0% 0%\",\n\t\tborderRadius: 4\n\t}\n}));\n\nexport default useStyles;\n","// MUI\nimport { Box } from \"@mui/material\";\nimport useStyles from \"components/JobErrorDetails/styles\";\n// packages\nimport yaml from \"react-syntax-highlighter/dist/esm/languages/hljs/yaml\";\n// theme for SyntaxHighlighter, try out different themes and languages\n// here: https://react-syntax-highlighter.github.io/react-syntax-highlighter/demo/\nimport { vs2015 } from \"react-syntax-highlighter/dist/esm/styles/hljs\";\nimport SyntaxHighlighter from \"react-syntax-highlighter/dist/esm/light\";\n\nSyntaxHighlighter.registerLanguage(\"yaml\", yaml);\n\nexport default function JobErrorDetails(props: { formattedYaml: string }) {\n\tconst classes = useStyles();\n\n\tconst formattedYaml = props.formattedYaml;\n\n\treturn (\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t{formattedYaml}\n\t\t\t\t\n\t\t\t\n\t\t
\n\t);\n}\n","import { Theme } from \"@mui/material\";\n\nimport { makeStyles } from \"@mui/styles\";\n\nconst useStyles = makeStyles((theme: Theme) => ({\n\tlistItem: {\n\t\tpaddingLeft: 8,\n\t\tpaddingRight: 0\n\t},\n\tconsoleIcon: {\n\t\tminWidth: 36, // TODO: remove this, since it isn't displayed BKBK\n\t\t[theme.breakpoints.up(\"sm\")]: {\n\t\t\tminWidth: 48\n\t\t}\n\t},\n\tavatar: {\n\t\tbackgroundColor: \"#aaa\",\n\t\twidth: 22,\n\t\theight: 22,\n\t\tmarginLeft: 4,\n\t\tmarginRight: 6\n\t},\n\tminiAvatar: {\n\t\twidth: 26,\n\t\tdisplay: \"flex\",\n\t\tjustifyContent: \"center\",\n\t\talignItems: \"center\",\n\t\tmarginRight: 8\n\t},\n\tfirst: {\n\t\tminWidth: 150,\n\t\twidth: 220,\n\t\tcolor: \"rgba(0, 0, 0, 1)\"\n\t},\n\tfirstType: {\n\t\tcolor: \"rgba(0, 0, 0, 0.6)\",\n\t\ttextTransform: \"capitalize\"\n\t},\n\tfirstName: {\n\t\tcolor: \"rgba(0, 0, 0, 1)\"\n\t},\n\tsecond: {\n\t\twidth: 250,\n\t\tcolor: \"rgba(0, 0, 0, 1)\"\n\t},\n\tcollapsibleItem: {\n\t\tpaddingLeft: 8,\n\t\t[theme.breakpoints.up(\"md\")]: {\n\t\t\tpaddingLeft: 56 // listItem.paddingLeft + consoleIcon.minWidth\n\t\t}\n\t},\n\topenCloseIcon: {\n\t\twidth: 34,\n\t\theight: 34,\n\t\tminWidth: 34\n\t},\n\tbuttonContainer: {\n\t\tdisplay: \"flex\",\n\t\tjustifyContent: \"space-between\"\n\t},\n\tshowDetailsBtn: {\n\t\tmarginTop: 12,\n\t\tmarginBottom: 12\n\t},\n\tcopyIconBtn: {\n\t\tmarginTop: 3,\n\t\tmarginBottom: 3\n\t},\n\ticon: {\n\t\tdisplay: \"inline\",\n\t\twidth: 18,\n\t\theight: 18,\n\t\tcolor: theme.palette.error.dark,\n\t\tmarginRight: 6\n\t}\n}));\n\nexport default useStyles;\n","import React from \"react\";\n// MUI\nimport {\n\tAlert,\n\tAlertTitle,\n\tAvatar,\n\tBox,\n\tButton,\n\tCollapse,\n\tDivider,\n\tIconButton,\n\tListItem,\n\tListItemAvatar,\n\tListItemButton,\n\tListItemText,\n\tTooltip,\n\tTypography\n} from \"@mui/material\";\n// icons\nimport {\n\tConsole as ConsoleIcon,\n\tContentCopy as ContentCopyIcon,\n\tDatabase as DatabaseIcon,\n\tServer as ServerIcon\n} from \"mdi-material-ui\";\nimport {\n\tDeviceHub as DeviceHubIcon,\n\tKeyboardArrowDown as KeyboardArrowDownIcon,\n\tKeyboardArrowUp as KeyboardArrowUpIcon,\n\tSubdirectoryArrowRight as SubdirectoryArrowRightIcon\n} from \"@mui/icons-material\";\n// redux\nimport { connect } from \"react-redux\";\n// components\nimport JobStatusComponent from \"pages/management/node/jobs/jobStatus/jobStatusComponent\";\nimport { Job, Wrapped, Meta, JobType } from \"services/jobs/types\";\nimport JobErrorDetails from \"components/JobErrorDetails/JobErrorDetailsComp\";\nimport { showSnackbar } from \"components/snackbar/actionCreators\";\nimport { SnackbarActionPayload } from \"components/snackbar/types\";\nimport useStyles from \"pages/management/node/jobs/jobComponent/styles\";\n// packages\nimport moment from \"moment\";\n\nconst yaml = require(\"js-yaml\");\n\ninterface LocalProps {\n\tjob: Job;\n}\n\ninterface DispatchProps {\n\tshowSnackbar: (snackbar: SnackbarActionPayload) => void;\n}\n\ntype Props = LocalProps & DispatchProps;\n\nfunction getAvatar(jobType: JobType) {\n\tconst avatar =\n\t\tjobType === \"host\" ? (\n\t\t\t\n\t\t) : jobType === \"node\" ? (\n\t\t\t\n\t\t) : (\n\t\t\t\n\t\t);\n\n\treturn (\n\t\t\n\t\t\t{avatar}\n\t\t\n\t);\n}\n\nfunction getJobType(meta: Meta) {\n\tconst jobType =\n\t\tmeta?.node_name !== undefined\n\t\t\t? \"node\"\n\t\t\t: meta?.host_name !== undefined\n\t\t\t? \"host\"\n\t\t\t: undefined;\n\n\treturn jobType;\n}\n\nfunction getName(jobType: JobType, meta: Meta) {\n\tconst name =\n\t\tjobType === \"node\"\n\t\t\t? meta.node_name\n\t\t\t: jobType === \"host\"\n\t\t\t? meta.host_name\n\t\t\t: meta.cluster_name;\n\n\treturn name;\n}\n\nfunction JobComponent(props: Props) {\n\tconst { id, description, createdAt, executionInfo, meta } = props.job;\n\tconst failure = executionInfo.status === \"failure\";\n\tconst [isOpen, setIsOpen] = React.useState(true);\n\tconst [isYamlOpen, setIsYamlOpen] = React.useState(false);\n\tconst [lookForWrapped, setLookForWrapped] = React.useState(true);\n\tconst classes = useStyles();\n\n\tconst jobType = getJobType(meta);\n\tconst name = getName(jobType, meta);\n\tconst miniAvatar = getAvatar(jobType);\n\n\tconst message = (\n\t\t\n\t\t\t{miniAvatar}\n\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t{jobType ? jobType : \"Cluster\"}\n\t\t\t\t\t{\": \"}\n\t\t\t\t\n\n\t\t\t\t{name}\n\t\t\t\n\t\t\t{description}\n\t\t\n\t);\n\n\tlet msgList: string[] = [];\n\n\tlet error: Wrapped | undefined = undefined;\n\tlet formattedYaml: string = \"\";\n\n\tconst createIconElement = (childNumber: number) => {\n\t\t// width of icon is 18, right margin is 6, and 2 makes up to 26 px margin per indent level\n\t\t// (childNumber - 1) is because first icon shouldn't have big indent, only second and beyond\n\t\tconst iconLeftMargin = 2 + 26 * (childNumber - 1);\n\n\t\tlet icon =\n\t\t\tchildNumber === 0 ? null : (\n\t\t\t\t\n\t\t\t);\n\n\t\treturn icon;\n\t};\n\n\tif (\"error\" in executionInfo) {\n\t\terror = executionInfo.error;\n\t\tif (error !== undefined) {\n\t\t\tconst checkIfHasWrapped = (item: Wrapped) => {\n\t\t\t\tif (lookForWrapped) {\n\t\t\t\t\tif (item !== undefined) {\n\t\t\t\t\t\tmsgList.push(item.msg);\n\n\t\t\t\t\t\tif (item.wrapped !== undefined) checkIfHasWrapped(item.wrapped);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tsetLookForWrapped(false);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tcheckIfHasWrapped(error);\n\n\t\t\tformattedYaml = yaml.dump(error, {\n\t\t\t\tflowLevel: 3,\n\t\t\t\tstyles: {\n\t\t\t\t\t\"!!int\": \"hexadecimal\",\n\t\t\t\t\t\"!!null\": \"camelcase\"\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tconst handleCopyError = () => {\n\t\tif (error !== undefined) {\n\t\t\tif (navigator.clipboard) {\n\t\t\t\tnavigator.clipboard.writeText(formattedYaml).then(\n\t\t\t\t\t() => {\n\t\t\t\t\t\tprops.showSnackbar({\n\t\t\t\t\t\t\tmsg: \"Copied error details to clipboard\"\n\t\t\t\t\t\t});\n\t\t\t\t\t},\n\t\t\t\t\t(err: Error) => {\n\t\t\t\t\t\tconsole.error(\"Password copy error:\", err);\n\t\t\t\t\t\tprops.showSnackbar({\n\t\t\t\t\t\t\tmsg: \"Couldn't copy error details to clipboard\"\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tprops.showSnackbar({\n\t\t\t\t\tmsg: \"Couldn't copy error details because the application is not served over HTTPS\"\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t setIsOpen(!isOpen)}\n\t\t\t\tkey={id}\n\t\t\t\tclassName={classes.listItem}\n\t\t\t>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t
\n\t\t\t\t\t{failure && (\n\t\t\t\t\t\t setIsOpen(!isOpen)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{isOpen ? : }\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t
\n\t\t\t\n\t\t\t{failure && (\n\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tError\n\t\t\t\t\t\t\t\t\t{msgList.map((err, i) => (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t{createIconElement(i)}\n\t\t\t\t\t\t\t\t\t\t\t{msgList[i]}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{error !== undefined && (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t setIsYamlOpen(!isYamlOpen)}\n\t\t\t\t\t\t\t\t\t\tclassName={classes.showDetailsBtn}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{isYamlOpen ? \"Hide\" : \"Show\"} Details\n\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t)}\n\t\t\t\n\t\t\n\t);\n}\n\n// REDUX MAPPINGS\nconst mapDispatchToProps = (dispatch: any) => {\n\treturn {\n\t\tshowSnackbar: (snackbar: SnackbarActionPayload) => {\n\t\t\tdispatch(showSnackbar(snackbar));\n\t\t}\n\t};\n};\n// export default JobComponent;\nexport default connect(undefined, mapDispatchToProps)(JobComponent);\n","import { AppState } from \"AppState\";\nimport { JobTracking } from \"services/jobs/types\";\n\nexport const runningJobsCountSelector = (\n\tstate: AppState,\n\tclusterId?: number,\n\tnodeId?: number,\n\thostId?: number\n): number => {\n\tconst filteredJobs = state.jobMonitor.runningJobList.filter(\n\t\t(job: JobTracking) => {\n\t\t\tconst matchesCluster = job.meta.cluster_id === clusterId;\n\t\t\tconst matchesNode = job.meta.node_id === nodeId;\n\t\t\tconst matchesHost = job.meta.host_id === hostId;\n\n\t\t\tif (nodeId) {\n\t\t\t\tif (hostId) {\n\t\t\t\t\treturn matchesCluster && matchesNode && matchesHost;\n\t\t\t\t} else {\n\t\t\t\t\treturn matchesCluster && matchesNode;\n\t\t\t\t}\n\t\t\t} else if (hostId) {\n\t\t\t\treturn matchesCluster && matchesHost;\n\t\t\t} else {\n\t\t\t\treturn matchesCluster;\n\t\t\t}\n\t\t}\n\t);\n\n\treturn filteredJobs.length;\n};\n\nexport const jobsToTrackSelector = (state: AppState): number[] => {\n\treturn state.jobMonitor.jobsToTrack\n}\n","import React from \"react\";\n// MUI\nimport {\n\tDivider,\n\tGrid,\n\tIcon,\n\tList,\n\tListItem,\n\tListItemAvatar,\n\tListItemText,\n\tSkeleton,\n\tTablePagination,\n\tTypography\n} from \"@mui/material\";\nimport { DoneAll as DoneAllIcon } from \"@mui/icons-material\";\nimport { WithStyles } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { styles } from \"pages/management/node/jobs/styles\";\n\nimport axios, { AxiosError, CancelTokenSource } from \"axios\";\nimport { Cluster } from \"pages/management/cluster/types\";\nimport { Host } from \"pages/management/host/types\";\nimport { Node } from \"pages/management/node/types\";\nimport JobsApi from \"services/api/JobsApi\";\nimport { Job } from \"services/jobs/types\";\nimport JobComponent from \"pages/management/node/jobs/jobComponent/JobComponent\";\n\n// redux\nimport { connect } from \"react-redux\";\nimport { AppState } from \"AppState\";\n\nimport { runningJobsCountSelector } from \"store/jobsMonitor/selectors\";\n\ninterface LocalState {\n\tpageSize: number;\n\tcurrentPage: number;\n\ttotalCount: number;\n\tjobs: Job[];\n\tisLoading: boolean;\n\tshowSkeleton: boolean;\n\terrorMessage?: string;\n\tjobsAreRunning: boolean;\n}\n\n// pass node and/or host for which you want this component to display jobs\ninterface LocalProps {\n\tcluster?: Cluster;\n\tnode?: Node;\n\thost?: Host;\n}\n\ninterface ReduxStateProps {\n\thasRunningJobs?: boolean;\n\trunningJobsCount?: number;\n}\n\ntype Props = LocalProps & ReduxStateProps & WithStyles;\n\nclass JobListComponent extends React.Component {\n\tisComponentMounted: boolean = false;\n\tcancelTokenSource?: CancelTokenSource;\n\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\tpageSize: 10,\n\t\t\tcurrentPage: 1,\n\t\t\ttotalCount: 0,\n\t\t\tjobs: [],\n\t\t\tisLoading: true,\n\t\t\tshowSkeleton: true,\n\t\t\tjobsAreRunning: false\n\t\t};\n\n\t\tthis.loadJobs();\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.isComponentMounted = true;\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.isComponentMounted = false;\n\t}\n\n\tcomponentDidUpdate(\n\t\tprevProps: Readonly,\n\t\tprevState: Readonly,\n\t\tsnapshot?: any\n\t) {\n\t\tif (\n\t\t\tprevProps.cluster !== this.props.cluster ||\n\t\t\tprevProps.host !== this.props.host ||\n\t\t\tprevProps.node !== this.props.node\n\t\t) {\n\t\t\tthis.loadJobs(1);\n\t\t\tthis.setState({ currentPage: 1 });\n\t\t}\n\n\t\tif (\n\t\t\tthis.props.runningJobsCount !== prevProps.runningJobsCount &&\n\t\t\tthis.state.currentPage === 1\n\t\t) {\n\t\t\tthis.loadJobs(1);\n\t\t}\n\t}\n\n\tloadJobs = (newCurrentPage?: number, newPageSize?: number) => {\n\t\tconst { cluster, host } = this.props;\n\t\tconst { currentPage, pageSize } = this.state;\n\n\t\tif (this.cancelTokenSource) {\n\t\t\tconsole.log(\"another request in progress. cancelling...\");\n\t\t\tthis.cancelTokenSource.cancel(\"cancelled\");\n\t\t}\n\t\tthis.cancelTokenSource = axios.CancelToken.source();\n\n\t\tthis.isComponentMounted && this.setState({ isLoading: true });\n\n\t\tsetTimeout(() => {\n\t\t\tif (this.state.isLoading) {\n\t\t\t\tthis.setState({ showSkeleton: true });\n\t\t\t}\n\t\t}, 500);\n\n\t\tif (cluster?.id || host?.clusterID) {\n\t\t\tJobsApi.fetchPaginatedList(\n\t\t\t\tnewCurrentPage || currentPage,\n\t\t\t\tnewPageSize || pageSize,\n\t\t\t\thost?.clusterID || cluster?.id || -1,\n\t\t\t\thost?.id,\n\t\t\t\tthis.cancelTokenSource.token\n\t\t\t)\n\t\t\t\t.then(({ list, totalCount }) => {\n\t\t\t\t\tdelete this.cancelTokenSource;\n\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tjobs: list,\n\t\t\t\t\t\ttotalCount,\n\t\t\t\t\t\tisLoading: false,\n\t\t\t\t\t\tshowSkeleton: false,\n\t\t\t\t\t\terrorMessage: undefined\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.catch((error: AxiosError) => {\n\t\t\t\t\tconsole.log(\"error\", error, error.message);\n\t\t\t\t\tif (error.message !== \"cancelled\") {\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tisLoading: false,\n\t\t\t\t\t\t\tshowSkeleton: false,\n\t\t\t\t\t\t\terrorMessage: error.message\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t}\n\t};\n\n\trender():\n\t\t| React.ReactElement>\n\t\t| string\n\t\t| number\n\t\t| {}\n\t\t| React.ReactNodeArray\n\t\t| React.ReactPortal\n\t\t| boolean\n\t\t| null\n\t\t| undefined {\n\t\tconst { jobs, currentPage, pageSize, showSkeleton, totalCount } =\n\t\t\tthis.state;\n\n\t\tconst handleChangePage = (\n\t\t\tevent: React.MouseEvent | null,\n\t\t\tnewPage: number\n\t\t) => {\n\t\t\tthis.setState({ currentPage: newPage + 1 });\n\t\t\tthis.loadJobs(newPage + 1);\n\t\t};\n\n\t\tconst handleChangeRowsPerPage = (\n\t\t\tevent: React.ChangeEvent\n\t\t) => {\n\t\t\tconst pageSize = parseInt(event.target.value, 10);\n\t\t\tthis.setState({\n\t\t\t\tcurrentPage: 1,\n\t\t\t\tpageSize\n\t\t\t});\n\t\t\tthis.loadJobs(1, pageSize);\n\t\t};\n\n\t\tconst tablePagination = (\n\t\t\t\n\t\t);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{tablePagination}\n\t\t\t\t{showSkeleton ? (\n\t\t\t\t\t\n\t\t\t\t\t\t{jobs.map((job: Job) => (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t} secondary={} />\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t))}\n\t\t\t\t\t\t{jobs.length === 0 && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t} secondary={} />\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\n\t\t\t\t) : jobs.length > 0 ? (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t{jobs.map((job: Job) => (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t))}\n\t\t\t\t\t\n\t\t\t\t) : (\n\t\t\t\t\t<>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tNo jobs\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t{tablePagination}\n\t\t\t\n\t\t);\n\t}\n}\n\nconst mapStateToProps = (state: AppState, props: LocalProps) => {\n\treturn {\n\t\trunningJobsCount: runningJobsCountSelector(\n\t\t\tstate,\n\t\t\tprops.cluster?.id,\n\t\t\tprops.node?.id,\n\t\t\tprops.host?.id\n\t\t)\n\t};\n};\nexport default withStyles(styles, { withTheme: true })(\n\tconnect(mapStateToProps, undefined)(JobListComponent)\n);\n","import { Theme } from '@mui/material'\n\nimport createStyles from '@mui/styles/createStyles';\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n listItem: {\n paddingLeft: 8,\n paddingRight: 0,\n },\n\t\tconsoleIcon: {\n\t\t\tminWidth: 36, // TODO: remove this, since it isn't displayed BKBK\n\t\t\t[theme.breakpoints.up('sm')]: {\n\t\t\t\tminWidth: 48\n\t\t\t}\n\t\t},\n collapsibleItem: {\n paddingLeft: 8,\n\t\t\t[theme.breakpoints.up('md')]: {\n paddingLeft: 56 // listItem.paddingLeft + consoleIcon.minWidth\n\t\t\t}\n },\n\t\topenCloseIcon: {\n\t\t\twidth: 34,\n\t\t\theight: 34,\n\t\t\tminWidth: 34\n\t\t},\n\t\tbuttonContainer: {\n\t\t\tdisplay: \"flex\", justifyContent: \"space-between\"\n\t\t}\n\t});\n","import { Grid, Typography } from \"@mui/material\";\nimport React from \"react\";\n\ninterface LocalProps {\n\tmessage: string;\n\toverlay?: boolean;\n}\n\nclass ChartMessage extends React.PureComponent {\n\trender() {\n\t\tconst { message, overlay } = this.props;\n\n\t\tif (overlay)\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{message}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t);\n\t\telse\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{message}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t);\n\t}\n}\n\nexport default ChartMessage;\n","import { AGGREGATION } from \"components/monitoring/dashboard/types\";\n\nexport const DEFAULT_REFRESH_INTERVAL = 1000;\nexport const DEFAULT_PERIOD = \"15m\";\nexport const DEFAULT_AGGREGATION: AGGREGATION = AGGREGATION.RAW;\nexport const MAX_NUM_OF_POINTS_IN_CHART = 1000;\n\nexport interface ChartMetric {\n\tname: string;\n\ttable: string;\n}\n","import { WithStyles } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport Axios, { AxiosError, AxiosResponse } from \"axios\";\nimport { ChartMetric } from \"components/monitoring/charts/const\";\nimport { IResponseSeries, IResultEntry } from \"influx/lib/src/results\";\nimport moment from \"moment\";\nimport { Cluster } from \"pages/management/cluster/types\";\nimport { Node } from \"pages/management/node/types\";\nimport React from \"react\";\nimport { Config } from \"services/config/Config\";\nimport { styles } from \"./styles\";\n\ninterface LocalState {\n\trawValues: Map;\n}\n\ninterface LocalProps {\n\ttraces: any[];\n\tmetric: ChartMetric;\n\trefreshInterval: number;\n\tdifferential: boolean;\n\tcluster: Cluster;\n\tnode?: Node;\n}\n\ntype Props = LocalProps & WithStyles;\n\ninterface Snapshot {\n\tshouldFetchAsyncData: boolean;\n\tshouldClearExistingData: boolean;\n}\n\nclass LiveValueComponent extends React.PureComponent {\n\t_isMounted = false;\n\t_scheduledFetch: any;\n\t_cancelRequest: any;\n\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tthis.state = { rawValues: new Map() };\n\t}\n\n\tcomponentDidMount(): void {\n\t\tthis._isMounted = true;\n\t\t// this.props.differential && this.fetchData();\n\t}\n\n\tcomponentWillUnmount(): void {\n\t\tthis._isMounted = false;\n\t}\n\n\tgetSnapshotBeforeUpdate(\n\t\tprevProps: Readonly,\n\t\tprevState: Readonly\n\t): any | null {\n\t\tconst prevHostNames = prevProps.traces.map((trace: any) => trace.name);\n\t\tconst hostNames = this.props.traces.map((trace: any) => trace.name);\n\n\t\treturn {\n\t\t\tshouldFetchAsyncData:\n\t\t\t\tthis.props.differential &&\n\t\t\t\t(prevHostNames.join(\"\") !== hostNames.join(\"\") ||\n\t\t\t\t\tprevProps.metric.name !== this.props.metric.name ||\n\t\t\t\t\tprevProps.metric.table !== this.props.metric.table ||\n\t\t\t\t\tprevProps.refreshInterval !== this.props.refreshInterval),\n\t\t\tshouldClearExistingData:\n\t\t\t\tprevProps.metric.name !== this.props.metric.name ||\n\t\t\t\tprevProps.metric.table !== this.props.metric.table ||\n\t\t\t\tprevHostNames.join(\"\") !== hostNames.join(\"\")\n\t\t};\n\t}\n\n\tcomponentDidUpdate(\n\t\tprevProps: Readonly,\n\t\tprevState: Readonly,\n\t\tsnapshot?: Snapshot\n\t): void {\n\t\t// if metric, cluster or node changed - reload async data\n\t\tif (this._isMounted && snapshot) {\n\t\t\tif (snapshot.shouldFetchAsyncData) {\n\t\t\t\tthis.clearAsyncRequests();\n\t\t\t\tthis.fetchData();\n\t\t\t}\n\n\t\t\tif (snapshot.shouldClearExistingData) {\n\t\t\t\tthis.setState({ rawValues: new Map() });\n\t\t\t}\n\t\t}\n\t}\n\n\tclearAsyncRequests(): void {\n\t\tif (this._cancelRequest) this._cancelRequest();\n\t\tif (this._scheduledFetch) clearTimeout(this._scheduledFetch);\n\t}\n\n\tfetchData() {\n\t\tconst { metric } = this.props;\n\t\tconst { refreshInterval, cluster, node } = this.props;\n\n\t\t// const hostNames = traces.map((trace: any) => trace.name);\n\n\t\tconst {\n\t\t\tinflux_host: host,\n\t\t\tinflux_port: port,\n\t\t\tinflux_password: password,\n\t\t\tinflux_protocol: protocol,\n\t\t\tinflux_username: username,\n\t\t\tinflux_db: db\n\t\t} = Config;\n\n\t\tconst url = `${protocol}://${host}:${port}/query`;\n\n\t\tconst query = `SELECT LAST(${metric.name}), node, host, cluster FROM ${\n\t\t\tmetric.table\n\t\t} WHERE cluster = '${cluster.name}'${\n\t\t\t(node && \" AND node = '\" + node.name + \"'\") || \"\"\n\t\t} AND time > ${moment()\n\t\t\t.subtract(30, \"second\")\n\t\t\t.valueOf()}000000 GROUP BY \"node\"`;\n\n\t\t// console.log(\"query\", query);\n\n\t\tconst params = {\n\t\t\tq: query,\n\t\t\tdb\n\t\t};\n\n\t\tAxios.get(url, {\n\t\t\tauth: {\n\t\t\t\tusername,\n\t\t\t\tpassword\n\t\t\t},\n\t\t\tparams,\n\t\t\tcancelToken: new Axios.CancelToken((c: any) => {\n\t\t\t\tthis._cancelRequest = c;\n\t\t\t})\n\t\t})\n\t\t\t.then((response: AxiosResponse) => {\n\t\t\t\t// console.log(\"raw value response.data\", response.data);\n\n\t\t\t\tif (!this._isMounted) return;\n\n\t\t\t\tlet rawValues = new Map();\n\n\t\t\t\tresponse.data.results.forEach((result: IResultEntry) => {\n\t\t\t\t\t// console.log(\"result entries\", result);\n\n\t\t\t\t\tresult.series?.forEach((series: IResponseSeries) => {\n\t\t\t\t\t\t// console.log(\"result values\", series);\n\n\t\t\t\t\t\tconst node = series.tags ? series.tags[\"node\"] : \"unknown\";\n\n\t\t\t\t\t\t// console.log(\n\t\t\t\t\t\t// \t\"node name\",\n\t\t\t\t\t\t// \tnode,\n\t\t\t\t\t\t// \tseries.values,\n\t\t\t\t\t\t// \tseries.values ? [0] : undefined,\n\t\t\t\t\t\t// \tseries.values ? [0][1] : undefined\n\t\t\t\t\t\t// );\n\t\t\t\t\t\t// add value to map if exists\n\t\t\t\t\t\tseries.values && rawValues.set(node, series.values[0][1]);\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\t// console.log(\"rawValues\", rawValues);\n\n\t\t\t\tthis.setState({ rawValues });\n\t\t\t})\n\t\t\t.catch((err: AxiosError) => {\n\t\t\t\tif (!Axios.isCancel(err)) {\n\t\t\t\t\t// TODO: uncomment! BKBK\n\t\t\t\t\t// console.error(\n\t\t\t\t\t// \t\"Metrics error response:\",\n\t\t\t\t\t// \terr.message,\n\t\t\t\t\t// \terr.response?.data\n\t\t\t\t\t// );\n\n\t\t\t\t\tif (!this._isMounted) return;\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\trawValues: new Map()\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t})\n\t\t\t.finally(() => {\n\t\t\t\tthis._cancelRequest = undefined;\n\t\t\t\tif (this._isMounted) {\n\t\t\t\t\tthis._scheduledFetch = setTimeout(() => {\n\t\t\t\t\t\tthis.fetchData();\n\t\t\t\t\t}, refreshInterval);\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\trender():\n\t\t| React.ReactElement\n\t\t| string\n\t\t| number\n\t\t| {}\n\t\t| React.ReactNodeArray\n\t\t| React.ReactPortal\n\t\t| boolean\n\t\t| null\n\t\t| undefined {\n\t\tconst { classes, traces, differential } = this.props;\n\n\t\tconst { rawValues } = this.state;\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t{traces.map((trace: any) => {\n\t\t\t\t\t// console.log(\"trace\", trace, rawValues, rawValues.get(trace.name));\n\n\t\t\t\t\tconst liveValue = isNaN(trace.y[trace.y.length - 1])\n\t\t\t\t\t\t? \"-\"\n\t\t\t\t\t\t: Math.round((trace.y[trace.y.length - 1] + Number.EPSILON) * 100) /\n\t\t\t\t\t\t 100;\n\n\t\t\t\t\tconst rawValueRaw = rawValues.get(trace.name);\n\t\t\t\t\tconst rawValue =\n\t\t\t\t\t\trawValueRaw &&\n\t\t\t\t\t\tMath.round((rawValueRaw + Number.EPSILON) * 100) / 100;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{liveValue}\n\t\t\t\t\t\t\t{differential &&\n\t\t\t\t\t\t\t\t` (${\n\t\t\t\t\t\t\t\t\trawValue || \"-\"\n\t\t\t\t\t\t\t\t\t// rawValues?.find(\n\t\t\t\t\t\t\t\t\t// \t(result: any) => result.metric.gmd_host === trace.name\n\t\t\t\t\t\t\t\t\t// )?.value[1] || \"-\"\n\t\t\t\t\t\t\t\t})`}\n\t\t\t\t\t\t
\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t
\n\t\t);\n\t}\n}\n\nexport default withStyles(styles, { withTheme: true })(LiveValueComponent);\n","import createStyles from \"@mui/styles/createStyles\";\n\nexport const styles = () =>\n\tcreateStyles({\n\t\troot: {\n\t\t\tposition: \"absolute\",\n\t\t\ttop: \"10px\",\n\t\t\tleft: \"40px\",\n\t\t\tzIndex: 1,\n\t\t\tpadding: \"0 3px\",\n\t\t\tborderRadius: \"2px\",\n\t\t\tbackgroundColor: \"rgba(255, 255, 255, 0.4)\",\n\t\t\tfontSize: \"smaller\",\n\t\t\theight: \"18px\",\n\t\t\toverflow: \"hidden\",\n\t\t\t\"&:hover\": {\n\t\t\t\theight: \"auto\"\n\t\t\t}\n\t\t}\n\t});\n","export const LOG_FETCH_PAGE_SIZE = 500;\nexport const INFLUX_DATABASE_NAME = \"gmd\";\nexport const DEFAULT_COLORS = [\n\t\"#316B83\", // muted blue\n\t\"#FBC6A4\", // safety orange\n\t\"#5B6D5B\", // cooked asparagus green\n\t\"#FF7878\", // brick red\n\t\"#6155A6\", // muted purple\n\t\"#AA8976\", // chestnut brown\n\t\"#C490E4\", // raspberry yogurt pink\n\t\"#555555\", // middle gray\n\t\"#BFD8B8\", // curry yellow-green\n\t\"#94DAFF\" // blue-teal\n];","import Axios, { AxiosResponse } from \"axios\";\nimport { DEFAULT_COLORS } from \"components/logViewer/const\";\nimport {\n\tChartMetric,\n\tDEFAULT_PERIOD,\n\tDEFAULT_REFRESH_INTERVAL,\n\tMAX_NUM_OF_POINTS_IN_CHART\n} from \"components/monitoring/charts/const\";\nimport {\n\tAxisRange,\n\tDateRange\n} from \"components/monitoring/charts/timeSeries/types\";\nimport { AGGREGATION } from \"components/monitoring/dashboard/types\";\nimport { IResponse } from \"influx\";\nimport { IResponseSeries, IResultEntry, Row } from \"influx/lib/src/results\";\nimport { DateTime } from \"luxon\";\nimport { Cluster } from \"pages/management/cluster/types\";\nimport { Node } from \"pages/management/node/types\";\n// @ts-ignore\nimport { scatter } from \"plotly-js-material-design-theme\";\nimport { Config } from \"services/config/Config\";\n\nclass ChartUtils {\n\t/**\n\t * @desc fetches data from influx db\n\t * @param {Cluster} cluster\n\t * @param {AGGREGATION} aggregation\n\t * @param {ChartMetric} metric\n\t * @param {DateRange} dateRange\n\t * @param {Node} node\n\t * @returns {Promise>}\n\t */\n\tstatic fetchData(\n\t\tcluster: Cluster,\n\t\taggregation: AGGREGATION,\n\t\tmetric: ChartMetric,\n\t\tdateRange: DateRange,\n\t\tnode?: Node\n\t): {\n\t\tpromise: Promise>;\n\t\tabortController: AbortController;\n\t} {\n\t\tconst {\n\t\t\tinflux_host: host,\n\t\t\tinflux_port: port,\n\t\t\tinflux_password: password,\n\t\t\tinflux_protocol: protocol,\n\t\t\tinflux_username: username,\n\t\t\tinflux_db: db\n\t\t} = Config;\n\n\t\tconst url = `${protocol}://${host}:${port}/query`;\n\n\t\tconst params = {\n\t\t\tq: ChartUtils.buildQuery(\n\t\t\t\tcluster.name,\n\t\t\t\tmetric,\n\t\t\t\taggregation,\n\t\t\t\tdateRange,\n\t\t\t\tnode?.name\n\t\t\t),\n\t\t\tdb\n\t\t};\n\n\t\tconst abortController = new AbortController();\n\n\t\tconst promise = Axios.get(url, {\n\t\t\tauth: {\n\t\t\t\tusername,\n\t\t\t\tpassword\n\t\t\t},\n\t\t\tparams,\n\t\t\tsignal: abortController.signal\n\t\t});\n\n\t\treturn { promise, abortController };\n\t}\n\n\t/**\n\t * @desc Builds query for fetching metrics from InfluxDB\n\t * @param {string} clusterName\n\t * @param {ChartMetric} metric\n\t * @param {AGGREGATION} aggregation\n\t * @param {string} dateRange\n\t * @param {string} nodeName\n\t * @returns {string}\n\t */\n\tstatic buildQuery(\n\t\tclusterName: string,\n\t\tmetric: ChartMetric,\n\t\taggregation: AGGREGATION,\n\t\tdateRange: DateRange,\n\t\tnodeName?: string\n\t): string {\n\t\tconst buildWhereStatement = (): string => {\n\t\t\treturn `cluster = '${clusterName}' ${\n\t\t\t\tnodeName ? \"AND node = '\" + nodeName + \"'\" : \"\"\n\t\t\t} AND time > ${dateRange.from.toMillis()}000000 AND time < ${dateRange.to.toMillis()}000000`;\n\t\t};\n\n\t\tswitch (aggregation) {\n\t\t\tcase AGGREGATION.RAW:\n\t\t\t\treturn `SELECT MAX(${metric.name}) FROM ${\n\t\t\t\t\tmetric.table\n\t\t\t\t} WHERE ${buildWhereStatement()} GROUP BY node, time(${this.getGroupSeconds(\n\t\t\t\t\tdateRange\n\t\t\t\t)}s) fill(null)`;\n\t\t\tcase AGGREGATION.DIFFERENTIAL:\n\t\t\t\treturn `SELECT MAX(\"derivative\") AS \"max_derivative\" FROM (SELECT DERIVATIVE(${\n\t\t\t\t\tmetric.name\n\t\t\t\t}, 1s) AS \"derivative\" FROM ${\n\t\t\t\t\tmetric.table\n\t\t\t\t} WHERE ${buildWhereStatement()}) GROUP BY node, time(${this.getGroupSeconds(\n\t\t\t\t\tdateRange\n\t\t\t\t)}s) fill(null)`;\n\t\t\tdefault:\n\t\t\t\tconsole.warn(\"Unknown aggregation value: \", aggregation);\n\t\t\t\treturn \"\";\n\t\t}\n\t}\n\n\t/**\n\t * @description calculates a period in seconds for influx db data to be grouped by\n\t * \t\t\t\t\t\t\tso there will be max 1000 points assuming that there is\n\t * \t\t\t\t\t\t\t1 data point per second\n\t * @param dateRange\n\t * @returns {number}\n\t */\n\tstatic getGroupSeconds(dateRange: DateRange): number {\n\t\tconst diffInSeconds = dateRange.to.toSeconds() - dateRange.from.toSeconds();\n\t\treturn Math.ceil(diffInSeconds / MAX_NUM_OF_POINTS_IN_CHART);\n\t}\n\n\t/**\n\t * @description parses data from InfluxDB and returns Plotly chart traces\n\t * @param {IResponse} data\n\t * @param {number} dataScaling\n\t * @returns {any[]}\n\t */\n\tstatic parseData(\n\t\tdata: IResponse,\n\t\tdataScaling: number,\n\t\taggregation: AGGREGATION = AGGREGATION.RAW\n\t) {\n\t\tlet traces: any[] = [];\n\n\t\tdata.results.forEach((result: IResultEntry) => {\n\t\t\t// console.log(\"result entries\", result);\n\n\t\t\tresult.series?.forEach((series: IResponseSeries, index: number) => {\n\t\t\t\t// console.log(\"result values\", series);\n\n\t\t\t\tconst node = series.tags ? series.tags[\"node\"] : \"unknown\";\n\n\t\t\t\t// console.log(\"node name\", node);\n\n\t\t\t\tlet trace: any = {\n\t\t\t\t\tline: {\n\t\t\t\t\t\twidth: 1.5,\n\t\t\t\t\t\tcolor: DEFAULT_COLORS[index % 10]\n\t\t\t\t\t},\n\t\t\t\t\tmode: \"lines\",\n\t\t\t\t\ttype: \"scatter\",\n\t\t\t\t\thoverinfo: \"name+y+x\",\n\t\t\t\t\tx: [],\n\t\t\t\t\ty: [],\n\t\t\t\t\tname: node,\n\t\t\t\t\tconnectgaps: false\n\t\t\t\t};\n\n\t\t\t\tseries.values?.forEach((row: Row) => {\n\t\t\t\t\t// trace.x.push(moment.unix(row[0]).toDate());\n\t\t\t\t\t// trace.y.push(row[1]);\n\t\t\t\t\t// console.log(\"row\", row[0], new Date(row[0]), moment.unix(row[0]));\n\n\t\t\t\t\tconst timestamp = row[0];\n\t\t\t\t\t// if aggregation is differential, limit value min to 0\n\t\t\t\t\tconst value =\n\t\t\t\t\t\taggregation === AGGREGATION.DIFFERENTIAL\n\t\t\t\t\t\t\t? Math.max(0, row[1])\n\t\t\t\t\t\t\t: row[1];\n\n\t\t\t\t\ttrace.x.push(new Date(timestamp));\n\t\t\t\t\tif (row[1] === null) {\n\t\t\t\t\t\ttrace.y.push(undefined);\n\t\t\t\t\t} else if (dataScaling) {\n\t\t\t\t\t\ttrace.y.push(value * dataScaling);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttrace.y.push(value);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\ttraces.push(scatter(trace));\n\t\t\t});\n\t\t});\n\n\t\treturn traces;\n\t}\n\n\t/**\n\t * @description Given last refresh timestamp, it returns interval in ms until\n\t * \t\t\t\t\t\t\tthe next supposed request. Used to maintain a consistent\n\t * \t\t\t\t\t\t\trefresh interval\n\t * @param {number} lastRequestTimestamp\n\t * @returns {number} ms until next request\n\t */\n\tstatic getRemainingIntervalTime(lastRequestTimestamp?: number): number {\n\t\t// console.log(\"getRemainingIntervalTime\", lastRequestTimestamp);\n\t\tif (!lastRequestTimestamp) {\n\t\t\treturn DEFAULT_REFRESH_INTERVAL;\n\t\t} else {\n\t\t\t// get current timestamp\n\t\t\tconst now = DateTime.now().toMillis();\n\t\t\tconst serverResponseTime = now - lastRequestTimestamp;\n\t\t\tconst msUntilNextRequest = DEFAULT_REFRESH_INTERVAL - serverResponseTime;\n\t\t\t// console.log(\"msUntilNextRequest\", msUntilNextRequest);\n\n\t\t\tif (msUntilNextRequest < 0) {\n\t\t\t\t// console.log(\n\t\t\t\t// \t`Server response time (${serverResponseTime}ms) is longer than refresh interval (${DEFAULT_REFRESH_INTERVAL}ms)`\n\t\t\t\t// );\n\t\t\t}\n\t\t\t// console.log(\"msUntilNextRequest\", msUntilNextRequest);\n\t\t\treturn Math.max(msUntilNextRequest, 0);\n\t\t}\n\t}\n\n\t/**\n\t * @description returns axis title, depending if its raw data or differential (unit per sec)\n\t * @param {AGGREGATION} aggregation\n\t * @param {string} unit\n\t * @returns {string}\n\t */\n\tstatic getMeasurementUnit(\n\t\taggregation: AGGREGATION = AGGREGATION.RAW,\n\t\tunit?: string\n\t): string {\n\t\treturn unit\n\t\t\t? aggregation === AGGREGATION.DIFFERENTIAL\n\t\t\t\t? `${unit}/s`\n\t\t\t\t: unit\n\t\t\t: \"\";\n\t}\n\n\t/**\n\t * @description returns message to be displayed in chart overlay\n\t * @param {boolean} isThereAnyData\n\t * @param {boolean} dragToMove\n\t * @returns {string}\n\t */\n\tstatic getMessage(isThereAnyData: boolean, dragToMove: boolean) {\n\t\tif (dragToMove) return \"Drag to move\";\n\t\telse if (!isThereAnyData) return \"No data\";\n\t}\n\n\t/**\n\t * @description calculated x-axis range given period or zoom range\n\t * \t\t\t\t\t\t\tit will primarily return zoom range if it exists to prevent resetting axis zoom\n\t * @param {string} period\n\t * @param axisRange\n\t * @returns {any[]}\n\t */\n\tstatic getPlotlyXAxisRange(\n\t\tperiod: string = DEFAULT_PERIOD,\n\t\taxisRange?: AxisRange\n\t) {\n\t\treturn axisRange\n\t\t\t? [axisRange.x?.from, axisRange.x?.to]\n\t\t\t: [this.getPeriodStartDate(period), DateTime.now().plus({ hours: 1 })];\n\t}\n\n\t/**\n\t * @description\tcalculates y-axis range given max or zoom range\n\t * \t\t\t\t\t\t\tit will primarily return zoom range if it exists to prevent resetting axis zoom\n\t * @param {number | undefined} yAxisMax\n\t * @param axisRange\n\t * @returns {any[]}\n\t */\n\tstatic getPlotlyYAxisRange(\n\t\tyAxisMax: number | undefined,\n\t\taxisRange?: AxisRange\n\t) {\n\t\treturn axisRange\n\t\t\t? [axisRange.y?.from || 0, axisRange.x?.from || yAxisMax]\n\t\t\t: [0, yAxisMax];\n\t}\n\n\t/**\n\t * @desc parses plotly's date time string format into luxon DateTime object\n\t * @param {string} dateTime\n\t * @returns {DateTime}\n\t */\n\tstatic parsePlotlyDateTime(dateTime: string): DateTime {\n\t\t// console.log(\"dateTime\", dateTime);\n\t\treturn DateTime.fromFormat(dateTime.split(\".\")[0], \"yyyy-MM-dd HH:mm:ss\");\n\t}\n\n\t/**\n\t * @desc returns start date and time of specific period\n\t * @param {string} period\n\t * @returns {DateTime}\n\t */\n\tstatic getPeriodStartDate(period: string): DateTime {\n\t\tconst amount = parseInt(period.substring(0, period.length - 1));\n\t\tconst unit = period[period.length - 1];\n\n\t\tswitch (unit) {\n\t\t\tcase \"m\":\n\t\t\t\treturn DateTime.now().minus({ minutes: amount });\n\t\t\tcase \"h\":\n\t\t\t\treturn DateTime.now().minus({ hours: amount });\n\t\t\tcase \"d\":\n\t\t\t\treturn DateTime.now().minus({ days: amount });\n\t\t\tdefault:\n\t\t\t\tconsole.warn(\"Unrecognized time period:\", period);\n\t\t\t\treturn DateTime.now().minus({ minutes: 5 });\n\t\t}\n\t}\n\n\t/**\n\t * @desc returns date range for specific period\n\t * @param {string} period\n\t * @returns {DateRange}\n\t */\n\tstatic getDateRange(period: string = \"5m\"): DateRange {\n\t\treturn {\n\t\t\tfrom: this.getPeriodStartDate(period),\n\t\t\tto: DateTime.now()\n\t\t};\n\t}\n}\n\nexport default ChartUtils;\n","import createPlotlyComponent from \"react-plotly.js/factory\";\nimport Plotly from \"plotly.js-basic-dist-min\";\n\nconst PlotComponent = createPlotlyComponent(Plotly);\n\nexport default PlotComponent;\n","import { WithStyles } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport Axios, { AxiosError, AxiosResponse } from \"axios\";\nimport { Cluster } from \"pages/management/cluster/types\";\nimport { Node } from \"pages/management/node/types\";\nimport ChartMessage from \"components/monitoring/charts/chartMessage/chartMessage\";\nimport {\n\tChartMetric,\n\tDEFAULT_AGGREGATION,\n\tDEFAULT_PERIOD,\n\tDEFAULT_REFRESH_INTERVAL\n} from \"components/monitoring/charts/const\";\nimport LiveValueComponent from \"components/monitoring/charts/timeSeries/liveValue/LiveValueComponent\";\nimport {\n\tAxisRange,\n\tDateRange\n} from \"components/monitoring/charts/timeSeries/types\";\nimport ChartUtils from \"components/monitoring/charts/utils\";\nimport { AGGREGATION } from \"components/monitoring/dashboard/types\";\nimport { IResponse } from \"influx\";\nimport { DateTime } from \"luxon\";\n// @ts-ignore\nimport { layout } from \"plotly-js-material-design-theme\";\nimport { Component, ReactElement } from \"react\";\nimport { debounceTime, fromEvent, Subscription } from \"rxjs\";\nimport PlotComponent from \"services/reactPlotlyPlot\";\nimport { styles } from \"./styles\";\nimport { isEqual, isString } from \"lodash\";\n\ninterface LocalState {\n\ttraces: any[];\n\tisLoading: boolean;\n\tdateRange: DateRange;\n}\n\ninterface LocalProps {\n\tcontainerHeight?: number;\n\tcontainerWidth?: number;\n\tdisableRender: boolean;\n\tdragToMove?: boolean;\n\tperiod?: string;\n\ttitle: string;\n\tmetric: ChartMetric;\n\tcluster: Cluster;\n\tnode?: Node;\n\taggregation?: AGGREGATION;\n\tunit?: string;\n\tdataScaling?: number;\n\tyAxisMax?: number;\n\ttileSize?: string;\n}\n\ntype Props = LocalProps & WithStyles;\n\ninterface Snapshot {\n\tshouldFetchAsyncData: boolean;\n\tshouldClearExistingData: boolean;\n}\n\nclass TimeSeriesChartComponent extends Component {\n\t_isMounted = false;\n\t_scheduledFetch: any;\n\t_requestAbortController?: AbortController;\n\t_windowSizeObservable: Subscription;\n\t_lastRequestTimestamp?: number;\n\t_zoomRange?: AxisRange;\n\t_isAutoFetching: boolean = false;\n\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\ttraces: [],\n\t\t\tisLoading: true,\n\t\t\tdateRange: ChartUtils.getDateRange(props.period || \"5m\")\n\t\t};\n\n\t\t// rerender after window resize\n\t\tthis._windowSizeObservable = fromEvent(window, \"resize\")\n\t\t\t.pipe(debounceTime(500))\n\t\t\t.subscribe(() => {\n\t\t\t\tthis.forceUpdate();\n\t\t\t});\n\t}\n\n\tfetchData = (\n\t\ttype: \"startAutoFetch\" | \"scheduled\" | \"manualFetch\",\n\t\tdateRange?: DateRange\n\t) => {\n\t\t// console.log(\"fetchData\", type, this._isAutoFetching, this._scheduledFetch);\n\t\tif (!this.props.metric) return;\n\n\t\tif (type === \"startAutoFetch\") {\n\t\t\tif (!this._isAutoFetching) {\n\t\t\t\tthis._isAutoFetching = true;\n\t\t\t} else {\n\t\t\t\tconsole.warn(\"Auto-fetch is already in progress.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (type === \"scheduled\") {\n\t\t\tif (!this._isAutoFetching) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t\"Auto-fetching is not in progress but scheduled fetch tried executing. Aborted.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (type === \"manualFetch\") {\n\t\t\tthis._isAutoFetching = false;\n\t\t}\n\n\t\tif (this._requestAbortController) {\n\t\t\tthis._requestAbortController.abort();\n\t\t\tclearTimeout(this._scheduledFetch);\n\t\t\tdelete this._scheduledFetch;\n\t\t}\n\n\t\tthis.setState({ isLoading: true });\n\n\t\tlet isCancelled = false;\n\n\t\tconst {\n\t\t\tmetric,\n\t\t\tcluster,\n\t\t\tnode,\n\t\t\tperiod = DEFAULT_PERIOD,\n\t\t\t// resolution = DEFAULT_RESOLUTION,\n\t\t\taggregation = DEFAULT_AGGREGATION,\n\t\t\tdataScaling = 1\n\t\t} = this.props;\n\n\t\tthis._lastRequestTimestamp = DateTime.now().toMillis();\n\n\t\tconst { promise, abortController } = ChartUtils.fetchData(\n\t\t\tcluster,\n\t\t\taggregation,\n\t\t\tmetric,\n\t\t\tdateRange || ChartUtils.getDateRange(period),\n\t\t\tnode\n\t\t);\n\n\t\tthis._requestAbortController = abortController;\n\n\t\tpromise\n\t\t\t.then((response: AxiosResponse) => {\n\t\t\t\t// console.log(\"response\", response);\n\t\t\t\tconst shouldCancel =\n\t\t\t\t\t!this._isMounted || (this._zoomRange && !dateRange);\n\n\t\t\t\tif (shouldCancel) return;\n\n\t\t\t\tconst traces = ChartUtils.parseData(\n\t\t\t\t\tresponse.data,\n\t\t\t\t\tdataScaling,\n\t\t\t\t\taggregation\n\t\t\t\t);\n\n\t\t\t\tthis.setState({\n\t\t\t\t\ttraces,\n\t\t\t\t\tisLoading: false\n\t\t\t\t});\n\t\t\t})\n\t\t\t.catch((err: AxiosError) => {\n\t\t\t\tif (!Axios.isCancel(err)) {\n\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t\"Metrics error response:\",\n\t\t\t\t\t\terr.message,\n\t\t\t\t\t\terr.response?.data\n\t\t\t\t\t);\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tisLoading: false\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\t// console.log(\"request cancelled\");\n\t\t\t\t\tisCancelled = true;\n\t\t\t\t}\n\t\t\t})\n\t\t\t.finally(() => {\n\t\t\t\tif (!isCancelled) {\n\t\t\t\t\tthis._requestAbortController = undefined;\n\t\t\t\t\tif (this._isMounted && !this._zoomRange) {\n\t\t\t\t\t\t// console.log(\"starting scheduled fetch\", this._isAutoFetching);\n\t\t\t\t\t\tthis._scheduledFetch = setTimeout(() => {\n\t\t\t\t\t\t\tthis.fetchData(\"scheduled\");\n\t\t\t\t\t\t}, ChartUtils.getRemainingIntervalTime(this._lastRequestTimestamp));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t};\n\n\tgetSnapshotBeforeUpdate(\n\t\tprevProps: Readonly,\n\t\tprevState: Readonly\n\t): any | null {\n\t\treturn {\n\t\t\tshouldFetchAsyncData:\n\t\t\t\t!isEqual(prevProps.metric, this.props.metric) ||\n\t\t\t\t!isEqual(prevProps.period, this.props.period) ||\n\t\t\t\t!isEqual(prevProps.cluster, this.props.cluster) ||\n\t\t\t\t!isEqual(prevProps.node, this.props.node) ||\n\t\t\t\t!isEqual(prevProps.aggregation, this.props.aggregation) ||\n\t\t\t\t!isEqual(prevProps.dataScaling, this.props.dataScaling),\n\t\t\tshouldClearExistingData:\n\t\t\t\t!isEqual(prevProps.metric, this.props.metric) ||\n\t\t\t\t!isEqual(prevProps.cluster, this.props.cluster) ||\n\t\t\t\t!isEqual(prevProps.node, this.props.node) ||\n\t\t\t\t!isEqual(prevProps.aggregation, this.props.aggregation) ||\n\t\t\t\t!isEqual(prevProps.dataScaling, this.props.dataScaling)\n\t\t};\n\t}\n\n\tcomponentDidUpdate(\n\t\tprevProps: Readonly,\n\t\tprevState: Readonly,\n\t\tsnapshot?: Snapshot\n\t): void {\n\t\t// if metric, cluster or node changed - reload async data\n\t\tif (this._isMounted && snapshot) {\n\t\t\t// console.log(\"snapshot\", snapshot);\n\t\t\tif (snapshot.shouldFetchAsyncData) {\n\t\t\t\tthis.clearAsyncRequests();\n\t\t\t\t// console.log(\"snapshot induced fetch\");\n\t\t\t\tthis._zoomRange = undefined;\n\t\t\t\tthis.fetchData(\"startAutoFetch\");\n\t\t\t}\n\n\t\t\tif (snapshot.shouldClearExistingData) {\n\t\t\t\tthis.setState({ traces: [] });\n\t\t\t}\n\t\t}\n\t}\n\n\tshouldComponentUpdate(\n\t\tnextProps: Readonly,\n\t\tnextState: Readonly,\n\t\tnextContext: any\n\t): boolean {\n\t\tconst didPropsChange = isEqual(nextProps, this.props);\n\t\tconst didDataChange = isEqual(this.state.traces, nextState.traces);\n\t\tconst didStateChange = isEqual(this.state.isLoading, nextState.isLoading);\n\t\t// console.log(\n\t\t// \t\"shouldComponentUpdate\",\n\t\t// \tdidPropsChange,\n\t\t// \tdidDataChange,\n\t\t// \tdidStateChange\n\t\t// );\n\t\t// if (this._isRefreshPaused) {\n\t\t// \tconsole.log(\"refresh paused\");\n\t\t// \treturn true;\n\t\t// } else {\n\t\treturn didDataChange || didPropsChange || didStateChange;\n\t\t// }\n\t}\n\n\tcomponentDidMount(): void {\n\t\tthis._isMounted = true;\n\t\tthis.fetchData(\"startAutoFetch\");\n\t}\n\n\tcomponentWillUnmount(): void {\n\t\tthis._isMounted = false;\n\t\tthis._windowSizeObservable?.unsubscribe();\n\t\tthis.clearAsyncRequests();\n\t}\n\n\tclearAsyncRequests(): void {\n\t\tif (this._requestAbortController) this._requestAbortController.abort();\n\t\tif (this._scheduledFetch) {\n\t\t\tclearTimeout(this._scheduledFetch);\n\t\t\tdelete this._scheduledFetch;\n\t\t}\n\t\tthis._isAutoFetching = false;\n\t\t// console.log(\"cleared\", this._scheduledFetch);\n\t}\n\n\trender(): ReactElement {\n\t\tconst { traces } = this.state;\n\t\tconst {\n\t\t\ttitle,\n\t\t\tperiod,\n\t\t\tmetric,\n\t\t\taggregation,\n\t\t\tcluster,\n\t\t\tnode,\n\t\t\tunit,\n\t\t\tyAxisMax,\n\t\t\tdragToMove\n\t\t} = this.props;\n\t\tconst isThereAnyData = traces.length !== 0;\n\n\t\tconst untypedConfigValues = {\n\t\t\tspikedistance: 200,\n\t\t\thoverdistance: 200\n\t\t};\n\n\t\tconst measurementUnit = ChartUtils.getMeasurementUnit(aggregation, unit);\n\t\tconst message = ChartUtils.getMessage(isThereAnyData, dragToMove || false);\n\t\tconst xAxisRange = this._zoomRange?.x || ChartUtils.getDateRange(period);\n\t\tconst yAxisRange = this._zoomRange?.y || { from: 0, to: yAxisMax };\n\n\t\t// console.log(\"render chart\", {\n\t\t// \tx: xAxisRange,\n\t\t// \ty: yAxisRange,\n\t\t// \tzoom: this._zoomRange\n\t\t// });\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{message && (\n\t\t\t\t\t\n\t\t\t\t)}\n\n\t\t\t\t{/**/}\n\n\t\t\t\t\n\t\t\t\t\t\t\ttrace2.y[trace2.y.length - 1] - trace1.y[trace1.y.length - 1]\n\t\t\t\t\t)}\n\t\t\t\t\t// hostNames={sortedTraces.map((trace: any) => trace.name)}\n\t\t\t\t\tmetric={metric}\n\t\t\t\t\tcluster={cluster}\n\t\t\t\t\tnode={node}\n\t\t\t\t\t// lastValues={sortedTraces.map(\n\t\t\t\t\t// \t(trace: any) => trace.y[trace.y.length - 1]\n\t\t\t\t\t// )}\n\t\t\t\t\t// colors={sortedTraces.map((trace: any) => trace.line.color)}\n\t\t\t\t\tdifferential={aggregation === AGGREGATION.DIFFERENTIAL}\n\t\t\t\t\trefreshInterval={DEFAULT_REFRESH_INTERVAL}\n\t\t\t\t/>\n\t\t\t\t) => {\n\t\t\t\t\t\t// console.log(\n\t\t\t\t\t\t// \t\"relayout event\",\n\t\t\t\t\t\t// \tevent,\n\t\t\t\t\t\t// \tevent[\"xaxis.autorange\"] || event[\"yaxis.autorange\"]\n\t\t\t\t\t\t// );\n\n\t\t\t\t\t\t// if zoom is reset, fetch new data\n\t\t\t\t\t\tif (event[\"xaxis.autorange\"] || event[\"yaxis.autorange\"]) {\n\t\t\t\t\t\t\tthis._zoomRange = undefined;\n\t\t\t\t\t\t\t// console.log(\"zoom reset\");\n\t\t\t\t\t\t\t// fetch data and resume scheduled fetch\n\t\t\t\t\t\t\t// note: schedule is implicit - calling fetchData without params\n\t\t\t\t\t\t\t// \t\t\t will fetch data for period selected in dashboard and start\n\t\t\t\t\t\t\t// \t\t\t scheduled fetching\n\t\t\t\t\t\t\tthis.fetchData(\"startAutoFetch\");\n\n\t\t\t\t\t\t\t// if zoom is changed (other than reset) fetch new data for that period\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlet newZoomRange: AxisRange = {};\n\n\t\t\t\t\t\t\t// if y axis zoom changed\n\t\t\t\t\t\t\tif (event[\"yaxis.range[0]\"] || event[\"yaxis.range[1]\"]) {\n\t\t\t\t\t\t\t\t// get new y axis zoom range\n\t\t\t\t\t\t\t\tnewZoomRange.y = {\n\t\t\t\t\t\t\t\t\tfrom: event[\"yaxis.range[0]\"] || 0,\n\t\t\t\t\t\t\t\t\tto: event[\"yaxis.range[1]\"] || yAxisRange\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// if x axis zoom changed\n\t\t\t\t\t\t\tif (event[\"xaxis.range[0]\"] || event[\"xaxis.range[1]\"]) {\n\t\t\t\t\t\t\t\t// console.log(\"x zoom changed\");\n\t\t\t\t\t\t\t\t// if range is not a string (expecting date in string format)\n\t\t\t\t\t\t\t\t// do not update zoom range and force component update to keep existing zoom\n\t\t\t\t\t\t\t\tif (!isString(event[\"xaxis.range[0]\"])) {\n\t\t\t\t\t\t\t\t\t// console.log(\"no data zoom\");\n\t\t\t\t\t\t\t\t\tthis.forceUpdate();\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// get new x axis zoom range\n\t\t\t\t\t\t\t\tnewZoomRange.x = {\n\t\t\t\t\t\t\t\t\tfrom: ChartUtils.parsePlotlyDateTime(event[\"xaxis.range[0]\"]),\n\t\t\t\t\t\t\t\t\tto: ChartUtils.parsePlotlyDateTime(event[\"xaxis.range[1]\"])\n\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t\t// if zoom period is too small, do not update zoom range\n\t\t\t\t\t\t\t\t// and force component update to keep existing zoom\n\t\t\t\t\t\t\t\t// console.log(\"zoom range\", newZoomRange);\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tnewZoomRange.x?.to.toSeconds() -\n\t\t\t\t\t\t\t\t\t\tnewZoomRange.x?.from.toSeconds() <\n\t\t\t\t\t\t\t\t\t10\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t// console.log(\"zoom too small\", xAxisRange);\n\t\t\t\t\t\t\t\t\tthis.forceUpdate();\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// if x or y axis zoom change, update zoom range and fetch new data\n\t\t\t\t\t\t\tif (newZoomRange.x || newZoomRange.y) {\n\t\t\t\t\t\t\t\tthis._zoomRange = { ...this._zoomRange, ...newZoomRange };\n\t\t\t\t\t\t\t\t// console.log(\"zoomed in\", this._zoomRange);\n\t\t\t\t\t\t\t\t// fetch data for zoomed in period and pause scheduled fetch\n\t\t\t\t\t\t\t\tthis.fetchData(\"manualFetch\", this._zoomRange.x);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tconfig={{ displayModeBar: false, scrollZoom: false }}\n\t\t\t\t/>\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default withStyles(styles)(TimeSeriesChartComponent);\n","import createStyles from \"@mui/styles/createStyles\";\n\nexport const styles = () =>\n\tcreateStyles({\n\t\tprogress: {\n\t\t\tmarginTop: \"-50px\",\n\t\t\tposition: \"absolute\",\n\t\t\ttop: 80,\n\t\t\tright: 5,\n\t\t\tzIndex: 1\n\t\t},\n\t\tprogressFadeIn: {\n\t\t\topacity: 1,\n\t\t\ttransition: \"opacity .2s 1s\"\n\t\t},\n\t\tprogressFadeOut: {\n\t\t\topacity: 0,\n\t\t\ttransition: \"opacity 0.5s\"\n\t\t}\n\t});\n","import { ChartMetric } from \"components/monitoring/charts/const\";\n\nexport const AVAILABLE_METRICS: ChartMetric[] = [\n\t// NODE metrics\n\t{ name: \"aborted_clients\", table: \"mysql\" },\n\t{ name: \"aborted_connects\", table: \"mysql\" },\n\t{ name: \"access_denied_errors\", table: \"mysql\" },\n\t{ name: \"acl_column_grants\", table: \"mysql\" },\n\t{ name: \"acl_database_grants\", table: \"mysql\" },\n\t{ name: \"acl_function_grants\", table: \"mysql\" },\n\t{ name: \"acl_package_body_grants\", table: \"mysql\" },\n\t{ name: \"acl_package_spec_grants\", table: \"mysql\" },\n\t{ name: \"acl_procedure_grants\", table: \"mysql\" },\n\t{ name: \"acl_proxy_users\", table: \"mysql\" },\n\t{ name: \"acl_role_grants\", table: \"mysql\" },\n\t{ name: \"acl_roles\", table: \"mysql\" },\n\t{ name: \"acl_table_grants\", table: \"mysql\" },\n\t{ name: \"acl_users\", table: \"mysql\" },\n\t{ name: \"aria_pagecache_blocks_not_flushed\", table: \"mysql\" },\n\t{ name: \"aria_pagecache_blocks_unused\", table: \"mysql\" },\n\t{ name: \"aria_pagecache_blocks_used\", table: \"mysql\" },\n\t{ name: \"aria_pagecache_read_requests\", table: \"mysql\" },\n\t{ name: \"aria_pagecache_reads\", table: \"mysql\" },\n\t{ name: \"aria_pagecache_write_requests\", table: \"mysql\" },\n\t{ name: \"aria_pagecache_writes\", table: \"mysql\" },\n\t{ name: \"aria_transaction_log_syncs\", table: \"mysql\" },\n\t{ name: \"binlog_bytes_written\", table: \"mysql\" },\n\t{ name: \"binlog_cache_disk_use\", table: \"mysql\" },\n\t{ name: \"binlog_cache_use\", table: \"mysql\" },\n\t{ name: \"binlog_commits\", table: \"mysql\" },\n\t{ name: \"binlog_group_commit_trigger_count\", table: \"mysql\" },\n\t{ name: \"binlog_group_commit_trigger_lock_wait\", table: \"mysql\" },\n\t{ name: \"binlog_group_commit_trigger_timeout\", table: \"mysql\" },\n\t{ name: \"binlog_group_commits\", table: \"mysql\" },\n\t{ name: \"binlog_snapshot_position\", table: \"mysql\" },\n\t{ name: \"binlog_stmt_cache_disk_use\", table: \"mysql\" },\n\t{ name: \"binlog_stmt_cache_use\", table: \"mysql\" },\n\t{ name: \"busy_time\", table: \"mysql\" },\n\t{ name: \"bytes_received\", table: \"mysql\" },\n\t{ name: \"bytes_sent\", table: \"mysql\" },\n\t{ name: \"column_compressions\", table: \"mysql\" },\n\t{ name: \"column_decompressions\", table: \"mysql\" },\n\t{ name: \"com_admin_commands\", table: \"mysql\" },\n\t{ name: \"com_alter_db\", table: \"mysql\" },\n\t{ name: \"com_alter_db_upgrade\", table: \"mysql\" },\n\t{ name: \"com_alter_event\", table: \"mysql\" },\n\t{ name: \"com_alter_function\", table: \"mysql\" },\n\t{ name: \"com_alter_procedure\", table: \"mysql\" },\n\t{ name: \"com_alter_sequence\", table: \"mysql\" },\n\t{ name: \"com_alter_server\", table: \"mysql\" },\n\t{ name: \"com_alter_table\", table: \"mysql\" },\n\t{ name: \"com_alter_tablespace\", table: \"mysql\" },\n\t{ name: \"com_alter_user\", table: \"mysql\" },\n\t{ name: \"com_analyze\", table: \"mysql\" },\n\t{ name: \"com_assign_to_keycache\", table: \"mysql\" },\n\t{ name: \"com_begin\", table: \"mysql\" },\n\t{ name: \"com_binlog\", table: \"mysql\" },\n\t{ name: \"com_call_procedure\", table: \"mysql\" },\n\t{ name: \"com_change_db\", table: \"mysql\" },\n\t{ name: \"com_change_master\", table: \"mysql\" },\n\t{ name: \"com_check\", table: \"mysql\" },\n\t{ name: \"com_checksum\", table: \"mysql\" },\n\t{ name: \"com_commit\", table: \"mysql\" },\n\t{ name: \"com_compound_sql\", table: \"mysql\" },\n\t{ name: \"com_create_db\", table: \"mysql\" },\n\t{ name: \"com_create_event\", table: \"mysql\" },\n\t{ name: \"com_create_function\", table: \"mysql\" },\n\t{ name: \"com_create_index\", table: \"mysql\" },\n\t{ name: \"com_create_package\", table: \"mysql\" },\n\t{ name: \"com_create_package_body\", table: \"mysql\" },\n\t{ name: \"com_create_procedure\", table: \"mysql\" },\n\t{ name: \"com_create_role\", table: \"mysql\" },\n\t{ name: \"com_create_sequence\", table: \"mysql\" },\n\t{ name: \"com_create_server\", table: \"mysql\" },\n\t{ name: \"com_create_table\", table: \"mysql\" },\n\t{ name: \"com_create_temporary_table\", table: \"mysql\" },\n\t{ name: \"com_create_trigger\", table: \"mysql\" },\n\t{ name: \"com_create_udf\", table: \"mysql\" },\n\t{ name: \"com_create_user\", table: \"mysql\" },\n\t{ name: \"com_create_view\", table: \"mysql\" },\n\t{ name: \"com_dealloc_sql\", table: \"mysql\" },\n\t{ name: \"com_delete\", table: \"mysql\" },\n\t{ name: \"com_delete_multi\", table: \"mysql\" },\n\t{ name: \"com_do\", table: \"mysql\" },\n\t{ name: \"com_drop_db\", table: \"mysql\" },\n\t{ name: \"com_drop_event\", table: \"mysql\" },\n\t{ name: \"com_drop_function\", table: \"mysql\" },\n\t{ name: \"com_drop_index\", table: \"mysql\" },\n\t{ name: \"com_drop_package\", table: \"mysql\" },\n\t{ name: \"com_drop_package_body\", table: \"mysql\" },\n\t{ name: \"com_drop_procedure\", table: \"mysql\" },\n\t{ name: \"com_drop_role\", table: \"mysql\" },\n\t{ name: \"com_drop_sequence\", table: \"mysql\" },\n\t{ name: \"com_drop_server\", table: \"mysql\" },\n\t{ name: \"com_drop_table\", table: \"mysql\" },\n\t{ name: \"com_drop_temporary_table\", table: \"mysql\" },\n\t{ name: \"com_drop_trigger\", table: \"mysql\" },\n\t{ name: \"com_drop_user\", table: \"mysql\" },\n\t{ name: \"com_drop_view\", table: \"mysql\" },\n\t{ name: \"com_empty_query\", table: \"mysql\" },\n\t{ name: \"com_execute_immediate\", table: \"mysql\" },\n\t{ name: \"com_execute_sql\", table: \"mysql\" },\n\t{ name: \"com_flush\", table: \"mysql\" },\n\t{ name: \"com_get_diagnostics\", table: \"mysql\" },\n\t{ name: \"com_grant\", table: \"mysql\" },\n\t{ name: \"com_grant_role\", table: \"mysql\" },\n\t{ name: \"com_ha_close\", table: \"mysql\" },\n\t{ name: \"com_ha_open\", table: \"mysql\" },\n\t{ name: \"com_ha_read\", table: \"mysql\" },\n\t{ name: \"com_help\", table: \"mysql\" },\n\t{ name: \"com_insert\", table: \"mysql\" },\n\t{ name: \"com_insert_select\", table: \"mysql\" },\n\t{ name: \"com_install_plugin\", table: \"mysql\" },\n\t{ name: \"com_kill\", table: \"mysql\" },\n\t{ name: \"com_load\", table: \"mysql\" },\n\t{ name: \"com_lock_tables\", table: \"mysql\" },\n\t{ name: \"com_multi\", table: \"mysql\" },\n\t{ name: \"com_optimize\", table: \"mysql\" },\n\t{ name: \"com_preload_keys\", table: \"mysql\" },\n\t{ name: \"com_prepare_sql\", table: \"mysql\" },\n\t{ name: \"com_purge\", table: \"mysql\" },\n\t{ name: \"com_purge_before_date\", table: \"mysql\" },\n\t{ name: \"com_release_savepoint\", table: \"mysql\" },\n\t{ name: \"com_rename_table\", table: \"mysql\" },\n\t{ name: \"com_rename_user\", table: \"mysql\" },\n\t{ name: \"com_repair\", table: \"mysql\" },\n\t{ name: \"com_replace\", table: \"mysql\" },\n\t{ name: \"com_replace_select\", table: \"mysql\" },\n\t{ name: \"com_reset\", table: \"mysql\" },\n\t{ name: \"com_resignal\", table: \"mysql\" },\n\t{ name: \"com_revoke\", table: \"mysql\" },\n\t{ name: \"com_revoke_all\", table: \"mysql\" },\n\t{ name: \"com_revoke_role\", table: \"mysql\" },\n\t{ name: \"com_rollback\", table: \"mysql\" },\n\t{ name: \"com_rollback_to_savepoint\", table: \"mysql\" },\n\t{ name: \"com_savepoint\", table: \"mysql\" },\n\t{ name: \"com_select\", table: \"mysql\" },\n\t{ name: \"com_set_option\", table: \"mysql\" },\n\t{ name: \"com_show_authors\", table: \"mysql\" },\n\t{ name: \"com_show_binlog_events\", table: \"mysql\" },\n\t{ name: \"com_show_binlogs\", table: \"mysql\" },\n\t{ name: \"com_show_charsets\", table: \"mysql\" },\n\t{ name: \"com_show_collations\", table: \"mysql\" },\n\t{ name: \"com_show_contributors\", table: \"mysql\" },\n\t{ name: \"com_show_create_db\", table: \"mysql\" },\n\t{ name: \"com_show_create_event\", table: \"mysql\" },\n\t{ name: \"com_show_create_func\", table: \"mysql\" },\n\t{ name: \"com_show_create_package\", table: \"mysql\" },\n\t{ name: \"com_show_create_package_body\", table: \"mysql\" },\n\t{ name: \"com_show_create_proc\", table: \"mysql\" },\n\t{ name: \"com_show_create_table\", table: \"mysql\" },\n\t{ name: \"com_show_create_trigger\", table: \"mysql\" },\n\t{ name: \"com_show_create_user\", table: \"mysql\" },\n\t{ name: \"com_show_databases\", table: \"mysql\" },\n\t{ name: \"com_show_engine_logs\", table: \"mysql\" },\n\t{ name: \"com_show_engine_mutex\", table: \"mysql\" },\n\t{ name: \"com_show_engine_status\", table: \"mysql\" },\n\t{ name: \"com_show_errors\", table: \"mysql\" },\n\t{ name: \"com_show_events\", table: \"mysql\" },\n\t{ name: \"com_show_explain\", table: \"mysql\" },\n\t{ name: \"com_show_fields\", table: \"mysql\" },\n\t{ name: \"com_show_function_status\", table: \"mysql\" },\n\t{ name: \"com_show_generic\", table: \"mysql\" },\n\t{ name: \"com_show_grants\", table: \"mysql\" },\n\t{ name: \"com_show_keys\", table: \"mysql\" },\n\t{ name: \"com_show_master_status\", table: \"mysql\" },\n\t{ name: \"com_show_open_tables\", table: \"mysql\" },\n\t{ name: \"com_show_package_body_status\", table: \"mysql\" },\n\t{ name: \"com_show_package_status\", table: \"mysql\" },\n\t{ name: \"com_show_plugins\", table: \"mysql\" },\n\t{ name: \"com_show_privileges\", table: \"mysql\" },\n\t{ name: \"com_show_procedure_status\", table: \"mysql\" },\n\t{ name: \"com_show_processlist\", table: \"mysql\" },\n\t{ name: \"com_show_profile\", table: \"mysql\" },\n\t{ name: \"com_show_profiles\", table: \"mysql\" },\n\t{ name: \"com_show_relaylog_events\", table: \"mysql\" },\n\t{ name: \"com_show_slave_hosts\", table: \"mysql\" },\n\t{ name: \"com_show_slave_status\", table: \"mysql\" },\n\t{ name: \"com_show_status\", table: \"mysql\" },\n\t{ name: \"com_show_storage_engines\", table: \"mysql\" },\n\t{ name: \"com_show_table_status\", table: \"mysql\" },\n\t{ name: \"com_show_tables\", table: \"mysql\" },\n\t{ name: \"com_show_triggers\", table: \"mysql\" },\n\t{ name: \"com_show_variables\", table: \"mysql\" },\n\t{ name: \"com_show_warnings\", table: \"mysql\" },\n\t{ name: \"com_shutdown\", table: \"mysql\" },\n\t{ name: \"com_signal\", table: \"mysql\" },\n\t{ name: \"com_start_all_slaves\", table: \"mysql\" },\n\t{ name: \"com_start_slave\", table: \"mysql\" },\n\t{ name: \"com_stmt_close\", table: \"mysql\" },\n\t{ name: \"com_stmt_execute\", table: \"mysql\" },\n\t{ name: \"com_stmt_fetch\", table: \"mysql\" },\n\t{ name: \"com_stmt_prepare\", table: \"mysql\" },\n\t{ name: \"com_stmt_reprepare\", table: \"mysql\" },\n\t{ name: \"com_stmt_reset\", table: \"mysql\" },\n\t{ name: \"com_stmt_send_long_data\", table: \"mysql\" },\n\t{ name: \"com_stop_all_slaves\", table: \"mysql\" },\n\t{ name: \"com_stop_slave\", table: \"mysql\" },\n\t{ name: \"com_truncate\", table: \"mysql\" },\n\t{ name: \"com_uninstall_plugin\", table: \"mysql\" },\n\t{ name: \"com_unlock_tables\", table: \"mysql\" },\n\t{ name: \"com_update\", table: \"mysql\" },\n\t{ name: \"com_update_multi\", table: \"mysql\" },\n\t{ name: \"com_xa_commit\", table: \"mysql\" },\n\t{ name: \"com_xa_end\", table: \"mysql\" },\n\t{ name: \"com_xa_prepare\", table: \"mysql\" },\n\t{ name: \"com_xa_recover\", table: \"mysql\" },\n\t{ name: \"com_xa_rollback\", table: \"mysql\" },\n\t{ name: \"com_xa_start\", table: \"mysql\" },\n\t{ name: \"compression\", table: \"mysql\" },\n\t{ name: \"connection_errors_accept\", table: \"mysql\" },\n\t{ name: \"connection_errors_internal\", table: \"mysql\" },\n\t{ name: \"connection_errors_max_connections\", table: \"mysql\" },\n\t{ name: \"connection_errors_peer_address\", table: \"mysql\" },\n\t{ name: \"connection_errors_select\", table: \"mysql\" },\n\t{ name: \"connection_errors_tcpwrap\", table: \"mysql\" },\n\t{ name: \"connections\", table: \"mysql\" },\n\t{ name: \"cpu_time\", table: \"mysql\" },\n\t{ name: \"created_tmp_disk_tables\", table: \"mysql\" },\n\t{ name: \"created_tmp_files\", table: \"mysql\" },\n\t{ name: \"created_tmp_tables\", table: \"mysql\" },\n\t{ name: \"delayed_errors\", table: \"mysql\" },\n\t{ name: \"delayed_insert_threads\", table: \"mysql\" },\n\t{ name: \"delayed_writes\", table: \"mysql\" },\n\t{ name: \"delete_scan\", table: \"mysql\" },\n\t{ name: \"empty_queries\", table: \"mysql\" },\n\t{ name: \"executed_events\", table: \"mysql\" },\n\t{ name: \"executed_triggers\", table: \"mysql\" },\n\t{ name: \"feature_check_constraint\", table: \"mysql\" },\n\t{ name: \"feature_custom_aggregate_functions\", table: \"mysql\" },\n\t{ name: \"feature_delay_key_write\", table: \"mysql\" },\n\t{ name: \"feature_dynamic_columns\", table: \"mysql\" },\n\t{ name: \"feature_fulltext\", table: \"mysql\" },\n\t{ name: \"feature_gis\", table: \"mysql\" },\n\t{ name: \"feature_invisible_columns\", table: \"mysql\" },\n\t{ name: \"feature_json\", table: \"mysql\" },\n\t{ name: \"feature_locale\", table: \"mysql\" },\n\t{ name: \"feature_subquery\", table: \"mysql\" },\n\t{ name: \"feature_system_versioning\", table: \"mysql\" },\n\t{ name: \"feature_timezone\", table: \"mysql\" },\n\t{ name: \"feature_trigger\", table: \"mysql\" },\n\t{ name: \"feature_window_functions\", table: \"mysql\" },\n\t{ name: \"feature_xml\", table: \"mysql\" },\n\t{ name: \"flush_commands\", table: \"mysql\" },\n\t{ name: \"handler_commit\", table: \"mysql\" },\n\t{ name: \"handler_delete\", table: \"mysql\" },\n\t{ name: \"handler_discover\", table: \"mysql\" },\n\t{ name: \"handler_external_lock\", table: \"mysql\" },\n\t{ name: \"handler_icp_attempts\", table: \"mysql\" },\n\t{ name: \"handler_icp_match\", table: \"mysql\" },\n\t{ name: \"handler_mrr_init\", table: \"mysql\" },\n\t{ name: \"handler_mrr_key_refills\", table: \"mysql\" },\n\t{ name: \"handler_mrr_rowid_refills\", table: \"mysql\" },\n\t{ name: \"handler_prepare\", table: \"mysql\" },\n\t{ name: \"handler_read_first\", table: \"mysql\" },\n\t{ name: \"handler_read_key\", table: \"mysql\" },\n\t{ name: \"handler_read_last\", table: \"mysql\" },\n\t{ name: \"handler_read_next\", table: \"mysql\" },\n\t{ name: \"handler_read_prev\", table: \"mysql\" },\n\t{ name: \"handler_read_retry\", table: \"mysql\" },\n\t{ name: \"handler_read_rnd\", table: \"mysql\" },\n\t{ name: \"handler_read_rnd_deleted\", table: \"mysql\" },\n\t{ name: \"handler_read_rnd_next\", table: \"mysql\" },\n\t{ name: \"handler_rollback\", table: \"mysql\" },\n\t{ name: \"handler_savepoint\", table: \"mysql\" },\n\t{ name: \"handler_savepoint_rollback\", table: \"mysql\" },\n\t{ name: \"handler_tmp_delete\", table: \"mysql\" },\n\t{ name: \"handler_tmp_update\", table: \"mysql\" },\n\t{ name: \"handler_tmp_write\", table: \"mysql\" },\n\t{ name: \"handler_update\", table: \"mysql\" },\n\t{ name: \"handler_write\", table: \"mysql\" },\n\t{ name: \"innodb_available_undo_logs\", table: \"mysql\" },\n\t{ name: \"innodb_buffer_pool_bytes_data\", table: \"mysql\" },\n\t{ name: \"innodb_buffer_pool_bytes_dirty\", table: \"mysql\" },\n\t{ name: \"innodb_buffer_pool_load_incomplete\", table: \"mysql\" },\n\t{ name: \"innodb_buffer_pool_load_status\", table: \"mysql\" },\n\t{ name: \"innodb_buffer_pool_pages_data\", table: \"mysql\" },\n\t{ name: \"innodb_buffer_pool_pages_dirty\", table: \"mysql\" },\n\t{ name: \"innodb_buffer_pool_pages_flushed\", table: \"mysql\" },\n\t{ name: \"innodb_buffer_pool_pages_free\", table: \"mysql\" },\n\t{ name: \"innodb_buffer_pool_pages_misc\", table: \"mysql\" },\n\t{ name: \"innodb_buffer_pool_pages_total\", table: \"mysql\" },\n\t{ name: \"innodb_buffer_pool_read_ahead\", table: \"mysql\" },\n\t{ name: \"innodb_buffer_pool_read_ahead_evicted\", table: \"mysql\" },\n\t{ name: \"innodb_buffer_pool_read_ahead_rnd\", table: \"mysql\" },\n\t{ name: \"innodb_buffer_pool_read_requests\", table: \"mysql\" },\n\t{ name: \"innodb_buffer_pool_reads\", table: \"mysql\" },\n\t{ name: \"innodb_buffer_pool_wait_free\", table: \"mysql\" },\n\t{ name: \"innodb_buffer_pool_write_requests\", table: \"mysql\" },\n\t{ name: \"innodb_data_fsyncs\", table: \"mysql\" },\n\t{ name: \"innodb_data_pending_fsyncs\", table: \"mysql\" },\n\t{ name: \"innodb_data_pending_reads\", table: \"mysql\" },\n\t{ name: \"innodb_data_pending_writes\", table: \"mysql\" },\n\t{ name: \"innodb_data_read\", table: \"mysql\" },\n\t{ name: \"innodb_data_reads\", table: \"mysql\" },\n\t{ name: \"innodb_data_writes\", table: \"mysql\" },\n\t{ name: \"innodb_data_written\", table: \"mysql\" },\n\t{ name: \"innodb_dblwr_pages_written\", table: \"mysql\" },\n\t{ name: \"innodb_dblwr_writes\", table: \"mysql\" },\n\t{ name: \"innodb_defragment_compression_failures\", table: \"mysql\" },\n\t{ name: \"innodb_defragment_count\", table: \"mysql\" },\n\t{ name: \"innodb_defragment_failures\", table: \"mysql\" },\n\t{ name: \"innodb_encryption_key_rotation_list_length\", table: \"mysql\" },\n\t{ name: \"innodb_encryption_n_merge_blocks_decrypted\", table: \"mysql\" },\n\t{ name: \"innodb_encryption_n_merge_blocks_encrypted\", table: \"mysql\" },\n\t{ name: \"innodb_encryption_n_rowlog_blocks_decrypted\", table: \"mysql\" },\n\t{ name: \"innodb_encryption_n_rowlog_blocks_encrypted\", table: \"mysql\" },\n\t{ name: \"innodb_encryption_n_temp_blocks_decrypted\", table: \"mysql\" },\n\t{ name: \"innodb_encryption_n_temp_blocks_encrypted\", table: \"mysql\" },\n\t{ name: \"innodb_encryption_num_key_requests\", table: \"mysql\" },\n\t{ name: \"innodb_encryption_rotation_estimated_iops\", table: \"mysql\" },\n\t{ name: \"innodb_encryption_rotation_pages_flushed\", table: \"mysql\" },\n\t{ name: \"innodb_encryption_rotation_pages_modified\", table: \"mysql\" },\n\t{ name: \"innodb_encryption_rotation_pages_read_from_cache\", table: \"mysql\" },\n\t{ name: \"innodb_encryption_rotation_pages_read_from_disk\", table: \"mysql\" },\n\t{ name: \"innodb_have_bzip2\", table: \"mysql\" },\n\t{ name: \"innodb_have_lz4\", table: \"mysql\" },\n\t{ name: \"innodb_have_lzma\", table: \"mysql\" },\n\t{ name: \"innodb_have_lzo\", table: \"mysql\" },\n\t{ name: \"innodb_have_punch_hole\", table: \"mysql\" },\n\t{ name: \"innodb_have_snappy\", table: \"mysql\" },\n\t{ name: \"innodb_instant_alter_column\", table: \"mysql\" },\n\t{ name: \"innodb_log_waits\", table: \"mysql\" },\n\t{ name: \"innodb_log_write_requests\", table: \"mysql\" },\n\t{ name: \"innodb_log_writes\", table: \"mysql\" },\n\t{ name: \"innodb_num_index_pages_written\", table: \"mysql\" },\n\t{ name: \"innodb_num_non_index_pages_written\", table: \"mysql\" },\n\t{ name: \"innodb_num_open_files\", table: \"mysql\" },\n\t{ name: \"innodb_num_page_compressed_trim_op\", table: \"mysql\" },\n\t{ name: \"innodb_num_pages_decrypted\", table: \"mysql\" },\n\t{ name: \"innodb_num_pages_encrypted\", table: \"mysql\" },\n\t{ name: \"innodb_num_pages_page_compressed\", table: \"mysql\" },\n\t{ name: \"innodb_num_pages_page_compression_error\", table: \"mysql\" },\n\t{ name: \"innodb_num_pages_page_decompressed\", table: \"mysql\" },\n\t{ name: \"innodb_onlineddl_pct_progress\", table: \"mysql\" },\n\t{ name: \"innodb_onlineddl_rowlog_pct_used\", table: \"mysql\" },\n\t{ name: \"innodb_onlineddl_rowlog_rows\", table: \"mysql\" },\n\t{ name: \"innodb_os_log_fsyncs\", table: \"mysql\" },\n\t{ name: \"innodb_os_log_pending_fsyncs\", table: \"mysql\" },\n\t{ name: \"innodb_os_log_pending_writes\", table: \"mysql\" },\n\t{ name: \"innodb_os_log_written\", table: \"mysql\" },\n\t{ name: \"innodb_page_compression_saved\", table: \"mysql\" },\n\t{ name: \"innodb_page_size\", table: \"mysql\" },\n\t{ name: \"innodb_pages0_read\", table: \"mysql\" },\n\t{ name: \"innodb_pages_created\", table: \"mysql\" },\n\t{ name: \"innodb_pages_read\", table: \"mysql\" },\n\t{ name: \"innodb_pages_written\", table: \"mysql\" },\n\t{ name: \"innodb_row_lock_current_waits\", table: \"mysql\" },\n\t{ name: \"innodb_row_lock_time\", table: \"mysql\" },\n\t{ name: \"innodb_row_lock_time_avg\", table: \"mysql\" },\n\t{ name: \"innodb_row_lock_time_max\", table: \"mysql\" },\n\t{ name: \"innodb_row_lock_waits\", table: \"mysql\" },\n\t{ name: \"innodb_rows_deleted\", table: \"mysql\" },\n\t{ name: \"innodb_rows_inserted\", table: \"mysql\" },\n\t{ name: \"innodb_rows_read\", table: \"mysql\" },\n\t{ name: \"innodb_rows_updated\", table: \"mysql\" },\n\t{ name: \"innodb_scrub_background_page_reorganizations\", table: \"mysql\" },\n\t{\n\t\tname: \"innodb_scrub_background_page_split_failures_missing_index\",\n\t\ttable: \"mysql\"\n\t},\n\t{\n\t\tname: \"innodb_scrub_background_page_split_failures_out_of_filespace\",\n\t\ttable: \"mysql\"\n\t},\n\t{\n\t\tname: \"innodb_scrub_background_page_split_failures_underflow\",\n\t\ttable: \"mysql\"\n\t},\n\t{\n\t\tname: \"innodb_scrub_background_page_split_failures_unknown\",\n\t\ttable: \"mysql\"\n\t},\n\t{ name: \"innodb_scrub_background_page_splits\", table: \"mysql\" },\n\t{ name: \"innodb_scrub_log\", table: \"mysql\" },\n\t{ name: \"innodb_secondary_index_triggered_cluster_reads\", table: \"mysql\" },\n\t{\n\t\tname: \"innodb_secondary_index_triggered_cluster_reads_avoided\",\n\t\ttable: \"mysql\"\n\t},\n\t{ name: \"innodb_system_rows_deleted\", table: \"mysql\" },\n\t{ name: \"innodb_system_rows_inserted\", table: \"mysql\" },\n\t{ name: \"innodb_system_rows_read\", table: \"mysql\" },\n\t{ name: \"innodb_system_rows_updated\", table: \"mysql\" },\n\t{ name: \"innodb_truncated_status_writes\", table: \"mysql\" },\n\t{ name: \"innodb_undo_truncations\", table: \"mysql\" },\n\t{ name: \"key_blocks_not_flushed\", table: \"mysql\" },\n\t{ name: \"key_blocks_unused\", table: \"mysql\" },\n\t{ name: \"key_blocks_used\", table: \"mysql\" },\n\t{ name: \"key_blocks_warm\", table: \"mysql\" },\n\t{ name: \"key_read_requests\", table: \"mysql\" },\n\t{ name: \"key_reads\", table: \"mysql\" },\n\t{ name: \"key_write_requests\", table: \"mysql\" },\n\t{ name: \"key_writes\", table: \"mysql\" },\n\t{ name: \"last_query_cost\", table: \"mysql\" },\n\t{ name: \"master_gtid_wait_count\", table: \"mysql\" },\n\t{ name: \"master_gtid_wait_time\", table: \"mysql\" },\n\t{ name: \"master_gtid_wait_timeouts\", table: \"mysql\" },\n\t{ name: \"max_statement_time_exceeded\", table: \"mysql\" },\n\t{ name: \"max_used_connections\", table: \"mysql\" },\n\t{ name: \"memory_used\", table: \"mysql\" },\n\t{ name: \"memory_used_initial\", table: \"mysql\" },\n\t{ name: \"not_flushed_delayed_rows\", table: \"mysql\" },\n\t{ name: \"open_files\", table: \"mysql\" },\n\t{ name: \"open_streams\", table: \"mysql\" },\n\t{ name: \"open_table_definitions\", table: \"mysql\" },\n\t{ name: \"open_tables\", table: \"mysql\" },\n\t{ name: \"opened_files\", table: \"mysql\" },\n\t{ name: \"opened_plugin_libraries\", table: \"mysql\" },\n\t{ name: \"opened_table_definitions\", table: \"mysql\" },\n\t{ name: \"opened_tables\", table: \"mysql\" },\n\t{ name: \"opened_views\", table: \"mysql\" },\n\t{ name: \"performance_schema_accounts_lost\", table: \"mysql\" },\n\t{ name: \"performance_schema_cond_classes_lost\", table: \"mysql\" },\n\t{ name: \"performance_schema_cond_instances_lost\", table: \"mysql\" },\n\t{ name: \"performance_schema_digest_lost\", table: \"mysql\" },\n\t{ name: \"performance_schema_file_classes_lost\", table: \"mysql\" },\n\t{ name: \"performance_schema_file_handles_lost\", table: \"mysql\" },\n\t{ name: \"performance_schema_file_instances_lost\", table: \"mysql\" },\n\t{ name: \"performance_schema_hosts_lost\", table: \"mysql\" },\n\t{ name: \"performance_schema_locker_lost\", table: \"mysql\" },\n\t{ name: \"performance_schema_mutex_classes_lost\", table: \"mysql\" },\n\t{ name: \"performance_schema_mutex_instances_lost\", table: \"mysql\" },\n\t{ name: \"performance_schema_rwlock_classes_lost\", table: \"mysql\" },\n\t{ name: \"performance_schema_rwlock_instances_lost\", table: \"mysql\" },\n\t{ name: \"performance_schema_session_connect_attrs_lost\", table: \"mysql\" },\n\t{ name: \"performance_schema_socket_classes_lost\", table: \"mysql\" },\n\t{ name: \"performance_schema_socket_instances_lost\", table: \"mysql\" },\n\t{ name: \"performance_schema_stage_classes_lost\", table: \"mysql\" },\n\t{ name: \"performance_schema_statement_classes_lost\", table: \"mysql\" },\n\t{ name: \"performance_schema_table_handles_lost\", table: \"mysql\" },\n\t{ name: \"performance_schema_table_instances_lost\", table: \"mysql\" },\n\t{ name: \"performance_schema_thread_classes_lost\", table: \"mysql\" },\n\t{ name: \"performance_schema_thread_instances_lost\", table: \"mysql\" },\n\t{ name: \"performance_schema_users_lost\", table: \"mysql\" },\n\t{ name: \"prepared_stmt_count\", table: \"mysql\" },\n\t{ name: \"qcache_free_blocks\", table: \"mysql\" },\n\t{ name: \"qcache_free_memory\", table: \"mysql\" },\n\t{ name: \"qcache_hits\", table: \"mysql\" },\n\t{ name: \"qcache_inserts\", table: \"mysql\" },\n\t{ name: \"qcache_lowmem_prunes\", table: \"mysql\" },\n\t{ name: \"qcache_not_cached\", table: \"mysql\" },\n\t{ name: \"qcache_queries_in_cache\", table: \"mysql\" },\n\t{ name: \"qcache_total_blocks\", table: \"mysql\" },\n\t{ name: \"queries\", table: \"mysql\" },\n\t{ name: \"questions\", table: \"mysql\" },\n\t{ name: \"rows_read\", table: \"mysql\" },\n\t{ name: \"rows_sent\", table: \"mysql\" },\n\t{ name: \"rows_tmp_read\", table: \"mysql\" },\n\t{ name: \"rpl_semi_sync_master_clients\", table: \"mysql\" },\n\t{ name: \"rpl_semi_sync_master_get_ack\", table: \"mysql\" },\n\t{ name: \"rpl_semi_sync_master_net_avg_wait_time\", table: \"mysql\" },\n\t{ name: \"rpl_semi_sync_master_net_wait_time\", table: \"mysql\" },\n\t{ name: \"rpl_semi_sync_master_net_waits\", table: \"mysql\" },\n\t{ name: \"rpl_semi_sync_master_no_times\", table: \"mysql\" },\n\t{ name: \"rpl_semi_sync_master_no_tx\", table: \"mysql\" },\n\t{ name: \"rpl_semi_sync_master_request_ack\", table: \"mysql\" },\n\t{ name: \"rpl_semi_sync_master_status\", table: \"mysql\" },\n\t{ name: \"rpl_semi_sync_master_timefunc_failures\", table: \"mysql\" },\n\t{ name: \"rpl_semi_sync_master_tx_avg_wait_time\", table: \"mysql\" },\n\t{ name: \"rpl_semi_sync_master_tx_wait_time\", table: \"mysql\" },\n\t{ name: \"rpl_semi_sync_master_tx_waits\", table: \"mysql\" },\n\t{ name: \"rpl_semi_sync_master_wait_pos_backtraverse\", table: \"mysql\" },\n\t{ name: \"rpl_semi_sync_master_wait_sessions\", table: \"mysql\" },\n\t{ name: \"rpl_semi_sync_master_yes_tx\", table: \"mysql\" },\n\t{ name: \"rpl_semi_sync_slave_send_ack\", table: \"mysql\" },\n\t{ name: \"rpl_semi_sync_slave_status\", table: \"mysql\" },\n\t{ name: \"rpl_status\", table: \"mysql\" },\n\t{ name: \"rpl_transactions_multi_engine\", table: \"mysql\" },\n\t{ name: \"select_full_join\", table: \"mysql\" },\n\t{ name: \"select_full_range_join\", table: \"mysql\" },\n\t{ name: \"select_range\", table: \"mysql\" },\n\t{ name: \"select_range_check\", table: \"mysql\" },\n\t{ name: \"select_scan\", table: \"mysql\" },\n\t{ name: \"slave_connections\", table: \"mysql\" },\n\t{ name: \"slave_heartbeat_period\", table: \"mysql\" },\n\t{ name: \"slave_open_temp_tables\", table: \"mysql\" },\n\t{ name: \"slave_received_heartbeats\", table: \"mysql\" },\n\t{ name: \"slave_retried_transactions\", table: \"mysql\" },\n\t{ name: \"slave_running\", table: \"mysql\" },\n\t{ name: \"slave_skipped_errors\", table: \"mysql\" },\n\t{ name: \"slaves_connected\", table: \"mysql\" },\n\t{ name: \"slaves_running\", table: \"mysql\" },\n\t{ name: \"slow_launch_threads\", table: \"mysql\" },\n\t{ name: \"slow_queries\", table: \"mysql\" },\n\t{ name: \"sort_merge_passes\", table: \"mysql\" },\n\t{ name: \"sort_priority_queue_sorts\", table: \"mysql\" },\n\t{ name: \"sort_range\", table: \"mysql\" },\n\t{ name: \"sort_rows\", table: \"mysql\" },\n\t{ name: \"sort_scan\", table: \"mysql\" },\n\t{ name: \"ssl_accept_renegotiates\", table: \"mysql\" },\n\t{ name: \"ssl_accepts\", table: \"mysql\" },\n\t{ name: \"ssl_callback_cache_hits\", table: \"mysql\" },\n\t{ name: \"ssl_client_connects\", table: \"mysql\" },\n\t{ name: \"ssl_connect_renegotiates\", table: \"mysql\" },\n\t{ name: \"ssl_ctx_verify_depth\", table: \"mysql\" },\n\t{ name: \"ssl_ctx_verify_mode\", table: \"mysql\" },\n\t{ name: \"ssl_default_timeout\", table: \"mysql\" },\n\t{ name: \"ssl_finished_accepts\", table: \"mysql\" },\n\t{ name: \"ssl_finished_connects\", table: \"mysql\" },\n\t{ name: \"ssl_session_cache_hits\", table: \"mysql\" },\n\t{ name: \"ssl_session_cache_misses\", table: \"mysql\" },\n\t{ name: \"ssl_session_cache_mode\", table: \"mysql\" },\n\t{ name: \"ssl_session_cache_overflows\", table: \"mysql\" },\n\t{ name: \"ssl_session_cache_size\", table: \"mysql\" },\n\t{ name: \"ssl_session_cache_timeouts\", table: \"mysql\" },\n\t{ name: \"ssl_sessions_reused\", table: \"mysql\" },\n\t{ name: \"ssl_used_session_cache_entries\", table: \"mysql\" },\n\t{ name: \"ssl_verify_depth\", table: \"mysql\" },\n\t{ name: \"ssl_verify_mode\", table: \"mysql\" },\n\t{ name: \"subquery_cache_hit\", table: \"mysql\" },\n\t{ name: \"subquery_cache_miss\", table: \"mysql\" },\n\t{ name: \"syncs\", table: \"mysql\" },\n\t{ name: \"table_locks_immediate\", table: \"mysql\" },\n\t{ name: \"table_locks_waited\", table: \"mysql\" },\n\t{ name: \"table_open_cache_active_instances\", table: \"mysql\" },\n\t{ name: \"table_open_cache_hits\", table: \"mysql\" },\n\t{ name: \"table_open_cache_misses\", table: \"mysql\" },\n\t{ name: \"table_open_cache_overflows\", table: \"mysql\" },\n\t{ name: \"tc_log_max_pages_used\", table: \"mysql\" },\n\t{ name: \"tc_log_page_size\", table: \"mysql\" },\n\t{ name: \"tc_log_page_waits\", table: \"mysql\" },\n\t{ name: \"threadpool_idle_threads\", table: \"mysql\" },\n\t{ name: \"threadpool_threads\", table: \"mysql\" },\n\t{ name: \"threads_cached\", table: \"mysql\" },\n\t{ name: \"threads_connected\", table: \"mysql\" },\n\t{ name: \"threads_created\", table: \"mysql\" },\n\t{ name: \"threads_running\", table: \"mysql\" },\n\t{ name: \"transactions_gtid_foreign_engine\", table: \"mysql\" },\n\t{ name: \"transactions_multi_engine\", table: \"mysql\" },\n\t{ name: \"update_scan\", table: \"mysql\" },\n\t{ name: \"uptime\", table: \"mysql\" },\n\t{ name: \"uptime_since_flush_status\", table: \"mysql\" },\n\t{ name: \"wsrep_applier_thread_count\", table: \"mysql\" },\n\t{ name: \"wsrep_apply_oooe\", table: \"mysql\" },\n\t{ name: \"wsrep_apply_oool\", table: \"mysql\" },\n\t{ name: \"wsrep_apply_window\", table: \"mysql\" },\n\t{ name: \"wsrep_causal_reads\", table: \"mysql\" },\n\t{ name: \"wsrep_cert_deps_distance\", table: \"mysql\" },\n\t{ name: \"wsrep_cert_index_size\", table: \"mysql\" },\n\t{ name: \"wsrep_cert_interval\", table: \"mysql\" },\n\t{ name: \"wsrep_cluster_conf_id\", table: \"mysql\" },\n\t{ name: \"wsrep_cluster_size\", table: \"mysql\" },\n\t{ name: \"wsrep_cluster_state_uuid\", table: \"mysql\" },\n\t{ name: \"wsrep_cluster_status\", table: \"mysql\" },\n\t{ name: \"wsrep_cluster_weight\", table: \"mysql\" },\n\t{ name: \"wsrep_commit_oooe\", table: \"mysql\" },\n\t{ name: \"wsrep_commit_oool\", table: \"mysql\" },\n\t{ name: \"wsrep_commit_window\", table: \"mysql\" },\n\t{ name: \"wsrep_connected\", table: \"mysql\" },\n\t{ name: \"wsrep_desync_count\", table: \"mysql\" },\n\t{ name: \"wsrep_evs_repl_latency\", table: \"mysql\" },\n\t{ name: \"wsrep_evs_state\", table: \"mysql\" },\n\t{ name: \"wsrep_flow_control_paused\", table: \"mysql\" },\n\t{ name: \"wsrep_flow_control_paused_ns\", table: \"mysql\" },\n\t{ name: \"wsrep_flow_control_recv\", table: \"mysql\" },\n\t{ name: \"wsrep_flow_control_sent\", table: \"mysql\" },\n\t{ name: \"wsrep_gcomm_uuid\", table: \"mysql\" },\n\t{ name: \"wsrep_incoming_addresses\", table: \"mysql\" },\n\t{ name: \"wsrep_last_committed\", table: \"mysql\" },\n\t{ name: \"wsrep_local_bf_aborts\", table: \"mysql\" },\n\t{ name: \"wsrep_local_cached_downto\", table: \"mysql\" },\n\t{ name: \"wsrep_local_cached_downto\", table: \"mysql\" },\n\t{ name: \"wsrep_local_cert_failures\", table: \"mysql\" },\n\t{ name: \"wsrep_local_commits\", table: \"mysql\" },\n\t{ name: \"wsrep_local_index\", table: \"mysql\" },\n\t{ name: \"wsrep_local_recv_queue\", table: \"mysql\" },\n\t{ name: \"wsrep_local_recv_queue_avg\", table: \"mysql\" },\n\t{ name: \"wsrep_local_recv_queue_max\", table: \"mysql\" },\n\t{ name: \"wsrep_local_recv_queue_min\", table: \"mysql\" },\n\t{ name: \"wsrep_local_replays\", table: \"mysql\" },\n\t{ name: \"wsrep_local_send_queue\", table: \"mysql\" },\n\t{ name: \"wsrep_local_send_queue_avg\", table: \"mysql\" },\n\t{ name: \"wsrep_local_send_queue_max\", table: \"mysql\" },\n\t{ name: \"wsrep_local_send_queue_min\", table: \"mysql\" },\n\t{ name: \"wsrep_local_state\", table: \"mysql\" },\n\t{ name: \"wsrep_local_state_comment\", table: \"mysql\" },\n\t{ name: \"wsrep_local_state_uuid\", table: \"mysql\" },\n\t{ name: \"wsrep_open_connections\", table: \"mysql\" },\n\t{ name: \"wsrep_open_transactions\", table: \"mysql\" },\n\t{ name: \"wsrep_protocol_version\", table: \"mysql\" },\n\t{ name: \"wsrep_provider_name\", table: \"mysql\" },\n\t{ name: \"wsrep_provider_vendor\", table: \"mysql\" },\n\t{ name: \"wsrep_provider_version\", table: \"mysql\" },\n\t{ name: \"wsrep_ready\", table: \"mysql\" },\n\t{ name: \"wsrep_received\", table: \"mysql\" },\n\t{ name: \"wsrep_received_bytes\", table: \"mysql\" },\n\t{ name: \"wsrep_repl_data_bytes\", table: \"mysql\" },\n\t{ name: \"wsrep_repl_keys\", table: \"mysql\" },\n\t{ name: \"wsrep_repl_keys_bytes\", table: \"mysql\" },\n\t{ name: \"wsrep_repl_other_bytes\", table: \"mysql\" },\n\t{ name: \"wsrep_replicated\", table: \"mysql\" },\n\t{ name: \"wsrep_replicated_bytes\", table: \"mysql\" },\n\t{ name: \"wsrep_rollbacker_thread_count\", table: \"mysql\" },\n\t{ name: \"wsrep_thread_count\", table: \"mysql\" },\n\t// HOST metrics\n\t{ name: \"usage_guest\", table: \"cpu\" },\n\t{ name: \"usage_guest_nice\", table: \"cpu\" },\n\t{ name: \"usage_idle\", table: \"cpu\" },\n\t{ name: \"usage_iowait\", table: \"cpu\" },\n\t{ name: \"usage_irq\", table: \"cpu\" },\n\t{ name: \"usage_nice\", table: \"cpu\" },\n\t{ name: \"usage_softirq\", table: \"cpu\" },\n\t{ name: \"usage_steal\", table: \"cpu\" },\n\t{ name: \"usage_system\", table: \"cpu\" },\n\t{ name: \"usage_user\", table: \"cpu\" },\n\t{ name: \"child_major_faults\", table: \"procstat\" },\n\t{ name: \"child_minor_faults\", table: \"procstat\" },\n\t{ name: \"cpu_time_guest\", table: \"procstat\" },\n\t{ name: \"cpu_time_guest_nice\", table: \"procstat\" },\n\t{ name: \"cpu_time_idle\", table: \"procstat\" },\n\t{ name: \"cpu_time_iowait\", table: \"procstat\" },\n\t{ name: \"cpu_time_irq\", table: \"procstat\" },\n\t{ name: \"cpu_time_nice\", table: \"procstat\" },\n\t{ name: \"cpu_time_soft_irq\", table: \"procstat\" },\n\t{ name: \"cpu_time_steal\", table: \"procstat\" },\n\t{ name: \"cpu_time_system\", table: \"procstat\" },\n\t{ name: \"cpu_time_user\", table: \"procstat\" },\n\t{ name: \"cpu_usage\", table: \"procstat\" },\n\t{ name: \"created_at\", table: \"procstat\" },\n\t{ name: \"involuntary_context_switches\", table: \"procstat\" },\n\t{ name: \"major_faults\", table: \"procstat\" },\n\t{ name: \"memory_data\", table: \"procstat\" },\n\t{ name: \"memory_locked\", table: \"procstat\" },\n\t{ name: \"memory_rss\", table: \"procstat\" },\n\t{ name: \"memory_stack\", table: \"procstat\" },\n\t{ name: \"memory_swap\", table: \"procstat\" },\n\t{ name: \"memory_usage\", table: \"procstat\" },\n\t{ name: \"memory_vms\", table: \"procstat\" },\n\t{ name: \"minor_faults\", table: \"procstat\" },\n\t{ name: \"num_threads\", table: \"procstat\" },\n\t{ name: \"pid\", table: \"procstat\" },\n\t{ name: \"voluntary_context_switches\", table: \"procstat\" },\n\t{ name: \"free\", table: \"disk\" },\n\t{ name: \"inodes_free\", table: \"disk\" },\n\t{ name: \"inodes_total\", table: \"disk\" },\n\t{ name: \"inodes_used\", table: \"disk\" },\n\t{ name: \"total\", table: \"disk\" },\n\t{ name: \"used\", table: \"disk\" },\n\t{ name: \"used_percent\", table: \"disk\" }\n];\n","import React, { CSSProperties, HTMLAttributes } from \"react\";\nimport Select, { createFilter } from \"react-select\";\nimport { WithStyles, WithTheme } from '@mui/styles';\nimport withStyles from '@mui/styles/withStyles';\nimport Typography from \"@mui/material/Typography\";\nimport TextField, { BaseTextFieldProps } from \"@mui/material/TextField\";\nimport Paper from \"@mui/material/Paper\";\nimport { ValueContainerProps } from \"react-select/src/components/containers\";\nimport { ControlProps } from \"react-select/src/components/Control\";\nimport { MenuProps, NoticeProps } from \"react-select/src/components/Menu\";\nimport { OptionProps } from \"react-select/src/components/Option\";\nimport { PlaceholderProps } from \"react-select/src/components/Placeholder\";\nimport { SingleValueProps } from \"react-select/src/components/SingleValue\";\nimport { ValueType } from \"react-select/src/types\";\nimport { DistributiveOmit } from \"@mui/types\";\nimport { styles } from \"./styles\";\nimport { List } from \"react-virtualized\";\nimport { ListItem, ListItemIcon, ListItemText } from \"@mui/material\";\nimport { Database, Server } from \"mdi-material-ui\";\nimport { AVAILABLE_METRICS } from \"components/monitoring/dashboard/AddElement/Autocomplete/availableMetrics\";\nimport { ChartMetric } from \"components/monitoring/charts/const\";\n\ninterface OptionType {\n\tlabel: string;\n\tvalue: string;\n}\n\nfunction NoOptionsMessage(props: NoticeProps) {\n\tconsole.log(\"noOptionsMessage\", props);\n\treturn (\n\t\t\n\t\t\t{props.children}\n\t\t\n\t);\n}\n\ntype InputComponentProps = Pick &\n\tHTMLAttributes;\n\nfunction inputComponent({ inputRef, ...props }: InputComponentProps) {\n\treturn
;\n}\n\nfunction Control(props: ControlProps) {\n\tconst {\n\t\tchildren,\n\t\tinnerProps,\n\t\tinnerRef,\n\t\tselectProps: { classes, TextFieldProps }\n\t} = props;\n\n\treturn (\n\t\t\n\t);\n}\n\nfunction Option(props: OptionProps) {\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t{props.data.label.startsWith(\"mysql\") ? : }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n\ntype MuiPlaceholderProps = DistributiveOmit<\n\tPlaceholderProps,\n\t\"innerProps\"\n> &\n\tPartial, \"innerProps\">>;\n\nfunction Placeholder(props: MuiPlaceholderProps) {\n\tconst { selectProps, innerProps = {}, children } = props;\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n}\n\nfunction SingleValue(props: SingleValueProps) {\n\treturn (\n\t\t\n\t\t\t{props.data.value.replace(\"node_\", \"host_\")}\n\t\t\n\t);\n}\n\nfunction ValueContainer(props: ValueContainerProps) {\n\treturn (\n\t\t
\n\t\t\t{props.children}\n\t\t
\n\t);\n}\n\n// function MultiValue(props: MultiValueProps) {\n// \treturn (\n// \t\t}\n// \t\t/>\n// \t);\n// }\n\nfunction Menu(props: MenuProps) {\n\treturn (\n\t\t\n\t\t\t{props.children}\n\t\t\n\t);\n}\n\nfunction MenuList(props: any) {\n\tconst calculateHeight = (childrenCount: number) => {\n\t\tlet height = childrenCount * 50;\n\n\t\tif (height > 300) height = 300;\n\n\t\tif (height === 0) height = 50;\n\n\t\treturn height;\n\t};\n\n\t// console.log(\"MenuList\", props, props.children.length);\n\n\treturn (\n\t\t {\n\t\t\t\treturn (\n\t\t\t\t\t
\n\t\t\t\t\t\t{props.children[param.index]}\n\t\t\t\t\t
\n\t\t\t\t);\n\t\t\t}}\n\t\t/>\n\t);\n}\n\nconst components = {\n\tControl,\n\tMenu,\n\tNoOptionsMessage,\n\tOption,\n\tPlaceholder,\n\tSingleValue,\n\tValueContainer,\n\tMenuList\n};\n\ninterface LocalState {\n\tselectedMetric: ValueType | undefined;\n\tmetrics: OptionType[];\n}\n\ninterface LocalProps {\n\tonChanged: (metric: ChartMetric) => void;\n\tclusterName: string;\n}\n\ntype Props = LocalProps &\n\tWithStyles &\n\tWithTheme &\n\tHTMLAttributes;\n\nclass Autocomplete extends React.PureComponent {\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\tselectedMetric: undefined,\n\t\t\tmetrics: AVAILABLE_METRICS.map((metric: any) => ({\n\t\t\t\tvalue: metric.name,\n\t\t\t\tlabel: metric.table\n\t\t\t}))\n\t\t};\n\t}\n\n\t// fetchMetrics = () => {\n\t// \tlet promQLFilters: string[] = [`gmd_cluster=\"${this.props.clusterName}\"`];\n\t//\n\t// \tconst promQLFilter = promQLFilters && `{${promQLFilters.join(\",\")}}`;\n\t//\n\t// \tAxios.get(\n\t// \t\t`${Config.prometheus_url}\n\t// \t\t/api/v1/targets/metadata?match_target=${promQLFilter}`\n\t// \t)\n\t// \t\t.then((response: AxiosResponse) => {\n\t// \t\t\tconsole.log(\"metricsSet response\", response);\n\t//\n\t// \t\t\tlet metricsSet: Set = new Set();\n\t// \t\t\tlet metrics: any[] = [];\n\t//\n\t// \t\t\tconst data = response.data.data;\n\t//\n\t// \t\t\tdata.forEach((metricMeta: any) => {\n\t// \t\t\t\tif (\n\t// \t\t\t\t\t!metricsSet.has(metricMeta.metric) &&\n\t// \t\t\t\t\t(metricMeta.metric.startsWith(\"mysql\") ||\n\t// \t\t\t\t\t\tmetricMeta.metric.startsWith(\"node\"))\n\t// \t\t\t\t) {\n\t// \t\t\t\t\tmetricsSet.add(metricMeta.metric);\n\t// \t\t\t\t\tmetrics.push(metricMeta);\n\t// \t\t\t\t}\n\t// \t\t\t});\n\t//\n\t// \t\t\tconst sortedMetrics = metrics.sort((a: any, b: any) => {\n\t// \t\t\t\tif (a.metric < b.metric) {\n\t// \t\t\t\t\treturn -1;\n\t// \t\t\t\t}\n\t// \t\t\t\tif (a.metric > b.metric) {\n\t// \t\t\t\t\treturn 1;\n\t// \t\t\t\t}\n\t// \t\t\t\treturn 0;\n\t// \t\t\t});\n\t//\n\t// \t\t\tsortedMetrics &&\n\t// \t\t\t\tthis.setState({\n\t// \t\t\t\t\tmetrics: sortedMetrics.map((metric: any) => ({\n\t// \t\t\t\t\t\tvalue: metric.metric,\n\t// \t\t\t\t\t\tlabel: metric.help\n\t// \t\t\t\t\t}))\n\t// \t\t\t\t});\n\t// \t\t})\n\t// \t\t.catch((err: AxiosError) => {\n\t// \t\t\tconsole.error(\"Failed to fetch Prometheus target metadata:\", err);\n\t// \t\t});\n\t// };\n\n\tfilter = createFilter({\n\t\tstringify: (obj: any) => {\n\t\t\treturn obj.data.value.replace(\"node_\", \"host_\");\n\t\t}\n\t});\n\n\tselectStyles = {\n\t\tinput: (base: CSSProperties) => ({\n\t\t\t...base,\n\t\t\tcolor: this.props.theme.palette.text.primary,\n\t\t\t\"& input\": {\n\t\t\t\tfont: \"inherit\"\n\t\t\t}\n\t\t})\n\t};\n\n\trender():\n\t\t| React.ReactElement\n\t\t| string\n\t\t| number\n\t\t| {}\n\t\t| React.ReactNodeArray\n\t\t| React.ReactPortal\n\t\t| boolean\n\t\t| null\n\t\t| undefined {\n\t\tconst { classes } = this.props;\n\t\tconst { selectedMetric, metrics } = this.state;\n\n\t\tconst handleChangeSingle = (value: ValueType) => {\n\t\t\tconst selectedValue = value as OptionType;\n\t\t\tthis.setState({ selectedMetric: value });\n\t\t\tselectedValue &&\n\t\t\t\tthis.props.onChanged({\n\t\t\t\t\tname: selectedValue.value,\n\t\t\t\t\ttable: selectedValue.label\n\t\t\t\t});\n\t\t};\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t{metrics && (\n\t\t\t\t\t {\n\t\t\t\t\t\t// \treturn \"No options...\";\n\t\t\t\t\t\t// }}\n\t\t\t\t\t\tplaceholder={`Search ${metrics.length} metrics...`}\n\t\t\t\t\t\toptions={metrics}\n\t\t\t\t\t\tcomponents={components}\n\t\t\t\t\t\tvalue={selectedMetric}\n\t\t\t\t\t\tonChange={handleChangeSingle}\n\t\t\t\t\t\tgetOptionLabel={(option: OptionType) => {\n\t\t\t\t\t\t\treturn option.value;\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tfilterOption={this.filter}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t
\n\t\t);\n\t}\n}\n\nexport default withStyles(styles, { withTheme: true })(Autocomplete);\n","import { Theme } from \"@mui/material\";\nimport createStyles from '@mui/styles/createStyles';\nimport { emphasize } from \"@mui/material/styles\";\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\troot: {\n\t\t\t// width: \"100%\",\n\t\t\tflexGrow: 1,\n\t\t\tminWidth: 290\n\t\t},\n\t\tinput: {\n\t\t\tdisplay: \"flex\",\n\t\t\tpadding: 0,\n\t\t\theight: \"auto\"\n\t\t},\n\t\tvalueContainer: {\n\t\t\tdisplay: \"flex\",\n\t\t\tflexWrap: \"wrap\",\n\t\t\tflex: 1,\n\t\t\talignItems: \"center\",\n\t\t\toverflow: \"hidden\"\n\t\t},\n\t\tchip: {\n\t\t\tmargin: theme.spacing(0.5, 0.25)\n\t\t},\n\t\tchipFocused: {\n\t\t\tbackgroundColor: emphasize(\n\t\t\t\ttheme.palette.mode === \"light\"\n\t\t\t\t\t? theme.palette.grey[300]\n\t\t\t\t\t: theme.palette.grey[700],\n\t\t\t\t0.08\n\t\t\t)\n\t\t},\n\t\tnoOptionsMessage: {\n\t\t\tpadding: theme.spacing(1, 2)\n\t\t},\n\t\tsingleValue: {\n\t\t\tfontSize: 16\n\t\t},\n\t\tplaceholder: {\n\t\t\tposition: \"absolute\",\n\t\t\tleft: 2,\n\t\t\tbottom: 6,\n\t\t\tfontSize: 16\n\t\t},\n\t\tpaper: {\n\t\t\tposition: \"absolute\",\n\t\t\tzIndex: 2,\n\t\t\tmarginTop: theme.spacing(1),\n\t\t\tleft: 0,\n\t\t\tright: 0\n\t\t},\n\t\tdivider: {\n\t\t\theight: theme.spacing(2)\n\t\t}\n\t});\n","import React, { ChangeEvent } from \"react\";\nimport { WithStyles, WithTheme } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { styles } from \"./styles\";\nimport {\n\tButton,\n\tButtonGroup,\n\tDialog,\n\tDialogActions,\n\tDialogContent,\n\tDialogTitle,\n\tGrid,\n\tTextField,\n\tTypography\n} from \"@mui/material\";\nimport TimeSeriesChartComponent from \"components/monitoring/charts/timeSeries/TimeSeriesChartComponent\";\nimport { Cluster } from \"pages/management/cluster/types\";\nimport { Node } from \"pages/management/node/types\";\nimport Autocomplete from \"components/monitoring/dashboard/AddElement/Autocomplete/Autocomplete\";\nimport { AGGREGATION, Chart } from \"components/monitoring/dashboard/types\";\nimport { ChartMetric } from \"components/monitoring/charts/const\";\n\ninterface LocalState {\n\tchart: Chart;\n}\n\ninterface LocalProps {\n\tisOpen: boolean;\n\tonCancelClick: () => void;\n\tonAddClick: (chart: Chart) => void;\n\tcluster: Cluster;\n\tnode?: Node;\n}\n\ntype Props = LocalProps & WithStyles & WithTheme;\n\nclass AddElement extends React.PureComponent {\n\tdefaultState: LocalState = {\n\t\tchart: {\n\t\t\tid: \"\", // overridden on adding chart to dashboard\n\t\t\tposition: 0, // overridden on adding chart to dashboard\n\t\t\ttitle: \"\",\n\t\t\tmetric: {\n\t\t\t\tname: \"\",\n\t\t\t\ttable: \"\"\n\t\t\t},\n\t\t\taggregation: AGGREGATION.RAW,\n\t\t\tdataScaling: 1\n\t\t}\n\t};\n\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tthis.state = this.defaultState;\n\t}\n\n\trender() {\n\t\tconst { isOpen, cluster, theme } = this.props;\n\t\tconst { chart } = this.state;\n\n\t\tconst renderDialog = () => (\n\t\t\t<>\n\t\t\t\t{/*Mobile*/}\n\t\t\t\t {\n\t\t\t\t\t\tif (reason === \"escapeKeyDown\") {\n\t\t\t\t\t\t\tthis.props.onCancelClick();\n\t\t\t\t\t\t\tthis.setState(this.defaultState);\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tfullWidth={true}\n\t\t\t\t\tfullScreen={true}\n\t\t\t\t\taria-labelledby=\"form-dialog-title\"\n\t\t\t\t>\n\t\t\t\t\t{isOpen && dialogContentRender()}\n\t\t\t\t\n\n\t\t\t\t{/*Desktop*/}\n\t\t\t\t {\n\t\t\t\t\t\tif (reason === \"escapeKeyDown\") {\n\t\t\t\t\t\t\tthis.props.onCancelClick();\n\t\t\t\t\t\t\tthis.setState(this.defaultState);\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tfullWidth={true}\n\t\t\t\t\tmaxWidth={\"sm\"}\n\t\t\t\t\taria-labelledby=\"form-dialog-title\"\n\t\t\t\t>\n\t\t\t\t\t{isOpen && dialogContentRender()}\n\t\t\t\t\n\t\t\t\n\t\t);\n\n\t\tconst dialogContentRender = () => (\n\t\t\t<>\n\t\t\t\tAdd chart\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\t\tevent.persist();\n\t\t\t\t\t\t\t\t\tconsole.log(\"onTitleChange\", event);\n\n\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => {\n\t\t\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\t\tchart: {\n\t\t\t\t\t\t\t\t\t\t\t\t...state.chart,\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: event.target.value as string\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tconsole.log(\"onChanged\", metric);\n\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\tchart: {\n\t\t\t\t\t\t\t\t\t\t\t...state.chart,\n\t\t\t\t\t\t\t\t\t\t\tmetric\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\tchart: {\n\t\t\t\t\t\t\t\t\t\t\t\t...state.chart,\n\t\t\t\t\t\t\t\t\t\t\t\taggregation: AGGREGATION.RAW\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tRaw\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\tchart: {\n\t\t\t\t\t\t\t\t\t\t\t\t...state.chart,\n\t\t\t\t\t\t\t\t\t\t\t\taggregation: AGGREGATION.DIFFERENTIAL\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tDifferential\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\t\t\tevent.persist();\n\t\t\t\t\t\t\t\t\t\tconsole.log(\"onUnitChange\", event);\n\n\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => {\n\t\t\t\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\t\t\tchart: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t...state.chart,\n\t\t\t\t\t\t\t\t\t\t\t\t\tunit: event.target.value as string\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\t\t\tevent.persist();\n\t\t\t\t\t\t\t\t\t\tconsole.log(\"onUnitChange\", event);\n\n\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => {\n\t\t\t\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\t\t\tchart: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t...state.chart,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdataScaling: parseFloat(event.target.value) || 1\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\t\t\tevent.persist();\n\t\t\t\t\t\t\t\t\t\tconsole.log(\"onYAxisMaxChange\", event);\n\n\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => {\n\t\t\t\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\t\t\tchart: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t...state.chart,\n\t\t\t\t\t\t\t\t\t\t\t\t\tyAxisMax: parseFloat(event.target.value)\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPreview\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tthis.props.onCancelClick();\n\t\t\t\t\t\t\tthis.setState(this.defaultState);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tCancel\n\t\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tthis.props.onAddClick(chart);\n\t\t\t\t\t\t\tthis.setState(this.defaultState);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tAdd\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\n\t\treturn <>{renderDialog()};\n\t}\n}\n\nexport default withStyles(styles, { withTheme: true })(AddElement);\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from '@mui/styles/createStyles';\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\troot: {\n\t\t\twidth: \"100%\",\n\t\t\theight: 900\n\t\t},\n\t\tautocomplete: {\n\t\t\twidth: \"100%\"\n\t\t}\n\t});\n","import { Close } from \"@mui/icons-material\";\nimport { IconButton, Tooltip } from \"@mui/material\";\nimport { WithStyles } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Component } from \"react\";\nimport { styles } from \"./styles\";\n\ninterface LocalState {}\n\ninterface LocalProps {\n\tonRemoveClick?: () => void;\n}\n\ntype Props = LocalProps & WithStyles;\n\nclass ChartActionsComponent extends Component {\n\trender() {\n\t\tconst { classes, onRemoveClick } = this.props;\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tconsole.log(\"onRemoveClick\");\n\t\t\t\t\t\t\tonRemoveClick && onRemoveClick();\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t}\n}\n\nexport default withStyles(styles, { withTheme: true })(ChartActionsComponent);\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from \"@mui/styles/createStyles\";\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\troot: {\n\t\t\tposition: \"absolute\",\n\t\t\ttop: 0,\n\t\t\tright: 0,\n\t\t\tzIndex: 2\n\t\t},\n\t\tformControl: {\n\t\t\tmarginTop: 0,\n\t\t\tmarginRight: theme.spacing(1)\n\t\t},\n\t\tselectOption: {\n\t\t\tminHeight: 25\n\t\t}\n\t});\n","import { Dashboard } from \"components/monitoring/dashboard/types\";\nimport {\n\tDASHBOARD_ACTION,\n\tDashboardGetFailedAction,\n\tDashboardGetSuccessAction,\n\tDashboardSaveAction,\n\tDashboardSaveFailedAction,\n\tDashboardSaveSuccessAction\n} from \"store/dashboard/types\";\n\n// export const dashboardGet = (): DashboardGetAction => ({\n// \ttype: DASHBOARD_ACTION.GET\n// });\n\nexport const dashboardGetSuccess = (\n\tdashboards: Dashboard[]\n): DashboardGetSuccessAction => ({\n\ttype: DASHBOARD_ACTION.GET_SUCCESS,\n\tpayload: {\n\t\tdashboards\n\t}\n});\n\nexport const dashboardGetFailed = (\n\terrorMsg: string\n): DashboardGetFailedAction => ({\n\ttype: DASHBOARD_ACTION.GET_FAILED,\n\tpayload: {\n\t\terrorMsg\n\t}\n});\n\nexport const dashboardSave = (dashboard: Dashboard): DashboardSaveAction => ({\n\ttype: DASHBOARD_ACTION.SAVE,\n\tpayload: {\n\t\tdashboard\n\t}\n});\n\nexport const dashboardSaveSuccess = (\n\tdashboards: Dashboard[]\n): DashboardSaveSuccessAction => ({\n\ttype: DASHBOARD_ACTION.SAVE_SUCCESS,\n\tpayload: {\n\t\tdashboards\n\t}\n});\n\nexport const dashboardSaveFailed = (\n\terrorMsg: string\n): DashboardSaveFailedAction => ({\n\ttype: DASHBOARD_ACTION.SAVE_FAILED,\n\tpayload: {\n\t\terrorMsg\n\t}\n});\n","import { AppState } from \"AppState\";\nimport { Dashboard } from \"components/monitoring/dashboard/types\";\nimport DashboardUtils from \"components/monitoring/dashboard/utils\";\n\nexport const dashboardsSelector = (state: AppState): Map =>\n\tstate.dashboard.dashboards;\n\nexport const dashboardSelector = (\n\tstate: AppState,\n\tdashboardName: string\n): Dashboard => {\n\tconst dashboards = state.dashboard.dashboards;\n\tconst dashboard = dashboards.get(dashboardName);\n\n\tif (dashboard) {\n\t\treturn dashboard;\n\t} else {\n\t\treturn DashboardUtils.getDefaultConfiguration(dashboardName);\n\t}\n};\n\nexport const dashboardSaveInProgressSelector = (state: AppState): boolean =>\n\tstate.dashboard.saveInProgress;\n\nexport const dashboardSaveErrorMsgSelector = (\n\tstate: AppState\n): string | undefined => state.dashboard.saveErrorMsg;\n","import { MoreVert } from \"@mui/icons-material\";\nimport {\n\tButton,\n\tFormControl,\n\tGrid,\n\tIconButton,\n\tListItemIcon,\n\tListItemText,\n\tMenuItem,\n\tSelect\n} from \"@mui/material\";\nimport Menu from \"@mui/material/Menu\";\nimport { WithStyles } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { AppState } from \"AppState\";\nimport { Cluster } from \"pages/management/cluster/types\";\nimport { Node } from \"pages/management/node/types\";\nimport TimeSeriesChartComponent from \"components/monitoring/charts/timeSeries/TimeSeriesChartComponent\";\nimport AddElement from \"components/monitoring/dashboard/AddElement/AddElement\";\nimport ChartActionsComponent from \"components/monitoring/dashboard/ChartActions/ChartActionsComponent\";\nimport { DASHBOARD_PERIOD_SELECT_OPTIONS } from \"components/monitoring/dashboard/const\";\nimport {\n\tChart,\n\tDashboard,\n\tDASHBOARD_TILE_SIZE,\n\tDashboardConfig\n} from \"components/monitoring/dashboard/types\";\nimport DashboardUtils from \"components/monitoring/dashboard/utils\";\nimport elementResizeDetectorMaker from \"element-resize-detector\";\nimport { isEqual } from \"lodash\";\nimport { ChartLine, Download, Pencil, Plus } from \"mdi-material-ui\";\nimport { Component } from \"react\";\nimport { dashboardSave } from \"store/dashboard/actions\";\nimport {\n\tdashboardSaveErrorMsgSelector,\n\tdashboardSaveInProgressSelector,\n\tdashboardSelector\n} from \"store/dashboard/selectors\";\nimport GridLayout, { Layout } from \"react-grid-layout\";\nimport \"react-grid-layout/css/styles.css\";\nimport \"react-resizable/css/styles.css\";\nimport { connect } from \"react-redux\";\nimport { v4 as uuid } from \"uuid\";\nimport { styles } from \"./styles\";\n\nimport \"./styles.css\";\n\ninterface LocalState {\n\tdragInProgress: boolean;\n\tisAddElementDialogOpen: boolean;\n\twidth: number;\n\tmenuTarget?: any;\n\tisEditEnabled: boolean;\n\ttemporaryDashboard?: Dashboard;\n}\n\nexport interface LocalProps {\n\tcluster: Cluster;\n\tnode?: Node;\n}\n\ninterface ReduxProps {\n\tdashboard: Dashboard;\n}\n\ninterface ReduxDispatch {\n\tsaveDashboard: (dashboard: Dashboard) => void;\n}\n\ntype Props = LocalProps &\n\tWithStyles &\n\tReduxProps &\n\tReduxDispatch;\n\nclass DashboardComponent extends Component {\n\t_isMounted: boolean = false;\n\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\twidth: 1000,\n\t\t\tdragInProgress: false,\n\t\t\tisAddElementDialogOpen: false,\n\t\t\tisEditEnabled: false\n\t\t};\n\t}\n\n\tcomponentDidMount(): void {\n\t\tthis._isMounted = true;\n\n\t\tconst elementResizeDetector = elementResizeDetectorMaker({\n\t\t\tstrategy: \"scroll\" //<- For ultra performance.\n\t\t});\n\n\t\tconst monitoringPageContainer = document.getElementById(\n\t\t\t\"MonitoringPageContainer\"\n\t\t);\n\n\t\tif (monitoringPageContainer) {\n\t\t\t// listener for handling dashboard width change\n\t\t\telementResizeDetector.listenTo(\n\t\t\t\tmonitoringPageContainer,\n\t\t\t\t(element: HTMLElement) => {\n\t\t\t\t\tconst width = element.offsetWidth;\n\t\t\t\t\tif (this.state.width !== width) {\n\t\t\t\t\t\t// console.log(\"Size:\" + width);\n\t\t\t\t\t\tthis.setState(\n\t\t\t\t\t\t\t(state: LocalState): LocalState => ({\n\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\twidth\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}\n\n\tcomponentWillUnmount(): void {\n\t\tthis._isMounted = false;\n\t}\n\n\tcomponentDidUpdate(\n\t\tprevProps: Readonly,\n\t\tprevState: Readonly,\n\t\tsnapshot?: any\n\t) {\n\t\t// if cluster or node changed, discard changes\n\t\tif (\n\t\t\t!isEqual(prevProps.cluster, this.props.cluster) ||\n\t\t\t!isEqual(prevProps.node, this.props.node)\n\t\t) {\n\t\t\tthis.discardChanges();\n\t\t}\n\t}\n\n\tonConfigChanged(config: Partial, isEditEnabled: boolean) {\n\t\tif (isEditEnabled) {\n\t\t\tthis.setState((state: LocalState) => {\n\t\t\t\tif (state.temporaryDashboard) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttemporaryDashboard: {\n\t\t\t\t\t\t\t...state.temporaryDashboard,\n\t\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\t\t...state.temporaryDashboard.config,\n\t\t\t\t\t\t\t\t...config\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\tconsole.warn(\"No temporary dashboard. Something went wrong...\");\n\t\t\t\t\treturn {};\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tthis.saveDashboard({\n\t\t\t\t...this.props.dashboard,\n\t\t\t\tconfig: {\n\t\t\t\t\t...this.props.dashboard.config,\n\t\t\t\t\t...config\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tsaveDashboard(dashboard: Dashboard) {\n\t\tconsole.log(\"saveDashboard\", dashboard);\n\n\t\tthis.props.saveDashboard(dashboard);\n\t}\n\n\tdiscardChanges() {\n\t\tthis.setState({\n\t\t\tisEditEnabled: false,\n\t\t\ttemporaryDashboard: undefined\n\t\t});\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tisAddElementDialogOpen,\n\t\t\twidth,\n\t\t\tmenuTarget,\n\t\t\tisEditEnabled,\n\t\t\ttemporaryDashboard\n\t\t} = this.state;\n\n\t\tconst { classes, cluster, node, dashboard: storedDashboard } = this.props;\n\n\t\tconst dashboard = temporaryDashboard || storedDashboard;\n\t\t// console.log(dashboard);\n\n\t\tconst { columns, rowHeight } = DashboardUtils.getGridSize(\n\t\t\tdashboard.config.tileSize\n\t\t);\n\n\t\tconst moreMenu = (\n\t\t\t<>\n\t\t\t\t {\n\t\t\t\t\t\tthis.setState({ menuTarget: event.target });\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t {\n\t\t\t\t\t\tthis.setState({ menuTarget: null });\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t {\n\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\tisAddElementDialogOpen: true,\n\t\t\t\t\t\t\t\tmenuTarget: null\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\tisEditEnabled: true,\n\t\t\t\t\t\t\t\ttemporaryDashboard: { ...storedDashboard },\n\t\t\t\t\t\t\t\tmenuTarget: null\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tthis.onConfigChanged(\n\t\t\t\t\t\t\t\t{ tileSize: DASHBOARD_TILE_SIZE.SMALL },\n\t\t\t\t\t\t\t\tisEditEnabled\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tthis.onConfigChanged(\n\t\t\t\t\t\t\t\t{ tileSize: DASHBOARD_TILE_SIZE.MEDIUM },\n\t\t\t\t\t\t\t\tisEditEnabled\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tthis.onConfigChanged(\n\t\t\t\t\t\t\t\t{ tileSize: DASHBOARD_TILE_SIZE.LARGE },\n\t\t\t\t\t\t\t\tisEditEnabled\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\t {\n\t\t\t\t\t\t\tconst file = new Blob([JSON.stringify(dashboard)], {\n\t\t\t\t\t\t\t\ttype: \"application/text\"\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tlet a = document.createElement(\"a\");\n\t\t\t\t\t\t\ta.href = URL.createObjectURL(file);\n\t\t\t\t\t\t\ta.download = `${dashboard.name}.json`;\n\t\t\t\t\t\t\ta.click();\n\n\t\t\t\t\t\t\ta.remove();\n\n\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\tmenuTarget: null\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t {\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tisAddElementDialogOpen: false\n\t\t\t\t\t\t});\n\t\t\t\t\t}}\n\t\t\t\t\tonAddClick={(chart: Chart) => {\n\t\t\t\t\t\t// console.log(\"onAddClick\", chart);\n\n\t\t\t\t\t\tconst newChart: Chart = {\n\t\t\t\t\t\t\t...chart,\n\t\t\t\t\t\t\ttitle: chart.title || chart.metric.name,\n\t\t\t\t\t\t\tid: uuid(),\n\t\t\t\t\t\t\tposition: dashboard.config.charts.length\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t// console.log(\"newChart\", newChart);\n\n\t\t\t\t\t\tconst charts = [...dashboard.config.charts, newChart];\n\n\t\t\t\t\t\tthis.onConfigChanged({ charts }, isEditEnabled);\n\t\t\t\t\t\tthis.setState({ isAddElementDialogOpen: false });\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{isEditEnabled ? (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\tthis.discardChanges();\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tDiscard changes\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\t\t\tisEditEnabled: false,\n\t\t\t\t\t\t\t\t\t\t\t\ttemporaryDashboard: undefined\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\tthis.saveDashboard(dashboard);\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = event.target.value as string;\n\t\t\t\t\t\t\t\t\t\t\t\t\t// this.onPeriodChange(value);\n\t\t\t\t\t\t\t\t\t\t\t\t\tconsole.log(\"onPeriodChange\", value);\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.onConfigChanged(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ period: value },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tisEditEnabled\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{DASHBOARD_PERIOD_SELECT_OPTIONS.map(\n\t\t\t\t\t\t\t\t\t\t\t\t\t(option: string) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{`Last ${option}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t{moreMenu}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tconst coordinates = DashboardUtils.getCoordinates(\n\t\t\t\t\t\t\t\t\tdashboard.config.tileSize,\n\t\t\t\t\t\t\t\t\tchart.position\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t// console.log(\"chart layout\", chart.position, layout);\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\t...coordinates,\n\t\t\t\t\t\t\t\t\ti: chart.id\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\tcols={columns}\n\t\t\t\t\t\t\trowHeight={rowHeight}\n\t\t\t\t\t\t\twidth={width}\n\t\t\t\t\t\t\tmargin={[0, 0]}\n\t\t\t\t\t\t\tonLayoutChange={(layout: Layout[]) => {\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tdashboard.config.charts.length !== layout.length ||\n\t\t\t\t\t\t\t\t\t!isEditEnabled\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// console.log(\"dash\", dashboard);\n\t\t\t\t\t\t\t\t// console.log(\"layout updated\", layout);\n\n\t\t\t\t\t\t\t\tlet changed = false;\n\n\t\t\t\t\t\t\t\tconst updatedCharts = dashboard.config.charts.map(\n\t\t\t\t\t\t\t\t\t(chart: Chart) => {\n\t\t\t\t\t\t\t\t\t\tconst chartLayout = layout.find(\n\t\t\t\t\t\t\t\t\t\t\t(layout: Layout) => layout.i === chart.id\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\tif (chartLayout) {\n\t\t\t\t\t\t\t\t\t\t\tconst newPosition = DashboardUtils.getChartPosition(\n\t\t\t\t\t\t\t\t\t\t\t\tchartLayout,\n\t\t\t\t\t\t\t\t\t\t\t\tdashboard.config.tileSize\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t\tchanged = changed || chart.position !== newPosition;\n\n\t\t\t\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\t\t\t\t...chart,\n\t\t\t\t\t\t\t\t\t\t\t\tposition: newPosition\n\t\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\treturn chart;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t// update charts in state if any position changed\n\t\t\t\t\t\t\t\tif (changed) {\n\t\t\t\t\t\t\t\t\tconsole.log(\"updating\");\n\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\ttemporaryDashboard: {\n\t\t\t\t\t\t\t\t\t\t\t...dashboard,\n\t\t\t\t\t\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\t\t\t\t\t\t...dashboard.config,\n\t\t\t\t\t\t\t\t\t\t\t\tcharts: updatedCharts\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonDragStart={() => {\n\t\t\t\t\t\t\t\tthis.setState(\n\t\t\t\t\t\t\t\t\t(state: LocalState): LocalState => ({\n\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\tdragInProgress: true\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonDragStop={() => {\n\t\t\t\t\t\t\t\tthis.setState(\n\t\t\t\t\t\t\t\t\t(state: LocalState): LocalState => ({\n\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\tdragInProgress: false\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{dashboard.config.charts.map((chart: Chart) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t{isEditEnabled && (\n\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconsole.log(\"on remove click\");\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst charts = dashboard.config.charts.filter(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t(c: Chart) => c.id !== chart.id\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.onConfigChanged({ charts }, isEditEnabled);\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\n// REDUX MAPPINGS\nconst mapGlobalStateToProps = (state: AppState, props: LocalProps) => {\n\treturn {\n\t\tdashboard: dashboardSelector(\n\t\t\tstate,\n\t\t\tDashboardUtils.getDashboardName(props.cluster, props.node)\n\t\t),\n\t\tisSaveInProgress: dashboardSaveInProgressSelector(state),\n\t\tsaveErrorMsg: dashboardSaveErrorMsgSelector(state)\n\t};\n};\n\nconst mapGlobalDispatchToProps = (dispatch: any) => {\n\treturn {\n\t\tsaveDashboard: (dashboard: Dashboard) => {\n\t\t\tdispatch(dashboardSave(dashboard));\n\t\t}\n\t};\n};\n\nexport default withStyles(styles, { withTheme: true })(\n\tconnect(mapGlobalStateToProps, mapGlobalDispatchToProps)(DashboardComponent)\n);\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from '@mui/styles/createStyles';\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\ttoolbar: {\n\t\t\tmarginBottom: theme.spacing(2)\n\t\t},\n\t\tformControl: {\n\t\t\tmarginTop: theme.spacing(1),\n\t\t\tmarginRight: theme.spacing(2)\n\t\t},\n\t\tselectMenu: {\n\t\t\tpaddingTop: 2,\n\t\t\tpaddingBottom: 2,\n\t\t\tpaddingRight: 27\n\t\t},\n\t\tselectOption: {\n\t\t\tminHeight: 25\n\t\t}\n\t});\n","import { Badge, Theme } from \"@mui/material\";\n\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\n\nexport const BlinkingBadge = withStyles((theme: Theme) =>\n\tcreateStyles({\n\t\tbadge: {\n\t\t\t\"&::after\": {\n\t\t\t\tposition: \"absolute\",\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 0,\n\t\t\t\twidth: \"100%\",\n\t\t\t\theight: \"100%\",\n\t\t\t\tborderRadius: \"50%\",\n\t\t\t\tanimation: \"$ripple 1.2s infinite ease-in-out\",\n\t\t\t\tborder: \"1px solid\",\n\t\t\t\tborderColor: theme.palette.primary.main,\n\t\t\t\tcontent: '\"\"'\n\t\t\t}\n\t\t},\n\t\t\"@keyframes ripple\": {\n\t\t\t\"0%\": {\n\t\t\t\ttransform: \"scale(.8)\",\n\t\t\t\topacity: 1\n\t\t\t},\n\t\t\t\"100%\": {\n\t\t\t\ttransform: \"scale(2.4)\",\n\t\t\t\topacity: 0\n\t\t\t}\n\t\t}\n\t})\n)(Badge);\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from \"@mui/styles/createStyles\";\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\tflexContainer: {\n\t\t\tdisplay: \"flex\",\n\t\t\talignItems: \"center\",\n\t\t\tboxSizing: \"border-box\"\n\t\t},\n\t\ttableRow: {\n\t\t\tcursor: \"pointer\"\n\t\t},\n\t\ttableRowHover: {\n\t\t\t\"&:hover\": {\n\t\t\t\tbackgroundColor: theme.palette.grey[200]\n\t\t\t}\n\t\t},\n\t\ttableCell: {\n\t\t\tflex: 1,\n\t\t\ttextOverflow: \"ellipsis\",\n\t\t\twhiteSpace: \"nowrap\",\n\t\t\toverflow: \"hidden\",\n\t\t\tfontSize: \"small\",\n\t\t\tfontFamily: \"monospace\"\n\t\t},\n\t\tnoClick: {\n\t\t\tcursor: \"initial\"\n\t\t},\n\n\t\tlogContent: {\n\t\t\tbackgroundColor: \"black\",\n\t\t\tcolor: \"white\",\n\t\t\toverflow: \"auto\",\n\t\t\tpadding: 5\n\t\t},\n\t\tlogMessagesTypography: {\n\t\t\tfontSize: \"0.7em\",\n\t\t\tfontFamily: \"monospace\",\n\t\t\twhiteSpace: \"break-spaces\"\n\t\t},\n\t\tgaleraManagerLogMessage: {\n\t\t\tcolor: theme.palette.primary.main\n\t\t},\n\t\tlogInfoTypography: {\n\t\t\tfontFamily: \"monospace\"\n\t\t},\n\t\twarningLog: {\n\t\t\tcolor: theme.palette.warning.main\n\t\t},\n\t\terrorLog: {\n\t\t\tcolor: theme.palette.error.main\n\t\t},\n\t\ttoolbar: {\n\t\t\tmarginBottom: 0,\n\t\t\tpaddingLeft: theme.spacing(1),\n\t\t\tpaddingRight: theme.spacing(2)\n\t\t},\n\t\tformControl: {\n\t\t\tmarginTop: 0,\n\t\t\tmarginBottom: 0,\n\t\t\tmarginRight: theme.spacing(2)\n\t\t},\n\t\tselectOption: {\n\t\t\tminHeight: 25\n\t\t},\n\t\texpansionPanelExpanded: {\n\t\t\tmarginBottom: \"0!important\"\n\t\t}\n\t});\n","import { Grid, Typography } from \"@mui/material\";\nimport React from \"react\";\nimport { LogLine } from \"components/logViewer/types\";\nimport { styles } from \"components/logViewer/styles\";\nimport { WithStyles } from '@mui/styles';\nimport withStyles from '@mui/styles/withStyles';\nimport moment from \"moment\";\n\ninterface LocalProps {\n\tlogLine: LogLine;\n\tshowNodeName?: boolean;\n}\n\ntype Props = LocalProps & WithStyles;\n\nclass LogMessage extends React.Component {\n\tcomponentDidUpdate(\n\t\tprevProps: Readonly,\n\t\tprevState: Readonly,\n\t\tsnapshot?: any\n\t): void {\n\t\tconsole.log(\"componentDidUpdate\");\n\t}\n\n\tshouldComponentUpdate(\n\t\tnextProps: Readonly,\n\t\tnextState: Readonly,\n\t\tnextContext: any\n\t): boolean {\n\t\treturn (\n\t\t\tthis.props.logLine._logLineHash !== nextProps.logLine._logLineHash ||\n\t\t\tthis.props.showNodeName !== nextProps.showNodeName\n\t\t);\n\t}\n\n\trender():\n\t\t| React.ReactElement>\n\t\t| string\n\t\t| number\n\t\t| {}\n\t\t| React.ReactNodeArray\n\t\t| React.ReactPortal\n\t\t| boolean\n\t\t| null\n\t\t| undefined {\n\t\tconst { logLine, showNodeName, classes } = this.props;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t{`${moment(logLine.time).format(\"MMM DD, YYYY HH:mm:ss\")} | ${\n\t\t\t\t\t\tshowNodeName ? logLine.node_name + \" | \" : \"\"\n\t\t\t\t\t}${logLine.fpath} | ${logLine.message}`}\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default withStyles(styles)(LogMessage);\n","import { Expression, InfluxDB, IResults } from \"influx\";\nimport moment from \"moment\";\nimport {\n\tINFLUX_DATABASE_NAME,\n\tLOG_FETCH_PAGE_SIZE\n} from \"components/logViewer/const\";\nimport { Config } from \"services/config/Config\";\nimport { LogLine } from \"components/logViewer/types\";\nimport { Node } from \"pages/management/node/types\";\nimport objectHash from \"object-hash\";\nimport { Cluster } from \"pages/management/cluster/types\";\nimport { Host } from \"pages/management/host/types\";\n\nexport default class LogViewerService {\n\tprivate static getInfluxInstance() {\n\t\treturn new InfluxDB({\n\t\t\tprotocol: Config.influx_protocol,\n\t\t\thost: Config.influx_host,\n\t\t\tport: Config.influx_port,\n\t\t\tusername: Config.influx_username,\n\t\t\tpassword: Config.influx_password,\n\t\t\tdatabase: INFLUX_DATABASE_NAME\n\t\t});\n\t}\n\n\tprivate static buildWhereStatementPaths(logPaths: string[]) {\n\t\tlet where = \"\";\n\n\t\tlogPaths.forEach((logPath: string, index: number) => {\n\t\t\tindex === 0\n\t\t\t\t? (where += new Expression()\n\t\t\t\t\t\t.field(\"fpath\")\n\t\t\t\t\t\t.equals.value(logPath)\n\t\t\t\t\t\t.toString())\n\t\t\t\t: (where +=\n\t\t\t\t\t\t\" \" +\n\t\t\t\t\t\tnew Expression().or\n\t\t\t\t\t\t\t.field(\"fpath\")\n\t\t\t\t\t\t\t.equals.value(logPath)\n\t\t\t\t\t\t\t.toString());\n\t\t});\n\n\t\treturn where;\n\t}\n\n\tprivate static buildWhereStatement(\n\t\tcluster: Cluster,\n\t\tnode?: Node,\n\t\thost?: Host\n\t): string {\n\t\tlet where =\n\t\t\t\"\" + new Expression().field(\"cluster_id\").equals.value(cluster.id);\n\n\t\tnode &&\n\t\t\t(where +=\n\t\t\t\t\"\" + new Expression().and.field(\"node_id\").equals.value(node.id));\n\n\t\thost &&\n\t\t\t(where +=\n\t\t\t\t\"\" + new Expression().and.field(\"host_id\").equals.value(host.id));\n\n\t\treturn where;\n\t}\n\n\tprivate static transformResponse(result: IResults): LogLine[] {\n\t\t// console.time(\"transformResponse\");\n\t\tconst res = result.map(\n\t\t\t(resultLine: any): LogLine => ({\n\t\t\t\t...resultLine,\n\t\t\t\t_logLineHash: objectHash(resultLine)\n\t\t\t})\n\t\t);\n\n\t\t// console.timeEnd(\"transformResponse\");\n\n\t\treturn res;\n\t}\n\n\tstatic async fetchBefore(\n\t\tlogPaths: string[],\n\t\tdateISOString: string,\n\t\tcluster: Cluster,\n\t\tnode?: Node,\n\t\thost?: Host\n\t): Promise {\n\t\tlet where = this.buildWhereStatementPaths(logPaths);\n\t\twhere += \" AND \" + this.buildWhereStatement(cluster, node, host);\n\n\t\twhere +=\n\t\t\t\" \" +\n\t\t\tnew Expression().and\n\t\t\t\t.field(\"time\")\n\t\t\t\t.lt.value(moment(dateISOString).toISOString());\n\n\t\t// console.log(\"fetch before\", where);\n\n\t\tconst response = await this.getInfluxInstance().query(\n\t\t\t`SELECT * FROM logs WHERE ${where} ORDER BY time DESC LIMIT ${LOG_FETCH_PAGE_SIZE}`\n\t\t);\n\n\t\treturn this.transformResponse(response);\n\t}\n\n\tstatic async fetchAfter(\n\t\tlogPaths: string[],\n\t\tdate: string,\n\t\tcluster: Cluster,\n\t\tnode?: Node,\n\t\thost?: Host\n\t): Promise {\n\t\tlet where = this.buildWhereStatementPaths(logPaths);\n\t\twhere += \" AND \" + this.buildWhereStatement(cluster, node, host);\n\n\t\twhere += \" \" + new Expression().and.field(\"time\").gt.value(date);\n\n\t\t// console.log(\"fetch after\", date, where);\n\n\t\tconst response = await this.getInfluxInstance().query(\n\t\t\t`SELECT * FROM logs WHERE ${where} ORDER BY time LIMIT ${LOG_FETCH_PAGE_SIZE}`\n\t\t);\n\n\t\treturn this.transformResponse(response);\n\t}\n\n\tstatic async fetchPaths(cluster: Cluster, node?: Node, host?: Host) {\n\t\tlet where = this.buildWhereStatement(cluster, node, host);\n\n\t\tconsole.log(\"query\", `// SELECT DISTINCT fpath FROM logs WHERE ${where};`);\n\n\t\treturn this.getInfluxInstance().query(\n\t\t\t`SELECT DISTINCT fpath FROM logs WHERE ${where};`\n\t\t);\n\t}\n}\n","import moment from \"moment\";\nimport { INanoDate, toNanoDate } from \"influx\";\nimport { Theme } from \"@mui/material/styles\";\n\nexport class Utils {\n\tstatic generateRandomStringArray(\n\t\tarrayLength: number,\n\t\tstringLength: number\n\t): string[] {\n\t\treturn [...Array(arrayLength)].map(() =>\n\t\t\t[...Array(~~stringLength)]\n\t\t\t\t.map(() => String.fromCharCode(Math.random() * (123 - 97) + 97))\n\t\t\t\t.join(\"\")\n\t\t);\n\t}\n\n\tstatic toNanoDate(date: Date): INanoDate {\n\t\treturn toNanoDate(`${moment(date).valueOf()}000000`);\n\t}\n\n\tstatic mergeStyles(...styles: any) {\n\t\treturn function CombineStyles(theme: Theme) {\n\t\t\tconst outStyles = styles.map((arg: any) => {\n\t\t\t\t// Apply the \"theme\" object for style functions.\n\t\t\t\tif (typeof arg === \"function\") {\n\t\t\t\t\treturn arg(theme);\n\t\t\t\t}\n\t\t\t\t// Objects need no change.\n\t\t\t\treturn arg;\n\t\t\t});\n\n\t\t\treturn outStyles.reduce((acc: any, val: any) => Object.assign(acc, val));\n\t\t};\n\t}\n}\n","import \"date-fns\";\nimport React from \"react\";\nimport { WithStyles } from '@mui/styles';\nimport withStyles from '@mui/styles/withStyles';\nimport { styles } from \"components/logViewer/styles\";\nimport {\n\tCheckbox,\n\tCircularProgress,\n\tAccordion,\n\tAccordionDetails,\n\tAccordionSummary,\n\tFormControlLabel,\n\tGrid,\n\tTypography\n} from \"@mui/material\";\nimport { LOG_FETCH_PAGE_SIZE } from \"components/logViewer/const\";\nimport LogMessage from \"components/logViewer/LogMessageComponent\";\nimport LogViewerService from \"components/logViewer/LogViewerService\";\nimport { LogLine } from \"components/logViewer/types\";\nimport moment from \"moment\";\nimport { Utils } from \"utils/utils\";\nimport { Node } from \"pages/management/node/types\";\nimport { ExpandMore } from \"@mui/icons-material\";\nimport { Cluster } from \"pages/management/cluster/types\";\nimport { Host } from \"pages/management/host/types\";\n\ninterface LocalState {\n\tlogs: any[];\n\tisLoadingMessagesBefore: boolean;\n\tisLoadingMessagesAfter: boolean;\n\tisLoadingLogPaths: boolean;\n\thasMessagesBefore: boolean;\n\thasMessagesAfter: boolean;\n\tdate: Date;\n\tavailableLogs: string[];\n\tselectedLogs: string[];\n}\n\ninterface LocalProps {\n\tcluster: Cluster;\n\tnode?: Node;\n\thost?: Host;\n}\n\ntype Props = LocalProps & WithStyles;\n\ninterface Snapshot {\n\thasClusterChanged: boolean;\n\thasNodeChanged: boolean;\n\thasDateChanged: boolean;\n\thasSelectedLogsChanged: boolean;\n}\n\nclass LogViewer extends React.Component {\n\tautoRefreshTimeout?: any;\n\t_isMounted: boolean = false;\n\n\tDEFAULT_STATE = {\n\t\tlogs: [],\n\t\thasMessagesBefore: true,\n\t\thasMessagesAfter: false,\n\t\tisLoadingMessagesBefore: false,\n\t\tisLoadingMessagesAfter: false,\n\t\tisLoadingLogPaths: true,\n\t\tdate: new Date(),\n\t\tavailableLogs: [],\n\t\tselectedLogs: []\n\t};\n\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tthis.state = { ...this.DEFAULT_STATE };\n\t}\n\n\tshouldComponentUpdate(\n\t\tnextProps: Readonly,\n\t\tnextState: Readonly,\n\t\tnextContext: any\n\t): boolean {\n\t\tconst hasClusterChanged = this.props.cluster !== nextProps.cluster;\n\t\tconst hasNodeChanged = this.props.node !== nextProps.node;\n\t\tconst hasHostChanged = this.props.host !== nextProps.host;\n\t\t// \tthis.areNodesDifferent(\n\t\t// \tthis.props.node,\n\t\t// \tnextProps.node\n\t\t// );\n\n\t\tconst hasStateChanged =\n\t\t\tthis.state.hasMessagesAfter !== nextState.hasMessagesAfter ||\n\t\t\tthis.state.hasMessagesBefore !== nextState.hasMessagesBefore ||\n\t\t\tthis.state.isLoadingMessagesBefore !==\n\t\t\t\tnextState.isLoadingMessagesBefore ||\n\t\t\tthis.state.isLoadingMessagesAfter !== nextState.isLoadingMessagesAfter ||\n\t\t\tthis.state.isLoadingMessagesAfter !== nextState.isLoadingMessagesAfter ||\n\t\t\tthis.state.isLoadingLogPaths !== nextState.isLoadingLogPaths ||\n\t\t\tthis.state.selectedLogs !== nextState.selectedLogs ||\n\t\t\tthis.state.date !== nextState.date;\n\n\t\t// console.log(\"shouldComponentUpdate\", hasNodesChanged, hasStateChanged);\n\n\t\treturn (\n\t\t\thasClusterChanged || hasNodeChanged || hasHostChanged || hasStateChanged\n\t\t);\n\t}\n\n\tcomponentDidMount(): void {\n\t\t// load initial logs\n\n\t\tthis.loadLogPaths();\n\t\tthis._isMounted = true;\n\t}\n\n\tcomponentWillUnmount(): void {\n\t\tthis.stopAutoRefresh();\n\t\tthis._isMounted = false;\n\t}\n\n\tgetSnapshotBeforeUpdate(\n\t\tprevProps: Readonly,\n\t\tprevState: Readonly\n\t): Snapshot {\n\t\t// console.log(\n\t\t// \t\"getSnapshot\",\n\t\t// \tprevProps.nodes,\n\t\t// \tthis.props.nodes,\n\t\t// \tprevState.date,\n\t\t// \tthis.state.date\n\t\t// );\n\t\treturn {\n\t\t\thasClusterChanged: this.props.cluster.name !== prevProps.cluster.name,\n\t\t\thasNodeChanged:\n\t\t\t\t((this.props.node && this.props.node.name) || \"\") !==\n\t\t\t\t((prevProps.node && prevProps.node.name) || \"\"),\n\t\t\thasDateChanged: prevState.date !== this.state.date,\n\t\t\thasSelectedLogsChanged: prevState.selectedLogs !== this.state.selectedLogs\n\t\t};\n\t}\n\n\tcomponentDidUpdate(\n\t\tprevProps: Readonly,\n\t\tprevState: Readonly,\n\t\tsnapshot: Snapshot\n\t): void {\n\t\tconsole.log(\"componentDidUpdate\", snapshot);\n\t\tif (snapshot.hasDateChanged || snapshot.hasSelectedLogsChanged) {\n\t\t\tthis.setState({ logs: [], hasMessagesBefore: true });\n\t\t\t// console.log(\"componentDidUpdate\", this.state.selectedLogs);\n\t\t\tthis.loadLogMessages(\n\t\t\t\t\"before\",\n\t\t\t\tthis.state.selectedLogs,\n\t\t\t\tmoment().toISOString()\n\t\t\t);\n\n\t\t\t// this.loadLogMessages(\n\t\t\t// \t\"around\",\n\t\t\t// \tthis.state.selectedLogs,\n\t\t\t// \tmoment().subtract(3, \"minutes\").toISOString()\n\t\t\t// );\n\t\t} else if (snapshot.hasClusterChanged || snapshot.hasNodeChanged) {\n\t\t\tthis.setState({ logs: [], availableLogs: [], selectedLogs: [] });\n\t\t\tthis.loadLogPaths();\n\t\t\t// this.loadLogPaths(this.props.hosts);\n\t\t}\n\t}\n\n\tonScroll = (e: any) => {\n\t\t// console.log(\"onScroll\", e.target.scrollTop);\n\t\t// e.persist();\n\t\tconst { scrollTop, clientHeight, scrollHeight } = e.target;\n\t\tconst {\n\t\t\tisLoadingMessagesBefore,\n\t\t\thasMessagesBefore,\n\t\t\tisLoadingMessagesAfter,\n\t\t\thasMessagesAfter,\n\t\t\tlogs\n\t\t} = this.state;\n\n\t\t// temporarily disable scroll while more messages are loading\n\t\t(isLoadingMessagesBefore || isLoadingMessagesAfter) && e.preventDefault();\n\n\t\t// when scrolled to the top fetch more messages if there are any\n\t\t// also do not fetch if already loading\n\t\t// - this prevents multiple loads if scroll event is triggered multiple times\n\t\tif (\n\t\t\tlogs[0] &&\n\t\t\tscrollTop === 0 &&\n\t\t\t!isLoadingMessagesBefore &&\n\t\t\thasMessagesBefore\n\t\t) {\n\t\t\tthis.loadLogMessages(\n\t\t\t\t\"before\",\n\t\t\t\tthis.state.selectedLogs,\n\t\t\t\tlogs[0].time.toNanoISOString()\n\t\t\t);\n\t\t}\n\n\t\t// whenever scroll is changed, disable delayed refresh\n\t\tif (this.autoRefreshTimeout) {\n\t\t\tthis.stopAutoRefresh();\n\t\t}\n\n\t\t// when scrolled to the bottom fetch more messages if there are any\n\t\t// also do not fetch if already loading\n\t\t// - this prevents multiple loads if scroll event is triggered multiple times\n\t\tconst isScrolledToBottom =\n\t\t\tMath.abs(scrollTop + clientHeight - scrollHeight) < 1;\n\n\t\tif (\n\t\t\tlogs[0] &&\n\t\t\tisScrolledToBottom &&\n\t\t\thasMessagesAfter &&\n\t\t\t!isLoadingMessagesAfter\n\t\t) {\n\t\t\tthis.loadLogMessages(\n\t\t\t\t\"after\",\n\t\t\t\tthis.state.selectedLogs,\n\t\t\t\tlogs[logs.length - 1].time.toNanoISOString()\n\t\t\t);\n\t\t} else if (isScrolledToBottom && !hasMessagesAfter) {\n\t\t\t!this.autoRefreshTimeout && this.startAutoRefresh();\n\t\t}\n\t};\n\n\tstartAutoRefresh() {\n\t\t// console.log(\"start auto refresh\");\n\t\tthis.autoRefreshTimeout = setTimeout(() => {\n\t\t\tconst { logs } = this.state;\n\t\t\t// console.log(\"auto refresh executed\", logs, logs[logs.length - 1]);\n\n\t\t\tthis.loadLogMessages(\n\t\t\t\t\"after\",\n\t\t\t\tthis.state.selectedLogs,\n\t\t\t\tlogs[logs.length - 1].time.toNanoISOString(),\n\t\t\t\ttrue\n\t\t\t);\n\t\t\tthis._isMounted && this.startAutoRefresh();\n\t\t}, 3000);\n\t}\n\n\tstopAutoRefresh() {\n\t\t// console.log(\"stop auto refresh\");\n\t\tclearTimeout(this.autoRefreshTimeout);\n\t\tdelete this.autoRefreshTimeout;\n\t}\n\n\tloadLogPaths() {\n\t\t// loadLogPaths(hosts: Host[]) {\n\t\tthis.setState({\n\t\t\tisLoadingLogPaths: true\n\t\t});\n\t\t// console.time(\"loadLogPaths\");\n\t\tconst { node, cluster, host } = this.props;\n\t\tconsole.log(\"loadLogPaths\", cluster, node, host);\n\t\t// if (node) {\n\t\tLogViewerService.fetchPaths(cluster, node, host).then((response: any) => {\n\t\t\tconst availableLogs = response.map((res: any) => res.distinct);\n\t\t\tconsole.log(\"node availableLogs\", availableLogs);\n\t\t\tthis.setState({\n\t\t\t\tavailableLogs,\n\t\t\t\tselectedLogs: [...availableLogs],\n\t\t\t\tisLoadingLogPaths: false\n\t\t\t});\n\t\t});\n\t\t// } else {\n\t\t// \tLogViewerService.fetchPaths(cluster, node).then((response: any) => {\n\t\t// \t\tconst availableLogs = response.map((res: any) => res.distinct);\n\t\t// \t\tconsole.log(\"cluster availableLogs\", availableLogs);\n\t\t// \t\tthis.setState({\n\t\t// \t\t\tavailableLogs,\n\t\t// \t\t\tselectedLogs: [...availableLogs],\n\t\t// \t\t\tisLoadingLogPaths: false\n\t\t// \t\t});\n\t\t// \t});\n\t\t// }\n\t\t// LogViewerService.fetchPaths(hosts).then((response: any) => {\n\t\t// \tconst availableLogs = response.map((res: any) => res.distinct);\n\t\t// \tthis.setState({\n\t\t// \t\tavailableLogs,\n\t\t// \t\tselectedLogs: [...availableLogs],\n\t\t// \t\tisLoadingLogPaths: false\n\t\t// \t});\n\t\t// \t// console.timeEnd(\"loadLogPaths\");\n\t\t// });\n\t}\n\n\tloadLogMessages(\n\t\tdirection: \"before\" | \"after\" | \"around\" = \"before\",\n\t\tselectedLogs: string[],\n\t\tdateISOString: string,\n\t\tautoRefresh?: boolean\n\t) {\n\t\t// console.log(\"loadLogMessages\", direction, selectedLogs, dateISOString);\n\t\t// console.time(\"loadLogMessages\");\n\t\tif (selectedLogs.length === 0) {\n\t\t\tthis.setState({\n\t\t\t\tlogs: [],\n\t\t\t\tisLoadingMessagesAfter: false,\n\t\t\t\tisLoadingMessagesBefore: false,\n\t\t\t\thasMessagesBefore: false,\n\t\t\t\thasMessagesAfter: false\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tconst { cluster, node } = this.props;\n\n\t\tconst logContentElement = document.querySelector(\"#log-content\");\n\n\t\t// console.log(\"firstLogMessage\", firstLogMessage, firstElementInitialOffset);\n\n\t\tswitch (direction) {\n\t\t\tcase \"before\":\n\t\t\t\tthis.setState({ isLoadingMessagesBefore: true });\n\n\t\t\t\tconst firstLogMessage =\n\t\t\t\t\tlogContentElement && logContentElement.querySelectorAll(\"p\")[0];\n\n\t\t\t\t// console.log(\"infoLogMessage\", infoLogMessage);\n\n\t\t\t\tconst firstElementInitialOffset = firstLogMessage\n\t\t\t\t\t? firstLogMessage.offsetTop\n\t\t\t\t\t: 0;\n\n\t\t\t\t// console.log(\"firstElementInitialOffset\", firstElementInitialOffset);\n\n\t\t\t\tLogViewerService.fetchBefore(\n\t\t\t\t\t// this.props.hosts,\n\t\t\t\t\tselectedLogs,\n\t\t\t\t\tdateISOString,\n\t\t\t\t\tcluster,\n\t\t\t\t\tnode\n\t\t\t\t).then((response: LogLine[]) => {\n\t\t\t\t\t// console.log(\"influx query response\", response);\n\n\t\t\t\t\tconst wasLogEmpty = this.state.logs.length === 0;\n\n\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\tlogs: [...response.reverse(), ...state.logs],\n\t\t\t\t\t\tisLoadingMessagesBefore: false,\n\t\t\t\t\t\thasMessagesBefore: response.length === LOG_FETCH_PAGE_SIZE\n\t\t\t\t\t}));\n\n\t\t\t\t\t// if log was empty before, scroll to bottom\n\t\t\t\t\tif (wasLogEmpty) {\n\t\t\t\t\t\tconst logContent = document.getElementById(\"log-content\");\n\t\t\t\t\t\tif (logContent) {\n\t\t\t\t\t\t\tlogContent.scrollTop = logContent.scrollHeight;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if log was not empty, scroll to previously first log message\n\t\t\t\t\t} else if (firstLogMessage && logContentElement) {\n\t\t\t\t\t\t// console.log(\n\t\t\t\t\t\t// \t\"scroll to\",\n\t\t\t\t\t\t// \tfirstLogMessage.offsetTop - firstElementInitialOffset\n\t\t\t\t\t\t// );\n\t\t\t\t\t\tlogContentElement.scrollTo({\n\t\t\t\t\t\t\ttop: firstLogMessage.offsetTop - firstElementInitialOffset\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\t// console.timeEnd(\"loadLogMessages\");\n\t\t\t\t});\n\t\t\t\tbreak;\n\n\t\t\tcase \"after\":\n\t\t\t\tthis.setState({ isLoadingMessagesAfter: true });\n\n\t\t\t\tLogViewerService.fetchAfter(\n\t\t\t\t\t// this.props.hosts,\n\t\t\t\t\tselectedLogs,\n\t\t\t\t\tdateISOString,\n\t\t\t\t\tcluster,\n\t\t\t\t\tnode\n\t\t\t\t).then((response: LogLine[]) => {\n\t\t\t\t\t// console.log(\"influx query response\", response);\n\t\t\t\t\t// console.timeEnd(\"loadLogMessages\");\n\n\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\tlogs: [...state.logs, ...response],\n\t\t\t\t\t\tisLoadingMessagesAfter: false,\n\t\t\t\t\t\thasMessagesAfter: response.length === LOG_FETCH_PAGE_SIZE\n\t\t\t\t\t}));\n\n\t\t\t\t\tif (autoRefresh) {\n\t\t\t\t\t\tconst logContent = document.getElementById(\"log-content\");\n\t\t\t\t\t\tif (logContent) {\n\t\t\t\t\t\t\tlogContent.scrollTop = logContent.scrollHeight;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tbreak;\n\n\t\t\tcase \"around\":\n\t\t\t\tthis.setState({\n\t\t\t\t\tlogs: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmessage: \"[Info] Target date\",\n\t\t\t\t\t\t\ttime: Utils.toNanoDate(moment(dateISOString).toDate()),\n\t\t\t\t\t\t\t_md5hash: dateISOString\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\tisLoadingMessagesBefore: true,\n\t\t\t\t\tisLoadingMessagesAfter: true\n\t\t\t\t});\n\n\t\t\t\tLogViewerService.fetchBefore(\n\t\t\t\t\t// this.props.hosts,\n\t\t\t\t\tselectedLogs,\n\t\t\t\t\tdateISOString,\n\t\t\t\t\tcluster,\n\t\t\t\t\tnode\n\t\t\t\t).then((response: LogLine[]) => {\n\t\t\t\t\t// console.log(\"influx query response before\", response);\n\n\t\t\t\t\tconst infoLogMessage =\n\t\t\t\t\t\tlogContentElement && logContentElement.querySelectorAll(\"p\")[0];\n\n\t\t\t\t\tconst infoElementInitialOffset = infoLogMessage\n\t\t\t\t\t\t? infoLogMessage.offsetTop\n\t\t\t\t\t\t: 0;\n\n\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\tlogs: [...response.reverse(), ...state.logs],\n\t\t\t\t\t\tisLoadingMessagesBefore: false,\n\t\t\t\t\t\thasMessagesBefore: response.length === LOG_FETCH_PAGE_SIZE\n\t\t\t\t\t}));\n\n\t\t\t\t\tif (infoLogMessage && logContentElement) {\n\t\t\t\t\t\t// console.log(\n\t\t\t\t\t\t// \t\"scroll to\",\n\t\t\t\t\t\t// \tinfoLogMessage.offsetTop - infoElementInitialOffset\n\t\t\t\t\t\t// );\n\t\t\t\t\t\tlogContentElement.scrollTo({\n\t\t\t\t\t\t\ttop: infoLogMessage.offsetTop - infoElementInitialOffset\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tLogViewerService.fetchAfter(\n\t\t\t\t\t// this.props.hosts,\n\t\t\t\t\tselectedLogs,\n\t\t\t\t\tdateISOString,\n\t\t\t\t\tcluster,\n\t\t\t\t\tnode\n\t\t\t\t).then((response: LogLine[]) => {\n\t\t\t\t\t// console.log(\"influx query response after\", response);\n\n\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\tlogs: [...state.logs, ...response],\n\t\t\t\t\t\tisLoadingMessagesAfter: false,\n\t\t\t\t\t\thasMessagesAfter: response.length === LOG_FETCH_PAGE_SIZE\n\t\t\t\t\t}));\n\n\t\t\t\t\t// console.timeEnd(\"loadLogMessages\");\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { classes, node } = this.props;\n\t\tconst {\n\t\t\tlogs,\n\t\t\tisLoadingMessagesBefore,\n\t\t\tisLoadingMessagesAfter,\n\t\t\tisLoadingLogPaths,\n\t\t\thasMessagesBefore,\n\t\t\thasMessagesAfter,\n\t\t\tselectedLogs,\n\t\t\tavailableLogs\n\t\t} = this.state;\n\n\t\tconst isLoading =\n\t\t\tisLoadingMessagesBefore || isLoadingMessagesAfter || isLoadingLogPaths;\n\t\tconst isEmpty = logs.length === 0;\n\n\t\tconst logContent = (\n\t\t\t<>\n\t\t\t\t{hasMessagesBefore ? (\n\t\t\t\t\t\n\t\t\t\t) : (\n\t\t\t\t\t\n\t\t\t\t\t\t=== Start of log ===\n\t\t\t\t\t\n\t\t\t\t)}\n\n\t\t\t\t{logs.map((log: LogLine) => (\n\t\t\t\t\t\n\t\t\t\t))}\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{!hasMessagesAfter && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tLive...\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t\n\t\t);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\taria-controls=\"panel1a-content\"\n\t\t\t\t\t\t\tid=\"panel1a-header\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tShowing {selectedLogs.length} logs:{\" \"}\n\t\t\t\t\t\t\t\t{selectedLogs\n\t\t\t\t\t\t\t\t\t.map((path: string) => path.split(\"/\").slice(-1))\n\t\t\t\t\t\t\t\t\t.join(\", \")}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t{availableLogs\n\t\t\t\t\t\t\t\t\t.sort((a: string, b: string) => a.localeCompare(b))\n\t\t\t\t\t\t\t\t\t.map((logPath: string) => (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst { checked } = e.target;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tchecked\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? this.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tselectedLogs: [...state.selectedLogs, logPath]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: this.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tselectedLogs: state.selectedLogs.filter(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(selectedLogPath: String) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tselectedLogPath !== logPath\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }));\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\tname={logPath}\n\t\t\t\t\t\t\t\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tlabel={logPath}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\n\n\t\t\t\t\t{/**/}\n\t\t\t\t\t{/*\t*/}\n\t\t\t\t\t{/*\t\t
*/}\n\t\t\t\t\t{/*\t\t\t{availableLogs*/}\n\t\t\t\t\t{/*\t\t\t\t.sort((a: string, b: string) => a.localeCompare(b))*/}\n\t\t\t\t\t{/*\t\t\t\t.map((logPath: string) => (*/}\n\t\t\t\t\t{/*\t\t\t\t\t*/}\n\t\t\t\t\t{/*\t\t\t\t\t\t\t\t) => {*/}\n\t\t\t\t\t{/*\t\t\t\t\t\t\t\t\tconst { checked } = e.target;*/}\n\n\t\t\t\t\t{/*\t\t\t\t\t\t\t\t\tchecked*/}\n\t\t\t\t\t{/*\t\t\t\t\t\t\t\t\t\t? this.setState((state: LocalState) => ({*/}\n\t\t\t\t\t{/*\t\t\t\t\t\t\t\t\t\t\t\tselectedLogs: [...state.selectedLogs, logPath]*/}\n\t\t\t\t\t{/*\t\t\t\t\t\t\t\t\t\t }))*/}\n\t\t\t\t\t{/*\t\t\t\t\t\t\t\t\t\t: this.setState((state: LocalState) => ({*/}\n\t\t\t\t\t{/*\t\t\t\t\t\t\t\t\t\t\t\tselectedLogs: state.selectedLogs.filter(*/}\n\t\t\t\t\t{/*\t\t\t\t\t\t\t\t\t\t\t\t\t(selectedLogPath: String) =>*/}\n\t\t\t\t\t{/*\t\t\t\t\t\t\t\t\t\t\t\t\t\tselectedLogPath !== logPath*/}\n\t\t\t\t\t{/*\t\t\t\t\t\t\t\t\t\t\t\t)*/}\n\t\t\t\t\t{/*\t\t\t\t\t\t\t\t\t\t }));*/}\n\t\t\t\t\t{/*\t\t\t\t\t\t\t\t}}*/}\n\t\t\t\t\t{/*\t\t\t\t\t\t\t\tname={logPath}*/}\n\t\t\t\t\t{/*\t\t\t\t\t\t\t\tcolor=\"primary\"*/}\n\t\t\t\t\t{/*\t\t\t\t\t\t\t/>*/}\n\t\t\t\t\t{/*\t\t\t\t\t\t}*/}\n\t\t\t\t\t{/*\t\t\t\t\t\tlabel={logPath}*/}\n\t\t\t\t\t{/*\t\t\t\t\t/>*/}\n\t\t\t\t\t{/*\t\t\t\t))}*/}\n\t\t\t\t\t{/*\t\t*/}\n\t\t\t\t\t{/*\t
*/}\n\t\t\t\t\t{/*\t*/}\n\t\t\t\t\t{/**/}\n\n\t\t\t\t\t\n\t\t\t\t\t\t{isEmpty ? (\n\t\t\t\t\t\t\tisLoading ? (\n\t\t\t\t\t\t\t\tLoading messages...\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\tLog is empty.\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\tlogContent\n\t\t\t\t\t\t)}\n\t\t\t\t\t
\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default withStyles(styles)(LogViewer);\n","import { AppState } from \"AppState\";\nimport { createSelector } from \"reselect\";\nimport { MetricsStoreState } from \"store/metricsStore/storeTypes\";\nimport { Cluster } from \"pages/management/cluster/types\";\n\nexport const isMonitorEnabledSelector = (state: AppState): boolean =>\n\tstate.metrics.isMonitorEnabled;\n\nexport const makeJoinedNodesSelector = () =>\n\tcreateSelector(\n\t\t(state: AppState) => state.metrics,\n\t\t(state: AppState) => state.clusterList,\n\t\t(state: AppState, clusterId: number = -1) => clusterId,\n\t\t(\n\t\t\tmetricsStore: MetricsStoreState,\n\t\t\tclusterList: Cluster[],\n\t\t\tclusterID: number\n\t\t): number => {\n\t\t\tconst cluster = clusterList.find(\n\t\t\t\t(cluster: Cluster) => cluster.id === clusterID\n\t\t\t);\n\n\t\t\tif (cluster) {\n\t\t\t\treturn metricsStore.joinedNodes[cluster.name] || 0;\n\t\t\t} else {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t);\n","import {\n\tDeleteForever,\n\tDeviceHub,\n\tMoreVert,\n\tSettingsBackupRestore\n} from \"@mui/icons-material\";\nimport DeleteIcon from \"@mui/icons-material/Delete\";\nimport {\n\tAvatar,\n\tCardHeader,\n\tDivider,\n\tGrid,\n\tIconButton,\n\tListItemIcon,\n\tListItemText,\n\tMenuItem,\n\tTab,\n\tTabs,\n\tTypography\n} from \"@mui/material\";\nimport Card from \"@mui/material/Card\";\nimport CardContent from \"@mui/material/CardContent\";\nimport Menu from \"@mui/material/Menu\";\nimport { WithStyles, withStyles, WithTheme } from \"@mui/styles\";\nimport { AppState } from \"AppState\";\nimport { AxiosError } from \"axios\";\nimport { clusterListFetchRequested } from \"store/cluster/actions\";\nimport ClusterFormComponent from \"pages/management/cluster/clusterForm/ClusterFormComponent\";\nimport { DEFAULT_CLUSTER } from \"pages/management/cluster/const\";\nimport { Cluster } from \"pages/management/cluster/types\";\nimport { hostListFetchRequested } from \"store/host/actions\";\nimport { Host } from \"pages/management/host/types\";\nimport { nodeListFetchRequested } from \"store/node/actions\";\nimport JobListComponent from \"pages/management/node/jobs/JobListComponent\";\nimport { nodeCreateWizardShow } from \"pages/management/node/nodeDeploymentDialog/actions\";\nimport { Node } from \"pages/management/node/types\";\nimport DashboardComponent from \"components/monitoring/dashboard/DashboardComponent\";\nimport { BlinkingBadge } from \"components/BlinkingBadge/BlinkingBadge\";\nimport { GMDialogService } from \"components/dialog/DialogService\";\nimport LogViewer from \"components/logViewer/LogViewerComponent\";\nimport { showSnackbar } from \"components/snackbar/actionCreators\";\nimport {\n\tSNACKBAR_TYPE,\n\tSnackbarActionPayload\n} from \"components/snackbar/types\";\nimport { DatabasePlus } from \"mdi-material-ui\";\nimport ClustersAPI from \"services/api/ClustersAPI\";\nimport JobsService from \"services/jobs/jobsService\";\nimport { Job, JOB_STATUS, JobTracking } from \"services/jobs/types\";\nimport { MetricsStoreState } from \"store/metricsStore/storeTypes\";\nimport React, { ChangeEvent } from \"react\";\nimport { connect } from \"react-redux\";\nimport { StaticContext } from \"react-router\";\nimport { RouteComponentProps } from \"react-router-dom\";\nimport { createSelector } from \"reselect\";\nimport { styles } from \"pages/management/cluster/styles\";\nimport { makeJoinedNodesSelector } from \"store/metricsStore/selectors\";\n\n// component local state interface\ninterface LocalState {\n\tanchorEl: any;\n\tactiveTab: number;\n}\n\n// PROPS\ninterface ReduxStateProps {\n\tcluster: Cluster;\n\tcommittedTransactions: number;\n\tnodeList: Node[];\n\thostList: Host[];\n\thasRunningJobs: boolean;\n\tjoinedNodes: number;\n}\n\ninterface DispatchProps {\n\tshowSnackbar: (snackbar: SnackbarActionPayload) => void;\n\tnodeCreateWizardShow: (cluster: Cluster) => void;\n\treloadClusters: () => void;\n\treloadNodes: (clusterID: number) => void;\n\treloadHosts: (clusterID: number) => void;\n}\n\ntype Props = ReduxStateProps &\n\tDispatchProps &\n\tWithStyles &\n\tWithTheme &\n\tRouteComponentProps;\n\n// COMPONENT\nclass ClusterManagerComponent extends React.Component {\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\tanchorEl: null,\n\t\t\tactiveTab: 0\n\t\t};\n\t}\n\n\tonRecoverClick = () => {\n\t\tconst { cluster } = this.props;\n\n\t\tif (cluster.id) {\n\t\t\tthis.props.showSnackbar({\n\t\t\t\tmsg: `Recovering cluster '${cluster.name}'...`\n\t\t\t});\n\t\t\tClustersAPI.recover(cluster.id).then(\n\t\t\t\t(job: Job) => {\n\t\t\t\t\tJobsService.trackJob(job).then(\n\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\t\tmsg: `Cluster '${cluster.name}' successfully recovered`\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t},\n\t\t\t\t\t\t(err: any) => {\n\t\t\t\t\t\t\tconsole.log(\n\t\t\t\t\t\t\t\t\"cluster recover error\",\n\t\t\t\t\t\t\t\terr,\n\t\t\t\t\t\t\t\terr.executionInfo.error.msg\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\t\tmsg: `Failed to recover cluster '${cluster.name}', ${\n\t\t\t\t\t\t\t\t\terr.executionInfo?.error?.msg || \"\"\n\t\t\t\t\t\t\t\t}`\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\t(err: any) => {\n\t\t\t\t\tconsole.error(\"Cluster recover error:\", err);\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tthis.setState({\n\t\t\tanchorEl: null\n\t\t});\n\t};\n\n\tonDeleteClick = (force: boolean = false) => {\n\t\tconst { cluster } = this.props;\n\n\t\tconst message = force\n\t\t\t? `All nodes in this cluster will deleted and all data will be lost. If something fails, nodes will still be removed from Galera Manager database but they still might exist in cloud provider, so please check and manually delete them in your cloud provider console.`\n\t\t\t: `All nodes in this cluster will deleted and all data will be lost.`;\n\n\t\tGMDialogService.showConfirm({\n\t\t\ttitle: force\n\t\t\t\t? `Force delete cluster '${cluster.name}'?`\n\t\t\t\t: `Delete cluster '${cluster.name}'?`,\n\t\t\tmessage,\n\t\t\tconfirmText: force ? \"Force delete\" : \"Delete\",\n\t\t\tdeclineText: \"Cancel\",\n\t\t\tdestructiveConfirm: true\n\t\t}).then(\n\t\t\t() => {\n\t\t\t\tClustersAPI.delete(cluster, force).then(\n\t\t\t\t\t(job: Job) => {\n\t\t\t\t\t\tconsole.log(\"Cluster delete job id\", job);\n\n\t\t\t\t\t\tJobsService.trackJob(job).then(\n\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\t\t\tmsg: `Cluster '${cluster.name}' successfully deleted`\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\tconst { pathname } = this.props.location;\n\n\t\t\t\t\t\t\t\t// redirect to /clusters if this cluster still open\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tpathname.includes(`/clusters/${cluster.id}/`) ||\n\t\t\t\t\t\t\t\t\tpathname.endsWith(`/clusters/${cluster.id}`)\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tthis.props.history.push(`/clusters`);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tthis.props.reloadClusters();\n\t\t\t\t\t\t\t\t// todo:\n\t\t\t\t\t\t\t\t// this.props.reloadNodes(cluster.id || 0);\n\t\t\t\t\t\t\t\t// this.props.reloadHosts(cluster.id || 0);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t(err: any) => {\n\t\t\t\t\t\t\t\tconsole.error(\"Cluster deletion job monitor error:\", err);\n\n\t\t\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\t\t\tmsg: `Cluster '${cluster.name}' deletion job error.`,\n\t\t\t\t\t\t\t\t\tsnackbarType: SNACKBAR_TYPE.ERROR\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t\t(err: AxiosError) => {\n\t\t\t\t\t\tconsole.error(\"Error deleting cluster:\", err);\n\n\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\tmsg: `Cluster '${cluster.name}' could not be deleted`,\n\t\t\t\t\t\t\tsnackbarType: SNACKBAR_TYPE.ERROR\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\tmsg: `Cluster '${cluster.name}' is being deleted`\n\t\t\t\t});\n\t\t\t},\n\t\t\t() => {}\n\t\t);\n\n\t\tthis.setState({\n\t\t\tanchorEl: null\n\t\t});\n\t};\n\n\tonAddNodeClick = () => {\n\t\tthis.props.nodeCreateWizardShow(this.props.cluster);\n\t\tthis.setState({ anchorEl: null });\n\t};\n\n\tonMoreClick = (event: any) => {\n\t\t// isExpanded menu\n\t\tthis.setState({ anchorEl: event.currentTarget });\n\t};\n\n\tonMenuClose = () => {\n\t\tthis.setState({ anchorEl: null });\n\t};\n\n\trender(): React.ReactNode {\n\t\tconst {\n\t\t\tclasses,\n\t\t\ttheme,\n\t\t\tcommittedTransactions,\n\t\t\tcluster,\n\t\t\thasRunningJobs,\n\t\t\tjoinedNodes\n\t\t} = this.props;\n\t\tconst { activeTab, anchorEl } = this.state;\n\n\t\tif (!this.state) return false;\n\n\t\tconst disableRecover =\n\t\t\tjoinedNodes !== 0 || !cluster.nodes || cluster.nodes?.length === 0;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\taction={\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t{!cluster.unmanaged && [\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t,\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tthis.onDeleteClick();\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tcolor={\"secondary\"}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tthis.onDeleteClick(true);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\ttitle={\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{cluster.name}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t({committedTransactions} transactions)\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tsubheader={cluster.sharedConfig.node.dbEngine}\n\t\t\t\t/>\n\t\t\t\t\n\t\t\t\t, newValue: any) => {\n\t\t\t\t\t\t// console.log(\"onChange\", event, newValue);\n\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\tactiveTab: newValue\n\t\t\t\t\t\t}));\n\t\t\t\t\t}}\n\t\t\t\t\tvariant=\"fullWidth\"\n\t\t\t\t>\n\t\t\t\t\tMonitor} />\n\t\t\t\t\tLogs} />\n\t\t\t\t\tConfiguration\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tJobs\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\tJobs\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{(activeTab === 0 && ) ||\n\t\t\t\t\t\t(activeTab === 1 && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)) ||\n\t\t\t\t\t\t(activeTab === 2 && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)) ||\n\t\t\t\t\t\t(activeTab === 3 && )}\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\n// selectors\nconst makeClusterSelector = () =>\n\tcreateSelector(\n\t\t(state: AppState) => state.clusterList,\n\t\t(state: AppState, props: Props) => props.match.params.clusterID,\n\t\t(state: AppState, props: Props) => props.history,\n\t\t(clusterList: Cluster[], clusterID: number, history): Cluster => {\n\t\t\tconst cluster = clusterList.find(\n\t\t\t\t(cluster: Cluster) => cluster.id === clusterID\n\t\t\t);\n\t\t\tif (cluster) {\n\t\t\t\treturn cluster;\n\t\t\t} else {\n\t\t\t\tconsole.warn(`Cluster not found.`);\n\t\t\t\thistory.push(\"/clusters\");\n\t\t\t\treturn DEFAULT_CLUSTER;\n\t\t\t\t// throw Error(`Cluster ${clusterName} not found.`);\n\t\t\t}\n\t\t}\n\t);\n\n// selectors\nconst makeNodeListSelector = () =>\n\tcreateSelector(\n\t\t(state: AppState) => state.nodeList,\n\t\t(state: AppState, props: Props) => props.match.params.clusterID,\n\t\t(nodeMap: Map, clusterID: number): Node[] =>\n\t\t\tnodeMap.get(clusterID) || []\n\t);\n\n// selectors\nconst makeHostListSelector = () =>\n\tcreateSelector(\n\t\t(state: AppState) => state.hostList,\n\t\t(state: AppState, props: Props) => props.match.params.clusterID,\n\t\t(hostMap: Map, clusterID: number): Host[] =>\n\t\t\thostMap.get(clusterID) || []\n\t);\n\nconst makeCommittedTransactionsSelector = () =>\n\tcreateSelector(\n\t\t(state: AppState) => state.metrics,\n\t\t(state: AppState) => state.clusterList,\n\t\t(state: AppState, props: Props) => props.match.params.clusterID,\n\t\t(\n\t\t\tmetricsStore: MetricsStoreState,\n\t\t\tclusterList: Cluster[],\n\t\t\tclusterID: number\n\t\t): number => {\n\t\t\tconst cluster = clusterList.find(\n\t\t\t\t(cluster: Cluster) => cluster.id === clusterID\n\t\t\t);\n\t\t\tif (cluster) {\n\t\t\t\tconst lastCommitted =\n\t\t\t\t\tmetricsStore.wsrepLastCommittedMetrics[cluster.name];\n\t\t\t\treturn lastCommitted ? lastCommitted.value : 0;\n\t\t\t} else {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t);\n\nconst makeHasRunningJobs = () =>\n\tcreateSelector(\n\t\t[\n\t\t\tmakeClusterSelector(),\n\t\t\t(state: AppState) => state.jobMonitor.runningJobList\n\t\t],\n\t\t(cluster: Cluster, jobList: JobTracking[]) =>\n\t\t\tjobList.some(\n\t\t\t\t(job: JobTracking) =>\n\t\t\t\t\tjob.meta.cluster_id === cluster.id &&\n\t\t\t\t\tjob.status === JOB_STATUS.RUNNING\n\t\t\t)\n\t);\n\n// REDUX MAPPINGS\nconst mapGlobalStateToProps = (state: AppState, props: Props) => {\n\tconst committedTransactionsSelector = makeCommittedTransactionsSelector();\n\tconst nodeListSelector = makeNodeListSelector();\n\tconst hostListSelector = makeHostListSelector();\n\tconst clusterSelector = makeClusterSelector();\n\tconst hasRunningJobsSelector = makeHasRunningJobs();\n\tconst joinedNodesSelector = makeJoinedNodesSelector();\n\n\treturn {\n\t\tcommittedTransactions: committedTransactionsSelector(state, props),\n\t\tcluster: clusterSelector(state, props),\n\t\tnodeList: nodeListSelector(state, props),\n\t\thostList: hostListSelector(state, props),\n\t\thasRunningJobs: hasRunningJobsSelector(state, props),\n\t\tjoinedNodes: joinedNodesSelector(state, props.match.params.clusterID)\n\t};\n};\n\nconst mapGlobalDispatchToProps = (dispatch: any) => ({\n\tshowSnackbar: (snackbar: SnackbarActionPayload) => {\n\t\tdispatch(showSnackbar(snackbar));\n\t},\n\tnodeCreateWizardShow: (cluster: Cluster) => {\n\t\tdispatch(nodeCreateWizardShow(cluster));\n\t},\n\treloadNodes: (clusterID: number) => {\n\t\tdispatch(nodeListFetchRequested(clusterID));\n\t},\n\treloadHosts: (clusterID: number) => {\n\t\tdispatch(hostListFetchRequested(clusterID));\n\t},\n\treloadClusters: () => {\n\t\tdispatch(clusterListFetchRequested());\n\t}\n});\n\nexport default withStyles(styles, { withTheme: true })(\n\tconnect(\n\t\tmapGlobalStateToProps,\n\t\tmapGlobalDispatchToProps\n\t)(ClusterManagerComponent)\n);\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from '@mui/styles/createStyles';\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\tcard: {\n\t\t\twidth: \"100%\"\n\t\t\t// [theme.breakpoints.up(\"sm\")]: {\n\t\t\t// \twidth: 700\n\t\t\t// }\n\t\t},\n\t\tnoPaddingCardContent: {\n\t\t\tpadding: 0,\n\t\t\t\"&:last-child\": {\n\t\t\t\tpadding: 0\n\t\t\t}\n\t\t},\n\t});\n","import {\n\tFormControl,\n\tGrid,\n\tInputLabel,\n\tMenuItem,\n\tSelect,\n\tTextField\n} from \"@mui/material\";\nimport { Cluster } from \"pages/management/cluster/types\";\nimport ClusterUtils from \"pages/management/cluster/utils\";\nimport { Host, HOST_TYPE } from \"pages/management/host/types\";\nimport EC2ConfigComponent from \"components/form/ec2Config/EC2ConfigComponent\";\nimport SSHKeysEditor from \"components/form/SSHKeysEditor/SSHKeysEditorComponent\";\nimport { Component } from \"react\";\nimport { RouteComponentProps, StaticContext, withRouter } from \"react-router\";\nimport { INPUT_VARIANT } from \"../../../../components/form/const\";\n\ninterface LocalState {}\n\ninterface LocalProps {\n\tcluster: Cluster;\n\thost: Host;\n}\n\n// PROPS\ninterface ReduxStateProps {}\n\ntype Props = LocalProps &\n\tReduxStateProps &\n\tRouteComponentProps;\n\nclass HostFormComponent extends Component {\n\trender() {\n\t\tconst { cluster, host } = this.props;\n\n\t\tconst clusterType = ClusterUtils.getClusterType(cluster);\n\n\t\tconst readOnly = true;\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t
\n\t\t\t\t\t{host && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tHost system\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t{host.system}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t{host.type === HOST_TYPE.EC2 && host.hostTypeSpecific && (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{host.type === HOST_TYPE.UNMANAGED && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default withRouter(HostFormComponent);\n","import React from \"react\";\nimport { Box, Typography } from \"@mui/material\";\nimport { DEPLOYMENT_STATUS } from \"pages/management/cluster/types\";\nimport { HOST_STATE } from \"pages/management/host/types\";\n\ninterface LocalState {}\n\n// default private key is used only as indicator that\ninterface LocalProps {\n\thostState: HOST_STATE;\n}\n\ntype Props = LocalProps;\n\nclass HostStateComponent extends React.PureComponent {\n\trender() {\n\t\tconst { hostState } = this.props;\n\n\t\tconst renderHostState = (hostState: HOST_STATE) => {\n\t\t\tswitch (hostState) {\n\t\t\t\tcase DEPLOYMENT_STATUS.FAILURE:\n\t\t\t\t\treturn (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tDEPLOYMENT ERROR\n\t\t\t\t\t\t\n\t\t\t\t\t);\n\n\t\t\t\tcase DEPLOYMENT_STATUS.PENDING:\n\t\t\t\t\treturn PENDING;\n\n\t\t\t\tcase DEPLOYMENT_STATUS.SUCCESS:\n\t\t\t\t\treturn DEPLOYED;\n\n\t\t\t\tdefault:\n\t\t\t\t\treturn UNKNOWN;\n\t\t\t}\n\t\t};\n\n\t\treturn <>{renderHostState(hostState)};\n\t}\n}\n\nexport default HostStateComponent;\n","import React from \"react\";\nimport clsx from \"clsx\";\nimport { WithStyles } from '@mui/styles';\nimport withStyles from '@mui/styles/withStyles';\nimport TableCell from \"@mui/material/TableCell\";\nimport {\n\tAutoSizer,\n\tColumn,\n\tTable,\n\tTableCellRenderer,\n\tTableHeaderProps\n} from \"react-virtualized\";\nimport { styles } from \"components/logViewer/styles\";\n\ninterface ColumnData {\n\tdataKey: string;\n\tlabel: string;\n\tnumeric?: boolean;\n\twidth: number;\n\tflexGrow?: number;\n}\n\ninterface Row {\n\tindex: number;\n}\n\ninterface Props extends WithStyles {\n\tcolumns: ColumnData[];\n\theaderHeight: number;\n\tonRowClick?: () => void;\n\trowCount: number;\n\trowGetter: (row: Row) => any;\n\trowHeight: number;\n}\n\nclass HostLogTable extends React.PureComponent {\n\tstatic defaultProps = {\n\t\theaderHeight: 30,\n\t\trowHeight: 16\n\t};\n\n\tgetRowClassName = ({ index }: Row) => {\n\t\tconst { classes, onRowClick } = this.props;\n\n\t\treturn clsx(classes.tableRow, classes.flexContainer, {\n\t\t\t[classes.tableRowHover]: index !== -1 && onRowClick != null\n\t\t});\n\t};\n\n\tcellRenderer: TableCellRenderer = ({ cellData, columnIndex }) => {\n\t\tconst { classes, rowHeight, onRowClick } = this.props;\n\t\treturn (\n\t\t\t\n\t\t\t\t{cellData}\n\t\t\t\n\t\t);\n\t};\n\n\theaderRenderer = ({\n\t\tlabel,\n\t\tcolumnIndex\n\t}: TableHeaderProps & { columnIndex: number }) => {\n\t\tconst { headerHeight, columns, classes } = this.props;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{label}\n\t\t\t\n\t\t);\n\t};\n\n\trender() {\n\t\tconst { classes, columns, ...tableProps } = this.props;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{({ height, width }) => (\n\t\t\t\t\t\n\t\t\t\t\t\t{columns.map(({ dataKey, ...other }, index) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tthis.headerRenderer({\n\t\t\t\t\t\t\t\t\t\t\t...headerProps,\n\t\t\t\t\t\t\t\t\t\t\tcolumnIndex: index\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tclassName={classes.flexContainer}\n\t\t\t\t\t\t\t\t\tcellRenderer={this.cellRenderer}\n\t\t\t\t\t\t\t\t\tdataKey={dataKey}\n\t\t\t\t\t\t\t\t\t{...other}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default withStyles(styles)(HostLogTable);\n","import Axios, { AxiosResponse } from \"axios\";\nimport APIUtils from \"services/api/utils\";\nimport { Host } from \"pages/management/host/types\";\n\nclass LogsApi {\n\t// static async fetchLogList(filter: {\n\t// \tcluster_id: number;\n\t// \thost_id?: number;\n\t// \tnode_id?: number;\n\t// }): Promise {\n\t// \treturn await Axios.get(\n\t// \t\t`${AppEnvironment.getApiAddress()}/${AppEnvironment.getApiVersion()}/logs`,\n\t// \t\t{\n\t// \t\t\tparams: {\n\t// \t\t\t\t\"filter[cluster_id]\": filter.cluster_id,\n\t// \t\t\t\t\"filter[host_id]\": filter.host_id,\n\t// \t\t\t\t\"filter[node_id]\": filter.node_id\n\t// \t\t\t}\n\t// \t\t}\n\t// \t);\n\t// }\n\tstatic async fetchGMSystemLog(): Promise {\n\t\treturn Axios.get(`${APIUtils.getUrl(`logs/default.log`)}`);\n\t}\n\n\tstatic async fetchHostLog(host: Host): Promise {\n\t\treturn await Axios.get(\n\t\t\t`${APIUtils.getUrl(`logs/cluster-${host.clusterID}-host-${host.id}.log`)}`\n\t\t);\n\t}\n}\n\nexport default LogsApi;\n","import { DeleteForever, MoreVert } from \"@mui/icons-material\";\nimport DeleteIcon from \"@mui/icons-material/Delete\";\nimport {\n\tAvatar,\n\tBox,\n\tCardHeader,\n\tDivider,\n\tGrid,\n\tListItemIcon,\n\tListItemText,\n\tMenuItem,\n\tTab,\n\tTabs,\n\tTypography\n} from \"@mui/material\";\nimport Card from \"@mui/material/Card\";\nimport CardContent from \"@mui/material/CardContent\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Menu from \"@mui/material/Menu\";\nimport { WithStyles, WithTheme } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { AppState } from \"AppState\";\nimport { AxiosError, AxiosResponse } from \"axios\";\nimport { Cluster } from \"pages/management/cluster/types\";\nimport { hostListFetchRequested } from \"store/host/actions\";\nimport StrayHostFormComponent from \"pages/management/host/hostForm/HostFormComponent\";\nimport { Host, HOST_STATE } from \"pages/management/host/types\";\nimport HostUtils from \"pages/management/host/utils\";\nimport JobListComponent from \"pages/management/node/jobs/JobListComponent\";\nimport { BlinkingBadge } from \"components/BlinkingBadge/BlinkingBadge\";\nimport { GMDialogService } from \"components/dialog/DialogService\";\nimport HostStateComponent from \"components/monitoring/hostState/HostStateComponent\";\nimport HostLogTable from \"components/logViewer/HostLogTableComponent\";\nimport { showSnackbar } from \"components/snackbar/actionCreators\";\nimport {\n\tSNACKBAR_TYPE,\n\tSnackbarActionPayload\n} from \"components/snackbar/types\";\nimport { Server } from \"mdi-material-ui\";\nimport HostsAPI from \"services/api/HostsAPI\";\nimport LogsApi from \"services/api/LogsApi\";\nimport JobsService from \"services/jobs/jobsService\";\nimport { Job, JOB_STATUS, JobTracking } from \"services/jobs/types\";\nimport React, { ChangeEvent } from \"react\";\nimport { connect } from \"react-redux\";\nimport { StaticContext } from \"react-router\";\nimport { RouteComponentProps } from \"react-router-dom\";\nimport { createSelector } from \"reselect\";\nimport { styles } from \"pages/management/host/styles\";\n\n// component local state interface\ninterface LocalState {\n\thost: Host;\n\tactiveTab: number;\n\tlogs: any[];\n\tanchorEl: any;\n}\n\ninterface LocalProps {}\n\n// PROPS\ninterface ReduxStateProps {\n\thost: Host;\n\tcluster: Cluster;\n\thasRunningJobs: boolean;\n}\n\ninterface ReduxDispatchProps {\n\tshowSnackbar: (snackbar: SnackbarActionPayload) => void;\n\treloadHosts: (clusterID: number) => void;\n}\n\ntype Props = LocalProps &\n\tReduxStateProps &\n\tReduxDispatchProps &\n\tWithStyles &\n\tWithTheme &\n\tRouteComponentProps;\n\ninterface Snapshot {\n\thasHostChanged: boolean;\n}\n\n// COMPONENT\nclass HostManagerComponent extends React.Component {\n\t_isMounted = false;\n\n\t_cancelRequest: any;\n\t_scheduledFetch: any;\n\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\t// console.log(\"props\", props);\n\n\t\tif (props.host) {\n\t\t\tthis.state = {\n\t\t\t\thost: props.host,\n\t\t\t\tactiveTab: 0,\n\t\t\t\tlogs: [],\n\t\t\t\tanchorEl: undefined\n\t\t\t};\n\t\t\tthis.getLogs();\n\t\t} else {\n\t\t\tthis.props.showSnackbar({\n\t\t\t\tmsg: `Error loading host data`,\n\t\t\t\tsnackbarType: SNACKBAR_TYPE.ERROR\n\t\t\t});\n\t\t}\n\t}\n\n\tgetLogs = () => {\n\t\tthis.props.host &&\n\t\t\tLogsApi.fetchHostLog(this.props.host).then((response: AxiosResponse) => {\n\t\t\t\tconsole.log(\"deployment logs\", response.data);\n\n\t\t\t\tconst splitLogs = response.data.data.attributes.contents.split(\"\\n\");\n\t\t\t\t// console.log(\"split logs\", splitLogs);\n\n\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t...state,\n\t\t\t\t\tlogs: splitLogs.reduce((result: any, row: string) => {\n\t\t\t\t\t\t// console.log(\"raw line\", row);\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst line = JSON.parse(row);\n\n\t\t\t\t\t\t\t// console.log(\"line\", line);\n\n\t\t\t\t\t\t\tresult.push({\n\t\t\t\t\t\t\t\tmsg: `${line.time} | ${line.msg}`\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t// console.warn(\"Parsing log line failed\", e);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}, [])\n\t\t\t\t}));\n\t\t\t});\n\t};\n\n\tgetSnapshotBeforeUpdate(\n\t\tprevProps: Readonly,\n\t\tprevState: Readonly\n\t): any | null {\n\t\treturn {\n\t\t\thasHostChanged:\n\t\t\t\tprevProps.match.params.hostID !== this.props.match.params.hostID\n\t\t};\n\t}\n\n\tcomponentDidUpdate(\n\t\tprevProps: Readonly,\n\t\tprevState: Readonly,\n\t\tsnapshot?: Snapshot\n\t): void {\n\t\tif (snapshot && snapshot.hasHostChanged) {\n\t\t\tconst { host } = this.props;\n\n\t\t\tif (host) {\n\t\t\t\tthis.setState(() => ({\n\t\t\t\t\thost,\n\t\t\t\t\tlogs: [],\n\t\t\t\t\tanchorEl: undefined\n\t\t\t\t}));\n\t\t\t\tthis.getLogs();\n\t\t\t\tthis.clearAsyncRequests();\n\t\t\t} else {\n\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\tmsg: `Error loading data.`\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tcomponentDidMount(): void {\n\t\tthis._isMounted = true;\n\t}\n\n\tcomponentWillUnmount(): void {\n\t\tthis._isMounted = false;\n\n\t\tthis.clearAsyncRequests();\n\t}\n\n\tclearAsyncRequests(): void {\n\t\tif (this._cancelRequest) this._cancelRequest();\n\t\tif (this._scheduledFetch) clearTimeout(this._scheduledFetch);\n\t}\n\n\tonDeleteClick = (host: Host, force?: boolean): void => {\n\t\tconst message = force\n\t\t\t? `Host will be deleted if possible. If deletion fails, the host will still be removed from Galera Manager.`\n\t\t\t: `Host will be deleted.`;\n\n\t\tGMDialogService.showConfirm({\n\t\t\ttitle: force\n\t\t\t\t? `Force delete host ${this.state.host.name}?`\n\t\t\t\t: `Delete host ${this.state.host.name}?`,\n\t\t\tmessage,\n\t\t\tconfirmText: force ? \"Force delete\" : \"Delete\",\n\t\t\tdeclineText: \"Cancel\",\n\t\t\tdestructiveConfirm: true\n\t\t}).then(\n\t\t\t() => {\n\t\t\t\tHostsAPI.delete(host, force).then(\n\t\t\t\t\t(job: Job) => {\n\t\t\t\t\t\tconsole.log(\"host delete job\", job);\n\n\t\t\t\t\t\tJobsService.trackJob(job).then(\n\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\t\t\tmsg: `Host '${host.name}' successfully deleted`\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t// redirect to cluster if host still open\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tthis.props.location.pathname.endsWith(\n\t\t\t\t\t\t\t\t\t\t`/clusters/${host.clusterID}/hosts/${host.id}`\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tthis.props.history.push(`/clusters/${host.clusterID}`);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tthis.props.reloadHosts(host.clusterID);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t(err: any) => {\n\t\t\t\t\t\t\t\tconsole.error(\"Host deletion job monitor error:\", err);\n\n\t\t\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\t\t\tmsg: `Host '${host.name}' deletion job error.`,\n\t\t\t\t\t\t\t\t\tsnackbarType: SNACKBAR_TYPE.ERROR\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t\t(err: AxiosError) => {\n\t\t\t\t\t\tconsole.error(\"Error deleting host:\", err);\n\n\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\tmsg: `Host '${host.name}' could not be deleted`,\n\t\t\t\t\t\t\tsnackbarType: SNACKBAR_TYPE.ERROR\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\tmsg: `Host '${host.name}' is being deleted`\n\t\t\t\t});\n\t\t\t},\n\t\t\t() => {}\n\t\t);\n\n\t\tthis.setState({\n\t\t\tanchorEl: null\n\t\t});\n\t};\n\n\tonMoreClick = (event: any) => {\n\t\t// isExpanded menu\n\t\tthis.setState({ ...this.state, anchorEl: event.currentTarget });\n\t};\n\n\tonMenuClose = () => {\n\t\tthis.setState({ ...this.state, anchorEl: null });\n\t};\n\n\trender(): React.ReactNode {\n\t\tconst { classes, theme, hasRunningJobs, cluster } = this.props;\n\n\t\tif (!this.state) return false;\n\n\t\tconst { host, activeTab, anchorEl } = this.state;\n\n\t\tconst hostState: HOST_STATE = HostUtils.getHostState(host.deploymentStatus);\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\taction={\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\tthis.onDeleteClick(host);\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\tthis.onDeleteClick(host, true);\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\ttitle={host.name}\n\t\t\t\t\tsubheader={host.system}\n\t\t\t\t/>\n\t\t\t\t\n\t\t\t\t, newValue: any) => {\n\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\tactiveTab: newValue\n\t\t\t\t\t\t}));\n\t\t\t\t\t}}\n\t\t\t\t\tvariant=\"fullWidth\"\n\t\t\t\t>\n\t\t\t\t\tLogs} />\n\t\t\t\t\tConfiguration\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tJobs\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\tJobs\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{(activeTab === 0 && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t this.state.logs[index]}\n\t\t\t\t\t\t\t\tcolumns={[\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\twidth: 200,\n\t\t\t\t\t\t\t\t\t\tflexGrow: 1,\n\t\t\t\t\t\t\t\t\t\tlabel: \"\",\n\t\t\t\t\t\t\t\t\t\tdataKey: \"msg\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\n\t\t\t\t\t)) ||\n\t\t\t\t\t\t(activeTab === 1 && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)) ||\n\t\t\t\t\t\t(activeTab === 2 && )}\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\n// selectors\nconst makeHostSelector = () =>\n\tcreateSelector(\n\t\t(state: AppState) => state.hostList,\n\t\t(state: AppState, props: Props) => props.match.params.clusterID,\n\t\t(state: AppState, props: Props) => props.match.params.hostID,\n\t\t(hostMap: Map, clusterID: number, hostID: number): Host => {\n\t\t\tconst hostList = hostMap.get(clusterID) || [];\n\n\t\t\tconst host = hostList.find((host: Host) => host.id === hostID);\n\t\t\tif (!host) throw Error(`Could not find host`);\n\n\t\t\treturn host;\n\t\t}\n\t);\n\nconst makeClusterSelector = () =>\n\tcreateSelector(\n\t\t(state: AppState) => state.clusterList,\n\t\t(state: AppState, props: Props) => props.match.params.clusterID,\n\t\t(clusterList: Cluster[], clusterID: number): Cluster => {\n\t\t\tconst cluster = clusterList.find(\n\t\t\t\t(cluster: Cluster) => cluster.id === clusterID\n\t\t\t);\n\n\t\t\tif (!cluster) throw Error(`Could not find cluster`);\n\n\t\t\treturn cluster;\n\t\t}\n\t);\n\nconst makeHasRunningJobs = () =>\n\tcreateSelector(\n\t\t(state: AppState) => state.jobMonitor.runningJobList,\n\t\t(state: AppState, props: Props) => props.match.params.clusterID,\n\t\t(state: AppState, props: Props) => props.match.params.hostID,\n\t\t(jobList: JobTracking[], clusterId: number, hostId: number) =>\n\t\t\tjobList.some(\n\t\t\t\t(job: JobTracking) =>\n\t\t\t\t\tjob.meta.cluster_id === clusterId &&\n\t\t\t\t\tjob.meta.host_id === hostId &&\n\t\t\t\t\tjob.status === JOB_STATUS.RUNNING\n\t\t\t)\n\t);\n\n// REDUX MAPPINGS\nconst mapGlobalStateToProps = (state: AppState, props: Props) => {\n\tconst hostSelector = makeHostSelector();\n\tconst clusterSelector = makeClusterSelector();\n\tconst hasRunningJobsSelector = makeHasRunningJobs();\n\n\treturn {\n\t\thost: hostSelector(state, props),\n\t\tcluster: clusterSelector(state, props),\n\t\thasRunningJobs: hasRunningJobsSelector(state, props)\n\t};\n};\n\nconst mapGlobalDispatchToProps = (dispatch: any) => {\n\treturn {\n\t\treloadHosts: (clusterID: number) => {\n\t\t\tdispatch(hostListFetchRequested(clusterID));\n\t\t},\n\t\tshowSnackbar: (snackbar: SnackbarActionPayload) => {\n\t\t\tdispatch(showSnackbar(snackbar));\n\t\t}\n\t};\n};\n\nexport default withStyles(styles, { withTheme: true })(\n\tconnect(mapGlobalStateToProps, mapGlobalDispatchToProps)(HostManagerComponent)\n);\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from '@mui/styles/createStyles';\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\tcard: {\n\t\t\twidth: \"100%\"\n\t\t\t// [theme.breakpoints.up(\"sm\")]: {\n\t\t\t// \twidth: 700\n\t\t\t// }\n\t\t\t// height: \"100%\"\n\t\t}\n\t});\n","import { Grid, Typography } from \"@mui/material\";\nimport { WithStyles } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport moment from \"moment\";\nimport { HostLog } from \"pages/management/host/types\";\nimport React from \"react\";\nimport { styles } from \"components/logViewer/styles\";\n\ninterface LocalProps {\n\tlogLine: HostLog;\n}\n\ntype Props = LocalProps & WithStyles;\n\nclass DeploymentLogMessage extends React.Component {\n\tshouldComponentUpdate(\n\t\tnextProps: Readonly,\n\t\tnextState: Readonly,\n\t\tnextContext: any\n\t): boolean {\n\t\treturn (\n\t\t\tthis.props.logLine.msg !== nextProps.logLine.msg ||\n\t\t\tthis.props.logLine.time !== nextProps.logLine.time\n\t\t);\n\t}\n\n\trender():\n\t\t| React.ReactElement>\n\t\t| string\n\t\t| number\n\t\t| {}\n\t\t| React.ReactNodeArray\n\t\t| React.ReactPortal\n\t\t| boolean\n\t\t| null\n\t\t| undefined {\n\t\tconst { logLine, classes } = this.props;\n\n\t\tfunction renderLine(msg: string, index: number) {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{`${moment(logLine.time).format(\"MMM DD, YYYY HH:mm:ss\")} | ${\n\t\t\t\t\t\t\tlogLine[\"channel-type\"]?.padEnd(14, \" \") || \"galera-manager\"\n\t\t\t\t\t\t} | ${msg.trim()}`}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t);\n\t\t}\n\n\t\tconst msgs = logLine.msg.split(\"\\r\");\n\n\t\treturn msgs\n\t\t\t.filter((msg: string) => {\n\t\t\t\treturn msg.trim() !== \"\" && msg.trim() !== \"\\n\";\n\t\t\t})\n\t\t\t.map((msg: string, index: number) =>\n\t\t\t\trenderLine(msg.replace(\"\\n\", \"\"), index)\n\t\t\t);\n\t}\n}\n\nexport default withStyles(styles)(DeploymentLogMessage);\n","import axios from \"axios\";\nimport { User } from \"pages/users/types\";\nimport jwt from \"jsonwebtoken\";\nimport { deattribute, serialise } from \"kitsu-core\";\nimport APIUtils from \"services/api/utils\";\nimport AppEnvironment from \"services/appEnvironment\";\nimport { Credentials, JwtData } from \"store/auth/types\";\nimport { Config } from \"services/config/Config\";\n\nconst ENDPOINT = \"login\";\n\nexport default class AuthAPI {\n\tstatic async login(credentials: Credentials): Promise {\n\t\ttry {\n\t\t\tconst data = serialise(\"login\", credentials, \"POST\");\n\t\t\tconst response = await axios.post(APIUtils.getUrl(ENDPOINT), data);\n\t\t\treturn deattribute({ ...response.data.data }) as User;\n\t\t} catch (e) {\n\t\t\tthrow new Error(APIUtils.APIErrorResponseHandler(e));\n\t\t}\n\t}\n\n\tstatic async logout() {\n\t\ttry {\n\t\t\tawait axios.post(APIUtils.getUrl(\"logout\"));\n\t\t} catch (e) {\n\t\t\tthrow new Error(APIUtils.APIErrorResponseHandler(e));\n\t\t}\n\t}\n\n\tstatic async refreshWsAccessToken(): Promise {\n\t\ttry {\n\t\t\tconst response = await axios.get(\n\t\t\t\t`${AppEnvironment.getApiAddress()}/${AppEnvironment.getApiVersion()}/jwt/access`\n\t\t\t);\n\n\t\t\tAuthAPI.verifyJwtToken(response.data.access.value);\n\t\t\treturn response.data.access.value;\n\t\t} catch (e: any) {\n\t\t\tthrow new Error(APIUtils.APIErrorResponseHandler(e));\n\t\t}\n\t}\n\n\tstatic verifyJwtToken(token: string): JwtData {\n\t\treturn jwt.verify(token, Config.jtw_public_token) as JwtData;\n\t}\n}\n","import {\n\tSYSTEM_STATUS_ACTION,\n\tBackendSetOnlineAction,\n\tBackendSetOfflineAction,\n\tBackendSetWeakAction,\n\tInfluxDBSetOnlineAction,\n\tInfluxDBSetWeakAction,\n\tInfluxDBSetOfflineAction,\n\tWsSetOnlineAction,\n\tWsSetOfflineAction\n} from \"store/systemStatus/types\";\n\nexport const setBackendOnline = (): BackendSetOnlineAction => ({\n\ttype: SYSTEM_STATUS_ACTION.BACKEND_SET_ONLINE\n});\n\nexport const setBackendWeak = (): BackendSetWeakAction => ({\n\ttype: SYSTEM_STATUS_ACTION.BACKEND_SET_WEAK\n});\n\nexport const setBackendOffline = (): BackendSetOfflineAction => ({\n\ttype: SYSTEM_STATUS_ACTION.BACKEND_SET_OFFLINE\n});\n\nexport const setInfluxDBOnline = (): InfluxDBSetOnlineAction => ({\n\ttype: SYSTEM_STATUS_ACTION.INFLUXDB_SET_ONLINE\n});\n\nexport const setInfluxDBWeak = (): InfluxDBSetWeakAction => ({\n\ttype: SYSTEM_STATUS_ACTION.INFLUXDB_SET_WEAK\n});\n\nexport const setInfluxDBOffline = (): InfluxDBSetOfflineAction => ({\n\ttype: SYSTEM_STATUS_ACTION.INFLUXDB_SET_OFFLINE\n});\n\nexport const setWsOnline = (): WsSetOnlineAction => ({\n\ttype: SYSTEM_STATUS_ACTION.WS_SET_ONLINE\n});\n\nexport const setWsOffline = (): WsSetOfflineAction => ({\n\ttype: SYSTEM_STATUS_ACTION.WS_SET_OFFLINE\n});\n","import { AppState } from \"AppState\";\nimport { appStore } from \"index\";\nimport { Host, HostLog } from \"pages/management/host/types\";\nimport { Subject } from \"rxjs\";\nimport AuthAPI from \"services/api/AuthAPI\";\nimport AppEnvironment from \"services/appEnvironment\";\nimport { JOB_STATUS, JobTracking } from \"services/jobs/types\";\nimport {\n\taddRunningJob,\n\tremoveRunningJob,\n\tsetTrackedJob\n} from \"store/jobsMonitor/actions\";\nimport { setWsOffline, setWsOnline } from \"../../store/systemStatus/actions\";\n\nclass WsHandlerClass {\n\tprivate connection: WebSocket | undefined;\n\tprivate hostLogSubscriptions: Map> = new Map();\n\tprivate SEND_RETRIES = 5;\n\tprivate SEND_RETRY_TIMEOUT = 3000;\n\n\tpublic async connect(): Promise {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tif (this.isConnected()) {\n\t\t\t\tconsole.info(\"WebSocket is already connected!\");\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\tthis.connection = new WebSocket(\n\t\t\t\t\t`${AppEnvironment.getWsHostAddress()}/v2/ws`\n\t\t\t\t);\n\n\t\t\t\tthis.connection.onopen = (event: Event) => {\n\t\t\t\t\tconsole.log(\"WebSocket connection open!\");\n\t\t\t\t\tthis.authenticate();\n\t\t\t\t\tappStore.dispatch(setWsOnline());\n\t\t\t\t\tresolve();\n\t\t\t\t};\n\n\t\t\t\tthis.connection.onclose = (event: CloseEvent) => {\n\t\t\t\t\tconsole.warn(\"WS connection closed:\", event);\n\t\t\t\t\tappStore.dispatch(setWsOffline());\n\t\t\t\t};\n\n\t\t\t\tthis.connection.onerror = (event: Event) => {\n\t\t\t\t\tconsole.error(\"WebSocket connection error:\", event);\n\t\t\t\t\treject();\n\t\t\t\t};\n\n\t\t\t\tthis.connection.onmessage = (event: MessageEvent) => {\n\t\t\t\t\tconsole.log(\"WebSocket message received\", JSON.parse(event.data));\n\n\t\t\t\t\tconst message = JSON.parse(event.data);\n\n\t\t\t\t\tswitch (message.type) {\n\t\t\t\t\t\tcase \"auth\":\n\t\t\t\t\t\t\tthis.authenticate();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"log\":\n\t\t\t\t\t\t\tthis.handleLogMessages(message);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"jobs\":\n\t\t\t\t\t\t\tthis.handleJobsMessages(message);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t})\n\t}\n\n\tpublic disconnect() {\n\t\tthis.isConnected() && this.connection?.close(1000, \"Monitoring stopped\");\n\t}\n\n\tpublic isConnected(): boolean {\n\t\treturn this.connection?.readyState === WebSocket.OPEN;\n\t}\n\n\tprivate async authenticate() {\n\t\tawait AuthAPI.refreshWsAccessToken().then((jwt: string) => {\n\t\t\tthis.sendMsg({\n\t\t\t\ttype: \"auth\",\n\t\t\t\tvalue: jwt\n\t\t\t});\n\t\t});\n\t}\n\n\tprivate async sendMsg(msg: any, attempt = 0) {\n\t\t// logger.info('sendMsg', msg, attempt, this.client.readyState, this.client.readyState !== WebSocket.OPEN);\n\t\t// console.log(\n\t\t// \t`Sending WS message: ${JSON.stringify(msg)}. Attempts #${\n\t\t// \t\tattempt + 1\n\t\t// \t}. WS ${\n\t\t// \t\tthis.connection?.readyState !== WebSocket.OPEN ? \" not \" : \"\"\n\t\t// \t} open`\n\t\t// );\n\n\t\tif (attempt >= this.SEND_RETRIES) {\n\t\t\tconsole.error(\n\t\t\t\t`WS connection not open after ${attempt + 1} attempts to send msg.`\n\t\t\t);\n\t\t} else if (this.connection?.readyState !== WebSocket.OPEN) {\n\t\t\t// if connection is undefined or closed - connect\n\t\t\tif (!this.connection || this.connection.readyState === WebSocket.CLOSED) {\n\t\t\t\tawait this.connect();\n\t\t\t} else if (this.connection.readyState === WebSocket.CONNECTING) {\n\t\t\t\tconsole.warn(\"WS connection is in status CONNECTING.\");\n\t\t\t} else if (this.connection.readyState === WebSocket.CLOSING) {\n\t\t\t\tconsole.warn(\"WS connection is in status CLOSING.\");\n\t\t\t}\n\n\t\t\tconsole.warn(`WS connection not open yet, retrying to send msg...`);\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.sendMsg(msg, ++attempt);\n\t\t\t}, this.SEND_RETRY_TIMEOUT);\n\t\t} else {\n\t\t\tthis.connection.send(JSON.stringify(msg));\n\t\t\t// console.info(`WS message sent: ${JSON.stringify(msg)}`);\n\t\t}\n\t}\n\n\tprivate handleLogMessages(data: any) {\n\t\t// console.log(\"log message received\", data.value);\n\t\tconst log = data.value as HostLog;\n\t\t// console.log(\"log message\");\n\t\tconst subscriptionStr = `cluster:${log[\"cluster-id\"]}:host:${log[\"host-id\"]}`;\n\t\t// console.log(\n\t\t// \t\"subscription str\",\n\t\t// \tsubscriptionStr,\n\t\t// \tthis._hostLogSubscriptions\n\t\t// );\n\t\tif (this.hostLogSubscriptions.has(subscriptionStr) && log.msg.trim()) {\n\t\t\tconst observable = this.hostLogSubscriptions.get(subscriptionStr);\n\t\t\tobservable && observable.next(log);\n\t\t}\n\t}\n\n\tprivate handleJobsMessages(data: any) {\n\t\tconsole.log(\"job status change message\", data);\n\n\t\tconst jobUpdate = data.value as JobTracking;\n\n\t\t// RUNNING JOBS\n\t\t// if job status is running - add it to store\n\t\tif (jobUpdate.status === JOB_STATUS.RUNNING) {\n\t\t\tappStore.dispatch(addRunningJob(jobUpdate));\n\t\t} else {\n\t\t\tconst appState = appStore.getState() as AppState;\n\n\t\t\t// if job status is not running, and it's found in running jobs - remove it from the list of running jobs\n\t\t\tif (\n\t\t\t\tappState.jobMonitor.runningJobList.find(\n\t\t\t\t\t(job: JobTracking) => job.id === jobUpdate.id\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tappStore.dispatch(removeRunningJob(jobUpdate.id));\n\t\t\t}\n\t\t}\n\n\t\t// TRACKED JOBS\n\t\tconst state = appStore.getState() as AppState;\n\t\tconst { jobsToTrack } = state.jobMonitor;\n\t\tconsole.log(\n\t\t\t\"jobsToTrack\",\n\t\t\tjobsToTrack,\n\t\t\tjobUpdate.id,\n\t\t\tjobsToTrack.includes(jobUpdate.id)\n\t\t);\n\t\tif (jobsToTrack.includes(jobUpdate.id)) {\n\t\t\tappStore.dispatch(setTrackedJob(jobUpdate));\n\t\t}\n\t}\n\n\tpublic subscribeToLogs(host: Host): Subject {\n\t\t// console.log(\"subscribe to logs\", subscription, this._connection);\n\n\t\tconst subscriptionValue = `cluster:${host.clusterID}:host:${host.id}`;\n\n\t\tthis.sendMsg({\n\t\t\ttype: \"subscribe\",\n\t\t\tvalue: subscriptionValue\n\t\t});\n\t\tconst logs: Subject = new Subject();\n\n\t\tthis.hostLogSubscriptions.set(subscriptionValue, logs);\n\n\t\treturn logs;\n\t}\n\n\tpublic unsubscribeFromLogs(host: Host) {\n\t\t// send unsubscribe message\n\t\tthis.sendMsg({\n\t\t\ttype: \"unsubscribe\",\n\t\t\tvalue: `host:${host.name}`\n\t\t});\n\n\t\t// delete observable\n\t\tif (this.hostLogSubscriptions.has(host.name)) {\n\t\t\tthis.hostLogSubscriptions.delete(host.name);\n\t\t}\n\t}\n}\n\nexport const WSHandler = new WsHandlerClass();\n","import {\n\tCancelOutlined,\n\tClose,\n\tDone,\n\tErrorOutline,\n\tPlayCircleOutline\n} from \"@mui/icons-material\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogTitle,\n\tFormControlLabel,\n\tGrid,\n\tIconButton,\n\tListItemText,\n\tSwitch,\n\tTooltip,\n\tTypography\n} from \"@mui/material\";\nimport { WithStyles } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { HostLog } from \"pages/management/host/types\";\nimport {\n\tDEPLOYMENT_STEP_STATUS,\n\tDEPLOYMENT_STEP_TYPE,\n\tDeploymentJob,\n\tDeploymentStep\n} from \"pages/management/node/nodeDeploymentDialog/types\";\nimport DeploymentLogMessage from \"components/logViewer/DeploymentLogMessage\";\nimport { Adjust } from \"mdi-material-ui\";\nimport React from \"react\";\nimport { bufferTime } from \"rxjs/operators\";\nimport { styles } from \"pages/management/node/nodeDeploymentDialog/nodeDeploymentMonitor/styles\";\nimport { WSHandler } from \"services/webSocketHandler/WSHandler.ws\";\n\ninterface LocalState {\n\tlogs: HostLog[];\n\tisSubscribedToLogs: boolean;\n\tlastLogMsg: string;\n\tshowLog: boolean;\n\tautoScrollToBottom: boolean;\n}\n\ninterface LocalProps {\n\tdeploymentJob: DeploymentJob;\n}\n\ntype Props = LocalProps & WithStyles;\n\nclass NodeDeploymentMonitorComponent extends React.Component<\n\tProps,\n\tLocalState\n> {\n\t// element placed at the bottom of the dialog (after log messages)\n\t// used for auto scrolling to bottom\n\tbottomElement?: HTMLDivElement = undefined;\n\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\tshowLog: false,\n\t\t\tisSubscribedToLogs: false,\n\t\t\tlastLogMsg: \"Deployment started...\",\n\t\t\tlogs: [],\n\t\t\tautoScrollToBottom: true\n\t\t};\n\t}\n\n\tsubscribeToLogs(): void {\n\t\tconst { host } = this.props.deploymentJob;\n\n\t\t// console.log(\"subscribeToLogs\", cluster, host, node);\n\t\t// subscribe to web socket messages containing deployment logs\n\t\tconst $log = WSHandler.subscribeToLogs(host);\n\n\t\tthis.setState({ isSubscribedToLogs: true });\n\n\t\t// pipe to show last log msg\n\t\t$log.pipe(bufferTime(200)).subscribe({\n\t\t\tnext: (newLogs: HostLog[]) => {\n\t\t\t\tif (newLogs.length > 0) {\n\t\t\t\t\tthis.setState({ lastLogMsg: newLogs.splice(-1)[0].msg });\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// pipe to fill full deployment log\n\t\t$log.pipe(bufferTime(500)).subscribe({\n\t\t\tnext: (newLogs: HostLog[]) => {\n\t\t\t\tif (newLogs.length > 0) {\n\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\tlogs: [...state.logs, ...newLogs]\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tcomponentWillUnmount(): void {\n\t\tWSHandler.unsubscribeFromLogs(this.props.deploymentJob.host);\n\t}\n\n\tcomponentDidUpdate(\n\t\tprevProps: Readonly,\n\t\tprevState: Readonly,\n\t\tsnapshot?: any\n\t): void {\n\t\t// console.log(\n\t\t// \t\"componentDidUpdate\",\n\t\t// \tthis.state.isSubscribedToLogs,\n\t\t// \tthis.props.deploymentJob.host.id\n\t\t// );\n\t\t// when you receive host ID for the first time, subscribe to logs\n\t\tif (!this.state.isSubscribedToLogs && this.props.deploymentJob.host.id) {\n\t\t\tthis.subscribeToLogs();\n\t\t}\n\n\t\tthis.scrollToBottom();\n\t}\n\n\tscrollToBottom() {\n\t\tif (this.state.autoScrollToBottom) this.bottomElement?.scrollIntoView();\n\t}\n\n\trender():\n\t\t| React.ReactElement>\n\t\t| string\n\t\t| number\n\t\t| {}\n\t\t| React.ReactNodeArray\n\t\t| React.ReactPortal\n\t\t| boolean\n\t\t| null\n\t\t| undefined {\n\t\tconst { deploymentJob, classes } = this.props;\n\t\tconst { lastLogMsg, showLog, logs, autoScrollToBottom } = this.state;\n\n\t\tfunction getTooltipText(\n\t\t\tstepType: DEPLOYMENT_STEP_TYPE,\n\t\t\tstepStatus: DEPLOYMENT_STEP_STATUS\n\t\t): string {\n\t\t\tlet retText;\n\n\t\t\tswitch (stepType) {\n\t\t\t\tcase DEPLOYMENT_STEP_TYPE.HOST_DEPLOY:\n\t\t\t\t\tretText = \"Host deployment: \";\n\t\t\t\t\tbreak;\n\t\t\t\tcase DEPLOYMENT_STEP_TYPE.NODE_INSTALL:\n\t\t\t\t\tretText = \"Node installation: \";\n\t\t\t\t\tbreak;\n\t\t\t\tcase DEPLOYMENT_STEP_TYPE.NODE_START:\n\t\t\t\t\tretText = \"Node start: \";\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tswitch (stepStatus) {\n\t\t\t\tcase DEPLOYMENT_STEP_STATUS.CANCELLED:\n\t\t\t\t\tretText += \"Cancelled\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase DEPLOYMENT_STEP_STATUS.PENDING:\n\t\t\t\t\tretText += \"Pending\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase DEPLOYMENT_STEP_STATUS.RUNNING:\n\t\t\t\t\tretText += \"Running\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase DEPLOYMENT_STEP_STATUS.DONE:\n\t\t\t\t\tretText += \"Done\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase DEPLOYMENT_STEP_STATUS.FAILED:\n\t\t\t\t\tretText += \"Failed\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn retText;\n\t\t}\n\n\t\tfunction renderStepIndicators(deploymentJob: DeploymentJob) {\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t{deploymentJob.steps\n\t\t\t\t\t\t.sort(\n\t\t\t\t\t\t\t(step1: DeploymentStep, step2: DeploymentStep) =>\n\t\t\t\t\t\t\t\tstep1.type - step2.type\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.map((step: DeploymentStep) => (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{step.status === DEPLOYMENT_STEP_STATUS.PENDING &&\n\t\t\t\t\t\t\t\t\t(deploymentJob.isDone ? (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t{step.status === DEPLOYMENT_STEP_STATUS.RUNNING && (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{step.status === DEPLOYMENT_STEP_STATUS.FAILED && (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{step.status === DEPLOYMENT_STEP_STATUS.DONE && (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t))}\n\t\t\t\t\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tthis.setState({ showLog: true });\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tdata-testid={`${deploymentJob.node.name}-last-log-msg`}\n\t\t\t\t\t\t\t\tprimary={`${deploymentJob.node.name} (${deploymentJob.host.system}/${deploymentJob.node.dbEngine})`}\n\t\t\t\t\t\t\t\tprimaryTypographyProps={{\n\t\t\t\t\t\t\t\t\tstyle: { cursor: \"pointer\" }\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tsecondary={\n\t\t\t\t\t\t\t\t\tdeploymentJob.steps[0].errorMessage ||\n\t\t\t\t\t\t\t\t\tdeploymentJob.steps[1].errorMessage ||\n\t\t\t\t\t\t\t\t\tdeploymentJob.steps[2]?.errorMessage ||\n\t\t\t\t\t\t\t\t\tlastLogMsg\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tsecondaryTypographyProps={{\n\t\t\t\t\t\t\t\t\tnoWrap: true,\n\t\t\t\t\t\t\t\t\tclasses: { body2: classes.lastLogText },\n\t\t\t\t\t\t\t\t\tcolor:\n\t\t\t\t\t\t\t\t\t\tdeploymentJob.steps[0].errorMessage ||\n\t\t\t\t\t\t\t\t\t\tdeploymentJob.steps[1].errorMessage ||\n\t\t\t\t\t\t\t\t\t\tdeploymentJob.steps[2]?.errorMessage\n\t\t\t\t\t\t\t\t\t\t\t? \"error\"\n\t\t\t\t\t\t\t\t\t\t\t: \"initial\"\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t\t\t{renderStepIndicators(deploymentJob)}\n\t\t\t\t\t\t{/**/}\n\t\t\t\t\t\t{/*\t*/}\n\t\t\t\t\t\t{/*\t\t {*/}\n\t\t\t\t\t\t{/*\t\t\t\tthis.setState({ showLog: true });*/}\n\t\t\t\t\t\t{/*\t\t\t}}*/}\n\t\t\t\t\t\t{/*\t\t>*/}\n\t\t\t\t\t\t{/*\t\t\t*/}\n\t\t\t\t\t\t{/*\t\t*/}\n\t\t\t\t\t\t{/*\t*/}\n\t\t\t\t\t\t{/**/}\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t {\n\t\t\t\t\t\tif (reason === \"escapeKeyDown\") {\n\t\t\t\t\t\t\tthis.setState({ showLog: false });\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tmaxWidth=\"xl\"\n\t\t\t\t\tfullScreen={true}\n\t\t\t\t\tfullWidth={true}\n\t\t\t\t\topen={showLog}\n\t\t\t\t>\n\t\t\t\t\t\n\t\t\t\t\t\t{`${deploymentJob.node.name} deployment logs`}\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\t\tautoScrollToBottom: !autoScrollToBottom\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tname=\"autoScrollSwitch\"\n\t\t\t\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlabelPlacement=\"start\"\n\t\t\t\t\t\t\tlabel=\"Auto-scroll to bottom\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tProgress:\n\t\t\t\t\t\t\t{renderStepIndicators(deploymentJob)}\n\t\t\t\t\t\t\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tthis.setState({ showLog: false });\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tsize=\"large\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{logs.map((log: HostLog, index: number) => (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t))}\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tthis.bottomElement = el;\n\t\t\t\t\t\t\t\tthis.scrollToBottom();\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default withStyles(styles)(NodeDeploymentMonitorComponent);\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from '@mui/styles/createStyles';\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\tjobDoneIcon: {\n\t\t\tcolor: \"green\"\n\t\t},\n\t\tjobRunningIcon: {\n\t\t\tcolor: theme.palette.primary.main,\n\t\t\tanimation: \"$blinker 1.2s infinite ease-in-out\"\n\t\t},\n\t\t\"@keyframes blinker\": {\n\t\t\t\"50%\": {\n\t\t\t\topacity: 0.5\n\t\t\t}\n\t\t},\n\t\tjobPendingIcon: {\n\t\t\tcolor: \"grey\"\n\t\t},\n\t\tjobCancelledIcon: {\n\t\t\tcolor: \"grey\"\n\t\t},\n\t\tjobErrorIcon: {\n\t\t\tcolor: \"red\"\n\t\t},\n\t\tactions: {\n\t\t\tmarginLeft: \"8px\",\n\t\t\tmarginBottom: \"5px\"\n\t\t},\n\t\tlastLogText: {\n\t\t\tfontSize: \"0.7em\",\n\t\t\tfontFamily: \"monospace\",\n\t\t\tbackgroundColor: \"black\",\n\t\t\tcolor: \"white\",\n\t\t\tpadding: \"2px\",\n\t\t\tcursor: \"pointer\"\n\t\t},\n\t\tdialogTitle: {\n\t\t\tpaddingTop: theme.spacing(1),\n\t\t\tpaddingBottom: theme.spacing(1),\n\t\t\tpaddingLeft: theme.spacing(2),\n\t\t\tpaddingRight: theme.spacing(2)\n\t\t},\n\t\tlogContent: {\n\t\t\tbackgroundColor: \"black\",\n\t\t\tcolor: \"white\"\n\t\t},\n\t\tlogsTypography: {\n\t\t\tfontSize: \"0.9em\",\n\t\t\tfontFamily: \"monospace\"\n\t\t},\n\t\tcloseButton: {\n\t\t\tposition: \"absolute\",\n\t\t\tright: theme.spacing(2),\n\t\t\ttop: theme.spacing(2),\n\t\t\tcolor: theme.palette.grey[500]\n\t\t},\n\t\tgaleraManagerLogMessage: {\n\t\t\tcolor: theme.palette.primary.main\n\t\t},\n\t\thostStderrMessage: {\n\t\t\tcolor: theme.palette.error.main\n\t\t}\n\t});\n","// MUI\nimport {\n\tCheckbox,\n\tFormControl,\n\tFormControlLabel,\n\tGrid,\n\tInputLabel,\n\tMenuItem,\n\tSelect,\n\tTextField,\n\tTooltip\n} from \"@mui/material\";\nimport { WithStyles } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\n// redux\nimport { AppState } from \"AppState\";\nimport { CONNECTION_TEST_STATUS } from \"components/connectionTestDialog/types\";\nimport DbEngineConfigButtonComponent from \"components/form/dbEngineConfigEditor/DbEngineConfigButtonComponent\";\nimport DigitalOceanConfigComponent from \"components/form/digitalOceanConfig/DigitalOceanConfigComponent\";\nimport { DigitalOceanConfig } from \"components/form/digitalOceanConfig/types\";\nimport EC2ConfigComponent from \"components/form/ec2Config/EC2ConfigComponent\";\nimport SSHKeysEditor from \"components/form/SSHKeysEditor/SSHKeysEditorComponent\";\nimport { CLUSTER_TYPE } from \"pages/management/cluster/clusterCreateWizard/types\";\nimport { Cluster } from \"pages/management/cluster/types\";\nimport ClusterUtils from \"pages/management/cluster/utils\";\nimport {\n\tEC2Config,\n\tHost,\n\tHOST_SYSTEM,\n\tHOST_TYPE\n} from \"pages/management/host/types\";\nimport HostUtils from \"pages/management/host/utils\";\nimport { styles } from \"pages/management/node/nodeForm/styles\";\nimport { Node, NODE_DB_ENGINE } from \"pages/management/node/types\";\nimport { ChangeEvent, Component, FormEvent } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createSelector } from \"reselect\";\n\nimport FormTitle from \"components/form/title/FormTitle\";\nimport { HostSystemFieldComponent } from \"../../../../components/form/formFields/HostSystemFieldComponent\";\n\ninterface LocalState {\n\tformValidation: {\n\t\tnodeName?: {\n\t\t\tisInvalid: boolean;\n\t\t\tmessage: string;\n\t\t};\n\t\thostName?: {\n\t\t\tisInvalid: boolean;\n\t\t\tmessage: string;\n\t\t};\n\t\tsegment?: {\n\t\t\tisInvalid: boolean;\n\t\t\tmessage: string;\n\t\t};\n\t\tdatabaseSizeGiB?: {\n\t\t\tisInvalid: boolean;\n\t\t\tmessage: string;\n\t\t};\n\t\tsshAddress?: {\n\t\t\tisInvalid: boolean;\n\t\t\tmessage: string;\n\t\t};\n\t\tsshPort?: {\n\t\t\tisInvalid: boolean;\n\t\t\tmessage: string;\n\t\t};\n\t\thostSystem?: {\n\t\t\tisInvalid: boolean;\n\t\t\tmessage: string;\n\t\t};\n\t};\n\tisNodeNameLinkEnabled: boolean;\n\tisSubmitClicked: boolean;\n\tisCloudAccessVerified: boolean;\n}\n\ninterface LocalProps {\n\tcluster: Cluster;\n\tnode?: Node;\n\thost: Host;\n\treadOnly?: boolean;\n\tonNodeChange?: (node: Node) => void;\n\tonHostChange?: (host: Host) => void;\n\tonSubmit?: () => void;\n\tmultipleDeploymentMode?: boolean;\n\tonToggleGeneralLog?: () => void;\n\tsshTestStatus?: CONNECTION_TEST_STATUS;\n}\n\n// PROPS\ninterface ReduxStateProps {\n\tnodeNames: string[];\n\thostNames: string[];\n}\n\ntype Props = LocalProps & ReduxStateProps & WithStyles;\n\nclass NodeFormComponent extends Component {\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\t// console.log(\"support matrix\", SupportMatrix.getSupportMatrix());\n\n\t\tthis.state = {\n\t\t\tformValidation: {},\n\t\t\tisNodeNameLinkEnabled: true,\n\t\t\tisSubmitClicked: false,\n\t\t\tisCloudAccessVerified: false\n\t\t};\n\t}\n\n\tonSubmit = (e: FormEvent) => {\n\t\te.preventDefault();\n\t\t// console.log(\"onSubmit\", e);\n\n\t\tthis.setState({\n\t\t\tisSubmitClicked: true\n\t\t});\n\n\t\t// if (\n\t\t// \t!SupportMatrix.isSystemSupported(\n\t\t// \t\tthis.props.host.system,\n\t\t// \t\tthis.props.host.type\n\t\t// \t)\n\t\t// ) {\n\t\t// \tthis.setState({\n\t\t// \t\tformValidation: {\n\t\t// \t\t\thostSystem: {\n\t\t// \t\t\t\tisInvalid: true,\n\t\t// \t\t\t\tmessage: `${this.props.host.system} is no longer supported by Galera Manager`\n\t\t// \t\t\t}\n\t\t// \t\t}\n\t\t// \t});\n\t\t//\n\t\t// \treturn;\n\t\t// }\n\n\t\t// check if cloud access is verified\n\t\tif (\n\t\t\t[HOST_TYPE.EC2, HOST_TYPE.DIGITAL_OCEAN].includes(\n\t\t\t\tthis.props.cluster.sharedConfig.host.type || HOST_TYPE.UNMANAGED\n\t\t\t) &&\n\t\t\t!this.state.isCloudAccessVerified\n\t\t) {\n\t\t\tconsole.log(\"cloud access is not verified\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.props.readOnly !== false && this.props.onSubmit) {\n\t\t\tthis.props.onSubmit();\n\t\t}\n\t};\n\n\tonHostNameChange = (e: ChangeEvent) => {\n\t\tconst {\n\t\t\tonHostChange,\n\t\t\tonNodeChange,\n\t\t\tmultipleDeploymentMode,\n\t\t\thostNames,\n\t\t\thost,\n\t\t\tnode\n\t\t} = this.props;\n\n\t\tconst field = e.target as HTMLFormElement;\n\n\t\tonHostChange && onHostChange({ ...host, name: field.value as string });\n\t\t!this.state.isNodeNameLinkEnabled &&\n\t\t\tnode &&\n\t\t\tonNodeChange &&\n\t\t\tonNodeChange({ ...node, hostID: field.value });\n\n\t\t!multipleDeploymentMode && hostNames.includes(field.value)\n\t\t\t? field.setCustomValidity(\"Host name already in use\")\n\t\t\t: field.setCustomValidity(\"\");\n\n\t\tconst isValid = field.checkValidity();\n\n\t\tthis.setState((state: LocalState) => ({\n\t\t\tformValidation: {\n\t\t\t\t...state.formValidation,\n\t\t\t\thostName: {\n\t\t\t\t\tisInvalid: !isValid,\n\t\t\t\t\tmessage: isValid ? \"\" : field.validationMessage\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\t};\n\n\tsetHostName(hostName: string) {\n\t\tconst { onHostChange, host } = this.props;\n\n\t\tonHostChange && onHostChange({ ...host, name: hostName });\n\t\t// node && onNodeChange && onNodeChange({ ...node, hostID: hostName });\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tcluster,\n\t\t\tnode,\n\t\t\thost,\n\t\t\tmultipleDeploymentMode,\n\t\t\tonHostChange,\n\t\t\tonNodeChange,\n\t\t\treadOnly,\n\t\t\tnodeNames,\n\t\t\tsshTestStatus\n\t\t} = this.props;\n\n\t\tconst { isNodeNameLinkEnabled, formValidation, isSubmitClicked } =\n\t\t\tthis.state;\n\n\t\tconst clusterType = ClusterUtils.getClusterType(cluster);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t{node && host && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{/* */}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\tconst form = e.target as HTMLFormElement;\n\n\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\t\t\tnodeName: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tisInvalid: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmessage: form.validationMessage\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\terror={formValidation.nodeName?.isInvalid}\n\t\t\t\t\t\t\t\t\t\tfullWidth={true}\n\t\t\t\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\tconst field = e.target as HTMLFormElement;\n\n\t\t\t\t\t\t\t\t\t\t\t\tisNodeNameLinkEnabled && this.onHostNameChange(e);\n\n\t\t\t\t\t\t\t\t\t\t\t\tonNodeChange &&\n\t\t\t\t\t\t\t\t\t\t\t\t\tonNodeChange({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...node,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tname: field.value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thostID: isNodeNameLinkEnabled\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: node?.hostID\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t// console.log(\"nodeNames\", nodeNames);\n\t\t\t\t\t\t\t\t\t\t\t\t!multipleDeploymentMode &&\n\t\t\t\t\t\t\t\t\t\t\t\tnodeNames.includes(field.value)\n\t\t\t\t\t\t\t\t\t\t\t\t\t? field.setCustomValidity(\"Node name already in use\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t: field.setCustomValidity(\"\");\n\n\t\t\t\t\t\t\t\t\t\t\t\tconst isValid = field.checkValidity();\n\n\t\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnodeName: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisInvalid: !isValid,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmessage: isValid ? \"\" : field.validationMessage\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t{clusterType !== CLUSTER_TYPE.MANAGED && (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\tonHostChange &&\n\t\t\t\t\t\t\t\t\t\t\t\tonHostChange({\n\t\t\t\t\t\t\t\t\t\t\t\t\t...host,\n\t\t\t\t\t\t\t\t\t\t\t\t\tsystem\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\tconst form = e.target as HTMLFormElement;\n\n\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\t\t\tsegment: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tisInvalid: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmessage: form.validationMessage\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\terror={formValidation.segment?.isInvalid}\n\t\t\t\t\t\t\t\t\t\tfullWidth={true}\n\t\t\t\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\tconst field = e.target as HTMLInputElement;\n\t\t\t\t\t\t\t\t\t\t\t\tconst value = parseInt(field.value);\n\n\t\t\t\t\t\t\t\t\t\t\t\tonHostChange &&\n\t\t\t\t\t\t\t\t\t\t\t\t\tonHostChange({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...host,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsegment: value\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\tconst isValid = field.checkValidity();\n\n\t\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsegment: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisInvalid: !isValid,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmessage: isValid ? \"\" : field.validationMessage\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\tinputProps={{\n\t\t\t\t\t\t\t\t\t\t\t\tid: \"node-segment\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"data-testid\": \"node-segment\",\n\t\t\t\t\t\t\t\t\t\t\t\treadOnly: readOnly,\n\t\t\t\t\t\t\t\t\t\t\t\tmin: 0,\n\t\t\t\t\t\t\t\t\t\t\t\tmax: 255\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{host.type !== HOST_TYPE.UNMANAGED && (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\tnode &&\n\t\t\t\t\t\t\t\t\t\t\t\t\tonNodeChange &&\n\t\t\t\t\t\t\t\t\t\t\t\t\tonNodeChange({ ...node, userConfig: config });\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\tsubtitleText={\n\t\t\t\t\t\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"This is currently active custom DB engine configuration\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Enter custom DB engine configuration that will be applied to this node\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{readOnly && (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.props.onToggleGeneralLog &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.props.onToggleGeneralLog();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"startNode\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"General log (consumes large amounts of disk space on GMD host over time)\"\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{/* */}\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\tonHostChange &&\n\t\t\t\t\t\t\t\t\t\t\t\t\tonHostChange({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...host,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tauthorizedKeys: [...host.authorizedKeys, publicKey]\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\tonRemove={(deletedKey: string): void => {\n\t\t\t\t\t\t\t\t\t\t\t\tconst filteredKeys = host.authorizedKeys.filter(\n\t\t\t\t\t\t\t\t\t\t\t\t\t(publicKey: string) => publicKey !== deletedKey\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t\t\tonHostChange &&\n\t\t\t\t\t\t\t\t\t\t\t\t\tonHostChange({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...host,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tauthorizedKeys: filteredKeys\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t{clusterType === CLUSTER_TYPE.MANAGED && (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tCloud provider\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconsole.log(\"onChange\", e);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst selectedCloudProvider = e.target\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.value as HOST_TYPE;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst defaultHostTypeSpecificConfig =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tHostUtils.getHostTypeSpecificDefaults(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tselectedCloudProvider\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonHostChange &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonHostChange({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...host,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype: selectedCloudProvider,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thostTypeSpecific:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcluster.sharedConfig.host.type ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tselectedCloudProvider\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? cluster.sharedConfig.host.hostTypeSpecific\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: defaultHostTypeSpecificConfig\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\tinputProps={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tid: \"host-type\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"data-testid\": \"host-type-select\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAWS EC2\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDigitalOcean\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t{host.type === HOST_TYPE.DIGITAL_OCEAN &&\n\t\t\t\t\t\t\t\t\t\thost.hostTypeSpecific && (\n\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconsole.log(\"onDOChange\", config);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tonHostChange &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonHostChange({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...host,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thostTypeSpecific: config\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\tonValidationChange={(isValid: boolean) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconsole.log(\"onTokenValidation\", isValid);\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tisCloudAccessVerified: isValid\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\tisSubmitClicked={isSubmitClicked}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t{host.type === HOST_TYPE.EC2 && host.hostTypeSpecific && (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconsole.log(\"onEC2 config change\", ec2Config);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tonHostChange &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonHostChange({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...host,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thostTypeSpecific: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...ec2Config\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\tonValidationChange={(isValid: boolean) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconsole.log(\"onCredentialsValidation\", isValid);\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tisCloudAccessVerified: isValid\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t{(readOnly || host.type === HOST_TYPE.UNMANAGED) && (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst form = e.target as HTMLFormElement;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsshAddress: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisInvalid: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmessage: form.validationMessage\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\terror={formValidation.sshAddress?.isInvalid}\n\t\t\t\t\t\t\t\t\t\t\t\t\tfullWidth={true}\n\t\t\t\t\t\t\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst field = e.target as HTMLFormElement;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst address = field.value as string;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonHostChange &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonHostChange({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...host,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tssh: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\taddress,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tport: host.ssh?.port || \"22\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdb: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\taddress,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tport: host.db?.port || \"3306\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst isValid = field.checkValidity();\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsshAddress: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisInvalid: !isValid,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmessage: isValid\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: field.validationMessage\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst form = e.target as HTMLFormElement;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsshPort: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisInvalid: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmessage: form.validationMessage\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\terror={formValidation.sshPort?.isInvalid}\n\t\t\t\t\t\t\t\t\t\t\t\t\tfullWidth={true}\n\t\t\t\t\t\t\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst field = e.target as HTMLFormElement;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst port = field.value as string;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonHostChange &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonHostChange({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...host,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tssh: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\taddress: host.ssh?.address || \"\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tport\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst isValid = field.checkValidity();\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsshPort: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisInvalid: !isValid,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmessage: isValid\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: field.validationMessage\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nconst makeNodeNamesSelector = () =>\n\tcreateSelector(\n\t\t(state: AppState) => state.nodeList,\n\t\t(state: AppState, props: LocalProps) => props.cluster,\n\t\t(nodeList: Map, cluster?: Cluster): string[] => {\n\t\t\tif (cluster && cluster.id) {\n\t\t\t\treturn nodeList.get(cluster.id)?.map((node: Node) => node.name) || [];\n\t\t\t} else {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t}\n\t);\n\nconst makeHostNamesSelector = () =>\n\tcreateSelector(\n\t\t(state: AppState) => state.hostList,\n\t\t(state: AppState, props: LocalProps) => props.cluster,\n\t\t(hostList: Map, cluster?: Cluster): string[] => {\n\t\t\tif (cluster && cluster.id) {\n\t\t\t\treturn hostList.get(cluster.id)?.map((host: Host) => host.name) || [];\n\t\t\t} else {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t}\n\t);\n\nconst mapGlobalStateToProps = (state: AppState, props: LocalProps) => {\n\tconst nodeNamesSelector = makeNodeNamesSelector();\n\tconst hostNamesSelector = makeHostNamesSelector();\n\n\treturn {\n\t\tnodeNames: nodeNamesSelector(state, props),\n\t\thostNames: hostNamesSelector(state, props)\n\t};\n};\n\nexport default withStyles(styles, { withTheme: true })(\n\tconnect(mapGlobalStateToProps, {})(NodeFormComponent)\n);\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from '@mui/styles/createStyles';\n\nexport const styles = (theme: Theme) => createStyles({});\n","import { ErrorOutline, Info, InfoOutlined } from \"@mui/icons-material\";\nimport { CircularProgress, ListItemIcon, Theme } from \"@mui/material\";\nimport { CONNECTION_TEST_STATUS } from \"components/connectionTestDialog/types\";\nimport { CheckCircle } from \"mdi-material-ui\";\nimport React from \"react\";\n\nexport default class ConnectionTestUtils {\n\tstatic getStatusMessage = (status: CONNECTION_TEST_STATUS): string => {\n\t\tswitch (status) {\n\t\t\t// case CONNECTION_TEST_STATUS.NOT_READY:\n\t\t\t// \treturn \"Please enter node's SSH address\";\n\t\t\tcase CONNECTION_TEST_STATUS.READY:\n\t\t\t\treturn \"Ready to test\";\n\t\t\tcase CONNECTION_TEST_STATUS.SUCCESS:\n\t\t\t\treturn \"Successfully connected\";\n\t\t\tcase CONNECTION_TEST_STATUS.RUNNING:\n\t\t\t\treturn \"Testing connection. Please wait...\";\n\t\t\tcase CONNECTION_TEST_STATUS.ERROR:\n\t\t\t\treturn \"\";\n\t\t}\n\t};\n\n\t// static getDBConnectionMessage = (status: CONNECTION_TEST_STATUS): string => {\n\t// \tswitch (status) {\n\t// \t\t// case CONNECTION_TEST_STATUS.NOT_READY:\n\t// \t\t// \treturn \"Please enter DB root password first\";\n\t// \t\tcase CONNECTION_TEST_STATUS.READY:\n\t// \t\t\treturn \"Ready to test\";\n\t// \t\tcase CONNECTION_TEST_STATUS.SUCCESS:\n\t// \t\t\treturn \"Successfully connected\";\n\t// \t\tcase CONNECTION_TEST_STATUS.RUNNING:\n\t// \t\t\treturn \"Testing connection. Please wait...\";\n\t// \t\tcase CONNECTION_TEST_STATUS.ERROR:\n\t// \t\t\treturn \"\";\n\t// \t}\n\t// };\n\n\tstatic renderStatusIcon = (status: CONNECTION_TEST_STATUS, theme: Theme) => {\n\t\tswitch (status) {\n\t\t\t// case CONNECTION_TEST_STATUS.NOT_READY:\n\t\t\t// \treturn (\n\t\t\t// \t\t\n\t\t\t// \t\t\t\n\t\t\t// \t\t\n\t\t\t// \t);\n\t\t\tcase CONNECTION_TEST_STATUS.READY:\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\tcase CONNECTION_TEST_STATUS.RUNNING:\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\tcase CONNECTION_TEST_STATUS.SUCCESS:\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\tcase CONNECTION_TEST_STATUS.ERROR:\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t);\n\t\t}\n\t};\n\n\tstatic renderNotReadyIcon = () => {\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t};\n\n\tstatic parseMysqladminMessage = (msg: string): string => {\n\t\t// console.log(\n\t\t// \t\"parseMysqladminMessage\",\n\t\t// \tmsg,\n\t\t// \tmsg.split(\"\\n\"),\n\t\t// \tmsg.split(\"\\n\").filter((line: string) => {\n\t\t// \t\treturn !line.includes(\n\t\t// \t\t\t\"Using a password on the command line interface can be insecure\"\n\t\t// \t\t);\n\t\t// \t})\n\t\t// );\n\n\t\treturn msg\n\t\t\t.replace(\"\\x07\", \"\")\n\t\t\t.split(\"\\n\")\n\t\t\t.filter((line: string) => {\n\t\t\t\treturn !line.includes(\n\t\t\t\t\t\"Using a password on the command line interface can be insecure\"\n\t\t\t\t);\n\t\t\t})\n\t\t\t.join(\". \");\n\t};\n}\n","import {\n\tClose,\n\tDeleteForever,\n\tMoreVert,\n\tPlayArrow,\n\tStop\n} from \"@mui/icons-material\";\nimport DeleteIcon from \"@mui/icons-material/Delete\";\nimport {\n\tAvatar,\n\tButton,\n\tCardHeader,\n\tDialog,\n\tDialogContent,\n\tDialogTitle,\n\tDivider,\n\tGrid,\n\tListItemIcon,\n\tListItemText,\n\tMenuItem,\n\tTab,\n\tTabs,\n\tTooltip,\n\tTypography\n} from \"@mui/material\";\nimport { ConsoleNetworkOutline as ConsoleNetworkOutlineIcon } from \"mdi-material-ui\";\n\nimport Card from \"@mui/material/Card\";\nimport CardContent from \"@mui/material/CardContent\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Menu from \"@mui/material/Menu\";\nimport { WithStyles, WithTheme } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { AppState } from \"AppState\";\nimport { AxiosError, AxiosResponse } from \"axios\";\nimport { clusterListFetchRequested } from \"store/cluster/actions\";\nimport { DEFAULT_CLUSTER } from \"pages/management/cluster/const\";\nimport { Cluster } from \"pages/management/cluster/types\";\nimport { hostListFetchRequested } from \"store/host/actions\";\nimport {\n\tHost,\n\tHOST_SYSTEM,\n\tHOST_TYPE,\n\tHostLog\n} from \"pages/management/host/types\";\nimport { nodeListFetchRequested } from \"store/node/actions\";\nimport JobListComponent from \"pages/management/node/jobs/JobListComponent\";\nimport NodeFormComponent from \"pages/management/node/nodeForm/NodeFormComponent\";\nimport {\n\tDB_STATE,\n\tNode,\n\tNODE_DB_ENGINE,\n\tNODE_STATE\n} from \"pages/management/node/types\";\nimport DashboardComponent from \"components/monitoring/dashboard/DashboardComponent\";\nimport { BlinkingBadge } from \"components/BlinkingBadge/BlinkingBadge\";\nimport { GMDialogService } from \"components/dialog/DialogService\";\nimport DeploymentLogMessage from \"components/logViewer/DeploymentLogMessage\";\nimport LogViewer from \"components/logViewer/LogViewerComponent\";\nimport NodeStateComponent from \"components/monitoring/nodeState/nodeStateComponent\";\nimport { showSnackbar } from \"components/snackbar/actionCreators\";\nimport {\n\tSNACKBAR_TYPE,\n\tSnackbarActionPayload\n} from \"components/snackbar/types\";\nimport { Console, Database } from \"mdi-material-ui\";\nimport HostsAPI from \"services/api/HostsAPI\";\nimport LogsApi from \"services/api/LogsApi\";\nimport NodesAPI from \"services/api/NodesAPI\";\nimport JobsService from \"services/jobs/jobsService\";\nimport { Job, JOB_STATUS, JobTracking } from \"services/jobs/types\";\nimport { MetricsStoreState } from \"store/metricsStore/storeTypes\";\nimport React, { ChangeEvent } from \"react\";\nimport { connect } from \"react-redux\";\nimport { StaticContext } from \"react-router\";\nimport { RouteComponentProps } from \"react-router-dom\";\nimport { createSelector } from \"reselect\";\nimport { styles } from \"pages/management/node/styles\";\n\n// component local state interface\ninterface LocalState {\n\tcluster: Cluster;\n\tnode: Node;\n\thost: Host;\n\tactiveTab: number;\n\tlogs: any[];\n\tanchorEl: any;\n\tshowLog: boolean;\n\tisLogCopied: boolean;\n}\n\ninterface LocalProps {}\n\n// PROPS\ninterface ReduxStateProps {\n\tnode: Node | undefined;\n\thost: Host | undefined;\n\tcluster: Cluster | undefined;\n\thasRunningJobs: boolean;\n\tnodeState: NODE_STATE;\n}\n\ninterface ReduxDispatchProps {\n\tshowSnackbar: (snackbar: SnackbarActionPayload) => void;\n\tnodeListFetchRequested: (clusterID: number) => void;\n\thostListFetchRequested: (clusterID: number) => void;\n\treloadClusters: () => void;\n}\n\ntype Props = LocalProps &\n\tReduxStateProps &\n\tReduxDispatchProps &\n\tWithStyles &\n\tWithTheme &\n\tRouteComponentProps;\n\ninterface Snapshot {\n\thasNodeSwitched: boolean; // indicates if another node has been selected\n\thasNodeUpdated: boolean; // indicates if current node has been changed\n}\n\nenum TABS {\n\tMONITORING,\n\tLOGS,\n\tCONFIGURATION,\n\tJOBS\n}\n\n// COMPONENT\nclass NodeManagerComponent extends React.Component {\n\t_isMounted = false;\n\n\t_cancelRequest: any;\n\t_scheduledFetch: any;\n\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\t// console.log(\"NodeManagerComponent\", props.node, props.host, props.cluster);\n\n\t\tif (props.cluster && props.node && props.host) {\n\t\t\tthis.state = {\n\t\t\t\tcluster: props.cluster,\n\t\t\t\tnode: props.node,\n\t\t\t\thost: props.host,\n\t\t\t\tactiveTab: TABS.MONITORING,\n\t\t\t\tlogs: [],\n\t\t\t\tanchorEl: undefined,\n\t\t\t\tshowLog: false,\n\t\t\t\tisLogCopied: false\n\t\t\t};\n\t\t\tthis.getLogs();\n\t\t} else {\n\t\t\tthis.props.showSnackbar({\n\t\t\t\tmsg: `Error loading node data`,\n\t\t\t\tsnackbarType: SNACKBAR_TYPE.ERROR\n\t\t\t});\n\t\t}\n\t}\n\n\tgetLogs = () => {\n\t\tthis.props.host &&\n\t\t\tLogsApi.fetchHostLog(this.props.host).then((response: AxiosResponse) => {\n\t\t\t\t// console.log(\"deployment logs\", response.data);\n\n\t\t\t\tconst splitLogs = response.data.data.attributes.contents.split(\"\\n\");\n\t\t\t\t// console.log(\"split logs\", splitLogs);\n\n\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t...state,\n\t\t\t\t\tlogs: splitLogs.reduce((result: any, row: string) => {\n\t\t\t\t\t\t// console.log(\"raw line\", row);\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst line = JSON.parse(row);\n\n\t\t\t\t\t\t\t// console.log(\"line\", line);\n\n\t\t\t\t\t\t\tlet channelType;\n\t\t\t\t\t\t\tif (line[\"channel-type\"] === \"app\") {\n\t\t\t\t\t\t\t\tchannelType = \"galera-manager\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tchannelType = `host-${line[\"channel-type\"]}`;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tresult.push({\n\t\t\t\t\t\t\t\ttime: line.time,\n\t\t\t\t\t\t\t\tmsg: line.msg,\n\t\t\t\t\t\t\t\t\"channel-type\": channelType\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t// console.warn(\"Parsing log line failed\", e);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}, [])\n\t\t\t\t}));\n\t\t\t});\n\t};\n\n\tgetSnapshotBeforeUpdate(\n\t\tprevProps: Readonly,\n\t\tprevState: Readonly\n\t): Snapshot {\n\t\treturn {\n\t\t\thasNodeSwitched:\n\t\t\t\tprevProps.match.params.clusterID !==\n\t\t\t\t\tthis.props.match.params.clusterID ||\n\t\t\t\tprevProps.match.params.nodeID !== this.props.match.params.nodeID,\n\t\t\thasNodeUpdated:\n\t\t\t\tprevProps.node?.settings.logs.generalLog.enabled !==\n\t\t\t\tthis.props.node?.settings.logs.generalLog.enabled\n\t\t};\n\t}\n\n\tcomponentDidUpdate(\n\t\tprevProps: Readonly,\n\t\tprevState: Readonly,\n\t\tsnapshot: Snapshot\n\t): void {\n\t\tif (snapshot.hasNodeSwitched) {\n\t\t\tconst { node, host, cluster } = this.props;\n\n\t\t\tif (cluster && node && host) {\n\t\t\t\tthis.setState(() => ({\n\t\t\t\t\tcluster,\n\t\t\t\t\tnode,\n\t\t\t\t\thost,\n\t\t\t\t\tlogs: [],\n\t\t\t\t\tanchorEl: undefined\n\t\t\t\t}));\n\t\t\t\tthis.getLogs();\n\t\t\t\tthis.clearAsyncRequests();\n\t\t\t\t// this.getNodeState();\n\t\t\t} else {\n\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\tmsg: `Error loading data.`\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (snapshot.hasNodeUpdated) {\n\t\t\tthis.props.node && this.setState({ node: this.props.node });\n\t\t}\n\t}\n\n\tcomponentDidMount(): void {\n\t\tthis._isMounted = true;\n\t\t// this.getNodeState();\n\t}\n\n\tcomponentWillUnmount(): void {\n\t\tthis._isMounted = false;\n\n\t\tthis.clearAsyncRequests();\n\t}\n\n\tclearAsyncRequests(): void {\n\t\tif (this._cancelRequest) this._cancelRequest();\n\t\tif (this._scheduledFetch) clearTimeout(this._scheduledFetch);\n\t}\n\n\tonDeleteClick = (host: Host, node: Node, force?: boolean): void => {\n\t\tconst message = force\n\t\t\t? `Node will be uninstalled and host will be deleted if possible. If deletion fails, node and host will still be removed from Galera Manager.`\n\t\t\t: `Node will be uninstalled and host will be deleted.`;\n\n\t\tGMDialogService.showConfirm({\n\t\t\ttitle: force\n\t\t\t\t? `Force delete node ${this.state.node.name}?`\n\t\t\t\t: `Delete node ${this.state.node.name}?`,\n\t\t\tmessage,\n\t\t\tconfirmText: force ? \"Force delete\" : \"Delete\",\n\t\t\tdeclineText: \"Cancel\",\n\t\t\tdestructiveConfirm: true\n\t\t}).then(\n\t\t\t() => {\n\t\t\t\tHostsAPI.delete(host, force).then(\n\t\t\t\t\t(job: Job) => {\n\t\t\t\t\t\t// console.log(\"host delete job id\", jobId);\n\t\t\t\t\t\tJobsService.trackJob(job).then(\n\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\t\t\tmsg: `Node ${node.name} successfully deleted`\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t// redirect to /clusters if node still open\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tthis.props.location.pathname.endsWith(\n\t\t\t\t\t\t\t\t\t\t`/clusters/${node.clusterID}/nodes/${node.id}`\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tthis.props.history.push(`/clusters/${node.clusterID}`);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tthis.props.nodeListFetchRequested(node.clusterID);\n\t\t\t\t\t\t\t\tthis.props.hostListFetchRequested(node.clusterID);\n\t\t\t\t\t\t\t\tthis.props.reloadClusters();\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t(err: any) => {\n\t\t\t\t\t\t\t\tconsole.error(\"Node deletion job monitor error:\", err);\n\n\t\t\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\t\t\tmsg: `Failed to delete node ${node.name}.`,\n\t\t\t\t\t\t\t\t\tsnackbarType: SNACKBAR_TYPE.ERROR\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t\t(err: AxiosError) => {\n\t\t\t\t\t\tconsole.error(\"Error deleting node:\", err);\n\n\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\tmsg: `Node '${node.name}' could not be deleted`,\n\t\t\t\t\t\t\tsnackbarType: SNACKBAR_TYPE.ERROR\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\tmsg: `Node ${node.name} is being deleted`\n\t\t\t\t});\n\t\t\t},\n\t\t\t() => {}\n\t\t);\n\n\t\tthis.setState({\n\t\t\tanchorEl: null\n\t\t});\n\t};\n\n\tonStartClick = (): void => {\n\t\tGMDialogService.showConfirm({\n\t\t\tmessage: `Start node ${this.state.node.name}?`,\n\t\t\tconfirmText: \"Start\",\n\t\t\tdeclineText: \"Cancel\"\n\t\t}).then(\n\t\t\t() => {\n\t\t\t\tNodesAPI.start(this.state.node).then((job: Job) => {\n\t\t\t\t\tJobsService.trackJob(job).then(\n\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\t\tsnackbarType: SNACKBAR_TYPE.SUCCESS,\n\t\t\t\t\t\t\t\tmsg: `Node ${this.state.node.name} started`\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t// console.log(\"node start job done!\", node.name);\n\t\t\t\t\t\t},\n\t\t\t\t\t\t(job: Job) => {\n\t\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\t\tsnackbarType: SNACKBAR_TYPE.SUCCESS,\n\t\t\t\t\t\t\t\tmsg: `Failed to start node ${this.state.node.name}`\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t// console.log(\"node start job failed\", node.name, job);\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t\t},\n\t\t\t() => {}\n\t\t);\n\n\t\tthis.setState({\n\t\t\tanchorEl: null\n\t\t});\n\t};\n\n\tonStopClick = (): void => {\n\t\tGMDialogService.showConfirm({\n\t\t\tmessage: `Stop node ${this.state.node.name}?`,\n\t\t\tconfirmText: \"Stop\",\n\t\t\tdeclineText: \"Cancel\"\n\t\t}).then(\n\t\t\t() => {\n\t\t\t\tNodesAPI.stop(this.state.node).then((job: Job) => {\n\t\t\t\t\tJobsService.trackJob(job).then(\n\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\t\tsnackbarType: SNACKBAR_TYPE.SUCCESS,\n\t\t\t\t\t\t\t\tmsg: `Node ${this.state.node.name} stopped`\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t// console.log(\"node start job done!\", node.name);\n\t\t\t\t\t\t},\n\t\t\t\t\t\t(job: Job) => {\n\t\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\t\tsnackbarType: SNACKBAR_TYPE.SUCCESS,\n\t\t\t\t\t\t\t\tmsg: `Failed to stop node ${this.state.node.name}`\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t// console.log(\"node start job failed\", node.name, job);\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t\t},\n\t\t\t() => {}\n\t\t);\n\n\t\tthis.setState({\n\t\t\tanchorEl: null\n\t\t});\n\t};\n\n\tonShowLogsClick = (): void => {\n\t\tthis.setState({\n\t\t\tanchorEl: null,\n\t\t\tshowLog: true\n\t\t});\n\t};\n\n\tonOpenSSHTerminal = (): void => {\n\t\t// open ssh terminal in new tab\n\t\tconst clusterID = this.state.node.clusterID;\n\t\tconst hostID = this.state.node.hostID;\n\t\tconst url = `/v2/term?cluster_id=${clusterID}&host_id=${hostID}`;\n\n\t\twindow.open(url, \"_blank\");\n\t};\n\n\tonMoreClick = (event: any) => {\n\t\t// isExpanded menu\n\t\tthis.setState({ ...this.state, anchorEl: event.currentTarget });\n\t};\n\n\tonMoreMenuClose = () => {\n\t\tthis.setState({ ...this.state, anchorEl: null });\n\t};\n\n\tonToggleGeneralLog = () => {\n\t\tconst node = this.state.node;\n\t\tconst isEnabled = node.settings.logs.generalLog.enabled;\n\n\t\tGMDialogService.showConfirm({\n\t\t\ttitle: `${isEnabled ? \"Disable\" : \"Enable\"} general log on ${node.name}?`,\n\t\t\tmessage: isEnabled\n\t\t\t\t? \"Disabling general log means that DB engine will stop printing messages into the general log file, and you will stop seeing them in the log viewer.\"\n\t\t\t\t: \"Enabling general log means that DB engine will start printing messages into the general log file, and you should start seeing those messages in log viewer immediately. IMPORTANT WARNING: Enabling general log consumes large amount of disk space over time on the Galera Manager host, please make sure you have enough free disk space.\",\n\t\t\tconfirmText: isEnabled ? \"Disable\" : \"Enable\",\n\t\t\tdeclineText: \"Cancel\"\n\t\t}).then(() => {\n\t\t\tthis.setState({ activeTab: TABS.JOBS });\n\t\t\tNodesAPI.toggleGeneralLog(node).then(\n\t\t\t\t(job: Job) => {\n\t\t\t\t\t// console.log(\"toggle general log job\", jobId);\n\n\t\t\t\t\tJobsService.trackJob(job).then(\n\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\t\tmsg: `General log is successfully ${\n\t\t\t\t\t\t\t\t\tisEnabled ? \"disabled\" : \"enabled\"\n\t\t\t\t\t\t\t\t} on ${node.name}`\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tthis.props.nodeListFetchRequested(node.clusterID);\n\t\t\t\t\t\t},\n\t\t\t\t\t\t(err: any) => {\n\t\t\t\t\t\t\tconsole.error(\"General log toggle job monitor error:\", err);\n\n\t\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\t\tmsg: `Failed to ${\n\t\t\t\t\t\t\t\t\tisEnabled ? \"disable\" : \"enable\"\n\t\t\t\t\t\t\t\t} general log on ${node.name}`,\n\t\t\t\t\t\t\t\tsnackbarType: SNACKBAR_TYPE.ERROR\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\t(err: AxiosError) => {\n\t\t\t\t\tconsole.error(\"Error toggling general log node:\", err);\n\n\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\tmsg: `Failed to ${\n\t\t\t\t\t\t\tisEnabled ? \"disable\" : \"enable\"\n\t\t\t\t\t\t} general log on ${node.name}`,\n\t\t\t\t\t\tsnackbarType: SNACKBAR_TYPE.ERROR\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t);\n\t\t});\n\n\t\tthis.setState({\n\t\t\tanchorEl: null\n\t\t});\n\t};\n\n\thandleCopyDeploymentLogsClick = () => {\n\t\tconst copyJSON = JSON.stringify(this.state.logs);\n\n\t\tif (navigator.clipboard) {\n\t\t\tnavigator.clipboard.writeText(copyJSON).then(\n\t\t\t\t() => {\n\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\tmsg: \"Copied deployment logs to clipboard\"\n\t\t\t\t\t});\n\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tisLogCopied: true\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\t(err: Error) => {\n\t\t\t\t\tconsole.error(\"Deployment logs copy error:\", err);\n\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\tmsg: \"Couldn't copy deployment logs to clipboard\"\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t);\n\t\t} else {\n\t\t\tthis.props.showSnackbar({\n\t\t\t\tmsg: \"Couldn't copy deployment logs because the application is not served over HTTPS\"\n\t\t\t});\n\t\t}\n\t};\n\n\trender(): React.ReactNode {\n\t\tconst { classes, theme, hasRunningJobs, nodeState } = this.props;\n\n\t\tif (!this.state) return false;\n\n\t\tconst {\n\t\t\tnode,\n\t\t\thost,\n\t\t\tcluster,\n\t\t\tactiveTab,\n\t\t\tanchorEl,\n\t\t\tshowLog,\n\t\t\tlogs,\n\t\t\tisLogCopied\n\t\t} = this.state;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\taction={\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\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\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\tthis.onDeleteClick(host, node, true);\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\ttitle={node.name}\n\t\t\t\t\tsubheader={node.dbEngine}\n\t\t\t\t/>\n\t\t\t\t\n\t\t\t\t, newValue: any) => {\n\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\tactiveTab: newValue\n\t\t\t\t\t\t}));\n\t\t\t\t\t}}\n\t\t\t\t\tvariant=\"fullWidth\"\n\t\t\t\t>\n\t\t\t\t\tMonitor} />\n\t\t\t\t\tLogs} />\n\t\t\t\t\tConfiguration\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tJobs\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\tJobs\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{(activeTab === TABS.MONITORING && (\n\t\t\t\t\t\t\n\t\t\t\t\t)) ||\n\t\t\t\t\t\t(activeTab === TABS.LOGS && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{/**/}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)) ||\n\t\t\t\t\t\t(activeTab === TABS.CONFIGURATION && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)) ||\n\t\t\t\t\t\t(activeTab === TABS.JOBS && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t))}\n\t\t\t\t\n\n\t\t\t\t {\n\t\t\t\t\t\tif (reason === \"escapeKeyDown\") {\n\t\t\t\t\t\t\tthis.setState({ showLog: false, isLogCopied: false });\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tmaxWidth=\"xl\"\n\t\t\t\t\tfullWidth={true}\n\t\t\t\t\topen={showLog}\n\t\t\t\t>\n\t\t\t\t\t\n\t\t\t\t\t\t{`${node.name} deployment logs`}\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tthis.setState({ showLog: false, isLogCopied: false });\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tsize=\"large\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{isLogCopied ? \"Copied\" : \"Copy\"}\n\t\t\t\t\t\t\t{/* Deployment Logs */}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{logs.map((log: HostLog, index: number) => (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t
{}} />\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\n// selectors\nconst makeNodeSelector = () =>\n\tcreateSelector(\n\t\t(state: AppState) => state.nodeList,\n\t\t(state: AppState, props: Props) => props.match.params.clusterID,\n\t\t(state: AppState, props: Props) => props.match.params.nodeID,\n\t\t(state: AppState, props: Props) => props.history,\n\t\t(\n\t\t\tnodeMap: Map,\n\t\t\tclusterID: number,\n\t\t\tnodeID: number,\n\t\t\thistory\n\t\t): Node => {\n\t\t\tconst nodeList = nodeMap.get(clusterID) || [];\n\t\t\tconst node = nodeList.find((node: Node) => node.id === nodeID);\n\n\t\t\tif (node) return node;\n\t\t\telse {\n\t\t\t\tconsole.warn(`Node not found.`);\n\t\t\t\thistory.push(\"/clusters\");\n\t\t\t\treturn {\n\t\t\t\t\tname: \"\",\n\t\t\t\t\tclusterID: -1,\n\t\t\t\t\tdbEngine: NODE_DB_ENGINE.MARIADB_10_3,\n\t\t\t\t\thostID: -1,\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\tlogs: {\n\t\t\t\t\t\t\tgeneralLog: {\n\t\t\t\t\t\t\t\tenabled: false\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\t// throw Error(`Could not find node '${nodeID}'`);\n\t\t\t}\n\t\t}\n\t);\n\nconst makeHostSelector = () =>\n\tcreateSelector(\n\t\t(state: AppState) => state.nodeList,\n\t\t(state: AppState) => state.hostList,\n\t\t(state: AppState, props: Props) => props.match.params.clusterID,\n\t\t(state: AppState, props: Props) => props.match.params.nodeID,\n\t\t(state: AppState, props: Props) => props.history,\n\t\t(\n\t\t\tnodeMap: Map,\n\t\t\thostMap: Map,\n\t\t\tclusterID: number,\n\t\t\tnodeID: number,\n\t\t\thistory\n\t\t): Host => {\n\t\t\tconst nodeList = nodeMap.get(clusterID) || [];\n\t\t\tconst hostList = hostMap.get(clusterID) || [];\n\n\t\t\tconst node = nodeList.find((node: Node) => node.id === nodeID);\n\t\t\tif (!node) {\n\t\t\t\tconsole.warn(`Node ${nodeID} not found.`);\n\t\t\t\thistory.push(\"/clusters\");\n\t\t\t\treturn {\n\t\t\t\t\tname: \"\",\n\t\t\t\t\tclusterID: -1,\n\t\t\t\t\tsegment: 0,\n\t\t\t\t\ttype: HOST_TYPE.UNMANAGED,\n\t\t\t\t\tsystem: HOST_SYSTEM.CENTOS_7,\n\t\t\t\t\tprivateKey: \"\",\n\t\t\t\t\tprivateKeyPassword: \"\",\n\t\t\t\t\tauthorizedKeys: []\n\t\t\t\t};\n\t\t\t\t// throw Error(`Could not find node '${nodeID}'`);\n\t\t\t}\n\n\t\t\tconst host = hostList.find((host: Host) => host.id === node.hostID);\n\t\t\tif (!host) {\n\t\t\t\tconsole.warn(`Host ${node.hostID} not found.`);\n\t\t\t\thistory.push(\"/clusters\");\n\t\t\t\treturn {\n\t\t\t\t\tname: \"\",\n\t\t\t\t\tclusterID: -1,\n\t\t\t\t\tsegment: 0,\n\t\t\t\t\ttype: HOST_TYPE.UNMANAGED,\n\t\t\t\t\tsystem: HOST_SYSTEM.CENTOS_7,\n\t\t\t\t\tprivateKey: \"\",\n\t\t\t\t\tprivateKeyPassword: \"\",\n\t\t\t\t\tauthorizedKeys: []\n\t\t\t\t};\n\t\t\t\t// throw Error(`Could not find host '${node.host}'`);\n\t\t\t}\n\n\t\t\treturn host;\n\t\t}\n\t);\n\nconst makeClusterSelector = () =>\n\tcreateSelector(\n\t\t// (state: AppState) => state.nodeList,\n\t\t(state: AppState) => state.clusterList,\n\t\t(state: AppState, props: Props) => props.match.params.clusterID,\n\t\t(state: AppState, props: Props) => props.history,\n\t\t(\n\t\t\t// nodeList: Node[],\n\t\t\tclusterList: Cluster[],\n\t\t\tclusterID: number,\n\t\t\thistory\n\t\t): Cluster => {\n\t\t\t// const node = nodeList.find((node: Node) => node.name === nodeName);\n\t\t\t// if (!node) {\n\t\t\t// \tconsole.warn(`Node ${nodeName} not found.`);\n\t\t\t// \thistory.push(\"/clusters\");\n\t\t\t// \treturn { ...DEFAULT_CLUSTER };\n\t\t\t// \t// throw Error(`Could not find node ${nodeName}`);\n\t\t\t// }\n\n\t\t\tconst cluster = clusterList.find(\n\t\t\t\t(cluster: Cluster) => cluster.id === clusterID\n\t\t\t);\n\n\t\t\tif (!cluster) {\n\t\t\t\tconsole.warn(`Cluster not found.`);\n\t\t\t\thistory.push(\"/clusters\");\n\t\t\t\treturn { ...DEFAULT_CLUSTER };\n\t\t\t\t// throw Error(`Could not find cluster '${node.cluster}'`);\n\t\t\t}\n\n\t\t\treturn cluster;\n\t\t}\n\t);\n\nconst makeHasRunningJobs = () =>\n\tcreateSelector(\n\t\t[makeNodeSelector(), (state: AppState) => state.jobMonitor.runningJobList],\n\t\t(node: Node, jobList: JobTracking[]) =>\n\t\t\tjobList.some(\n\t\t\t\t(job: JobTracking) =>\n\t\t\t\t\t(job.meta.node_id === node?.id ||\n\t\t\t\t\t\tjob.meta.host_id === node?.hostID) &&\n\t\t\t\t\tjob.meta.cluster_id === node?.clusterID &&\n\t\t\t\t\tjob.status === JOB_STATUS.RUNNING\n\t\t\t)\n\t);\n\nconst makeNodeStateSelector = () =>\n\tcreateSelector(\n\t\t[\n\t\t\t(state: AppState) => state.metrics,\n\t\t\tmakeClusterSelector(),\n\t\t\tmakeNodeSelector()\n\t\t],\n\t\t(\n\t\t\tmetricsStore: MetricsStoreState,\n\t\t\tcluster: Cluster,\n\t\t\tnode: Node\n\t\t): NODE_STATE => {\n\t\t\tif (node && cluster) {\n\t\t\t\tconst localStateMetric =\n\t\t\t\t\tmetricsStore.wsrepLocalStateMetrics[`${cluster.name},${node.name}`];\n\t\t\t\treturn localStateMetric?.value || DB_STATE.UNKNOWN;\n\t\t\t} else {\n\t\t\t\treturn DB_STATE.UNKNOWN;\n\t\t\t}\n\t\t}\n\t);\n\n// REDUX MAPPINGS\nconst mapGlobalStateToProps = (state: AppState, props: Props) => {\n\tconst nodeSelector = makeNodeSelector();\n\tconst hostSelector = makeHostSelector();\n\tconst clusterSelector = makeClusterSelector();\n\tconst hasRunningJobsSelector = makeHasRunningJobs();\n\tconst nodeStateSelector = makeNodeStateSelector();\n\n\treturn {\n\t\tnode: nodeSelector(state, props),\n\t\thost: hostSelector(state, props),\n\t\tcluster: clusterSelector(state, props),\n\t\thasRunningJobs: hasRunningJobsSelector(state, props),\n\t\tnodeState: nodeStateSelector(state, props)\n\t};\n};\n\nconst mapGlobalDispatchToProps = (dispatch: any) => {\n\treturn {\n\t\tnodeListFetchRequested: (clusterID: number) => {\n\t\t\tdispatch(nodeListFetchRequested(clusterID));\n\t\t},\n\t\thostListFetchRequested: (clusterID: number) => {\n\t\t\tdispatch(hostListFetchRequested(clusterID));\n\t\t},\n\t\treloadClusters: () => {\n\t\t\tdispatch(clusterListFetchRequested());\n\t\t},\n\t\tshowSnackbar: (snackbar: SnackbarActionPayload) => {\n\t\t\tdispatch(showSnackbar(snackbar));\n\t\t}\n\t};\n};\n\nexport default withStyles(styles, { withTheme: true })(\n\tconnect(mapGlobalStateToProps, mapGlobalDispatchToProps)(NodeManagerComponent)\n);\n","import { ErrorOutline } from \"@mui/icons-material\";\nimport {\n\tButton,\n\tCircularProgress,\n\tDialog,\n\tDialogActions,\n\tDialogContent,\n\tDialogTitle,\n\tGrid,\n\tList,\n\tListItem,\n\tListItemText,\n\tTypography\n} from \"@mui/material\";\nimport { withStyles, WithStyles, WithTheme } from \"@mui/styles\";\nimport { styles } from \"components/connectionTestDialog/styles\";\nimport { CONNECTION_TEST_STATUS } from \"components/connectionTestDialog/types\";\nimport ConnectionTestUtils from \"components/connectionTestDialog/utils\";\nimport PasswordField from \"components/form/passwordField/passwordFieldComponent\";\nimport { CheckCircle } from \"mdi-material-ui\";\nimport { HOST_SYSTEM } from \"pages/management/host/types\";\nimport { NODE_DB_ENGINE } from \"pages/management/node/types\";\nimport React, { ChangeEvent } from \"react\";\nimport ClustersAPI from \"services/api/ClustersAPI\";\nimport HostsAPI from \"services/api/HostsAPI\";\nimport JobsService from \"services/jobs/jobsService\";\nimport { Job, JOB_STATUS, JobTracking } from \"services/jobs/types\";\n\ninterface LocalState {\n\tisOpen: boolean;\n\tsshConnectionStatus: CONNECTION_TEST_STATUS;\n\tsshConnectionError?: string;\n\tdbConnectionStatus: CONNECTION_TEST_STATUS;\n\tdbConnectionError?: string;\n\tnewDBRootPassword?: string;\n\tisDBAccessDenied: boolean;\n\tupdateDBRootPasswordStatus: undefined | \"updating\" | \"success\" | \"error\";\n\tupdateDBRootPasswordMessage?: string;\n}\n\ninterface LocalProps {\n\thostSystem: HOST_SYSTEM;\n\tdbEngine?: NODE_DB_ENGINE;\n\tprivateKey: string;\n\tsshAddress?: string;\n\tsshPort?: string;\n\ttestDBConnection: boolean;\n\tdbRootPassword?: string;\n\tonSSHStatusChange?: (status: CONNECTION_TEST_STATUS) => void;\n\tonDBStatusChange?: (status: CONNECTION_TEST_STATUS) => void;\n\tonDBRootPasswordUpdate: (rootPassword: string) => void;\n\tclusterID?: number;\n}\n\ntype Props = LocalProps & WithStyles & WithTheme;\n\nclass ConnectionTestComponent extends React.Component {\n\tdefaultState: Readonly = {\n\t\tisOpen: false,\n\t\tsshConnectionStatus: CONNECTION_TEST_STATUS.READY,\n\t\tdbConnectionStatus: CONNECTION_TEST_STATUS.READY,\n\t\tupdateDBRootPasswordStatus: undefined,\n\t\tisDBAccessDenied: false\n\t};\n\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\t...this.defaultState,\n\t\t\tnewDBRootPassword: props.dbRootPassword\n\t\t};\n\t}\n\n\tcloseDialog = async () => {\n\t\tthis.setState({\n\t\t\tisOpen: false,\n\t\t\tisDBAccessDenied: false,\n\t\t\tupdateDBRootPasswordStatus: undefined,\n\t\t\tupdateDBRootPasswordMessage: undefined\n\t\t});\n\t};\n\n\tonTestClick = async () => {\n\t\tconst {\n\t\t\tprivateKey,\n\t\t\ttestDBConnection,\n\t\t\tsshAddress,\n\t\t\tsshPort,\n\t\t\thostSystem,\n\t\t\tdbEngine,\n\t\t\tonSSHStatusChange,\n\t\t\tonDBStatusChange,\n\t\t\tdbRootPassword,\n\t\t\tclusterID\n\t\t} = this.props;\n\n\t\tconst { newDBRootPassword } = this.state;\n\n\t\tthis.setState({\n\t\t\tsshConnectionStatus: CONNECTION_TEST_STATUS.RUNNING,\n\t\t\tsshConnectionError: undefined,\n\t\t\tdbConnectionStatus: CONNECTION_TEST_STATUS.RUNNING,\n\t\t\tdbConnectionError: undefined\n\t\t});\n\n\t\ttry {\n\t\t\tconst job = await HostsAPI.testSSHConnection(\n\t\t\t\thostSystem,\n\t\t\t\tsshAddress || \"\",\n\t\t\t\tsshPort || \"\",\n\t\t\t\tprivateKey,\n\t\t\t\ttestDBConnection ? newDBRootPassword : undefined,\n\t\t\t\ttestDBConnection ? dbEngine : undefined\n\t\t\t);\n\n\t\t\ttry {\n\t\t\t\t// if access check job succeeds\n\t\t\t\tconst successJob = await JobsService.trackJob(job);\n\t\t\t\tconsole.log(\"job success\", successJob);\n\n\t\t\t\tthis.setState({\n\t\t\t\t\tsshConnectionStatus: CONNECTION_TEST_STATUS.SUCCESS,\n\t\t\t\t\tsshConnectionError: undefined,\n\t\t\t\t\tisDBAccessDenied: false\n\t\t\t\t});\n\t\t\t\tonSSHStatusChange && onSSHStatusChange(CONNECTION_TEST_STATUS.SUCCESS);\n\n\t\t\t\t// check db result if necessary\n\t\t\t\tif (testDBConnection) {\n\t\t\t\t\t// if mysqladmin reported error\n\t\t\t\t\tif (successJob.status !== JOB_STATUS.SUCCESS) {\n\t\t\t\t\t\t// TODO\n\t\t\t\t\t\tconst parsedMysqladminMessage = \"TODO: fetch message from REST API\";\n\t\t\t\t\t\t// ConnectionTestUtils.parseMysqladminMessage(\n\t\t\t\t\t\t// \tsuccessJob.executionInfo.payload.mysqladmin_status\n\t\t\t\t\t\t// );\n\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tdbConnectionStatus: CONNECTION_TEST_STATUS.ERROR,\n\t\t\t\t\t\t\tdbConnectionError: parsedMysqladminMessage,\n\t\t\t\t\t\t\tisDBAccessDenied:\n\t\t\t\t\t\t\t\tparsedMysqladminMessage?.includes(\"Access denied\")\n\t\t\t\t\t\t});\n\t\t\t\t\t\tonDBStatusChange && onDBStatusChange(CONNECTION_TEST_STATUS.ERROR);\n\n\t\t\t\t\t\t// if mysqladmin successfully connected\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tdbConnectionStatus: CONNECTION_TEST_STATUS.SUCCESS,\n\t\t\t\t\t\t\tdbConnectionError: undefined,\n\t\t\t\t\t\t\tisDBAccessDenied: false\n\t\t\t\t\t\t});\n\t\t\t\t\t\tonDBStatusChange &&\n\t\t\t\t\t\t\tonDBStatusChange(CONNECTION_TEST_STATUS.SUCCESS);\n\n\t\t\t\t\t\t// if new db root password was used\n\t\t\t\t\t\tif (dbRootPassword !== newDBRootPassword) {\n\t\t\t\t\t\t\tconsole.log(\"dbRootPassword changed\", newDBRootPassword);\n\n\t\t\t\t\t\t\t// update db root password on cluster\n\t\t\t\t\t\t\tthis.updateDBRootPassword(clusterID, newDBRootPassword);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e: any) {\n\t\t\t\t// if job fails\n\t\t\t\tthis.setState({\n\t\t\t\t\tsshConnectionStatus: CONNECTION_TEST_STATUS.ERROR,\n\t\t\t\t\tsshConnectionError: `${e.executionInfo.error?.msg} (${e.executionInfo.error?.wrapped.msg})`,\n\t\t\t\t\tdbConnectionStatus: CONNECTION_TEST_STATUS.READY,\n\t\t\t\t\tdbConnectionError: undefined\n\t\t\t\t});\n\t\t\t\tonSSHStatusChange && onSSHStatusChange(CONNECTION_TEST_STATUS.ERROR);\n\t\t\t\tonDBStatusChange && onDBStatusChange(CONNECTION_TEST_STATUS.READY);\n\t\t\t}\n\t\t} catch (e: any) {\n\t\t\tthis.setState({\n\t\t\t\tsshConnectionStatus: CONNECTION_TEST_STATUS.ERROR,\n\t\t\t\tsshConnectionError: e.msg,\n\t\t\t\tdbConnectionStatus: CONNECTION_TEST_STATUS.READY,\n\t\t\t\tdbConnectionError: undefined\n\t\t\t});\n\t\t\tonSSHStatusChange && onSSHStatusChange(CONNECTION_TEST_STATUS.ERROR);\n\t\t\tonDBStatusChange && onDBStatusChange(CONNECTION_TEST_STATUS.READY);\n\t\t}\n\t};\n\n\tupdateDBRootPassword = async (\n\t\tclusterID?: number,\n\t\tnewDBRootPassword?: string\n\t) => {\n\t\tif (clusterID && newDBRootPassword) {\n\t\t\ttry {\n\t\t\t\tthis.setState({\n\t\t\t\t\tupdateDBRootPasswordStatus: \"updating\",\n\t\t\t\t\tupdateDBRootPasswordMessage:\n\t\t\t\t\t\t\"Updating DB root password. Please wait...\"\n\t\t\t\t});\n\n\t\t\t\tconst job = await ClustersAPI.changeDBRootPassword(\n\t\t\t\t\tclusterID,\n\t\t\t\t\tnewDBRootPassword\n\t\t\t\t);\n\n\t\t\t\tJobsService.trackJob(job)\n\t\t\t\t\t.then((job: JobTracking) => {\n\t\t\t\t\t\tconsole.log(\"job done\", job);\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tupdateDBRootPasswordStatus: \"success\",\n\t\t\t\t\t\t\tupdateDBRootPasswordMessage: `DB root password successfully updated.`\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tthis.props.onDBRootPasswordUpdate(newDBRootPassword);\n\t\t\t\t\t})\n\t\t\t\t\t.catch((job: Job) => {\n\t\t\t\t\t\tconsole.log(\"job failed\", job);\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tupdateDBRootPasswordStatus: \"error\",\n\t\t\t\t\t\t\tupdateDBRootPasswordMessage: `Failed to update password. ${job.executionInfo.error?.msg}`\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t} catch (error: any) {\n\t\t\t\tconsole.log(\"job start error\", error);\n\t\t\t\tthis.setState({\n\t\t\t\t\tupdateDBRootPasswordStatus: \"error\",\n\t\t\t\t\tupdateDBRootPasswordMessage: `Failed to update password. ${error.message}`\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tupdateDBRootPasswordStatus: \"error\",\n\t\t\t\tupdateDBRootPasswordMessage:\n\t\t\t\t\t\"Missing cluster ID or new password. This should not happen, report it to support.\"\n\t\t\t});\n\t\t}\n\t};\n\n\trender() {\n\t\tconst {\n\t\t\tisOpen,\n\t\t\tsshConnectionStatus,\n\t\t\tsshConnectionError,\n\t\t\tdbConnectionStatus,\n\t\t\tdbConnectionError,\n\t\t\tnewDBRootPassword,\n\t\t\tisDBAccessDenied,\n\t\t\tupdateDBRootPasswordStatus,\n\t\t\tupdateDBRootPasswordMessage\n\t\t} = this.state;\n\t\tconst { theme, testDBConnection, dbRootPassword, sshAddress, sshPort } =\n\t\t\tthis.props;\n\n\t\tconst isAddressEntered = sshAddress !== \"\" && sshPort;\n\t\tconst isDBRootPasswordEntered = dbRootPassword !== \"\";\n\n\t\tconst isCloseButtonDisabled =\n\t\t\tsshConnectionStatus === CONNECTION_TEST_STATUS.RUNNING ||\n\t\t\t(testDBConnection &&\n\t\t\t\tdbConnectionStatus === CONNECTION_TEST_STATUS.RUNNING);\n\n\t\tconst isRunButtonDisabled =\n\t\t\t!isAddressEntered ||\n\t\t\tsshConnectionStatus === CONNECTION_TEST_STATUS.RUNNING ||\n\t\t\t(testDBConnection &&\n\t\t\t\t(dbConnectionStatus === CONNECTION_TEST_STATUS.RUNNING ||\n\t\t\t\t\t!isDBRootPasswordEntered));\n\n\t\tconst sshConnectionMsg = isAddressEntered\n\t\t\t? ConnectionTestUtils.getStatusMessage(sshConnectionStatus)\n\t\t\t: \"Please enter node's SSH address\";\n\n\t\tconst dbConnectionMsg = isAddressEntered\n\t\t\t? isDBRootPasswordEntered\n\t\t\t\t? ConnectionTestUtils.getStatusMessage(dbConnectionStatus)\n\t\t\t\t: \"Please enter DB root password\"\n\t\t\t: \"Please enter node's SSH address\";\n\n\t\tconst dialogRender = () => (\n\t\t\t<>\n\t\t\t\t{theme.breakpoints.up(\"sm\") ? (\n\t\t\t\t\t// desktop\n\t\t\t\t\t {\n\t\t\t\t\t\t\tthis.setState({ isOpen: false });\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tfullWidth={true}\n\t\t\t\t\t\tmaxWidth={\"sm\"}\n\t\t\t\t\t\taria-labelledby=\"form-dialog-title\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{dialogContentRender()}\n\t\t\t\t\t\n\t\t\t\t) : (\n\t\t\t\t\t// mobile\n\t\t\t\t\t {\n\t\t\t\t\t\t\tthis.setState({ isOpen: false });\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tfullWidth={true}\n\t\t\t\t\t\tfullScreen={true}\n\t\t\t\t\t\taria-labelledby=\"form-dialog-title\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{dialogContentRender()}\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\n\t\t);\n\n\t\tconst dialogContentRender = () => (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\tAccess check\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{isAddressEntered || sshConnectionError\n\t\t\t\t\t\t\t\t\t\t? ConnectionTestUtils.renderStatusIcon(\n\t\t\t\t\t\t\t\t\t\t\t\tsshConnectionStatus,\n\t\t\t\t\t\t\t\t\t\t\t\ttheme\n\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t: ConnectionTestUtils.renderNotReadyIcon()}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{testDBConnection && (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{isAddressEntered || sshConnectionError\n\t\t\t\t\t\t\t\t\t\t\t? isDBRootPasswordEntered || dbConnectionError\n\t\t\t\t\t\t\t\t\t\t\t\t? ConnectionTestUtils.renderStatusIcon(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdbConnectionStatus,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttheme\n\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t: ConnectionTestUtils.renderNotReadyIcon()\n\t\t\t\t\t\t\t\t\t\t\t: ConnectionTestUtils.renderNotReadyIcon()}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{isDBAccessDenied && (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tCould not connect to DB. Please check DB root password and\n\t\t\t\t\t\t\t\t\t\ttest access again.\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\tconst target = e.target as HTMLFormElement;\n\n\t\t\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\t\t\tnewDBRootPassword: target.value as string\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tIf newly entered password is correct, it will be updated on\n\t\t\t\t\t\t\t\t\t\tthe cluster.\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{updateDBRootPasswordStatus && (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{updateDBRootPasswordStatus === \"updating\" && (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t{updateDBRootPasswordStatus === \"error\" && (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t{updateDBRootPasswordStatus === \"success\" && (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{updateDBRootPasswordMessage}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tthis.closeDialog();\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tdisabled={isCloseButtonDisabled}\n\t\t\t\t\t>\n\t\t\t\t\t\tClose\n\t\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t\t\tCheck access\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t {\n\t\t\t\t\t\tthis.setState({ isOpen: true });\n\t\t\t\t\t\tisAddressEntered && this.onTestClick();\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tCheck access\n\t\t\t\t\n\t\t\t\t{dialogRender()}\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default withStyles(styles, { withTheme: true })(ConnectionTestComponent);\n","import { Theme } from \"@mui/material\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nexport const styles = (theme: Theme) => createStyles({});\n","import { Grid } from \"@mui/material\";\nimport useStyles from \"components/form/styles\";\n\nconst FormWrapper = (props: any) => {\n\tconst classes = useStyles();\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t{props.children}\n\t\t\t\n\t\t\n\t);\n};\n\nexport default FormWrapper;\n","// MUI\nimport {\n\tBox,\n\tButton,\n\tCheckbox,\n\tDialog,\n\tDialogActions,\n\tDialogContent,\n\tDialogTitle,\n\tFormControl,\n\tFormControlLabel,\n\tGrid,\n\tStep,\n\tStepLabel,\n\tStepper,\n\tTextField,\n\tTooltip\n} from \"@mui/material\";\nimport { withStyles, WithStyles, WithTheme } from \"@mui/styles\";\n// redux\nimport { AppState } from \"AppState\";\n\nimport { AxiosError } from \"axios\";\nimport { clusterListFetchRequested } from \"store/cluster/actions\";\nimport { CLUSTER_TYPE } from \"pages/management/cluster/clusterCreateWizard/types\";\nimport ClusterUtils from \"pages/management/cluster/utils\";\nimport { hostListFetchRequested } from \"store/host/actions\";\nimport { Host, HOST_TYPE } from \"pages/management/host/types\";\nimport { nodeListFetchRequested } from \"store/node/actions\";\nimport { nodeCreateWizardHide } from \"pages/management/node/nodeDeploymentDialog/actions\";\nimport NodeDeploymentMonitorComponent from \"pages/management/node/nodeDeploymentDialog/nodeDeploymentMonitor/NodeDeploymentMonitorComponent\";\nimport {\n\tDEPLOYMENT_STEP_STATUS,\n\tDEPLOYMENT_STEP_TYPE,\n\tDEPLOYMENT_TYPE,\n\tDeploymentJob,\n\tDeploymentStep,\n\tNodeCreateWizardState\n} from \"pages/management/node/nodeDeploymentDialog/types\";\nimport NodeFormComponent from \"pages/management/node/nodeForm/NodeFormComponent\";\nimport { Node } from \"pages/management/node/types\";\nimport ConnectionTestComponent from \"components/connectionTestDialog/ConnectionTestComponent\";\nimport { CONNECTION_TEST_STATUS } from \"components/connectionTestDialog/types\";\nimport { GMDialogService } from \"components/dialog/DialogService\";\nimport { cloneDeep } from \"lodash\";\nimport HostsAPI from \"services/api/HostsAPI\";\nimport NodesAPI from \"services/api/NodesAPI\";\nimport { GMDErrorData } from \"services/api/types\";\nimport JobsService from \"services/jobs/jobsService\";\nimport { Job, JobTracking } from \"services/jobs/types\";\nimport { Utils } from \"utils/utils\";\nimport React, { ChangeEvent } from \"react\";\nimport { connect } from \"react-redux\";\nimport { RouteComponentProps, StaticContext, withRouter } from \"react-router\";\nimport { checkIfDesktop } from \"utils/checkIfDesktop\";\nimport { styles } from \"pages/management/node/nodeDeploymentDialog/styles\";\nimport { INPUT_VARIANT } from \"components/form/const\";\nimport FormWrapper from \"components/form/wrappers/FormWrapper\";\n\n// component local state interface\ninterface LocalState {\n\tdeploymentType: DEPLOYMENT_TYPE;\n\tnodesToDeploy: number;\n\tactiveStep: number;\n\tnode: Node;\n\thost: Host;\n\tisDeploymentDone: boolean;\n\tstartNodeAfterDeployment: boolean;\n\tdeploymentJobs: DeploymentJob[];\n\tsshTestStatus: CONNECTION_TEST_STATUS;\n\tdbTestStatus: CONNECTION_TEST_STATUS;\n\tformIsChanged: boolean;\n}\n\n// PROPS\ninterface ReduxStateProps {\n\tnodeCreateWizard: NodeCreateWizardState;\n}\n\ninterface ReduxDispatchProps {\n\tnodeCreateWizardHide: () => void;\n\tnodeListFetchRequested: (clusterID: number) => void;\n\thostListFetchRequested: (clusterID: number) => void;\n\tclusterListFetchRequested: () => void;\n}\n\ntype Props = ReduxStateProps &\n\tReduxDispatchProps &\n\tWithStyles &\n\tWithTheme &\n\tRouteComponentProps;\n\nclass NodeDeploymentDialogComponent extends React.Component {\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tthis.state = this.getInitialState(props);\n\t}\n\n\tgetInitialState = (props: Props) => {\n\t\tconst { cluster } = props.nodeCreateWizard;\n\t\tconst clusterType = ClusterUtils.getClusterType(cluster);\n\n\t\tconsole.log(\"getInitialState\", cluster);\n\n\t\tconst nodeDefaults: Node = {\n\t\t\tname: \"\",\n\t\t\thostID: -1,\n\t\t\tclusterID: cluster.id || -1,\n\t\t\tunmanaged: cluster.sharedConfig.host.type === HOST_TYPE.UNMANAGED,\n\t\t\t// dbEngine: NODE_DB_ENGINE.MARIADB_10_6,\n\t\t\t// settings: {\n\t\t\t// \tlogs: {\n\t\t\t// \t\tgeneralLog: {\n\t\t\t// \t\t\tenabled: false\n\t\t\t// \t\t}\n\t\t\t// \t}\n\t\t\t// },\n\t\t\t...cluster.sharedConfig.node\n\t\t};\n\n\t\tconst hostDefaults: Host = {\n\t\t\tname: \"\",\n\t\t\tclusterID: cluster.id || -1,\n\t\t\tsegment: 0,\n\t\t\t// type: HOST_TYPE.UNMANAGED,\n\t\t\t// system: HOST_SYSTEM.UBUNTU_20,\n\t\t\t// firewallRules: [\n\t\t\t// \t{\n\t\t\t// \t\tdescription: \"first firewall rule\",\n\t\t\t// \t\tport: 3306,\n\t\t\t// \t\tprotocol: \"tcp\",\n\t\t\t// \t\tranges: \"\"\n\t\t\t// \t}\n\t\t\t// ],\n\t\t\t...cluster.sharedConfig.host,\n\t\t\tprivateKey: \"\",\n\t\t\tauthorizedKeys: [],\n\t\t\tssh: {\n\t\t\t\taddress: \"\",\n\t\t\t\tport: \"22\"\n\t\t\t}\n\t\t};\n\n\t\tconst initialState: LocalState = {\n\t\t\tsshTestStatus: CONNECTION_TEST_STATUS.READY,\n\t\t\tdbTestStatus: CONNECTION_TEST_STATUS.READY,\n\t\t\tdeploymentType: DEPLOYMENT_TYPE.MONITORED, // todo: deployment type seems redundant with cluster type\n\t\t\tnodesToDeploy: 1,\n\t\t\tstartNodeAfterDeployment: clusterType !== CLUSTER_TYPE.MONITORED,\n\t\t\tactiveStep: 0,\n\t\t\tisDeploymentDone: false,\n\t\t\tnode: nodeDefaults,\n\t\t\thost: hostDefaults,\n\t\t\tdeploymentJobs: [\n\t\t\t\t// {\n\t\t\t\t// \thost: hostDefaults,\n\t\t\t\t// \tnode: { ...nodeDefaults, name: \"node01\" },\n\t\t\t\t// \tcluster: DEFAULT_CLUSTER,\n\t\t\t\t// \tisDone: false,\n\t\t\t\t// \tlog: [],\n\t\t\t\t// \tsteps: [\n\t\t\t\t// \t\t{\n\t\t\t\t// \t\t\ttype: DEPLOYMENT_STEP_TYPE.HOST_DEPLOY,\n\t\t\t\t// \t\t\tstatus: DEPLOYMENT_STEP_STATUS.DONE\n\t\t\t\t// \t\t},\n\t\t\t\t// \t\t{\n\t\t\t\t// \t\t\ttype: DEPLOYMENT_STEP_TYPE.NODE_INSTALL,\n\t\t\t\t// \t\t\tstatus: DEPLOYMENT_STEP_STATUS.RUNNING\n\t\t\t\t// \t\t},\n\t\t\t\t// \t\t{\n\t\t\t\t// \t\t\ttype: DEPLOYMENT_STEP_TYPE.NODE_START,\n\t\t\t\t// \t\t\tstatus: DEPLOYMENT_STEP_STATUS.PENDING\n\t\t\t\t// \t\t}\n\t\t\t\t// \t]\n\t\t\t\t// }\n\t\t\t],\n\t\t\tformIsChanged: false // if form is modified, ask user if they want to abandon changes they made\n\t\t};\n\n\t\t// console.log(\"initial state\", initialState);\n\t\treturn cloneDeep(initialState);\n\t};\n\n\tdeploy(host: Host, node: Node): void {\n\t\tfunction generateSteps(\n\t\t\tstartNodeAfterDeployment: boolean\n\t\t): DeploymentStep[] {\n\t\t\tlet steps: DeploymentStep[] = [\n\t\t\t\t{\n\t\t\t\t\ttype: DEPLOYMENT_STEP_TYPE.HOST_DEPLOY,\n\t\t\t\t\tstatus: DEPLOYMENT_STEP_STATUS.PENDING\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: DEPLOYMENT_STEP_TYPE.NODE_INSTALL,\n\t\t\t\t\tstatus: DEPLOYMENT_STEP_STATUS.PENDING\n\t\t\t\t}\n\t\t\t];\n\n\t\t\tif (startNodeAfterDeployment) {\n\t\t\t\tsteps.push({\n\t\t\t\t\ttype: DEPLOYMENT_STEP_TYPE.NODE_START,\n\t\t\t\t\tstatus: DEPLOYMENT_STEP_STATUS.PENDING\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn steps;\n\t\t}\n\n\t\tconst { cluster } = this.props.nodeCreateWizard;\n\n\t\tthis.setState((state: LocalState) => ({\n\t\t\tdeploymentJobs: [\n\t\t\t\t...state.deploymentJobs,\n\t\t\t\t{\n\t\t\t\t\tcluster,\n\t\t\t\t\thost,\n\t\t\t\t\tnode,\n\t\t\t\t\tstartNodeAfterDeployment: this.state.startNodeAfterDeployment,\n\t\t\t\t\tisDone: false,\n\t\t\t\t\tlog: [],\n\t\t\t\t\tsteps: generateSteps(this.state.startNodeAfterDeployment)\n\t\t\t\t}\n\t\t\t]\n\t\t}));\n\n\t\tconsole.log(\"create host\", host);\n\t\tHostsAPI.create(host).then(\n\t\t\t(response: { job: Job; host: Host }) => {\n\t\t\t\tconsole.log(\"host create job started\", response);\n\n\t\t\t\tconst { job, host } = response;\n\n\t\t\t\tnode = {\n\t\t\t\t\t...node,\n\t\t\t\t\thostID: host.id || -1\n\t\t\t\t};\n\n\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\tdeploymentJobs: state.deploymentJobs.map(\n\t\t\t\t\t\t(deploymentJob: DeploymentJob) => {\n\t\t\t\t\t\t\tif (host.name === deploymentJob.host.name) {\n\t\t\t\t\t\t\t\tdeploymentJob.host = host;\n\t\t\t\t\t\t\t\tdeploymentJob.hostJob = {\n\t\t\t\t\t\t\t\t\tid: job.id,\n\t\t\t\t\t\t\t\t\tstatus: job.executionInfo.status,\n\t\t\t\t\t\t\t\t\tmeta: job.meta\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\tdeploymentJob.steps[0].status = DEPLOYMENT_STEP_STATUS.RUNNING;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn deploymentJob;\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t}));\n\n\t\t\t\tJobsService.trackJob(job).then(\n\t\t\t\t\t(jobTracking: JobTracking) => {\n\t\t\t\t\t\tconsole.log(\"Host installation job done!\", host.name);\n\n\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\tdeploymentJobs: state.deploymentJobs.map(\n\t\t\t\t\t\t\t\t(deploymentJob: DeploymentJob) => {\n\t\t\t\t\t\t\t\t\tif (host.name === deploymentJob.host.name) {\n\t\t\t\t\t\t\t\t\t\tdeploymentJob = {\n\t\t\t\t\t\t\t\t\t\t\t...deploymentJob,\n\t\t\t\t\t\t\t\t\t\t\thostJob: jobTracking\n\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\tdeploymentJob.steps[0].status = DEPLOYMENT_STEP_STATUS.DONE;\n\t\t\t\t\t\t\t\t\t\tdeploymentJob.steps[1].status =\n\t\t\t\t\t\t\t\t\t\t\tDEPLOYMENT_STEP_STATUS.RUNNING;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn deploymentJob;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}));\n\n\t\t\t\t\t\tsetTimeout(\n\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\tthis.installNode(node);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\thost.type === HOST_TYPE.DIGITAL_OCEAN ? 120000 : 0 // temporary solution - need to delay install to give host time to initialize\n\t\t\t\t\t\t);\n\t\t\t\t\t\t// this.props.clusterListFetchRequested();\n\t\t\t\t\t\t// this.props.hostListFetchRequested(host.clusterID);\n\t\t\t\t\t},\n\t\t\t\t\t(job: JobTracking) => {\n\t\t\t\t\t\t// console.log(\"job failed\", host.name, job.executionInfo);\n\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\tdeploymentJobs: state.deploymentJobs.map(\n\t\t\t\t\t\t\t\t(deploymentJob: DeploymentJob) => {\n\t\t\t\t\t\t\t\t\tif (host.name === deploymentJob.host.name) {\n\t\t\t\t\t\t\t\t\t\tdeploymentJob = {\n\t\t\t\t\t\t\t\t\t\t\t...deploymentJob,\n\t\t\t\t\t\t\t\t\t\t\thostJob: {\n\t\t\t\t\t\t\t\t\t\t\t\tid: job.id,\n\t\t\t\t\t\t\t\t\t\t\t\tstatus: job.status,\n\t\t\t\t\t\t\t\t\t\t\t\tmeta: job.meta\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// errorMessage: `Host ${host.name} deployment failed. Check logs.`\n\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\tdeploymentJob.steps[0].status =\n\t\t\t\t\t\t\t\t\t\t\tDEPLOYMENT_STEP_STATUS.FAILED;\n\t\t\t\t\t\t\t\t\t\tdeploymentJob.steps[0].errorMessage =\n\t\t\t\t\t\t\t\t\t\t\t\"Host deployment failed. Please check logs\";\n\t\t\t\t\t\t\t\t\t\tdeploymentJob.isDone = true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn deploymentJob;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}));\n\t\t\t\t\t\t// this.unsubscribeFromLogs();\n\t\t\t\t\t\tthis.props.hostListFetchRequested(host.clusterID);\n\t\t\t\t\t\tthis.props.clusterListFetchRequested();\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\t\t\t(err: any) => {\n\t\t\t\tconsole.log(\"host deploy error\", err, err.message, err.response);\n\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\tdeploymentJobs: state.deploymentJobs.map(\n\t\t\t\t\t\t(deploymentJob: DeploymentJob) => {\n\t\t\t\t\t\t\tif (host.name === deploymentJob.host.name) {\n\t\t\t\t\t\t\t\tdeploymentJob.steps[0].status = DEPLOYMENT_STEP_STATUS.FAILED;\n\t\t\t\t\t\t\t\tdeploymentJob.steps[0].errorMessage = err.message;\n\t\t\t\t\t\t\t\tdeploymentJob.isDone = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn deploymentJob;\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t}));\n\t\t\t}\n\t\t);\n\t}\n\n\tinstallNode(node: Node): void {\n\t\tNodesAPI.create(node).then(\n\t\t\t(response: { job: Job; node: Node }) => {\n\t\t\t\tconst { job, node } = response;\n\t\t\t\tconsole.log(\"node create job started\", node, job);\n\n\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\tdeploymentJobs: state.deploymentJobs.map(\n\t\t\t\t\t\t(deploymentJob: DeploymentJob) => {\n\t\t\t\t\t\t\tif (node.name === deploymentJob.node.name) {\n\t\t\t\t\t\t\t\tdeploymentJob = {\n\t\t\t\t\t\t\t\t\t...deploymentJob,\n\t\t\t\t\t\t\t\t\tnodeJob: {\n\t\t\t\t\t\t\t\t\t\tid: job.id,\n\t\t\t\t\t\t\t\t\t\tstatus: job.executionInfo.status,\n\t\t\t\t\t\t\t\t\t\tmeta: job.meta\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\tdeploymentJob.steps[1].status = DEPLOYMENT_STEP_STATUS.RUNNING;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn deploymentJob;\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t}));\n\n\t\t\t\tJobsService.trackJob(job).then(\n\t\t\t\t\t() => {\n\t\t\t\t\t\tconsole.log(\"Node deployment job done!\", node.name);\n\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\tdeploymentJobs: state.deploymentJobs.map(\n\t\t\t\t\t\t\t\t(deploymentJob: DeploymentJob) => {\n\t\t\t\t\t\t\t\t\tif (node.name === deploymentJob.node.name) {\n\t\t\t\t\t\t\t\t\t\tdeploymentJob = {\n\t\t\t\t\t\t\t\t\t\t\t...deploymentJob,\n\t\t\t\t\t\t\t\t\t\t\t// nodeJob: job, TODO\n\t\t\t\t\t\t\t\t\t\t\tisDone: !this.state.startNodeAfterDeployment\n\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\tdeploymentJob.steps[1].status = DEPLOYMENT_STEP_STATUS.DONE;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn deploymentJob;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}));\n\n\t\t\t\t\t\t// this.unsubscribeFromLogs();\n\t\t\t\t\t\tthis.props.clusterListFetchRequested();\n\t\t\t\t\t\tthis.props.nodeListFetchRequested(node.clusterID);\n\t\t\t\t\t\tthis.props.hostListFetchRequested(node.clusterID);\n\n\t\t\t\t\t\tif (this.state.startNodeAfterDeployment) {\n\t\t\t\t\t\t\tthis.startNode(node);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\tisDeploymentDone: state.deploymentJobs.every(\n\t\t\t\t\t\t\t\t\t(deploymentJob: DeploymentJob) => deploymentJob.isDone\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t(job: JobTracking) => {\n\t\t\t\t\t\t// console.log(\"job failed\", node.name, job);\n\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\tdeploymentJobs: state.deploymentJobs.map(\n\t\t\t\t\t\t\t\t(deploymentJob: DeploymentJob) => {\n\t\t\t\t\t\t\t\t\tif (node.name === deploymentJob.node.name) {\n\t\t\t\t\t\t\t\t\t\tdeploymentJob = {\n\t\t\t\t\t\t\t\t\t\t\t...deploymentJob,\n\t\t\t\t\t\t\t\t\t\t\tnodeJob: job\n\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\tdeploymentJob.steps[1].status =\n\t\t\t\t\t\t\t\t\t\t\tDEPLOYMENT_STEP_STATUS.FAILED;\n\t\t\t\t\t\t\t\t\t\tdeploymentJob.steps[1].errorMessage =\n\t\t\t\t\t\t\t\t\t\t\t\"Node installation failed. Check logs for more info\";\n\t\t\t\t\t\t\t\t\t\tdeploymentJob.isDone = true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn deploymentJob;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}));\n\t\t\t\t\t\t// this.unsubscribeFromLogs();\n\t\t\t\t\t\tthis.props.clusterListFetchRequested();\n\t\t\t\t\t\tthis.props.nodeListFetchRequested(node.clusterID);\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\t\t\t(err: any) => {\n\t\t\t\t// console.log(\"node install error\", err, err.message, err.response);\n\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\tdeploymentJobs: state.deploymentJobs.map(\n\t\t\t\t\t\t(deploymentJob: DeploymentJob) => {\n\t\t\t\t\t\t\tif (node.name === deploymentJob.node.name) {\n\t\t\t\t\t\t\t\tdeploymentJob.steps[1].status = DEPLOYMENT_STEP_STATUS.FAILED;\n\t\t\t\t\t\t\t\tdeploymentJob.steps[1].errorMessage = err.message;\n\t\t\t\t\t\t\t\tdeploymentJob.isDone = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn deploymentJob;\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t}));\n\t\t\t}\n\t\t);\n\t}\n\n\tstartNode(node: Node) {\n\t\tNodesAPI.start(node).then(\n\t\t\t(job: Job) => {\n\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\tdeploymentJobs: state.deploymentJobs.map(\n\t\t\t\t\t\t(deploymentJob: DeploymentJob) => {\n\t\t\t\t\t\t\tif (node.name === deploymentJob.node.name) {\n\t\t\t\t\t\t\t\tdeploymentJob.steps[2].status = DEPLOYMENT_STEP_STATUS.RUNNING;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn deploymentJob;\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t}));\n\n\t\t\t\tJobsService.trackJob(job).then(\n\t\t\t\t\t() => {\n\t\t\t\t\t\t// console.log(\"node start job done!\", node.name);\n\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\tdeploymentJobs: state.deploymentJobs.map(\n\t\t\t\t\t\t\t\t(deploymentJob: DeploymentJob) => {\n\t\t\t\t\t\t\t\t\tif (node.name === deploymentJob.node.name) {\n\t\t\t\t\t\t\t\t\t\tdeploymentJob.steps[2].status = DEPLOYMENT_STEP_STATUS.DONE;\n\t\t\t\t\t\t\t\t\t\tdeploymentJob.isDone = true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn deploymentJob;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}));\n\n\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\tisDeploymentDone: state.deploymentJobs.every(\n\t\t\t\t\t\t\t\t(deploymentJob: DeploymentJob) => deploymentJob.isDone\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}));\n\t\t\t\t\t},\n\t\t\t\t\t() => {\n\t\t\t\t\t\t// console.log(\"node start job failed\", node.name, job);\n\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\tdeploymentJobs: state.deploymentJobs.map(\n\t\t\t\t\t\t\t\t(deploymentJob: DeploymentJob) => {\n\t\t\t\t\t\t\t\t\tif (node.name === deploymentJob.node.name) {\n\t\t\t\t\t\t\t\t\t\tdeploymentJob.steps[2].status =\n\t\t\t\t\t\t\t\t\t\t\tDEPLOYMENT_STEP_STATUS.FAILED;\n\t\t\t\t\t\t\t\t\t\tdeploymentJob.steps[2].errorMessage =\n\t\t\t\t\t\t\t\t\t\t\t\"Failed to start node. Check logs for more info\";\n\t\t\t\t\t\t\t\t\t\tdeploymentJob.isDone = true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn deploymentJob;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}));\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\t\t\t(err: AxiosError) => {\n\t\t\t\t// console.log(\"node start error\", err, err.message, err.response);\n\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\tdeploymentJobs: state.deploymentJobs.map(\n\t\t\t\t\t\t(deploymentJob: DeploymentJob) => {\n\t\t\t\t\t\t\tif (node.name === deploymentJob.node.name) {\n\t\t\t\t\t\t\t\tdeploymentJob.steps[2].status = DEPLOYMENT_STEP_STATUS.FAILED;\n\t\t\t\t\t\t\t\tdeploymentJob.steps[2].errorMessage = err.message;\n\t\t\t\t\t\t\t\tdeploymentJob.isDone = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn deploymentJob;\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t}));\n\t\t\t}\n\t\t);\n\t}\n\n\tonSubmit(): void {\n\t\tif (this.state.nodesToDeploy === 1) {\n\t\t\t// if (this.props.nodeCreateWizard.isHostDeployed) {\n\t\t\t// \tthis.installNode(this.state.node);\n\t\t\t// } else {\n\t\t\tthis.deploy(this.state.host, this.state.node);\n\t\t\t// }\n\t\t} else {\n\t\t\tthis.initiateBulkDeployment();\n\t\t}\n\n\t\tthis.setState({ activeStep: 1 });\n\t}\n\n\tinitiateBulkDeployment() {\n\t\t// console.log(\"preparing data for bulk deployment\", this.state.nodesToDeploy);\n\t\tconst { host, node, nodesToDeploy } = this.state;\n\n\t\tconst suffixes = Utils.generateRandomStringArray(nodesToDeploy, 5);\n\n\t\tconst hosts: Host[] = Array(nodesToDeploy)\n\t\t\t.fill(host)\n\t\t\t.map((host: Host, index: number) => ({\n\t\t\t\t...host,\n\t\t\t\tname: `${host.name}-${suffixes[index]}`\n\t\t\t}));\n\t\tconst nodes: Node[] = Array(nodesToDeploy)\n\t\t\t.fill(node)\n\t\t\t.map((node: Node, index: number) => ({\n\t\t\t\t...node,\n\t\t\t\tname: `${node.name}-${suffixes[index]}`\n\t\t\t}));\n\n\t\t// console.log(\"generated hosts\", hosts);\n\t\t// console.log(\"generated nodes\", nodes);\n\n\t\t// start host deployment jobs\n\t\thosts.forEach((host: Host, index: number) => {\n\t\t\tthis.deploy(host, nodes[index]);\n\t\t});\n\t}\n\n\tonCloseAttempt(step: number): void {\n\t\tif (step === 0) {\n\t\t\tif (this.state.formIsChanged) {\n\t\t\t\tGMDialogService.showConfirm({\n\t\t\t\t\ttitle: \"Unsaved changes\",\n\t\t\t\t\tmessage:\n\t\t\t\t\t\t\"Are you sure you want to exit the dialog? Changes will be lost.\",\n\t\t\t\t\tconfirmText: \"Exit\",\n\t\t\t\t\tdeclineText: \"Keep editing\"\n\t\t\t\t}).then(\n\t\t\t\t\t() => {\n\t\t\t\t\t\tthis.props.nodeCreateWizardHide();\n\t\t\t\t\t\t// TODO: ask should it go gere as it goes in clusterCreateDialogComponent.tsx, probably not because it is automaticly reset\n\t\t\t\t\t\t// setTimeout(() => {\n\t\t\t\t\t\t// \tthis.resetState();\n\t\t\t\t\t\t// }, 500);\n\t\t\t\t\t},\n\t\t\t\t\t() => {}\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tthis.props.nodeCreateWizardHide();\n\t\t\t}\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { classes, theme } = this.props;\n\t\tconst { isOpen, cluster } = this.props.nodeCreateWizard;\n\t\tconst {\n\t\t\tnode,\n\t\t\thost,\n\t\t\tstartNodeAfterDeployment,\n\t\t\tnodesToDeploy,\n\t\t\tactiveStep,\n\t\t\tdeploymentJobs,\n\t\t\tsshTestStatus,\n\t\t\tdbTestStatus\n\t\t} = this.state;\n\n\t\tconst clusterType = ClusterUtils.getClusterType(cluster);\n\t\tlet isDeployDisabled = false;\n\n\t\tif (\n\t\t\tclusterType === CLUSTER_TYPE.MONITORED &&\n\t\t\t(sshTestStatus !== CONNECTION_TEST_STATUS.SUCCESS ||\n\t\t\t\tdbTestStatus !== CONNECTION_TEST_STATUS.SUCCESS)\n\t\t)\n\t\t\tisDeployDisabled = true;\n\n\t\tif (\n\t\t\tclusterType === CLUSTER_TYPE.HYBRID &&\n\t\t\tsshTestStatus !== CONNECTION_TEST_STATUS.SUCCESS\n\t\t)\n\t\t\tisDeployDisabled = true;\n\n\t\tconst step1Content = (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{host.type !== HOST_TYPE.UNMANAGED && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\tconst field = e.target as HTMLFormElement;\n\t\t\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\t\t\tnodesToDeploy: parseInt(field.value),\n\t\t\t\t\t\t\t\t\t\t\t\tformIsChanged: true\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\t\t\t\tstartNodeAfterDeployment: !startNodeAfterDeployment,\n\t\t\t\t\t\t\t\t\t\t\t\t\tformIsChanged: true\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\tvalue=\"startNode\"\n\t\t\t\t\t\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\tnodesToDeploy > 1\n\t\t\t\t\t\t\t\t\t\t\t? \"Start nodes after deployment\"\n\t\t\t\t\t\t\t\t\t\t\t: \"Start node after deployment\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tthis.setState({ node, formIsChanged: true });\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonHostChange={(host: Host) => {\n\t\t\t\t\t\t\t\tthis.setState({ host, formIsChanged: true });\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tmultipleDeploymentMode={nodesToDeploy > 1}\n\t\t\t\t\t\t\tonSubmit={() => {\n\t\t\t\t\t\t\t\t// console.log(\"onSubmit\", node, host);\n\t\t\t\t\t\t\t\tthis.onSubmit();\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tsshTestStatus={sshTestStatus}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\n\t\tconst step1Actions = (\n\t\t\t<>\n\t\t\t\t
\n\t\t\t\t {\n\t\t\t\t\t\tthis.onCloseAttempt(activeStep);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tCancel\n\t\t\t\t\n\n\t\t\t\t{clusterType !== CLUSTER_TYPE.MANAGED && (\n\t\t\t\t\t {\n\t\t\t\t\t\t\tthis.setState({ sshTestStatus: status });\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tonDBStatusChange={(status: CONNECTION_TEST_STATUS) => {\n\t\t\t\t\t\t\tthis.setState({ dbTestStatus: status });\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tonDBRootPasswordUpdate={(rootPassword: string) => {\n\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\tnode: {\n\t\t\t\t\t\t\t\t\t...state.node,\n\t\t\t\t\t\t\t\t\trootPassword: rootPassword\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\tthis.props.clusterListFetchRequested();\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t{isDeployDisabled ? (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tDeploy\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t) : (\n\t\t\t\t\t\n\t\t\t\t\t\tDeploy\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\n\t\t);\n\n\t\tconst step2Content = (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t{deploymentJobs.map((deploymentJob: DeploymentJob, index: number) => (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t))}\n\t\t\t\t\n\t\t\t\n\t\t);\n\n\t\tconst step2Actions = (\n\t\t\t<>\n\t\t\t\t
\n\t\t\t\t job.isDone)}\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tthis.props.hostListFetchRequested(node.clusterID);\n\t\t\t\t\t\tthis.props.nodeListFetchRequested(node.clusterID);\n\t\t\t\t\t\tthis.props.clusterListFetchRequested();\n\t\t\t\t\t\tthis.props.nodeCreateWizardHide();\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tFinish\n\t\t\t\t\n\t\t\t\n\t\t);\n\n\t\tconst stepper = (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t{\"Configure\"}\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t{\"Deploy\"}\n\t\t\t\t\n\t\t\t\n\t\t);\n\n\t\tconst dialogContent = (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t{stepper}\n\t\t\t\t\t{(activeStep === 0 && step1Content) ||\n\t\t\t\t\t\t(activeStep === 1 && step2Content)}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{(activeStep === 0 && step1Actions) ||\n\t\t\t\t\t\t(activeStep === 1 && step2Actions)}\n\t\t\t\t\n\t\t\t\n\t\t);\n\n\t\tconst isDesktop = checkIfDesktop(600);\n\n\t\treturn (\n\t\t\t {\n\t\t\t\t\tif (reason === \"escapeKeyDown\" || reason === \"backdropClick\") {\n\t\t\t\t\t\tthis.onCloseAttempt(activeStep);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tscroll=\"body\"\n\t\t\t\tfullScreen={!isDesktop}\n\t\t\t\tmaxWidth={activeStep !== 1 ? \"md\" : \"sm\"}\n\t\t\t\tfullWidth={isDesktop}\n\t\t\t\topen={isOpen}\n\t\t\t>\n\t\t\t\tNode deployment\n\t\t\t\t{dialogContent}\n\t\t\t\n\t\t);\n\t}\n}\n\n// REDUX MAPPINGS\nconst mapGlobalStateToProps = (state: AppState) => ({\n\tnodeCreateWizard: state.nodeCreateWizard\n});\n\nconst mapGlobalDispatchToProps = (dispatch: any) => ({\n\tnodeCreateWizardHide: () => {\n\t\tdispatch(nodeCreateWizardHide());\n\t},\n\tnodeListFetchRequested: (clusterID: number) => {\n\t\tdispatch(nodeListFetchRequested(clusterID));\n\t},\n\thostListFetchRequested: (clusterID: number) => {\n\t\tdispatch(hostListFetchRequested(clusterID));\n\t},\n\tclusterListFetchRequested: () => {\n\t\tdispatch(clusterListFetchRequested());\n\t}\n});\n\nexport default withStyles(styles, { withTheme: true })(\n\twithRouter(\n\t\tconnect(\n\t\t\tmapGlobalStateToProps,\n\t\t\tmapGlobalDispatchToProps\n\t\t)(NodeDeploymentDialogComponent)\n\t)\n);\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from \"@mui/styles/createStyles\";\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\tpaperContainer: {\n\t\t\tcursor: \"pointer\",\n\t\t\t\"&:hover\": {\n\t\t\t\tbackgroundColor: \"#f6f6f6\"\n\t\t\t},\n\t\t\t\"&:active\": {\n\t\t\t\tbackgroundColor: \"#f0f0f0\"\n\t\t\t}\n\t\t},\n\t\ttypeSelectionPaper: {\n\t\t\tpadding: \"10px\"\n\t\t\t// backgroundColor: \"#f0f0f0\"\n\t\t},\n\t\tstepperRoot: {\n\t\t\tpadding: \"0 0 20px 0\"\n\t\t},\n\t\tcheckboxCenter: {\n\t\t\theight: \"100%\",\n\t\t\tdisplay: \"flex\",\n\t\t\talignItems: \"center\",\n\t\t\tjustifyContent: \"center\"\n\t\t}\n\t});\n","import React from \"react\";\nimport { Box, Typography } from \"@mui/material\";\nimport {\n\tDEPLOYMENT_STATUS,\n\tWSREP_MEMBER_STATE\n} from \"pages/management/cluster/types\";\nimport { DB_STATE, NODE_STATE } from \"pages/management/node/types\";\nimport { styles } from \"components/monitoring/nodeState/styles\";\nimport { WithStyles } from '@mui/styles';\nimport withStyles from '@mui/styles/withStyles';\n\ninterface LocalState {}\n\ninterface LocalProps {\n\tnodeState: NODE_STATE;\n}\n\ntype Props = LocalProps & WithStyles;\n\nclass NodeStateComponent extends React.PureComponent {\n\trender() {\n\t\tconst { nodeState, classes } = this.props;\n\n\t\tconst renderNodeState = (nodeState: NODE_STATE) => {\n\t\t\tswitch (nodeState) {\n\t\t\t\tcase WSREP_MEMBER_STATE.UNDEFINED:\n\t\t\t\t\treturn UNDEFINED;\n\t\t\t\tcase WSREP_MEMBER_STATE.JOINER:\n\t\t\t\t\treturn JOINER;\n\t\t\t\tcase WSREP_MEMBER_STATE.DONOR:\n\t\t\t\t\treturn DONOR;\n\t\t\t\tcase WSREP_MEMBER_STATE.JOINED:\n\t\t\t\t\treturn JOINED;\n\t\t\t\tcase WSREP_MEMBER_STATE.SYNCED:\n\t\t\t\t\treturn SYNCED;\n\t\t\t\tcase WSREP_MEMBER_STATE.ERROR:\n\t\t\t\t\treturn ERROR;\n\t\t\t\tcase WSREP_MEMBER_STATE.MAX:\n\t\t\t\t\treturn MAX;\n\t\t\t\tcase DB_STATE.UNKNOWN:\n\t\t\t\t\treturn \"\";\n\t\t\t\tcase DB_STATE.DOWN:\n\t\t\t\t\treturn (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tNOT RUNNING\n\t\t\t\t\t\t\n\t\t\t\t\t);\n\t\t\t\tcase DEPLOYMENT_STATUS.FAILURE:\n\t\t\t\t\treturn (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tDEPLOYMENT ERROR\n\t\t\t\t\t\t\n\t\t\t\t\t);\n\n\t\t\t\tdefault:\n\t\t\t\t\treturn UNKNOWN;\n\t\t\t}\n\t\t};\n\n\t\treturn <>{renderNodeState(nodeState)};\n\t}\n}\n\nexport default withStyles(styles)(NodeStateComponent);\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from '@mui/styles/createStyles';\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\tstateOk: {\n\t\t\tcolor: theme.palette.success.main\n\t\t},\n\t\tstateError: {\n\t\t\tcolor: theme.palette.error.main\n\t\t}\n\t});\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from \"@mui/styles/createStyles\";\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\tcard: {\n\t\t\twidth: \"100%\"\n\t\t\t// [theme.breakpoints.up(\"sm\")]: {\n\t\t\t// \twidth: 700\n\t\t\t// }\n\t\t\t// height: \"100%\"\n\t\t},\n\t\tnoPaddingCardContent: {\n\t\t\tpadding: 0,\n\t\t\t\"&:last-child\": {\n\t\t\t\tpadding: 0\n\t\t\t}\n\t\t},\n\n\t\t// deployment logs dialog\n\t\tlogContent: {\n\t\t\tbackgroundColor: \"black\",\n\t\t\tcolor: \"white\",\n\t\t\tpaddingTop: `${theme.spacing(5)} !important`\n\t\t},\n\t\tlogsTypography: {\n\t\t\tfontSize: \"0.9em\",\n\t\t\tfontFamily: \"monospace\"\n\t\t},\n\t\tgaleraManagerLogMessage: {\n\t\t\tcolor: theme.palette.primary.main\n\t\t},\n\t\thostStderrMessage: {\n\t\t\tcolor: theme.palette.error.main\n\t\t},\n\t\tcloseButton: {\n\t\t\tposition: \"absolute\",\n\t\t\tright: theme.spacing(2),\n\t\t\ttop: theme.spacing(2),\n\t\t\tcolor: theme.palette.grey[500]\n\t\t},\n\t\tcopyDeploymentLogsBtn: {\n\t\t\tposition: \"absolute\",\n\t\t\tbottom: 22,\n\t\t\tright: 26,\n\t\t\tcolor: \"black\"\n\t\t}\n\t});\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from \"@mui/styles/createStyles\";\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\tnested: {\n\t\t\tpaddingLeft: theme.spacing(10)\n\t\t},\n\t\tclusterElement: {\n\t\t\tpaddingLeft: theme.spacing(2),\n\t\t\tborderTop: `1px solid ${theme.palette.grey[300]}`\n\t\t},\n\t\tstrayHostsSubheader: {\n\t\t\tpadding: \"8px 12px 0 40px\",\n\t\t\tlineHeight: 1.5\n\t\t},\n\t\tbadgeHelpIcon: {\n\t\t\twidth: 22,\n\t\t\theight: 22,\n\t\t\tborderRadius: \"50%\",\n\t\t\tcolor: theme.palette.grey[400],\n\t\t\tbackground: theme.palette.common.white\n\t\t},\n\t\talertStyle: {\n\t\t\tmarginRight: \"10px\",\n\t\t\tpaddingTop: 0,\n\t\t\tpaddingBottom: 0,\n\t\t\tbackgroundColor: theme.palette.grey[200]\n\t\t},\n\t\t// these styles are also used in NoClusterItemComponent.tsx\n\t\tclusterItemAvatar: {\n\t\t\tbackgroundColor: theme.palette.common.white,\n\t\t\tcolor: theme.palette.primary.main\n\t\t},\n\t\tclusterItemAvatarIcon: {\n\t\t\twidth: 48,\n\t\t\theight: 48\n\t\t}\n\t});\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from '@mui/styles/createStyles';\n\nexport const sharedStyles = (theme: Theme) =>\n\tcreateStyles({\n\t\tnestedTreeViewItem: {\n\t\t\tpaddingLeft: theme.spacing(6)\n\t\t},\n\t\tdoubleNestedTreeViewItem: {\n\t\t\tpaddingLeft: theme.spacing(10)\n\t\t}\n\n\t});\n","import {\n\tAvatar,\n\tGrid,\n\tListItem,\n\tListItemAvatar,\n\tListItemText,\n\tTypography\n} from \"@mui/material\";\nimport { WithStyles, WithTheme } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { AppState } from \"AppState\";\nimport { BlinkingBadge } from \"components/BlinkingBadge/BlinkingBadge\";\nimport NodeStateComponent from \"components/monitoring/nodeState/nodeStateComponent\";\nimport { Database } from \"mdi-material-ui\";\nimport { Cluster, WSREP_MEMBER_STATE } from \"pages/management/cluster/types\";\nimport { DB_STATE, Node, NODE_STATE } from \"pages/management/node/types\";\nimport { styles } from \"pages/management/treeView/nodeItem/styles\";\nimport React from \"react\";\nimport { connect } from \"react-redux\";\nimport { StaticContext } from \"react-router\";\nimport { RouteComponentProps, withRouter } from \"react-router-dom\";\nimport { createSelector } from \"reselect\";\nimport { JOB_STATUS, JobTracking } from \"services/jobs/types\";\nimport { sharedStyles } from \"sharedStyles\";\nimport { MetricsStoreState } from \"store/metricsStore/storeTypes\";\nimport { Utils } from \"utils/utils\";\n\n// component local state interface\ninterface State {\n\tisSelected: boolean;\n}\n\n// PROPS\ninterface LocalProps {\n\tnode: Node;\n}\n\ninterface DispatchProps {}\n\ninterface ReduxStateProps {\n\thasRunningJobs: boolean;\n\tnodeState: NODE_STATE;\n\tcommittedTransactions: number;\n}\n\nconst mergedStyles = Utils.mergeStyles(styles, sharedStyles);\n\ntype Props = LocalProps &\n\tDispatchProps &\n\tReduxStateProps &\n\tWithStyles &\n\tWithTheme &\n\tRouteComponentProps;\n\n// COMPONENT\nclass NodeItemComponent extends React.Component {\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\tisSelected: false\n\t\t};\n\t}\n\n\thandleClick = () => {\n\t\tconst { clusterID, id: nodeID } = this.props.node;\n\t\tthis.props.history.push(`/clusters/${clusterID}/nodes/${nodeID}`);\n\t};\n\n\tcomponentDidUpdate(prevProps: Props) {\n\t\tif (this.props.location !== prevProps.location) {\n\t\t\tthis.onRouteChanged();\n\t\t}\n\t}\n\n\tcomponentDidMount(): void {\n\t\tthis.onRouteChanged();\n\t}\n\n\tonRouteChanged() {\n\t\tconst isSelected = this.props.location.pathname.endsWith(\n\t\t\t`/${this.props.node.clusterID}/nodes/${this.props.node.id}`\n\t\t);\n\n\t\tif (isSelected !== this.state.isSelected) {\n\t\t\tthis.setState((state: State) => ({\n\t\t\t\t...state,\n\t\t\t\tisSelected\n\t\t\t}));\n\t\t}\n\t}\n\n\trender(): React.ReactNode {\n\t\tconst {\n\t\t\ttheme,\n\t\t\thasRunningJobs,\n\t\t\tnodeState,\n\t\t\tnode,\n\t\t\tclasses,\n\t\t\tcommittedTransactions\n\t\t} = this.props;\n\t\tconst { isSelected } = this.state;\n\n\t\tconst avatar = (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{hasRunningJobs ? (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{avatar}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\tavatar\n\t\t\t\t\t\t)}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{node.name}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t({committedTransactions} tx)\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsecondary={node.dbEngine}\n\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\n// selectors\nconst makeHasRunningJobs = () =>\n\tcreateSelector(\n\t\t(state: AppState) => state.jobMonitor.runningJobList,\n\t\t(state: AppState, props: LocalProps) => props.node,\n\t\t(jobList: JobTracking[], node: Node) =>\n\t\t\tjobList.some(\n\t\t\t\t(job: JobTracking) =>\n\t\t\t\t\t(job.meta.node_id === node.id || job.meta.host_id === node.hostID) &&\n\t\t\t\t\tjob.meta.cluster_id === node.clusterID &&\n\t\t\t\t\tjob.status === JOB_STATUS.RUNNING\n\t\t\t)\n\t);\n\nconst makeNodeStateSelector = () =>\n\tcreateSelector(\n\t\t(state: AppState) => state.clusterList,\n\t\t(state: AppState) => state.metrics,\n\t\t(state: AppState, props: LocalProps) => props.node,\n\t\t(\n\t\t\tclusterList: Cluster[],\n\t\t\tmetricsStore: MetricsStoreState,\n\t\t\tnode: Node\n\t\t): NODE_STATE => {\n\t\t\tconst clusterName = clusterList.find(\n\t\t\t\t(cluster: Cluster) => cluster.id === node.clusterID\n\t\t\t)?.name;\n\n\t\t\tif (clusterName) {\n\t\t\t\tconst localStateMetric =\n\t\t\t\t\tmetricsStore.wsrepLocalStateMetrics[`${clusterName},${node.name}`];\n\t\t\t\treturn localStateMetric?.value || DB_STATE.UNKNOWN;\n\t\t\t} else {\n\t\t\t\treturn DB_STATE.UNKNOWN;\n\t\t\t}\n\t\t}\n\t);\n\nconst makeCommittedTransactionsSelector = () =>\n\tcreateSelector(\n\t\t(state: AppState) => state.metrics,\n\t\t(state: AppState) => state.clusterList,\n\t\t(state: AppState, props: LocalProps) => props.node,\n\t\t(\n\t\t\tmetricsRecord: MetricsStoreState,\n\t\t\tclusterList: Cluster[],\n\t\t\tnode: Node\n\t\t): number => {\n\t\t\tconst cluster = clusterList.find(\n\t\t\t\t(cluster: Cluster) => cluster.id === node.clusterID\n\t\t\t);\n\n\t\t\tif (cluster) {\n\t\t\t\tconst lastCommitted =\n\t\t\t\t\tmetricsRecord.wsrepLastCommittedMetrics[\n\t\t\t\t\t\t`${cluster.name},${node.name}`\n\t\t\t\t\t];\n\t\t\t\treturn lastCommitted?.value || 0;\n\t\t\t} else {\n\t\t\t\tthrow Error(`Cannot find cluster.`);\n\t\t\t}\n\t\t}\n\t);\n\n// REDUX MAPPINGS\nconst mapGlobalStateToProps = (state: AppState, props: LocalProps) => {\n\tconst hasRunningJobsSelector = makeHasRunningJobs();\n\tconst nodeStateSelector = makeNodeStateSelector();\n\tconst committedTransactionsSelector = makeCommittedTransactionsSelector();\n\n\treturn {\n\t\thasRunningJobs: hasRunningJobsSelector(state, props),\n\t\tnodeState: nodeStateSelector(state, props),\n\t\tcommittedTransactions: committedTransactionsSelector(state, props)\n\t};\n};\n\nexport default withStyles(mergedStyles, { withTheme: true })(\n\twithRouter(connect(mapGlobalStateToProps, {})(NodeItemComponent))\n);\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from \"@mui/styles/createStyles\";\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\tpulsating: {\n\t\t\tanimation: \"$pulse 1.2s infinite ease-in-out\"\n\t\t},\n\t\t\"@keyframes pulse\": {\n\t\t\t\"0%\": {\n\t\t\t\topacity: 1\n\t\t\t},\n\t\t\t\"50%\": {\n\t\t\t\topacity: 0.5\n\t\t\t},\n\t\t\t\"100%\": {\n\t\t\t\topacity: 1\n\t\t\t}\n\t\t}\n\t});\n","import { ExpandLess, ExpandMore, Layers } from \"@mui/icons-material\";\nimport {\n\tAvatar,\n\tCollapse,\n\tList,\n\tListItem,\n\tListItemAvatar,\n\tListItemText\n} from \"@mui/material\";\nimport { WithStyles, WithTheme } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { AppState } from \"AppState\";\nimport { BlinkingBadge } from \"components/BlinkingBadge/BlinkingBadge\";\nimport { Host } from \"pages/management/host/types\";\nimport { Node } from \"pages/management/node/types\";\nimport NodeItemComponent from \"pages/management/treeView/nodeItem/NodeItemComponent\";\nimport { styles } from \"pages/management/treeView/segmentItem/styles\";\nimport React from \"react\";\nimport { connect } from \"react-redux\";\nimport { StaticContext } from \"react-router\";\nimport { RouteComponentProps, withRouter } from \"react-router-dom\";\nimport { createSelector } from \"reselect\";\nimport { JOB_STATUS, JobTracking } from \"services/jobs/types\";\nimport { sharedStyles } from \"sharedStyles\";\nimport { Utils } from \"utils/utils\";\n\n// component local state interface\ninterface State {\n\tisExpanded: boolean;\n}\n\n// PROPS\ninterface LocalProps {\n\tclusterID: number;\n\tsegment: number;\n}\n\ninterface DispatchProps {}\n\ninterface ReduxStateProps {\n\tfilteredNodeList: Node[];\n\t// zombieHostList: Host[];\n\thasRunningJobs: boolean;\n}\n\nconst mergedStyles = Utils.mergeStyles(styles, sharedStyles);\n\ntype Props = LocalProps &\n\tDispatchProps &\n\tReduxStateProps &\n\tWithStyles &\n\tWithTheme &\n\tRouteComponentProps;\n\n// COMPONENT\nclass SegmentItemComponent extends React.Component {\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\tisExpanded: true\n\t\t};\n\t}\n\n\thandleExpandClick = () => {\n\t\tthis.setState((state) => ({ isExpanded: !state.isExpanded }));\n\t};\n\n\trender(): React.ReactNode {\n\t\tconst { classes, segment, theme, filteredNodeList, hasRunningJobs } =\n\t\t\tthis.props;\n\t\tconst { isExpanded } = this.state;\n\n\t\tconst avatar = (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{hasRunningJobs ? (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{avatar}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\tavatar\n\t\t\t\t\t\t)}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{isExpanded ? (\n\t\t\t\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{filteredNodeList\n\t\t\t\t\t\t\t.sort((node1: Node, node2: Node) =>\n\t\t\t\t\t\t\t\tnode1.name.toLowerCase().localeCompare(node2.name.toLowerCase())\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t.map((node: any) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\n\t\t\t\t\t{/**/}\n\t\t\t\t\t{/*\t{zombieHostList.map((host: Host) => {*/}\n\t\t\t\t\t{/*\t\treturn (*/}\n\t\t\t\t\t{/*\t\t\t*/}\n\t\t\t\t\t{/*\t\t);*/}\n\t\t\t\t\t{/*\t})}*/}\n\t\t\t\t\t{/**/}\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\n// selectors\nconst makeFilteredNodeListSelector = () =>\n\tcreateSelector(\n\t\t(state: AppState) => state.nodeList,\n\t\t(state: AppState) => state.hostList,\n\t\t(state: AppState, props: LocalProps) => props.clusterID,\n\t\t(state: AppState, props: LocalProps) => props.segment,\n\t\t(\n\t\t\tnodeMap: Map,\n\t\t\thostMap: Map,\n\t\t\tclusterID: number,\n\t\t\tsegment: number\n\t\t): Node[] => {\n\t\t\tconst nodeList = nodeMap.get(clusterID) || [];\n\t\t\tconst hostList = hostMap.get(clusterID) || [];\n\n\t\t\treturn nodeList.filter((node: Node) => {\n\t\t\t\tconst nodeSegment = hostList.find((host: Host) => {\n\t\t\t\t\treturn host.id === node.hostID;\n\t\t\t\t})?.segment;\n\n\t\t\t\treturn nodeSegment === segment;\n\t\t\t});\n\t\t}\n\t);\n\n// const makeZombieHostListSelector = () =>\n// \tcreateSelector(\n// \t\t(state: AppState) => state.hostList,\n// \t\t(state: AppState, props: LocalProps) => props.clusterID,\n// \t\t(state: AppState, props: LocalProps) => props.segment,\n// \t\t(\n// \t\t\thostMap: Map,\n// \t\t\tclusterID: number,\n// \t\t\tsegment: number\n// \t\t): Host[] => {\n// \t\t\tconst hostList = hostMap.get(clusterID) || [];\n// \t\t\treturn hostList.filter((host: Host) => {\n// \t\t\t\treturn host.segment === segment && !host.nodeID;\n// \t\t\t});\n// \t\t}\n// \t);\n\nconst makeHasRunningJobs = () =>\n\tcreateSelector(\n\t\t[\n\t\t\t(state: AppState) => state.jobMonitor.runningJobList,\n\t\t\tmakeFilteredNodeListSelector()\n\t\t],\n\t\t(jobList: JobTracking[], nodes: Node[]) => {\n\t\t\tconst nodeIDs = nodes.map((node: Node) => node.id);\n\t\t\tconst hostIDs = nodes.map((node: Node) => node.hostID);\n\t\t\tconst clusterID = nodes[0]?.clusterID;\n\n\t\t\treturn jobList.some(\n\t\t\t\t(job: JobTracking) =>\n\t\t\t\t\t(nodeIDs.includes(job.meta.node_id || -1) ||\n\t\t\t\t\t\thostIDs.includes(job.meta.host_id || -1)) &&\n\t\t\t\t\tclusterID === job.meta.cluster_id &&\n\t\t\t\t\tjob.status === JOB_STATUS.RUNNING\n\t\t\t);\n\t\t}\n\t);\n\n// REDUX MAPPINGS\nconst mapGlobalStateToProps = (state: AppState, props: LocalProps) => {\n\tconst filteredNodeListSelector = makeFilteredNodeListSelector();\n\t// const filteredZombieListSelector = makeZombieHostListSelector();\n\tconst hasRunningJobsSelector = makeHasRunningJobs();\n\n\treturn {\n\t\tfilteredNodeList: filteredNodeListSelector(state, props),\n\t\t// zombieHostList: filteredZombieListSelector(state, props),\n\t\thasRunningJobs: hasRunningJobsSelector(state, props)\n\t};\n};\n\nconst mapGlobalDispatchToProps = () => {\n\treturn {};\n};\n\nexport default withStyles(mergedStyles, { withTheme: true })(\n\twithRouter(\n\t\tconnect(\n\t\t\tmapGlobalStateToProps,\n\t\t\tmapGlobalDispatchToProps\n\t\t)(SegmentItemComponent)\n\t)\n);\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from \"@mui/styles/createStyles\";\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\troot: {\n\t\t\twidth: \"100%\",\n\t\t\tmaxWidth: 360,\n\t\t\tbackgroundColor: theme.palette.background.paper\n\t\t}\n\t});\n","import { Help as HelpIcon } from \"@mui/icons-material\";\nimport {\n\tAvatar,\n\tBadge,\n\tGrid,\n\tListItem,\n\tListItemAvatar,\n\tListItemText,\n\tTooltip,\n\tTypography\n} from \"@mui/material\";\nimport { WithStyles, WithTheme } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { AppState } from \"AppState\";\nimport { BlinkingBadge } from \"components/BlinkingBadge/BlinkingBadge\";\nimport { Server } from \"mdi-material-ui\";\nimport { DEPLOYMENT_STATUS } from \"pages/management/cluster/types\";\nimport { Host, HOST_STATE } from \"pages/management/host/types\";\n// import HostStateComponent from \"components/sharedComponents/hostState/HostStateComponent\";\nimport HostUtils from \"pages/management/host/utils\";\nimport React from \"react\";\nimport { connect } from \"react-redux\";\nimport { StaticContext } from \"react-router\";\nimport { RouteComponentProps, withRouter } from \"react-router-dom\";\nimport { createSelector } from \"reselect\";\nimport { JOB_STATUS, JobTracking } from \"services/jobs/types\";\nimport { sharedStyles } from \"sharedStyles\";\n// import { styles } from \"styles.ts\";\n\n// component local state interface\ninterface State {\n\tisSelected: boolean;\n}\n\n// PROPS\ninterface LocalProps {\n\thost: Host;\n}\n\ninterface DispatchProps {}\n\ninterface ReduxStateProps {\n\thasRunningJobs: boolean;\n}\n\ntype Props = LocalProps &\n\tReduxStateProps &\n\tDispatchProps &\n\tWithStyles &\n\t// WithStyles &\n\tWithTheme &\n\tRouteComponentProps;\n\n// COMPONENT\nclass StrayHostItemComponent extends React.Component {\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\tisSelected: false\n\t\t};\n\t}\n\n\tcomponentDidMount(): void {\n\t\tthis.onRouteChanged();\n\t}\n\n\tcomponentDidUpdate(prevProps: Props) {\n\t\tif (this.props.location !== prevProps.location) {\n\t\t\tthis.onRouteChanged();\n\t\t}\n\t}\n\n\tonRouteChanged() {\n\t\tconst { clusterID, id: hostID } = this.props.host;\n\t\tconst isSelected =\n\t\t\tthis.props.location.pathname === `/clusters/${clusterID}/hosts/${hostID}`;\n\n\t\tthis.setState({\n\t\t\tisSelected\n\t\t});\n\t}\n\n\tonItemClick = () => {\n\t\tconst { clusterID, id: hostID } = this.props.host;\n\t\tthis.props.history.push(`/clusters/${clusterID}/hosts/${hostID}`);\n\t};\n\n\trender(): React.ReactNode {\n\t\tconst { theme, host, hasRunningJobs, classes } = this.props;\n\t\tconst { isSelected } = this.state;\n\n\t\tconst hostState: HOST_STATE = HostUtils.getHostState(host.deploymentStatus);\n\n\t\tconst avatar = (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\n\t\tconst badgeQuestionMark = (\n\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t{avatar}\n\t\t\t\n\t\t);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{hasRunningJobs ? (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{badgeQuestionMark}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\tbadgeQuestionMark\n\t\t\t\t\t\t)}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{host.name}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsecondary={host.system}\n\t\t\t\t\t/>\n\t\t\t\t\t{/* */}\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nconst makeHasRunningJobs = () =>\n\tcreateSelector(\n\t\t(state: AppState) => state.jobMonitor.runningJobList,\n\t\t(state: AppState, props: LocalProps) => props.host,\n\t\t(jobList: JobTracking[], host: Host) =>\n\t\t\tjobList.some(\n\t\t\t\t(job: JobTracking) =>\n\t\t\t\t\tjob.meta.cluster_id === host.clusterID &&\n\t\t\t\t\tjob.meta.host_id === host.id &&\n\t\t\t\t\tjob.status === JOB_STATUS.RUNNING\n\t\t\t)\n\t);\n\n// REDUX MAPPINGS\nconst mapGlobalStateToProps = (state: AppState, props: LocalProps) => {\n\tconst hasRunningJobsSelector = makeHasRunningJobs();\n\n\treturn {\n\t\thasRunningJobs: hasRunningJobsSelector(state, props)\n\t};\n};\n\nexport default withStyles(sharedStyles, { withTheme: true })(\n\twithRouter(connect(mapGlobalStateToProps, {})(StrayHostItemComponent))\n);\n","// icons\nimport {\n\tAddCircleOutline as AddCircleOutlineIcon,\n\tDeviceHub as DeviceHubIcon,\n\tExpandLess as ExpandLessIcon,\n\tExpandMore as ExpandMoreIcon,\n\tHelp as HelpIcon\n} from \"@mui/icons-material\";\n// MUI\nimport {\n\tAlert,\n\tAvatar,\n\tBadge,\n\tCollapse,\n\tGrid,\n\tList,\n\tListItem,\n\tListItemAvatar,\n\tListItemText,\n\tListSubheader,\n\tTooltip,\n\tTypography\n} from \"@mui/material\";\nimport { WithStyles, WithTheme } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { AppState } from \"AppState\";\nimport { BlinkingBadge } from \"components/BlinkingBadge/BlinkingBadge\";\n// other\nimport { Cluster } from \"pages/management/cluster/types\";\nimport { Host } from \"pages/management/host/types\";\nimport { nodeCreateWizardShow } from \"pages/management/node/nodeDeploymentDialog/actions\";\nimport { Node } from \"pages/management/node/types\";\nimport { styles } from \"pages/management/treeView/clusterItem/styles\";\nimport SegmentItemComponent from \"pages/management/treeView/segmentItem/SegmentItemComponent\";\nimport StrayHostItemComponent from \"pages/management/treeView/strayHostItem/StrayHostItemComponent\";\nimport React from \"react\";\n// redux\nimport { connect } from \"react-redux\";\nimport { StaticContext } from \"react-router\";\nimport { RouteComponentProps, withRouter } from \"react-router-dom\";\nimport { createSelector } from \"reselect\";\nimport { JOB_STATUS, JobTracking } from \"services/jobs/types\";\nimport { makeJoinedNodesSelector } from \"store/metricsStore/selectors\";\nimport { MetricsStoreState } from \"store/metricsStore/storeTypes\";\n\n// component local state interface\ninterface State {\n\tisExpanded: boolean;\n\tisSelected: boolean;\n}\n\n// PROPS\ninterface LocalProps {\n\tclusterID: number;\n}\n\ninterface DispatchProps {\n\tnodeCreateWizardShow: (cluster: Cluster) => void;\n}\n\ninterface ReduxStateProps {\n\tcluster: Cluster;\n\tfilteredNodeList: Node[];\n\tfilteredHostList: Host[];\n\tjoinedNodes: number;\n\tcommittedTransactions: number;\n\thasRunningJobs: boolean;\n\tunusedHosts: Host[];\n}\n\ntype Props = LocalProps &\n\tReduxStateProps &\n\tDispatchProps &\n\tWithStyles &\n\tWithTheme &\n\tRouteComponentProps;\n\n// COMPONENT\nclass ClusterItemComponent extends React.Component {\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\t// is cluster currently open\n\t\tconst isClusterOpen = props.location.pathname.endsWith(\n\t\t\t`/clusters/${props.clusterID}`\n\t\t);\n\n\t\t// is node from this cluster currently open\n\t\tconst isNodeOpen = props.filteredNodeList.some((node: Node) =>\n\t\t\tprops.location.pathname.endsWith(`/nodes/${node.id}`)\n\t\t);\n\n\t\tthis.state = {\n\t\t\tisExpanded: isClusterOpen || isNodeOpen,\n\t\t\tisSelected: false\n\t\t};\n\t}\n\n\tcomponentDidMount(): void {\n\t\tthis.onRouteChanged();\n\t}\n\n\tcomponentDidUpdate(prevProps: Props) {\n\t\tif (this.props.location !== prevProps.location) {\n\t\t\tthis.onRouteChanged();\n\t\t}\n\t}\n\n\tonRouteChanged() {\n\t\tconst isSelected =\n\t\t\tthis.props.location.pathname === `/clusters/${this.props.clusterID}`;\n\n\t\tthis.setState({\n\t\t\tisSelected\n\t\t});\n\t}\n\n\tonItemClick = () => {\n\t\tthis.props.history.push(`/clusters/${this.props.clusterID}`);\n\t\tif (!this.state.isExpanded)\n\t\t\tthis.setState((state) => ({ ...state, isExpanded: true }));\n\t};\n\n\tonExpandClick = (event: any): void => {\n\t\tevent.stopPropagation();\n\t\tevent.preventDefault();\n\t\tthis.setState((state) => ({ ...state, isExpanded: !state.isExpanded }));\n\t};\n\n\trender(): React.ReactNode {\n\t\tconst {\n\t\t\ttheme,\n\t\t\tclasses,\n\t\t\tclusterID,\n\t\t\tcluster,\n\t\t\tfilteredHostList,\n\t\t\tjoinedNodes,\n\t\t\tcommittedTransactions,\n\t\t\thasRunningJobs,\n\t\t\tunusedHosts\n\t\t} = this.props;\n\t\tconst { isSelected, isExpanded } = this.state;\n\n\t\tconst getSegments = (cluster: Cluster): Set => {\n\t\t\tlet segments: Set = new Set();\n\n\t\t\tif (cluster.nodes) {\n\t\t\t\tfilteredHostList.forEach((host: Host) => {\n\t\t\t\t\tsegments.add(host.segment);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn segments;\n\t\t};\n\n\t\tconst segments = getSegments(cluster);\n\n\t\tconst addNodeItem = (\n\t\t\t {\n\t\t\t\t\tthis.props.nodeCreateWizardShow(cluster);\n\t\t\t\t}}\n\t\t\t\tclassName={classes.nested}\n\t\t\t>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\n\t\tconst avatar = (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\n\t\tconst strayHostSentence = `${unusedHosts.length} Stray host${\n\t\t\tunusedHosts.length > 1 ? \"s\" : \"\"\n\t\t} in\n\t\tcluster!`;\n\n\t\tconst alertInsideCluster = (\n\t\t\t\n\t\t\t\t{strayHostSentence}\n\t\t\t\n\t\t);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{hasRunningJobs && unusedHosts.length > 0 ? (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{avatar}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t) : hasRunningJobs ? (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{avatar}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t) : unusedHosts.length > 0 ? (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{avatar}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\tavatar\n\t\t\t\t\t\t)}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{cluster.name}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t({committedTransactions} tx)\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsecondary={\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{joinedNodes !== -1 ? joinedNodes : \"-\"}/\n\t\t\t\t\t\t\t\t\t{(cluster.nodes && cluster.nodes.length) || 0} joined/total\n\t\t\t\t\t\t\t\t\tnodes\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{unusedHosts.length > 0 && alertInsideCluster}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdisableTypography\n\t\t\t\t\t\tsecondaryTypographyProps={\n\t\t\t\t\t\t\t(joinedNodes !==\n\t\t\t\t\t\t\t\t((cluster.nodes && cluster.nodes.length) || 0) && {\n\t\t\t\t\t\t\t\tcolor: \"error\"\n\t\t\t\t\t\t\t}) ||\n\t\t\t\t\t\t\t{}\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t{isExpanded ? (\n\t\t\t\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t{segments.size > 0 &&\n\t\t\t\t\t\tArray.from(segments)\n\t\t\t\t\t\t\t.sort()\n\t\t\t\t\t\t\t.map((segment: number) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\n\t\t\t\t\t{segments.size === 0 && addNodeItem}\n\n\t\t\t\t\t{unusedHosts.length > 0 && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tStray hosts\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{unusedHosts\n\t\t\t\t\t\t\t\t.sort((host1: Host, host2: Host) =>\n\t\t\t\t\t\t\t\t\thost1.name\n\t\t\t\t\t\t\t\t\t\t.toLowerCase()\n\t\t\t\t\t\t\t\t\t\t.localeCompare(host2.name.toLowerCase())\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t.map((host: Host) => {\n\t\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\n// selectors\nconst makeClusterSelector = () =>\n\tcreateSelector(\n\t\t(state: AppState) => state.clusterList,\n\t\t(state: AppState, props: LocalProps) => props.clusterID,\n\t\t(clusterList: Cluster[], clusterID: number): Cluster => {\n\t\t\tconst cluster = clusterList.find(\n\t\t\t\t(cluster: Cluster) => cluster.id === clusterID\n\t\t\t);\n\n\t\t\tif (cluster) {\n\t\t\t\treturn cluster;\n\t\t\t} else {\n\t\t\t\tthrow Error(`Cannot find cluster.`);\n\t\t\t}\n\t\t}\n\t);\n\nconst makeFilteredNodeListSelector = () =>\n\tcreateSelector(\n\t\t(state: AppState) => state.nodeList,\n\t\t(state: AppState, props: LocalProps) => props.clusterID,\n\t\t(nodeMap: Map, clusterID: number): Node[] => {\n\t\t\treturn nodeMap.get(clusterID) || [];\n\t\t}\n\t);\n\nconst makeFilteredHostListSelector = () =>\n\tcreateSelector(\n\t\t(state: AppState) => state.hostList,\n\t\t(state: AppState, props: LocalProps) => props.clusterID,\n\t\t(hostMap: Map, clusterID: number): Host[] => {\n\t\t\treturn hostMap.get(clusterID) || [];\n\t\t}\n\t);\n\n// const makeJoinedNodesSelector = () =>\n// \tcreateSelector(\n// \t\t(state: AppState) => state.metrics,\n// \t\t(state: AppState) => state.clusterList,\n// \t\t(state: AppState, props: LocalProps) => props.clusterID,\n// \t\t(\n// \t\t\tmetricsStore: MetricsStoreState,\n// \t\t\tclusterList: Cluster[],\n// \t\t\tclusterID: number\n// \t\t): number => {\n// \t\t\tconst cluster = clusterList.find(\n// \t\t\t\t(cluster: Cluster) => cluster.id === clusterID\n// \t\t\t);\n//\n// \t\t\tif (cluster) {\n// \t\t\t\treturn metricsStore.joinedNodes[cluster.name] || 0;\n// \t\t\t} else {\n// \t\t\t\tthrow Error(`Cannot find cluster.`);\n// \t\t\t}\n// \t\t}\n// \t);\n\nconst makeCommittedTransactionsSelector = () =>\n\tcreateSelector(\n\t\t(state: AppState) => state.metrics,\n\t\t(state: AppState) => state.clusterList,\n\t\t(state: AppState, props: LocalProps) => props.clusterID,\n\t\t(\n\t\t\tmetricsRecord: MetricsStoreState,\n\t\t\tclusterList: Cluster[],\n\t\t\tclusterID: number\n\t\t): number => {\n\t\t\tconst cluster = clusterList.find(\n\t\t\t\t(cluster: Cluster) => cluster.id === clusterID\n\t\t\t);\n\n\t\t\tif (cluster) {\n\t\t\t\tconst lastCommitted =\n\t\t\t\t\tmetricsRecord.wsrepLastCommittedMetrics[cluster.name];\n\t\t\t\treturn lastCommitted?.value || 0;\n\t\t\t} else {\n\t\t\t\tthrow Error(`Cannot find cluster.`);\n\t\t\t}\n\t\t}\n\t);\n\nconst makeHasRunningJobs = () =>\n\tcreateSelector(\n\t\t(state: AppState) => state.jobMonitor.runningJobList,\n\t\t(state: AppState, props: LocalProps) => props.clusterID,\n\t\t(jobList: JobTracking[] = [], clusterID: number) => {\n\t\t\treturn jobList.some(\n\t\t\t\t(job: JobTracking) =>\n\t\t\t\t\tjob.meta.cluster_id === clusterID && job.status === JOB_STATUS.RUNNING\n\t\t\t);\n\t\t}\n\t);\n\n// selectors\nconst makeUnusedHostsSelector = () =>\n\tcreateSelector(\n\t\t(state: AppState) => state.hostList,\n\t\t(state: AppState, props: LocalProps) => props.clusterID,\n\t\t(hostMap: Map, clusterID: number): Host[] => {\n\t\t\tconst hostList = hostMap.get(clusterID) || [];\n\t\t\treturn hostList.filter((host: Host) => !host.nodeID) || [];\n\t\t}\n\t);\n\n// REDUX MAPPINGS\nconst mapGlobalStateToProps = (state: AppState, props: LocalProps) => {\n\tconst clusterSelector = makeClusterSelector();\n\tconst filteredNodeListSelector = makeFilteredNodeListSelector();\n\tconst filteredHostListSelector = makeFilteredHostListSelector();\n\tconst joinedNodesSelector = makeJoinedNodesSelector();\n\tconst committedTransactionsSelector = makeCommittedTransactionsSelector();\n\tconst hasRunningJobsSelector = makeHasRunningJobs();\n\tconst unusedHostsSelector = makeUnusedHostsSelector();\n\n\treturn {\n\t\tcluster: clusterSelector(state, props),\n\t\tfilteredNodeList: filteredNodeListSelector(state, props),\n\t\tfilteredHostList: filteredHostListSelector(state, props),\n\t\tjoinedNodes: joinedNodesSelector(state, props.clusterID),\n\t\tcommittedTransactions: committedTransactionsSelector(state, props),\n\t\thasRunningJobs: hasRunningJobsSelector(state, props),\n\t\tunusedHosts: unusedHostsSelector(state, props)\n\t};\n};\n\nconst mapGlobalDispatchToProps = (dispatch: any) => {\n\treturn {\n\t\tnodeCreateWizardShow: (cluster: Cluster) => {\n\t\t\tdispatch(nodeCreateWizardShow(cluster));\n\t\t}\n\t};\n};\n\nexport default withStyles(styles, { withTheme: true })(\n\twithRouter(\n\t\tconnect(\n\t\t\tmapGlobalStateToProps,\n\t\t\tmapGlobalDispatchToProps\n\t\t)(ClusterItemComponent)\n\t)\n);\n","import React from \"react\";\nimport { StaticContext } from \"react-router\";\nimport { RouteComponentProps, withRouter } from \"react-router-dom\";\n// MUI\nimport { Avatar, ListItem, ListItemAvatar, ListItemText } from \"@mui/material\";\nimport { WithStyles, WithTheme } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { styles } from \"pages/management/treeView/clusterItem/styles\";\n// icons\nimport { AddCircleOutline as AddCircleOutlineIcon } from \"@mui/icons-material\";\n// redux\nimport { AppState } from \"AppState\";\nimport { clusterCreateWizardShow } from \"pages/management/cluster/clusterCreateWizard/actions\";\nimport { connect } from \"react-redux\";\n\n// component local state interface\ninterface State {}\n\n// PROPS\ninterface StateProps {}\n\ninterface DispatchProps {\n\tclusterCreateWizardShow: () => void;\n}\n\ntype Props = StateProps &\n\tDispatchProps &\n\tWithStyles &\n\tWithTheme &\n\tRouteComponentProps;\n\n// COMPONENT\nclass NoClusterItemComponent extends React.Component {\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tthis.state = {};\n\t}\n\n\tonItemClick = () => {\n\t\tthis.props.clusterCreateWizardShow();\n\t};\n\n\trender(): React.ReactNode {\n\t\tconst { classes } = this.props;\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\n// REDUX MAPPINGS\nconst mapGlobalStateToProps = (state: AppState) => {\n\treturn {};\n};\n\nconst mapGlobalDispatchToProps = (dispatch: any) => {\n\treturn {\n\t\tclusterCreateWizardShow: () => {\n\t\t\tdispatch(clusterCreateWizardShow());\n\t\t}\n\t};\n};\n\nexport default withStyles(styles, { withTheme: true })(\n\twithRouter(\n\t\tconnect(\n\t\t\tmapGlobalStateToProps,\n\t\t\tmapGlobalDispatchToProps\n\t\t)(NoClusterItemComponent)\n\t)\n);\n","import { Button, List, ListSubheader, Paper } from \"@mui/material\";\nimport { WithStyles } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { AppState } from \"AppState\";\nimport { Cluster } from \"pages/management/cluster/types\";\nimport ClusterItemComponent from \"pages/management/treeView/clusterItem/ClusterItemComponent\";\nimport React from \"react\";\nimport { connect } from \"react-redux\";\nimport { RouteComponentProps } from \"react-router-dom\";\nimport { styles } from \"pages/management/treeView/styles\";\nimport { clusterCreateWizardShow } from \"pages/management/cluster/clusterCreateWizard/actions\";\nimport NoClusterItemComponent from \"pages/management/treeView/clusterItem/NoClusterItemComponent\";\n\n// PROPS\ninterface LocalProps {\n\tclusterList: Cluster[];\n}\n\ninterface ReduxProps {\n\tclusterCreateDialogShow: () => void;\n}\n\n// component local state interface\ninterface State {}\n\ntype Props = LocalProps &\n\tReduxProps &\n\tWithStyles &\n\tRouteComponentProps<{}>;\n\n// COMPONENT\nclass TreeViewComponent extends React.Component {\n\trender(): React.ReactNode {\n\t\tconst { clusterList } = this.props;\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\tManaged clusters}>\n\t\t\t\t\t\t{clusterList.length > 0 ? (\n\t\t\t\t\t\t\tclusterList\n\t\t\t\t\t\t\t\t.sort((cluster1: Cluster, cluster2: Cluster) =>\n\t\t\t\t\t\t\t\t\tcluster1.name\n\t\t\t\t\t\t\t\t\t\t.toLowerCase()\n\t\t\t\t\t\t\t\t\t\t.localeCompare(cluster2.name.toLowerCase())\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t.map((cluster: Cluster) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t {\n\t\t\t\t\t\tthis.props.clusterCreateDialogShow();\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tAdd cluster\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\n// REDUX MAPPINGS\nconst mapGlobalStateToProps = (state: AppState) => {\n\treturn {\n\t\tclusterList: state.clusterList\n\t};\n};\n\nconst mapGlobalDispatchToProps = (dispatch: any) => ({\n\tclusterCreateDialogShow: () => {\n\t\tdispatch(clusterCreateWizardShow());\n\t}\n});\n\nexport default withStyles(styles)(\n\tconnect(mapGlobalStateToProps, mapGlobalDispatchToProps)(TreeViewComponent)\n);\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from \"@mui/styles/createStyles\";\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\troot: {\n\t\t\twidth: \"100%\",\n\t\t\t[theme.breakpoints.up(\"sm\")]: {\n\t\t\t\twidth: 340\n\t\t\t},\n\t\t\tbackgroundColor: theme.palette.background.paper\n\t\t}\n\t});\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from '@mui/styles/createStyles';\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\tlogContent: {\n\t\t\tbackgroundColor: \"black\",\n\t\t\tcolor: \"white\",\n\t\t\toverflow: \"auto\",\n\t\t\tpadding: 5\n\t\t},\n\t\tlogMessagesTypography: {\n\t\t\tfontSize: \"0.9em\",\n\t\t\tfontFamily: \"monospace\",\n\t\t\twhiteSpace: \"break-spaces\"\n\t\t},\n\t\twarningLog: {\n\t\t\tcolor: theme.palette.warning.main\n\t\t},\n\t\terrorLog: {\n\t\t\tcolor: theme.palette.error.main\n\t\t}\n\t});\n","import { Grid, Typography } from \"@mui/material\";\nimport React from \"react\";\nimport { LogLine } from \"components/logViewer/types\";\nimport { styles } from \"pages/systemLog/styles\";\nimport { WithStyles } from '@mui/styles';\nimport withStyles from '@mui/styles/withStyles';\nimport moment from \"moment\";\n\ninterface LocalProps {\n\tlogLine: LogLine;\n}\n\ntype Props = LocalProps & WithStyles;\n\nclass SystemLogMessage extends React.Component {\n\tcomponentDidUpdate(\n\t\tprevProps: Readonly,\n\t\tprevState: Readonly,\n\t\tsnapshot?: any\n\t): void {\n\t\tconsole.log(\"componentDidUpdate\");\n\t}\n\n\tshouldComponentUpdate(\n\t\tnextProps: Readonly,\n\t\tnextState: Readonly,\n\t\tnextContext: any\n\t): boolean {\n\t\treturn this.props.logLine._logLineHash !== nextProps.logLine._logLineHash;\n\t}\n\n\trender():\n\t\t| React.ReactElement>\n\t\t| string\n\t\t| number\n\t\t| {}\n\t\t| React.ReactNodeArray\n\t\t| React.ReactPortal\n\t\t| boolean\n\t\t| null\n\t\t| undefined {\n\t\tconst { logLine, classes } = this.props;\n\n\t\tconsole.log(\n\t\t\t\"msg\",\n\t\t\t`${moment(logLine.time).format(\n\t\t\t\t\"MMM DD, YYYY HH:mm:ss\"\n\t\t\t)} | ${logLine.level.padEnd(7, \" \")} | ${logLine.message}`\n\t\t);\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t{`${moment(logLine.time).format(\n\t\t\t\t\t\t\"MMM DD, YYYY HH:mm:ss\"\n\t\t\t\t\t)} | ${logLine.level.padEnd(7, \" \")} | ${logLine.message}`}\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default withStyles(styles)(SystemLogMessage);\n","import { Grid, Typography } from \"@mui/material\";\nimport { withStyles, WithStyles } from \"@mui/styles\";\nimport { LogLine } from \"components/logViewer/types\";\nimport SystemLogMessage from \"pages/systemLog/SystemLogMessage\";\nimport LogsApi from \"services/api/LogsApi\";\nimport objectHash from \"object-hash\";\nimport React from \"react\";\nimport { styles } from \"pages/systemLog/styles\";\n\ninterface LocalState {\n\tlogContent: LogLine[];\n}\n\ninterface LocalProps {}\n\ntype Props = LocalProps & WithStyles;\n\nclass SystemLogComponent extends React.PureComponent {\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tthis.state = { logContent: [] };\n\n\t\tthis.fetchLogFile();\n\t}\n\n\tasync fetchLogFile() {\n\t\tconst { data } = await LogsApi.fetchGMSystemLog();\n\n\t\tconsole.log(\"data\", data);\n\n\t\tconst splitLogs = data.data.attributes.contents.split(\"\\n\");\n\t\tthis.setState((state: LocalState) => ({\n\t\t\tlogContent: splitLogs.reduce((result: any, row: string) => {\n\t\t\t\t// console.log(\"raw line\", row);\n\n\t\t\t\ttry {\n\t\t\t\t\tconst line = JSON.parse(row);\n\n\t\t\t\t\tresult.push({\n\t\t\t\t\t\ttime: line.time,\n\t\t\t\t\t\tmessage: line.msg,\n\t\t\t\t\t\tlevel: line.level,\n\t\t\t\t\t\t_logLineHash: objectHash(line)\n\t\t\t\t\t});\n\t\t\t\t} catch (e) {\n\t\t\t\t\t// console.warn(\"Parsing log line failed\", e);\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t}, [])\n\t\t}));\n\t}\n\n\trender() {\n\t\tconst { logContent } = this.state;\n\t\tconst { classes } = this.props;\n\t\tconsole.log(\"logContent\", logContent);\n\t\treturn (\n\t\t\t<>\n\t\t\t\tGalera Manager logs\n\t\t\t\t\n\t\t\t\t\t{logContent.map((log: LogLine) => {\n\t\t\t\t\t\treturn ;\n\t\t\t\t\t})}\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default withStyles(styles)(SystemLogComponent);\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from \"@mui/styles/createStyles\";\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\troot: {\n\t\t\twidth: \"100%\",\n\t\t\t[theme.breakpoints.up(\"sm\")]: {\n\t\t\t\twidth: 340\n\t\t\t},\n\t\t\tbackgroundColor: theme.palette.background.paper\n\t\t},\n\t\tuser: {\n\t\t\tborderTop: `1px solid ${theme.palette.grey[300]}`\n\t\t}\n\t});\n","import {\n\tFormControl,\n\tGrid,\n\tInputLabel,\n\tMenuItem,\n\tSelect,\n\tTextField\n} from \"@mui/material\";\nimport { WithStyles } from '@mui/styles';\nimport withStyles from '@mui/styles/withStyles';\nimport { AppState } from \"AppState\";\nimport React, { ChangeEvent, FormEvent } from \"react\";\nimport { connect } from \"react-redux\";\nimport { styles } from \"pages/users/styles\";\nimport { RouteComponentProps, StaticContext, withRouter } from \"react-router\";\nimport { User, USER_ROLE } from \"pages/users/types\";\nimport { NewUser } from \"pages/users/userCreateWizard/types\";\n\n// component local state interface\ninterface LocalState {\n\tuser: User | NewUser;\n\tformValidation: {\n\t\tusernameError: string;\n\t\tpasswordError: string;\n\t};\n}\n\ninterface LocalProps {\n\tuser: User | NewUser;\n\tonSubmit?: (user: User | NewUser) => void;\n\treadOnly?: boolean;\n}\n\n// PROPS\ninterface ReduxStateProps {}\n\ninterface ReduxDispatchProps {}\n\ntype Props = LocalProps &\n\tReduxStateProps &\n\tReduxDispatchProps &\n\tWithStyles &\n\tRouteComponentProps;\n\ninterface Snapshot {\n\thasUserChanged: boolean;\n}\n\n// COMPONENT\nclass UserFormComponent extends React.Component {\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tconsole.log(\"userForm\", props);\n\t\tthis.state = {\n\t\t\tuser: props.user,\n\t\t\tformValidation: {\n\t\t\t\tusernameError: \"\",\n\t\t\t\tpasswordError: \"\"\n\t\t\t}\n\t\t};\n\t}\n\n\tgetSnapshotBeforeUpdate(\n\t\tprevProps: Readonly,\n\t\tprevState: Readonly\n\t): Snapshot {\n\t\treturn {\n\t\t\thasUserChanged:\n\t\t\t\tprevProps.match.params.name !== this.props.match.params.name\n\t\t};\n\t}\n\n\tcomponentDidUpdate(\n\t\tprevProps: Readonly,\n\t\tprevState: Readonly,\n\t\tsnapshot?: Snapshot\n\t): void {\n\t\tif (snapshot && snapshot.hasUserChanged) {\n\t\t\tthis.setState({\n\t\t\t\tuser: this.props.user\n\t\t\t});\n\t\t}\n\t}\n\n\tonSubmit = (e: FormEvent) => {\n\t\te.preventDefault();\n\t\t// console.log(\"onChange\", e);\n\t\tif (this.props.readOnly !== false && this.props.onSubmit) {\n\t\t\tthis.props.onSubmit(this.state.user);\n\t\t}\n\t};\n\n\trender(): React.ReactNode {\n\t\tconst { readOnly } = this.props;\n\t\tconst { user } = this.state;\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\tconst form = e.target as HTMLFormElement;\n\n\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\t\tusernameError: form.validationMessage\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\terror={!!this.state.formValidation.usernameError}\n\t\t\t\t\t\t\t\t\tfullWidth={true}\n\t\t\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\tconst field = e.target as HTMLFormElement;\n\n\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\tuser: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t...state.user,\n\t\t\t\t\t\t\t\t\t\t\t\t\tname: field.value\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}));\n\n\t\t\t\t\t\t\t\t\t\t\tif (field.checkValidity()) {\n\t\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tusernameError: \"\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tusernameError: field.validationMessage\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\tconst form = e.target as HTMLFormElement;\n\n\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\t\tpasswordError: form.validationMessage\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\terror={!!this.state.formValidation.passwordError}\n\t\t\t\t\t\t\t\t\tfullWidth={true}\n\t\t\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\tconst field = e.target as HTMLFormElement;\n\n\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\tuser: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t...state.user,\n\t\t\t\t\t\t\t\t\t\t\t\t\tpassword: field.value\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}));\n\n\t\t\t\t\t\t\t\t\t\t\tif (field.checkValidity()) {\n\t\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpasswordError: \"\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t\t\t\t\t\t\tformValidation: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...state.formValidation,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpasswordError: field.validationMessage\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tRole\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tconst value = e.target.value as USER_ROLE;\n\n\t\t\t\t\t\t\t\t\t\tthis.setState((state: LocalState) => ({\n\t\t\t\t\t\t\t\t\t\t\tuser: {\n\t\t\t\t\t\t\t\t\t\t\t\t...state.user,\n\t\t\t\t\t\t\t\t\t\t\t\trole: value\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tinputProps={{\n\t\t\t\t\t\t\t\t\t\tid: \"node-db-engine\"\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tNone\n\t\t\t\t\t\t\t\t\tObserver\n\t\t\t\t\t\t\t\t\tManager\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tAdministrator\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t}\n}\n\n// REDUX MAPPINGS\nconst mapGlobalStateToProps = (state: AppState) => ({});\n\nconst mapGlobalDispatchToProps = (dispatch: any) => ({});\n\nexport default withStyles(styles, { withTheme: true })(\n\twithRouter(\n\t\tconnect(mapGlobalStateToProps, mapGlobalDispatchToProps)(UserFormComponent)\n\t)\n);\n","import Axios from \"axios\";\nimport AppEnvironment from \"services/appEnvironment\";\nimport { NewUser } from \"pages/users/userCreateWizard/types\";\nimport { SerializedUser, User } from \"pages/users/types\";\nimport APIUtils from \"services/api/utils\";\nimport { deattribute, serialise } from \"kitsu-core\";\n\nconst ENDPOINT = \"users\";\n\nclass UsersApi {\n\tstatic async getMe(): Promise {\n\t\t// console.log(\"getMe\");\n\t\ttry {\n\t\t\tconst response = await Axios.get(`${APIUtils.getUrl(\"me\")}`);\n\t\t\tconsole.log(\"me\", deattribute(response.data.data) as User);\n\n\t\t\treturn deattribute(response.data.data) as User;\n\t\t} catch (e) {\n\t\t\tthrow new Error(APIUtils.APIErrorResponseHandler(e));\n\t\t}\n\t}\n\n\tstatic async fetchList(): Promise {\n\t\ttry {\n\t\t\tconst response = await Axios.get(\n\t\t\t\t`${AppEnvironment.getApiAddress()}/${AppEnvironment.getApiVersion()}/users`\n\t\t\t);\n\n\t\t\treturn response.data.data.map((sUser: SerializedUser) =>\n\t\t\t\tdeattribute({ ...sUser })\n\t\t\t);\n\t\t} catch (e) {\n\t\t\tthrow new Error(APIUtils.APIErrorResponseHandler(e));\n\t\t}\n\t}\n\n\tstatic async create(newUser: NewUser): Promise {\n\t\ttry {\n\t\t\tconst data = serialise(\"users\", newUser, \"POST\");\n\n\t\t\tconst response = await Axios.post(APIUtils.getUrl(ENDPOINT), data);\n\n\t\t\treturn deattribute(response.data.data) as User;\n\t\t} catch (e) {\n\t\t\tthrow new Error(APIUtils.APIErrorResponseHandler(e));\n\t\t}\n\t}\n\n\tstatic async delete(user: User): Promise {\n\t\ttry {\n\t\t\tawait Axios.delete(`${APIUtils.getUrl(ENDPOINT)}/${user.id}`);\n\t\t} catch (e) {\n\t\t\tthrow new Error(APIUtils.APIErrorResponseHandler(e));\n\t\t}\n\t}\n}\n\nexport default UsersApi;\n","import {\n\tUserListFetchRequestedAction,\n\tUSER_ACTION,\n\tUser,\n\tUserListFetchSucceededAction\n} from \"pages/users/types\";\n\nexport const userListFetchRequested = (): UserListFetchRequestedAction => ({\n\ttype: USER_ACTION.LIST_FETCH_REQUESTED\n});\n\nexport const userListFetchSucceeded = (\n\tuserList: User[]\n): UserListFetchSucceededAction => ({\n\ttype: USER_ACTION.LIST_FETCH_SUCCEEDED,\n\tpayload: {\n\t\tuserList\n\t}\n});\n","import { User, USER_ROLE } from \"pages/users/types\";\nimport {\n\tButton,\n\tDialog,\n\tDialogActions,\n\tDialogContent,\n\tDialogTitle,\n\tGrid,\n\tStep,\n\tStepLabel,\n\tStepper,\n\tTypography\n} from \"@mui/material\";\nimport { AppState } from \"AppState\";\nimport { Component } from \"react\";\nimport { connect } from \"react-redux\";\nimport { NewUser } from \"pages/users/userCreateWizard/types\";\nimport { userCreateWizardHide } from \"pages/users/userCreateWizard/actions\";\nimport UserFormComponent from \"pages/users/UserFormComponent\";\nimport UsersApi from \"services/api/UsersApi\";\nimport { AxiosError } from \"axios\";\nimport { userListFetchRequested } from \"pages/users/actions\";\nimport { styles } from \"pages/users/userCreateWizard/styles\";\nimport { withStyles, WithTheme } from \"@mui/styles\";\n\ninterface LocalState {\n\tnewUser: NewUser;\n\tactiveStep: number;\n\terror?: string;\n\tisCreating: boolean;\n}\n\ninterface LocalProps {}\n\ninterface ReduxStateProps {\n\tisOpen: boolean;\n}\n\ninterface ReduxDispatchProps {\n\thide: () => void;\n\treloadUserList: () => void;\n}\n\ntype Props = LocalProps & ReduxStateProps & ReduxDispatchProps & WithTheme;\n\nclass UserCreateWizardComponent extends Component {\n\tDEFAULT_STATE = {\n\t\tactiveStep: 0,\n\t\tisCreating: false,\n\t\tnewUser: {\n\t\t\tname: \"\",\n\t\t\tpassword: \"\",\n\t\t\trole: USER_ROLE.NONE\n\t\t}\n\t};\n\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tthis.state = { ...this.DEFAULT_STATE };\n\t}\n\n\tonSubmit = (user: User | NewUser) => {\n\t\tconsole.log(\"onSubmit\", user);\n\n\t\tthis.setState({ isCreating: true });\n\n\t\tconst newUser = user as NewUser;\n\n\t\tUsersApi.create(newUser).then(\n\t\t\t() => {\n\t\t\t\tthis.setState({ isCreating: false, activeStep: 1 });\n\t\t\t\tthis.props.reloadUserList();\n\t\t\t},\n\t\t\t(error: AxiosError) => {\n\t\t\t\tthis.setState({\n\t\t\t\t\tisCreating: false,\n\t\t\t\t\terror: `Failed to create user: ${\n\t\t\t\t\t\terror.response ? error.response.data.wrapped.msg : error.message\n\t\t\t\t\t}`\n\t\t\t\t});\n\t\t\t}\n\t\t);\n\t};\n\n\trender():\n\t\t| React.ReactElement>\n\t\t| string\n\t\t| number\n\t\t| {}\n\t\t| React.ReactNodeArray\n\t\t| React.ReactPortal\n\t\t| boolean\n\t\t| null\n\t\t| undefined {\n\t\tconst { activeStep, newUser, error } = this.state;\n\n\t\tconst { isOpen, hide, theme } = this.props;\n\n\t\tconst stepper = (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{\"Enter user data\"}\n\t\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t\t\t{\"Finish\"}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\n\t\tconst wizardButtons = (\n\t\t\t<>\n\t\t\t\t{(activeStep === 0 && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t
\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\thide();\n\t\t\t\t\t\t\t\tthis.setState({ ...this.DEFAULT_STATE });\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tCancel\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t)) ||\n\t\t\t\t\t(activeStep === 1 && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\thide();\n\t\t\t\t\t\t\t\t\tthis.setState({ ...this.DEFAULT_STATE });\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tClose\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tconsole.log(\"showUser\", newUser);\n\t\t\t\t\t\t\t\t\thide();\n\t\t\t\t\t\t\t\t\tthis.setState({ ...this.DEFAULT_STATE });\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tShow user\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tthis.setState({ ...this.DEFAULT_STATE });\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tAdd another user\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t))}\n\t\t\t\n\t\t);\n\n\t\tconst userForm = (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\n\t\t);\n\n\t\tconst userCreatedMessage = (\n\t\t\t<>\n\t\t\t\tUser successfully created.\n\t\t\t\n\t\t);\n\n\t\tconst dialogContent = (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t{stepper}\n\t\t\t\t\t{error && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{error}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\t{(activeStep === 0 && userForm) ||\n\t\t\t\t\t\t(activeStep === 1 && userCreatedMessage)}\n\t\t\t\t\n\t\t\t\t{wizardButtons}\n\t\t\t\n\t\t);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{theme.breakpoints.up(\"sm\") ? (\n\t\t\t\t\t {\n\t\t\t\t\t\t\tif (reason === \"escapeKeyDown\") {\n\t\t\t\t\t\t\t\thide();\n\t\t\t\t\t\t\t\tthis.setState({ ...this.DEFAULT_STATE });\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t\topen={isOpen}\n\t\t\t\t\t>\n\t\t\t\t\t\tCreate new user\n\t\t\t\t\t\t{dialogContent}\n\t\t\t\t\t\n\t\t\t\t) : (\n\t\t\t\t\t {\n\t\t\t\t\t\t\tif (reason === \"escapeKeyDown\") {\n\t\t\t\t\t\t\t\thide();\n\t\t\t\t\t\t\t\tthis.setState({ ...this.DEFAULT_STATE });\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t\topen={isOpen}\n\t\t\t\t\t>\n\t\t\t\t\t\tCreate new user\n\t\t\t\t\t\t{dialogContent}\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\n\t\t);\n\t}\n}\n\nconst mapGlobalStateToProps = (state: AppState) => ({\n\tisOpen: state.userCreateWizard.isUserCreateWizardOpen\n});\n\nconst mapGlobalDispatchToProps = (dispatch: any) => {\n\treturn {\n\t\thide: () => {\n\t\t\tdispatch(userCreateWizardHide());\n\t\t},\n\t\treloadUserList: () => {\n\t\t\tdispatch(userListFetchRequested());\n\t\t}\n\t};\n};\n\nexport default withStyles(styles, { withTheme: true })(\n\tconnect(\n\t\tmapGlobalStateToProps,\n\t\tmapGlobalDispatchToProps\n\t)(UserCreateWizardComponent)\n);\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from \"@mui/styles/createStyles\";\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\ttest: {\n\t\t\tmargin: 10\n\t\t}\n\t});\n","import {\n\tUSER_CREATE_WIZARD_ACTION,\n\tUserCreateWizardHide,\n\tUserCreateWizardShow\n} from \"pages/users/userCreateWizard/types\";\n\nexport const userCreateWizardShow = (): UserCreateWizardShow => ({\n\ttype: USER_CREATE_WIZARD_ACTION.SHOW\n});\n\nexport const userCreateWizardHide = (): UserCreateWizardHide => ({\n\ttype: USER_CREATE_WIZARD_ACTION.HIDE\n});\n","import { USER_ROLE } from \"pages/users/types\";\n\nexport default class UserUtils {\n\tstatic getRoleName(userRole: USER_ROLE) {\n\t\tswitch (userRole) {\n\t\t\tcase USER_ROLE.NONE:\n\t\t\t\treturn \"No role\";\n\t\t\tcase USER_ROLE.OBSERVER:\n\t\t\t\treturn \"Observer\";\n\t\t\tcase USER_ROLE.MANAGER:\n\t\t\t\treturn \"Manager\";\n\t\t\tcase USER_ROLE.ADMINISTRATOR:\n\t\t\t\treturn \"Administrator\";\n\t\t\tdefault:\n\t\t\t\tconsole.warn(`Unknown user role ${userRole}`);\n\t\t\t\treturn \"Unknown role\";\n\t\t}\n\t}\n}\n","import { WithStyles } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { AppState } from \"AppState\";\nimport { userListFetchRequested } from \"pages/users/actions\";\nimport { User } from \"pages/users/types\";\nimport React from \"react\";\nimport { connect } from \"react-redux\";\nimport { StaticContext } from \"react-router\";\nimport { RouteComponentProps } from \"react-router-dom\";\nimport { styles } from \"pages/users/styles\";\nimport {\n\tAvatar,\n\tButton,\n\tList,\n\tListItem,\n\tListItemAvatar,\n\tListItemText,\n\tListSubheader,\n\tPaper\n} from \"@mui/material\";\nimport { Person } from \"@mui/icons-material\";\nimport { userCreateWizardShow } from \"pages/users/userCreateWizard/actions\";\nimport UserUtils from \"pages/users/utils\";\n\n// global state props\ninterface LocalProps {\n\tuserList: User[];\n}\n\n// global dispatch props\ninterface DispatchProps {\n\tuserListFetchRequested: () => void;\n\tuserCreateWizardShow: () => void;\n}\n\ntype Props = LocalProps &\n\tDispatchProps &\n\tWithStyles &\n\tRouteComponentProps;\n\n// local state\ninterface LocalState {}\n\n// COMPONENT\nclass UserListComponent extends React.Component {\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tthis.props.userListFetchRequested();\n\n\t\tthis.state = {};\n\t}\n\n\trender(): React.ReactNode {\n\t\tconst { classes } = this.props;\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\tUsers}>\n\t\t\t\t\t\t{this.props.userList.map((user: User) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tthis.props.history.push(`/users/${user.name}`);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tclassName={classes.user}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t {\n\t\t\t\t\t\tconsole.log(\"onItemClick\");\n\t\t\t\t\t\tthis.props.userCreateWizardShow();\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tCreate new user\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\n// global state and dispatch mappings\nconst mapGlobalStateToProps = (state: AppState) => {\n\treturn {\n\t\tuserList: state.userList\n\t};\n};\n\nconst mapGlobalDispatchToProps = (dispatch: any) => {\n\treturn {\n\t\tuserListFetchRequested: () => {\n\t\t\tdispatch(userListFetchRequested());\n\t\t},\n\t\tuserCreateWizardShow: () => {\n\t\t\tdispatch(userCreateWizardShow());\n\t\t}\n\t};\n};\n\nexport default withStyles(styles, { withTheme: true })(\n\tconnect(mapGlobalStateToProps, mapGlobalDispatchToProps)(UserListComponent)\n);\n","import {\n\tAvatar,\n\tCardHeader,\n\tDivider,\n\tIconButton,\n\tListItemIcon,\n\tListItemText,\n\tMenuItem\n} from \"@mui/material\";\nimport { WithTheme, WithStyles } from \"@mui/styles\";\nimport Card from \"@mui/material/Card\";\nimport CardContent from \"@mui/material/CardContent\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { MoreVert, Person } from \"@mui/icons-material\";\nimport { AppState } from \"AppState\";\nimport { showSnackbar } from \"components/snackbar/actionCreators\";\nimport {\n\tSNACKBAR_TYPE,\n\tSnackbarActionPayload\n} from \"components/snackbar/types\";\nimport React from \"react\";\nimport { connect } from \"react-redux\";\nimport { StaticContext } from \"react-router\";\nimport { RouteComponentProps } from \"react-router-dom\";\nimport { styles } from \"pages/users/styles\";\nimport Menu from \"@mui/material/Menu\";\nimport DeleteIcon from \"@mui/icons-material/Delete\";\nimport { User } from \"pages/users/types\";\nimport UserFormComponent from \"pages/users/UserFormComponent\";\nimport { createSelector } from \"reselect\";\nimport UsersApi from \"services/api/UsersApi\";\nimport { AxiosError } from \"axios\";\nimport { userListFetchRequested } from \"pages/users/actions\";\nimport UserUtils from \"pages/users/utils\";\n\n// component local state interface\ninterface LocalState {\n\tuser: User;\n\tanchorEl: any;\n\tactiveTab: number;\n}\n\n// PROPS\ninterface LocalProps {}\n\ninterface DispatchProps {\n\tshowSnackbar: (snackbar: SnackbarActionPayload) => void;\n\treloadUserList: () => void;\n}\n\ninterface ReduxStateProps {\n\tuser: User | undefined;\n}\n\ntype Props = LocalProps &\n\tDispatchProps &\n\tReduxStateProps &\n\tWithStyles &\n\tWithTheme &\n\tRouteComponentProps;\n\n// COMPONENT\nclass UserManagerComponent extends React.Component {\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tif (props.user) {\n\t\t\tthis.state = {\n\t\t\t\tuser: props.user,\n\t\t\t\tanchorEl: null,\n\t\t\t\tactiveTab: 0\n\t\t\t};\n\t\t} else {\n\t\t\tthis.props.showSnackbar({\n\t\t\t\tmsg: `Error loading user data.`,\n\t\t\t\tsnackbarType: SNACKBAR_TYPE.ERROR\n\t\t\t});\n\t\t}\n\t}\n\n\tonDeleteClick = () => {\n\t\tUsersApi.delete(this.state.user).then(\n\t\t\t() => {\n\t\t\t\tthis.props.reloadUserList();\n\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\tmsg: `User '${this.state.user.name}' deleted.`,\n\t\t\t\t\tsnackbarType: SNACKBAR_TYPE.SUCCESS\n\t\t\t\t});\n\t\t\t\tthis.props.history.push(\"/users\");\n\t\t\t},\n\t\t\t(error: AxiosError) => {\n\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\tmsg: `Failed to delete user: ${\n\t\t\t\t\t\terror.response ? error.response.data.wrapped.msg : error.message\n\t\t\t\t\t}`,\n\t\t\t\t\tsnackbarType: SNACKBAR_TYPE.ERROR\n\t\t\t\t});\n\t\t\t}\n\t\t);\n\t};\n\n\tstatic getDerivedStateFromProps(nextProps: Props) {\n\t\treturn { user: nextProps.user };\n\t}\n\n\tonMoreClick = (event: any) => {\n\t\t// isExpanded menu\n\t\tthis.setState({ ...this.state, anchorEl: event.currentTarget });\n\t};\n\n\tonMenuClose = () => {\n\t\tthis.setState({ ...this.state, anchorEl: null });\n\t};\n\n\trender(): React.ReactNode {\n\t\tconst { theme } = this.props;\n\t\tconst { user } = this.state;\n\n\t\tif (!this.state) return false;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\taction={\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\ttitle={user.name}\n\t\t\t\t\tsubheader={UserUtils.getRoleName(user.role)}\n\t\t\t\t/>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\n// selectors\nconst makeUserSelector = () =>\n\tcreateSelector(\n\t\t(state: AppState) => state.userList,\n\t\t(state: AppState, props: Props) => props.match.params.name,\n\t\t(userList: User[], userName: string) =>\n\t\t\tuserList.find((user: User) => user.name === userName)\n\t);\n\n// REDUX MAPPINGS\nconst mapGlobalStateToProps = (state: AppState, props: Props) => {\n\tconst userSelector = makeUserSelector();\n\n\treturn {\n\t\tuser: userSelector(state, props)\n\t};\n};\n\nconst mapGlobalDispatchToProps = (dispatch: any) => ({\n\tshowSnackbar: (snackbar: SnackbarActionPayload) => {\n\t\tdispatch(showSnackbar(snackbar));\n\t},\n\treloadUserList: () => {\n\t\tdispatch(userListFetchRequested());\n\t}\n\t// clusterDeleteRequested: (cluster: Cluster) => {\n\t// \tdispatch(clusterDeleteRequested(cluster));\n\t// },\n\t// nodeCreateWizardShow: (cluster: Cluster) => {\n\t// \tdispatch(nodeCreateWizardShow(cluster));\n\t// }\n});\n\nexport default withStyles(styles, { withTheme: true })(\n\tconnect(mapGlobalStateToProps, mapGlobalDispatchToProps)(UserManagerComponent)\n);\n","import { Theme } from \"@mui/material\";\n\nimport { makeStyles } from \"@mui/styles\";\n\nexport const drawerWidth = 240;\nexport const drawerMiniWidth = 48;\nexport const drawerMobile = 0;\n\nexport const useStyles = makeStyles((theme: Theme) => ({\n\tsidebar: {\n\t\tminWidth: drawerMiniWidth\n\t},\n\tdrawerPaper: {\n\t\twidth: drawerWidth,\n\t\tpaddingTop: theme.spacing(12),\n\t\toverflow: \"hidden\"\n\t},\n\tdrawerPaperClosed: {\n\t\twidth: drawerMiniWidth,\n\t\tpaddingTop: theme.spacing(12),\n\t\toverflow: \"hidden\"\n\t},\n\tsidebarItem: {\n\t\tdisplay: \"block\"\n\t},\n\tsidebarItemVisited: {\n\t\tdisplay: \"block\",\n\t\tbackgroundColor: theme.palette.primary.main\n\t},\n\tsidebarItemBtn: {\n\t\theight: drawerMiniWidth,\n\t\tpadding: 0\n\t},\n\tsidebarItemIcon: {\n\t\tminWidth: 0,\n\t\tjustifyContent: \"center\",\n\t\talignItems: \"center\",\n\t\theight: drawerMiniWidth,\n\t\twidth: drawerMiniWidth\n\t},\n\tsidebarItemIconVisited: {\n\t\tminWidth: 0,\n\t\tjustifyContent: \"center\",\n\t\talignItems: \"center\",\n\t\tcolor: theme.palette.common.white,\n\t\tbackgroundColor: theme.palette.primary.main,\n\t\theight: drawerMiniWidth,\n\t\twidth: drawerMiniWidth\n\t},\n\tsidebarText: {},\n\tsidebarTextVisited: {\n\t\tcolor: theme.palette.common.black\n\t},\n\ttooltip: {\n\t\tfontSize: 16\n\t}\n}));\n","// MUI\nimport {\n\tListItem,\n\tListItemButton,\n\tListItemIcon,\n\tListItemText,\n\tTooltip\n} from \"@mui/material\";\n// icons\nimport {\n\tDeviceHub as DeviceHubIcon,\n\tExitToApp as ExitToAppIcon,\n\tInfo as InfoIcon,\n\tSupervisorAccount as SupervisorAccountIcon\n} from \"@mui/icons-material\";\nimport { TextBoxOutline as TextBoxOutlineIcon } from \"mdi-material-ui\";\n\n// redux\nimport { connect } from \"react-redux\";\nimport { logout } from \"store/auth/actions\";\n// css\nimport { useStyles } from \"components/sidebar/styles\";\n// react router\nimport { useHistory } from \"react-router-dom\";\n\nimport { useLocation } from \"react-router-dom\";\n\ninterface PropsWindow {\n\t/**\n\t * Injected by the documentation to work in an iframe.\n\t * You won't need it on your project.\n\t */\n\twindow?: () => Window;\n}\n\ninterface LocalProps {\n\tisDrawerOpen: boolean;\n\ttitle: string;\n\tlogoutBtn?: boolean;\n\thandleCloseMobileSidebar?: () => void;\n}\n\ninterface ReduxDispatchProps {\n\tlogout: () => void;\n}\n\ntype Props = LocalProps & PropsWindow & ReduxDispatchProps;\n\nfunction getIcon(title: string) {\n\tswitch (title) {\n\t\tcase \"Management\":\n\t\t\treturn ;\n\t\tcase \"Users\":\n\t\t\treturn ;\n\t\tcase \"System Log\":\n\t\t\treturn ;\n\t\tcase \"About\":\n\t\t\treturn ;\n\t\tcase \"Logout\":\n\t\t\treturn ;\n\t\tdefault:\n\t\t\treturn ;\n\t}\n}\n\nfunction getUrl(title: string) {\n\tswitch (title) {\n\t\tcase \"Management\":\n\t\t\treturn \"clusters\";\n\t\tcase \"Users\":\n\t\t\treturn \"users\";\n\t\tcase \"System Log\":\n\t\t\treturn \"system-log\";\n\t\tcase \"About\":\n\t\t\treturn \"about\";\n\t\tcase \"Logout\":\n\t\t\treturn;\n\t\tdefault:\n\t\t\treturn;\n\t}\n}\n\nfunction SidebarItem(props: Props) {\n\tconst classes = useStyles();\n\tlet history = useHistory();\n\tconst { isDrawerOpen, title, logoutBtn, handleCloseMobileSidebar } = props;\n\tconst icon = getIcon(title);\n\tconst url = getUrl(title);\n\tconst location = useLocation();\n\n\t// check if pathname is same as url, to highlight sidebar item\n\tlet pathname = location.pathname.slice(1);\n\tconst indexChar = pathname.indexOf(\"/\");\n\tif (indexChar > -1) {\n\t\tpathname = pathname.slice(0, indexChar);\n\t}\n\tconst isCurrentlyVisited = pathname === url;\n\n\tconst logOut = async () => {\n\t\t// todo: handle logging out loader and logout errors\n\t\tprops.logout();\n\t};\n\n\tconst handleClick = () => {\n\t\tif (logoutBtn) {\n\t\t\tlogOut();\n\t\t} else {\n\t\t\t// change url ( react redux )\n\t\t\thistory.push(`/${url}`);\n\t\t\t// and close sidebar on mobile devices\n\t\t\tif (handleCloseMobileSidebar) {\n\t\t\t\thandleCloseMobileSidebar();\n\t\t\t}\n\t\t}\n\t};\n\n\treturn (\n\t\t\n\t\t\t{title}
: \"\"\n\t\t\t\t}\n\t\t\t\tplacement=\"right\"\n\t\t\t\tarrow\n\t\t\t>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{icon}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n\nconst mapGlobalDispatchToProps = (dispatch: any) => {\n\treturn {\n\t\tlogout: () => {\n\t\t\tdispatch(logout());\n\t\t}\n\t};\n};\nexport default connect(undefined, mapGlobalDispatchToProps)(SidebarItem);\n","// MUI\nimport { Divider, Drawer, List, Theme, useMediaQuery } from \"@mui/material\";\n// components\nimport SidebarItem from \"components/sidebar/SidebarItem\";\n// css\nimport { useStyles } from \"components/sidebar/styles\";\n\ninterface PropsWindow {\n\t/**\n\t * Injected by the documentation to work in an iframe.\n\t * You won't need it on your project.\n\t */\n\twindow?: () => Window;\n\thandleDrawerToggle: (isDesktop: boolean) => void;\n}\n\ninterface LocalProps {\n\tisDrawerOpen: boolean;\n\tmobileOpen: boolean;\n\thandleCloseMobileSidebar: () => void;\n}\n\ntype Props = PropsWindow & LocalProps;\n\nfunction Sidebar(props: Props) {\n\tconst classes = useStyles();\n\n\tconst isDesktop = useMediaQuery((theme: Theme) => theme.breakpoints.up(\"lg\"));\n\n\tconst {\n\t\tisDrawerOpen,\n\t\tmobileOpen,\n\t\thandleDrawerToggle,\n\t\thandleCloseMobileSidebar\n\t} = props;\n\n\tconst drawerVariant = isDesktop ? \"permanent\" : \"temporary\";\n\tconst drawerOpen = isDesktop ? isDrawerOpen : mobileOpen;\n\n\treturn (\n\t\t\n\t);\n}\n\nexport default Sidebar;\n","import { Theme } from \"@mui/material\";\nimport { makeStyles } from \"@mui/styles\";\n\nconst useStyles = makeStyles((theme: Theme) => ({\n\tnavbarStatus: {\n\t\tdisplay: \"flex\",\n\t\tjustifyContent: \"flex-start\",\n\t\talignItems: \"center\",\n\t\tpaddingLeft: theme.spacing(1),\n\t\tpaddingRight: theme.spacing(1),\n\t\tmarginLeft: \"auto\"\n\t},\n\ttooltip: {\n\t\tdisplay: \"flex\",\n\t\tflexDirection: \"column\",\n\t\tjustifyContent: \"center\",\n\t\talignItems: \"flex-start\"\n\t},\n\ttooltipStatus: {\n\t\tdisplay: \"flex\",\n\t\tjustifyContent: \"flex-start\",\n\t\talignItems: \"center\",\n\t\tpaddingLeft: theme.spacing(1),\n\t\tpaddingRight: theme.spacing(1)\n\t},\n\tindicatorGreen: {\n\t\tdisplay: \"inline-block\",\n\t\twidth: 16,\n\t\theight: 16,\n\t\tborderRadius: \"50%\",\n\t\tbackground: theme.palette.success.main\n\t},\n\tindicatorWeak: {\n\t\tdisplay: \"inline-block\",\n\t\twidth: 16,\n\t\theight: 16,\n\t\tborderRadius: \"50%\",\n\t\tbackground: theme.palette.warning.main\n\t},\n\tindicatorError: {\n\t\tdisplay: \"inline-block\",\n\t\twidth: 16,\n\t\theight: 16,\n\t\tborderRadius: \"50%\",\n\t\tbackground: theme.palette.error.main\n\t},\n\ttext: {\n\t\tpaddingLeft: theme.spacing(2)\n\t},\n\tspace: {\n\t\theight: theme.spacing(1)\n\t}\n}));\n\nexport default useStyles;\n","// MUI\nimport { Tooltip, Typography } from \"@mui/material\";\n// redux\nimport { useSelector } from \"react-redux\";\nimport { AppState } from \"AppState\";\n\nimport { CONNECTION_STATUS } from \"store/systemStatus/types\";\n// css\nimport useStyles from \"./styles\";\n\nfunction ConnectionStatusComp() {\n\tconst {\n\t\tbackendConnectionStatus,\n\t\tinfluxDBConnectionStatus,\n\t\twsConnectionStatus\n\t} = useSelector((state: AppState) => state.systemStatus);\n\tconst classes = useStyles();\n\n\tlet mainStatus = CONNECTION_STATUS.ONLINE;\n\n\tif (\n\t\t[\n\t\t\tbackendConnectionStatus,\n\t\t\tinfluxDBConnectionStatus,\n\t\t\twsConnectionStatus\n\t\t].includes(CONNECTION_STATUS.OFFLINE)\n\t) {\n\t\tmainStatus = CONNECTION_STATUS.OFFLINE;\n\t} else if (\n\t\t[\n\t\t\tbackendConnectionStatus,\n\t\t\tinfluxDBConnectionStatus,\n\t\t\twsConnectionStatus\n\t\t].includes(CONNECTION_STATUS.WEAK)\n\t) {\n\t\tmainStatus = CONNECTION_STATUS.WEAK;\n\t}\n\n\t// console.log(\"main Status:\", mainStatus);\n\t// console.log(\"backendConnectionStatus:\", backendConnectionStatus);\n\t// console.log(\"influxDBConnectionStatus:\", influxDBConnectionStatus);\n\n\tconst getIndicatorClass = (status: CONNECTION_STATUS) => {\n\t\tswitch (status) {\n\t\t\tcase CONNECTION_STATUS.ONLINE:\n\t\t\t\treturn classes.indicatorGreen;\n\t\t\tcase CONNECTION_STATUS.WEAK:\n\t\t\t\treturn classes.indicatorWeak;\n\t\t\tcase CONNECTION_STATUS.OFFLINE:\n\t\t\t\treturn classes.indicatorError;\n\t\t}\n\t};\n\n\tconst circleMain = getIndicatorClass(mainStatus);\n\n\tconst tooltip = (\n\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\tManagement: {backendConnectionStatus}\n\t\t\t\t\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\tLive monitoring: {influxDBConnectionStatus}\n\t\t\t\t\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\tLive application updates: {wsConnectionStatus}\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t);\n\n\tconst mainStatusComponent = (\n\t\t\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\tConnection status: {mainStatus}\n\t\t\t\t\n\t\t\t
\n\t\t\n\t);\n\n\treturn <>{mainStatus !== CONNECTION_STATUS.ONLINE && mainStatusComponent};\n}\n\nexport default ConnectionStatusComp;\n","import { CircularProgress, Grid, Typography } from \"@mui/material\";\n\nconst PreloaderComponentHtml = () => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tLoading...\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n\nexport default PreloaderComponentHtml;\n","import React from \"react\";\nimport PreloaderComponentHtml from \"components/preloader/PreloaderComponentHtml\";\n\nconst SecurePreloader = () => {\n\treturn ;\n};\n\nexport default SecurePreloader;\n","import React from \"react\";\n// MUI\nimport {\n\tAppBar,\n\tBox,\n\tCssBaseline,\n\tGrid,\n\tIconButton,\n\tToolbar,\n\tTypography\n} from \"@mui/material\";\nimport { WithStyles, WithTheme } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { AppState } from \"AppState\";\n// icons\nimport {\n\tArrowBack as ArrowBackIcon,\n\tMenu as MenuIcon\n} from \"@mui/icons-material\";\n// assets\n// import gc_logo from \"assets/images/gc_logo.png\";\nimport logo from \"assets/images/gc_logo_orange.png\";\nimport AboutPage from \"pages/about/AboutPage\";\n// components\nimport ClusterCreateDialogComponent from \"pages/management/cluster/clusterCreateWizard/ClusterCreateDialogComponent\";\nimport ClusterManagerComponent from \"pages/management/cluster/ClusterManagerComponent\";\nimport HostManagerComponent from \"pages/management/host/HostManagerComponent\";\nimport NodeDeploymentWizardComponent from \"pages/management/node/nodeDeploymentDialog/NodeDeploymentDialogComponent\";\nimport NodeManagerComponent from \"pages/management/node/NodeManagerComponent\";\nimport TreeViewComponent from \"pages/management/treeView/TreeViewComponent\";\nimport { showSnackbar } from \"components/snackbar/actionCreators\";\nimport { SnackbarActionPayload } from \"components/snackbar/types\";\nimport SystemLogComponent from \"pages/systemLog/SystemLogComponent\";\nimport UserCreateWizard from \"pages/users/userCreateWizard/UserCreateWizard\";\nimport UserListComponent from \"pages/users/UserListComponent\";\nimport UserManagerComponent from \"pages/users/UserManagerComponent\";\nimport Sidebar from \"components/sidebar/Sidebar\";\nimport ConnectionStatusComp from \"components/monitoring/connectionStatus/ConnectionStatusComp\";\n// ...\nimport { logout } from \"store/auth/actions\";\nimport SecurePreloader from \"components/preloader/SecurePreloaderComponent\";\nimport { SecurePreloaderState } from \"components/preloader/types\";\n// redux\nimport { connect } from \"react-redux\";\n// react router\nimport { StaticContext } from \"react-router\";\nimport {\n\tRedirect,\n\tRoute,\n\tRouteComponentProps,\n\tSwitch,\n\twithRouter\n} from \"react-router-dom\";\n// css\nimport { styles } from \"pages/root/styles\";\nimport {\n\tdrawerWidth,\n\tdrawerMiniWidth,\n\tdrawerMobile\n} from \"components/sidebar/styles\";\n// utility\nimport { checkIfDesktop } from \"utils/checkIfDesktop\";\n\ninterface PropsWindow {\n\t/**\n\t * Injected by the documentation to work in an iframe.\n\t * You won't need it on your project.\n\t */\n\twindow?: () => Window;\n}\n\ninterface LocalState {\n\tisDrawerOpen: boolean;\n\tshowBackButton: boolean;\n\tmobileOpen: boolean;\n\twidth: number;\n}\n\ninterface LocalProps {}\n\ninterface ReduxStateProps {\n\tsecurePreloader: SecurePreloaderState;\n\tisNodeDeploymentWizardOpen: boolean;\n}\n\ninterface ReduxDispatchProps {\n\tshowSnackbar: (snackbar: SnackbarActionPayload) => void;\n\tlogout: () => void;\n}\n\ntype Props = PropsWindow &\n\tLocalProps &\n\tReduxDispatchProps &\n\tReduxStateProps &\n\tWithStyles &\n\tWithTheme &\n\tRouteComponentProps;\n\nclass RootComponent extends React.Component {\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\tisDrawerOpen: true,\n\t\t\tshowBackButton: false,\n\t\t\tmobileOpen: false,\n\t\t\twidth: window.innerWidth\n\t\t};\n\t\tthis.updateDimensions = this.updateDimensions.bind(this);\n\t\tthis.handleDrawerToggle = this.handleDrawerToggle.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tconst sidebarStatus = localStorage.getItem(\"sidebarStatus\") === \"true\";\n\n\t\tthis.setState({ isDrawerOpen: sidebarStatus });\n\n\t\twindow.addEventListener(\"resize\", this.updateDimensions);\n\t}\n\n\tcomponentDidUpdate(prevProps: Props) {\n\t\tif (this.props.location !== prevProps.location) {\n\t\t\tthis.updateShowBackButton();\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\twindow.removeEventListener(\"resize\", this.updateDimensions);\n\t}\n\n\tupdateDimensions() {\n\t\tthis.setState({\n\t\t\twidth: window.innerWidth\n\t\t});\n\t}\n\n\tupdateShowBackButton() {\n\t\tconst { pathname } = this.props.location;\n\n\t\t// console.log(\"updateShowBackButton\", pathname);\n\n\t\tthis.setState(\n\t\t\t(state: LocalState): LocalState => ({\n\t\t\t\t...state,\n\t\t\t\tshowBackButton: pathname.split(\"/\").length > 2\n\t\t\t})\n\t\t);\n\t}\n\n\thandleCloseMobileSidebar = () => {\n\t\tthis.setState(\n\t\t\t(state: LocalState): LocalState => ({\n\t\t\t\t...state,\n\t\t\t\tmobileOpen: false\n\t\t\t})\n\t\t);\n\t};\n\n\thandleDrawerToggle = (isDesktop: boolean) => {\n\t\tif (isDesktop) {\n\t\t\t// Only in desktop we want to save if sidebar is small or full width\n\t\t\t// \"\" + ====> transforms boolean into string, so it can be saved in localStorage\n\t\t\tlocalStorage.setItem(\"sidebarStatus\", \"\" + !this.state.isDrawerOpen);\n\n\t\t\tthis.setState(\n\t\t\t\t(state: LocalState): LocalState => ({\n\t\t\t\t\t...state,\n\t\t\t\t\tisDrawerOpen: !this.state.isDrawerOpen\n\t\t\t\t})\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState(\n\t\t\t\t(state: LocalState): LocalState => ({\n\t\t\t\t\t...state,\n\t\t\t\t\tisDrawerOpen: true,\n\t\t\t\t\tmobileOpen: !this.state.mobileOpen\n\t\t\t\t})\n\t\t\t);\n\t\t}\n\t};\n\n\tlogOut = async () => {\n\t\t// todo: handle logging out loader and logout errors\n\t\tthis.props.logout();\n\n\t\t// try {\n\t\t// \tawait Auth.logout();\n\t\t// \tawait Auth.clearJWTTokens();\n\t\t//\n\t\t// \tthis.props.endUserSession();\n\t\t// \tthis.history.push(\"/login\");\n\t\t// } catch (e: any) {\n\t\t// \tconsole.error(\"Logout failed:\", e);\n\t\t// \tGMDialogService.showInfo({ message: e.message, title: \"Logout failed\" });\n\t\t// }\n\t};\n\n\trender() {\n\t\tconst { classes, securePreloader, isNodeDeploymentWizardOpen, theme } =\n\t\t\tthis.props;\n\t\tconst { showBackButton, isDrawerOpen, mobileOpen } = this.state;\n\n\t\tconst isDesktop = checkIfDesktop(1200); // 1200 is size \"lg\" breakpoint\n\n\t\tconst mainPaddingLeft = !isDesktop\n\t\t\t? drawerMobile\n\t\t\t: this.state.isDrawerOpen\n\t\t\t? `${drawerWidth}px`\n\t\t\t: `${drawerMiniWidth}px`;\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{!securePreloader.isPreloadDone ? (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t) : (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{theme.breakpoints.up(\"sm\") ? (\n\t\t\t\t\t\t\t\t\t this.handleDrawerToggle(isDesktop)}\n\t\t\t\t\t\t\t\t\t\tclassName={classes.menuButton}\n\t\t\t\t\t\t\t\t\t\tsize=\"large\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t{showBackButton ? (\n\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.props.history.goBack();\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={classes.menuButton}\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"large\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t this.handleDrawerToggle(isDesktop)}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={classes.menuButton}\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"large\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tGalera Manager\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t{/* display backend and influxDB connection status */}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t this.handleDrawerToggle(isDesktop)}\n\t\t\t\t\t\t\thandleCloseMobileSidebar={this.handleCloseMobileSidebar}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{/*Dialogs*/}\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t{/*Display tree view for cluster management*/}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t{/*Details pages*/}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t{/* */}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t{isNodeDeploymentWizardOpen && }\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\n\t\t);\n\t}\n}\n\n// REDUX MAPPINGS\nconst mapGlobalStateToProps = (state: AppState) => ({\n\tisNodeDeploymentWizardOpen: state.nodeCreateWizard.isOpen,\n\tsecurePreloader: state.preloader.securePreloader\n});\n\nconst mapGlobalDispatchToProps = (dispatch: any) => {\n\treturn {\n\t\tshowSnackbar: (snackbar: SnackbarActionPayload) => {\n\t\t\tdispatch(showSnackbar(snackbar));\n\t\t},\n\t\tlogout: () => {\n\t\t\tdispatch(logout());\n\t\t}\n\t};\n};\n\nexport default withStyles(styles, { withTheme: true })(\n\twithRouter(\n\t\tconnect(mapGlobalStateToProps, mapGlobalDispatchToProps)(RootComponent)\n\t)\n);\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from \"@mui/styles/createStyles\";\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\troot: {\n\t\t\tdisplay: \"flex\"\n\t\t},\n\t\tappBar: {\n\t\t\tbackgroundColor: \"#424242\",\n\t\t\tzIndex: 1300\n\t\t},\n\t\tmenuButton: {\n\t\t\tmarginRight: 20\n\t\t},\n\t\tcontent: {\n\t\t\tflexGrow: 1,\n\t\t\tpadding: theme.spacing(1),\n\t\t\tpaddingLeft: theme.spacing(2),\n\t\t\tpaddingRight: theme.spacing(2)\n\t\t}\n\t});\n","import {\n\tPUBLIC_PRELOADER_ACTION,\n\tPublicPreloadFailedAction,\n\tPublicPreloadAction,\n\tPublicPreloadSuccessAction,\n\tSECURE_PRELOADER_ACTION,\n\tSecurePreloadFailedAction,\n\tSecurePreloadAction,\n\tSecurePreloadSuccessAction\n} from \"components/preloader/types\";\n\nexport const securePreload = (): SecurePreloadAction => ({\n\ttype: SECURE_PRELOADER_ACTION.PRELOAD\n});\n\nexport const securePreloadSuccess = (): SecurePreloadSuccessAction => ({\n\ttype: SECURE_PRELOADER_ACTION.PRELOAD_SUCCESS\n});\n\nexport const securePreloadFailed = (\n\terrorMsg: string\n): SecurePreloadFailedAction => ({\n\ttype: SECURE_PRELOADER_ACTION.PRELOAD_FAILED,\n\tpayload: {\n\t\terrorMsg\n\t}\n});\n\nexport const publicPreload = (): PublicPreloadAction => ({\n\ttype: PUBLIC_PRELOADER_ACTION.PRELOAD\n});\n\nexport const publicPreloadSuccess = (): PublicPreloadSuccessAction => ({\n\ttype: PUBLIC_PRELOADER_ACTION.PRELOAD_SUCCESS\n});\n\nexport const publicPreloadFailed = (\n\terrorMsg: string\n): PublicPreloadFailedAction => ({\n\ttype: PUBLIC_PRELOADER_ACTION.PRELOAD_FAILED,\n\tpayload: {\n\t\terrorMsg\n\t}\n});\n","import PreloaderComponentHtml from \"components/preloader/PreloaderComponentHtml\";\nimport React from \"react\";\nimport { AppState } from \"AppState\";\nimport { connect } from \"react-redux\";\nimport { publicPreload } from \"store/preloader/actions\";\n\ninterface LocalProps {}\n\ninterface ReduxDispatchProps {\n\tpreloadRequested: () => void;\n}\n\ntype Props = LocalProps & ReduxDispatchProps;\n\nclass PublicPreloader extends React.Component {\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tprops.preloadRequested();\n\t}\n\n\trender() {\n\t\treturn ;\n\t}\n}\n\n// REDUX MAPPINGS\nconst mapGlobalStateToProps = (state: AppState) => ({});\n\nconst mapGlobalDispatchToProps = (dispatch: any) => {\n\treturn {\n\t\tpreloadRequested: () => {\n\t\t\tdispatch(publicPreload());\n\t\t}\n\t};\n};\n\nexport default connect(\n\tmapGlobalStateToProps,\n\tmapGlobalDispatchToProps\n)(PublicPreloader);\n","import React from \"react\";\n// redux\nimport { connect } from \"react-redux\";\nimport { AppState } from \"AppState\";\nimport { versionInfoSelector } from \"store/version/selectors\";\nimport { showSnackbar } from \"components/snackbar/actionCreators\";\nimport { SnackbarActionPayload } from \"components/snackbar/types\";\n// MUI\nimport { Typography } from \"@mui/material\";\nimport { withStyles, WithStyles } from \"@mui/styles\";\n// components\nimport { styles } from \"components/appInfo/styles\";\n\ninterface LocalProps {}\n\ninterface ReduxStateProps {\n\tversionInfo: string;\n}\n\ninterface DispatchProps {\n\tshowSnackbar: (snackbar: SnackbarActionPayload) => void;\n}\n\ntype Props = LocalProps &\n\tReduxStateProps &\n\tDispatchProps &\n\tWithStyles;\n\nclass AppInfo extends React.Component {\n\trender() {\n\t\tconst { versionInfo } = this.props;\n\n\t\treturn (\n\t\t\t {\n\t\t\t\t\tnavigator.clipboard.writeText(versionInfo).then(\n\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\t\tmsg: \"Version info copied to clipboard!\"\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t},\n\t\t\t\t\t\t(err: Error) => {\n\t\t\t\t\t\t\tconsole.error(\"Version copy to clipboard error:\", err);\n\t\t\t\t\t\t\tthis.props.showSnackbar({\n\t\t\t\t\t\t\t\tmsg: \"Couldn't copy version info to clipboard\"\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\tVersion:{versionInfo}\n\t\t\t\n\t\t);\n\t}\n}\n\n// REDUX MAPPINGS\nconst mapStateToProps = (state: AppState) => {\n\treturn {\n\t\tversionInfo: versionInfoSelector(state)\n\t};\n};\n\nconst mapDispatchToProps = (dispatch: any) => {\n\treturn {\n\t\tshowSnackbar: (snackbar: SnackbarActionPayload) => {\n\t\t\tdispatch(showSnackbar(snackbar));\n\t\t}\n\t};\n};\n\nexport default withStyles(styles)(\n\tconnect(mapStateToProps, mapDispatchToProps)(AppInfo)\n);\n","import { Theme } from \"@mui/material/styles\";\nimport { createStyles } from \"@mui/styles\";\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\tappInfo: {\n\t\t\tposition: \"fixed\",\n\t\t\tbottom: theme.spacing(1),\n\t\t\tleft: theme.spacing(1),\n\t\t\topacity: 0.4,\n\t\t\tzIndex: 10000,\n\t\t\t\"&:hover\": {\n\t\t\t\topacity: 0.8\n\t\t\t},\n\t\t\tcursor: \"pointer\"\n\t\t}\n\t});\n","import React from \"react\";\nimport { Redirect, Route, Router, Switch } from \"react-router-dom\";\nimport Login from \"pages/login/LoginComponent\";\nimport { createBrowserHistory, History } from \"history\";\nimport RootComponent from \"pages/root/RootComponent\";\nimport { AppState } from \"AppState\";\nimport { connect } from \"react-redux\";\nimport { PublicPreloaderState } from \"components/preloader/types\";\nimport Box from \"@mui/material/Box\";\nimport PublicPreloader from \"components/preloader/PublicPreloaderComponent\";\nimport AppInfo from \"components/appInfo/AppInfoComponent\";\n\ninterface ReduxStateProps {\n\tpublicPreloader: PublicPreloaderState;\n}\n\ntype Props = ReduxStateProps;\n\nexport const history: History = createBrowserHistory({ basename: \"/app\" });\n\nclass GMRouter extends React.Component {\n\trender() {\n\t\tconst { publicPreloader } = this.props;\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{!publicPreloader.isPreloadDone ? (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t) : (\n\t\t\t\t\t<>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\n\t\t);\n\t}\n}\n\nconst mapGlobalStateToProps = (state: AppState) => {\n\treturn {\n\t\tpublicPreloader: state.preloader.publicPreloader\n\t};\n};\n\nexport default connect(mapGlobalStateToProps, {})(GMRouter);\n","export default class LongPress {\n\tprivate mouseDownTimestamp?: number;\n\tprivate isMouseDown: boolean = false;\n\tprivate mouseUpTimestamp?: number;\n\tprivate mouseEnterTimestamp?: number;\n\tprivate isMouseOn: boolean = false;\n\tprivate mouseLeaveTimestamp?: number;\n\tprivate readonly triggerDelay: number;\n\n\tprivate _activeTime: number = 0;\n\n\tconstructor(triggerDelay: number) {\n\t\tthis.triggerDelay = triggerDelay;\n\t}\n\n\tpublic mouseDownTriggered(): void {\n\t\tthis.isMouseDown = true;\n\t\tthis.isMouseOn = true;\n\t\tthis.mouseDownTimestamp = new Date().getTime();\n\n\t\tconst upTime = Math.min(\n\t\t\tthis.mouseDownTimestamp - (this.mouseUpTimestamp || 0),\n\t\t\tthis.mouseDownTimestamp - (this.mouseEnterTimestamp || 0)\n\t\t);\n\n\t\tthis.activeTime -= upTime;\n\t\t// console.log(`down -${upTime} = ${this.activeTime}`);\n\t}\n\n\tpublic mouseUpTriggered(onTarget: boolean = false): boolean {\n\t\tthis.isMouseDown = false;\n\t\tthis.mouseUpTimestamp = new Date().getTime();\n\n\t\tconst downTime = Math.min(\n\t\t\t(this.mouseUpTimestamp || 0) - (this.mouseDownTimestamp || 0),\n\t\t\t(this.mouseUpTimestamp || 0) - (this.mouseLeaveTimestamp || 0)\n\t\t);\n\n\t\tif (this.isMouseOn) {\n\t\t\tthis.activeTime += downTime;\n\t\t\t// console.log(`up +${downTime} = ${this.activeTime}`);\n\t\t} else {\n\t\t\tthis.activeTime -= downTime;\n\t\t\t// console.log(`up -${downTime} = ${this.activeTime}`);\n\t\t}\n\n\t\t// if mouse up event was on target, only then give possibility to return true\n\t\tif (onTarget) {\n\t\t\treturn this.activeTime >= this.triggerDelay;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tpublic mouseEnterTriggered(): void {\n\t\tthis.isMouseOn = true;\n\t\t// if (this.isMouseDown) {\n\t\tthis.mouseEnterTimestamp = new Date().getTime();\n\n\t\tconst offTime = Math.min(\n\t\t\tthis.mouseEnterTimestamp - (this.mouseLeaveTimestamp || 0),\n\t\t\tthis.mouseEnterTimestamp - (this.mouseUpTimestamp || 0)\n\t\t);\n\n\t\tthis.activeTime -= offTime;\n\t\t// console.log(`enter -${offTime} = ${this.activeTime}`);\n\t}\n\n\tpublic mouseLeaveTriggered(): void {\n\t\tthis.isMouseOn = false;\n\t\tthis.mouseLeaveTimestamp = new Date().getTime();\n\n\t\tif (this.isMouseDown) {\n\t\t\tconst onTime = Math.min(\n\t\t\t\tthis.mouseLeaveTimestamp - (this.mouseEnterTimestamp || 0),\n\t\t\t\tthis.mouseLeaveTimestamp - (this.mouseDownTimestamp || 0)\n\t\t\t);\n\n\t\t\tthis.activeTime += onTime;\n\t\t\t// console.log(`leave +${onTime} = ${this.activeTime}`);\n\t\t}\n\t}\n\n\t// getters and setters\n\tget activeTime(): number {\n\t\treturn this._activeTime;\n\t}\n\n\tset activeTime(value: number) {\n\t\tif (value < 0) {\n\t\t\tthis._activeTime = 0;\n\t\t} else if (value > this.triggerDelay) {\n\t\t\tthis._activeTime = this.triggerDelay;\n\t\t} else {\n\t\t\tthis._activeTime = value;\n\t\t}\n\t}\n}\n","import React from \"react\";\nimport {\n\tButton,\n\tDialog,\n\tDialogActions,\n\tDialogContent,\n\tDialogContentText,\n\tDialogTitle,\n\tTooltip\n} from \"@mui/material\";\nimport { GMDialogService } from \"components/dialog/DialogService\";\nimport {\n\tAlertDialog,\n\tConfirmDialog\n} from \"components/dialog/types\";\nimport { WithStyles, WithTheme } from \"@mui/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { styles } from \"components/dialog/styles\";\nimport LongPress from \"services/longPress/LongPress\";\n\ninterface State {\n\tisOpen: boolean;\n\tdialogType: \"alert\" | \"confirm\";\n\tcontent?: AlertDialog | ConfirmDialog;\n}\n\ninterface LocalProps {\n\t// add message handler or observable or some other way of receiving messages\n\t// it should display message immediately if dialog is closed and queue is empty, else put message into queue\n}\n\ntype Props = LocalProps & WithStyles & WithTheme;\n\nclass GMDialog extends React.Component {\n\t// messages queue\n\tmessages: any[] = [];\n\tlongPress: LongPress = new LongPress(2000);\n\n\tconstructor(props: Props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\tisOpen: false,\n\t\t\tdialogType: \"alert\"\n\t\t};\n\t}\n\n\tcomponentDidMount(): void {\n\t\tGMDialogService.alertDialog.subscribe((dialog: AlertDialog) => {\n\t\t\t// console.log(\"new message\", dialog);\n\t\t\tthis.setState({ isOpen: true, dialogType: \"alert\", content: dialog });\n\t\t});\n\n\t\tGMDialogService.confirmDialog.subscribe((dialog: ConfirmDialog) => {\n\t\t\t// console.log(\"new message\", dialog);\n\t\t\tthis.setState({ isOpen: true, dialogType: \"confirm\", content: dialog });\n\t\t});\n\t}\n\n\tshow = () => {\n\t\tthis.setState({ isOpen: true });\n\t};\n\n\tclose = (confirm: boolean) => {\n\t\tif (confirm) {\n\t\t\tthis.state.content?.resolve();\n\t\t} else {\n\t\t\tif (this.state.dialogType === \"confirm\") {\n\t\t\t\tconst confirmDialogContent = this.state.content as ConfirmDialog;\n\t\t\t\tconfirmDialogContent?.reject();\n\t\t\t}\n\t\t}\n\n\t\tthis.setState({ isOpen: false });\n\n\t\t// but also check if there are any messages in queue and show them right after the dialog was closed\n\t};\n\n\trender() {\n\t\tconst { isOpen, dialogType, content } = this.state;\n\t\tconst { classes } = this.props;\n\n\t\tlet confirmDialogContent;\n\t\tif (dialogType === \"confirm\") {\n\t\t\tconfirmDialogContent = content as ConfirmDialog;\n\t\t}\n\n\t\treturn (\n\t\t\t {\n\t\t\t\t\tthis.longPress.mouseUpTriggered();\n\t\t\t\t}}\n\t\t\t\tdata-testid=\"dialog-root\"\n\t\t\t\topen={isOpen}\n\t\t\t\tonClose={(event: Event, reason: string) => {\n\t\t\t\t\tif (reason !== \"escapeKeyDown\" && reason !== \"backdropClick\") {\n\t\t\t\t\t\tthis.close(true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.close(false);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{content?.title && (\n\t\t\t\t\t\n\t\t\t\t\t\t{content?.title}\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{content?.message}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{dialogType === \"confirm\" ? (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tthis.close(false);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{confirmDialogContent?.declineText || \"CANCEL\"}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{confirmDialogContent?.destructiveConfirm ? (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t// \tthis.close(true);\n\t\t\t\t\t\t\t\t\t\t// }}\n\t\t\t\t\t\t\t\t\t\tonMouseDown={() => {\n\t\t\t\t\t\t\t\t\t\t\t// console.log(\"mouseDown\");\n\t\t\t\t\t\t\t\t\t\t\tthis.longPress.mouseDownTriggered();\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tonMouseUp={(e: React.MouseEvent) => {\n\t\t\t\t\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t\t\t\t\t\t// console.log(\"mouseUp\");\n\t\t\t\t\t\t\t\t\t\t\tif (this.longPress.mouseUpTriggered(true)) {\n\t\t\t\t\t\t\t\t\t\t\t\tthis.close(true);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tonMouseEnter={(e: React.MouseEvent) => {\n\t\t\t\t\t\t\t\t\t\t\t// console.log(\"mouseEnter\");\n\t\t\t\t\t\t\t\t\t\t\tthis.longPress.mouseEnterTriggered();\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tonMouseLeave={() => {\n\t\t\t\t\t\t\t\t\t\t\t// console.log(\"mouseLeave\");\n\t\t\t\t\t\t\t\t\t\t\tthis.longPress.mouseLeaveTriggered();\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tcolor={\"primary\"}\n\t\t\t\t\t\t\t\t\t\tautoFocus\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{confirmDialogContent?.confirmText || \"OK\"}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tthis.close(true);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tcolor={\"primary\"}\n\t\t\t\t\t\t\t\t\tautoFocus\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{confirmDialogContent?.confirmText || \"OK\"}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tthis.close(true);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t\tautoFocus\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tOK\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default withStyles(styles, { withTheme: true })(GMDialog);\n","import { Theme } from \"@mui/material\";\n\nimport createStyles from '@mui/styles/createStyles';\n\nexport const styles = (theme: Theme) =>\n\tcreateStyles({\n\t\tdestructiveConfirm: {},\n\t\tholdToConfirmButton: {\n\t\t\tcolor: theme.palette.error.main,\n\t\t\tbackground: `linear-gradient(to left, transparent 50%, ${theme.palette.error.dark} 50%) right`,\n\t\t\tbackgroundSize: \"200%\",\n\t\t\ttransition: \"2s linear\",\n\t\t\t\"&:active&:hover\": {\n\t\t\t\tbackgroundPosition: \"left\",\n\t\t\t\tcolor: \"white\"\n\t\t\t}\n\t\t}\n\t});\n","import { takeEvery } from \"redux-saga/effects\";\nimport { SNACKBAR_ACTION, SnackbarActionShow } from \"components/snackbar/types\";\n\n// worker Saga: will be fired on USER_FETCH_REQUESTED actions\n// function* fetchUser(action) {\n// try {\n// const user = yield call(Api.fetchUser, action.payload.userId);\n// yield put({type: \"USER_FETCH_SUCCEEDED\", user: user});\n// } catch (e) {\n// yield put({type: \"USER_FETCH_FAILED\", message: e.message});\n// }\n// }\n\n/*\n Starts fetchUser on each dispatched `USER_FETCH_REQUESTED` action.\n Allows concurrent fetches of user.\n*/\nfunction* SnackbarSideEffects() {\n\tyield takeEvery(SNACKBAR_ACTION.SHOW, (args: SnackbarActionShow) => {\n\t\t// console.log(\"caught snackbar show action!!!\", args);\n\t});\n}\n\n/*\n Alternatively you may use takeLatest.\n\n Does not allow concurrent fetches of user. If \"USER_FETCH_REQUESTED\" gets\n dispatched while a fetch is already pending, that pending fetch is cancelled\n and only the latest one will be run.\n*/\n// function* SnackbarSaga() {\n// yield takeLatest(\"USER_FETCH_REQUESTED\", fetchUser);\n// }\n\nexport default SnackbarSideEffects;\n","import React from \"react\";\nimport { AppState } from \"AppState\";\nimport { connect } from \"react-redux\";\nimport { hideSnackbar } from \"components/snackbar/actionCreators\";\nimport { Snackbar } from \"@mui/material\";\nimport { SnackbarState } from \"components/snackbar/types\";\n\n// PROPS\ninterface StateProps {\n\tsnackbar: SnackbarState;\n}\n\ninterface DispatchProps {\n\thideSnackbar: () => void;\n}\n\ninterface OwnProps {}\n\ntype ComponentProps = OwnProps & StateProps & DispatchProps;\n\nclass GMSnackbar extends React.Component {\n\trender() {\n\t\treturn (\n\t\t\t{this.props.snackbar.msg}}\n\t\t\t/>\n\t\t);\n\t}\n}\n\nconst mapStateToProps = (state: AppState) => {\n\treturn {\n\t\tsnackbar: state.snackbar\n\t};\n};\n\nconst mapDispatchToProps = (dispatch: any) => {\n\treturn {\n\t\thideSnackbar: () => {\n\t\t\tdispatch(hideSnackbar());\n\t\t}\n\t};\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(GMSnackbar);\n","import { call, put } from \"typed-redux-saga\";\nimport { takeLatest } from \"redux-saga/effects\";\nimport { USER_ACTION } from \"pages/users/types\";\nimport UsersApi from \"services/api/UsersApi\";\nimport { userListFetchSucceeded } from \"pages/users/actions\";\n\nfunction* fetchUserList() {\n\t// console.log(\"fetchUserList saga\");\n\n\ttry {\n\t\tconst userList = yield* call(UsersApi.fetchList);\n\t\tconsole.log(\"saga user list fetched\", userList);\n\n\t\tyield put(userListFetchSucceeded(userList));\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n}\n\nfunction* UserSideEffects() {\n\tyield takeLatest(USER_ACTION.LIST_FETCH_REQUESTED, fetchUserList);\n}\n\nexport default UserSideEffects;\n","import {\n\tFetchLastCommittedMetricsSuccessAction,\n\tFetchWsrepLocalStateMetricsSuccessAction,\n\tMETRICS_ACTION,\n\tStartMonitorMetricsAction,\n\tStopMonitorMetricsAction\n} from \"store/metricsStore/storeTypes\";\nimport {\n\tWsrepLastCommittedMetric,\n\tWsrepLocalStateMetric\n} from \"store/metricsStore/types\";\n\nexport const startMetricsMonitor = (): StartMonitorMetricsAction => ({\n\ttype: METRICS_ACTION.START_MONITOR\n});\n\nexport const stopMetricsMonitor = (): StopMonitorMetricsAction => ({\n\ttype: METRICS_ACTION.STOP_MONITOR\n});\n\nexport const fetchLastCommittedMetricsSucceeded = (\n\tmetrics: Record<\n\t\tstring,\n\t\tWsrepLastCommittedMetric>\n): FetchLastCommittedMetricsSuccessAction => ({\n\ttype: METRICS_ACTION.FETCH_WSREP_LAST_COMMITTED_METRICS_SUCCESS,\n\tpayload: {\n\t\tmetrics\n\t}\n});\n\nexport const fetchWsrepLocalStateMetricsSuccess = (\n\tmetrics: WsrepLocalStateMetric[]\n): FetchWsrepLocalStateMetricsSuccessAction => ({\n\ttype: METRICS_ACTION.FETCH_WSREP_LOCAL_STATE_METRICS_SUCCESS,\n\tpayload: {\n\t\tmetrics\n\t}\n});\n","import { history } from \"Router\";\nimport { showSnackbar } from \"components/snackbar/actionCreators\";\nimport { SNACKBAR_TYPE } from \"components/snackbar/types\";\nimport AuthAPI from \"services/api/AuthAPI\";\nimport UsersApi from \"services/api/UsersApi\";\nimport {\n\tloginFailed,\n\tloginSuccess,\n\tlogoutFailed,\n\tlogoutSuccess\n} from \"store/auth/actions\";\nimport { AUTH_ACTION, AuthLogin } from \"store/auth/stateTypes\";\nimport { dashboardGetSuccess } from \"store/dashboard/actions\";\nimport { stopMetricsMonitor } from \"store/metricsStore/actions\";\nimport { securePreload } from \"store/preloader/actions\";\nimport { takeLatest } from \"redux-saga/effects\";\nimport { call, put } from \"typed-redux-saga\";\n\nfunction* bootAuthCheckSideEffect() {\n\ttry {\n\t\tconst currentUser = yield* call(UsersApi.getMe);\n\t\tyield put(loginSuccess(currentUser));\n\t\tyield put(dashboardGetSuccess(currentUser.meta?.dashboards || []));\n\t} catch (e: any) {\n\t\tconsole.error(\"Boot auth check failed.\", e);\n\t}\n}\n\nfunction* loginSideEffect({ payload: { credentials } }: AuthLogin) {\n\t// console.log(\"login side effect\", credentials);\n\n\ttry {\n\t\tconst userData = yield* call(AuthAPI.login, credentials);\n\n\t\tyield put(loginSuccess(userData));\n\t\tyield put(dashboardGetSuccess(userData.meta.dashboards));\n\t} catch (e: any) {\n\t\tconsole.log(\"login error\", e.message);\n\t\tyield put(loginFailed(e.message));\n\t}\n}\n\nfunction* authSuccessfulSideEffect() {\n\tyield put(\n\t\tshowSnackbar({\n\t\t\tmsg: \"Welcome to Galera Manager!\",\n\t\t\tsnackbarType: SNACKBAR_TYPE.SUCCESS\n\t\t})\n\t);\n\t// if user has logged in from login page, redirect to app root.\n\t// this side effect is also triggered if user opens application on any other\n\t// route, and is already logged in, and in that case we're not redirecting him\n\tif (history.location.pathname === \"/login\") history.push(\"/\");\n\tyield put(securePreload());\n}\n\nfunction* logoutSideEffect() {\n\tconsole.log(\"logout side effect\");\n\n\ttry {\n\t\tyield* call(AuthAPI.logout);\n\t\tyield put(logoutSuccess());\n\t} catch (e: any) {\n\t\tconsole.log(\"logout error\", e.message);\n\t\tyield put(logoutFailed(e.message));\n\t}\n}\n\nfunction* logoutSuccessSideEffect() {\n\thistory.push(\"/login\");\n\tyield put(stopMetricsMonitor());\n}\n\nfunction* AuthSideEffects() {\n\tyield takeLatest(AUTH_ACTION.BOOT_CHECK, bootAuthCheckSideEffect);\n\tyield takeLatest(AUTH_ACTION.LOGIN, loginSideEffect);\n\tyield takeLatest(AUTH_ACTION.LOGIN_SUCCESS, authSuccessfulSideEffect);\n\tyield takeLatest(AUTH_ACTION.LOGOUT, logoutSideEffect);\n\tyield takeLatest(AUTH_ACTION.LOGOUT_SUCCESS, logoutSuccessSideEffect);\n}\n\nexport default AuthSideEffects;\n","import Axios, { AxiosResponse } from \"axios\";\nimport { Dashboard } from \"components/monitoring/dashboard/types\";\nimport { appStore } from \"index\";\nimport APIUtils from \"services/api/utils\";\n\n// let dashboardMap: Map = new Map();\n\nclass DashboardsApi {\n\t// static async fetchList(): Promise {\n\t// \t// const currentUserID = Config.currentUserID;\n\t//\n\t// \tconst currentUserID = appStore.getState().auth.userData.id;\n\t// \tconst response = await Axios.get(APIUtils.getUrl(`users/${currentUserID}`));\n\t//\n\t// \tconst user = deattribute(response.data.data) as User;\n\t//\n\t// \tconsole.log(\"current user data\", user);\n\t//\n\t// \tif (user.meta?.dashboards) {\n\t// \t\tdashboardMap = new Map(\n\t// \t\t\tObject.entries(user.meta?.dashboards)\n\t// \t\t);\n\t// \t} else {\n\t// \t\tdashboardMap = new Map();\n\t// \t}\n\t//\n\t// \tconsole.log(\"dashboards fetch\", dashboardMap);\n\t// \treturn response;\n\t// }\n\t//\n\t// static fetch(name: string): Dashboard | undefined {\n\t// \t// return dashboards.find((dashboard: Dashboard) => {\n\t// \t// \treturn dashboard.name === name;\n\t// \t// });\n\t// \treturn dashboardMap.get(name);\n\t// }\n\n\tstatic async save(dashboards: Dashboard[]): Promise {\n\t\tconsole.log(\"save dash\", dashboards);\n\n\t\t// dashboardMap.set(dashboard.name, dashboard);\n\t\t//\n\t\tconst currentUserID = appStore.getState().auth.userData.id;\n\t\t// const response = await Axios.get(APIUtils.getUrl(`users/${currentUserID}`));\n\t\t//\n\t\t// let currentUser = deattribute(response.data.data) as User;\n\t\t//\n\t\t// currentUser = {\n\t\t// \t...currentUser,\n\t\t// \tmeta: {\n\t\t// \t\t...currentUser.meta,\n\t\t// \t\tdashboards: Object.fromEntries(dashboardMap.entries())\n\t\t// \t}\n\t\t// };\n\n\t\t// console.log(\"update user meta\", currentUser);\n\t\t// const serializedUser = serialise(\"users\", currentUser);\n\t\t// console.log(\"serialized user update\", serializedUser);\n\t\t// update local store\n\t\t// let dashboardExists = false;\n\t\t// dashboards = dashboards.map((storedDashboard: Dashboard) => {\n\t\t// \tif (storedDashboard.name === dashboard.name) {\n\t\t// \t\tdashboardExists = true;\n\t\t// \t\treturn dashboard;\n\t\t// \t} else return storedDashboard;\n\t\t// });\n\t\t//\n\t\t// if (!dashboardExists) dashboards.push(dashboard);\n\n\t\tconst data = {\n\t\t\tdata: {\n\t\t\t\tattributes: {\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tdashboards: dashboards\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tid: currentUserID,\n\t\t\t\ttype: \"users\"\n\t\t\t}\n\t\t};\n\n\t\treturn Axios.put(APIUtils.getUrl(`users/${currentUserID}`), data);\n\t}\n\n\t// static async delete(dashboard: Dashboard): Promise {\n\t// \treturn await Axios.delete(`${APIUtils.getUrl(\"users\")}/${dashboard.name}`);\n\t// }\n}\n\nexport default DashboardsApi;\n","import { Dashboard } from \"components/monitoring/dashboard/types\";\nimport DashboardUtils from \"components/monitoring/dashboard/utils\";\nimport DashboardsApi from \"services/api/DashboardsApi\";\nimport {\n\tdashboardSaveFailed,\n\tdashboardSaveSuccess\n} from \"store/dashboard/actions\";\nimport { dashboardsSelector } from \"store/dashboard/selectors\";\nimport { DASHBOARD_ACTION, DashboardSaveAction } from \"store/dashboard/types\";\nimport { takeLatest } from \"redux-saga/effects\";\nimport { call, put, select } from \"typed-redux-saga\";\n\nfunction* saveDashboard(action: DashboardSaveAction) {\n\ttry {\n\t\tconst dashboardMap: Map = yield select(\n\t\t\tdashboardsSelector\n\t\t);\n\t\tdashboardMap.set(action.payload.dashboard.name, action.payload.dashboard);\n\n\t\tconst dashboards: Dashboard[] = DashboardUtils.mapToArray(dashboardMap);\n\n\t\tconst response = yield* call(DashboardsApi.save, dashboards);\n\t\tconsole.log(\"saved dashboards\", response.data);\n\t\tyield put(dashboardSaveSuccess(dashboards));\n\t} catch (e: any) {\n\t\tconsole.error(\"dashboard save error:\", e);\n\t\tyield put(dashboardSaveFailed(e.message));\n\t}\n}\n\nexport default function* DashboardSideEffects() {\n\tyield takeLatest(DASHBOARD_ACTION.SAVE, saveDashboard);\n}\n","import { AppState } from \"AppState\";\nimport axios, { AxiosError, AxiosResponse } from \"axios\";\nimport { Store } from \"redux\";\nimport AppEnvironment from \"services/appEnvironment\";\nimport { logoutSuccess } from \"store/auth/actions\";\nimport {\n\tsetBackendOffline,\n\tsetBackendOnline\n} from \"store/systemStatus/actions\";\nimport { CONNECTION_STATUS } from \"store/systemStatus/types\";\n\nexport const initializeInterceptors = (store: Store): void => {\n\tinitialize401ResponseHandler(store);\n\tinitializeBackendMonitor(store);\n};\n\nconst initializeBackendMonitor = (store: Store) => {\n\taxios.interceptors.response.use(\n\t\t(response: AxiosResponse): AxiosResponse => {\n\t\t\tif (response.config?.url?.startsWith(AppEnvironment.getApiAddress())) {\n\t\t\t\tconst state = store.getState() as AppState;\n\t\t\t\tconst isOnline =\n\t\t\t\t\tstate.systemStatus.backendConnectionStatus ===\n\t\t\t\t\tCONNECTION_STATUS.ONLINE;\n\n\t\t\t\tif (!isOnline) {\n\t\t\t\t\tstore.dispatch(setBackendOnline());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn response;\n\t\t},\n\t\tasync (error: AxiosError): Promise => {\n\t\t\tif (\n\t\t\t\terror.config?.url?.startsWith(AppEnvironment.getApiAddress()) &&\n\t\t\t\terror.message === \"Network Error\"\n\t\t\t) {\n\t\t\t\tconst state = store.getState() as AppState;\n\t\t\t\tconst isOffline =\n\t\t\t\t\tstate.systemStatus.backendConnectionStatus ===\n\t\t\t\t\tCONNECTION_STATUS.OFFLINE;\n\n\t\t\t\tif (!isOffline) {\n\t\t\t\t\tstore.dispatch(setBackendOffline());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn Promise.reject(error);\n\t\t}\n\t);\n};\n\nconst initialize401ResponseHandler = (store: Store) => {\n\taxios.interceptors.response.use(\n\t\t(response: AxiosResponse): AxiosResponse => response,\n\t\tasync (error: AxiosError): Promise => {\n\t\t\tconst shouldSkip =\n\t\t\t\terror.config?.url?.includes(\"/login\") ||\n\t\t\t\t!error.config?.url?.startsWith(AppEnvironment.getApiAddress());\n\n\t\t\tif (error.response && error.response.status === 401 && !shouldSkip) {\n\t\t\t\thandleUnauthorized(store);\n\t\t\t\tthrow error;\n\t\t\t} else {\n\t\t\t\treturn Promise.reject(error);\n\t\t\t}\n\t\t}\n\t);\n};\n\nconst handleUnauthorized = (store: Store) => {\n\tstore.dispatch(logoutSuccess());\n};\n","import { AppState } from \"AppState\";\nimport { takeLatest } from \"redux-saga/effects\";\nimport JobsApi from \"services/api/JobsApi\";\nimport { JobTracking } from \"services/jobs/types\";\nimport { WSHandler } from \"services/webSocketHandler/WSHandler.ws\";\nimport {\n\tbootDone,\n\tsetRunningJobs,\n\tconsolidateTrackedJobs\n} from \"store/jobsMonitor/actions\";\nimport { METRICS_ACTION } from \"store/metricsStore/storeTypes\";\nimport { SYSTEM_STATUS_ACTION } from \"store/systemStatus/types\";\nimport { call, delay, put, select } from \"typed-redux-saga\";\nimport { SECURE_PRELOADER_ACTION } from \"../../components/preloader/types\";\nimport { JOB_MONITOR_ACTION } from \"./types\";\nimport { jobsToTrackSelector } from \"./selectors\";\n\nfunction* keepaliveWs() {\n\t// reconnect to WS if disconnected\n\twhile (true) {\n\t\ttry {\n\t\t\t// console.log(\"ws connection keepalive tick\");\n\t\t\tif (!WSHandler.isConnected()) {\n\t\t\t\t// console.log(\"connecting to ws\");\n\t\t\t\tyield WSHandler.connect();\n\t\t\t}\n\t\t} finally {\n\t\t\tyield delay(10000);\n\t\t}\n\t}\n}\n\nfunction* startWS() {\n\tyield WSHandler.connect();\n\tconst runningJobs = yield* call(JobsApi.fetchRunningJobList);\n\n\tconst runningJobsTracking: JobTracking[] = runningJobs.map((job: any) => ({\n\t\tid: job.id,\n\t\tstatus: job.executionInfo.status,\n\t\tmeta: job.meta\n\t}));\n\tyield put(setRunningJobs(runningJobsTracking));\n\tyield put(bootDone());\n}\n\nfunction stopWS() {\n\tWSHandler.disconnect();\n}\n\nfunction* runConsolidation() {\n\t// jobs to track\n\tconst jobsToTrack = yield* select(jobsToTrackSelector);\n\n\t// fetch jobs from api\n\tconst trackedJobs = yield* call(JobsApi.fetchFilteredJobList, jobsToTrack);\n\n\tyield put(consolidateTrackedJobs(trackedJobs));\n}\n\nfunction* JobSideEffects() {\n\tyield takeLatest(SECURE_PRELOADER_ACTION.PRELOAD, startWS);\n\tyield takeLatest(SECURE_PRELOADER_ACTION.PRELOAD_SUCCESS, keepaliveWs);\n\tyield takeLatest(METRICS_ACTION.STOP_MONITOR, stopWS);\n\tyield takeLatest(METRICS_ACTION.START_MONITOR, startWS);\n\tyield takeLatest(METRICS_ACTION.START_MONITOR, runConsolidation);\n\tyield takeLatest(SYSTEM_STATUS_ACTION.BACKEND_SET_ONLINE, startWS);\n\tyield takeLatest(JOB_MONITOR_ACTION.TRACK, runConsolidation);\n}\n\nexport const monitoredJobsSelector = (state: AppState): number[] =>\n\tstate.jobMonitor.jobsToTrack;\n\nexport default JobSideEffects;\n","// export interface ResultItem {\n// \tmetric: Metric;\n// \tvalue: [number, string];\n// }\n//\n// export interface Metric {\n// \t__name__: string;\n// \tgmd_cluster: string;\n// \tgmd_db_engine: string;\n// \tgmd_db_segment: string;\n// \tgmd_host: string;\n// \tgmd_host_system: string;\n// \tgmd_node: string;\n// \tinstance: string;\n// \tjob: string;\n// }\n\nexport interface NodeMetric {\n\ttime: Date;\n\tcluster: string;\n\tnode: string;\n\tvalue: number;\n}\n\nexport interface ClusterMetric {\n\ttime: Date;\n\tcluster: string;\n\tvalue: number;\n}\n\nexport interface WsrepLocalStateMetric extends NodeMetric {\n\ttype: METRIC.WSREP_LOCAL_STATE;\n}\n\nexport interface WsrepLastCommittedMetric extends NodeMetric {\n\ttype: METRIC.WSREP_LAST_COMMITTED;\n}\n\nexport enum METRIC {\n\tWSREP_LOCAL_STATE = \"wsrep_local_state\",\n\tWSREP_LAST_COMMITTED = \"wsrep_last_committed\",\n\tMYSQL_UP = \"mysql_up\"\n}\n\n\n","import Axios, { AxiosResponse } from \"axios\";\nimport { Config } from \"services/config/Config\";\n\nclass MetricsApi {\n\tstatic async fetch(query: string): Promise {\n\t\tconst {\n\t\t\tinflux_host: host,\n\t\t\tinflux_port: port,\n\t\t\tinflux_password: password,\n\t\t\tinflux_protocol: protocol,\n\t\t\tinflux_username: username,\n\t\t\tinflux_db: db\n\t\t} = Config;\n\n\t\treturn await Axios.get(`${protocol}://${host}:${port}/query`, {\n\t\t\tauth: {\n\t\t\t\tusername,\n\t\t\t\tpassword\n\t\t\t},\n\t\t\tparams: {\n\t\t\t\tq: query,\n\t\t\t\tdb\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport default MetricsApi;\n","export const CONNECTION_WEAK_THRESHOLD = 1000;\n","import { DateTime } from \"luxon\";\nimport MetricsApi from \"services/api/MetricsApi\";\nimport {\n\tfetchLastCommittedMetricsSucceeded,\n\tfetchWsrepLocalStateMetricsSuccess\n} from \"store/metricsStore/actions\";\nimport { isMonitorEnabledSelector } from \"store/metricsStore/selectors\";\nimport { METRICS_ACTION } from \"store/metricsStore/storeTypes\";\nimport {\n\tMETRIC,\n\tWsrepLastCommittedMetric,\n\tWsrepLocalStateMetric\n} from \"store/metricsStore/types\";\nimport {\n\tsetInfluxDBOffline,\n\tsetInfluxDBOnline,\n\tsetInfluxDBWeak\n} from \"store/systemStatus/actions\";\nimport { CONNECTION_WEAK_THRESHOLD } from \"store/systemStatus/const\";\nimport moment from \"moment\";\nimport { takeLatest } from \"redux-saga/effects\";\nimport { call, delay, put, select } from \"typed-redux-saga\";\n\nconst POLLING_INTERVAL = 3000;\n\nfunction* monitorLastCommitted() {\n\t// console.log(\"Last committed metrics monitor started\");\n\n\tlet monitor: boolean = yield select(isMonitorEnabledSelector);\n\n\tconst query = `SELECT LAST(wsrep_last_committed), cluster, node FROM mysql GROUP BY \"node\", \"cluster\"`;\n\n\twhile (monitor) {\n\t\ttry {\n\t\t\tconst startTime = DateTime.now().toMillis();\n\n\t\t\tconst response = yield* call(MetricsApi.fetch, query);\n\t\t\t// console.log(\n\t\t\t// \t\"metrics fetch response\",\n\t\t\t// \tresponse.data.results[0].series\n\t\t\t// );\n\n\t\t\tconst endTime = DateTime.now().toMillis();\n\t\t\tconst requestDuration = endTime - startTime;\n\n\t\t\tif (requestDuration > CONNECTION_WEAK_THRESHOLD) {\n\t\t\t\tyield put(setInfluxDBWeak());\n\t\t\t} else {\n\t\t\t\tyield put(setInfluxDBOnline());\n\t\t\t}\n\n\t\t\tconst data = response.data.results[0].series;\n\n\t\t\tconst metricsRecord: Record = {};\n\n\t\t\tdata?.forEach((res: any, index: number) => {\n\t\t\t\tconst metric: WsrepLastCommittedMetric = {\n\t\t\t\t\ttype: METRIC.WSREP_LAST_COMMITTED,\n\t\t\t\t\ttime: new Date(res.values[0][data[index].columns.indexOf(\"time\")]),\n\t\t\t\t\tvalue: res.values[0][data[index].columns.indexOf(\"last\")],\n\t\t\t\t\tcluster: res.values[0][data[index].columns.indexOf(\"cluster\")],\n\t\t\t\t\tnode: res.values[0][data[index].columns.indexOf(\"node\")]\n\t\t\t\t};\n\n\t\t\t\tmetricsRecord[`${metric.cluster},${metric.node}`] = metric;\n\n\t\t\t\tif (\n\t\t\t\t\tmetricsRecord[metric.cluster] &&\n\t\t\t\t\tmetricsRecord[metric.cluster].value > metric.value\n\t\t\t\t) {\n\t\t\t\t\t// skip if this metric is lower than one already in metric record store\n\t\t\t\t} else {\n\t\t\t\t\tmetricsRecord[metric.cluster] = metric;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// console.log(\"last committed metrics\", metrics);\n\n\t\t\tyield put(fetchLastCommittedMetricsSucceeded(metricsRecord));\n\t\t} catch (e: any) {\n\t\t\tconsole.error(\"Last committed monitor error:\", e);\n\t\t\tif (e.message.toUpperCase() === \"NETWORK ERROR\") {\n\t\t\t\tyield put(setInfluxDBOffline());\n\t\t\t}\n\t\t} finally {\n\t\t\tyield delay(POLLING_INTERVAL);\n\t\t\tmonitor = yield select(isMonitorEnabledSelector);\n\t\t}\n\t}\n}\n\nfunction* monitorLocalState() {\n\t// console.log(\"Local state metrics monitor started\");\n\n\t// console.log(\"query\", query);\n\tlet monitor: boolean = yield select(isMonitorEnabledSelector);\n\t// console.log(\"Local state metrics monitor started\", monitor);\n\n\twhile (monitor) {\n\t\ttry {\n\t\t\tconst query = `SELECT LAST(wsrep_local_state), node, cluster FROM mysql WHERE time > ${moment()\n\t\t\t\t.subtract(3, \"second\")\n\t\t\t\t.valueOf()}000000 GROUP BY \"node\", \"cluster\"`;\n\n\t\t\tconst response = yield* call(MetricsApi.fetch, query);\n\t\t\t// console.log(\n\t\t\t// \t\"metrics fetch response\",\n\t\t\t// \tresponse,\n\t\t\t// \tresponse.data.results[0].series\n\t\t\t// );\n\n\t\t\tconst data = response.data.results[0].series;\n\n\t\t\tconst metrics =\n\t\t\t\tdata?.map(\n\t\t\t\t\t(res: any, index: number): WsrepLocalStateMetric => ({\n\t\t\t\t\t\ttype: METRIC.WSREP_LOCAL_STATE,\n\t\t\t\t\t\ttime: new Date(res.values[0][data[index].columns.indexOf(\"time\")]),\n\t\t\t\t\t\tvalue: res.values[0][1],\n\t\t\t\t\t\tnode: res.values[0][data[index].columns.indexOf(\"node\")],\n\t\t\t\t\t\tcluster: res.values[0][data[index].columns.indexOf(\"cluster\")]\n\t\t\t\t\t})\n\t\t\t\t) || [];\n\n\t\t\t// console.log(\"local state metrics\", metrics);\n\n\t\t\tyield put(fetchWsrepLocalStateMetricsSuccess(metrics));\n\t\t} catch (e: any) {\n\t\t\tconsole.error(\"Local state monitor error:\", e);\n\t\t\tif (e.message.toUpperCase() === \"NETWORK ERROR\") {\n\t\t\t\tyield put(setInfluxDBOffline());\n\t\t\t}\n\t\t} finally {\n\t\t\tyield delay(POLLING_INTERVAL);\n\t\t\tmonitor = yield select(isMonitorEnabledSelector);\n\t\t}\n\t}\n}\n\nfunction* MetricsStoreSideEffects() {\n\tyield takeLatest(METRICS_ACTION.START_MONITOR, monitorLastCommitted);\n\tyield takeLatest(METRICS_ACTION.START_MONITOR, monitorLocalState);\n}\n\nexport default MetricsStoreSideEffects;\n","import Axios, { AxiosResponse } from \"axios\";\nimport AppEnvironment from \"services/appEnvironment\";\n\nclass EnvAPI {\n\tstatic async fetchKey(key: string): Promise {\n\t\treturn await Axios.get(\n\t\t\t`${AppEnvironment.getApiAddress()}/config/env/${key}`\n\t\t);\n\t}\n\n\tstatic async fetchPublicKey(key: string): Promise {\n\t\treturn await Axios.get(\n\t\t\t`${AppEnvironment.getApiAddress()}/config/env-public/${key}`\n\t\t);\n\t}\n}\n\nexport default EnvAPI;\n","import Axios from \"axios\";\nimport { HOST_TYPE } from \"pages/management/host/types\";\nimport AppEnvironment from \"services/appEnvironment\";\nimport { deattribute } from \"kitsu-core\";\nimport {\n\tSupportMatrixDBEngine,\n\tSupportMatrixSystem\n} from \"../supportMatrix/types\";\n\nconst PATH = \"supportMatrixItems\";\n\nclass SupportMatrixApi {\n\tstatic async fetchSupportMatrix(\n\t\tcloudProvider?: HOST_TYPE\n\t): Promise {\n\t\ttry {\n\t\t\tconst response = await Axios.get(\n\t\t\t\t`${AppEnvironment.getApiAddress()}/${AppEnvironment.getApiVersion()}/${PATH}`,\n\t\t\t\t{\n\t\t\t\t\tparams: {\n\t\t\t\t\t\tcloud_provider: cloudProvider\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tconst supportMatrix = response.data.data.map((item: any) =>\n\t\t\t\tdeattribute(item)\n\t\t\t);\n\n\t\t\tconsole.log(\"support matrix\", cloudProvider, supportMatrix);\n\n\t\t\tsupportMatrix.sort(\n\t\t\t\t(\n\t\t\t\t\tsupportMatrixSystem1: SupportMatrixSystem,\n\t\t\t\t\tsupportMatrixSystem2: SupportMatrixSystem\n\t\t\t\t) => supportMatrixSystem1.id.localeCompare(supportMatrixSystem2.id)\n\t\t\t);\n\n\t\t\tsupportMatrix.forEach((supportMatrixSystem: SupportMatrixSystem) => {\n\t\t\t\tsupportMatrixSystem.dbEngines.sort(\n\t\t\t\t\t(supportMatrixDb1: SupportMatrixDBEngine, supportMatrixDb2) =>\n\t\t\t\t\t\tsupportMatrixDb1.id.localeCompare(supportMatrixDb2.id)\n\t\t\t\t);\n\t\t\t});\n\n\t\t\treturn supportMatrix;\n\t\t} catch (e) {\n\t\t\tthrow e;\n\t\t}\n\t}\n}\n\nexport default SupportMatrixApi;\n","import { VERSION_ACTION, VersionGetFailedAction, VersionGetSuccessAction } from \"store/version/types\";\n\nexport const versionGetSuccessAction = (\n\tversion: string\n): VersionGetSuccessAction => ({\n\ttype: VERSION_ACTION.GET_SUCCESS,\n\tpayload: {\n\t\tversion\n\t}\n});\n\nexport const versionGetFailedAction = (\n\terrorMsg: string\n): VersionGetFailedAction => ({\n\ttype: VERSION_ACTION.GET_FAILED,\n\tpayload: {\n\t\terrorMsg\n\t}\n});","import Axios from \"axios\";\nimport { clusterListFetchSucceeded } from \"store/cluster/actions\";\nimport { hostListFetchSucceeded } from \"store/host/actions\";\nimport { HOST_TYPE } from \"pages/management/host/types\";\nimport { nodeListFetchSucceeded } from \"store/node/actions\";\nimport ClustersAPI from \"services/api/ClustersAPI\";\nimport EnvAPI from \"services/api/EnvAPI\";\nimport HostsAPI from \"services/api/HostsAPI\";\nimport NodesAPI from \"services/api/NodesAPI\";\nimport SupportMatrixApi from \"services/api/SupportMatrixApi\";\nimport APIUtils from \"services/api/utils\";\nimport { bootAuthCheck } from \"store/auth/actions\";\nimport { Config } from \"services/config/Config\";\nimport { startMetricsMonitor } from \"store/metricsStore/actions\";\nimport {\n\tpublicPreloadFailed,\n\tpublicPreloadSuccess,\n\tsecurePreloadFailed,\n\tsecurePreloadSuccess\n} from \"store/preloader/actions\";\nimport {\n\tPUBLIC_PRELOADER_ACTION,\n\tSECURE_PRELOADER_ACTION\n} from \"components/preloader/types\";\nimport { takeLatest } from \"redux-saga/effects\";\nimport {\n\tversionGetFailedAction,\n\tversionGetSuccessAction\n} from \"store/version/actions\";\nimport { call, put } from \"typed-redux-saga\";\n\nfunction* publicPreloadSideEffect() {\n\ttry {\n\t\tconst jwtPublicKeyResponse = yield* call(\n\t\t\tEnvAPI.fetchPublicKey,\n\t\t\t`JWT_PUBLIC_KEY`\n\t\t);\n\n\t\t// console.log(\"jwtPublicKeyResponse\", jwtPublicKeyResponse);\n\n\t\tif (!jwtPublicKeyResponse.data.value)\n\t\t\tpublicPreloadFailed(\"JWT_PUBLIC_KEY is missing.\");\n\n\t\tConfig.jtw_public_token = jwtPublicKeyResponse.data.value;\n\n\t\ttry {\n\t\t\t// get app version\n\t\t\tconst app_version_response = yield* call(Axios.get, `/version`) as any;\n\t\t\tyield put(versionGetSuccessAction(app_version_response.data.version));\n\t\t} catch (e) {\n\t\t\tconst errorMsg = APIUtils.APIErrorResponseHandler(e);\n\t\t\tconsole.error(\"Version get error:\", errorMsg);\n\t\t\tyield put(versionGetFailedAction(errorMsg));\n\t\t}\n\n\t\tyield put(publicPreloadSuccess());\n\t\tyield put(bootAuthCheck());\n\t} catch (e: any) {\n\t\tconsole.error(e);\n\t\tyield put(publicPreloadFailed(e.message));\n\t}\n}\n\nfunction* securePreloadSideEffect() {\n\t// try {\n\t// \tconst jwtData = yield* call(AuthAPI.refreshWsAccessToken);\n\t// \tyield put(fetchJWTSuccess(jwtData));\n\t// } catch (e: any) {\n\t// \t// console.log(\"fetch jwt failed\", e.message);\n\t// \tyield put(fetchJWTFailed(e.message));\n\t// }\n\n\ttry {\n\t\tconst clusterList = yield* call(ClustersAPI.fetchList);\n\t\t// console.log(\"saga cluster list fetched\", clusterList);\n\t\tyield put(clusterListFetchSucceeded(clusterList));\n\n\t\tlet clusterIndex = 0;\n\t\tlet cluster = clusterList[clusterIndex];\n\t\twhile (cluster) {\n\t\t\tconst clusterID = cluster.id;\n\t\t\tif (!clusterID) break;\n\n\t\t\tconst hostList = yield* call(HostsAPI.fetchList, clusterID);\n\t\t\tyield put(hostListFetchSucceeded(clusterID, hostList));\n\n\t\t\tconst nodeList = yield* call(NodesAPI.fetchList, clusterID);\n\t\t\tyield put(nodeListFetchSucceeded(clusterID, nodeList));\n\t\t\tcluster = clusterList[++clusterIndex];\n\t\t}\n\n\t\t// yield put(userListFetchRequested());\n\t\t//\n\t\t// yield put(jobListFetchRequested());\n\n\t\t// yield call(DashboardsApi.fetchList);\n\n\t\tConfig.support_matrix = yield* call(SupportMatrixApi.fetchSupportMatrix);\n\n\t\t// console.log(\"supportMatrix\", supportMatrix);\n\n\t\tConfig.support_matrix_ec2 = yield* call(\n\t\t\tSupportMatrixApi.fetchSupportMatrix,\n\t\t\tHOST_TYPE.EC2\n\t\t);\n\n\t\tConfig.support_matrix_digitalocean = yield* call(\n\t\t\tSupportMatrixApi.fetchSupportMatrix,\n\t\t\tHOST_TYPE.DIGITAL_OCEAN\n\t\t);\n\n\t\tconst influxUrlFetchResponse = yield* call(EnvAPI.fetchKey, \"INFLUXDB_URL\");\n\t\t// console.log(\"influxUrlFetchResponse\", influxUrlFetchResponse);\n\n\t\tconst fullUrl = influxUrlFetchResponse.data?.value;\n\n\t\ttry {\n\t\t\tconst influxUrl = new URL(fullUrl);\n\n\t\t\t// console.warn(r\"influxUrl\", fullUrl, influxUrl);\n\n\t\t\tConfig.influx_protocol =\n\t\t\t\tinfluxUrl.protocol === \"https:\" ? \"https\" : \"http\";\n\t\t\tConfig.influx_host = influxUrl.hostname;\n\t\t\tConfig.influx_username = influxUrl.username;\n\t\t\tConfig.influx_password = influxUrl.password;\n\t\t\tConfig.influx_port = parseInt(influxUrl.port);\n\t\t\tConfig.influx_db = influxUrl.pathname.replace(\"/\", \"\");\n\t\t} catch (e) {\n\t\t\tconsole.warn(\n\t\t\t\t`Failed to parse InfluxDB Url: ${fullUrl}\n\t\t\t\tExpected url format: http://username:password@url/dbname\n\t\t\t\tThe application will not be able to display logs and chart metrics.`\n\t\t\t);\n\t\t}\n\n\t\tconsole.log(\"Secure preload success!\");\n\t\tconsole.log(\"config\", Config);\n\n\t\tyield put(securePreloadSuccess());\n\t} catch (e: any) {\n\t\tconsole.error(e);\n\t\tyield put(securePreloadFailed(e.message));\n\t}\n}\n\nfunction* securePreloadSuccessSideEffect() {\n\tyield put(startMetricsMonitor());\n}\n\nexport default function* PreloaderSideEffects() {\n\tyield takeLatest(PUBLIC_PRELOADER_ACTION.PRELOAD, publicPreloadSideEffect);\n\tyield takeLatest(SECURE_PRELOADER_ACTION.PRELOAD, securePreloadSideEffect);\n\tyield takeLatest(\n\t\tSECURE_PRELOADER_ACTION.PRELOAD_SUCCESS,\n\t\tsecurePreloadSuccessSideEffect\n\t);\n}\n","import { createTheme, Theme } from \"@mui/material/styles\";\n\n// // https://mui.com/guides/migration-v4/#types-property-quot-palette-quot-quot-spacing-quot-does-not-exist-on-type-defaulttheme\ndeclare module \"@mui/styles/defaultTheme\" {\n\tinterface DefaultTheme extends Theme {}\n}\n\nconst defaultTheme = createTheme();\n\nexport const theme = createTheme({\n\tcomponents: {\n\t\tMuiCardHeader: {\n\t\t\tstyleOverrides: {\n\t\t\t\troot: {\n\t\t\t\t\tpaddingBottom: defaultTheme.spacing(1),\n\t\t\t\t\tpaddingTop: defaultTheme.spacing(1)\n\t\t\t\t},\n\t\t\t\taction: {\n\t\t\t\t\tmarginTop: 5\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tMuiDivider: {\n\t\t\tstyleOverrides: {\n\t\t\t\troot: {\n\t\t\t\t\tmargin: \"1 0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tMuiButton: {\n\t\t\tdefaultProps: {\n\t\t\t\tsize: \"small\",\n\t\t\t\tcolor: \"inherit\",\n\t\t\t\tvariant: \"text\"\n\t\t\t}\n\t\t},\n\t\tMuiFilledInput: {\n\t\t\tdefaultProps: {\n\t\t\t\tmargin: \"dense\"\n\t\t\t}\n\t\t},\n\t\tMuiFormControl: {\n\t\t\tdefaultProps: {\n\t\t\t\t// margin: \"dense\",\n\t\t\t\t// variant: \"standard\",\n\t\t\t\tvariant: \"outlined\"\n\t\t\t}\n\t\t},\n\t\tMuiFormHelperText: {\n\t\t\tdefaultProps: {\n\t\t\t\t// margin: \"dense\"\n\t\t\t}\n\t\t},\n\t\tMuiIconButton: {\n\t\t\tdefaultProps: {\n\t\t\t\tsize: \"small\"\n\t\t\t}\n\t\t},\n\t\tMuiInputBase: {\n\t\t\tdefaultProps: {\n\t\t\t\t// margin: \"dense\"\n\t\t\t}\n\t\t},\n\t\tMuiInputLabel: {\n\t\t\tdefaultProps: {\n\t\t\t\t// margin: \"dense\"\n\t\t\t}\n\t\t},\n\t\tMuiListItem: {\n\t\t\tdefaultProps: {\n\t\t\t\tdense: true\n\t\t\t}\n\t\t},\n\t\tMuiOutlinedInput: {\n\t\t\tdefaultProps: {\n\t\t\t\t// margin: \"dense\"\n\t\t\t}\n\t\t},\n\t\tMuiFab: {\n\t\t\tdefaultProps: {\n\t\t\t\tsize: \"small\"\n\t\t\t}\n\t\t},\n\t\tMuiTable: {\n\t\t\tdefaultProps: {\n\t\t\t\tsize: \"small\"\n\t\t\t}\n\t\t},\n\t\tMuiTextField: {\n\t\t\tdefaultProps: {\n\t\t\t\tmargin: \"dense\",\n\t\t\t\tvariant: \"standard\"\n\t\t\t}\n\t\t},\n\t\tMuiSelect: {\n\t\t\tdefaultProps: {\n\t\t\t\tvariant: \"outlined\" // BKBK\n\t\t\t}\n\t\t},\n\t\tMuiToolbar: {\n\t\t\tdefaultProps: {\n\t\t\t\tvariant: \"dense\"\n\t\t\t}\n\t\t},\n\t\tMuiTabs: {\n\t\t\tdefaultProps: {\n\t\t\t\tindicatorColor: \"secondary\",\n\t\t\t\ttextColor: \"secondary\"\n\t\t\t}\n\t\t}\n\t},\n\tspacing: 4,\n\tpalette: {\n\t\tprimary: {\n\t\t\tmain: \"#ed7703\",\n\t\t\tcontrastText: \"#fff\"\n\t\t},\n\t\tsecondary: {\n\t\t\tmain: \"#1346bc\",\n\t\t\tcontrastText: \"#fff\"\n\t\t},\n\t\terror: {\n\t\t\tmain: \"#ed0303\"\n\t\t},\n\t\twarning: {\n\t\t\tmain: \"#eded03\"\n\t\t},\n\t\tsuccess: {\n\t\t\tmain: \"#4c9404\"\n\t\t}\n\t}\n});\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 http://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n\twindow.location.hostname === \"localhost\" ||\n\t\t// [::1] is the IPv6 localhost address.\n\t\twindow.location.hostname === \"[::1]\" ||\n\t\t// 127.0.0.1/8 is considered localhost for IPv4.\n\t\twindow.location.hostname.match(\n\t\t\t/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n\t\t)\n);\n\ntype Config = {\n\tonSuccess?: (registration: ServiceWorkerRegistration) => void;\n\tonUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n\tif (process.env.NODE_ENV === \"production\" && \"serviceWorker\" in navigator) {\n\t\t// The URL constructor is available in all browsers that support SW.\n\t\tconst publicUrl = new URL(\n\t\t\t(process as { env: { [key: string]: string } }).env.PUBLIC_URL,\n\t\t\twindow.location.href\n\t\t);\n\t\tif (publicUrl.origin !== window.location.origin) {\n\t\t\t// Our service worker won't work if PUBLIC_URL is on a different origin\n\t\t\t// from what our page is served on. This might happen if a CDN is used to\n\t\t\t// serve assets; see https://github.com/facebook/create-react-app/issues/2374\n\t\t\treturn;\n\t\t}\n\n\t\twindow.addEventListener(\"load\", () => {\n\t\t\tconst swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n\t\t\tif (isLocalhost) {\n\t\t\t\t// This is running on localhost. Let's check if a service worker still exists or not.\n\t\t\t\tcheckValidServiceWorker(swUrl, config);\n\n\t\t\t\t// Add some additional logging to localhost, pointing developers to the\n\t\t\t\t// service worker/PWA documentation.\n\t\t\t\tnavigator.serviceWorker.ready.then(() => {\n\t\t\t\t\tconsole.log(\n\t\t\t\t\t\t\"This web app is being served cache-first by a service \" +\n\t\t\t\t\t\t\t\"worker. To learn more, visit http://bit.ly/CRA-PWA\"\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\t// Is not localhost. Just register service worker\n\t\t\t\tregisterValidSW(swUrl, config);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n\tnavigator.serviceWorker\n\t\t.register(swUrl)\n\t\t.then((registration) => {\n\t\t\tregistration.onupdatefound = () => {\n\t\t\t\tconst installingWorker = registration.installing;\n\t\t\t\tif (installingWorker == null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tinstallingWorker.onstatechange = () => {\n\t\t\t\t\tif (installingWorker.state === \"installed\") {\n\t\t\t\t\t\tif (navigator.serviceWorker.controller) {\n\t\t\t\t\t\t\t// At this point, the updated precached content has been fetched,\n\t\t\t\t\t\t\t// but the previous service worker will still serve the older\n\t\t\t\t\t\t\t// content until all client tabs are closed.\n\t\t\t\t\t\t\tconsole.log(\n\t\t\t\t\t\t\t\t\"New content is available and will be used when all \" +\n\t\t\t\t\t\t\t\t\t\"tabs for this page are closed. See http://bit.ly/CRA-PWA.\"\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t// Execute callback\n\t\t\t\t\t\t\tif (config && config.onUpdate) {\n\t\t\t\t\t\t\t\tconfig.onUpdate(registration);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// At this point, everything has been precached.\n\t\t\t\t\t\t\t// It's the perfect time to display a\n\t\t\t\t\t\t\t// \"Content is cached for offline use.\" message.\n\t\t\t\t\t\t\tconsole.log(\"Content is cached for offline use.\");\n\n\t\t\t\t\t\t\t// Execute callback\n\t\t\t\t\t\t\tif (config && config.onSuccess) {\n\t\t\t\t\t\t\t\tconfig.onSuccess(registration);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\t\t})\n\t\t.catch((error) => {\n\t\t\tconsole.error(\"Error during service worker registration:\", error);\n\t\t});\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n\t// Check if the service worker can be found. If it can't reload the page.\n\tfetch(swUrl)\n\t\t.then((response) => {\n\t\t\t// Ensure service worker exists, and that we really are getting a JS file.\n\t\t\tconst contentType = response.headers.get(\"content-type\");\n\t\t\tif (\n\t\t\t\tresponse.status === 404 ||\n\t\t\t\t(contentType != null && contentType.indexOf(\"javascript\") === -1)\n\t\t\t) {\n\t\t\t\t// No service worker found. Probably a different app. Reload the page.\n\t\t\t\tnavigator.serviceWorker.ready.then((registration) => {\n\t\t\t\t\tregistration.unregister().then(() => {\n\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\t// Service worker found. Proceed as normal.\n\t\t\t\tregisterValidSW(swUrl, config);\n\t\t\t}\n\t\t})\n\t\t.catch(() => {\n\t\t\tconsole.log(\n\t\t\t\t\"No internet connection found. App is running in offline mode.\"\n\t\t\t);\n\t\t});\n}\n\nexport function unregister() {\n\tif (\"serviceWorker\" in navigator) {\n\t\tnavigator.serviceWorker.ready.then((registration) => {\n\t\t\tregistration.unregister();\n\t\t});\n\t}\n}\n","import { ThemeProvider } from \"@mui/material/styles\";\nimport { rootReducer } from \"AppState\";\nimport ClusterSideEffects from \"store/cluster/sideEffects\";\nimport HostSideEffects from \"store/host/sideEffects\";\nimport NodeSideEffects from \"store/node/sideEffects\";\nimport GMRouter from \"Router\";\nimport GMDialog from \"components/dialog/DialogComponent\";\nimport SnackbarSideEffects from \"components/snackbar/sideEffects\";\nimport GMSnackbar from \"components/snackbar/SnackbarComponent\";\nimport UserSideEffects from \"pages/users/sideEffects\";\nimport AuthSideEffects from \"store/auth/sideEffects\";\nimport DashboardSideEffects from \"store/dashboard/sideEffects\";\nimport { initializeInterceptors } from \"services/Interceptors\";\nimport JobSideEffects from \"store/jobsMonitor/sideEffects\";\nimport MetricsStoreSideEffects from \"store/metricsStore/sideEffects\";\nimport PreloaderSideEffects from \"store/preloader/sideEffects\";\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Provider } from \"react-redux\";\nimport { applyMiddleware, compose, createStore, Store } from \"redux\";\nimport createSagaMiddleware from \"redux-saga\";\nimport { theme } from \"theme\";\nimport * as serviceWorker from \"./serviceWorker\";\n\nconst sagaMiddleware = createSagaMiddleware();\n\nexport const appStore: Store = createStore(\n\trootReducer,\n\tcompose(\n\t\tapplyMiddleware(sagaMiddleware),\n\t\t((window as any).__REDUX_DEVTOOLS_EXTENSION__ &&\n\t\t\t(window as any).__REDUX_DEVTOOLS_EXTENSION__({ serialize: true })) ||\n\t\t\tcompose\n\t)\n);\n\nsagaMiddleware.run(SnackbarSideEffects);\nsagaMiddleware.run(UserSideEffects);\nsagaMiddleware.run(ClusterSideEffects);\nsagaMiddleware.run(NodeSideEffects);\nsagaMiddleware.run(HostSideEffects);\nsagaMiddleware.run(JobSideEffects);\nsagaMiddleware.run(PreloaderSideEffects);\nsagaMiddleware.run(MetricsStoreSideEffects);\nsagaMiddleware.run(AuthSideEffects);\nsagaMiddleware.run(DashboardSideEffects);\n\ninitializeInterceptors(appStore);\n\nReactDOM.render(\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t,\n\tdocument.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: http://bit.ly/CRA-PWA\nserviceWorker.unregister();\n\nif (process.env.NODE_ENV !== \"development\") {\n\tconsole.log = () => {};\n}\n"],"sourceRoot":""}