{"version":3,"sources":["dux/actions.js","dux/notifications/reducers.js","dux/notifications/actionCreators.js","dux/notifications/index.js","dux/apitokens/reducers.js","dux/apitokens/actionCreators.js","dux/apitokens/selectors.js","dux/apitokens/index.js","dux/instances/reducers.js","dux/instances/actionCreators.js","dux/catalog/selectors.js","dux/instances/selectors.js","dux/instances/index.js","dux/instancesORv4/reducers.js","dux/instancesORv4/actionCreators.js","dux/instancesORv4/selectors.js","dux/instancesORv4/index.js","dux/user/reducers.js","services/stateStorage/index.js","services/auth/index.js","services/featureFlags/index.js","constants/roles.js","dux/user/selectors.js","dux/user/actionCreators.js","services/sortOrganizations/index.js","dux/user/index.js","dux/usersManagement/reducers.js","dux/usersManagement/actionCreators.js","dux/usersManagement/selectors.js","dux/usersManagement/index.js","dux/usersInviteSignup/reducers.js","dux/usersInviteSignup/actionCreators.js","dux/usersInviteSignup/selectors.js","dux/usersInviteSignup/index.js","dux/org/reducers.js","dux/org/actionCreators.js","dux/org/selectors.js","dux/org/index.js","dux/createInstance/reducers.js","dux/createInstance/actionCreators.js","services/aclKinds/index.js","services/createPlanDisplay/index.js","dux/createInstance/selectors.js","dux/createInstance/formReducers.js","dux/createInstance/index.js","services/sorting/versionsDescending.js","services/sorting/plansAscending.js","dux/catalog/reducers.js","dux/catalog/actionCreators.js","dux/catalog/index.js","middleware/trackingAugmentor/eventMap.js","middleware/trackingAugmentor/index.js","constants/errors.js","middleware/apiError/index.js","store.js","middleware/apiConfig/index.js","dux/rootReducer.js","components/SnackNotifier/SnackNotifier.jsx","components/SnackNotifier/SnackbarNotifierContainer.jsx","components/ErrorPage/ErrorPage.jsx","components/ErrorBoundaryFallback/ErrorBoundaryFallback.jsx","components/SignUp/SignUpFooter/SignUpFooter.jsx","services/roleDisabled/index.js","components/MissionCtrl/InstancesPageRedirect/InstancesPageRedirect.jsx","components/WrappedTextField/WrappedTextField.jsx","components/BusyButton/BusyButton.jsx","services/validator/index.js","services/validationMsgs/index.js","components/SignUp/OrgInfoPage/OrgForm/OrgForm.jsx","components/SignUp/OrgInfoPage/OrgForm/OrgFormContainer.js","components/SignUp/SignUpTemplate/SignUpProgress/SignUpProgress.jsx","components/SignUp/SignUpTemplate/SignUpTemplate.jsx","components/SignUp/SignUpTemplate/SignUpTemplateContainer.jsx","components/SignUp/OrgInfoPage/OrgInfoPage.jsx","components/SignUp/OrgInfoPage/OrgInfoPageContainer.jsx","components/SignUp/VerifyEmailPage/VerifyEmailForm/VerifyEmailForm.jsx","components/SignUp/VerifyEmailPage/VerifyEmailForm/VerifyEmailFormContainer.js","components/SignUp/VerifyEmailPage/VerifyEmailPage.jsx","components/SignUp/OrgInfoPage/OrgRedirect/OrgRedirect.jsx","components/SignUp/VerifyEmailPage/VerifyEmailRedirect/VerifyEmailRedirect.jsx","components/ErrorPage/ErrorPageContainer.jsx","components/LoginPage/LoginRedirect/LoginRedirect.jsx","components/AuthorizedRoute/AuthorizedRoute.jsx","components/AuthorizedRoute/AuthorizedRouteContainer.jsx","components/UnauthorizedPage/UnauthorizedPage.jsx","components/SignUp/SignUpRoutes/ConditionalRoute/ConditionalRoute.jsx","components/SignUp/SignUpRoutes/SignUpRoutes.jsx","components/Banner/Banner.jsx","dux/notifications/selectors.js","components/Banner/BannerContainer.jsx","components/SignUp/SignUp.jsx","components/SignUp/SignUpContainer.jsx","components/RBACWrapper/RBACWrapper.jsx","components/RBACWrapper/RBACWrapperContainer.jsx","dux/clickTracker/actionCreators.js","components/SegmentClickTracker/SegmentClickTracker.jsx","components/SegmentClickTracker/SegmentClickTrackerContainer.jsx","components/FlagEnabled/FlagEnabled.jsx","components/FlagEnabled/FlagEnabledContainer.jsx","components/MissionCtrl/Nav/NavItems/NavItems.jsx","components/MissionCtrl/Nav/NavItems/NavItemsContainer.jsx","components/WithSpecifiedTheme/WithSpecifiedTheme.jsx","components/App/App.theme.js","components/MissionCtrl/Nav/Nav.jsx","components/MissionCtrl/Header/Menu/Menu.jsx","components/MissionCtrl/Header/Header.jsx","components/MissionCtrl/Footer/Footer.jsx","components/Authorized/Authorized.jsx","components/Authorized/AuthorizedContainer.js","components/MissionCtrl/DashboardPage/DashboardPage.jsx","components/MissionCtrl/DashboardPage/DashboardPageContainer.jsx","components/ORTypography/ORTypography.jsx","components/LoadingPlaceholder/LoadingPlaceholder.jsx","components/Poll/Poll.jsx","components/ORv4Link/ORv4Link.jsx","components/ORv4Link/ORv4LinkContainer.js","components/ORContentHeader/ORContentHeader.jsx","components/ORContentArea/ORContentArea.jsx","components/MissionCtrl/InstancesPage/NoInstancesPage/NoInstancesPage.jsx","components/MissionCtrl/InstancesPage/NoInstancesPage/NoInstancesPageContainer.js","components/ServiceIcon/MongoDBIcon/MongoDBIcon.jsx","components/ServiceIcon/RedisIcon/RedisIcon.jsx","components/ServiceIcon/ElasticsearchIcon/ElasticsearchIcon.jsx","components/ServiceIcon/PostgreSQLIcon/PostgreSQLIcon.jsx","components/ServiceIcon/CockroachDBIcon/CockroachDBIcon.jsx","components/ServiceIcon/TimescaleDBIcon/TimescaleDBIcon.jsx","components/ServiceIcon/DefaultIcon/DefaultIcon.jsx","components/ServiceIcon/ServiceIcon.jsx","constants/servicesWithUsers.js","constants/servicesWithDatabases.js","constants/pieChartColors.js","services/conversions/index.js","components/ORSpaceUsage/ORSpaceUsageLegend/NodeLinearProgress/NodeLinearProgress.jsx","components/ORSpaceUsage/ORSpaceUsageLegend/ORSpaceUsageLegend.jsx","components/ORSpaceUsage/ORSpaceUsage.jsx","components/ORSpaceUsage/ORSpaceUsageContainer.js","components/MissionCtrl/InstancesPage/FeaturesList/FeaturesList.jsx","services/handleClickAway/index.js","constants/aclKinds.js","services/normalizer/index.js","components/RBACWrapper/RBACSubmitButton/RBACSubmitButton.jsx","components/MissionCtrl/RocketChip/RocketChip.jsx","components/AclForm/AclForm.jsx","components/AclForm/AclFormContainer.jsx","components/PopoutItem/PopoutItem.jsx","components/MissionCtrl/InstancesPage/InstanceItem/InstanceButtonItem.styles.js","components/MissionCtrl/InstancesPage/InstanceItem/AclInstanceButtonItem/AclInstanceButtonItem.jsx","components/AddUserForm/AddUserForm.jsx","components/AddUserForm/AddUserFormContainer.jsx","components/MissionCtrl/InstancesPage/InstanceItem/UserInstanceButtonItem/UserInstanceButtonItem.jsx","components/AddDatabaseForm/AddDatabaseForm.jsx","components/AddDatabaseForm/AddDatabaseFormContainer.jsx","components/MissionCtrl/InstancesPage/InstanceItem/DatabaseInstanceButtonItem/DatabaseInstanceButtonItem.jsx","components/AddRegionForm/AddRegionForm.jsx","components/AddRegionForm/AddRegionFormContainer.js","components/MissionCtrl/InstancesPage/InstanceItem/RegionInstanceButtonItem/RegionInstanceButtonItem.jsx","components/MissionCtrl/InstancesPage/InstanceItem/InstanceItem.jsx","components/MissionCtrl/InstancesPage/InstanceItem/InstanceItemContainer.js","components/MissionCtrl/InstancesPage/InstanceItem/InstanceItemORv4.jsx","components/MissionCtrl/InstancesPage/InstanceItem/InstanceItemORv4Container.jsx","components/MissionCtrl/InstancesPage/InstancesPage.jsx","components/MissionCtrl/InstancesPage/InstancesPageContainer.jsx","components/BillingFormWrapper/BillingForm/StripeInputWrapper/StripeInput.jsx","components/BillingFormWrapper/BillingForm/StripeInputWrapper/StripeInputWrapper.jsx","components/BillingFormWrapper/BillingForm/BillingForm.jsx","components/BillingFormWrapper/BillingForm/BillingFormContainer.jsx","components/BillingFormWrapper/BillingFormWrapper.jsx","components/BillingPage/BillingPage.jsx","components/BillingPage/BillingPageContainer.jsx","components/MissionCtrl/CreateInstancePage/StepOne/StepOne.jsx","components/MissionCtrl/CreateInstancePage/StepOne/StepOneContainer.js","components/MissionCtrl/CreateInstancePage/StepTwo/AddonCards/AddonCards.jsx","components/MissionCtrl/CreateInstancePage/StepTwo/AddonCards/AddonCardsContainer.js","components/MissionCtrl/CreateInstancePage/StepTwo/StepTwo.jsx","components/MissionCtrl/CreateInstancePage/StepThree/StepThree.jsx","components/MissionCtrl/CreateInstancePage/WhichIcon.js","components/Price/Price.jsx","components/Price/PriceContainer.js","components/MissionCtrl/CreateInstancePage/RocketProgress/RocketProgress.jsx","components/MissionCtrl/CreateInstancePage/RocketOverview/OverviewStep/OverviewStep.jsx","components/MissionCtrl/CreateInstancePage/RocketOverview/RocketOverview.jsx","components/MissionCtrl/CreateInstancePage/CreateInstancePage.jsx","components/MissionCtrl/CreateInstancePage/CreateInstancePageContainer.js","components/MissionCtrl/CreateInstancePage2/SummaryDrawer/SummaryDrawer.jsx","components/MissionCtrl/CreateInstancePage2/SummaryDrawer/SummaryDrawerContainer.js","components/ORTooltip/ORTooltip.jsx","components/MissionCtrl/CreateInstancePage2/StepOne/ServiceSelector/ServiceSelector.jsx","components/MissionCtrl/CreateInstancePage2/StepOne/ServiceSelector/ServiceSelectorContainer.js","components/WrappedSelectField/WrappedSelectField.jsx","components/MissionCtrl/CreateInstancePage2/StepOne/FormSelect/FormSelect.jsx","components/MissionCtrl/CreateInstancePage2/StepOne/FormSelect/FormSelectContainer.js","components/MissionCtrl/CreateInstancePage2/StepOne/StepOne.jsx","components/MissionCtrl/CreateInstancePage2/StepOne/StepOneContainer.js","components/MissionCtrl/CreateInstancePage2/StepTwo/FlavorSelector/FlavorSelector.jsx","components/MissionCtrl/CreateInstancePage2/StepTwo/FlavorSelector/FlavorSelectorContainer.js","components/MissionCtrl/CreateInstancePage2/StepTwo/AddonSelector/AddonSelector.jsx","components/MissionCtrl/CreateInstancePage2/StepTwo/PlanSelector/PlanSelector.jsx","components/MissionCtrl/CreateInstancePage2/StepTwo/PlanSelector/PlanSelectorContainer.js","components/MissionCtrl/CreateInstancePage2/StepTwo/StepTwo.jsx","components/MissionCtrl/CreateInstancePage2/StepTwo/StepTwoContainer.jsx","components/MissionCtrl/CreateInstancePage2/StepThree/StepThree.jsx","components/MissionCtrl/CreateInstancePage2/StepThree/StepThreeContainer.js","components/MissionCtrl/CreateInstancePage2/StepFour/StepFour.jsx","components/MissionCtrl/CreateInstancePage2/CreateInstancePage.jsx","components/MissionCtrl/CreateInstancePage2/CreateInstancePageContainer.js","components/MissionCtrl/ProfilePage/PersonalInfoTab/ApiTokenCard/ApiTokenForm/ApiTokenForm.jsx","components/MissionCtrl/ProfilePage/PersonalInfoTab/ApiTokenCard/ApiTokenForm/ApiTokenFormContainer.jsx","components/CopyToClipboard/ContentCopyIcon/ContentCopyIcon.jsx","components/CopyToClipboard/CopyToClipboard.jsx","components/MissionCtrl/ProfilePage/PersonalInfoTab/ApiTokenCard/ApiTokenItem/MoreLessString/MoreLessString.jsx","components/MissionCtrl/ProfilePage/PersonalInfoTab/ApiTokenCard/ApiTokenItem/ApiTokenItem.jsx","components/MissionCtrl/ProfilePage/PersonalInfoTab/ApiTokenCard/ApiTokenItem/ApiTokenItemContainer.jsx","components/MissionCtrl/ProfilePage/PersonalInfoTab/ApiTokenCard/ApiTokenCard.jsx","components/MissionCtrl/ProfilePage/PersonalInfoTab/ApiTokenCard/ApiTokenCardContainer.jsx","components/MissionCtrl/ProfilePage/PersonalInfoTab/ProfileCard/CollapsibleCard/CollapsibleCard.jsx","components/MissionCtrl/ProfilePage/PersonalInfoTab/ProfileCard/ProfileCard.jsx","components/MissionCtrl/ProfilePage/PersonalInfoTab/ProfileCard/ProfileCardContainer.jsx","components/MissionCtrl/ProfilePage/PersonalInfoTab/OrganizationCard/OrganizationCard.jsx","components/MissionCtrl/ProfilePage/PersonalInfoTab/OrganizationCard/OrganizationCardContainer.jsx","components/MissionCtrl/ProfilePage/PersonalInfoTab/PersonalInfoTab.jsx","components/MissionCtrl/ProfilePage/BillingTab/BillingCard/BillingCard.jsx","components/MissionCtrl/ProfilePage/BillingTab/BillingCard/BillingCardContainer.jsx","components/ORTable/TablePaginationActions.jsx","components/MissionCtrl/ProfilePage/BillingTab/InvoiceCard/InvoiceItem/InvoiceItem.jsx","components/MissionCtrl/ProfilePage/BillingTab/InvoiceCard/InvoiceCard.jsx","components/MissionCtrl/ProfilePage/BillingTab/InvoiceCard/InvoiceCardContainer.jsx","components/MissionCtrl/ProfilePage/BillingTab/PromotionCard/PromotionItem/PromotionItem.jsx","components/MissionCtrl/ProfilePage/BillingTab/PromotionCard/PromotionCard.jsx","components/MissionCtrl/ProfilePage/BillingTab/PromotionCard/PromotionCardContainer.jsx","components/MissionCtrl/ProfilePage/BillingTab/BillingTab.jsx","components/MissionCtrl/ProfilePage/SecurityTab/MFACard/MFACard.jsx","components/MissionCtrl/ProfilePage/SecurityTab/MFACard/MFACardContainer.jsx","components/MissionCtrl/ProfilePage/SecurityTab/SecurityTab.jsx","components/MissionCtrl/ProfilePage/ProfilePage.jsx","components/MissionCtrl/ProfilePage/ProfilePageContainer.jsx","components/MissionCtrl/InstancesPageRedirect/InstancesPageRedirectContainer.jsx","components/MissionCtrl/InstancesPage/InstanceDetail/Overview/Overview.jsx","components/MissionCtrl/InstancesPage/InstanceDetail/ShowPasswordIcon/ShowPasswordIcon.jsx","components/MissionCtrl/InstancesPage/InstanceDetail/ShowPasswordIcon/ShowPasswordIconContainer.js","components/MissionCtrl/InstancesPage/InstanceDetail/ConnectTab/ConnectItem/ConnectItem.jsx","components/MissionCtrl/InstancesPage/InstanceDetail/ConnectTab/ConnectWarning/ConnectWarning.jsx","components/MissionCtrl/InstancesPage/InstanceDetail/ConnectTab/CADownloadLink.jsx","components/MissionCtrl/InstancesPage/InstanceDetail/ConnectTab/CADownloadLinkContainer.jsx","components/MissionCtrl/InstancesPage/InstanceDetail/ConnectTab/CRCAMgmt/CRCAMgmt.jsx","components/MissionCtrl/InstancesPage/InstanceDetail/ConnectTab/CRCAMgmt/CRCAMgmtContainer.jsx","components/MissionCtrl/InstancesPage/InstanceDetail/ConnectTab/ConnectTab.jsx","components/MissionCtrl/InstancesPage/InstanceDetail/ConnectTab/ConnectTabContainer.jsx","components/RBACWrapper/RBACDeleteButton/RBACDeleteButton.jsx","components/FormToggleButton/FormToggleButton.jsx","components/ORTable/ORTable.jsx","components/UserList/UserList.jsx","components/UserList/UserListContainer.jsx","components/MissionCtrl/InstancesPage/InstanceDetail/UsersTab/UsersTab.jsx","components/MissionCtrl/InstancesPage/InstanceDetail/SettingsTab/DeleteSection/DeleteSection.jsx","components/MissionCtrl/InstancesPage/InstanceDetail/SettingsTab/ConfigSection/SettingsDropDown/SettingsDropDown.jsx","components/MissionCtrl/InstancesPage/InstanceDetail/SettingsTab/ConfigSection/SettingsRowItem/SettingsRowItem.jsx","components/MissionCtrl/InstancesPage/InstanceDetail/SettingsTab/ConfigSection/ConfigSection.jsx","components/MissionCtrl/InstancesPage/InstanceDetail/SettingsTab/ConfigSection/ConfigSectionContainer.jsx","components/MissionCtrl/InstancesPage/InstanceDetail/SettingsTab/SettingsTab.jsx","components/ORAlert/ORAlert.jsx","components/AclList/AclList.jsx","components/AclList/AclListContainer.jsx","components/MissionCtrl/InstancesPage/InstanceDetail/AclTab/AclTab.jsx","components/DatabaseList/DatabaseList.jsx","components/DatabaseList/DatabaseListContainer.jsx","components/MissionCtrl/InstancesPage/InstanceDetail/DatabasesTab/DatabasesTab.jsx","components/BackupList/BackupList.jsx","components/BackupList/BackupListContainer.jsx","components/MissionCtrl/InstancesPage/InstanceDetail/BackupsTab/BackupsTab.jsx","constants/servicesWithNodeScaling.js","components/NodeList/NodeList.jsx","components/MissionCtrl/InstancesPage/InstanceDetail/NodesTab/NodesTab.jsx","components/MissionCtrl/InstancesPage/InstanceDetail/NodesTab/NodesTabContainer.jsx","components/MissionCtrl/InstancesPage/InstanceDetail/RegionsTab/RegionsTab.jsx","components/MissionCtrl/InstancesPage/InstanceDetail/RegionsTab/RegionsTabContainer.jsx","components/MissionCtrl/InstancesPage/InstanceDetail/InstanceDetail.jsx","components/MissionCtrl/InstancesPage/InstanceDetail/InstanceDetailContainer.jsx","components/MissionCtrl/OrgImpersonationPage/OrgImpersonationForm/OrgImpersonationForm.jsx","components/MissionCtrl/OrgImpersonationPage/OrgImpersonationForm/OrgImpersonationFormContainer.jsx","components/MissionCtrl/OrgImpersonationPage/OrgImpersonationPage.jsx","components/MissionCtrl/OrgImpersonationPage/OrgImpersonationPageContainer.jsx","components/MissionCtrl/UsersPage/InviteUserCardForm/InviteUserCardForm.jsx","components/MissionCtrl/UsersPage/InviteUserCardForm/InviteUserCardFormContainer.jsx","components/MissionCtrl/UsersPage/InviteUserCard/InviteUserCard.jsx","components/MissionCtrl/UsersPage/InviteUserCard/InviteUserCardContainer.jsx","components/MissionCtrl/UsersPage/UserCardForm/UserActionsMenu/UserActionsMenu.jsx","components/MissionCtrl/UsersPage/UserCardForm/UserActionsMenu/UserActionsMenuContainer.jsx","components/MissionCtrl/UsersPage/UserCardForm/UserCardForm.jsx","components/MissionCtrl/UsersPage/UserCardForm/UserCardFormContainer.jsx","components/MissionCtrl/UsersPage/UsersPage.jsx","components/MissionCtrl/UsersPage/UsersPageContainer.jsx","components/MissionCtrl/MissionCtrlRoutes/MissionCtrlRoutes.jsx","components/MissionCtrl/MissionCtrl.jsx","components/MissionCtrl/MissionCtrlContainer.jsx","components/UserInvitationSignup/UserInvitationSignup.jsx","components/UserInvitationSignup/UserInvitationSignupContainer.jsx","components/AwsSignupPage/AwsSignupPage.jsx","components/AwsSignupPage/AwsSignupPageContainer.jsx","components/LoginPage/LoginPage.jsx","components/LoginPage/LoginPageContainer.jsx","components/LogoutPage/LogoutPage.jsx","components/LogoutPage/LogoutPageContainer.jsx","components/FlagVariation/FlagVariation.jsx","components/FlagVariation/FlagVariationContainer.js","components/AboutPage/AboutPage.jsx","components/UpdateSessionPage/UpdateSessionPage.jsx","components/UpdateSessionPage/UpdateSessionPageContainer.jsx","components/SessionLoaderPage/SessionLoaderPage.jsx","components/SessionLoaderPage/SessionLoaderPageContainer.jsx","components/OrganizationPage/OrganizationPage.jsx","components/OrganizationPage/OrganizationPageContainer.jsx","components/LoginRaxSsoPage/LoginRaxSsoPage.jsx","components/LoginRaxSsoPage/LoginRaxSsoPageContainer.jsx","components/App/Routes/PublicRoutes/PublicRoutes.jsx","components/SignUp/SignUpRedirect/SignUpRedirect.jsx","components/App/Routes/Routes.jsx","components/App/Routes/RoutesContainer.jsx","components/App/FeatureFlags/FeatureFlags.jsx","components/App/FeatureFlags/FeatureFlagsContainer.jsx","components/App/UpdateSession/UpdateSession.jsx","components/App/UpdateSession/UpdateSessionContainer.jsx","components/App/App.jsx","components/App/AppContainer.jsx","index.js"],"names":["LOG_IN_REQUESTED","LOG_OUT_REQUESTED","SET_SESSION_SUCCESS","SET_SESSION_FAILURE","CREATE_EMAIL_VERIFICATION_SUCCESS","GET_FEATURE_FLAGS_SUCCESS","UPDATE_FEATURE_FLAGS_SUCCESS","GET_FEATURE_FLAGS_REQUESTED","IMPERSONATE_ORG","STOP_ORG_IMPERSONATION","START_MFA_SIGNUP_FLOW_REQUESTED","START_MFA_SIGNUP_FLOW_SUCCESS","START_MFA_SIGNUP_FLOW_FAILURE","GET_MFA_STATUS_REQUESTED","GET_MFA_STATUS_SUCCESS","GET_MFA_STATUS_FAILURE","REMOVE_MFA_ENROLLMENT_REQUESTED","REMOVE_MFA_ENROLLMENT_SUCCESS","REMOVE_MFA_ENROLLMENT_FAILURE","AWS_SIGNUP_FAILURE","CREATE_ORG_REQUESTED","CREATE_ORG_SUCCESS","CREATE_ORG_FAILURE","UPDATE_ORG_REQUESTED","UPDATE_ORG_SUCCESS","UPDATE_ORG_FAILURE","GET_ORG_REQUESTED","GET_ORG_SUCCESS","GET_ORG_FAILURE","SEARCH_ORGS_REQUESTED","SEARCH_ORGS_SUCCESS","SEARCH_ORGS_FAILURE","SORT_ORGS","CREATE_AWS_ORG_REQUESTED","CREATE_AWS_ORG_SUCCESS","CREATE_AWS_ORG_FAILURE","CREATE_STRIPE_SOURCE_SUCCESS","CREATE_STRIPE_SOURCE_FAILURE","UPDATE_STRIPE_SOURCE_SUCCESS","BILLING_SETUP_COMPLETED","GET_UPCOMING_INVOICE_REQUESTED","GET_UPCOMING_INVOICE_SUCCESS","GET_UPCOMING_INVOICE_FAILURE","GET_PAST_INVOICES_REQUESTED","GET_PAST_INVOICES_SUCCESS","GET_PAST_INVOICES_FAILURE","CREATE_TOKEN_REQUESTED","CREATE_TOKEN_SUCCESS","CREATE_TOKEN_FAILURE","GET_TOKENS_REQUESTED","GET_TOKENS_FAILURE","GET_TOKENS_SUCCESS","DELETE_TOKEN_REQUESTED","DELETE_TOKEN_FAILURE","DELETE_TOKEN_SUCCESS","GET_INSTANCES_REQUESTED","GET_INSTANCES_POLL","GET_INSTANCES_FAILURE","GET_INSTANCES_SUCCESS","GET_INSTANCE_REQUESTED","GET_INSTANCE_POLL","GET_INSTANCE_FAILURE","GET_INSTANCE_SUCCESS","GET_INSTANCE_WITH_PASSWORD_SUCCESS","GET_INSTANCE_WITH_PASSWORD_FAILURE","ADD_INSTANCE_ACL_REQUESTED","ADD_INSTANCE_ACL_FAILURE","ADD_INSTANCE_ACL_SUCCESS","DELETE_INSTANCE_ACL_REQUESTED","DELETE_INSTANCE_ACL_FAILURE","DELETE_INSTANCE_ACL_SUCCESS","DELETE_INSTANCE_REQUESTED","DELETE_INSTANCE_FAILURE","DELETE_INSTANCE_SUCCESS","GET_INSTANCE_USERS_REQUESTED","GET_INSTANCE_USERS_FAILURE","GET_INSTANCE_USERS_SUCCESS","DELETE_INSTANCE_USER_REQUESTED","DELETE_INSTANCE_USER_FAILURE","DELETE_INSTANCE_USER_SUCCESS","RESET_INSTANCE_ERROR_STATE","ADD_INSTANCE_USER_REQUESTED","ADD_INSTANCE_USER_FAILURE","ADD_INSTANCE_USER_SUCCESS","GET_INSTANCE_DATABASES_REQUESTED","GET_INSTANCE_DATABASES_FAILURE","GET_INSTANCE_DATABASES_SUCCESS","ADD_INSTANCE_DATABASE_REQUESTED","ADD_INSTANCE_DATABASE_FAILURE","ADD_INSTANCE_DATABASE_SUCCESS","DELETE_INSTANCE_DATABASE_REQUESTED","DELETE_INSTANCE_DATABASE_FAILURE","DELETE_INSTANCE_DATABASE_SUCCESS","GET_INSTANCE_CERTIFICATES_REQUESTED","GET_INSTANCE_CERTIFICATES_FAILURE","GET_INSTANCE_CERTIFICATES_SUCCESS","GET_INSTANCE_CLIENT_CERTIFICATES_REQUESTED","GET_INSTANCE_CLIENT_CERTIFICATES_FAILURE","GET_INSTANCE_CLIENT_CERTIFICATES_SUCCESS","GET_INSTANCE_CERTIFICATE_DOWNLOAD_REQUESTED","GET_INSTANCE_CERTIFICATE_DOWNLOAD_FAILURE","GET_INSTANCE_CERTIFICATE_DOWNLOAD_SUCCESS","CREATE_INSTANCE_CERTIFICATE_REQUESTED","CREATE_INSTANCE_CERTIFICATE_FAILURE","CREATE_INSTANCE_CERTIFICATE_SUCCESS","CREATE_INSTANCE_CLIENT_CERTIFICATE_REQUESTED","CREATE_INSTANCE_CLIENT_CERTIFICATE_FAILURE","CREATE_INSTANCE_CLIENT_CERTIFICATE_SUCCESS","DELETE_INSTANCE_CERTIFICATE_REQUESTED","DELETE_INSTANCE_CERTIFICATE_FAILURE","DELETE_INSTANCE_CERTIFICATE_SUCCESS","GET_BACKUPS_REQUESTED","GET_BACKUPS_FAILURE","GET_BACKUPS_SUCCESS","GET_PITR_BACKUP_REQUESTED","GET_PITR_BACKUP_FAILURE","GET_PITR_BACKUP_SUCCESS","PATCH_CONFIG_REQUESTED","PATCH_CONFIG_FAILURE","PATCH_CONFIG_SUCCESS","CHANGE_NODE_QUANTITY_REQUESTED","CHANGE_NODE_QUANTITY_FAILURE","CHANGE_NODE_QUANTITY_SUCCESS","NEXT_CREATE_STAGE","PREVIOUS_CREATE_STAGE","RESET_STEPS","SELECT_SERVICE","SELECT_VERSION","SELECT_REGION","ENTER_NAME","SELECT_FLAVOR","SELECT_PLAN","ENTER_CIDR","ENTER_ACL_NAME","SELECT_ACL_KIND","ADD_ACL","REMOVE_ACL","ADD_IPS_LATER","SELECT_SERVICE_SUBTYPE","SELECT_PROVIDER","CREATEINSTANCE_REQUESTED","CREATEINSTANCE_FAILURE","CREATEINSTANCE_SUCCESS","RESET_CREATEINSTANCE_ERROR_STATE","GETIP_REQUESTED","GETIP_SUCCESS","GETIP_FAILURE","GETIP_CLEAR","GET_PRICE_REQUESTED","GET_PRICE_SUCCESS","GET_PRICE_FAILURE","SELECT_ADDON","DESELECT_ADDON","GET_INSTANCESV4_REQUESTED","GET_INSTANCESV4_FAILURE","GET_INSTANCESV4_SUCCESS","GET_SERVICES_REQUESTED","GET_SERVICES_FAILURE","GET_SERVICES_SUCCESS","GET_SERVICESUBTYPES_REQUESTED","GET_SERVICESUBTYPES_FAILURE","GET_SERVICESUBTYPES_SUCCESS","GET_PROVIDERS_REQUESTED","GET_PROVIDERS_FAILURE","GET_PROVIDERS_SUCCESS","GET_VERSIONS_REQUESTED","GET_VERSIONS_FAILURE","GET_VERSIONS_SUCCESS","GET_REGIONS_REQUESTED","GET_REGIONS_FAILURE","GET_REGIONS_SUCCESS","GET_PLANS_REQUESTED","GET_PLANS_FAILURE","GET_PLANS_SUCCESS","GET_FLAVORS_REQUESTED","GET_FLAVORS_FAILURE","GET_FLAVORS_SUCCESS","GET_ADDONS_REQUESTED","GET_ADDONS_FAILURE","GET_ADDONS_SUCCESS","GET_CATALOG_CONFIG_REQUEST","GET_CATALOG_CONFIG_FAILURE","GET_CATALOG_CONFIG_SUCCESS","ENQUEUE_SNACKBAR","REMOVE_SNACKBAR","ENQUEUE_BANNER","ACTIVATE_BANNER","REMOVE_BANNER","SET_FREE_CREDIT_AWARE","CLEAR_BANNER_STATE","GET_USER_REQUESTED","GET_USER_SUCCESS","GET_USER_FAILURE","GET_USER_POLL","PATCH_USER_REQUESTED","PATCH_USER_SUCCESS","PATCH_USER_FAILURE","DELETE_USER_REQUESTED","DELETE_USER_SUCCESS","DELETE_USER_FAILURE","CREATE_USERINVITE_REQUESTED","CREATE_USERINVITE_SUCCESS","CREATE_USERINVITE_FAILURE","GET_USERINVITE_REQUESTED","GET_USERINVITE_SUCCESS","GET_USERINVITE_FAILURE","DELETE_USERINVITE_REQUESTED","DELETE_USERINVITE_SUCCESS","DELETE_USERINVITE_FAILURE","VALIDATE_INVITE_TOKEN_REQUESTED","VALIDATE_INVITE_TOKEN_FAILURE","VALIDATE_INVITE_TOKEN_SUCCESS","ACCEPT_INVITATION_REQUESTED","ACCEPT_INVITATION_SUCCESS","ACCEPT_INVITATION_FAILURE","GET_SPACEUSAGE_REQUESTED","GET_SPACEUSAGE_FAILURE","GET_SPACEUSAGE_SUCCESS","TRACK_BUTTON_CLICK","initialState","notifications","bannerNotifications","activeMessage","freeCreditAware","enqueueSnackbar","notification","dispatch","type","key","uuidv4","removeSnackbar","enqueueBanner","removeBanner","activateBanner","setFreeCreditAware","setClearBannerState","reducers","state","action","filter","shift","apitokens","isLoading","isSaving","createToken","details","data","RSAA","types","meta","analytics","method","endpoint","body","JSON","stringify","getTokens","deleteToken","id","deleteTokenActionSet","getApiTokenState","payload","results","index","map","item","indexOf","newTokenArray","slice","instances","instanceDatabaseIsLoading","error","getInstances","getInstancesPoll","getInstancePoll","service","getInstancePollActionSet","getInstance","toLowerCase","getInstanceActionSet","getInstanceWithPassword","showPassword","getInstanceWithPasswordActionSet","addInstanceAcl","addInstanceAclActionSet","deleteInstanceAcl","instanceId","aclId","deleteInstanceAclActionSet","deleteInstance","redirect","deleteInstanceActionSet","then","response","getInstanceUsers","getInstanceUsersSet","deleteInstanceUser","userId","database","userName","dataBase","username","deleteInstanceUserSet","resetInstanceErrorState","addInstanceUser","addInstanceUserActionSet","pullInstanceDatabases","pullInstanceDatabasesActionSet","addInstanceDatabase","name","addInstanceDatabaseActionSet","deleteInstanceDatabase","deleteInstanceDatabaseActionSet","getSpaceUsage","getSpaceUsageActionSet","getInstanceCertificates","getInstanceCertificatesActionSet","getInstanceClientCertificates","getInstanceClientCertificatesActionSet","getInstanceCertificateDownload","CACertId","getInstanceCertificateDownloadActionSet","createInstanceCertificate","cb","cert_type","createInstanceCertificateActionSet","createInstanceClientCertificate","csr","formattedBody","certificate_signing_request","replace","RegExp","headers","createInstanceClientCertificateActionSet","deleteInstanceCertificate","deleteInstanceCertificateActionSet","getBackups","getBackupsActionSet","getPitrBackupStatus","getPitrBackupStatusActionSet","setInstanceConfiguration","setInstanceConfigurationActionSet","changeNodeQuantity","nodeQuantityData","changeNodeQuantityActionSet","getCatalogState","catalog","getCatalogServicesNames","servicesCatalog","services","displaySetting","getRegionsState","regionsCatalog","getConfigurationState","configurationsCatalog","getRegionsByCloudProvider","cloudProviderId","regions","region","cloudProvider","getValidFlavorsByServiceSubtypeId","serviceSubtypeId","flavorsCatalog","flavors","flavor","serviceSubtype","getServiceSubtypeIdByName","serviceSubtypeName","serviceSubtypesCatalog","serviceSubtypes","getValidFlavorsByServiceSubtypeName","createInstanceStateSelector","createInstance","regionsByServiceSubtypeSelector","createSelector","regionsState","createInstanceState","newInstance","newInstanceServiceSubtype","newInstanceCloudProvider","includes","cloudProvidersStateSelector","providersCatalog","providers","cloudProvidersNamesSelector","cloudProviders","catalogIsLoadingSelector","versionsCatalog","plansCatalog","addonsCatalog","getInstancesState","instanceSelector","props","instanceServiceSelector","instance","getInstanceDatabases","databases","getInstanceSpaceUsage","spaceUsage","getInstanceTotalSpace","totalSpace","hosts","forEach","host","role","diskSizeGb","quantity","instanceDatabaseIsLoadingSelector","instanceState","getPrimaryCertId","certificates","certificate","primary","getCerts","getClientCerts","clientCerts","getCockroachdbMultiInstanceIDs","crdbidsArray","Object","values","metadata","multiInstanceId","Set","getAssociatedCockroachDBInstances","currentInstanceId","getInstanceCertificatesState","getRedisMemoryCapacity","memorySize","memoryMb","toFixed","getUnusedCockroachDBRegions","currentInstance","usedRegions","clusterInstance","aRegion","providerName","provider","getUsedCockroachDBRegions","getServiceSubtypeNameByInstanceId","getValidFlavorsByInstanceId","updatedInstance","assign","acls","acl","Array","isArray","users","user","db","backups","pitrBackupInfo","statusDisplay","instancesORv4","getInstancesORv4","instancesV4","getORv4ID","identity","ORv4ID","accessToken","originatingURL","flags","email","emailVerified","organizationId","roles","permissions","impersonatedOrganizationId","storage","parse","getItem","err","setItem","loadOrgImpersonationId","localStorage","orgSearchList","query","sort","list","MFAEnabled","combineReducers","session","credentials","featureFlags","namespacedData","idTokenPayload","process","email_verified","sortBy","length","status","enrollmentId","auth","auth0","WebAuth","domain","clientID","redirectUri","audience","responseType","scope","urlParams","URLSearchParams","window","location","search","has","get","client","sso","nonce","options","transactionManager","url","ga","concat","hsfp","hstc","hssc","Promise","resolve","reject","checkSession","authResult","idToken","logout","returnTo","awsToken","signup","connection","password","user_metadata","firstName","firstname","lastName","lastname","login","realm","test","hash","parseHash","publicFields","cachedFlags","userData","mappedFields","anonymous","formatUserData","privateAttrs","pubFields","keys","field","getPrivateAttrsList","identify","allFlags","ldClient","initialize","bootstrap","privateAttributeNames","on","onChangeCallback","off","OWNER","ADMIN","BILLING","METRICS","READONLY","OR_ADMIN","OR_READONLY","OR_SUPERUSER","OR_SUPERREAD","RolesForInvites","label","value","getUserState","getSessionState","getCredentialsState","getTokenExpirationDate","creds","jwt","decode","exp","getTokenStartDate","iat","removeFlagHistory","reduce","newFlags","updatedFlags","val","prototype","hasOwnProperty","call","current","getFeatureFlagsState","stripHistory","createStringSelector","create","getIdentityState","isAuthenticated","expirationDate","Date","now","needsOrganization","needsEmailVerification","ADMINS","isAdmin","some","CUSTOMERADMINS","isCustomerAdmin","BILLINGUSERS","isBillingUser","isOwner","isORv4User","ORV4ADMINS","isORv4Admin","hasV4accessRoles","hasDedicatedAccess","Boolean","org","orv4id","sendEmailVerification","updateSession","destination","analyticsPayload","sub","traits","eventType","EventTypes","eventPayload","logIn","logInSSO","logInAWS","catch","sanitizedError","original","logOut","setSession","subscribeToFeatureFlags","unsubscribeFromFeatureFlags","getFeatureFlags","impersonateOrg","orgId","stopOrgImpersonation","searchOrgs","searchOrgsActionSet","sortOrgsActionSet","sortOrgs","getState","orgs","sliceIndex","match","orderBy","order","desc","a","b","sortOrgsList","startMFASignupFlow","sendMail","user_id","send_mail","startMFASignupFlowActionSet","getMFAStatus","getMFAStatusActionSet","removeMFAEnrollment","removeMFAEnrollmentActionSet","userInviteRoles","isLoadingUsers","invites","getUsersPoll","getUsersState","updateUsersState","orgORv4ID","updateUsersActionSet","deleteUser","deleteUserActionSet","createUserInvite","getUserInvitesState","deleteUserInviteActionSet","inviteId","deleteUserInviteState","resendUserInviteState","getUsersManagementState","usersManagement","cachedUsers","retUser","accessDedicated","invite","inviteTokenValidatedData","inviteAccepted","validateInviteToken","validateInviteTokenActionSet","acceptInvitation","newJwt","needsSignup","new_jwt","acceptInvitationActionSet","acceptInvitationRedirect","getUsersInviteSignupState","usersInviteSignup","companyName","primaryEmail","phoneNumber","billingSetupComplete","billingType","pastInvoices","upcomingInvoices","trialCreditCents","awsCustomer","createOrg","company","phone","createAWSOrg","token","updateOrg","updateOrgActionSet","getOrg","updateStripeSource","sourceId","source_id","createStripeSource","stripeCreateFn","payment","userInfo","owner","successHandler","completeBillingSetup","getUpcomingInvoice","getUpcomingInvoiceActionSet","getPastInvoices","getPastInvoicesActionSet","getOrgState","needsBilling","needsSignUpSteps","userSelectors","awsOnlySelector","orgState","orgORv4IDSelector","isFastlaneCustomerSelector","stripeCustomerId","detail","activeStep","addIpsLater","myip","newInstanceName","newInstanceService","newInstanceVersion","newInstanceRegion","newInstanceFlavorIndex","newInstanceAddons","newInstancePlan","newInstancePlanIndex","newInstanceAcls","price","goToNextStage","event","step","goToPreviousStage","resetSteps","selectService","selectedService","defaultSubtype","defaultCloudProvider","selectServiceSet","selectVersion","target","selectVersionSet","selectRegion","selectRegionSet","enterName","enterNameSet","selectFlavor","defaultPlan","selectFlavorSet","selectPlanSet","planIndex","plans","actualPlanIndex","MAX","plan","selectPlan","enterCidr","enterCidrSet","getIp","getIpClear","enterAclName","enterAclNameSet","selectAclKind","kind","selectAclKindSet","addAcl","addAclSet","removeAcl","removeAclSet","checkAddIpsLater","selectServiceSubtype","selectServiceSubtypeSet","selectProvider","selectProviderSet","properties","instance_name","version","service_subtype","features","num_acls","createInstanceSet","resetCreateInstanceErrorState","getPrice","regionId","addons","planId","addonQuery","addon","join","getPriceActionSet","getPriceDebounced","debounceAction","selectAddon","selectAddonSet","deselectAddon","addonId","deselectAddonSet","ACL_KINDS_BY_SERVICE","Elasticsearch","CockroachDB","PostgreSQL","TimescaleDB","DEFAULT_ACL_KIND","getAclKindsByService","createPlanDisplay","currentService","nodes","isRedis","planNode","mongod","memory","nodeWord","sizeInfo","nodeInfo","getCreateInstanceState","catalogStateSelector","catalogServicesSelector","catalogServiceSubtypesSelector","catalogRegionsSelector","catalogVersionsSelector","versions","catalogCloudProvidersSelector","catalogFlavorsSelector","catalogAddonsSelector","catalogPlansSelector","createFormSelector","formValueSelector","selectedServiceSelector","selectedVersionSelector","selectedCloudProviderSelector","selectedCloudProviderIsBetaSelector","cloudProviderName","maturityLevel","selectedRegionSelector","selectedServiceSubtypeSelector","selectedFlavorSelector","flavorId","catalogFlavors","catalogFlavor","selectedAddonsSelector","addonsById","selectedPlanSelector","catalogPlans","catalogPlan","selectedCidrSelector","cidr","cidrName","enteredNameSelector","selectedServiceIDSelector","serviceName","isServiceBetaSelector","isORv4","theService","selectedServiceSubtypeIDSelector","availableServiceSubtypesSelector","serviceID","subtypes","subtype","availableServiceSubtypesNamesSelector","availableRegionsSelector","serviceSubtypeID","availableRegionsNamesSelector","selectedProvider","organization","isPrivateRegionSelector","selectedRegion","availableCloudProvidersSelector","uniqueProviderNames","versionNamesByServiceSelector","availableFlavorsSelector","selectedRegionName","potentialFlavorIds","availableAddonsSelector","availablePlansSelector","flavorID","availableACLKindsSelector","mongoLicenseWarningNeededSelector","userState","isPrivateRegion","orv4dtcreated","MONGODB_ORG_LICENSE_AGREEMENT_CUTOFF_DATETIME","moment","utc","isAfter","stepOneCompleteSelector","stepTwoCompleteSelector","stepThreeCompleteSelector","cidrAndName","stepFourCompleteSelector","instanceName","availablePlansInfoSelector","availablePlans","availablePlan","planInfoStringSelector","nodeInfoStringSelector","addonInfoStringSelector","addonInfoString","shardWord","selectedRegionIdSelector","createInstanceBodySelector","selectedPlan","selectedAddons","cidrKinds","addonsObject","acc","cur","isNaN","parseInt","aclList","cidrKind","settings","system_userlist","createInstanceForms","aclEntry","newAcl","splice","ip","message","priceInCents","sortVersionsDescending","semverRegex","aVersionName","exec","bVersionName","compareVersions","VALID_SERVICE_NODES","getSize","node","sortPlansAscending","serviceNodeAKey","serviceNodeBKey","sizeA","sizeB","configurations","getServicesActionSet","getServices","getServiceSubtypesActionSet","getServiceSubtypes","getProvidersActionSet","getProviders","getVersionsActionSet","getVersions","getRegionsActionSet","getRegions","getPlansActionSet","getPlans","getFlavorsActionSet","getFlavors","getAddonsActionSet","getAddons","getConfiguration","getConfigurationActionSet","sortedVersions","versionsDescending","sortedPlans","plansAscending","eventName","eventCatagory","AUTOTRACKED_EVENTS","getEventName","eventMap","trackClick","buttonName","trackingAugmentor","store","next","augAction","isAutoTracked","isAutoTrackedPageEvent","hasAnalyticsMeta","defaultEventType","track","trackMeta","newAction","expandAnalyticsMetadata","page","category","getCatagoryName","selectors","source","getGlobalTrackingProps","trackEvent","identifyEvent","createIdentifyPayload","GENERIC_REQUEST_ERROR","ERROR_MAP","history","createBrowserHistory","tracker","createTracker","serializedState","parsedState","decodedToken","loadState","enhancers","middleware","thunk","routerMiddleware","callApi","Authorization","apiMiddleware","additionalProps","formErrors","result","errObj","pgmessage","_error","errors","nonFieldErrors","getFormErrors","errorMsg","variant","from","router","pathname","REACT_APP_FEATURE_STAGING","__REDUX_DEVTOOLS_EXTENSION__","push","composedEnhancers","compose","applyMiddleware","createStore","connectRouter","form","formReducer","plugin","uiState","uiStateReducer","subscribe","saveState","SnackbarNotifier","React","Component","constructor","super","this","displayed","componentDidUpdate","closeSnackbar","IconButton","aria-label","onClick","color","storeDisplayed","render","withSnackbar","connect","bindActionCreators","UnstyledErrorPage","classes","errorStatusCode","customBadRequestError","errorDescription","customError401","errorStatusList","400","image","text","401","403","404","requestError","default","errorStatus","className","container","background","contentContainer","logoContainer","src","logo","alt","imageContainer","rocketContainer","rocket","errorStatusContainer","robot","textContainer","Typography","oops","errorMessage","defaultProps","withStyles","theme","margin","spacing","overflow","backgroundColor","backgroundSize","height","width","animation","transform","position","top","left","padding","display","flexFlow","justifyContent","marginBottom","maxHeight","flex","alignItems","paddingTop","paddingRight","maxWidth","fontFamily","UnstyledErrorBoundaryFallback","ErrorPage","UnstyledSignUpFooter","classnames","root","align","getFullYear","href","rel","marginLeft","customColors","white","textDecoration","roleDisabled","userRoles","InstancesPageRedirect","allowedUserRoles","to","WrappedTextField","input","adornment","touched","invalid","rest","TextField","helperText","InputProps","InputAdornment","UnstyledBusyButton","button","btnClassName","loading","disabled","mini","tooltip","tooltipPlacement","progressSize","thickness","progressClasses","progress","miniFabProgress","fabProgress","nonFabProgress","Tooltip","title","placement","Fab","Button","wrapper","CircularProgress","size","marginTop","validator","hasMinLength","minLength","hasMaxLength","maxLength","isRequired","isAlphanumericUnderscore","isCidr","isAclUnique","isUserUnique","newEmail","email2invite","rules","isEmail","undefined","required","validateCidr","aclItemUnique","minLength10","maxLength20","maxLength128","UnstyledOrgForm","handleOrgCreate","handleOrgCreateSuccess","handleSubmit","pristine","submitSucceeded","submitting","valid","handleFormSubmissionReturn","errProps","hasNonOrganizationError","SubmissionError","onSubmit","Field","component","validate","fullWidth","BusyButton","reduxForm","enableReinitialize","initialValues","OrgForm","UnstyledSignUpProgress","activeStepIndex","iconProps","active","Stepper","Classnames","Step","StepLabel","StepIconProps","orange","fill","UnstyledSignUpTemplate","header","subheader","children","migrated","SignUpProgress","migrationMessage","Fragment","migration","emailSection","subheaderSection","Grid","justify","content","alignContent","lg","md","sm","xs","textAlign","breakpoints","down","fontStyle","lineHeight","fontSize","typography","h6","SignUpTemplate","handleUpdateSession","SignUpTemplateContainer","OrgFormContainer","mapDispatchToProps","userActionCreators","orgActionCreators","OrgInfoPage","UnstyledVerifyEmailForm","handleSendEmailVerification","errorElm","successElm","actionCreators","VerifyEmailForm","support","btn","emailIcon","VerifyEmailFormContainer","OrgRedirect","VerifyEmailRedirect","statusCode","params","LoginRedirect","AuthorizedRoute","userPerms","perms","hasPerm","hasRole","ErrorPageContainer","UnauthorizedPage","fallbackComponent","ConditionalRoute","conditionFn","SignUpRoutes","needsOrg","getRedirect","exact","path","VerifyEmailPage","OrgInfoPageContainer","AuthorizedRouteContainer","UnstyledBanner","voidPosition","handleStopClick","msg","creditValue","DISMISS","BuildBillingBanner","bannerClass","bannerFreeCredit","BuildImpersonationBanner","bannerFreeCreditPlusImper","Paper","bannerImpersonation","style","blockImpersonation","messageImpersonation","tabIndex","rightIcon","onKeyDown","cake","blockFreeCredit","messageFreeCredit","titlesm","toRet","preventDefault","GenOptions","option","teal","zIndex","drawer","borderRadius","marginRight","flexWrap","flexDirection","fontWeight","cursor","up","overflowWrap","paddingLeft","paddingBottom","minWidth","getBannerNotificationsState","Banner","minHeight","flexGrow","footer","flexShrink","banner","SignUpFooter","SignUp","propTypes","PropTypes","arrayOf","string","bool","RBACWrapper","trackButtonClickSet","trackButtonClick","UnstyledSegmentClickTracker","other","outline","SegmentClickTracker","object","flagKey","func","negate","FlagEnabled","UnstyledNavItems","handleNavToggle","createString","List","FlagEnabledContainer","ListItem","NavLink","link","divider","selected","selectedLink","ListItemIcon","icon","ListItemText","primaryTypographyProps","itemTextTypography","Badge","badge","badgeContent","profile","orv4link","mediumGrey","borderBottomColor","drawerPaper","sky","flagSelectors","NavItems","WithSpecifiedTheme","ComposedComponent","ThemeProvider","colors","green","burntYellow","darkBlue","coolBlue","black","darkGrey","lightGrey","coolGrey","darkPurple","darkBrown","lightGreen","magenta","red","peas","peach","khaki","yellow","globalThemeStyles","xl","palette","main","light","dark","secondary","useNextVariants","htmlFontSize","h3","letterSpacing","h4","h5","altTitle","subtitle1","altSubheading","caption","body2","overrides","MuiCardHeader","opacity","MuiInput","underline","borderBottom","MuiButton","MuiFab","darkThemeStyles","paper","suppressDeprecationWarnings","contained","sizeLarge","MuiTypography","colorPrimary","MuiFormLabel","lightThemeStyles","avatar","MuiCardContent","darkTheme","createMuiTheme","lightTheme","mixins","gutters","customLightTheme","UnstyledNav","isOpen","isWidthDown","Drawer","drawerNav","open","onClose","staticNav","withWidth","UnstyledMenu","anchorEl","anchorOrigin","horizontal","vertical","disableAutoFocusItem","getContentAnchorEl","MenuItem","menuItem","profileTextContainer","linkIcon","Divider","UnstyledHeader","onResize","bind","toggleNav","openMenu","closeMenu","componentDidMount","addEventListener","componentWillUnmount","removeEventListener","menuAnchorEl","setUiState","currentTarget","AppBar","navToggle","branding","tagline","menu","menuToggle","persist","orgIndicator","footerLink","show","Authorized","userPermissions","legend","legendIcon","card","verticalAlign","wordWrap","cardHeader","Card","CardHeader","titleTypographyProps","CardContent","perm","AuthorizedContainer","DashboardPage","UnstyledORTypography","customClasses","colorTextPrimary","UnstyledLoadingPlaceholder","intervalInMS","number","actionCreator","Poll","useEffect","intervalId","setInterval","clearInterval","UnstyledORv4Link","noInstances","cardClass","noInstanceCard","theCard","instanceCard","textClass","noInstanceText","instanceText","iconClass","noInstanceLinkIcon","instanceLinkIcon","elevation","cardText","question","border","textTransform","right","alignSelf","ORv4Link","UnstyledORContentHeader","hasDivider","ORTypography","contentArea","robotImage","subtextColor","welcomeText","subText","theButtons","createInstanceButton","buttonLink","orv4Link","textAndButtons","imageArea","robotList","Math","floor","random","RandomRobot","NoInstancesPage","circleStyle","fillRule","clipRule","stroke","strokeWidth","leafStyle","SvgIcon","viewBox","cx","cy","r","d","redisStyle","searchStyle","elephantStyle","cockroachStyle","st0","st1","strokeMiterlimit","st2","st3","st4","st5","rx","ry","styleOne","styleTwo","points","IconMap","mongodb","MongoDBIcon","redis","RedisIcon","elasticsearch","ElasticsearchIcon","postgresql","PostgreSQLIcon","cockroachdb","CockroachDBIcon","timescaledb","TimescaleDBIcon","UnstyledServiceIcon","badgeClass","isAlpha","Icon","DefaultIcon","tooltipText","buildingBadge","failedBadge","PIECHART_COLORS","freeSpaceColor","getPieChartColor","bytesToGB","num","toPercentage","part","whole","makeBarStyles","makeStyles","bar","linearBarRoot","barBackgroundColor","barStyle","LinearProgress","nodeLegend","nameAndUsage","nodeUsage","legendBars","nodeName","spaceUsed","spaceTotal","NodeLinearProgress","nodeid","UnstyledORSpaceUsage","instanceIsReady","instanceService","placeHolderImage","spaceAvailable","isReplicatedService","serviceSpaceAvailable","freeSpace","parseFloat","nodeData","nodeDataAndFreeSpace","serviceTotal","usageContainer","pieContainer","usageText","usedOutOfTotal","pie","enableRadialLabels","innerRadius","enableSlicesLabels","datum","percentUsed","percent","used","legendContainer","ORSpaceUsageLegend","overflowY","allowedAccess","ORSpaceUsageContainer","ORSpaceUsage","ownProps","addOnMap","replicasForHa","UnstyledFeaturesList","addonsList","startCase","toString","handleClickAway","anchor","callback","contains","ACL_KINDS","1","2","4","5","6","7","8","9","10","11","normalizeCidr","addButton","userAccess","theButton","buttonDisabled","UnstyledRocketChip","isSelected","theChip","Chip","onDelete","deleteIcon","chip","chipSelected","orv4Chip","chipRoot","chipUnselectedLabel","chipIcon","chipDeleteIcon","borderColor","chipContainer","aclItemUniqueValidation","formValues","selectedKind","UnstyledAclForm","defaultSelectedKind","change","touch","closePopout","formType","reset","formStatus","aclTitle","serviceCompatibleAcl","roleTextBlurb","defaultChip","find","el","aclKindChips","RocketChip","handleKindClick","clickable","buttonContainer","hover-override","aclButton","ORText","myIPButton","fieldContainer","placeholder","aclInput","normalize","InputLabelProps","shrink","inputLabel","descInput","kindContainer","addButtonContainer","embeddedAddButtonContainer","cancelButton","RBACSubmitButton","addButtonLabel","flexBasis","chipColorPrimary","act2","AclPopoutItem","UnstyledPopoutItem","handleClick","popperId","closeButton","Popper","modifiers","flip","enabled","preventOverflow","boundariesElement","e","stopPropagation","ClickAwayListener","onClickAway","disableReactTree","DialogActions","dialog","bottom","styles","instanceButtonItemContainer","popoutIcon","boxShadow","popoutIconContainer","popoutIconLabel","actionButton","zeroPadding","PopoutItem","AclFormContainer","UnstyledAddUserForm","selectedRole","passwordLength","strength","selectedDatabase","parentDb","isCockroachDB","isMongoDB","messageDictionary","0","3","passwordStrengthCheck","score","zxcvbn","StrengthMessage","strengthMeterText","roleOptions","MongoDB","databaseOptions","noDatabases","newDb","newUser","userInput","onChange","noPasswordNeeded","Fade","in","strengthMeterContainer","barColorPrimary","strengthMeter","FormControl","formControl","InputLabel","Select","labelId","native","select","roleContainer","NoneText","Awful","AwfulText","Weak","WeakText","Mediocre","MediocreText","Good","GoodText","Strong","StrongText","AddUserFormContainer","AddUserForm","instanceSelectors","shape","noLabel","popout","UnstyledUserInstanceButtonItem","UnstyledAddDatabaseForm","databaseName","actionContainer","AddDatabaseForm","AddDatabaseFormContainer","UnstyledAddRegionForm","availableRegions","availableFlavors","plansBySubtype","validPlans","validFlavor","planBySubtype","selectedFlavor","instancePlan","availableFlavorCards","availableFlavor","selectedFlavorCard","flavorCard","popoutPanelDetail","dangerouslySetInnerHTML","__html","description","newInstanceData","buttonText","regionToSelect","keyCode","handleButtonClick","newPlanIndex","prisitine","handleCreateClick","updateButton","progressPrimary","progressSecondary","popoutUpdateButton","displayRegions","displayRegion","selectedRegionCard","regionCard","regionIcon","regionTitle","regionHeader","displayFlavors","displayFlavor","ExpansionPanel","panelRoot","expanded","panelExpanded","ExpansionPanelSummary","expandIcon","panelSummaryRoot","panelSummaryContent","panelSummaryExpanded","panelSumaryExpandIcon","ExpansionPanelDetails","panelDetail","groupTitle","popoutGroupTitle","Hidden","mdUp","popoutTitle","planSectionHeader","sliderStuff","sliderButtonContainer","removeButtonRoot","sizeDisplayRoot","popoutSizeDisplayRoot","addButtonRoot","updateButtonContainer","popoutUpdateButtonContainer","updateButtonProgressContainer","popoutUpdateButtonProgressContainer","theForm","clear","usedRegionCard","listStyleType","nodeLabel","catalogSelectors","AddRegionForm","regionsUnavailable","AddRegionFormContainer","UnstyledInstanceItem","dtCreated","dtModified","shortId","serviceMaturity","getTotalSpace","statusColor","statusTextColor","serviceStatus","ready","textReady","failed","textFailed","building","textBuilding","allowedUserRolesInstanceDetail","panel","TransitionProps","unmountOnExit","summaryRoot","summaryContent","sumamryExpanded","focused","summaryFocused","IconButtonProps","expandIconButton","summary","flexContainer","ServiceIcon","serviceIcon","instanceInfo","productInfo","actionArea","SERVICES_WITH_DATABASES","DatabaseInstanceButtonItem","SERVICES_WITH_USERS","UserInstanceButtonItem","AclInstanceButtonItem","RegionInstanceButtonItem","charContainer","detailsListContainer","detailsListInfoContainer","detailsListIcon","detailsListLocationContainer","detailsListLocation","detailsListSize","detailsListSizeParenthesis","detailsList","detailsListReadyState","format","FeaturesList","detailContainer","connectionUri","featureDetailLink","spacer","split","featureButtonIcon","moreDetailsButton","detailLink","summaryExpanded","whiteSpace","wordBreak","borderTop","gridTemplateColumns","gridGap","gridTemplateAreas","gridArea","justifySelf","kibanaButton","cerebroButton","cockroachdb_adminButton","instancesSelectors","InstanceItem","orv4Color","lastColumn","goORv4","InstanceItemORv4","maturity","catalogService","instancesBuilder","instancesORv5","crdbIds","serviceMap","Redis","instancesByService","InstanceItemORv4Container","instanceORv4ListBuilder","crdbs","InstanceItemContainer","instanceORv5ListBuilder","crdbId","secondaryHeader","crdb","instancesListWithHeadings","instanceComponent","instancesState","cockroachdbMultiInstanceIDs","orv5instances","ORContentHeader","ORContentArea","NoInstancesPageContainer","InstancesPageContainer","getInstancesFromORv4","InstancesPage","selectorORv4","StripeInput","inputRef","defaultValue","onKeyUp","readOnly","autoComplete","autoFocus","rows","useTheme","useState","mountNode","setMountNode","useImperativeHandle","focus","onReady","UnstyledStripeInputWrapper","resetAfterChangeHandler","blurHandler","focusHandler","readyHandler","fieldChangeHandler","prevProps","stripeElm","shouldReset","stripeElmChanged","shouldResetChanged","onReset","elm","obj","empty","complete","base","showPlaceholderLabel","needsIncompleteError","errMsg","indentedLabel","OutlinedInput","notched","notchedOutline","inputComponent","onBlur","onFocus","inputProps","CardElement","FormHelperText","withTheme","UnstyledBillingForm","onStripeSubmit","onStripeSuccess","onSuccess","allowMultipleSubmissions","buttonProps","stripe","asyncValidate","successMessage","innerText","screen","LoadingPlaceholder","createSource","hidden","StripeInputWrapper","submit","formConfig","destroyOnUnmount","shouldAsyncValidate","trigger","fields","onSubmitFail","injectedForm","injectStripe","withRef","visibility","fieldWrapper","createFieldWrapper","BillingForm","BillingFormWrapper","font","cssSrc","BillingFormContainer","UnstyledBillingPage","billingOpen","redirectToInstances","priceDifference","priceString","smDown","cakeIcon","mobileCakeIcon","creditCalculation","mobileCreditText","mobilePriceText","creditText","priceText","noTrialCreditsText","nonOwnerContent","DialogContent","billingDialogContent","fineText","billingDialog","billingCancelButton","DialogTitle","billingDialogTitle","billingDialogAppBar","Tabs","indicatorColor","billingDialogTabs","Tab","billingSubmitButton","billingDialogForm","supportLink","orgSelectors","BillingPage","nameField","chipSectionLabel","widgetButtonLabel","selectionContainer","selectionFormRoot","selectionFormRootSubText","selectRoot","serviceChipContainer","columnGap","rowGap","selectedServiceSubtype","infoBox","borderLeft","cloudAndServiceContainer","cloudContainer","listItemRoot","listItemIconRoot","listBullet","validRegions","isStateEmpty","currentVersions","catalogVersion","regionOptions","currentRegion","currentSubtypes","isRedisInCatalog","orv4Chips","orv4Service","serviceChips","catalogServiceSubtype","clickService","allServiceChips","serviceSubtypeChips","toUpperCase","visibleCloudProviders","cloudProviderChips","catalogCloudProvider","orv4CloudProvider","servicesContainer","typeContainer","SelectProps","displayEmpty","requestSource","instanceVersion","instanceCloudProvider","requestType","chatlioWidget","_chatlio","isShown","hide","configure","offlineGreeting","offlineMessagePlaceholder","handleWidgetClick","StepOne","priceNeedsUpdating","addonCard","addonCardSelectionIndicator","addonCardSelectionMenuIcon","addonMenuItem","addonCardHeader","addonCardText","priceInfo","handleCardIconClick","addonName","addonValue","handleClose","handleMenuItemClick","createMenu","valueObject","range","Number","minimum","maximum","reverse","enum","newAddon","is-selected","addonCards","menuId","addonCardTextSection","displayName","transformOrigin","keepMounted","AddonCards","priceInitialized","planContainer","cardStuff","flavorSection","addonSection","cardContainer","flavorPanel","panelSummary","planHeader","sliderRoot","sliderTrack","nodesAndInfo","nodeGrid","nodeRoot","primaryNode","secondaryNode","contactSupportText","widgetContainer","sliderComponent","validFlavors","addonsByServiceSubtype","hasAddons","panelChanger","currentPlan","flavorPanels","dbtype","selectedPlanStorage","storageSize","selectedPlanMemory","separator","addonspresent","UnstyledStepThree","hasOpenAcl","isTrue","primaryText","secondaryText","aclListItems","disableTypography","ListItemSecondaryAction","listItemDeleteRoot","tempMyip","aclContainer","aclFormItem","ipButtonsItem","ipButtonsContainer","ipButtonRoot","ipWildcard","or","aclFormField","chipInstructionsRoot","kindField","addButtonText","downArrow","rightArrow","aclListItem","openAclWarning","addLater","FormControlLabel","aclLaterLabelRoot","control","Checkbox","checked","aclWarning","asterisk","Price","rocketLine","rocketImage","transition","rocketProgressStepTwo","rocketProgressStepThree","thisStep","rocketImageClasses","UnstyledOverviewStep","isComplete","thisClasses","check","checkActive","checkInactive","stepTitle","UnstyledRocketOverview","instanceRegion","instanceProvider","instanceAcls","isValid","instanceType","supportLevelName","isStepComplete","instanceData","discount","discountCalculation","promotionalTextBuilder","additionalText","promotionalText","promotionalTextDetail","promoIcon","arrow","infoIcon","discountText","pricingSupportText","supportTextContainer","supportText","priceInformation","totalRow","promoAndPriceContainer","totalRowWithPromo","totalLabel","totalPerMonthLabel","showWhenSmall","square","resetContainer","RocketProgress","showWhenBig","summaryCaption","OverviewStep","summaryItems","flavorName","actionsContainer","actionRow","nextButton","BillingPageContainer","onlySteps","connectorBasic","stepCheck","stepCheckInactive","stepCheckActive","UnstyledCreateInstancePage","isMobile","mobileStepText","steps","connector","StepConnector","line","selectedNewInstanceRegionId","newInstanceAddonsObject","curr","newInstanceAddon","submitButton","classname","createButton","stepButton","getActionButtons","classType","bottomPage","backButton","stepButtonLabel","goto","stepperContainer","orientation","stepperRoot","stepContainer","stepLabel","StepContent","stepContentContainer","StepTwo","StepThree","RocketOverview","rocketOverview","unit","clickTrackerActionCreators","createInstanceSelectors","CreateInstancePage","useStyles","gridAutoColumns","theX","monthlyCostEstimate","content_header","content_detail","content_beta_warning","content_beta_warning_link","billingContent","priceContainer","additionalPriceText","removePromo","betaText","UnstyledSummaryDrawer","isServiceBeta","selectedVersion","selectedCloudProvider","selectedCloudProviderIsBeta","selectedCidr","enteredName","toggle","availableAddons","planInfoString","nodeInfoString","isFastlaneCustomer","rg","findIndex","ap","pricingAddons","selectedAddon","ao","availAddon","drawerContainer","SummaryDrawer","UnstyledORTooltip","serviceSelector","versionMenuButton","versionMenuButtonLabel","launchButton","FoundationDB","UnstyledServiceSelector","versionNamesByService","orgIsAwsOnly","setAnchorEl","currentVersionDisplay","setCurrentVersionDisplay","versionMenuItems","textContent","getAttribute","actionIcon","selectedClass","ORTooltip","updateUnregisteredFields","keepDirty","forceUnregisterOnUnmount","createSelectors","ServiceSelector","selectElement","WrappedSelectField","labelString","htmlFor","autoWidth","MenuProps","regionMenuItem","regionMenuIcon","privateRegionAsterisk","cloudMenuItem","UnstyledFormSelect","availableCloudProviders","availableServiceSubtypesNames","availableRegionsNames","isDisabled","handleCloudClick","menuLabel","rackspaceCloudLink","cloudList","regionList","ListItemClasses","typeList","listMap","FormSelect","serviceSelectionSectionLabel","serviceSelectorsContainer","selectField","privateRegionText","regionInfoIconContainer","regionInfoIcon","regionInfoText","UnstyledStepOne","catalogServiceNames","servicesAlsoInORv4","serviceSelectors","listStyle","float","UnstyledFlavorSelector","FlavorSelector","addonSelector","addonDescription","valueMenuButton","valueMenuButtonLabel","REQUIRED_MONGODB_ADDONS","REQUIRED_MONGODB_ADDONS_NOT_SELECTED","UnstyledAddonSelector","toggleIsSelected","currentAddonDisplayIndex","setCurrentAddonDisplayIndex","addonValueArray","getPossibleValues","hasAddonValues","selectedValue","addonMenuItems","retObj","UnstyledPlanSelect","availablePlansInfo","planList","availablePlanInfo","x","UnstyledPlanSelector","stepSection","sectionLabel","flavorSelectorContainer","flavorSelector","planSelector","planInfo","mongoServiceType","setMongoServiceType","af","flavorSelectors","FlavorSelectorContainer","addonSelectors","AddonSelector","isMongo","showAddons","PlanSelectorContainer","howText","stepThreeForm","stepThreeField","infoText","availableAclKinds","aclKind","stepFourField","createContainer","headerContainer","stepper","stepButtonIcon","theArrow","summaryButton","stepActionButton","busyButtonWrapperAndButton","monthlyCost","estimate","mobileStepperContainer","mobileHeaderContainer","mobileStepper","mobileProgressBar","getStepContent","StepTwoContainer","StepThreeContainer","StepFour","catalogIsLoading","createIsLoading","stepOneComplete","stepTwoComplete","stepThreeComplete","stepFourComplete","createInstanceBody","mongoLicenseWarningNeeded","destroy","stepsComplete","setActiveStep","mongoWarningOpen","setMongoWarningOpen","innerWidth","summaryOpen","setSummaryOpen","setBillingOpen","isLastStep","trackStep","toggleSummary","prevSummaryOpen","newSummaryOpen","handleReset","advanceButtonText","advanceButtonAction","prevActiveStep","Dialog","StepButton","completed","maxLength16","UnStyledApiTokenForm","onTokenCreate","ApiTokenForm","ContentCopyIcon","copySuccess","svg","copyString","copyStyles","checkColor","document","queryCommandSupported","tempInput","createElement","appendChild","execCommand","removeChild","setTimeout","UnstyledMoreLessString","lessChars","more","displayString","break","UnStyledApiTokenItem","onTokenDelete","col","apikey","MoreLessString","CopyToClipboard","trash","only","ApiTokenItem","UnstyledApiTokenCard","tokenState","apitoken","ApiTokenFormContainer","ApiTokenCardContainer","ApiTokenCard","UnstyledCollapsibleCard","headerProps","defaultExpanded","summaryBorder","UnstyledProfileCard","CollapsibleCard","cardSubheader","subheaderTypographyProps","disableUnderline","ProfileCard","UnstyledOrganizationCard","addressFieldContainer","streetAddress","street","suite","stateAndZip","IconComponent","KeyboardArrowDown","disabledSelectText","zip","OrganizationCard","gridAutoFlow","profileCard","orgCard","apiCard","ProfileCardContainer","OrganizationCardContainer","UnstyledBillingCard","blurb","billingForm","betaBlurb","BillingCard","UnstyledTablePaginationActions","count","rowsPerPage","onChangePage","handlePageButtonClick","newPage","selectedStyle","ceil","pageButton","formatDateRange","date","prevDateMonth","dateArray","dateYear","substring","dateMonth","dateDay","padStart","fileDownload","invoiceInfo","paid","pastDue","checkmarkRoot","notificationRoot","estimateRoot","statusMsg","tableCellRoot","total","dates","statusClass","TableRow","TableCell","UnstyledInvoiceCard","invoices","invoiceRows","invoice","InvoiceItem","paidStatus","amountDueCents","invoiceTable","Table","TableBody","TableFooter","TablePagination","paginationRoot","paginationSpacer","paginationCaption","paginationInput","toolbar","paginationToolbar","colSpan","ActionsComponent","TablePaginationActions","noInvoiceMsg","pageButtonStyles","UnstyledInvoiceCardContainer","InvoiceCard","UnstyledPromotionItem","add","currentDate","expired","trialCreditDollars","infoCellRoot","discountInfo","expiration","noPaymentCellRoot","noPaymentMsg","noPaymentContainer","promotion","promotionExpired","table","PromotionItem","PromotionCard","leftCol","rightCol","BillingCardContainer","PromotionCardContainer","InvoiceCardContainer","securityTextContainer","securityText","securitySubtext","dialogText","dialogButton","confirmButton","handleConfirm","switchText","switchContainer","Switch","MFACard","profileTabSelectionValue","profileTabsBar","tabDivider","tabsIndicator","tabsFlexContainer","currentDisplayedTab","PersonalInfoTab","SecurityTab","BillingTab","scrollButtons","indicator","ProfilePageContainer","ProfilePage","UnstyledDetailOverview","storageEngine","featureButtonContainer","showPasswordIcon","passwordIsShowing","setPasswordIsShowing","handleEyePoke","ShowPasswordIcon","hostContainer","hostRole","connectionStringContainer","connectionStringText","connectionString","copyButton","data-lookup","endAdornment","warningContainer","warning","filename","disableFocusRipple","disableRipple","element","download","file","Blob","URL","createObjectURL","click","CADownloadLink","createCertificateTableCells","clientCertificates","clientCertificate","isCertInvalid","certCellText","certCellIcon","certCellClass","certCellInvalid","certCellValid","tableRow","userCellRoot","certCellRoot","UnstyledCRCAMgmt","deleteDialogOpen","rotateLoading","downloadLoading","deleteLoading","showCADownloadButton","primaryCA","secondaryCA","primaryClientCertCells","secondaryClientCertCells","secondaryHasUsers","userCount","userCountPlural","handleDownloadClick","handleDeleteClick","deleteCertDialog","dialogContent","createCertForm","certFormContainer","certFormTitle","formattedCSR","multiline","certFormButton","caButton","headerSection","headerText","headerTitle","info","headerAction","rotateButton","certificateSection","certificateTitle","certTable","primaryCertActions","downloadButton","buttonRef","iconContainer","iconLabel","secondaryCertActions","deleteButtonWrapper","CRCAMgmt","UnstyledConnectTab","pageContainer","ConnectItem","ConnectWarning","caContainer","CRCAMgmtContainer","CADownloadLinkContainer","ConnectTabContainer","ConnectTab","UnstyledRBACDeleteButton","invalidField","formattedButton","hoverOverride","data-testid","clearButton","UnstyledFormToggleButton","openForm","setRef","UnstyledORTable","borderCollapse","UnstyledUserList","certs","mobileUserCells","ca","cert","clientCA","findCA","clientCert","cc","validity","ct","caCertificate","mobileCertIcon","validityText","mobileCertCell","caTypeText","caType","addUserForm","addUserFormButton","FormToggleButton","embeddedAddUserForm","embeddedFormContainer","defaultUsersFilter","systemUser","defaultUserText","usernameText","defaultUserList","nonDefaultUserList","defaultUserItems","userItems","RBACDeleteButton","handDeleteClick","userTable","tableWrapper","ORTable","listContainer","addUserButtonContainer","addUserButtonWrapper","mobileErrorCertCell","certCell","errorCertCell","certIcon","userlistHeader","headerIcon","UserListContainer","UserList","UnstyledUsersTab","instanceToDelete","dangerCard","dangerCardContent","dangerText","deleteButtonContainer","deleteButton","makeSquared","updateInstanceToDelete","listContent","catalogConfigurations","addConfig","restartRequired","UnstyledSettingsRowItem","keyName","keyValue","catalogItem","deleteConfig","restart","row","cellLeft","configKeyText","restartStarTitle","cellMiddle","cfg","fieldDataType","cellRight","fixCase","filterCfg","config","allowConfig","UnstyledConfigSection","instanceSettings","getCatalogConfiguration","newConfig","activeSettings","datastoreConfigurations","oldAndNewSettings","filteredUnusedCatalogConfig","instanceConfig","tempInstanceConfig","removeUsedItems","save","items2save","tempData","temp","subtitleWithStar","subHeader","configurationArea","SettingsDropDown","tableContent","TableContainer","SettingsRowItem","Collapse","timeout","CardActions","ac","ConfigSection","UnstyledSettingsTab","DeleteSection","UnstyledORAlert","onCancel","onOk","DialogContentText","embeddedAclFormContainer","ipButtonContainer","deleteConfirmationOpen","setDeleteConfirmationOpen","aclToDelete","setAclToDelete","aclForm","aclFormButton","embeddedAclForm","aclRows","handleDeleteButtonClick","aclTable","TableHead","ORAlert","AclList","UnstyledAclTab","AclListContainer","deleteConfirmationDialogOpen","databaseToDelete","tooltipContainer","dbName","dbDetails","tableCellRootIcon","addDatabaseButtonContainer","addFormButtonContainer","addDatabaseForm","addDatabaseFormButton","embeddedAddDatabaseForm","boldText","databaseItems","collections","objects","indexes","indexSize","dataSize","avgObjSize","fsTotalSize","handleDeleteConfirmation","databaseTable","addDatabaseButtonWrapper","DatabaseList","UnstyledDatabasesTab","DatabaseListContainer","UnstyledBackupList","noBackups","emptyBackupsMsg","notificationText","successText","backupItems","backup","start","end","mongoDbPitrBanner","pitrNotificationText","lastSnapshotTimeStamp","lastPitrChunkTimeStamp","mongoDbPitrBackupInfo","pitrStatus","warningText","criticalText","unknownText","backupTabPitrInfo","tableHeader","gray","BackupListContainer","BackupList","UnstyledBackupsTab","SERVICES_WITH_NODE_SCALING","dedicated_master","minQuantity","maxQuantity","secondaryListRoot","listGutters","listRoot","languageIcon","rowRoot","nameText","regionText","storageText","textMobile","desiredQuantity","setDesiredQuantity","setRole","newQuantity","newRole","renderTooltipText","determineInvalidDeleteField","nodeListItemsMobile","invalidDeleteField","nodeListItems","UnstyledNodesTab","physicalHosts","selectedHost","selectHost","displayHost","toggleDisplayHost","selectedNodeQuantity","selectNodeQuantity","showDedicatedMasterOption","displayHosts","addNodeQuantityOptions","defaultAddNodeMenuOption","dedicatedMasterOption","hostOptions","displayText","word","charAt","validHost","selectedHostMaxQuantity","desiredPerNodeMemoryMb","desiredPerNodeDiskSizeGb","titleContainer","nodeContainer","nodePanel","onOpen","ExpandMoreIcon","textPanel","reducer","accumulator","currentValue","filteredNodesSpaceUsage","NodeList","nodeActionButton","billingTextContent","regionTabs","selectedTab","linearLegend","nodeNumber","chartContainer","chart","chartLegend","usageBar","linearBar","borderBottomRightRadius","borderBottomLeftRadius","NodesTab","relatedBorder","relatedContentContainer","relatedSectionHeader","instanceItemContainer","associatedCockroachDBInstancesItems","associatedCockroachDBInstance","catalogProp","RegionsTab","tabSelectionValue","tabsContainer","detailsTab","firewallTab","disabledTab","noTab","detailArea","tabsRoot","tabSelected","labelIcon","InstanceDetailContainer","InstanceDetail","searchField","searchButton","searchIcon","formContainer","searchResultsText","searchResultsTextContainer","handleChangePage","wrappedIcon","adornmentObject","sortOptions","searchResults","OrgImpersonationForm","orgImpersonationContainer","orgImpersonationArea","tableTextContainer","tableIcon","tableScroll","impersonateButton","orgCell","orgDataContainer","impersonateButtonContainer","orgActionButton","orgList","thisOrg","OrgImpersonationPage","userUniqueValidation","isUserUniqueValidation","UnstyledInviteUserCardForm","inputForm","expand","transitions","duration","shortest","expandOpen","textOverflow","actions","InviteUserCardForm","userInviteCardOpen","addUserHeader","capitalize","redVerbiage","pendingVerbiage","resendButton","tempRole","isExpired","autoCapitalize","InviteUserCard","UnstyledUserActionsMenu","handleConfirmDelete","userORv4ID","roleIsDisabled","canAccessDedicated","grantSwitch","lockIcon","usersManagementActionCreators","UserActionsMenu","RenderCheckbox","UnstyledUserCardForm","updateUser","getUsers","actingUserId","confirmDeleteOpen","moreIconRoot","ssoUsername","moreContainer","handleDelete","confirmDeleteButton","emailInput","checkBoxContainer","userCardFormOpen","popover","UserCardForm","loaded","widgetsArea","cards","spinner","deleteFlag","resetFlag","UsersPage","MissionCtrlRoutes","CreateInstancePageContainer","CreateInstancePageContainer2","DashboardPageContainer","UsersPageContainer","OrgImpersonationPageContainer","UnstyledMissionCtrl","headerClass","navClass","nav","contentClass","headerPlusCredBanner","navPlusCredBanner","contentPlusCredBanner","headerPlusImpBanner","navPlusImpBanner","contentPlusImpBanner","headerPlusImpCredBanner","navPlusImpCredBanner","contentPlusImpCredBanner","missionCtrlWrapper","Header","Nav","Footer","appBar","credBanner","impBanner","modal","MissionCtrl","passwordLock","terms","hasEight","hasLowercase","hasUppercase","hasNumsSpecialChars","acceptInviteButton","textBlobContainer","acceptText","verifyText","inviteText","termsCheckbox","termsCheckboxControl","checkLowercase","checkUppercase","checkNumbers","checkSpecialChars","admin","isExistingUserWithoutOrg","UserInvitationSignupContainer","UserInvitationSignup","UnstyledAwsSignupPage","checkHasEight","checkHasUppercase","checkHasLowercase","checkHasNumsSpecialChars","validPassword","setValidPassword","selectTerms","code","altText","fieldIcon","wrappedEmailIcon","wrappedPasswordIcon","wrappedPersonIcon","orangeText","createLoginText","formHeader","formHeaderText","passwordRequirementText","errorTextHeader","errorText","checkboxContainer","termsLinkText","borderTopLeftRadius","AwsSignupPage","LoginPage","logInHandler","LogoutPage","logOutHandler","any","FlagVariation","previous","AboutPage","FlagVariationContainer","UpdateSessionPage","updateSessionHandler","SessionLoaderPage","setSessionHandler","cols","OrganizationPage","LoginRaxSsoPage","PublicRoutes","LoginPageContainer","LogoutPageContainer","UpdateSessionContainer","SessionLoaderPageContainer","OrganizationPageContainer","AwsSignupPageContainer","SignUpRedirect","Routes","additionalRoute","MissionCtrlContainer","SignUpContainer","FeatureFlags","getFlagsHandler","shouldComponentUpdate","nextProps","unsubscribeHandler","UpdateSession","startDate","running","newState","calculateAndSetInterval","updateTime","getIntervalInMilliseconds","getTime","sessionStart","sessionExpiration","sessionInterval","setState","jss","plugins","jssPreset","generateClassName","createGenerateClassName","UnstyledApp","onUserDataLoaded","routes","RoutesContainer","FeatureFlagsContainer","apiKey","StylesProvider","FallbackComponent","ErrorBoundaryFallback","maxSnack","variantSuccess","success","variantError","CssBaseline","html","catalogActionCreators","App","querySelector","AppContainer"],"mappings":"ijYAKaA,EAAmB,mBACnBC,EAAoB,oBACpBC,EAAsB,sBACtBC,EAAsB,sBAEtBC,EAAoC,oCAEpCC,EAA4B,4BAC5BC,EAA+B,+BAC/BC,EAA8B,8BAC9BC,EAAkB,kBAClBC,EAAyB,yBACzBC,EAAkC,kCAClCC,EAAgC,gCAChCC,EAAgC,gCAChCC,EAA2B,2BAC3BC,EAAyB,yBACzBC,EAAyB,yBACzBC,EAAkC,kCAClCC,EAAgC,gCAChCC,EAAgC,gCAChCC,GAAqB,qBAGrBC,GAAuB,uBACvBC,GAAqB,qBACrBC,GAAqB,qBACrBC,GAAuB,uBACv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qE,OAAQ,QAEV31B,KAAM,CACJ21B,OAAQ,QAEV,QAAS,CACPA,OAAQ,SAGZ4qE,QAAS,CACP9qE,gBAAiB,qBACjB7C,MAAO,oBAET1xB,MAAO,CACL0xB,MAAO,uBAIIwC,CAAmBwqE,ICtI5BrgE,GAAqB,CACzB1iB,OAAQkjB,EAAeljB,OACvBoP,YAAa00E,EAAsB10E,YACnCE,mBAAoBw0E,EAAsBx0E,mBAC1CE,aAAcs0E,EAAsBt0E,aACpCE,YAAao0E,EAAsBp0E,YACnCE,WAAYk0E,EAAsBl0E,WAClCE,SAAUg0E,EAAsBh0E,SAChCE,WAAY8zE,EAAsB9zE,WAClCE,UAAW4zE,EAAsB5zE,WAGpBiG,sBArBUh0B,IAAD,CACtBuW,gBAAiBwI,EAAcxI,gBAAgBvW,GAC/C4W,uBAAwBmI,EAAcnI,uBAAuB5W,GAC7D2W,kBAAmBoI,EAAcpI,kBAAkB3W,GACnD6e,aAAcm4C,EAAan4C,aAAa7e,GACxCkN,KAAM6R,EAAczI,iBAAiBtW,GACrC2X,IAAKq/C,EAAap4C,YAAY5e,MAeQugC,GAAzBvM,CAA6C4tE,ICXtD9gF,I,QAASgyD,SAAS+uB,cAAc,UAEtC/tE,iBACE,cAAC,WAAD,CAAUhF,MAAOA,GAAjB,SACE,cAAC,IAAD,CAAiBsB,QAASA,GAA1B,SACE,cAAC0xE,GAAD,QAGJhhF,K","file":"static/js/main.6cfaff6a.chunk.js","sourcesContent":["/**\n * All actions for the app, roughly divided by Dux\n */\n\n// User-related actions\nexport const LOG_IN_REQUESTED = 'LOG_IN_REQUESTED';\nexport const LOG_OUT_REQUESTED = 'LOG_OUT_REQUESTED';\nexport const SET_SESSION_SUCCESS = 'SET_SESSION_SUCCESS';\nexport const SET_SESSION_FAILURE = 'SET_SESSION_FAILURE';\nexport const CREATE_EMAIL_VERIFICATION_REQUESTED = 'CREATE_EMAIL_VERIFICATION_REQUESTED';\nexport const CREATE_EMAIL_VERIFICATION_SUCCESS = 'CREATE_EMAIL_VERIFICATION_SUCCESS';\nexport const CREATE_EMAIL_VERIFICATION_FAILURE = 'CREATE_EMAIL_VERIFICATION_FAILURE';\nexport const GET_FEATURE_FLAGS_SUCCESS = 'GET_FEATURE_FLAGS_SUCCESS';\nexport const UPDATE_FEATURE_FLAGS_SUCCESS = 'UPDATE_FEATURE_FLAGS_SUCCESS';\nexport const GET_FEATURE_FLAGS_REQUESTED = 'GET_FEATURE_FLAGS_REQUESTED';\nexport const IMPERSONATE_ORG = 'IMPERSONATE_ORG';\nexport const STOP_ORG_IMPERSONATION = 'STOP_ORG_IMPERSONATION';\nexport const START_MFA_SIGNUP_FLOW_REQUESTED = 'START_MFA_SIGNUP_FLOW_REQUESTED';\nexport const START_MFA_SIGNUP_FLOW_SUCCESS = 'START_MFA_SIGNUP_FLOW_SUCCESS';\nexport const START_MFA_SIGNUP_FLOW_FAILURE = 'START_MFA_SIGNUP_FLOW_FAILURE';\nexport const GET_MFA_STATUS_REQUESTED = 'GET_MFA_STATUS_REQUESTED';\nexport const GET_MFA_STATUS_SUCCESS = 'GET_MFA_STATUS_SUCCESS';\nexport const GET_MFA_STATUS_FAILURE = 'GET_MFA_STATUS_FAILURE';\nexport const REMOVE_MFA_ENROLLMENT_REQUESTED = 'REMOVE_MFA_ENROLLMENT_REQUESTED';\nexport const REMOVE_MFA_ENROLLMENT_SUCCESS = 'REMOVE_MFA_ENROLLMENT_SUCCESS';\nexport const REMOVE_MFA_ENROLLMENT_FAILURE = 'REMOVE_MFA_ENROLLMENT_FAILURE';\nexport const AWS_SIGNUP_FAILURE = 'AWS_SIGNUP_FAILURE';\n\n// Organization-related actions\nexport const CREATE_ORG_REQUESTED = 'CREATE_ORG_REQUESTED';\nexport const CREATE_ORG_SUCCESS = 'CREATE_ORG_SUCCESS';\nexport const CREATE_ORG_FAILURE = 'CREATE_ORG_FAILURE';\nexport const UPDATE_ORG_REQUESTED = 'UPDATE_ORG_REQUESTED';\nexport const UPDATE_ORG_SUCCESS = 'UPDATE_ORG_SUCCESS';\nexport const UPDATE_ORG_FAILURE = 'UPDATE_ORG_FAILURE';\nexport const GET_ORG_REQUESTED = 'GET_ORG_REQUESTED';\nexport const GET_ORG_SUCCESS = 'GET_ORG_SUCCESS';\nexport const GET_ORG_FAILURE = 'GET_ORG_FAILURE';\nexport const SEARCH_ORGS_REQUESTED = 'SEARCH_ORGS_REQUESTED';\nexport const SEARCH_ORGS_SUCCESS = 'SEARCH_ORGS_SUCCESS';\nexport const SEARCH_ORGS_FAILURE = 'SEARCH_ORGS_FAILURE';\nexport const SORT_ORGS = 'SORT_ORGS';\nexport const CREATE_AWS_ORG_REQUESTED = 'CREATE_AWS_ORG_REQUESTED';\nexport const CREATE_AWS_ORG_SUCCESS = 'CREATE_AWS_ORG_SUCCESS';\nexport const CREATE_AWS_ORG_FAILURE = 'CREATE_AWS_ORG_FAILURE';\n\nexport const CREATE_STRIPE_SOURCE_REQUESTED = 'CREATE_STRIPE_SOURCE_REQUESTED';\nexport const CREATE_STRIPE_SOURCE_SUCCESS = 'CREATE_STRIPE_SOURCE_SUCCESS';\nexport const CREATE_STRIPE_SOURCE_FAILURE = 'CREATE_STRIPE_SOURCE_FAILURE';\nexport const UPDATE_STRIPE_SOURCE_REQUESTED = 'UPDATE_STRIPE_SOURCE_REQUESTED';\nexport const UPDATE_STRIPE_SOURCE_SUCCESS = 'UPDATE_STRIPE_SOURCE_SUCCESS';\nexport const UPDATE_STRIPE_SOURCE_FAILURE = 'UPDATE_STRIPE_SOURCE_FAILURE';\nexport const BILLING_SETUP_COMPLETED = 'BILLING_SETUP_COMPLETED';\nexport const GET_UPCOMING_INVOICE_REQUESTED = 'GET_UPCOMING_INVOICE_REQUESTED';\nexport const GET_UPCOMING_INVOICE_SUCCESS = 'GET_UPCOMING_INVOICE_SUCCESS';\nexport const GET_UPCOMING_INVOICE_FAILURE = 'GET_UPCOMING_INVOICE_FAILURE';\nexport const GET_PAST_INVOICES_REQUESTED = 'GET_PAST_INVOICES_REQUESTED';\nexport const GET_PAST_INVOICES_SUCCESS = 'GET_PAST_INVOICES_SUCCESS';\nexport const GET_PAST_INVOICES_FAILURE = 'GET_PAST_INVOICES_FAILURE';\n\n// Token-related actions\nexport const CREATE_TOKEN_REQUESTED = 'CREATE_TOKEN_REQUESTED';\nexport const CREATE_TOKEN_SUCCESS = 'CREATE_TOKEN_SUCCESS';\nexport const CREATE_TOKEN_FAILURE = 'CREATE_TOKEN_FAILURE';\nexport const GET_TOKENS_REQUESTED = 'GET_TOKENS_REQUESTED';\nexport const GET_TOKENS_FAILURE = 'GET_TOKENS_FAILURE';\nexport const GET_TOKENS_SUCCESS = 'GET_TOKENS_SUCCESS';\nexport const DELETE_TOKEN_REQUESTED = 'DELETE_TOKEN_REQUESTED';\nexport const DELETE_TOKEN_FAILURE = 'DELETE_TOKEN_FAILURE';\nexport const DELETE_TOKEN_SUCCESS = 'DELETE_TOKEN_SUCCESS';\n\n// Instances-related actions\nexport const GET_INSTANCES_REQUESTED = 'GET_INSTANCES_REQUESTED';\nexport const GET_INSTANCES_POLL = 'GET_INSTANCES_POLL';\nexport const GET_INSTANCES_FAILURE = 'GET_INSTANCES_FAILURE';\nexport const GET_INSTANCES_SUCCESS = 'GET_INSTANCES_SUCCESS';\n\n// Instance-related actions\nexport const GET_INSTANCE_REQUESTED = 'GET_INSTANCE_REQUESTED';\nexport const GET_INSTANCE_POLL = 'GET_INSTANCE_POLL';\nexport const GET_INSTANCE_FAILURE = 'GET_INSTANCE_FAILURE';\nexport const GET_INSTANCE_SUCCESS = 'GET_INSTANCE_SUCCESS';\nexport const GET_INSTANCE_WITH_PASSWORD_REQUESTED = 'GET_INSTANCE_WITH_PASSWORD_REQUESTED';\nexport const GET_INSTANCE_WITH_PASSWORD_SUCCESS = 'GET_INSTANCE_WITH_PASSWORD_SUCCESS';\nexport const GET_INSTANCE_WITH_PASSWORD_FAILURE = 'GET_INSTANCE_WITH_PASSWORD_FAILURE';\nexport const CHANGE_TAB_SELECTION = 'CHANGE_TAB_SELECTION';\nexport const ADD_INSTANCE_ACL_REQUESTED = 'ADD_INSTANCE_ACL_REQUESTED';\nexport const ADD_INSTANCE_ACL_FAILURE = 'ADD_INSTANCE_ACL_FAILURE';\nexport const ADD_INSTANCE_ACL_SUCCESS = 'ADD_INSTANCE_ACL_SUCCESS';\nexport const DELETE_INSTANCE_ACL_REQUESTED = 'DELETE_INSTANCE_ACL_REQUESTED';\nexport const DELETE_INSTANCE_ACL_FAILURE = 'DELETE_INSTANCE_ACL_FAILURE';\nexport const DELETE_INSTANCE_ACL_SUCCESS = 'DELETE_INSTANCE_ACL_SUCCESS';\nexport const DELETE_INSTANCE_REQUESTED = 'DELETE_INSTANCE_REQUESTED';\nexport const DELETE_INSTANCE_FAILURE = 'DELETE_INSTANCE_FAILURE';\nexport const DELETE_INSTANCE_SUCCESS = 'DELETE_INSTANCE_SUCCESS';\nexport const GET_INSTANCE_USERS_REQUESTED = 'GET_INSTANCE_USERS_REQUESTED';\nexport const GET_INSTANCE_USERS_FAILURE = 'GET_INSTANCE_USERS_FAILURE';\nexport const GET_INSTANCE_USERS_SUCCESS = 'GET_INSTANCE_USERS_SUCCESS';\nexport const DELETE_INSTANCE_USER_REQUESTED = 'DELETE_INSTANCE_USER_REQUESTED';\nexport const DELETE_INSTANCE_USER_FAILURE = 'DELETE_INSTANCE_USER_FAILURE';\nexport const DELETE_INSTANCE_USER_SUCCESS = 'DELETE_INSTANCE_USER_SUCCESS';\nexport const RESET_INSTANCE_ERROR_STATE = 'RESET_ERROR_STATE';\nexport const ADD_INSTANCE_USER_REQUESTED = 'ADD_INSTANCE_USER_REQUESTED';\nexport const ADD_INSTANCE_USER_FAILURE = 'ADD_INSTANCE_USER_FAILURE';\nexport const ADD_INSTANCE_USER_SUCCESS = 'ADD_INSTANCE_USER_SUCCESS';\nexport const GET_INSTANCE_DATABASES_REQUESTED = 'ADD_INSTANCE_DATABASES_REQUESTED';\nexport const GET_INSTANCE_DATABASES_FAILURE = 'ADD_INSTANCE_DATABASES_FAILURE';\nexport const GET_INSTANCE_DATABASES_SUCCESS = 'ADD_INSTANCE_DATABASES_SUCCESS';\nexport const ADD_INSTANCE_DATABASE_REQUESTED = 'ADD_INSTANCE_DATABASE_REQUESTED';\nexport const ADD_INSTANCE_DATABASE_FAILURE = 'ADD_INSTANCE_DATABASE_FAILURE';\nexport const ADD_INSTANCE_DATABASE_SUCCESS = 'ADD_INSTANCE_DATABASE_SUCCESS';\nexport const DELETE_INSTANCE_DATABASE_REQUESTED = 'DELETE_INSTANCE_DATABASE_REQUESTED';\nexport const DELETE_INSTANCE_DATABASE_FAILURE = 'DELETE_INSTANCE_DATABASE_FAILURE';\nexport const DELETE_INSTANCE_DATABASE_SUCCESS = 'DELETE_INSTANCE_DATABASE_SUCCESS';\nexport const GET_INSTANCE_CERTIFICATES_REQUESTED = 'GET_INSTANCE_CERTIFICATES_REQUESTED';\nexport const GET_INSTANCE_CERTIFICATES_FAILURE = 'GET_INSTANCE_CERTIFICATES_FAILURE';\nexport const GET_INSTANCE_CERTIFICATES_SUCCESS = 'GET_INSTANCE_CERTIFICATES_SUCCESS';\nexport const GET_INSTANCE_CLIENT_CERTIFICATES_REQUESTED =\n 'GET_INSTANCE_CLIENT_CERTIFICATES_REQUESTED';\nexport const GET_INSTANCE_CLIENT_CERTIFICATES_FAILURE = 'GET_INSTANCE_CLIENT_CERTIFICATES_FAILURE';\nexport const GET_INSTANCE_CLIENT_CERTIFICATES_SUCCESS = 'GET_INSTANCE_CLIENT_CERTIFICATES_SUCCESS';\nexport const GET_INSTANCE_CERTIFICATE_DOWNLOAD_REQUESTED =\n 'GET_INSTANCE_CERTIFICATE_DOWNLOAD_REQUESTED';\nexport const GET_INSTANCE_CERTIFICATE_DOWNLOAD_FAILURE =\n 'GET_INSTANCE_CERTIFICATE_DOWNLOAD_FAILURE';\nexport const GET_INSTANCE_CERTIFICATE_DOWNLOAD_SUCCESS =\n 'GET_INSTANCE_CERTIFICATE_DOWNLOAD_SUCCESS';\nexport const CREATE_INSTANCE_CERTIFICATE_REQUESTED = 'CREATE_INSTANCE_CERTIFICATE_REQUESTED';\nexport const CREATE_INSTANCE_CERTIFICATE_FAILURE = 'CREATE_INSTANCE_CERTIFICATE_FAILURE';\nexport const CREATE_INSTANCE_CERTIFICATE_SUCCESS = 'CREATE_INSTANCE_CERTIFICATE_SUCCESS';\nexport const CREATE_INSTANCE_CLIENT_CERTIFICATE_REQUESTED =\n 'CREATE_INSTANCE_CLIENT_CERTIFICATE_REQUESTED';\nexport const CREATE_INSTANCE_CLIENT_CERTIFICATE_FAILURE =\n 'CREATE_INSTANCE_CLIENT_CERTIFICATE_FAILURE';\nexport const CREATE_INSTANCE_CLIENT_CERTIFICATE_SUCCESS =\n 'CREATE_INSTANCE_CLIENT_CERTIFICATE_SUCCESS';\nexport const DELETE_INSTANCE_CERTIFICATE_REQUESTED = 'CREATE_INSTANCE_CERTIFICATE_REQUESTED';\nexport const DELETE_INSTANCE_CERTIFICATE_FAILURE = 'CREATE_INSTANCE_CERTIFICATE_FAILURE';\nexport const DELETE_INSTANCE_CERTIFICATE_SUCCESS = 'CREATE_INSTANCE_CERTIFICATE_SUCCESS';\nexport const GET_BACKUPS_REQUESTED = 'GET_BACKUPS_REQUESTED';\nexport const GET_BACKUPS_FAILURE = 'GET_BACKUPS_FAILURE';\nexport const GET_BACKUPS_SUCCESS = 'GET_BACKUPS_SUCCESS';\nexport const GET_PITR_BACKUP_REQUESTED = 'GET_PITR_BACKUP_REQUESTED';\nexport const GET_PITR_BACKUP_FAILURE = 'GET_PITR_BACKUP_FAILURE';\nexport const GET_PITR_BACKUP_SUCCESS = 'GET_PITR_BACKUP_SUCCESS';\nexport const PATCH_CONFIG_REQUESTED = 'PATCH_CONFIG_REQUESTED';\nexport const PATCH_CONFIG_FAILURE = 'PATCH_CONFIG_FAILURE';\nexport const PATCH_CONFIG_SUCCESS = 'PATCH_CONFIG_SUCCESS';\nexport const CHANGE_NODE_QUANTITY_REQUESTED = 'CHANGE_NODE_QUANTITY_REQUESTED';\nexport const CHANGE_NODE_QUANTITY_FAILURE = 'CHANGE_NODE_QUANTITY_FAILURE';\nexport const CHANGE_NODE_QUANTITY_SUCCESS = 'CHANGE_NODE_QUANTITY_SUCCESS';\n\n// Create Instance-related actions\nexport const NEXT_CREATE_STAGE = 'NEXT_CREATE_STAGE';\nexport const PREVIOUS_CREATE_STAGE = 'PREVIOUS_CREATE_STAGE';\nexport const RESET_STEPS = 'RESET_STEPS';\nexport const SELECT_SERVICE = 'SELECT_SERVICE';\nexport const SELECT_VERSION = 'SELECT_VERSION';\nexport const SELECT_REGION = 'SELECT_REGION';\nexport const ENTER_NAME = 'ENTER_NAME';\nexport const SELECT_FLAVOR = 'SELECT_FLAVOR';\nexport const SELECT_PLAN = 'SELECT_PLAN';\nexport const ENTER_CIDR = 'ENTER_CIDR';\nexport const ENTER_ACL_NAME = 'ENTER_ACL_NAME';\nexport const SELECT_ACL_KIND = 'SELECT_ACL_KIND';\nexport const ADD_ACL = 'ADD_ACL';\nexport const REMOVE_ACL = 'REMOVE_ACL';\nexport const ADD_IPS_LATER = 'ADD_IPS_LATER';\nexport const SELECT_SERVICE_SUBTYPE = 'SELECT_SERVICE_SUBTYPE';\nexport const SELECT_PROVIDER = 'SELECT_PROVIDER';\nexport const CREATEINSTANCE_REQUESTED = 'CREATEINSTANCE_REQUESTED';\nexport const CREATEINSTANCE_FAILURE = 'CREATEINSTANCE_FAILURE';\nexport const CREATEINSTANCE_SUCCESS = 'CREATEINSTANCE_SUCCESS';\nexport const RESET_CREATEINSTANCE_ERROR_STATE = 'RESET_ERROR_STATE';\nexport const GETIP_REQUESTED = 'GETIP_REQUESTED';\nexport const GETIP_SUCCESS = 'GETIP_SUCCESS';\nexport const GETIP_FAILURE = 'GETIP_FAILURE';\nexport const GETIP_CLEAR = 'GETIP_CLEAR';\nexport const GET_PRICE_REQUESTED = 'GET_PRICE_REQUESTED';\nexport const GET_PRICE_SUCCESS = 'GET_PRICE_SUCCESS';\nexport const GET_PRICE_FAILURE = 'GET_PRICE_FAILURE';\nexport const SELECT_ADDON = 'SELECT_ADDON';\nexport const DESELECT_ADDON = 'DESELECT_ADDON';\n\n// Instances in ORv4\nexport const GET_INSTANCESV4_REQUESTED = 'GET_INSTANCESV4_REQUESTED';\nexport const GET_INSTANCESV4_FAILURE = 'GET_INSTANCESV4_FAILURE';\nexport const GET_INSTANCESV4_SUCCESS = 'GET_INSTANCESV4_SUCCESS';\n\n// Catalog-related actions (in CreateInstance)\nexport const GET_SERVICES_REQUESTED = 'GET_SERVICES_REQUESTED';\nexport const GET_SERVICES_FAILURE = 'GET_SERVICES_FAILURE';\nexport const GET_SERVICES_SUCCESS = 'GET_SERVICES_SUCCESS';\nexport const GET_SERVICESUBTYPES_REQUESTED = 'GET_SERVICESUBTYPES_REQUESTED';\nexport const GET_SERVICESUBTYPES_FAILURE = 'GET_SERVICESUBTYPES_FAILURE';\nexport const GET_SERVICESUBTYPES_SUCCESS = 'GET_SERVICESUBTYPES_SUCCESS';\nexport const GET_PROVIDERS_REQUESTED = 'GET_PROVIDERS_REQUESTED';\nexport const GET_PROVIDERS_FAILURE = 'GET_PROVIDERS_FAILURE';\nexport const GET_PROVIDERS_SUCCESS = 'GET_PROVIDERS_SUCCESS';\nexport const GET_VERSIONS_REQUESTED = 'GET_VERSIONS_REQUESTED';\nexport const GET_VERSIONS_FAILURE = 'GET_VERSIONS_FAILURE';\nexport const GET_VERSIONS_SUCCESS = 'GET_VERSIONS_SUCCESS';\nexport const GET_REGIONS_REQUESTED = 'GET_REGIONS_REQUESTED';\nexport const GET_REGIONS_FAILURE = 'GET_REGIONS_FAILURE';\nexport const GET_REGIONS_SUCCESS = 'GET_REGIONS_SUCCESS';\nexport const GET_PLANS_REQUESTED = 'GET_PLANS_REQUESTED';\nexport const GET_PLANS_FAILURE = 'GET_PLANS_FAILURE';\nexport const GET_PLANS_SUCCESS = 'GET_PLANS_SUCCESS';\nexport const GET_FLAVORS_REQUESTED = 'GET_FLAVORS_REQUESTED';\nexport const GET_FLAVORS_FAILURE = 'GET_FLAVORS_FAILURE';\nexport const GET_FLAVORS_SUCCESS = 'GET_FLAVORS_SUCCESS';\nexport const GET_ADDONS_REQUESTED = 'GET_ADDONS_REQUESTED';\nexport const GET_ADDONS_FAILURE = 'GET_ADDONS_FAILURE';\nexport const GET_ADDONS_SUCCESS = 'GET_ADDONS_SUCCESS';\nexport const GET_CATALOG_CONFIG_REQUEST = 'GET_CATALOG_CONFIG_REQUEST';\nexport const GET_CATALOG_CONFIG_FAILURE = 'GET_CATALOG_CONFIG_FAILURE';\nexport const GET_CATALOG_CONFIG_SUCCESS = 'GET_CATALOG_CONFIG_SUCCESS';\n\n// Notifications\nexport const ENQUEUE_SNACKBAR = 'ENQUEUE_SNACKBAR';\nexport const REMOVE_SNACKBAR = 'REMOVE_SNACKBAR';\nexport const ENQUEUE_BANNER = 'ENQUEUE_BANNER';\nexport const ACTIVATE_BANNER = 'ACTIVATE_BANNER';\nexport const REMOVE_BANNER = 'REMOVE_BANNER';\nexport const SET_FREE_CREDIT_AWARE = 'SET_FREE_CREDIT_AWARE';\nexport const CLEAR_BANNER_STATE = 'CLEAR_BANNER_STATE';\n\n// Users Management\nexport const GET_USER_REQUESTED = 'GET_USER_REQUESTED';\nexport const GET_USER_SUCCESS = 'GET_USER_SUCCESS';\nexport const GET_USER_FAILURE = 'GET_USER_FAILURE';\nexport const GET_USER_POLL = 'GET_USER_POLL';\nexport const PATCH_USER_REQUESTED = 'PATCH_USER_REQUESTED';\nexport const PATCH_USER_SUCCESS = 'PATCH_USER_SUCCESS';\nexport const PATCH_USER_FAILURE = 'PATCH_USER_FAILURE';\nexport const DELETE_USER_REQUESTED = 'DELETE_USER_REQUESTED';\nexport const DELETE_USER_SUCCESS = 'DELETE_USER_SUCCESS';\nexport const DELETE_USER_FAILURE = 'DELETE_USER_FAILURE';\nexport const CREATE_USERINVITE_REQUESTED = 'CREATE_USERINVITE_REQUESTED';\nexport const CREATE_USERINVITE_SUCCESS = 'CREATE_USERINVITE_SUCCESS';\nexport const CREATE_USERINVITE_FAILURE = 'CREATE_USERINVITE_FAILURE';\nexport const GET_USERINVITE_REQUESTED = 'GET_USERINVITE_REQUESTED';\nexport const GET_USERINVITE_SUCCESS = 'GET_USERINVITE_SUCCESS';\nexport const GET_USERINVITE_FAILURE = 'GET_USERINVITE_FAILURE';\nexport const DELETE_USERINVITE_REQUESTED = 'DELETE_USERINVITE_REQUESTED';\nexport const DELETE_USERINVITE_SUCCESS = 'DELETE_USERINVITE_SUCCESS';\nexport const DELETE_USERINVITE_FAILURE = 'DELETE_USERINVITE_FAILURE';\nexport const VALIDATE_INVITE_TOKEN_REQUESTED = 'VALIDATE_INVITE_TOKEN_REQUESTED';\nexport const VALIDATE_INVITE_TOKEN_FAILURE = 'VALIDATE_INVITE_TOKEN_FAILURE';\nexport const VALIDATE_INVITE_TOKEN_SUCCESS = 'VALIDATE_INVITE_TOKEN_SUCCESS';\nexport const ACCEPT_INVITATION_REQUESTED = 'ACCEPT_INVITATION_REQUESTED';\nexport const ACCEPT_INVITATION_SUCCESS = 'ACCEPT_INVITATION_SUCCESS';\nexport const ACCEPT_INVITATION_FAILURE = 'ACCEPT_INVITATION_FAILURE';\n\n// Stats\nexport const GET_SPACEUSAGE_REQUESTED = 'GET_SPACEUSAGE_REQUESTED';\nexport const GET_SPACEUSAGE_FAILURE = 'GET_SPACEUSAGE_FAILURE';\nexport const GET_SPACEUSAGE_SUCCESS = 'GET_SPACEUSAGE_SUCCESS';\n\n// Tracking\nexport const TRACK_BUTTON_CLICK = 'TRACK_BUTTON_CLICK';\n\n// Client certs\nexport const GET_CLIENT_CERTIFICATE_REQUESTED = 'GET_CLIENT_CERTIFICATE_REQUESTED';\nexport const GET_CLIENT_CERTIFICATE_FAILURE = 'GET_CLIENT_CERTIFICATE_FAILURE';\nexport const GET_CLIENT_CERTIFICATE_SUCCESS = 'GET_CLIENT_CERTIFICATE_SUCCESS';\n","import {\n ENQUEUE_SNACKBAR,\n REMOVE_SNACKBAR,\n ENQUEUE_BANNER,\n REMOVE_BANNER,\n ACTIVATE_BANNER,\n SET_FREE_CREDIT_AWARE,\n CLEAR_BANNER_STATE,\n} from '../actions';\n\nexport const initialState = {\n notifications: [],\n bannerNotifications: [],\n activeMessage: null,\n freeCreditAware: false, // Set this to false to enable trial credit banners. Also don't forget\n // to change unit tests for the reducer\n};\n\nexport default (state = initialState, action) => {\n switch (action.type) {\n case ENQUEUE_SNACKBAR:\n return {\n ...state,\n notifications: [\n ...state.notifications,\n {\n ...action.notification,\n },\n ],\n };\n\n case REMOVE_SNACKBAR:\n return {\n ...state,\n notifications: state.notifications.filter(\n (notification) => notification.key !== action.key,\n ),\n };\n\n case ENQUEUE_BANNER:\n return {\n ...state,\n bannerNotifications: [\n ...state.bannerNotifications,\n {\n ...action.notification,\n },\n ],\n };\n\n case ACTIVATE_BANNER:\n return {\n ...state,\n activeMessage: state.bannerNotifications.shift(),\n bannerNotifications: state.bannerNotifications,\n };\n\n case REMOVE_BANNER:\n return {\n ...state,\n activeMessage: null,\n };\n\n case SET_FREE_CREDIT_AWARE:\n return {\n ...state,\n freeCreditAware: true,\n };\n\n case CLEAR_BANNER_STATE:\n // Only clear banner state.\n // SnackBar state is not changed.\n return {\n ...state,\n bannerNotifications: [],\n activeMessage: null,\n freeCreditAware: false,\n };\n\n default:\n return state;\n }\n};\n","import { v4 as uuidv4 } from 'uuid';\nimport {\n ENQUEUE_SNACKBAR,\n REMOVE_SNACKBAR,\n ENQUEUE_BANNER,\n REMOVE_BANNER,\n ACTIVATE_BANNER,\n SET_FREE_CREDIT_AWARE,\n CLEAR_BANNER_STATE,\n} from '../actions';\n\n/**\n * Add an error to the error array.\n */\nexport const enqueueSnackbar = (notification) => (dispatch) =>\n dispatch({\n type: ENQUEUE_SNACKBAR,\n notification: {\n key: uuidv4(),\n ...notification,\n },\n });\n\n/**\n * Remove an error from the error array.\n */\nexport const removeSnackbar = (key) => (dispatch) =>\n dispatch({\n type: REMOVE_SNACKBAR,\n key,\n });\n\n/**\n * Add a message to the message array.\n */\nexport const enqueueBanner = (notification) => (dispatch) =>\n dispatch({\n type: ENQUEUE_BANNER,\n notification: {\n ...notification,\n },\n });\n/**\n * Remove a message from the message array.\n */\nexport const removeBanner = () => (dispatch) =>\n dispatch({\n type: REMOVE_BANNER,\n });\n\n/**\n * Activate the first message from the message array.\n */\nexport const activateBanner = () => (dispatch) =>\n dispatch({\n type: ACTIVATE_BANNER,\n });\n\n/**\n * Activate the first message from the message array.\n */\nexport const setFreeCreditAware = () => (dispatch) =>\n dispatch({\n type: SET_FREE_CREDIT_AWARE,\n });\n\nexport const setClearBannerState = () => (dispatch) =>\n dispatch({\n type: CLEAR_BANNER_STATE,\n });\n","import reducers from './reducers';\nimport * as actionCreators from './actionCreators';\n\nexport { actionCreators };\n\nexport default reducers;\n","import {\n CREATE_TOKEN_REQUESTED,\n CREATE_TOKEN_SUCCESS,\n CREATE_TOKEN_FAILURE,\n GET_TOKENS_REQUESTED,\n GET_TOKENS_FAILURE,\n GET_TOKENS_SUCCESS,\n DELETE_TOKEN_REQUESTED,\n DELETE_TOKEN_FAILURE,\n DELETE_TOKEN_SUCCESS,\n} from '../actions';\n\nconst initialState = {\n apitokens: [],\n isLoading: false,\n isSaving: false,\n};\n\nexport default (state = initialState, action) => {\n switch (action.type) {\n case GET_TOKENS_REQUESTED:\n return {\n ...state,\n isLoading: true,\n };\n\n case GET_TOKENS_SUCCESS:\n return {\n ...state,\n apitokens: action.payload.results,\n isLoading: false,\n };\n\n case GET_TOKENS_FAILURE:\n return {\n ...state,\n isLoading: false,\n };\n\n case CREATE_TOKEN_REQUESTED:\n case DELETE_TOKEN_REQUESTED:\n return {\n ...state,\n isSaving: true,\n };\n\n case CREATE_TOKEN_SUCCESS:\n return {\n ...state,\n apitokens: [...state.apitokens, action.payload],\n isSaving: false,\n };\n\n case DELETE_TOKEN_SUCCESS: {\n const index = state.apitokens.map((item) => item.id).indexOf(action.meta.id);\n const newTokenArray = [\n ...state.apitokens.slice(0, index),\n ...state.apitokens.slice(index + 1),\n ];\n return {\n ...state,\n apitokens: newTokenArray,\n isSaving: false,\n };\n }\n\n case CREATE_TOKEN_FAILURE:\n case DELETE_TOKEN_FAILURE:\n return {\n ...state,\n isSaving: false,\n };\n\n default:\n return state;\n }\n};\n","import { RSAA } from 'redux-api-middleware';\n\nimport {\n CREATE_TOKEN_REQUESTED,\n CREATE_TOKEN_SUCCESS,\n CREATE_TOKEN_FAILURE,\n GET_TOKENS_REQUESTED,\n GET_TOKENS_FAILURE,\n GET_TOKENS_SUCCESS,\n DELETE_TOKEN_REQUESTED,\n DELETE_TOKEN_FAILURE,\n DELETE_TOKEN_SUCCESS,\n} from '../actions';\n\nconst createTokenActionSet = (data) => ({\n [RSAA]: {\n types: [\n CREATE_TOKEN_REQUESTED,\n {\n type: CREATE_TOKEN_SUCCESS,\n meta: { analytics: true },\n },\n CREATE_TOKEN_FAILURE,\n ],\n method: 'POST',\n endpoint: '/apitokens/',\n body: JSON.stringify(data),\n },\n});\n\n/**\n * Creates an api token based on the provided details\n *\n * @param {object} details - The details of the token\n */\nexport const createToken = (details) => (dispatch) => dispatch(createTokenActionSet(details));\n\nconst getTokensActionSet = () => ({\n [RSAA]: {\n types: [GET_TOKENS_REQUESTED, GET_TOKENS_SUCCESS, GET_TOKENS_FAILURE],\n method: 'GET',\n endpoint: '/apitokens/',\n },\n});\n\n/**\n * Retrieves a list of api tokens\n */\nexport const getTokens = () => (dispatch) => dispatch(getTokensActionSet());\n\nconst deleteTokenActionSet = (id) => ({\n [RSAA]: {\n types: [\n DELETE_TOKEN_REQUESTED,\n {\n type: DELETE_TOKEN_SUCCESS,\n meta: { analytics: true, id },\n },\n DELETE_TOKEN_FAILURE,\n ],\n method: 'DELETE',\n endpoint: `/apitokens/${id}/`,\n },\n});\n\n/**\n * Deletes an api token\n *\n * @param {object} id - id of token to delete\n */\nexport const deleteToken = (id) => (dispatch) => dispatch(deleteTokenActionSet(id));\n","/**\n * Returns the complete api token state\n *\n * @param {object} state - Current state\n * @returns {object} - The entire api token state\n */\nexport const getApiTokenState = (state) => state.apitokens;\n\nexport default getApiTokenState;\n","import reducers from './reducers';\nimport * as actionCreators from './actionCreators';\nimport * as selectors from './selectors';\n\nexport { actionCreators, selectors };\n\nexport default reducers;\n","import {\n GET_INSTANCES_REQUESTED,\n GET_INSTANCES_POLL,\n GET_INSTANCES_FAILURE,\n GET_INSTANCES_SUCCESS,\n GET_INSTANCE_REQUESTED,\n GET_INSTANCE_POLL,\n GET_INSTANCE_FAILURE,\n GET_INSTANCE_SUCCESS,\n GET_INSTANCE_WITH_PASSWORD_SUCCESS,\n GET_INSTANCE_WITH_PASSWORD_FAILURE,\n ADD_INSTANCE_ACL_REQUESTED,\n ADD_INSTANCE_ACL_FAILURE,\n ADD_INSTANCE_ACL_SUCCESS,\n DELETE_INSTANCE_ACL_REQUESTED,\n DELETE_INSTANCE_ACL_FAILURE,\n DELETE_INSTANCE_ACL_SUCCESS,\n DELETE_INSTANCE_REQUESTED,\n DELETE_INSTANCE_FAILURE,\n DELETE_INSTANCE_SUCCESS,\n GET_INSTANCE_USERS_REQUESTED,\n GET_INSTANCE_USERS_SUCCESS,\n GET_INSTANCE_USERS_FAILURE,\n DELETE_INSTANCE_USER_REQUESTED,\n DELETE_INSTANCE_USER_FAILURE,\n DELETE_INSTANCE_USER_SUCCESS,\n RESET_INSTANCE_ERROR_STATE,\n ADD_INSTANCE_USER_REQUESTED,\n ADD_INSTANCE_USER_FAILURE,\n ADD_INSTANCE_USER_SUCCESS,\n GET_INSTANCE_DATABASES_REQUESTED,\n GET_INSTANCE_DATABASES_FAILURE,\n GET_INSTANCE_DATABASES_SUCCESS,\n ADD_INSTANCE_DATABASE_REQUESTED,\n ADD_INSTANCE_DATABASE_FAILURE,\n ADD_INSTANCE_DATABASE_SUCCESS,\n DELETE_INSTANCE_DATABASE_REQUESTED,\n DELETE_INSTANCE_DATABASE_FAILURE,\n DELETE_INSTANCE_DATABASE_SUCCESS,\n GET_SPACEUSAGE_REQUESTED,\n GET_SPACEUSAGE_SUCCESS,\n GET_SPACEUSAGE_FAILURE,\n GET_INSTANCE_CERTIFICATES_REQUESTED,\n GET_INSTANCE_CERTIFICATES_FAILURE,\n GET_INSTANCE_CERTIFICATES_SUCCESS,\n GET_INSTANCE_CLIENT_CERTIFICATES_REQUESTED,\n GET_INSTANCE_CLIENT_CERTIFICATES_FAILURE,\n GET_INSTANCE_CLIENT_CERTIFICATES_SUCCESS,\n GET_INSTANCE_CERTIFICATE_DOWNLOAD_REQUESTED,\n GET_INSTANCE_CERTIFICATE_DOWNLOAD_FAILURE,\n GET_INSTANCE_CERTIFICATE_DOWNLOAD_SUCCESS,\n CREATE_INSTANCE_CERTIFICATE_REQUESTED,\n CREATE_INSTANCE_CERTIFICATE_FAILURE,\n CREATE_INSTANCE_CERTIFICATE_SUCCESS,\n CREATE_INSTANCE_CLIENT_CERTIFICATE_REQUESTED,\n CREATE_INSTANCE_CLIENT_CERTIFICATE_FAILURE,\n CREATE_INSTANCE_CLIENT_CERTIFICATE_SUCCESS,\n DELETE_INSTANCE_CERTIFICATE_REQUESTED,\n DELETE_INSTANCE_CERTIFICATE_FAILURE,\n DELETE_INSTANCE_CERTIFICATE_SUCCESS,\n GET_BACKUPS_REQUESTED,\n GET_BACKUPS_FAILURE,\n GET_BACKUPS_SUCCESS,\n GET_PITR_BACKUP_REQUESTED,\n GET_PITR_BACKUP_FAILURE,\n GET_PITR_BACKUP_SUCCESS,\n PATCH_CONFIG_REQUESTED,\n PATCH_CONFIG_FAILURE,\n PATCH_CONFIG_SUCCESS,\n CHANGE_NODE_QUANTITY_REQUESTED,\n CHANGE_NODE_QUANTITY_FAILURE,\n CHANGE_NODE_QUANTITY_SUCCESS,\n} from '../actions';\n\nexport const initialState = {\n instances: {},\n isLoading: false,\n instanceDatabaseIsLoading: false,\n error: null,\n};\n\nexport default (state = initialState, action) => {\n let updatedInstance = null;\n switch (action.type) {\n case GET_INSTANCE_REQUESTED:\n case GET_INSTANCES_REQUESTED:\n return {\n ...state,\n isLoading: true,\n error: null,\n };\n\n case GET_INSTANCE_POLL:\n case GET_INSTANCES_POLL:\n return {\n ...state,\n };\n\n case GET_INSTANCES_SUCCESS:\n return {\n ...state,\n instances: Object.assign(\n {},\n ...action.payload.map((instance) => {\n let newInstance = { ...instance };\n if (state.instances[instance.id]) {\n newInstance = { ...state.instances[instance.id], ...newInstance };\n }\n return { [instance.id]: newInstance };\n }),\n ),\n isLoading: false,\n };\n\n case GET_INSTANCES_FAILURE:\n return {\n ...state,\n isLoading: false,\n };\n\n case GET_INSTANCE_SUCCESS:\n case GET_INSTANCE_WITH_PASSWORD_SUCCESS:\n // Preserve space stats information\n updatedInstance = { ...state.instances[action.payload.id], ...action.payload };\n return {\n ...state,\n instances: { ...state.instances, [action.payload.id]: updatedInstance },\n isLoading: false,\n };\n\n case GET_INSTANCE_FAILURE:\n case GET_INSTANCE_WITH_PASSWORD_FAILURE:\n return {\n ...state,\n isLoading: false,\n error: action.payload,\n };\n\n case ADD_INSTANCE_ACL_REQUESTED:\n return {\n ...state,\n isLoading: false,\n error: null,\n };\n\n case ADD_INSTANCE_ACL_SUCCESS:\n return {\n ...state,\n instances: {\n ...state.instances,\n [action.meta.id]: {\n ...state.instances[action.meta.id],\n acls: [\n ...state.instances[action.meta.id].acls,\n { ...action.meta.data, id: action.payload.id },\n ],\n },\n },\n isLoading: false,\n };\n\n case ADD_INSTANCE_ACL_FAILURE:\n return {\n ...state,\n isLoading: false,\n error: action.payload,\n };\n\n case DELETE_INSTANCE_ACL_REQUESTED:\n return {\n ...state,\n error: null,\n };\n\n case DELETE_INSTANCE_ACL_SUCCESS:\n return {\n ...state,\n instances: {\n ...state.instances,\n [action.meta.instanceId]: {\n ...state.instances[action.meta.instanceId],\n acls: state.instances[action.meta.instanceId].acls.filter(\n (acl) => acl.id !== action.meta.aclId,\n ), // eslint-disable-line max-len\n },\n },\n isLoading: false,\n };\n\n case DELETE_INSTANCE_ACL_FAILURE:\n return {\n ...state,\n isLoading: false,\n error: action.payload,\n };\n\n case DELETE_INSTANCE_REQUESTED:\n return {\n ...state,\n isLoading: true,\n error: null,\n };\n\n case DELETE_INSTANCE_SUCCESS:\n return {\n ...state,\n isLoading: false,\n };\n\n case DELETE_INSTANCE_FAILURE:\n return {\n ...state,\n isLoading: false,\n error: action.payload,\n };\n\n case GET_INSTANCE_USERS_REQUESTED:\n return {\n ...state,\n isLoading: true,\n error: null,\n };\n\n case GET_INSTANCE_USERS_SUCCESS:\n // This if statement exists because the Postgres API returns\n // a different payload than ES and CRDB.\n // It needs to be removed when the APIS are consistent\n // eslint-disable-next-line no-case-declarations\n let payload;\n if (Array.isArray(action.payload)) {\n payload = [...action.payload];\n } else {\n payload = [...action.payload.users];\n }\n return {\n ...state,\n isLoading: false,\n instances: {\n ...state.instances,\n [action.meta.id]: {\n ...state.instances[action.meta.id],\n users: payload,\n },\n },\n };\n\n case GET_INSTANCE_USERS_FAILURE:\n return {\n ...state,\n isLoading: false,\n error: action.payload,\n };\n\n case DELETE_INSTANCE_USER_REQUESTED:\n return {\n ...state,\n error: null,\n };\n\n case DELETE_INSTANCE_USER_SUCCESS:\n return {\n ...state,\n instances: {\n ...state.instances,\n [action.meta.instanceId]: {\n ...state.instances[action.meta.instanceId],\n users: state.instances[action.meta.instanceId].users.filter(\n (user) => user.username !== action.meta.userName,\n ),\n },\n },\n isLoading: false,\n };\n\n case DELETE_INSTANCE_USER_FAILURE:\n return {\n ...state,\n isLoading: false,\n error: action.payload,\n };\n\n case RESET_INSTANCE_ERROR_STATE:\n return {\n ...state,\n error: action.payload,\n };\n\n case ADD_INSTANCE_USER_REQUESTED:\n return {\n ...state,\n isLoading: false,\n error: null,\n };\n\n case ADD_INSTANCE_USER_FAILURE:\n return {\n ...state,\n isLoading: false,\n error: action.payload,\n };\n\n case ADD_INSTANCE_USER_SUCCESS:\n return {\n ...state,\n instances: {\n ...state.instances,\n [action.meta.instanceId]: {\n ...state.instances[action.meta.instanceId],\n users: [\n ...(state.instances[action.meta.instanceId].users || []),\n { ...action.meta.data },\n ],\n },\n },\n isLoading: false,\n };\n\n case GET_INSTANCE_DATABASES_REQUESTED:\n return {\n ...state,\n isLoading: false,\n error: null,\n };\n case GET_INSTANCE_DATABASES_FAILURE:\n return {\n ...state,\n isLoading: false,\n error: action.payload,\n };\n case GET_INSTANCE_DATABASES_SUCCESS:\n return {\n ...state,\n instances: {\n ...state.instances,\n [action.meta.instanceId]: {\n ...state.instances[action.meta.instanceId],\n databases: action.payload,\n },\n },\n isLoading: false,\n };\n\n case ADD_INSTANCE_DATABASE_REQUESTED:\n return {\n ...state,\n instanceDatabaseIsLoading: true,\n error: null,\n };\n\n case ADD_INSTANCE_DATABASE_SUCCESS:\n return {\n ...state,\n instanceDatabaseIsLoading: false,\n };\n\n case ADD_INSTANCE_DATABASE_FAILURE:\n return {\n ...state,\n instanceDatabaseIsLoading: false,\n error: action.payload,\n };\n\n case DELETE_INSTANCE_DATABASE_REQUESTED:\n return {\n ...state,\n isLoading: false,\n error: null,\n };\n\n case DELETE_INSTANCE_DATABASE_SUCCESS:\n return {\n ...state,\n instances: {\n ...state.instances,\n [action.meta.instanceId]: {\n ...state.instances[action.meta.instanceId],\n databases: state.instances[action.meta.instanceId].databases.filter((database) => {\n // For keys CRDB uses name, Mongo uses db\n const dbName = database.db || database.name;\n return dbName !== action.meta.name;\n }),\n },\n },\n isLoading: false,\n };\n\n case DELETE_INSTANCE_DATABASE_FAILURE:\n return {\n ...state,\n isLoading: false,\n error: action.payload,\n };\n\n case GET_SPACEUSAGE_REQUESTED:\n return {\n ...state,\n };\n\n case GET_SPACEUSAGE_FAILURE:\n return {\n ...state,\n };\n\n case GET_SPACEUSAGE_SUCCESS:\n return {\n ...state,\n instances: {\n ...state.instances,\n [action.meta.instanceId]: {\n ...state.instances[action.meta.instanceId],\n spaceUsage: { ...action.payload },\n },\n },\n };\n\n case GET_INSTANCE_CERTIFICATES_REQUESTED:\n return {\n ...state,\n };\n\n case GET_INSTANCE_CERTIFICATES_FAILURE:\n return {\n ...state,\n error: action.payload,\n };\n\n case GET_INSTANCE_CERTIFICATES_SUCCESS:\n return {\n ...state,\n instances: {\n ...state.instances,\n [action.meta.instanceId]: {\n ...state.instances[action.meta.instanceId],\n certificates: action.payload,\n CACertId: action.payload[0] ? action.payload[0].id : '',\n },\n },\n };\n\n case GET_INSTANCE_CLIENT_CERTIFICATES_REQUESTED:\n return {\n ...state,\n };\n\n case GET_INSTANCE_CLIENT_CERTIFICATES_FAILURE:\n return {\n ...state,\n error: action.payload,\n };\n\n case GET_INSTANCE_CLIENT_CERTIFICATES_SUCCESS:\n return {\n ...state,\n instances: {\n ...state.instances,\n [action.meta.instanceId]: {\n ...state.instances[action.meta.instanceId],\n clientCerts: action.payload,\n },\n },\n };\n\n case GET_INSTANCE_CERTIFICATE_DOWNLOAD_REQUESTED:\n return {\n ...state,\n };\n\n case GET_INSTANCE_CERTIFICATE_DOWNLOAD_FAILURE:\n return {\n ...state,\n error: action.payload,\n };\n\n case GET_INSTANCE_CERTIFICATE_DOWNLOAD_SUCCESS:\n return {\n ...state,\n };\n\n case CREATE_INSTANCE_CERTIFICATE_REQUESTED:\n return {\n ...state,\n };\n\n case CREATE_INSTANCE_CERTIFICATE_FAILURE:\n return {\n ...state,\n error: action.payload,\n };\n\n case CREATE_INSTANCE_CERTIFICATE_SUCCESS:\n return {\n ...state,\n };\n\n case CREATE_INSTANCE_CLIENT_CERTIFICATE_REQUESTED:\n return {\n ...state,\n };\n\n case CREATE_INSTANCE_CLIENT_CERTIFICATE_FAILURE:\n return {\n ...state,\n error: action.payload,\n };\n\n case CREATE_INSTANCE_CLIENT_CERTIFICATE_SUCCESS:\n return {\n ...state,\n };\n\n case DELETE_INSTANCE_CERTIFICATE_REQUESTED:\n return {\n ...state,\n };\n\n case DELETE_INSTANCE_CERTIFICATE_FAILURE:\n return {\n ...state,\n error: action.payload,\n };\n\n case DELETE_INSTANCE_CERTIFICATE_SUCCESS:\n return {\n ...state,\n };\n\n case GET_BACKUPS_REQUESTED:\n return {\n ...state,\n };\n\n case GET_BACKUPS_FAILURE:\n return {\n ...state,\n error: action.payload,\n };\n\n case GET_BACKUPS_SUCCESS:\n return {\n ...state,\n instances: {\n ...state.instances,\n [action.meta.instanceId]: {\n ...state.instances[action.meta.instanceId],\n backups: action.payload,\n },\n },\n };\n \n case GET_PITR_BACKUP_REQUESTED:\n return {\n ...state,\n };\n\n case GET_PITR_BACKUP_FAILURE:\n return {\n ...state,\n error: action.payload,\n };\n\n case GET_PITR_BACKUP_SUCCESS:\n return {\n ...state,\n instances: {\n ...state.instances,\n [action.meta.instanceId]: {\n ...state.instances[action.meta.instanceId],\n pitrBackupInfo: action.payload,\n },\n },\n };\n\n case PATCH_CONFIG_REQUESTED:\n return {\n ...state,\n isLoading: true,\n error: null,\n };\n\n case PATCH_CONFIG_FAILURE:\n return {\n ...state,\n isLoading: false,\n error: action.payload,\n };\n\n case PATCH_CONFIG_SUCCESS:\n return {\n ...state,\n isLoading: false,\n error: null,\n instances: { ...state.instances, [action.payload.id]: action.payload },\n };\n\n case CHANGE_NODE_QUANTITY_REQUESTED:\n case CHANGE_NODE_QUANTITY_SUCCESS:\n return {\n ...state,\n instances: {\n ...state.instances,\n [action.meta.instanceId]: {\n ...state.instances[action.meta.instanceId],\n statusDisplay: 'Update Requested',\n },\n },\n };\n\n case CHANGE_NODE_QUANTITY_FAILURE:\n return {\n ...state,\n instances: {\n ...state.instances,\n [action.meta.instanceId]: {\n ...state.instances[action.meta.instanceId],\n },\n },\n error: action.payload,\n };\n\n default:\n return state;\n }\n};\n","import { RSAA } from 'redux-api-middleware';\n\nimport {\n GET_INSTANCES_REQUESTED,\n GET_INSTANCES_POLL,\n GET_INSTANCES_FAILURE,\n GET_INSTANCES_SUCCESS,\n GET_INSTANCE_REQUESTED,\n GET_INSTANCE_POLL,\n GET_INSTANCE_FAILURE,\n GET_INSTANCE_SUCCESS,\n GET_INSTANCE_WITH_PASSWORD_REQUESTED,\n GET_INSTANCE_WITH_PASSWORD_SUCCESS,\n GET_INSTANCE_WITH_PASSWORD_FAILURE,\n ADD_INSTANCE_ACL_REQUESTED,\n ADD_INSTANCE_ACL_FAILURE,\n ADD_INSTANCE_ACL_SUCCESS,\n DELETE_INSTANCE_ACL_REQUESTED,\n DELETE_INSTANCE_ACL_FAILURE,\n DELETE_INSTANCE_ACL_SUCCESS,\n DELETE_INSTANCE_REQUESTED,\n DELETE_INSTANCE_FAILURE,\n DELETE_INSTANCE_SUCCESS,\n GET_INSTANCE_USERS_REQUESTED,\n GET_INSTANCE_USERS_SUCCESS,\n GET_INSTANCE_USERS_FAILURE,\n DELETE_INSTANCE_USER_REQUESTED,\n DELETE_INSTANCE_USER_FAILURE,\n DELETE_INSTANCE_USER_SUCCESS,\n RESET_INSTANCE_ERROR_STATE,\n ADD_INSTANCE_USER_REQUESTED,\n ADD_INSTANCE_USER_FAILURE,\n ADD_INSTANCE_USER_SUCCESS,\n GET_INSTANCE_DATABASES_REQUESTED,\n GET_INSTANCE_DATABASES_FAILURE,\n GET_INSTANCE_DATABASES_SUCCESS,\n ADD_INSTANCE_DATABASE_REQUESTED,\n ADD_INSTANCE_DATABASE_FAILURE,\n ADD_INSTANCE_DATABASE_SUCCESS,\n DELETE_INSTANCE_DATABASE_REQUESTED,\n DELETE_INSTANCE_DATABASE_FAILURE,\n DELETE_INSTANCE_DATABASE_SUCCESS,\n GET_SPACEUSAGE_REQUESTED,\n GET_SPACEUSAGE_SUCCESS,\n GET_SPACEUSAGE_FAILURE,\n GET_INSTANCE_CERTIFICATES_REQUESTED,\n GET_INSTANCE_CERTIFICATES_FAILURE,\n GET_INSTANCE_CERTIFICATES_SUCCESS,\n GET_INSTANCE_CLIENT_CERTIFICATES_REQUESTED,\n GET_INSTANCE_CLIENT_CERTIFICATES_FAILURE,\n GET_INSTANCE_CLIENT_CERTIFICATES_SUCCESS,\n GET_INSTANCE_CERTIFICATE_DOWNLOAD_REQUESTED,\n GET_INSTANCE_CERTIFICATE_DOWNLOAD_FAILURE,\n GET_INSTANCE_CERTIFICATE_DOWNLOAD_SUCCESS,\n CREATE_INSTANCE_CERTIFICATE_REQUESTED,\n CREATE_INSTANCE_CERTIFICATE_FAILURE,\n CREATE_INSTANCE_CERTIFICATE_SUCCESS,\n CREATE_INSTANCE_CLIENT_CERTIFICATE_REQUESTED,\n CREATE_INSTANCE_CLIENT_CERTIFICATE_FAILURE,\n CREATE_INSTANCE_CLIENT_CERTIFICATE_SUCCESS,\n DELETE_INSTANCE_CERTIFICATE_REQUESTED,\n DELETE_INSTANCE_CERTIFICATE_FAILURE,\n DELETE_INSTANCE_CERTIFICATE_SUCCESS,\n GET_PITR_BACKUP_REQUESTED,\n GET_PITR_BACKUP_FAILURE,\n GET_PITR_BACKUP_SUCCESS,\n GET_BACKUPS_REQUESTED,\n GET_BACKUPS_FAILURE,\n GET_BACKUPS_SUCCESS,\n PATCH_CONFIG_REQUESTED,\n PATCH_CONFIG_FAILURE,\n PATCH_CONFIG_SUCCESS,\n CHANGE_NODE_QUANTITY_REQUESTED,\n CHANGE_NODE_QUANTITY_FAILURE,\n CHANGE_NODE_QUANTITY_SUCCESS,\n} from '../actions';\n\nconst getInstancesActionSet = () => ({\n [RSAA]: {\n types: [GET_INSTANCES_REQUESTED, GET_INSTANCES_SUCCESS, GET_INSTANCES_FAILURE],\n method: 'GET',\n endpoint: '/instanceslist/',\n },\n});\n\n/**\n * Retrieves a list of instances\n */\nexport const getInstances = () => (dispatch) => dispatch(getInstancesActionSet());\n\nconst getInstancesPollActionSet = () => ({\n [RSAA]: {\n types: [GET_INSTANCES_POLL, GET_INSTANCES_SUCCESS, GET_INSTANCES_FAILURE],\n method: 'GET',\n endpoint: '/instanceslist/',\n },\n});\n\n/**\n * Retrieves a list of instances without setting is load\n */\nexport const getInstancesPoll = () => (dispatch) => dispatch(getInstancesPollActionSet());\n\nconst getInstancePollActionSet = (id, service) => ({\n [RSAA]: {\n types: [GET_INSTANCE_POLL, GET_INSTANCE_SUCCESS, GET_INSTANCE_FAILURE],\n method: 'GET',\n endpoint: `/instances/${service}/${id}/`,\n },\n});\n\n/**\n * Retrieves an instance without setting is load\n */\nexport const getInstancePoll = (id, service) => (dispatch) =>\n dispatch(getInstancePollActionSet(id, service));\n\nconst getInstanceActionSet = (id, service) => ({\n [RSAA]: {\n types: [GET_INSTANCE_REQUESTED, GET_INSTANCE_SUCCESS, GET_INSTANCE_FAILURE],\n method: 'GET',\n endpoint: `/instances/${service.toLowerCase()}/${id}/`,\n },\n});\n\n/**\n * Retrieves an instance. This is necessary in case someone bookmarks\n * a link to an instance details page.\n */\nexport const getInstance = (id, service) => (dispatch) =>\n dispatch(getInstanceActionSet(id, service));\n\nconst getInstanceWithPasswordActionSet = (id, service, showPassword) => ({\n [RSAA]: {\n types: [\n GET_INSTANCE_WITH_PASSWORD_REQUESTED,\n GET_INSTANCE_WITH_PASSWORD_SUCCESS,\n GET_INSTANCE_WITH_PASSWORD_FAILURE,\n ],\n method: 'GET',\n endpoint: `/instances/${service.toLowerCase()}/${id}/?showPassword=${showPassword}`,\n },\n});\n\n/**\n * Retrieves an instance with password shown in the connection string.\n */\nexport const getInstanceWithPassword = (id, service, showPassword = false) => (dispatch) =>\n dispatch(getInstanceWithPasswordActionSet(id, service, showPassword));\n\nconst addInstanceAclActionSet = (id, service, data) => ({\n [RSAA]: {\n types: [\n ADD_INSTANCE_ACL_REQUESTED,\n { type: ADD_INSTANCE_ACL_SUCCESS, meta: { data, id } },\n ADD_INSTANCE_ACL_FAILURE,\n ],\n method: 'POST',\n endpoint: `/instances/${service.toLowerCase()}/${id}/acls/`,\n body: JSON.stringify(data),\n },\n});\n\n/**\n * Adds an ACL to an existing instance\n */\nexport const addInstanceAcl = (id, service, data) => (dispatch) =>\n dispatch(addInstanceAclActionSet(id, service, data));\n\nconst deleteInstanceAclActionSet = (service, instanceId, aclId) => ({\n [RSAA]: {\n types: [\n DELETE_INSTANCE_ACL_REQUESTED,\n { type: DELETE_INSTANCE_ACL_SUCCESS, meta: { instanceId, aclId } },\n DELETE_INSTANCE_ACL_FAILURE,\n ],\n method: 'DELETE',\n endpoint: `/instances/${service.toLowerCase()}/${instanceId}/acls/${aclId}/`,\n },\n});\n\n/**\n * Deletes an ACL from an existing instance\n */\nexport const deleteInstanceAcl = (service, instanceId, aclId) => (dispatch) =>\n dispatch(deleteInstanceAclActionSet(service, instanceId, aclId));\n\nconst deleteInstanceActionSet = (id, service) => ({\n [RSAA]: {\n types: [DELETE_INSTANCE_REQUESTED, DELETE_INSTANCE_SUCCESS, DELETE_INSTANCE_FAILURE],\n method: 'DELETE',\n endpoint: `/instances/${service}/${id}/`,\n },\n});\n\n/**\n * Requests an instance to be deleted\n */\nexport const deleteInstance = (id, service, redirect) => (dispatch) =>\n dispatch(deleteInstanceActionSet(id, service, redirect)).then((response) => {\n if (response.type === DELETE_INSTANCE_SUCCESS) {\n redirect();\n }\n });\n\nconst getInstanceUsersSet = (id, service) => ({\n [RSAA]: {\n types: [\n GET_INSTANCE_USERS_REQUESTED,\n { type: GET_INSTANCE_USERS_SUCCESS, meta: { id } },\n GET_INSTANCE_USERS_FAILURE,\n ],\n method: 'GET',\n endpoint: `/instances/${service}/${id}/users/`,\n },\n});\n\n/**\n * Requests the users for an instance\n */\nexport const getInstanceUsers = (id, service) => (dispatch) => {\n dispatch(getInstanceUsersSet(id, service));\n};\n\nconst deleteInstanceUserSet = (instanceId, service, userName, dataBase) => {\n const payload = { username: userName };\n\n if (dataBase) {\n payload.database = dataBase;\n }\n\n return {\n [RSAA]: {\n types: [\n DELETE_INSTANCE_USER_REQUESTED,\n { type: DELETE_INSTANCE_USER_SUCCESS, meta: { instanceId, userName } },\n DELETE_INSTANCE_USER_FAILURE,\n ],\n method: 'DELETE',\n endpoint: `/instances/${service}/${instanceId}/users/`,\n body: JSON.stringify({\n ...payload,\n }),\n },\n };\n};\n\n/**\n * Deletes a user for an instance\n */\nexport const deleteInstanceUser = (instanceId, service, userId, database) => (dispatch) => {\n dispatch(deleteInstanceUserSet(instanceId, service, userId, database));\n};\n\nconst resetInstanceErrorStateActionSet = () => ({\n type: RESET_INSTANCE_ERROR_STATE,\n payload: null,\n});\n\nexport const resetInstanceErrorState = () => (dispatch) =>\n dispatch(resetInstanceErrorStateActionSet());\n\nconst addInstanceUserActionSet = (instanceId, service, data) => ({\n [RSAA]: {\n types: [\n ADD_INSTANCE_USER_REQUESTED,\n { type: ADD_INSTANCE_USER_SUCCESS, meta: { data, instanceId } },\n ADD_INSTANCE_USER_FAILURE,\n ],\n method: 'POST',\n endpoint: `/instances/${service.toLowerCase()}/${instanceId}/users/`,\n body: JSON.stringify(data),\n },\n});\n\n/**\n * Adds a user to an existing instance\n */\nexport const addInstanceUser = (instanceId, service, data) => (dispatch) =>\n dispatch(addInstanceUserActionSet(instanceId, service, data));\n\nconst pullInstanceDatabasesActionSet = (instanceId, service) => ({\n [RSAA]: {\n types: [\n GET_INSTANCE_DATABASES_REQUESTED,\n { type: GET_INSTANCE_DATABASES_SUCCESS, meta: { instanceId } },\n GET_INSTANCE_DATABASES_FAILURE,\n ],\n method: 'GET',\n endpoint: `/instances/${service.toLowerCase()}/${instanceId}/databases/`,\n },\n});\n\n/**\n * Gets databases related to an instance\n */\n\nexport const pullInstanceDatabases = (instanceId, service) => (dispatch) =>\n dispatch(pullInstanceDatabasesActionSet(instanceId, service));\n\nconst addInstanceDatabaseActionSet = (instanceId, service, data) => ({\n [RSAA]: {\n types: [\n ADD_INSTANCE_DATABASE_REQUESTED,\n { type: ADD_INSTANCE_DATABASE_SUCCESS, meta: { data, instanceId } },\n ADD_INSTANCE_DATABASE_FAILURE,\n ],\n method: 'POST',\n endpoint: `/instances/${service.toLowerCase()}/${instanceId}/databases/`,\n body: JSON.stringify({\n name: data.name,\n }),\n },\n});\n\n/**\n * Adds a database to an instance\n */\nexport const addInstanceDatabase = (instanceId, service, data) => (dispatch) =>\n dispatch(addInstanceDatabaseActionSet(instanceId, service, data));\n\nconst deleteInstanceDatabaseActionSet = (instanceId, service, name) => ({\n [RSAA]: {\n types: [\n DELETE_INSTANCE_DATABASE_REQUESTED,\n { type: DELETE_INSTANCE_DATABASE_SUCCESS, meta: { instanceId, name } },\n DELETE_INSTANCE_DATABASE_FAILURE,\n ],\n method: 'DELETE',\n endpoint: `/instances/${service.toLowerCase()}/${instanceId}/databases/${name}/`,\n },\n});\n\n/**\n * Deletes a database from an instance\n */\nexport const deleteInstanceDatabase = (instanceId, service, name) => (dispatch) =>\n dispatch(deleteInstanceDatabaseActionSet(instanceId, service, name));\n\nconst getSpaceUsageActionSet = (instanceId) => ({\n [RSAA]: {\n types: [\n GET_SPACEUSAGE_REQUESTED,\n { type: GET_SPACEUSAGE_SUCCESS, meta: { instanceId } },\n GET_SPACEUSAGE_FAILURE,\n ],\n method: 'GET',\n endpoint: `/stats/instances/${instanceId}/spaceusage/`,\n },\n});\n\n/**\n * Gets space usage stats for an instance\n */\nexport const getSpaceUsage = (instanceId) => (dispatch) =>\n dispatch(getSpaceUsageActionSet(instanceId));\n\nconst getInstanceCertificatesActionSet = (service, instanceId) => ({\n [RSAA]: {\n types: [\n GET_INSTANCE_CERTIFICATES_REQUESTED,\n { type: GET_INSTANCE_CERTIFICATES_SUCCESS, meta: { instanceId } },\n GET_INSTANCE_CERTIFICATES_FAILURE,\n ],\n method: 'GET',\n endpoint: `/instances/${service.toLowerCase()}/${instanceId}/certificates/?type=intermediate`,\n },\n});\n\nexport const getInstanceCertificates = (service, instanceId) => (dispatch) =>\n dispatch(getInstanceCertificatesActionSet(service, instanceId));\n\nconst getInstanceClientCertificatesActionSet = (service, instanceId) => ({\n [RSAA]: {\n types: [\n GET_INSTANCE_CLIENT_CERTIFICATES_REQUESTED,\n { type: GET_INSTANCE_CLIENT_CERTIFICATES_SUCCESS, meta: { instanceId } },\n GET_INSTANCE_CLIENT_CERTIFICATES_FAILURE,\n ],\n method: 'GET',\n endpoint: `/instances/${service.toLowerCase()}/${instanceId}/certificates/?type=client`,\n },\n});\n\nexport const getInstanceClientCertificates = (service, instanceId) => (dispatch) =>\n dispatch(getInstanceClientCertificatesActionSet(service, instanceId));\n\nconst getInstanceCertificateDownloadActionSet = (service, instanceId, CACertId) => ({\n [RSAA]: {\n types: [\n GET_INSTANCE_CERTIFICATE_DOWNLOAD_REQUESTED,\n GET_INSTANCE_CERTIFICATE_DOWNLOAD_SUCCESS,\n GET_INSTANCE_CERTIFICATE_DOWNLOAD_FAILURE,\n ],\n method: 'GET',\n endpoint: `/instances/${service}/${instanceId}/certificates/${CACertId}/?type=intermediate&download=true`,\n },\n});\n\n/**\n * Gets CA for an instance for users to download\n */\nexport const getInstanceCertificateDownload = (service, instanceId, CACertId) => (dispatch) =>\n dispatch(getInstanceCertificateDownloadActionSet(service, instanceId, CACertId));\n\nconst createInstanceCertificateActionSet = (service, instanceId) => ({\n [RSAA]: {\n types: [\n CREATE_INSTANCE_CERTIFICATE_REQUESTED,\n CREATE_INSTANCE_CERTIFICATE_SUCCESS,\n CREATE_INSTANCE_CERTIFICATE_FAILURE,\n ],\n method: 'POST',\n endpoint: `/instances/${service.toLowerCase()}/${instanceId}/certificates/`,\n body: JSON.stringify({\n cert_type: 'intermediate',\n }),\n },\n});\n\n/**\n * Creates primary CA\n */\nexport const createInstanceCertificate = (service, instanceId, cb) => (dispatch) =>\n dispatch(createInstanceCertificateActionSet(service, instanceId)).then((response) => {\n if (response.type === CREATE_INSTANCE_CERTIFICATE_SUCCESS) {\n cb();\n }\n });\n\nconst createInstanceClientCertificateActionSet = (service, instanceId, csr) => {\n const stringifiedJSON = JSON.stringify({\n cert_type: 'client',\n certificate_signing_request: csr,\n });\n\n const formattedBody = stringifiedJSON.replace(new RegExp('NEWLINE', 'g'), '\\\\n');\n return {\n [RSAA]: {\n types: [\n CREATE_INSTANCE_CLIENT_CERTIFICATE_REQUESTED,\n CREATE_INSTANCE_CLIENT_CERTIFICATE_SUCCESS,\n CREATE_INSTANCE_CLIENT_CERTIFICATE_FAILURE,\n ],\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n endpoint: `/instances/${service.toLowerCase()}/${instanceId}/certificates/`,\n body: formattedBody,\n },\n };\n};\n\n/**\n * Creates client certificate\n */\nexport const createInstanceClientCertificate = (service, instanceId, csr, cb) => (dispatch) =>\n dispatch(createInstanceClientCertificateActionSet(service, instanceId, csr)).then((response) => {\n if (response.type === CREATE_INSTANCE_CLIENT_CERTIFICATE_SUCCESS) {\n cb();\n }\n });\n\nconst deleteInstanceCertificateActionSet = (service, instanceId) => ({\n [RSAA]: {\n types: [\n DELETE_INSTANCE_CERTIFICATE_REQUESTED,\n { type: DELETE_INSTANCE_CERTIFICATE_SUCCESS, meta: { instanceId } },\n DELETE_INSTANCE_CERTIFICATE_FAILURE,\n ],\n method: 'DELETE',\n endpoint: `/instances/${service.toLowerCase()}/${instanceId}/certificates/`,\n body: JSON.stringify({\n cert_type: 'intermediate',\n }),\n },\n});\n\n/**\n * Deletes primary certificate\n */\nexport const deleteInstanceCertificate = (service, instanceId, cb) => (dispatch) =>\n dispatch(deleteInstanceCertificateActionSet(service, instanceId)).then((response) => {\n if (response.type === DELETE_INSTANCE_CERTIFICATE_SUCCESS) {\n cb();\n }\n });\n\nconst getBackupsActionSet = (instanceId, service) => ({\n [RSAA]: {\n types: [\n GET_BACKUPS_REQUESTED,\n { type: GET_BACKUPS_SUCCESS, meta: { instanceId } },\n GET_BACKUPS_FAILURE,\n ],\n method: 'GET',\n endpoint: `/instances/${service.toLowerCase()}/${instanceId}/backups/`,\n },\n});\n\n/**\n * Gets instance backups\n */\nexport const getBackups = (instanceId, service) => (dispatch) =>\n dispatch(getBackupsActionSet(instanceId, service));\n\n const getPitrBackupStatusActionSet = (instanceId, service) => ({\n [RSAA]: {\n types: [ \n GET_PITR_BACKUP_REQUESTED,\n { type: GET_PITR_BACKUP_SUCCESS, meta: { instanceId } },\n GET_PITR_BACKUP_FAILURE \n ],\n method: 'GET',\n endpoint: `/instances/${service.toLowerCase()}/${instanceId}/pitr-backup-status/`,\n },\n });\n \n /**\n * Gets PITR backup info\n */\n \n export const getPitrBackupStatus = (instanceId, service) => (dispatch) =>\n dispatch(getPitrBackupStatusActionSet(instanceId, service));\n\nconst setInstanceConfigurationActionSet = (instanceId, service, data) => ({\n [RSAA]: {\n types: [PATCH_CONFIG_REQUESTED, PATCH_CONFIG_SUCCESS, PATCH_CONFIG_FAILURE],\n method: 'PATCH',\n endpoint: `/instances/${service.toLowerCase()}/${instanceId}/`,\n body: JSON.stringify(data),\n },\n});\n\nexport const setInstanceConfiguration = (instanceId, service, data) => (dispatch) =>\n dispatch(setInstanceConfigurationActionSet(instanceId, service, data));\n\nconst changeNodeQuantityActionSet = (service, instanceId, nodeQuantityData) => ({\n [RSAA]: {\n types: [\n { type: CHANGE_NODE_QUANTITY_REQUESTED, meta: { instanceId } },\n { type: CHANGE_NODE_QUANTITY_SUCCESS, meta: { instanceId } },\n { type: CHANGE_NODE_QUANTITY_FAILURE, meta: { instanceId } },\n ],\n method: 'POST',\n endpoint: `/instances/${service.toLowerCase()}/${instanceId}/scale/`,\n body: nodeQuantityData,\n },\n});\n\nexport const changeNodeQuantity = (service, instanceId, nodeQuantityData) => (dispatch) =>\n dispatch(changeNodeQuantityActionSet(service, instanceId, nodeQuantityData));\n","import { createSelector } from '@reduxjs/toolkit';\n\n/**\n * Returns the complete catalog state\n *\n * @param {object} state - Current state\n * @returns {object} - The entire catalog state\n */\nexport const getCatalogState = (state) => state.catalog;\n\n/**\n * Returns the service names\n *\n * @param {object} state - Current state\n * @returns {array} - A list of valid service names from the catalog\n */\nexport const getCatalogServicesNames = (state) =>\n getCatalogState(state)\n .servicesCatalog.services.filter((service) => service.displaySetting === 1)\n .map((item) => item.name);\n\n/**\n * Returns the regions catalog state\n *\n * @param {object} state - Current state\n * @returns {object} - The regions catalog state\n */\nexport const getRegionsState = (state) => getCatalogState(state).regionsCatalog;\n\nexport const getConfigurationState = (state) => getCatalogState(state).configurationsCatalog;\n\nexport const getRegionsByCloudProvider = (state) => (cloudProviderId) => {\n const { regions } = getRegionsState(state);\n return regions.filter(\n (region) => region.cloudProvider === cloudProviderId && region.displaySetting === 1,\n );\n};\n\nexport const getValidFlavorsByServiceSubtypeId = (state) => (serviceSubtypeId) => {\n const {\n flavorsCatalog: { flavors },\n } = getCatalogState(state);\n const validFlavors = flavors.filter(\n (flavor) => flavor.serviceSubtype === serviceSubtypeId && flavor.displaySetting === 1,\n );\n return validFlavors;\n};\n\nexport const getServiceSubtypeIdByName = (state) => (serviceSubtypeName) => {\n const {\n serviceSubtypesCatalog: { serviceSubtypes },\n } = getCatalogState(state);\n return serviceSubtypes.filter((serviceSubtype) => serviceSubtype.name === serviceSubtypeName)[0]\n .id;\n};\n\nexport const getValidFlavorsByServiceSubtypeName = (state) => (serviceSubtypeName) => {\n const serviceSubtypeId = getServiceSubtypeIdByName(state)(serviceSubtypeName);\n const validFlavors = getValidFlavorsByServiceSubtypeId(state)(serviceSubtypeId);\n return validFlavors;\n};\n\nexport const createInstanceStateSelector = (state) => state.createInstance;\n\nexport const regionsByServiceSubtypeSelector = createSelector(\n getRegionsState,\n createInstanceStateSelector,\n (regionsState, createInstanceState) => {\n const { regions } = regionsState;\n const { id: serviceSubtypeId } = createInstanceState.newInstance.newInstanceServiceSubtype;\n const { id: cloudProviderId } = createInstanceState.newInstance.newInstanceCloudProvider;\n const regionsByServiceSubtype = regions.filter(\n (region) =>\n region.serviceSubtypes.includes(serviceSubtypeId) &&\n region.cloudProvider === cloudProviderId,\n );\n return regionsByServiceSubtype;\n },\n);\n\n/**\n * Returns the cloud providers\n *\n * @param {object} state - Current state\n * @returns {array} - A list of cloud providers from the catalog\n */\nexport const cloudProvidersStateSelector = createSelector(\n getCatalogState,\n (state) => state.providersCatalog.providers,\n);\n\n/**\n * Returns the list of cloud provider names that are available for display\n *\n * @param {object} state - Current state\n * @returns {array} - A list of cloud provider names from the catalog\n */\nexport const cloudProvidersNamesSelector = createSelector(\n cloudProvidersStateSelector,\n (cloudProviders) =>\n cloudProviders\n .filter((cloudProvider) => cloudProvider.displaySetting === 1)\n .map((cloudProvider) => cloudProvider.name),\n);\n\n/**\n * Returns whether or not any part of the catalog is still loading\n *\n * @param {object} state - Current state\n * @returns {boolean} - Whether or not the catalog is still in a loading state\n */\nexport const catalogIsLoadingSelector = createSelector(\n getCatalogState,\n (catalog) =>\n catalog.servicesCatalog.isLoading ||\n catalog.serviceSubtypesCatalog.isLoading ||\n catalog.providersCatalog.isLoading ||\n catalog.versionsCatalog.isLoading ||\n catalog.regionsCatalog.isLoading ||\n catalog.plansCatalog.isLoading ||\n catalog.flavorsCatalog.isLoading ||\n catalog.addonsCatalog.isLoading ||\n catalog.configurationsCatalog.isLoading,\n);\n\nexport default getCatalogState;\n","import { createSelector } from '@reduxjs/toolkit';\n\nimport { getRegionsState, getValidFlavorsByServiceSubtypeName } from 'dux/catalog/selectors';\n\n/**\n * Returns the complete instances state\n *\n * @param {object} state - Current state\n * @returns {object} - The entire instances state\n */\nexport const getInstancesState = (state) => state.instances;\n\nexport const instanceSelector = (state, props) => {\n const { instanceId } = props;\n return getInstancesState(state).instances[instanceId];\n};\n\nexport const instanceServiceSelector = createSelector(\n instanceSelector,\n (instance) => instance.service,\n);\n\n// eslint-disable-next-line max-len\nexport const getInstanceDatabases = (state) => (instanceId) =>\n getInstancesState(state).instances[instanceId].databases;\n\n// eslint-disable-next-line max-len\nexport const getInstanceSpaceUsage = (state) => (instanceId) =>\n getInstancesState(state).instances[instanceId].spaceUsage;\n\nexport const getInstanceTotalSpace = (state) => (instanceId) => {\n const instance = getInstancesState(state).instances[instanceId];\n let totalSpace = 0;\n\n instance.hosts.forEach((host) => {\n if (host.role === instance.service.toLowerCase()) {\n if (instance.service === 'MongoDB') {\n totalSpace = host.diskSizeGb;\n } else {\n totalSpace += host.diskSizeGb * host.quantity;\n }\n }\n });\n\n return totalSpace;\n};\n\nexport const instanceDatabaseIsLoadingSelector = createSelector(\n getInstancesState,\n (instanceState) => instanceState.instanceDatabaseIsLoading,\n);\n\n// eslint-disable-next-line max-len\nexport const getPrimaryCertId = (state) => (instanceId) =>\n getInstancesState(state).instances[instanceId].certificates.filter(\n (certificate) => certificate.primary,\n )[0].id;\n\n// eslint-disable-next-line max-len\nexport const getCerts = (state) => (instanceId) =>\n getInstancesState(state).instances[instanceId].certificates;\n\n// eslint-disable-next-line max-len\nexport const getClientCerts = (state) => (instanceId) =>\n getInstancesState(state).instances[instanceId].clientCerts;\n\nexport const getCockroachdbMultiInstanceIDs = (state) => {\n const instancesArray = Object.values(getInstancesState(state).instances);\n const crdbidsArray = instancesArray\n .filter((instance) => instance.service.toLowerCase() === 'cockroachdb')\n .map((instance) => instance.metadata.multiInstanceId);\n const uniqueIds = [...new Set(crdbidsArray)];\n return uniqueIds;\n};\n\n// eslint-disable-next-line max-len\nexport const getAssociatedCockroachDBInstances = (state) => (\n multiInstanceId,\n currentInstanceId,\n) => {\n const { instances } = getInstancesState(state);\n const associatedInstances = Object.values(instances).filter(\n (instance) =>\n typeof instance.metadata.multiInstanceId !== 'undefined' &&\n instance.metadata.multiInstanceId === multiInstanceId &&\n instance.id !== currentInstanceId,\n );\n return associatedInstances;\n};\n\n// eslint-disable-next-line max-len\nexport const getInstanceCertificatesState = (state) => (instanceId) =>\n getInstancesState(state).instances[instanceId].certificates;\n\nexport const getRedisMemoryCapacity = (state) => (instanceId) => {\n const memorySize = getInstancesState(state).instances[instanceId].hosts[0].memoryMb;\n return memorySize % 1024 === 0 ? memorySize / 1024 : (memorySize / 1024).toFixed(1);\n};\n\nexport const getUnusedCockroachDBRegions = (state) => (instanceId) => {\n const { instances } = getInstancesState(state);\n const currentInstance = instances[instanceId];\n const {\n region,\n metadata: { multiInstanceId },\n } = currentInstance;\n const clusterInstances = getAssociatedCockroachDBInstances(state)(multiInstanceId, instanceId);\n\n let usedRegions = clusterInstances.map((clusterInstance) => clusterInstance.region);\n usedRegions = [region, ...usedRegions];\n\n const { regions: allRegions } = getRegionsState(state);\n\n const remainingRegions = allRegions.filter(\n (aRegion) =>\n !usedRegions.includes(aRegion.name) && aRegion.providerName === currentInstance.provider,\n );\n return remainingRegions;\n};\n\nexport const getUsedCockroachDBRegions = (state) => (instanceId) => {\n const { instances } = getInstancesState(state);\n const currentInstance = instances[instanceId];\n const {\n region,\n metadata: { multiInstanceId },\n } = currentInstance;\n const clusterInstances = getAssociatedCockroachDBInstances(state)(multiInstanceId, instanceId);\n\n let usedRegions = clusterInstances.map((clusterInstance) => clusterInstance.region);\n usedRegions = [region, ...usedRegions];\n return usedRegions;\n};\n\nexport const getServiceSubtypeNameByInstanceId = (state) => (instanceId) => {\n const { instances } = getInstancesState(state);\n return instances[instanceId].serviceSubtype;\n};\n\nexport const getValidFlavorsByInstanceId = (state) => (instanceId) => {\n const serviceSubtypeName = getServiceSubtypeNameByInstanceId(state)(instanceId);\n const validFlavors = getValidFlavorsByServiceSubtypeName(state)(serviceSubtypeName);\n return validFlavors;\n};\n\nexport default getInstancesState;\n","import reducers from './reducers';\nimport * as actionCreators from './actionCreators';\nimport * as selectors from './selectors';\n\nexport { actionCreators, selectors };\n\nexport default reducers;\n","import {\n GET_INSTANCESV4_REQUESTED,\n GET_INSTANCESV4_FAILURE,\n GET_INSTANCESV4_SUCCESS,\n} from '../actions';\n\nexport const initialState = {\n instancesORv4: [],\n isLoading: false,\n error: null,\n};\n\nexport default (state = initialState, action) => {\n switch (action.type) {\n case GET_INSTANCESV4_REQUESTED:\n return {\n ...state,\n isLoading: true,\n error: null,\n };\n\n case GET_INSTANCESV4_SUCCESS:\n return {\n ...state,\n instancesORv4: action.payload.data,\n isLoading: false,\n error: null,\n };\n\n case GET_INSTANCESV4_FAILURE:\n return {\n ...state,\n isLoading: false,\n error: action.payload,\n };\n\n default:\n return state;\n }\n};\n","import { RSAA } from 'redux-api-middleware';\n\nimport {\n GET_INSTANCESV4_REQUESTED,\n GET_INSTANCESV4_FAILURE,\n GET_INSTANCESV4_SUCCESS,\n} from '../actions';\n\nconst getInstancesORv4ActionSet = () => ({\n [RSAA]: {\n types: [GET_INSTANCESV4_REQUESTED, GET_INSTANCESV4_SUCCESS, GET_INSTANCESV4_FAILURE],\n method: 'GET',\n endpoint: '/orv4/instances/',\n },\n});\n\n/**\n * Retrieves a list of instances from ORv4\n */\nexport const getInstancesORv4 = () => (dispatch) => dispatch(getInstancesORv4ActionSet());\n\nexport default getInstancesORv4;\n","/**\n * Returns the complete instances state\n *\n * @param {object} state - Current state\n * @returns {object} - The entire instances state\n */\n\nexport const getInstancesORv4 = (state) => state.instancesV4;\n\nexport const getORv4ID = (state) => state.user.identity.ORv4ID;\n","import reducers from './reducers';\nimport * as actionCreators from './actionCreators';\nimport * as selectors from './selectors';\n\nexport { actionCreators, selectors };\n\nexport default reducers;\n","import { combineReducers } from 'redux';\n\nimport { loadOrgImpersonationId } from 'services/stateStorage/index';\nimport {\n LOG_IN_REQUESTED,\n LOG_OUT_REQUESTED,\n GET_FEATURE_FLAGS_REQUESTED,\n GET_FEATURE_FLAGS_SUCCESS,\n UPDATE_FEATURE_FLAGS_SUCCESS,\n SET_SESSION_SUCCESS,\n SET_SESSION_FAILURE,\n CREATE_ORG_SUCCESS,\n IMPERSONATE_ORG,\n STOP_ORG_IMPERSONATION,\n SEARCH_ORGS_REQUESTED,\n SEARCH_ORGS_SUCCESS,\n SEARCH_ORGS_FAILURE,\n SORT_ORGS,\n START_MFA_SIGNUP_FLOW_REQUESTED,\n START_MFA_SIGNUP_FLOW_SUCCESS,\n START_MFA_SIGNUP_FLOW_FAILURE,\n GET_MFA_STATUS_REQUESTED,\n GET_MFA_STATUS_SUCCESS,\n GET_MFA_STATUS_FAILURE,\n REMOVE_MFA_ENROLLMENT_REQUESTED,\n REMOVE_MFA_ENROLLMENT_SUCCESS,\n REMOVE_MFA_ENROLLMENT_FAILURE,\n AWS_SIGNUP_FAILURE,\n} from '../actions';\n\n/**\n * Because of the way state is set to initial state by default in these reducers,\n * impersonatedOrganizationId needs to check local storage first because LOG_IN_REQUESTED\n * is called when the page refreshes and would normally set this variable back to null,\n * causing a user to stop impersonating an org when they have not requested that action\n */\nexport const initialState = {\n credentials: {\n accessToken: null,\n },\n session: {\n originatingURL: null,\n error: null,\n },\n featureFlags: {\n isLoading: false,\n flags: {},\n },\n identity: {\n id: null,\n ORv4ID: null,\n name: null,\n email: null,\n emailVerified: false,\n organizationId: null,\n roles: null,\n permissions: null,\n impersonatedOrganizationId: loadOrgImpersonationId(localStorage),\n orgSearchList: {\n query: null,\n sort: null,\n list: [],\n },\n MFAEnabled: false,\n },\n};\n\nconst featureFlagsReducer = (state = initialState.featureFlags, action) => {\n switch (action.type) {\n case GET_FEATURE_FLAGS_REQUESTED:\n return {\n ...state,\n flags: {},\n isLoading: true,\n };\n\n case GET_FEATURE_FLAGS_SUCCESS:\n return {\n ...state,\n flags: action.payload,\n isLoading: false,\n };\n\n case UPDATE_FEATURE_FLAGS_SUCCESS:\n return {\n ...state,\n flags: { ...state.flags, ...action.payload },\n };\n\n case LOG_IN_REQUESTED:\n case LOG_OUT_REQUESTED:\n case SET_SESSION_FAILURE:\n return {\n ...state,\n flags: {},\n isLoading: false,\n };\n\n default:\n return state;\n }\n};\n\nconst credentialsReducer = (state = initialState.credentials, action) => {\n switch (action.type) {\n case SET_SESSION_SUCCESS:\n return {\n ...state,\n accessToken: action.payload.accessToken,\n };\n\n case LOG_IN_REQUESTED:\n case LOG_OUT_REQUESTED:\n return {\n ...state,\n accessToken: null,\n };\n\n default:\n return state;\n }\n};\n\nconst sessionReducer = (state = initialState.session, action) => {\n switch (action.type) {\n case SET_SESSION_FAILURE:\n return {\n ...state,\n error: action.error,\n originatingURL: null,\n };\n\n case AWS_SIGNUP_FAILURE:\n return {\n ...state,\n error: action.payload,\n };\n\n case LOG_IN_REQUESTED:\n return {\n ...state,\n originatingURL: action.payload,\n error: null,\n };\n\n case SET_SESSION_SUCCESS:\n case LOG_OUT_REQUESTED:\n return {\n ...state,\n originatingURL: null,\n error: null,\n };\n\n default:\n return state;\n }\n};\n\nconst identityReducer = (state = initialState.identity, action) => {\n switch (action.type) {\n case SET_SESSION_SUCCESS: {\n const namespacedData = action.payload.idTokenPayload[process.env.REACT_APP_AUTH0_AUDIENCE];\n /**\n * The emailVerified field value is set with an || operator to avoid an unidentified bug\n * with the same field in the idTokenPayload being mutated during API calls to Auth0\n */\n return {\n ...state,\n id: namespacedData.userId,\n ORv4ID: namespacedData.ORv4ID,\n name: namespacedData.name,\n email: namespacedData.email,\n emailVerified: namespacedData.email_verified || namespacedData.emailVerified,\n organizationId: namespacedData.organizationId,\n roles: namespacedData.roles,\n permissions: namespacedData.permissions,\n };\n }\n\n case LOG_IN_REQUESTED:\n /**\n * impersonatedOrganizationId still needs to check if it has a value\n * from the state being passed in before reverting to null\n */\n return {\n ...state,\n id: null,\n ORv4ID: null,\n name: null,\n email: null,\n emailVerified: false,\n organizationId: null,\n roles: null,\n permissions: null,\n impersonatedOrganizationId: state.impersonatedOrganizationId || null,\n };\n\n case LOG_OUT_REQUESTED:\n return {\n ...state,\n id: null,\n ORv4ID: null,\n name: null,\n email: null,\n emailVerified: false,\n organizationId: null,\n roles: null,\n permissions: null,\n impersonatedOrganizationId: null,\n };\n\n case CREATE_ORG_SUCCESS:\n return {\n ...state,\n organizationId: action.payload.id,\n };\n\n case IMPERSONATE_ORG:\n return {\n ...state,\n impersonatedOrganizationId: action.payload,\n };\n\n case STOP_ORG_IMPERSONATION:\n return {\n ...state,\n impersonatedOrganizationId: null,\n orgSearchList: {\n query: null,\n sort: null,\n list: [],\n },\n };\n\n case SEARCH_ORGS_REQUESTED:\n return {\n ...state,\n orgSearchList: {\n ...state.orgSearchList,\n query: action.payload,\n },\n };\n\n case SEARCH_ORGS_SUCCESS:\n return {\n ...state,\n orgSearchList: {\n ...state.orgSearchList,\n list: action.payload,\n },\n };\n\n case SEARCH_ORGS_FAILURE:\n return {\n ...state,\n error: action.payload,\n };\n\n case SORT_ORGS:\n return {\n ...state,\n orgSearchList: {\n ...state.orgSearchList,\n list: action.payload.list || state.orgSearchList.list,\n sort: action.payload.sortBy,\n },\n };\n\n case START_MFA_SIGNUP_FLOW_REQUESTED:\n case START_MFA_SIGNUP_FLOW_SUCCESS:\n return {\n ...state,\n };\n\n case START_MFA_SIGNUP_FLOW_FAILURE:\n return {\n ...state,\n error: action.payload,\n };\n\n case GET_MFA_STATUS_REQUESTED:\n return {\n ...state,\n };\n\n case GET_MFA_STATUS_SUCCESS:\n return {\n ...state,\n MFAEnabled: action.payload.length > 0 && action.payload[0].status === 'confirmed',\n enrollmentId: (action.payload.length > 0 && action.payload[0].id) || '',\n };\n\n case GET_MFA_STATUS_FAILURE:\n return {\n ...state,\n error: action.payload,\n };\n\n case REMOVE_MFA_ENROLLMENT_REQUESTED:\n return {\n ...state,\n };\n\n case REMOVE_MFA_ENROLLMENT_SUCCESS:\n return {\n ...state,\n MFAEnabled: false,\n };\n\n case REMOVE_MFA_ENROLLMENT_FAILURE:\n return {\n ...state,\n error: action.payload,\n };\n\n default:\n return state;\n }\n};\n\nexport default combineReducers({\n session: sessionReducer,\n credentials: credentialsReducer,\n featureFlags: featureFlagsReducer,\n identity: identityReducer,\n});\n","import jwt from 'jsonwebtoken';\n\n/**\n * Service for saving and retrieving the app state to and from local storage\n */\n\n/**\n * Loads the state from local storage\n *\n * @returns {object} - Object representing the state retrieved from local storage\n * or undefined if the state cannot be loaded.\n */\nexport const loadState = () => {\n try {\n const serializedState = localStorage.getItem('state');\n if (serializedState === null) {\n return undefined;\n }\n const parsedState = JSON.parse(serializedState);\n const decodedToken = jwt.decode(parsedState.user.credentials.accessToken);\n\n if (decodedToken !== null) {\n if (decodedToken.exp !== null && decodedToken.exp < Date.now()) {\n return undefined;\n }\n }\n return parsedState;\n } catch (err) {\n return undefined;\n }\n};\n\nexport const loadOrgImpersonationId = (storage) => {\n try {\n return JSON.parse(storage.getItem('state')).user.identity.impersonatedOrganizationId || null;\n } catch (err) {\n storage.setItem('stateError', JSON.stringify(err));\n return null;\n }\n};\n\n/**\n * Saves the state to local storage\n *\n * @param {object} state - State to save in local storage\n */\nexport const saveState = (state) => {\n try {\n const serializedState = JSON.stringify(state);\n localStorage.setItem('state', serializedState);\n } catch (err) {\n localStorage.setItem('stateError', JSON.stringify(err));\n }\n};\n","/**\n * Service for interacting with Auth0\n */\nimport auth0 from 'auth0-js';\nimport { v4 as uuidv4 } from 'uuid';\n\nconst auth = new auth0.WebAuth({\n domain: process.env.REACT_APP_AUTH0_DOMAIN,\n clientID: process.env.REACT_APP_AUTH0_CLIENT_ID,\n redirectUri: process.env.REACT_APP_AUTH0_CALLBACK_URL,\n audience: process.env.REACT_APP_AUTH0_AUDIENCE,\n responseType: 'token id_token',\n scope: 'openid email name',\n});\n\n// Create params object\nconst urlParams = new URLSearchParams(window.location.search);\n\n// see if google analytics param exists and add to local storage\nif (urlParams.has('_ga')) {\n localStorage.setItem('_ga', urlParams.get('_ga'));\n}\n\n// see if hubspot params exist and add to local storage\nif (urlParams.has('__hsfp') && urlParams.has('__hstc') && urlParams.has('__hssc')) {\n localStorage.setItem('__hsfp', urlParams.get('__hsfp'));\n localStorage.setItem('__hstc', urlParams.get('__hstc'));\n localStorage.setItem('__hssc', urlParams.get('__hssc'));\n}\n\n/**\n * Manually build the auth() url\n */\nconst manualAuthorize = (sso = false) => {\n const domain = process.env.REACT_APP_AUTH0_DOMAIN;\n const clientID = process.env.REACT_APP_AUTH0_CLIENT_ID;\n const redirectUri = process.env.REACT_APP_AUTH0_CALLBACK_URL;\n const state = uuidv4();\n const nonce = uuidv4();\n const responseType = 'token id_token';\n const scope = 'openid email name';\n const audience = process.env.REACT_APP_AUTH0_AUDIENCE;\n const options = {\n responseType,\n nonce,\n state,\n };\n\n // create transaction\n auth.transactionManager.process(options);\n\n // build the base url\n let url = `https://${domain}/authorize?response_type=${responseType}&state=${state}&nonce=${nonce}&scope=${scope}&client_id=${clientID}&redirect_uri=${redirectUri}&audience=${audience}`;\n\n if (sso) {\n url = `${url}&connection=RAX-SSO`; // TODO: Should store it in env? `RAX-SSO-PRD`\n }\n\n // see if google analytics param exists and add\n if ('_ga' in localStorage) {\n const ga = localStorage.getItem('_ga');\n url = url.concat('&_ga=', ga);\n }\n\n // see if hubspot params exist and add\n if ('__hsfp' in localStorage && '__hstc' in localStorage && '__hssc' in localStorage) {\n const hsfp = localStorage.getItem('__hsfp');\n const hstc = localStorage.getItem('__hstc');\n const hssc = localStorage.getItem('__hssc');\n url = url.concat('&__hsfp=', hsfp, '&__hstc=', hstc, '&__hssc=', hssc);\n }\n\n // redirect\n window.location.assign(url);\n};\n\n/**\n * Signs up a AWS user, logs them in, and redirects them back to the AWS onboarding page\n */\nconst logInAWS = (data, awsToken) =>\n new Promise((resolve, reject) => {\n auth.signup(\n {\n connection: 'Username-Password-Authentication',\n email: data.username,\n password: data.password,\n username: data.username,\n user_metadata: {\n firstName: data.firstname,\n lastName: data.lastname,\n awsToken,\n },\n },\n (err) => {\n if (err) {\n return reject(err);\n }\n return resolve(\n auth.login({\n password: data.password,\n username: data.username,\n realm: 'Username-Password-Authentication',\n redirectUri: `${process.env.REACT_APP_DOMAIN}/aws_onboarding?token=${awsToken}`,\n }),\n );\n },\n );\n });\n\n/**\n * Logs user out of auth0 session by calling auth0 logout method\n */\nconst logOut = () => {\n auth.logout({\n clientID: process.env.REACT_APP_AUTH0_CLIENT_ID,\n returnTo: `${process.env.REACT_APP_DOMAIN}/login`,\n });\n};\n\n/**\n * Parse the session information from the given URL and returns it\n *\n * @param {string} location - The current URL including the token\n * @returns {Promise} - Promise that resolves with the user's credentials\n * if they can be parsed or rejects otherwise\n */\nconst parseCreds = (location) =>\n new Promise((resolve, reject) => {\n if (location && /access_token|id_token|error/.test(location.hash)) {\n auth.parseHash((error, authResult) => {\n if (!error && authResult && authResult.accessToken && authResult.idToken) {\n resolve(authResult);\n } else {\n reject(error);\n }\n });\n } else {\n reject();\n }\n });\n\n/**\n * Tries to refresh the session.\n *\n * @returns {Promise} - Promise that resolves with the user's credentials\n * if they can be renewed\n */\nconst checkSession = () =>\n new Promise((resolve, reject) => {\n auth.checkSession(\n {\n nonce: uuidv4(),\n state: uuidv4(),\n },\n (error, authResult) => {\n if (!error && authResult && authResult.accessToken && authResult.idToken) {\n resolve(authResult);\n } else {\n reject(error);\n }\n },\n );\n });\n\nexport default {\n manualAuthorize,\n checkSession,\n logOut,\n logInAWS,\n parseCreds,\n};\n","/**\n * Service for interacting with Launch Darkly to retrieve feature flags\n */\nimport ldClient from 'ldclient-js';\nimport { v4 as uuidv4 } from 'uuid';\n\nconst publicFields = ['email', 'key', 'anonymous', 'name'];\nlet client;\n\n/**\n * Transform the user data to be sent to Launch Darkly to identify a user\n *\n * @param {object} user - The identity information of the user\n * @returns {object} - User data mapped to specified identity fields\n */\nconst formatUserData = (user) => {\n const mappedFields = {\n anonymous: !user.id,\n key: user.id || uuidv4(),\n };\n return { ...user, ...mappedFields };\n};\n\n/**\n * Examines the user object's keys and returns a list of keys that are note\n * part of the list of public keys.\n *\n * @param {object} user - The identity information of the user\n * @param {array} pubFields - Array of string representing the public field names\n * @returns {array} - Array of field names on the user that are not part of\n * the public fields list\n */\nconst getPrivateAttrsList = (user, pubFields) => {\n const allFields = Object.keys(user);\n return allFields.filter((field) => !pubFields.includes(field));\n};\n\n/**\n * Initialize connection to Launch Darkly to get feature flags\n *\n * @param {object} user - The identity information of the user for which to load\n * feature flags for.\n * @param {object} cachedFlags - An object containing any cached feature flags\n * that can be used to bootstrap the app until the actual flags load.\n * @returns {function} - Function that resolves a Promise when flags are ready\n */\nconst initialize = (user, cachedFlags, privateAttrs) => (resolve) => {\n client = ldClient.initialize(process.env.REACT_APP_LAUNCH_DARKLY_CLIENT_ID, user, {\n bootstrap: cachedFlags,\n privateAttributeNames: privateAttrs,\n });\n client.on('ready', () => {\n resolve(client.allFlags());\n });\n};\n\n/**\n * Update the identity of the user\n *\n * @param {object} user - The identity information of the user for which to load\n * feature flags for.\n * @returns {Promise} - Promise resolved with all of the user's feature flags\n */\nconst identify = (user) => (resolve) => {\n client.identify(user, null, () => {\n resolve(client.allFlags());\n });\n};\n\n/**\n * Get the flags for a given user\n *\n * @param {object} user - The identity information of the user for which to load\n * feature flags for.\n * @param {object} cachedFlags - An object containing any cached feature flags\n * that can be used to bootstrap the app until the actual flags load.\n * @returns {Promise} - Promise resolved with all of the user's feature flags\n */\nconst getFlags = (user, cachedFlags = {}) => {\n const userData = formatUserData(user || {});\n const privateAttrs = getPrivateAttrsList(userData, publicFields);\n if (!client) {\n return new Promise(initialize(userData, cachedFlags, privateAttrs));\n }\n return new Promise(identify(userData));\n};\n\n/**\n * Adds the given callback as a change handler to be called when feature flag\n * updates occur\n *\n * @param {function} onChangeCallback - Callback function to be removed as a\n * change handler\n */\nconst subscribe = (onChangeCallback) => {\n if (!client) {\n return;\n }\n client.on('change', onChangeCallback);\n};\n\n/**\n * Removes the given callback as a change handler when feature flag updates\n * occur\n *\n * @param {function} onChangeCallback - Callback function to be removed as a\n * change handler\n */\nconst unsubscribe = (onChangeCallback) => {\n if (!client) {\n return;\n }\n client.off('change', onChangeCallback);\n};\n\nexport default {\n getFlags,\n subscribe,\n unsubscribe,\n};\n","export const OWNER = 'owner';\nexport const ADMIN = 'admin';\nexport const BILLING = 'billing';\nexport const METRICS = 'metrics';\nexport const READONLY = 'readonly user';\nexport const OR_ADMIN = 'or admin';\nexport const OR_READONLY = 'or readonly';\nexport const OR_SUPERUSER = 'or superuser';\nexport const OR_SUPERREAD = 'or superread';\n\nexport const RolesForInvites = [\n {\n label: 'Administrator',\n value: 'admin',\n },\n {\n label: 'Billing',\n value: 'billing',\n },\n {\n label: 'Metrics',\n value: 'metrics',\n },\n {\n label: 'Owner',\n value: 'owner',\n },\n {\n label: 'Read Only',\n value: 'readonly user', // The serializer will map it to 'readonly user'\n },\n];\n","import { createSelector } from 'reselect';\nimport jwt from 'jsonwebtoken';\nimport * as roles from '../../constants/roles';\n\nconst { OWNER, ADMIN, BILLING, OR_ADMIN, OR_SUPERUSER, OR_READONLY } = roles;\n// Add these roles above ass you need them : METRICS, READONLY, OR_SUPERREAD,\n\n/**\n * Returns the complete user state\n *\n * @param {object} state - Current state\n * @returns {object} - The entire user state\n */\nexport const getUserState = (state) => state.user;\n\n/**\n * Returns the session portion of the user state\n *\n * @param {object} state - Current state\n * @returns {object} - The session state\n */\nexport const getSessionState = (state) => state.user.session;\n\n/**\n * Returns the credentials portion of the user state\n *\n * @param {object} state - Current state\n * @returns {object} - The credentials state\n */\nexport const getCredentialsState = (state) => state.user.credentials;\n\n/**\n * Get `exp` field from access token.\n *\n * @param {object} state - Current state\n * @returns {number} - UTC (in ms) in which the accessToken is set to expire.\n */\nexport const getTokenExpirationDate = createSelector(getCredentialsState, (creds) =>\n creds.accessToken ? jwt.decode(creds.accessToken).exp * 1000 : null,\n);\n\n/**\n * Get `iat` field from access token.\n *\n * @param {object} state - Current state\n * @returns {number} - UTC (in ms) in which the accessToken was issued at.\n */\nexport const getTokenStartDate = createSelector(getCredentialsState, (creds) =>\n creds.accessToken ? jwt.decode(creds.accessToken).iat * 1000 : null,\n);\n\n/**\n * Returns the feature flags portion of the user state\n *\n * @param {object} flags - Raw map of feature flags for this user\n * @returns {object} - Map of feature flags, with each flag's current value\n */\nconst removeFlagHistory = (flags) =>\n Object.keys(flags).reduce((newFlags, key) => {\n const updatedFlags = { ...newFlags };\n let val = flags[key];\n val = val && Object.prototype.hasOwnProperty.call(val, 'current') ? val.current : val;\n updatedFlags[key] = val;\n return updatedFlags;\n }, {});\n\n/**\n * Returns the feature flags portion of the user state\n *\n * @param {object} state - Current state\n * @param {boolean} stripHistory - Whether or not to strip history (i.e. previous\n * and current properties) for each flag if known.\n * If true, will provide an object where are values of each key is the current\n * value of the flag.\n * If false, each flag may be represented as a single value or an object\n * containing the current and previous values (if the history is known):\n * {current: newValue, previous: oldValue}\n * @returns {object} - The feature flags state with appropriate history included\n */\nexport const getFeatureFlagsState = (state, stripHistory = false) =>\n stripHistory\n ? { ...state.user.featureFlags, flags: removeFlagHistory(state.user.featureFlags.flags) }\n : state.user.featureFlags;\n\n/**\n * Returns the url to use for the create instance flow\n *\n * @param {object} state - Current state\n * @returns {string} - The URL for the create flow.\n */\nexport const createStringSelector = (state) => {\n const flags = removeFlagHistory(state.user.featureFlags.flags);\n if (typeof flags.create === 'undefined') {\n return '/mission-ctrl/create-instance';\n }\n return flags.create;\n};\n\n/**\n * Get identity-related information (name, email, etc) for the user\n *\n * @param {object} state - Current state\n * @returns {object} - The identity state for current user\n */\nexport const getIdentityState = (state) => ({\n featureFlags: getFeatureFlagsState(state).flags,\n ...state.user.identity,\n});\n\n/**\n * Determine whether user is logged in with a valid, unexpired session\n *\n * @param {object} state - Current state\n * @returns {boolean} - Whether or not user is authenticated\n */\nexport const isAuthenticated = createSelector(getTokenExpirationDate, (expirationDate) => () =>\n expirationDate > Date.now(),\n);\n\n/**\n * Determine whether user is associated with an organization\n *\n * @param {object} state - Current state\n * @returns {boolean} - Whether or not user is associated with an organization\n */\nexport const needsOrganization = (state) => !getIdentityState(state).organizationId;\n\n/**\n * Determine whether user's email has been verified\n *\n * @param {object} state - Current state\n * @returns {boolean} - Whether or not user's email has been verified\n */\nexport const needsEmailVerification = (state) => !getIdentityState(state).emailVerified;\n\n/**\n * Determines whether or not a user is an admin\n *\n * @param {object} state - Current state\n * @returns {boolean} - Whether or not a user is an admin\n */\nconst ADMINS = [OR_ADMIN, OR_READONLY];\n\nexport const isAdmin = (state) =>\n ADMINS.some((role) => getIdentityState(state).roles.indexOf(role) !== -1);\n\nconst CUSTOMERADMINS = [OWNER, ADMIN];\n\nexport const isCustomerAdmin = (state) =>\n CUSTOMERADMINS.some((role) => getIdentityState(state).roles.indexOf(role) !== -1);\n\nconst BILLINGUSERS = [OWNER, BILLING, OR_ADMIN, OR_SUPERUSER];\n\nexport const isBillingUser = (state) =>\n BILLINGUSERS.some((role) => getIdentityState(state).roles.indexOf(role) !== -1);\n\nexport const isOwner = (state) =>\n [OWNER].some((role) => getIdentityState(state).roles.indexOf(role) !== -1);\n\nexport const isORv4User = (state) =>\n isAdmin(state) || isOwner(state) || typeof state.user.identity.ORv4ID !== 'undefined';\n\n// Objectrocket admins can login to v4 using the SSO link\nconst ORV4ADMINS = [OWNER, ADMIN, OR_ADMIN]\n\nexport const isORv4Admin = (state) => {\n const hasV4accessRoles = ORV4ADMINS.some((role) => getIdentityState(state).roles.indexOf(role) !== -1);\n \n // Org and User v4 account must be same.\n const hasDedicatedAccess = Boolean(state.org.orv4id) && Boolean(state.user.identity.ORv4ID) && \n state.org.orv4id === state.user.identity.ORv4ID;\n\n return hasV4accessRoles && hasDedicatedAccess\n}\n \n","import { replace } from 'connected-react-router';\nimport { EventTypes } from 'redux-segment';\nimport { RSAA } from 'redux-api-middleware';\n\nimport sortOrgsList from 'services/sortOrganizations/index';\nimport {\n LOG_IN_REQUESTED,\n LOG_OUT_REQUESTED,\n GET_FEATURE_FLAGS_REQUESTED,\n GET_FEATURE_FLAGS_SUCCESS,\n UPDATE_FEATURE_FLAGS_SUCCESS,\n SET_SESSION_SUCCESS,\n SET_SESSION_FAILURE,\n CREATE_EMAIL_VERIFICATION_REQUESTED,\n CREATE_EMAIL_VERIFICATION_SUCCESS,\n CREATE_EMAIL_VERIFICATION_FAILURE,\n IMPERSONATE_ORG,\n STOP_ORG_IMPERSONATION,\n SEARCH_ORGS_REQUESTED,\n SEARCH_ORGS_SUCCESS,\n SEARCH_ORGS_FAILURE,\n SORT_ORGS,\n START_MFA_SIGNUP_FLOW_REQUESTED,\n START_MFA_SIGNUP_FLOW_SUCCESS,\n START_MFA_SIGNUP_FLOW_FAILURE,\n GET_MFA_STATUS_REQUESTED,\n GET_MFA_STATUS_SUCCESS,\n GET_MFA_STATUS_FAILURE,\n REMOVE_MFA_ENROLLMENT_REQUESTED,\n REMOVE_MFA_ENROLLMENT_SUCCESS,\n REMOVE_MFA_ENROLLMENT_FAILURE,\n AWS_SIGNUP_FAILURE,\n} from '../actions';\nimport auth from '../../services/auth';\nimport featureFlags from '../../services/featureFlags';\nimport { getIdentityState } from './selectors';\nimport { setClearBannerState } from '../notifications/actionCreators';\n\nconst createEmailVerificationActionSet = (data) => ({\n [RSAA]: {\n types: [\n CREATE_EMAIL_VERIFICATION_REQUESTED,\n CREATE_EMAIL_VERIFICATION_SUCCESS,\n CREATE_EMAIL_VERIFICATION_FAILURE,\n ],\n method: 'POST',\n endpoint: '/emailverification/',\n body: JSON.stringify(data),\n },\n});\n\nexport const sendEmailVerification = (details) => (dispatch) =>\n dispatch(createEmailVerificationActionSet(details));\n\n/**\n * Initiates a silent login procedure in a hidden iframe. If the user is already logged in, this\n * will update the user's tokens without prompting them to do so. Can also send them to a new\n * destination once the call to update the session has been intiated.\n */\nexport const updateSession = (destination) => (dispatch) =>\n auth.checkSession().then(\n (authResult) => {\n const payload = authResult.idTokenPayload[process.env.REACT_APP_AUTH0_AUDIENCE];\n const analyticsPayload = {\n id: authResult.idTokenPayload.sub,\n traits: {\n email: payload.email,\n },\n };\n dispatch({\n type: SET_SESSION_SUCCESS,\n payload: authResult,\n meta: {\n analytics: {\n eventType: EventTypes.identify,\n eventPayload: analyticsPayload,\n },\n },\n });\n if (destination) {\n dispatch(replace(destination));\n }\n },\n (error) => {\n dispatch({ type: SET_SESSION_FAILURE, error });\n dispatch(replace('/logout'));\n },\n );\n\n/**\n * Initiates a login that will redirect the user to the desired originatingURL\n * upon logging in.\n *\n * @param {string} originatingURL - The URL be visited when login was intitiated\n */\nexport const logIn = (originatingURL) => (dispatch) => {\n dispatch({\n type: LOG_IN_REQUESTED,\n payload: originatingURL,\n });\n auth.manualAuthorize();\n};\n\nexport const logInSSO = (originatingURL) => (dispatch) => {\n dispatch({\n type: LOG_IN_REQUESTED,\n payload: originatingURL,\n });\n auth.manualAuthorize(true);\n};\n\n/**\n * Initiate a sign up process for an AWS customer.\n * If usccessful, also logs them in and redirects to the AWS onboarding page\n */\nexport const logInAWS = (data, awsToken) => (dispatch) =>\n auth.logInAWS(data, awsToken).catch((err) => {\n const sanitizedError = err;\n if (err && err.original) {\n delete sanitizedError.original;\n }\n dispatch({\n type: AWS_SIGNUP_FAILURE,\n payload: err,\n });\n return err;\n });\n\n/**\n * Initiate a log out\n */\nexport const logOut = () => (dispatch) => {\n dispatch({\n type: LOG_OUT_REQUESTED,\n meta: {\n analytics: true,\n },\n });\n auth.logOut();\n};\n\n/**\n * Set session based on token passed in URL\n *\n * @param {string} location - The current URL, including the token\n * @param {string} destination - The URL to direct to when session is set\n */\nexport const setSession = (location, destination) => (dispatch) =>\n auth.parseCreds(location).then(\n (creds) => {\n const payload = creds.idTokenPayload[process.env.REACT_APP_AUTH0_AUDIENCE];\n const analyticsPayload = {\n userId: creds.idTokenPayload.sub,\n traits: {\n email: payload.email,\n },\n };\n dispatch({\n type: SET_SESSION_SUCCESS,\n payload: creds,\n meta: {\n analytics: {\n eventType: EventTypes.identify,\n eventPayload: analyticsPayload,\n },\n },\n });\n dispatch(replace(destination || '/'));\n },\n (error) => {\n dispatch({\n type: SET_SESSION_FAILURE,\n error,\n });\n dispatch(replace('/error/400'));\n },\n );\n\n/**\n * Subscribe to streaming updates to the feature flags for same user that\n * initialized the loading of the feature flags.\n */\nexport const subscribeToFeatureFlags = () => (dispatch) => {\n featureFlags.subscribe((flags) => {\n dispatch({\n type: UPDATE_FEATURE_FLAGS_SUCCESS,\n payload: flags,\n });\n });\n};\n\n/**\n * Unsubscribe to streaming updates to feature flags for same user that\n * initialized the loading of the feature flags.\n */\nexport const unsubscribeFromFeatureFlags = () => () => {\n featureFlags.unsubscribe();\n};\n\n/**\n * Get feature flags for the given user\n *\n * @param {object} user - The user to get the feature flags for\n * @returns {Promise} - Promise that will be resolved when feature flags load\n */\nexport const getFeatureFlags = (user = {}) => (dispatch) => {\n dispatch({\n type: GET_FEATURE_FLAGS_REQUESTED,\n });\n return featureFlags.getFlags(user, user.featureFlags).then(\n (val) => {\n dispatch({\n type: GET_FEATURE_FLAGS_SUCCESS,\n payload: val,\n });\n subscribeToFeatureFlags()(dispatch);\n },\n () => {\n dispatch({\n type: GET_FEATURE_FLAGS_SUCCESS,\n payload: {},\n });\n },\n );\n};\n\nconst impersonateOrgActionSet = (id) => ({\n type: IMPERSONATE_ORG,\n payload: id,\n});\n\n/**\n * Impersonatate an org\n *\n * @param {string} orgId - The id of the organization a user will impersonate\n */\nexport const impersonateOrg = (orgId) => (dispatch) => {\n dispatch(impersonateOrgActionSet(orgId));\n dispatch(setClearBannerState());\n};\n\nconst stopOrgImpersonationActionSet = () => ({\n type: STOP_ORG_IMPERSONATION,\n payload: null,\n});\n\n/**\n * Stop org impersonation\n */\nexport const stopOrgImpersonation = () => (dispatch) => {\n dispatch(stopOrgImpersonationActionSet());\n dispatch(setClearBannerState());\n};\n\n/**\n * Search for an Org to Impersonate\n *\n * @param {string} query - The search parameters used to find an organization to impersonate\n */\nconst searchOrgsActionSet = (query) => ({\n [RSAA]: {\n types: [\n {\n type: SEARCH_ORGS_REQUESTED,\n payload: query,\n },\n SEARCH_ORGS_SUCCESS,\n SEARCH_ORGS_FAILURE,\n ],\n method: 'GET',\n endpoint: `/organizations/?search=${query}`,\n },\n});\n\nexport const searchOrgs = (query) => (dispatch) => dispatch(searchOrgsActionSet(query));\n\n/**\n * Sort the list of Orgs after searching for them\n *\n * @param {string} sortBy - The value of the sortBy select field on the orgImpersonationPage\n */\nconst sortOrgsActionSet = (sortBy, list) => ({\n type: SORT_ORGS,\n payload: {\n sortBy,\n list,\n },\n});\n\nexport const sortOrgs = (sortBy) => (dispatch, getState) => {\n const { list } = getIdentityState(getState()).orgSearchList;\n if (!list.length) return dispatch(sortOrgsActionSet(sortBy, null));\n return dispatch(sortOrgsActionSet(sortBy, sortOrgsList(sortBy, list)));\n};\n\n/**\n * Start the MFA signup flow for the user\n */\nconst startMFASignupFlowActionSet = (userId, sendMail) => ({\n [RSAA]: {\n types: [\n START_MFA_SIGNUP_FLOW_REQUESTED,\n START_MFA_SIGNUP_FLOW_SUCCESS,\n START_MFA_SIGNUP_FLOW_FAILURE,\n ],\n method: 'POST',\n endpoint: '/mfa/',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n user_id: userId,\n send_mail: sendMail,\n }),\n },\n});\n\nexport const startMFASignupFlow = (userId, sendMail) => (dispatch) =>\n // Do not use with dev+ricketyclickit\n dispatch(startMFASignupFlowActionSet(userId, sendMail)).then((response) => {\n if (response.type === START_MFA_SIGNUP_FLOW_SUCCESS) {\n dispatch(replace('/logout'));\n }\n });\n\n/**\n * Get the MFA status for the user\n */\nconst getMFAStatusActionSet = (userId) => ({\n [RSAA]: {\n types: [GET_MFA_STATUS_REQUESTED, GET_MFA_STATUS_SUCCESS, GET_MFA_STATUS_FAILURE],\n method: 'GET',\n endpoint: `/mfa/${userId}/enrollments/`,\n headers: { 'Content-Type': 'application/json' },\n },\n});\n\nexport const getMFAStatus = (userId) => (dispatch) => {\n dispatch(getMFAStatusActionSet(userId));\n};\n\n/**\n * Remove MFA Enrollment for the user\n */\nconst removeMFAEnrollmentActionSet = (userId, enrollmentId) => ({\n [RSAA]: {\n types: [\n REMOVE_MFA_ENROLLMENT_REQUESTED,\n REMOVE_MFA_ENROLLMENT_SUCCESS,\n REMOVE_MFA_ENROLLMENT_FAILURE,\n ],\n method: 'DELETE',\n endpoint: `/mfa/${userId}/enrollments/${enrollmentId}/`,\n headers: { 'Content-Type': 'text/html; charset=UTF-8' },\n },\n});\n\nexport const removeMFAEnrollment = (userId, enrollmentId) => (dispatch) =>\n dispatch(removeMFAEnrollmentActionSet(userId, enrollmentId));\n","/**\n * Service for sorting organizations returned from a search on the Org Impersonation page\n */\n\n/**\n * Sorts a list of organization objects based on params given\n * @param {string} sortBy - The value of the sortBy select field on the orgImpersonationPage\n * @param {array} orgs - The list of organization objects found in the search\n *\n * @returns {array} - Returns an array of objects sorted by the params given\n */\nexport default function sortOrgsList(sortBy, orgs) {\n const sliceIndex = sortBy.match(/Asc|Desc/).index;\n const [orderBy, order] = [sortBy.slice(0, sliceIndex), sortBy.slice(sliceIndex)];\n const desc = (a, b) => {\n if (b[orderBy].toLowerCase() < a[orderBy].toLowerCase()) return -1;\n if (b[orderBy].toLowerCase() > a[orderBy].toLowerCase()) return 1;\n return 0;\n };\n const getSorting = () => (order === 'Desc' ? (a, b) => desc(a, b) : (a, b) => -desc(a, b));\n\n return orgs.sort(getSorting(orderBy, order));\n}\n","import reducers from './reducers';\nimport * as actionCreators from './actionCreators';\nimport * as selectors from './selectors';\n\nexport { actionCreators, selectors };\n\nexport default reducers;\n","import {\n GET_USER_REQUESTED,\n GET_USER_SUCCESS,\n GET_USER_FAILURE,\n GET_USER_POLL,\n PATCH_USER_REQUESTED,\n PATCH_USER_SUCCESS,\n PATCH_USER_FAILURE,\n DELETE_USER_REQUESTED,\n DELETE_USER_SUCCESS,\n DELETE_USER_FAILURE,\n CREATE_USERINVITE_REQUESTED,\n CREATE_USERINVITE_SUCCESS,\n CREATE_USERINVITE_FAILURE,\n GET_USERINVITE_REQUESTED,\n GET_USERINVITE_SUCCESS,\n GET_USERINVITE_FAILURE,\n DELETE_USERINVITE_REQUESTED,\n DELETE_USERINVITE_SUCCESS,\n DELETE_USERINVITE_FAILURE,\n} from '../actions';\n\nexport const initialState = {\n userInviteRoles: [],\n error: null,\n isLoadingUsers: false, // Used for spinner since this call is slower than all others\n isLoading: false,\n invites: [],\n users: [],\n};\n\nexport default (state = initialState, action) => {\n switch (action.type) {\n case GET_USER_REQUESTED:\n return {\n ...state,\n isLoadingUsers: true,\n error: null,\n };\n\n case GET_USER_SUCCESS:\n return {\n ...state,\n isLoadingUsers: false,\n users: action.payload.results,\n };\n\n case GET_USER_FAILURE:\n return {\n ...state,\n isLoadingUsers: false,\n error: action.payload,\n };\n\n case GET_USER_POLL:\n return {\n ...state,\n };\n\n case PATCH_USER_REQUESTED:\n return {\n ...state,\n isLoadingUsers: false, // Do not show page spinner during patch, use form spinner instead\n error: null,\n };\n\n case PATCH_USER_SUCCESS: {\n const { users } = state;\n\n const cachedUsers = users.map((user) => {\n const retUser = { ...user };\n if (user.id === action.meta.userId) {\n if (action.payload.accessDedicated) {\n retUser.orv4id = action.meta.orgORv4ID;\n } else {\n retUser.orv4id = null;\n }\n }\n return retUser;\n });\n\n return {\n ...state,\n users: cachedUsers,\n isLoadingUsers: false,\n };\n }\n\n case PATCH_USER_FAILURE:\n return {\n ...state,\n isLoadingUsers: false,\n error: action.payload.response,\n };\n\n case DELETE_USER_REQUESTED:\n return {\n ...state,\n isLoadingUsers: true,\n error: null,\n };\n\n case DELETE_USER_SUCCESS:\n return {\n ...state,\n isLoadingUsers: false,\n users: state.users.filter((user) => user.id !== action.meta.userId),\n };\n\n case DELETE_USER_FAILURE:\n return {\n ...state,\n isLoadingUsers: false,\n error: action.payload,\n };\n\n case CREATE_USERINVITE_REQUESTED:\n return {\n ...state,\n isLoading: true,\n error: null,\n };\n\n case CREATE_USERINVITE_SUCCESS:\n return {\n ...state,\n isLoading: false,\n invites: [action.payload, ...state.invites],\n };\n\n case CREATE_USERINVITE_FAILURE:\n return {\n ...state,\n isLoading: false,\n error: action.payload,\n };\n\n case GET_USERINVITE_REQUESTED:\n return {\n ...state,\n isLoading: true,\n error: null,\n };\n\n case GET_USERINVITE_SUCCESS:\n return {\n ...state,\n isLoading: false,\n invites: action.payload,\n };\n\n case GET_USERINVITE_FAILURE:\n return {\n ...state,\n isLoading: false,\n error: action.payload,\n };\n\n case DELETE_USERINVITE_REQUESTED:\n return {\n ...state,\n isLoading: true,\n error: null,\n };\n\n case DELETE_USERINVITE_SUCCESS:\n return {\n ...state,\n isLoading: false,\n invites: state.invites.filter((invite) => invite.id !== action.meta.inviteId),\n };\n\n case DELETE_USERINVITE_FAILURE:\n return {\n ...state,\n isLoading: false,\n error: action.payload,\n };\n\n default:\n return state;\n }\n};\n","import { RSAA } from 'redux-api-middleware';\nimport {\n GET_USER_REQUESTED,\n GET_USER_SUCCESS,\n GET_USER_FAILURE,\n GET_USER_POLL,\n PATCH_USER_REQUESTED,\n PATCH_USER_SUCCESS,\n PATCH_USER_FAILURE,\n DELETE_USER_REQUESTED,\n DELETE_USER_SUCCESS,\n DELETE_USER_FAILURE,\n CREATE_USERINVITE_REQUESTED,\n CREATE_USERINVITE_SUCCESS,\n CREATE_USERINVITE_FAILURE,\n GET_USERINVITE_REQUESTED,\n GET_USERINVITE_SUCCESS,\n GET_USERINVITE_FAILURE,\n DELETE_USERINVITE_REQUESTED,\n DELETE_USERINVITE_SUCCESS,\n DELETE_USERINVITE_FAILURE,\n} from '../actions';\n\nconst getUsersPollActionSet = () => ({\n [RSAA]: {\n types: [GET_USER_POLL, GET_USER_SUCCESS, GET_USER_FAILURE],\n method: 'GET',\n endpoint: '/users/',\n },\n});\n\nexport const getUsersPoll = () => (dispatch) => dispatch(getUsersPollActionSet());\n\nconst getUsersActionSet = () => ({\n [RSAA]: {\n types: [GET_USER_REQUESTED, GET_USER_SUCCESS, GET_USER_FAILURE],\n method: 'GET',\n endpoint: '/users/',\n },\n});\n\nexport const getUsersState = () => (dispatch) => dispatch(getUsersActionSet());\n\nconst updateUsersActionSet = (data, userId, orgORv4ID) => ({\n [RSAA]: {\n types: [\n PATCH_USER_REQUESTED,\n {\n type: PATCH_USER_SUCCESS,\n meta: { userId, orgORv4ID },\n },\n PATCH_USER_FAILURE,\n ],\n method: 'PATCH',\n endpoint: `/users/${userId}/`,\n body: JSON.stringify(data),\n },\n});\n\nexport const updateUsersState = (details, userId, orgORv4ID) => (dispatch) =>\n dispatch(updateUsersActionSet(details, userId, orgORv4ID));\n\nconst deleteUserActionSet = (id) => ({\n [RSAA]: {\n types: [\n DELETE_USER_REQUESTED,\n {\n type: DELETE_USER_SUCCESS,\n meta: { userId: id },\n },\n DELETE_USER_FAILURE,\n ],\n method: 'DELETE',\n endpoint: `/users/${id}/`,\n },\n});\n\nexport const deleteUser = (id) => (dispatch) => dispatch(deleteUserActionSet(id));\n\nconst createUserInviteActionSet = (data) => ({\n [RSAA]: {\n types: [\n CREATE_USERINVITE_REQUESTED,\n {\n type: CREATE_USERINVITE_SUCCESS,\n meta: {\n analytics: true,\n },\n },\n CREATE_USERINVITE_FAILURE,\n ],\n method: 'POST',\n endpoint: '/userinvites/',\n body: JSON.stringify(data),\n },\n});\n\nexport const createUserInvite = (details) => (dispatch) =>\n dispatch(createUserInviteActionSet(details));\n\nconst getUserInviteActionSet = () => ({\n [RSAA]: {\n types: [GET_USERINVITE_REQUESTED, GET_USERINVITE_SUCCESS, GET_USERINVITE_FAILURE],\n method: 'GET',\n endpoint: '/userinvites/',\n },\n});\n\nexport const getUserInvitesState = () => (dispatch) => dispatch(getUserInviteActionSet());\n\nconst deleteUserInviteActionSet = (id) => ({\n [RSAA]: {\n types: [\n DELETE_USERINVITE_REQUESTED,\n {\n type: DELETE_USERINVITE_SUCCESS,\n meta: { inviteId: id },\n },\n DELETE_USERINVITE_FAILURE,\n ],\n method: 'DELETE',\n endpoint: `/userinvites/${id}/`,\n },\n});\n\nexport const deleteUserInviteState = (id) => (dispatch) => dispatch(deleteUserInviteActionSet(id));\n\nexport const resendUserInviteState = (id, data) => (dispatch) =>\n dispatch(deleteUserInviteActionSet(id)).then(() => dispatch(createUserInvite(data)));\n","/**\n * Returns the complete users management state\n *\n * @param {object} state - Current state\n * @returns {object} - The entire banner notification state\n */\nfunction getUsersManagementState(state) {\n const toRet = {\n ...state.usersManagement,\n };\n return toRet;\n}\n\nexport default getUsersManagementState;\n","import reducers from './reducers';\nimport * as actionCreators from './actionCreators';\nimport * as selectors from './selectors';\n\nexport { actionCreators, selectors };\n\nexport default reducers;\n","import {\n VALIDATE_INVITE_TOKEN_REQUESTED,\n VALIDATE_INVITE_TOKEN_SUCCESS,\n VALIDATE_INVITE_TOKEN_FAILURE,\n ACCEPT_INVITATION_REQUESTED,\n ACCEPT_INVITATION_SUCCESS,\n ACCEPT_INVITATION_FAILURE,\n} from '../actions';\n\nexport const initialState = {\n isLoading: true,\n error: null,\n inviteTokenValidatedData: null,\n inviteAccepted: null,\n};\n\nexport default (state = initialState, action) => {\n switch (action.type) {\n case VALIDATE_INVITE_TOKEN_REQUESTED:\n return {\n ...state,\n isLoading: true,\n };\n\n case VALIDATE_INVITE_TOKEN_SUCCESS:\n return {\n ...state,\n isLoading: false,\n inviteTokenValidatedData: action.payload,\n };\n\n case VALIDATE_INVITE_TOKEN_FAILURE:\n return {\n ...state,\n isLoading: false,\n error: action.payload,\n };\n\n case ACCEPT_INVITATION_REQUESTED:\n return {\n ...state,\n isLoading: false,\n };\n\n case ACCEPT_INVITATION_SUCCESS:\n return {\n ...state,\n isLoading: false,\n inviteAccepted: true,\n };\n\n case ACCEPT_INVITATION_FAILURE:\n return {\n ...state,\n isLoading: false,\n error: action.payload,\n };\n\n default:\n return state;\n }\n};\n","import { RSAA } from 'redux-api-middleware';\nimport { replace } from 'connected-react-router';\nimport {\n VALIDATE_INVITE_TOKEN_REQUESTED,\n VALIDATE_INVITE_TOKEN_SUCCESS,\n VALIDATE_INVITE_TOKEN_FAILURE,\n ACCEPT_INVITATION_REQUESTED,\n ACCEPT_INVITATION_SUCCESS,\n ACCEPT_INVITATION_FAILURE,\n} from '../actions';\n\nconst validateInviteTokenActionSet = (jwt) => ({\n [RSAA]: {\n types: [\n VALIDATE_INVITE_TOKEN_REQUESTED,\n VALIDATE_INVITE_TOKEN_SUCCESS,\n VALIDATE_INVITE_TOKEN_FAILURE,\n ],\n method: 'POST',\n endpoint: '/userinvite/validate/',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ jwt }),\n },\n});\n\nexport const validateInviteToken = (jwt) => (dispatch) =>\n dispatch(validateInviteTokenActionSet(jwt));\n\nconst acceptInvitationActionSet = (newJwt, data, needsSignup) => {\n let userData;\n if (needsSignup) {\n userData = {\n new_jwt: newJwt,\n password: data.password,\n firstname: data.firstname,\n lastname: data.lastname,\n };\n } else {\n userData = {\n new_jwt: newJwt,\n password: '',\n firstname: '',\n lastname: '',\n };\n }\n\n return {\n [RSAA]: {\n types: [\n ACCEPT_INVITATION_REQUESTED,\n {\n type: ACCEPT_INVITATION_SUCCESS,\n meta: {\n analytics: true,\n },\n },\n ACCEPT_INVITATION_FAILURE,\n ],\n method: 'POST',\n endpoint: '/userinvite/accept/',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(userData),\n },\n };\n};\n\nexport const acceptInvitation = (newJwt, data, needsSignup) => (dispatch) =>\n dispatch(acceptInvitationActionSet(newJwt, data, needsSignup));\n\nexport const acceptInvitationRedirect = () => (dispatch) =>\n // We should redirect to /login but since there are situations where we send and receive the\n // invite in the same computer(like a demo for a customer) then we redirect to /logout to clear\n // all the variables. NOTE that being in PRIVATE MODE applies only cookies. Local storage still\n // inherited (not shared) between tabs and different windows even when in private mode.\n dispatch(replace('/logout'));\n","/**\n * Returns the complete users management state\n *\n * @param {object} state - Current state\n * @returns {object} - The entire banner notification state\n */\nfunction getUsersInviteSignupState(state) {\n const toRet = {\n ...state.usersInviteSignup,\n };\n return toRet;\n}\n\nexport default getUsersInviteSignupState;\n","import reducers from './reducers';\nimport * as actionCreators from './actionCreators';\nimport * as selectors from './selectors';\n\nexport { actionCreators, selectors };\n\nexport default reducers;\n","import {\n CREATE_ORG_REQUESTED,\n CREATE_ORG_SUCCESS,\n CREATE_ORG_FAILURE,\n CREATE_AWS_ORG_REQUESTED,\n CREATE_AWS_ORG_SUCCESS,\n CREATE_AWS_ORG_FAILURE,\n UPDATE_ORG_REQUESTED,\n UPDATE_ORG_SUCCESS,\n UPDATE_ORG_FAILURE,\n GET_ORG_REQUESTED,\n GET_ORG_SUCCESS,\n GET_ORG_FAILURE,\n UPDATE_STRIPE_SOURCE_SUCCESS,\n BILLING_SETUP_COMPLETED,\n GET_UPCOMING_INVOICE_REQUESTED,\n GET_UPCOMING_INVOICE_SUCCESS,\n GET_UPCOMING_INVOICE_FAILURE,\n GET_PAST_INVOICES_REQUESTED,\n GET_PAST_INVOICES_SUCCESS,\n GET_PAST_INVOICES_FAILURE,\n} from '../actions';\n\nexport const initialState = {\n companyName: null,\n id: null,\n primaryEmail: null,\n phoneNumber: null,\n billingSetupComplete: null,\n billingType: 1,\n isSaving: false,\n isLoading: false,\n error: null,\n pastInvoices: [],\n upcomingInvoices: [],\n trialCreditCents: null,\n awsCustomer: null,\n};\n\nexport default (state = initialState, action) => {\n switch (action.type) {\n case BILLING_SETUP_COMPLETED:\n return {\n ...state,\n billingSetupComplete: true,\n };\n\n case GET_ORG_REQUESTED:\n return {\n ...state,\n isLoading: true,\n };\n\n case CREATE_AWS_ORG_SUCCESS:\n case CREATE_ORG_SUCCESS:\n case UPDATE_ORG_SUCCESS:\n case GET_ORG_SUCCESS:\n return {\n ...state,\n ...action.payload,\n isLoading: false,\n isSaving: false,\n };\n\n case GET_ORG_FAILURE:\n return {\n ...state,\n isLoading: false,\n error: action.payload,\n };\n\n case CREATE_AWS_ORG_REQUESTED:\n case CREATE_ORG_REQUESTED:\n case UPDATE_ORG_REQUESTED:\n return {\n ...state,\n isSaving: true,\n };\n\n case CREATE_AWS_ORG_FAILURE:\n case CREATE_ORG_FAILURE:\n case UPDATE_ORG_FAILURE:\n return {\n ...state,\n isSaving: false,\n error: action.payload,\n };\n\n case UPDATE_STRIPE_SOURCE_SUCCESS:\n return {\n ...state,\n stripeCustomerId: action.payload.stripeCustomerId,\n };\n\n case GET_UPCOMING_INVOICE_REQUESTED:\n return {\n ...state,\n };\n\n case GET_UPCOMING_INVOICE_SUCCESS:\n if (action.payload.detail && action.payload.detail.includes('no upcoming invoice')) {\n return {\n ...state,\n upcomingInvoices: [],\n };\n }\n return {\n ...state,\n upcomingInvoices: [action.payload],\n };\n\n case GET_UPCOMING_INVOICE_FAILURE:\n return {\n ...state,\n error: action.payload,\n };\n\n case GET_PAST_INVOICES_REQUESTED:\n return {\n ...state,\n };\n\n case GET_PAST_INVOICES_SUCCESS:\n return {\n ...state,\n pastInvoices: [...action.payload],\n };\n\n case GET_PAST_INVOICES_FAILURE:\n return {\n ...state,\n error: action.payload,\n };\n\n default:\n return state;\n }\n};\n","import { RSAA } from 'redux-api-middleware';\n\nimport { getIdentityState } from '../user/selectors';\nimport {\n CREATE_ORG_REQUESTED,\n CREATE_ORG_SUCCESS,\n CREATE_ORG_FAILURE,\n CREATE_AWS_ORG_REQUESTED,\n CREATE_AWS_ORG_SUCCESS,\n CREATE_AWS_ORG_FAILURE,\n UPDATE_ORG_REQUESTED,\n UPDATE_ORG_SUCCESS,\n UPDATE_ORG_FAILURE,\n CREATE_STRIPE_SOURCE_REQUESTED,\n CREATE_STRIPE_SOURCE_SUCCESS,\n CREATE_STRIPE_SOURCE_FAILURE,\n UPDATE_STRIPE_SOURCE_REQUESTED,\n UPDATE_STRIPE_SOURCE_SUCCESS,\n UPDATE_STRIPE_SOURCE_FAILURE,\n GET_ORG_REQUESTED,\n GET_ORG_SUCCESS,\n GET_ORG_FAILURE,\n BILLING_SETUP_COMPLETED,\n GET_UPCOMING_INVOICE_REQUESTED,\n GET_UPCOMING_INVOICE_SUCCESS,\n GET_UPCOMING_INVOICE_FAILURE,\n GET_PAST_INVOICES_REQUESTED,\n GET_PAST_INVOICES_SUCCESS,\n GET_PAST_INVOICES_FAILURE,\n} from '../actions';\n\nconst createOrgActionSet = (data) => ({\n [RSAA]: {\n types: [\n CREATE_ORG_REQUESTED,\n {\n type: CREATE_ORG_SUCCESS,\n meta: {\n analytics: true,\n company: data.companyName,\n phone: data.phoneNumber,\n },\n },\n CREATE_ORG_FAILURE,\n ],\n method: 'POST',\n endpoint: '/organizations/',\n body: JSON.stringify(data),\n },\n});\n\n/**\n * Creates an organization based on the provided details\n *\n * @param {object} details - The details of the org\n */\nexport const createOrg = (details) => (dispatch) => dispatch(createOrgActionSet(details));\n\nconst createAWSOrgActionSet = (awsToken) => ({\n [RSAA]: {\n types: [\n CREATE_AWS_ORG_REQUESTED,\n {\n type: CREATE_AWS_ORG_SUCCESS,\n meta: {\n analytics: true,\n },\n },\n CREATE_AWS_ORG_FAILURE,\n ],\n method: 'POST',\n endpoint: '/awsorg/',\n body: JSON.stringify({\n token: awsToken,\n }),\n },\n});\n\n/**\n * Creates an organization based on the provided details\n *\n * @param {object} details - The details of the org\n */\nexport const createAWSOrg = (token) => (dispatch) => dispatch(createAWSOrgActionSet(token));\n\nconst updateOrgActionSet = (id, data) => ({\n [RSAA]: {\n types: [\n UPDATE_ORG_REQUESTED,\n {\n type: UPDATE_ORG_SUCCESS,\n meta: { analytics: true },\n },\n UPDATE_ORG_FAILURE,\n ],\n method: 'PATCH',\n endpoint: `/organizations/${id}/`,\n body: JSON.stringify(data),\n },\n});\n\n/**\n * Updates the existing organization that the logged-in user is associated with\n *\n * @param {object} details - The details of the org to update\n */\nexport const updateOrg = (data) => (dispatch, getState) =>\n dispatch(updateOrgActionSet(getIdentityState(getState()).organizationId, data));\n\nconst getOrgActionSet = (id) => ({\n [RSAA]: {\n types: [GET_ORG_REQUESTED, GET_ORG_SUCCESS, GET_ORG_FAILURE],\n method: 'GET',\n endpoint: `/organizations/${id}/`,\n },\n});\n\n/**\n * Loads the organization details for the logged-in user\n */\nexport const getOrg = () => (dispatch, getState) => {\n const orgId =\n getIdentityState(getState()).impersonatedOrganizationId ||\n getIdentityState(getState()).organizationId;\n return dispatch(getOrgActionSet(orgId));\n};\n\nconst updateStripeSourceActionSet = (data) => ({\n [RSAA]: {\n types: [\n UPDATE_STRIPE_SOURCE_REQUESTED,\n {\n type: UPDATE_STRIPE_SOURCE_SUCCESS,\n meta: { analytics: true },\n },\n UPDATE_STRIPE_SOURCE_FAILURE,\n ],\n method: 'POST',\n endpoint: '/setstripesource/',\n body: JSON.stringify({ source_id: data }),\n },\n});\n\n/**\n * Updates the Stripe source for the user's organization\n *\n * @param {string} sourceId - The Stripe source id of the payment\n */\nexport const updateStripeSource = (sourceId) => (dispatch) =>\n dispatch(updateStripeSourceActionSet(sourceId));\n\n/**\n * Updates the Stripe source for the user's organization\n *\n * @param {function} stripeCreateFn - A function provided by the Stripe library to create a source\n * @param {object} payment - An object representing the payment type being created\n *\n * Note: Accepts the stripeCreateFn since the Stripe lib functions are injected in components\n */\nexport const createStripeSource = (stripeCreateFn, payment) => (dispatch, getState) => {\n const userInfo = {\n owner: {\n email: getIdentityState(getState()).email,\n },\n };\n\n const successHandler = (resolve) => (payload) => {\n if (payload.error) {\n throw payload.error;\n }\n\n dispatch({\n type: CREATE_STRIPE_SOURCE_SUCCESS,\n meta: {\n analytics: true,\n },\n });\n\n resolve(payload);\n };\n\n dispatch({\n type: CREATE_STRIPE_SOURCE_REQUESTED,\n });\n\n return new Promise((resolve, reject) => {\n try {\n stripeCreateFn({ ...payment, ...userInfo })\n .then(successHandler(resolve))\n .catch((err) => {\n dispatch({\n type: CREATE_STRIPE_SOURCE_FAILURE,\n });\n reject(err);\n });\n } catch (err) {\n dispatch({\n type: CREATE_STRIPE_SOURCE_FAILURE,\n });\n reject(err);\n }\n });\n};\n\n/**\n * Updates the billSetupComplete field for the user's organization\n */\nexport const completeBillingSetup = () => (dispatch) =>\n dispatch({\n type: BILLING_SETUP_COMPLETED,\n });\n\nconst getUpcomingInvoiceActionSet = (orgId) => ({\n [RSAA]: {\n types: [\n GET_UPCOMING_INVOICE_REQUESTED,\n GET_UPCOMING_INVOICE_SUCCESS,\n GET_UPCOMING_INVOICE_FAILURE,\n ],\n method: 'GET',\n endpoint: `/invoices/upcoming/?organizationId=${orgId}`,\n },\n});\n\n/**\n * Get an organization's upcoming invoice\n *\n */\nexport const getUpcomingInvoice = (orgId) => (dispatch) =>\n dispatch(getUpcomingInvoiceActionSet(orgId));\n\nconst getPastInvoicesActionSet = (orgId) => ({\n [RSAA]: {\n types: [GET_PAST_INVOICES_REQUESTED, GET_PAST_INVOICES_SUCCESS, GET_PAST_INVOICES_FAILURE],\n method: 'GET',\n endpoint: `/invoices/past/?organizationId=${orgId}`,\n },\n});\n\n/**\n * Get an organization's upcoming invoice\n *\n */\nexport const getPastInvoices = (orgId) => (dispatch) => dispatch(getPastInvoicesActionSet(orgId));\n","import { createSelector } from 'reselect';\nimport { selectors as userSelectors } from '../user';\n\n/**\n * Returns the complete organization state\n *\n * @param {object} state - Current state\n * @returns {object} - The entire organization state\n */\nexport const getOrgState = (state) => state.org;\n\n/**\n * Returns whether the user has completed the billing process\n *\n * @param {object} state - Current state\n * @returns {bool} - Returns whether the user has completed the billing process\n */\nexport const needsBilling = (state) => !state.org.billingSetupComplete;\n\n/**\n * Returns whether a user needs to complete any of the sign up steps\n *\n * @param {object} state - Current state\n * @returns {boolean} - Whether the user needs to complete any of the sign up steps\n */\nexport const needsSignUpSteps = createSelector(\n userSelectors.needsEmailVerification,\n userSelectors.needsOrganization,\n (email, org) => email || org,\n);\n\n/**\n * Returns whether or not an ORG is AWS-only.\n *\n * @param {object} state - Current state\n * @returns {boolean} - Whether or not the org is AWS-only\n */\nexport const awsOnlySelector = createSelector(getOrgState, (orgState) =>\n Boolean(orgState.awsCustomer),\n);\n\n/**\n * Returns the org-level ORv4ID, if it exists\n *\n * @param {object} state - Current state\n * @returns {(string|null)} - The org's ORv4ID, or null if there is none\n */\nexport const orgORv4IDSelector = createSelector(getOrgState, (orgState) => orgState.orv4id);\n\n/**\n * Returns whether or not an ORG is fastlane billed.\n * In APIV, BILLING_FASTLANE = 4.\n *\n * @param {object} state - Current state\n * @returns {boolean} - Whether or not the org is fastlane billed\n */\nexport const isFastlaneCustomerSelector = createSelector(\n getOrgState,\n (orgState) => orgState.billingType === 4,\n);\n","import reducers from './reducers';\nimport * as actionCreators from './actionCreators';\nimport * as selectors from './selectors';\n\nexport { actionCreators, selectors };\n\nexport default reducers;\n","import {\n NEXT_CREATE_STAGE,\n PREVIOUS_CREATE_STAGE,\n RESET_STEPS,\n SELECT_SERVICE,\n SELECT_SERVICE_SUBTYPE,\n SELECT_VERSION,\n SELECT_REGION,\n SELECT_PROVIDER,\n ENTER_NAME,\n SELECT_FLAVOR,\n SELECT_ADDON,\n DESELECT_ADDON,\n SELECT_PLAN,\n ENTER_CIDR,\n ENTER_ACL_NAME,\n SELECT_ACL_KIND,\n ADD_ACL,\n REMOVE_ACL,\n ADD_IPS_LATER,\n CREATEINSTANCE_REQUESTED,\n CREATEINSTANCE_SUCCESS,\n CREATEINSTANCE_FAILURE,\n RESET_CREATEINSTANCE_ERROR_STATE,\n GETIP_REQUESTED,\n GETIP_SUCCESS,\n GETIP_FAILURE,\n GETIP_CLEAR,\n GET_PRICE_REQUESTED,\n GET_PRICE_SUCCESS,\n GET_PRICE_FAILURE,\n} from '../actions';\n\nexport const initialState = {\n activeStep: 0,\n addIpsLater: false,\n isLoading: false,\n error: null,\n myip: null,\n newInstance: {\n newInstanceName: '',\n newInstanceService: {},\n newInstanceServiceSubtype: {},\n newInstanceVersion: '0',\n newInstanceRegion: '0',\n newInstanceCloudProvider: {},\n newInstanceFlavorIndex: -1,\n newInstanceAddons: [],\n newInstancePlan: {},\n newInstancePlanIndex: 0,\n newInstanceAcls: [],\n },\n price: 0,\n};\n\nexport default function createInstanceReducer(state = initialState, action) {\n switch (action.type) {\n case NEXT_CREATE_STAGE:\n return { ...state, activeStep: action.payload };\n\n case PREVIOUS_CREATE_STAGE:\n return { ...state, activeStep: action.payload };\n\n case RESET_STEPS:\n return {\n ...initialState,\n };\n\n case SELECT_SERVICE:\n return {\n ...state,\n newAcl: {},\n newInstance: {\n ...initialState.newInstance,\n newInstanceService: action.payload.selectedService,\n newInstanceServiceSubtype: action.payload.defaultSubtype,\n newInstanceCloudProvider: action.payload.defaultCloudProvider,\n newInstanceName: state.newInstance.newInstanceName,\n newInstanceFlavorIndex: initialState.newInstance.newInstanceFlavorIndex,\n newInstancePlan: initialState.newInstance.newInstancePlan,\n newInstancePlanIndex: initialState.newInstance.newInstancePlanIndex,\n },\n };\n\n case SELECT_SERVICE_SUBTYPE:\n return {\n ...state,\n newAcl: {},\n newInstance: {\n ...state.newInstance,\n newInstanceServiceSubtype: action.payload,\n newInstanceVersion: initialState.newInstance.newInstanceVersion,\n newInstanceFlavorIndex: initialState.newInstance.newInstanceFlavorIndex,\n newInstancePlan: initialState.newInstance.newInstancePlan,\n newInstancePlanIndex: initialState.newInstance.newInstancePlanIndex,\n },\n };\n\n case SELECT_VERSION:\n return {\n ...state,\n newInstance: { ...state.newInstance, newInstanceVersion: action.payload },\n };\n\n case SELECT_REGION:\n return { ...state, newInstance: { ...state.newInstance, newInstanceRegion: action.payload } };\n\n case ENTER_NAME:\n return { ...state, newInstance: { ...state.newInstance, newInstanceName: action.payload } };\n\n case SELECT_PROVIDER:\n return {\n ...state,\n newAcl: {},\n newInstance: {\n ...state.newInstance,\n newInstanceCloudProvider: action.payload,\n },\n };\n\n case SELECT_FLAVOR:\n return {\n ...state,\n newInstance: {\n ...state.newInstance,\n newInstanceFlavorIndex: action.payload.value,\n newInstancePlan: action.payload.defaultPlan,\n newInstancePlanIndex: 0,\n },\n };\n // here\n case SELECT_ADDON:\n return {\n ...state,\n newInstance: {\n ...state.newInstance,\n newInstanceAddons: [\n ...state.newInstance.newInstanceAddons.filter(\n (addon) => addon.id !== action.payload.id,\n ),\n action.payload,\n ],\n },\n };\n\n case DESELECT_ADDON:\n return {\n ...state,\n newInstance: {\n ...state.newInstance,\n newInstanceAddons: state.newInstance.newInstanceAddons.filter(\n (addon) => addon.id !== action.payload,\n ),\n },\n };\n\n case SELECT_PLAN:\n return {\n ...state,\n newInstance: {\n ...state.newInstance,\n newInstancePlanIndex: action.payload.planIndex,\n newInstancePlan: action.payload.plan,\n },\n };\n\n case ENTER_CIDR:\n return {\n ...state,\n newAcl: { ...state.newAcl, cidr: action.payload },\n };\n\n case ENTER_ACL_NAME:\n return { ...state, newAcl: { ...state.newAcl, name: action.payload } };\n\n case SELECT_ACL_KIND:\n return {\n ...state,\n newAcl: { ...state.newAcl, kind: action.payload },\n };\n\n case ADD_ACL:\n return {\n ...state,\n newInstance: {\n ...state.newInstance,\n newInstanceAcls: [...state.newInstance.newInstanceAcls, action.payload],\n },\n newAcl: {},\n addIpsLater: false,\n };\n\n case REMOVE_ACL:\n // eslint-disable-next-line no-case-declarations\n const newInstanceAcls = state.newInstance.newInstanceAcls.slice();\n newInstanceAcls.splice(action.payload, 1);\n\n return {\n ...state,\n newInstance: {\n ...state.newInstance,\n newInstanceAcls,\n },\n };\n\n case ADD_IPS_LATER:\n return {\n ...state,\n addIpsLater: !state.addIpsLater,\n newInstance: {\n ...state.newInstance,\n newInstanceAcls: initialState.newInstance.newInstanceAcls,\n },\n };\n\n case GETIP_REQUESTED:\n return {\n ...state,\n myip: null,\n };\n\n case GETIP_SUCCESS:\n return {\n ...state,\n myip: action.payload.ip,\n };\n\n case GETIP_FAILURE:\n return {\n ...state,\n myip: null,\n error: action.payload.message,\n };\n\n case GETIP_CLEAR:\n return {\n ...state,\n myip: null,\n };\n\n case CREATEINSTANCE_REQUESTED:\n return {\n ...state,\n isLoading: true,\n error: initialState.error,\n };\n\n case CREATEINSTANCE_SUCCESS:\n return {\n ...initialState,\n };\n\n case CREATEINSTANCE_FAILURE:\n return {\n ...state,\n isLoading: false,\n error: action.payload,\n };\n\n case RESET_CREATEINSTANCE_ERROR_STATE:\n return {\n ...state,\n error: action.payload,\n };\n\n case GET_PRICE_REQUESTED:\n return {\n ...state,\n };\n\n case GET_PRICE_SUCCESS:\n return {\n ...state,\n price: action.payload.priceInCents,\n };\n\n case GET_PRICE_FAILURE:\n return {\n ...state,\n error: action.payload,\n };\n\n default:\n return state;\n }\n}\n","import { RSAA } from 'redux-api-middleware';\nimport debounceAction from 'debounce-action';\n\nimport {\n NEXT_CREATE_STAGE,\n PREVIOUS_CREATE_STAGE,\n RESET_STEPS,\n SELECT_SERVICE,\n SELECT_VERSION,\n SELECT_REGION,\n ENTER_NAME,\n SELECT_FLAVOR,\n SELECT_PLAN,\n ENTER_CIDR,\n ENTER_ACL_NAME,\n SELECT_ACL_KIND,\n ADD_ACL,\n REMOVE_ACL,\n ADD_IPS_LATER,\n SELECT_SERVICE_SUBTYPE,\n SELECT_PROVIDER,\n CREATEINSTANCE_REQUESTED,\n CREATEINSTANCE_SUCCESS,\n CREATEINSTANCE_FAILURE,\n RESET_CREATEINSTANCE_ERROR_STATE,\n GETIP_REQUESTED,\n GETIP_SUCCESS,\n GETIP_FAILURE,\n GETIP_CLEAR,\n GET_PRICE_REQUESTED,\n GET_PRICE_SUCCESS,\n GET_PRICE_FAILURE,\n SELECT_ADDON,\n DESELECT_ADDON,\n} from '../actions';\n\nconst goToNextStageActionSet = (currentStep) => ({\n type: NEXT_CREATE_STAGE,\n payload: currentStep + 1,\n});\n\nexport const goToNextStage = (event, step) => (dispatch) => dispatch(goToNextStageActionSet(step));\n\nconst goToPreviousStageActionSet = (currentStep) => ({\n type: PREVIOUS_CREATE_STAGE,\n payload: currentStep - 1,\n});\n\nexport const goToPreviousStage = (event, step) => (dispatch) =>\n dispatch(goToPreviousStageActionSet(step));\n\nconst resetStepsActionSet = () => ({\n type: RESET_STEPS,\n payload: 0,\n});\n\nexport const resetSteps = () => (dispatch) => dispatch(resetStepsActionSet());\n\nconst selectServiceSet = (selectedService, defaultSubtype, defaultCloudProvider) => ({\n type: SELECT_SERVICE,\n payload: { selectedService, defaultSubtype, defaultCloudProvider },\n});\n\nexport const selectService = (event, selectedService, defaultSubtype, defaultCloudProvider) => (\n dispatch,\n) => dispatch(selectServiceSet(selectedService, defaultSubtype, defaultCloudProvider));\n\nconst selectVersionSet = (event) => ({\n type: SELECT_VERSION,\n payload: event.target.value,\n});\n\nexport const selectVersion = (event) => (dispatch) => dispatch(selectVersionSet(event));\n\nconst selectRegionSet = (event) => ({\n type: SELECT_REGION,\n payload: event.target.value,\n});\n\nexport const selectRegion = (event) => (dispatch) => dispatch(selectRegionSet(event));\n\nconst enterNameSet = (event) => ({\n type: ENTER_NAME,\n payload: event.target.value,\n});\n\nexport const enterName = (event) => (dispatch) => dispatch(enterNameSet(event));\n\nconst selectFlavorSet = (value, defaultPlan) => ({\n type: SELECT_FLAVOR,\n payload: { value, defaultPlan },\n});\n\nexport const selectFlavor = (value, defaultPlan) => (dispatch) =>\n dispatch(selectFlavorSet(value, defaultPlan));\n\nexport const selectPlanSet = (planIndex, plans) => {\n const MAX = plans.length - 1;\n let actualPlanIndex;\n if (planIndex < 0) {\n actualPlanIndex = 0;\n } else if (planIndex > MAX) {\n actualPlanIndex = MAX;\n } else {\n actualPlanIndex = planIndex;\n }\n return {\n type: SELECT_PLAN,\n payload: { planIndex: actualPlanIndex, plan: plans[actualPlanIndex] },\n };\n};\n\nexport const selectPlan = (planIndex, plan) => (dispatch) =>\n dispatch(selectPlanSet(planIndex, plan));\n\nconst enterCidrSet = (value) => ({\n type: ENTER_CIDR,\n payload: value,\n});\n\nexport const enterCidr = (event, value) => (dispatch) => dispatch(enterCidrSet(value));\n\nconst getIpSet = () => ({\n [RSAA]: {\n types: [GETIP_REQUESTED, GETIP_SUCCESS, GETIP_FAILURE],\n method: 'GET',\n endpoint: '/getip/',\n },\n});\n\nexport const getIp = () => (dispatch) => dispatch(getIpSet());\n\nconst getIpClearSet = () => ({\n type: GETIP_CLEAR,\n});\n\nexport const getIpClear = () => (dispatch) => dispatch(getIpClearSet());\n\nconst enterAclNameSet = (event) => ({\n type: ENTER_ACL_NAME,\n payload: event.target.value,\n});\n\nexport const enterAclName = (event) => (dispatch) => dispatch(enterAclNameSet(event));\n\nconst selectAclKindSet = (kind) => ({\n type: SELECT_ACL_KIND,\n payload: kind,\n});\n\nexport const selectAclKind = (event, kind) => (dispatch) => dispatch(selectAclKindSet(kind));\n\nconst addAclSet = (value) => ({\n type: ADD_ACL,\n payload: value,\n});\n\nexport const addAcl = (event, value) => (dispatch) => dispatch(addAclSet(value));\n\nconst removeAclSet = (value) => ({\n type: REMOVE_ACL,\n payload: value,\n});\n\nexport const removeAcl = (event, value) => (dispatch) => dispatch(removeAclSet(value));\n\nconst checkAddIpsLaterSet = () => ({\n type: ADD_IPS_LATER,\n});\n\nexport const checkAddIpsLater = () => (dispatch) => dispatch(checkAddIpsLaterSet());\n\nconst selectServiceSubtypeSet = (serviceSubtype) => ({\n type: SELECT_SERVICE_SUBTYPE,\n payload: serviceSubtype,\n});\n\nexport const selectServiceSubtype = (event, serviceSubtype) => (dispatch) =>\n dispatch(selectServiceSubtypeSet(serviceSubtype));\n\nconst selectProviderSet = (provider) => ({\n type: SELECT_PROVIDER,\n payload: provider,\n});\n\nexport const selectProvider = (event, provider) => (dispatch) =>\n dispatch(selectProviderSet(provider));\n\nconst createInstanceSet = (data) => ({\n [RSAA]: {\n types: [\n {\n type: CREATEINSTANCE_REQUESTED,\n meta: {\n analytics: {\n eventPayload: {\n properties: {\n instance_name: data.name,\n service: data.service,\n plan: data.plan,\n version: data.version,\n region: data.region,\n provider: data.provider,\n service_subtype: data.serviceSubtype,\n features: data.features,\n num_acls: data.acls.length,\n },\n },\n },\n },\n },\n {\n type: CREATEINSTANCE_SUCCESS,\n meta: {\n analytics: true,\n service: data.service,\n },\n },\n {\n type: CREATEINSTANCE_FAILURE,\n meta: {\n analytics: {\n eventPayload: {\n properties: {\n instance_name: data.name,\n service: data.service,\n plan: data.plan,\n version: data.version,\n region: data.region,\n provider: data.provider,\n service_subtype: data.serviceSubtype,\n features: data.features,\n num_acls: data.acls.length,\n },\n },\n },\n },\n },\n ],\n method: 'POST',\n endpoint: `/instances/${data.service.toLowerCase()}/`,\n body: JSON.stringify(data),\n },\n});\n\nexport const createInstance = (data, cb) => (dispatch) =>\n dispatch(createInstanceSet(data)).then((response) => {\n if (response.type === CREATEINSTANCE_SUCCESS) {\n cb();\n }\n });\n\nconst resetCreateInstanceErrorStateActionSet = () => ({\n type: RESET_CREATEINSTANCE_ERROR_STATE,\n payload: null,\n});\n\nexport const resetCreateInstanceErrorState = () => (dispatch) =>\n dispatch(resetCreateInstanceErrorStateActionSet());\n\nconst getPriceActionSet = (regionId, planIndex, plans, addons) => {\n const MAX = plans.length - 1;\n let actualPlanIndex;\n if (planIndex < 0) {\n actualPlanIndex = 0;\n } else if (planIndex > MAX) {\n actualPlanIndex = MAX;\n } else {\n actualPlanIndex = planIndex;\n }\n const planId = plans[actualPlanIndex].id;\n\n const addonQuery = addons.map((addon) => `&addon=${addon.id}_value_${addon.value}`).join('');\n\n return {\n [RSAA]: {\n types: [GET_PRICE_REQUESTED, GET_PRICE_SUCCESS, GET_PRICE_FAILURE],\n method: 'GET',\n endpoint: `/pricing/?region=${regionId}&plan=${planId}${addonQuery}`,\n },\n };\n};\n\nexport const getPrice = (regionId, planIndex, plans, addons = []) => (dispatch) =>\n dispatch(getPriceActionSet(regionId, planIndex, plans, addons));\n\nexport const getPriceDebounced = debounceAction(getPrice, 250);\n\nconst selectAddonSet = (id, name, value) => ({\n type: SELECT_ADDON,\n payload: { id, name, value },\n});\n\nexport const selectAddon = (id, name, value) => (dispatch) =>\n dispatch(selectAddonSet(id, name, value));\n\nconst deselectAddonSet = (addonId) => ({\n type: DESELECT_ADDON,\n payload: addonId,\n});\n\nexport const deselectAddon = (addonId) => (dispatch) => dispatch(deselectAddonSet(addonId));\n","const ACL_KINDS_BY_SERVICE = {\n Elasticsearch: [\n { kind: 2, label: 'Elasticsearch' },\n { kind: 4, label: 'Kibana' },\n { kind: 5, label: 'Cerebro' },\n ],\n CockroachDB: [\n { kind: 6, label: 'CockroachDB' },\n { kind: 7, label: 'CockroachDB Admin UI' },\n ],\n PostgreSQL: [\n { kind: 8, label: 'PostgreSQL Master' },\n { kind: 9, label: 'PostgreSQL Replica' },\n ],\n TimescaleDB: [\n { kind: 10, label: 'TimescaleDB Master' },\n { kind: 11, label: 'TimescaleDB Replica' },\n ],\n};\n\nconst DEFAULT_ACL_KIND = [{ kind: 1, label: 'Default' }];\n\n/**\n * Returns the list of ACL Kinds for a service. Prefer this for future usage over the ACL_KINDS\n * constant as it's easier to use for a lookup than doing a bunch of complicated filtering over\n * an object. Refactor other places where ACL_KINDS is used as desired.\n *\n * @param {string} service - Current state\n * @returns {array} - list of available ACL Kinds\n */\nexport function getAclKindsByService(service) {\n return ACL_KINDS_BY_SERVICE[service] || DEFAULT_ACL_KIND;\n}\n\nexport default getAclKindsByService;\n","/**\n * Returns the string representaion of the plan to be displayed in the UI\n *\n * @param {string} selectedService - Service selected by the user.\n * This must match one of the plan nodes.\n * @param {Object} plan - The plan to create the UI string for\n * @returns {{sizeInfo: string, nodeInfo:string}} - sizeInfo: string representation of the plan; nodeInfo: information on the node breakdown\n */\nexport default function createPlanDisplay(selectedService, plan) {\n const currentService = selectedService.toLowerCase();\n const { nodes } = plan;\n const isRedis = currentService === 'redis';\n const isMongo = currentService === 'mongodb';\n\n const planNode = isMongo ? nodes[currentService] || nodes.mongod : nodes[currentService];\n\n let memory = null;\n let storage = null;\n\n switch (currentService) {\n case 'redis':\n memory = planNode.memoryMb / 1024;\n break;\n\n case 'mongodb':\n memory = planNode.memoryMb / 1024;\n storage = planNode.diskSizeGb;\n break;\n\n default:\n memory = (planNode.memoryMb / 1024) * planNode.quantity;\n storage = planNode.diskSizeGb * planNode.quantity;\n break;\n }\n\n const nodeWord = planNode.quantity > 1 ? 'nodes' : 'node';\n\n const sizeInfo = isRedis ? `${memory}GB Memory` : `${storage}GB Storage / ${memory}GB Memory`;\n const nodeInfo = isRedis\n ? `${planNode.quantity} ${nodeWord} × ${memory}GB each`\n : `${planNode.quantity} ${nodeWord} × ${planNode.diskSizeGb}GB each`;\n\n return { sizeInfo, nodeInfo };\n}\n","import { createSelector } from '@reduxjs/toolkit';\nimport { formValueSelector } from 'redux-form';\nimport moment from 'moment';\n\nimport { getAclKindsByService } from 'services/aclKinds';\nimport createPlanDisplay from 'services/createPlanDisplay';\nimport { OR_ADMIN } from 'constants/roles';\n\n/**\n * Returns the complete createInstance state\n *\n * @param {object} state - Current state\n * @returns {object} - The entire createInstance state\n */\nexport const getCreateInstanceState = (state) => state.createInstance;\n\n// BEGIN catalog section\n// Recreate selectors here instead of importing from the catalog selectors because\n// we don't want selector files importing from each other.\n\n/**\n * Returns the complete catalog state.\n *\n * @param {object} state - Current state\n * @returns {object} - The entire catalog state\n */\nexport const catalogStateSelector = (state) => state.catalog;\n\n/**\n * Returns the services from the catalog\n *\n * @param {object} state - Current state\n * @returns {array} - List of services in the catalog\n */\nexport const catalogServicesSelector = createSelector(\n catalogStateSelector,\n (state) => state.servicesCatalog.services,\n);\n\n/**\n * Returns the service subtypes from the catalog\n *\n * @param {object} state - Current state\n * @returns {array} - List of service subtypes in the catalog\n */\nexport const catalogServiceSubtypesSelector = createSelector(\n catalogStateSelector,\n (state) => state.serviceSubtypesCatalog.serviceSubtypes,\n);\n\n/**\n * Returns the regions from the catalog\n *\n * @param {object} state - Current state\n * @returns {array} - List of regions in the catalog\n */\nexport const catalogRegionsSelector = createSelector(\n catalogStateSelector,\n (state) => state.regionsCatalog.regions,\n);\n\n/**\n * Returns the versions from the catalog\n *\n * @param {object} state - Current state\n * @returns {array} - List of versions in the catalog\n */\nexport const catalogVersionsSelector = createSelector(\n catalogStateSelector,\n (state) => state.versionsCatalog.versions,\n);\n\n/**\n * Returns the cloud providers from the catalog\n *\n * @param {object} state - Current state\n * @returns {array} - List of cloud providers in the catalog\n */\nexport const catalogCloudProvidersSelector = createSelector(\n catalogStateSelector,\n (state) => state.providersCatalog.providers,\n);\n\n/**\n * Returns the flavors from the catalog\n *\n * @param {object} state - Current state\n * @returns {array} - List of flavors in the catalog\n */\nexport const catalogFlavorsSelector = createSelector(\n catalogStateSelector,\n (state) => state.flavorsCatalog.flavors,\n);\n\n/**\n * Returns the addons from the catalog\n *\n * @param {object} state - Current state\n * @returns {array} - List of addons in the catalog\n */\nexport const catalogAddonsSelector = createSelector(\n catalogStateSelector,\n (state) => state.addonsCatalog.addons,\n);\n\n/**\n * Returns the plans from the catalog\n *\n * @param {object} state - Current state\n * @returns {array} - List of plans in the catalog\n */\nexport const catalogPlansSelector = createSelector(\n catalogStateSelector,\n (state) => state.plansCatalog.plans,\n);\n\n// END catalog section\n\n// BEGIN redux form section\n\nconst createFormSelector = formValueSelector('create');\n\n/**\n * Returns the service selected by the user in step one of the create flow.\n *\n * @param {object} state - Current state\n * @returns {string} - The name of the service that's stored in redux form.\n */\nexport const selectedServiceSelector = (state) => createFormSelector(state, 'service') || '';\n\n/**\n * Returns the version selected by the user in step one of the create flow.\n *\n * @param {object} state - Current state\n * @returns {string} - The version of the service that's stored in redux form.\n */\nexport const selectedVersionSelector = (state) => createFormSelector(state, 'version') || '';\n\n/**\n * Returns the cloud provider selected by the user in step one of the create flow.\n *\n * @param {object} state - Current state\n * @returns {string} - The cloud provider of the service that's stored in redux form.\n */\nexport const selectedCloudProviderSelector = (state) =>\n createFormSelector(state, 'cloudProvider') || '';\n\n/**\n * Returns the beta status of the cloud provider selected by the user\n *\n * @param {object} state - Current state\n * @returns {Boolean} - whether or not the cloud provider is in beta status\n */\nexport const selectedCloudProviderIsBetaSelector = createSelector(\n selectedCloudProviderSelector,\n catalogCloudProvidersSelector,\n (cloudProviderName, cloudProviders) => {\n if (!cloudProviderName) {\n return false;\n }\n\n const [cloudProviderObject] = cloudProviders.filter(\n (cloudProvider) => cloudProviderName === cloudProvider.name,\n );\n return cloudProviderObject.maturityLevel === 2;\n },\n);\n\n/**\n * Returns the region selected by the user in step one of the create flow.\n *\n * @param {object} state - Current state\n * @returns {string} - The region of the service that's stored in redux form.\n */\nexport const selectedRegionSelector = (state) => createFormSelector(state, 'region') || '';\n\n/**\n * Returns the service subtype selected by the user in step one of the create flow.\n *\n * @param {object} state - Current state\n * @returns {string} - The service subtype of the service that's stored in redux form.\n */\nexport const selectedServiceSubtypeSelector = (state) =>\n createFormSelector(state, 'serviceSubtype') || '';\n\n/**\n * Returns the flavor selected by the user in step one of the create flow.\n *\n * @param {object} state - Current state\n * @returns {object} - The flavor of the service that's stored in redux form.\n */\nexport const selectedFlavorSelector = createSelector(\n (state) => createFormSelector(state, 'flavor'),\n catalogFlavorsSelector,\n (flavorId, catalogFlavors) => {\n const [theFlavor] = catalogFlavors.filter((catalogFlavor) => catalogFlavor.id === flavorId);\n return theFlavor || {};\n },\n);\n\n/**\n * Returns the addons selected by the user in step two of the create flow.\n * In the form state, addons is an object.\n *\n * @param {object} state - Current state\n * @returns {array} - The addons of the service that's stored in redux form.\n */\nexport const selectedAddonsSelector = createSelector(\n (state) => createFormSelector(state, 'addons'),\n (addonsById) => {\n if (typeof addonsById === 'undefined') {\n return [];\n }\n return Object.values(addonsById);\n },\n);\n\n/**\n * Returns the plan selected by the user in step two of the create flow.\n *\n * @param {object} state - Current state\n * @returns {object} - The plan that's stored in redux form.\n */\nexport const selectedPlanSelector = createSelector(\n (state) => createFormSelector(state, 'plan'),\n catalogPlansSelector,\n (planId, catalogPlans) => {\n const [thePlan] = catalogPlans.filter((catalogPlan) => catalogPlan.id === planId);\n return thePlan || {};\n },\n);\n\n/**\n * Returns the firewall IP selected by the user in step three of the create flow.\n *\n * @param {object} state - Current state\n * @returns {string} - The firewall IP that's stored in redux form, along with its name\n */\nexport const selectedCidrSelector = createSelector(\n (state) => createFormSelector(state, 'cidr'),\n (state) => createFormSelector(state, 'cidrName'),\n (cidr, cidrName) => {\n if (!cidr) {\n return '';\n }\n if (!cidrName) {\n return cidr;\n }\n return `${cidrName} / ${cidr}`;\n },\n);\n\n/**\n * Returns instance name entered by the user in step four of the create flow.\n *\n * @param {object} state - Current state\n * @returns {string} - The instance name that's stored in redux form, along with its name\n */\nexport const enteredNameSelector = (state) => createFormSelector(state, 'name');\n\n// END redux form section\n\n// BEGIN create section\n// These rely on data from selectors in the other sections\n\n/**\n * Returns the id of the selected service\n *\n * @param {object} state - Current state\n * @returns {string} - service ID\n */\nexport const selectedServiceIDSelector = createSelector(\n selectedServiceSelector,\n catalogServicesSelector,\n (serviceName, services) => {\n if (!serviceName) return null;\n const selectedService = services.filter((service) => service.name === serviceName)[0];\n return selectedService.id;\n },\n);\n\n/**\n * Returns whether or not a service is in beta\n *\n * @param {object} state - Current state\n * @param {object} props - Current props of the component using the selector;\n * must contain a serviceName prop\n * @returns {bool} - A service's beta status\n */\nexport const isServiceBetaSelector = createSelector(\n catalogServicesSelector,\n (state, props) => ({ serviceName: props.serviceName, isORv4: props.isORv4 }),\n (services, { serviceName, isORv4 }) => {\n const theService = services.filter((service) => service.name === serviceName)[0];\n\n // once the ORv4-only service selector for MongoDB is removed, the isORv4 flag no\n // longer needs to be accounted for\n return isORv4 || !theService ? false : theService.maturityLevel === 2;\n },\n);\n\n/**\n * Returns the id of the selected service subtype\n *\n * @param {object} state - Current state\n * @returns {string} - service subtype ID\n */\nexport const selectedServiceSubtypeIDSelector = createSelector(\n selectedServiceSubtypeSelector,\n catalogServiceSubtypesSelector,\n (serviceSubtypeName, serviceSubtypes) => {\n if (!serviceSubtypeName) return null;\n const selectedService = serviceSubtypes.filter(\n (serviceSubtype) => serviceSubtype.name === serviceSubtypeName,\n )[0];\n return selectedService.id;\n },\n);\n\n/**\n * Returns a list of service subtypes available for a service\n *\n * @param {object} state - Current state\n * @returns {array} - list of available service subtypes\n */\nexport const availableServiceSubtypesSelector = createSelector(\n selectedServiceIDSelector,\n catalogServiceSubtypesSelector,\n (serviceID, subtypes) => subtypes.filter((subtype) => subtype.service === serviceID),\n);\n\n/**\n * Returns the list of names for the available service subtypes\n *\n * @param {object} state - Current state\n * @returns {array} - list of available service subtype names\n */\nexport const availableServiceSubtypesNamesSelector = createSelector(\n availableServiceSubtypesSelector,\n (subtypes) => subtypes.map((subtype) => subtype.name),\n);\n\n/**\n * Returns a list of regions available for a service subtype\n *\n * @param {object} state - Current state\n * @returns {array} - list of available regions\n */\nexport const availableRegionsSelector = createSelector(\n selectedServiceSubtypeIDSelector,\n catalogRegionsSelector,\n (serviceSubtypeID, regions) =>\n regions.filter(\n (region) => region.serviceSubtypes.includes(serviceSubtypeID) && region.displaySetting === 1,\n ),\n);\n\n/**\n * Returns the list of names for the available regions.\n * Also denotes if it is a private region or not.\n * This is based on the cloud provider selected.\n *\n * @param {object} state - Current state\n * @returns {array} - list of available region names\n */\nexport const availableRegionsNamesSelector = createSelector(\n availableRegionsSelector,\n selectedCloudProviderSelector,\n (regions, selectedProvider) =>\n regions\n .filter((region) => region.providerName === selectedProvider)\n .map((region) => ({ name: region.name, organization: region.organization })),\n);\n\n/**\n * Returns a boolean if a region is private or public\n *\n * @param {object} state - Current state\n * @returns {boolean} - True if a region is private, false otherwise\n */\nexport const isPrivateRegionSelector = createSelector(\n availableRegionsSelector,\n selectedCloudProviderSelector,\n selectedRegionSelector,\n (regions, selectedProvider, selectedRegion) =>\n Boolean(\n regions\n .filter(\n (region) => region.providerName === selectedProvider && region.name === selectedRegion,\n )\n .map((region) => region.organization)[0],\n ),\n);\n\n/**\n * Returns the list of available cloud providers. This is based on:\n * 1) The service that is selected\n * 2) The service subtype that is then automatically selected\n * 3) The regions that the service subtype is available in\n * 4) The providers that those regions are in\n *\n * @param {object} state - Current state\n * @returns {array} - list of available cloud provider objects\n */\nexport const availableCloudProvidersSelector = createSelector(\n availableRegionsSelector,\n catalogCloudProvidersSelector,\n (regions, providers) => {\n const uniqueProviderNames = new Set(regions.map((region) => region.providerName));\n const availableCloudProviders = providers.filter(\n (provider) => uniqueProviderNames.has(provider.name) && provider.displaySetting === 1,\n );\n\n return availableCloudProviders;\n },\n);\n\n/**\n * Returns the list of names for the available verions of a service\n * name in a component\n *\n * @param {object} state - Current state\n * @param {object} props - Current props of the component using the selector;\n * must contain a serviceName prop\n * @returns {array} - list of available version names\n */\nexport const versionNamesByServiceSelector = createSelector(\n catalogVersionsSelector,\n (state, props) => props.serviceName,\n (versions, serviceName) =>\n versions\n .filter((version) => version.serviceName === serviceName)\n .map((version) => version.name),\n);\n\n/**\n * Returns the list of flavors available based on the following criteria:\n * 1) The flavor is available in the selected region\n * 2) The flavor is available for the selected service subtype\n *\n * @param {object} state - Current state\n * @returns {array} - list of available flavor objects\n */\nexport const availableFlavorsSelector = createSelector(\n selectedRegionSelector,\n catalogRegionsSelector,\n selectedServiceSubtypeIDSelector,\n catalogFlavorsSelector,\n (selectedRegionName, regions, serviceSubtypeID, flavors) => {\n const [selectedRegion] = regions.filter((region) => region.name === selectedRegionName);\n const potentialFlavorIds = selectedRegion.flavors;\n\n return flavors.filter(\n (flavor) =>\n flavor.serviceSubtype === serviceSubtypeID &&\n flavor.displaySetting === 1 &&\n potentialFlavorIds.includes(flavor.id),\n );\n },\n);\n\n/**\n * Returns the list of addons available for the selected service subtype\n *\n * @param {object} state - Current state\n * @returns {array} - list of available addon objects\n */\nexport const availableAddonsSelector = createSelector(\n selectedServiceSubtypeIDSelector,\n catalogAddonsSelector,\n (serviceSubtypeID, addons) =>\n addons.filter(\n (addon) => addon.serviceSubtype === serviceSubtypeID && addon.displaySetting === 1,\n ),\n);\n\n/**\n * Returns the list of plans available for the selected flavor\n *\n * @param {object} state - Current state\n * @returns {array} - list of available plan objects\n */\nexport const availablePlansSelector = createSelector(\n (state) => createFormSelector(state, 'flavor'),\n catalogPlansSelector,\n (flavorID, plans) =>\n plans.filter((plan) => plan.flavor === flavorID && plan.displaySetting === 1),\n);\n\n/**\n * Returns the list of ACL Kinds for an availble service\n *\n * @param {object} state - Current state\n * @returns {array} - list of available ACL Kinds\n */\nexport const availableACLKindsSelector = createSelector(\n selectedServiceSelector,\n (selectedService) => getAclKindsByService(selectedService),\n);\n\n/**\n * Returns whether or not a MongoDB license warning needs to be displayed during the create process.\n * This state is determined by the following conditions:\n *\n * 1) The user is not at OR ADMIN superuser\n * 2) A user attempts to create a MongoDB instance in a public region\n * 3) That user's org either does not have an ORv4 account or has one that was created after the\n * license agreement cutoff date, June 01, 2019.\n *\n * @package {object} state - Current state\n * @returns {bool} - org's MongoDB eligibility\n */\nexport const mongoLicenseWarningNeededSelector = createSelector(\n (state) => state.org,\n (state) => state.user,\n selectedServiceSelector,\n selectedRegionSelector,\n isPrivateRegionSelector,\n (orgState, userState, selectedService, selectedRegion, isPrivateRegion) => {\n const { roles } = userState.identity;\n if (roles.includes(OR_ADMIN)) {\n return false;\n }\n\n if (selectedService !== 'MongoDB') {\n return false;\n }\n\n if (!selectedRegion || isPrivateRegion) {\n return false;\n }\n\n const { orv4dtcreated } = orgState;\n\n if (!orv4dtcreated) {\n return true;\n }\n\n const MONGODB_ORG_LICENSE_AGREEMENT_CUTOFF_DATETIME = moment.utc('2019-06-01');\n\n return moment(orv4dtcreated).isAfter(MONGODB_ORG_LICENSE_AGREEMENT_CUTOFF_DATETIME);\n },\n);\n\n/**\n * Returns whether or not step one of the create flow is complete\n *\n * @param {object} state - Current state\n * @returns {bool} - status of step one\n */\nexport const stepOneCompleteSelector = createSelector(\n selectedServiceSelector,\n selectedCloudProviderSelector,\n selectedRegionSelector,\n (service, provider, region) => Boolean(service) && Boolean(provider) && Boolean(region),\n);\n\n/**\n * Returns whether or not step two of the create flow is complete\n *\n * @param {object} state - Current state\n * @returns {bool} - status of step two\n */\nexport const stepTwoCompleteSelector = createSelector(\n selectedFlavorSelector,\n selectedPlanSelector,\n (flavor, plan) => Object.keys(flavor).length > 0 && Object.keys(plan).length > 0,\n);\n\n/**\n * Returns whether or not step three of the create flow is complete\n * Checks for CIDR name separately becuase cidrAndName returns true\n * if only the CIDR is entered.\n *\n * @param {object} state - Current state\n * @returns {bool} - status of step three\n */\nexport const stepThreeCompleteSelector = createSelector(\n selectedCidrSelector,\n (state) => createFormSelector(state, 'cidrName'),\n (cidrAndName, cidrName) => Boolean(cidrAndName) && Boolean(cidrName),\n);\n\n/**\n * Returns whether or not step four of the create flow is complete\n *\n * @param {object} state - Current state\n * @returns {bool} - status of step four\n */\nexport const stepFourCompleteSelector = createSelector(enteredNameSelector, (instanceName) =>\n Boolean(instanceName),\n);\n\n/**\n * Returns a list of plan information formatted for display in the PlanSelector in Step Two.\n *\n * @param {Object} state - Current state\n * @returns {{planId:string, sizeInfo:string, nodeInfo:string}[]} - Array of objects:\n * {sizeInfo: string representation of the plan; nodeInfo: information on the node breakdown; planId: id of the plan}\n */\nexport const availablePlansInfoSelector = createSelector(\n availablePlansSelector,\n selectedServiceSelector,\n (availablePlans, selectedService) => {\n if (!selectedService || !availablePlans.length) {\n return [];\n }\n const availablePlanDisplays = availablePlans.map((availablePlan) => {\n const { sizeInfo, nodeInfo } = createPlanDisplay(selectedService, availablePlan);\n return { planId: availablePlan.id, sizeInfo, nodeInfo };\n });\n return availablePlanDisplays;\n },\n);\n\n/**\n * Returns a string representation of size information for a single plan\n *\n * @param {Object} state - Current state\n * @returns {string} - string representation of size information for a single plan\n */\nexport const planInfoStringSelector = createSelector(\n selectedServiceSelector,\n selectedPlanSelector,\n (service, plan) => {\n if (!service || !plan || !plan.nodes) {\n return '';\n }\n const { sizeInfo } = createPlanDisplay(service, plan);\n\n return sizeInfo;\n },\n);\n\n/**\n * Returns a string representation of node information for a single plan\n *\n * @param {Object} state - Current state\n * @returns {string} - string representation of node information for a single plan\n */\nexport const nodeInfoStringSelector = createSelector(\n selectedServiceSelector,\n selectedPlanSelector,\n (service, plan) => {\n if (!service || !plan || !plan.nodes) {\n return '';\n }\n const { nodeInfo } = createPlanDisplay(service, plan);\n\n return nodeInfo;\n },\n);\n\n/**\n * Returns a string representation of the user-selected addons for display in Step Two\n *\n * @param {Object} state - Current state\n * @returns {string} - string representation of the selected addons\n */\nexport const addonInfoStringSelector = createSelector(\n selectedAddonsSelector,\n selectedPlanSelector,\n selectedServiceSelector,\n (addons, plan, selectedService) => {\n let addonInfoString = '';\n if (!addons || !plan || !Object.keys(addons).length) {\n return addonInfoString;\n }\n\n const planNode = plan.nodes[selectedService.toLowerCase()];\n\n addons.forEach((addon) => {\n if (addon.name === 'dedicated_master') {\n addonInfoString += ` + 3 × ${addon.value} for master nodes`;\n }\n if (addon.name === 'replicas_for_ha') {\n addonInfoString += ` + ${addon.value} × ${planNode.diskSizeGb}GB for replication`;\n }\n if (addon.name === 'shards') {\n const shardWord = addon.value === 1 ? 'shard' : 'shards';\n // Note that × is a multiplication symbol entity, not the letter x\n addonInfoString += ` × ${addon.value} ${shardWord}`;\n }\n });\n\n return addonInfoString;\n },\n);\n\n/**\n * Returns the id of the selected region, which is currently stored by name in the form state\n *\n * @param {Object} state - Current state\n * @returns {string} - selected region id, or empty string if a region is not yet selected\n */\nexport const selectedRegionIdSelector = createSelector(\n selectedRegionSelector,\n catalogRegionsSelector,\n (selectedRegionName, regions) => {\n if (!selectedRegionName) {\n return '';\n }\n\n const [selectedRegionObject] = regions.filter((region) => selectedRegionName === region.name);\n return selectedRegionObject.id;\n },\n);\n\n/**\n * Takes the create form state and turns it into the shape needed for submitting to\n * the create endpoint\n *\n * @param {object} state - Current state\n * @returns {object} - body for the create call\n */\nexport const createInstanceBodySelector = createSelector(\n selectedServiceSelector,\n selectedVersionSelector,\n selectedCloudProviderSelector,\n selectedRegionIdSelector,\n selectedServiceSubtypeSelector,\n selectedPlanSelector,\n selectedAddonsSelector,\n (state) => createFormSelector(state, 'cidr'),\n (state) => createFormSelector(state, 'cidrName'),\n (state) => createFormSelector(state, 'cidrKinds'),\n enteredNameSelector,\n (\n service,\n version,\n provider,\n region,\n serviceSubtype,\n selectedPlan,\n selectedAddons,\n cidr,\n cidrName,\n cidrKinds,\n name,\n ) => {\n const addonsObject = selectedAddons.reduce((acc, cur) => {\n // It appears Infra API chokes if values for HA Replicas are sent as strings,\n // but we still need to handle the case for ES dedicated masters\n // eslint-disable-next-line no-restricted-globals\n if (isNaN(cur.value)) {\n acc[cur.name] = cur.value;\n } else if (typeof cur.value === \"boolean\") {\n acc[cur.name] = cur.value;\n } else {\n acc[cur.name] = parseInt(cur.value, 10);\n }\n return acc;\n }, {});\n const aclList = cidrKinds\n ? cidrKinds.map((cidrKind) => ({ cidr, name: cidrName, kind: cidrKind }))\n : [];\n const createInstanceBody = {\n service,\n version,\n provider,\n region,\n serviceSubtype,\n plan: selectedPlan.name,\n features: {\n addons: addonsObject,\n },\n settings: {\n system_userlist: {},\n },\n acls: aclList,\n name,\n };\n return createInstanceBody;\n },\n);\n\n// END create section\n\nexport default getCreateInstanceState;\n","import { ADD_ACL, CREATEINSTANCE_SUCCESS } from '../actions';\n\nconst createInstanceForms = {\n aclEntry: (state, action) => {\n switch (action.type) {\n case ADD_ACL:\n return undefined;\n default:\n return state;\n }\n },\n create: (state, action) => {\n switch (action.type) {\n case CREATEINSTANCE_SUCCESS:\n return undefined;\n default:\n return state;\n }\n },\n};\n\nexport default createInstanceForms;\n","import reducers from './reducers';\nimport * as actionCreators from './actionCreators';\nimport * as selectors from './selectors';\nimport createInstanceForms from './formReducers';\n\nexport { actionCreators, selectors, createInstanceForms };\n\nexport default reducers;\n","import compareVersions from 'compare-versions';\n\nexport default function sortVersionsDescending(a, b) {\n const semverRegex = /(\\d+\\.\\d+(\\.\\d+)?)/;\n const aVersionName = semverRegex.exec(a.name)[0];\n const bVersionName = semverRegex.exec(b.name)[0];\n\n return compareVersions(aVersionName, bVersionName) * -1;\n}\n","// Including multiple keys for mongo till we migrate to mongod\nconst VALID_SERVICE_NODES = [\n 'elasticsearch',\n 'postgresql',\n 'cockroachdb',\n 'mongodb',\n 'mongod',\n 'foundationdbcluster',\n 'redis',\n 'timescaledb',\n 'configsvr',\n 'shardsvr',\n 'mongos',\n];\n\nfunction getSize(node, service) {\n if (service === 'redis') {\n return node.memoryMb;\n }\n return node.diskSizeGb * node.quantity;\n}\n\nexport default function sortPlansAscending(a, b) {\n const serviceNodeAKey = Object.keys(a.nodes).filter((key) =>\n VALID_SERVICE_NODES.includes(key),\n )[0];\n const serviceNodeBKey = Object.keys(b.nodes).filter((key) =>\n VALID_SERVICE_NODES.includes(key),\n )[0];\n\n const sizeA = getSize(a.nodes[serviceNodeAKey], serviceNodeAKey);\n const sizeB = getSize(b.nodes[serviceNodeBKey], serviceNodeBKey);\n\n if (sizeA > sizeB) {\n return 1;\n }\n if (sizeB > sizeA) {\n return -1;\n }\n return 0;\n}\n","import { versionsDescending, plansAscending } from 'services/sorting';\nimport {\n GET_SERVICES_REQUESTED,\n GET_SERVICES_SUCCESS,\n GET_SERVICES_FAILURE,\n GET_SERVICESUBTYPES_REQUESTED,\n GET_SERVICESUBTYPES_SUCCESS,\n GET_SERVICESUBTYPES_FAILURE,\n GET_PROVIDERS_REQUESTED,\n GET_PROVIDERS_SUCCESS,\n GET_PROVIDERS_FAILURE,\n GET_VERSIONS_REQUESTED,\n GET_VERSIONS_SUCCESS,\n GET_VERSIONS_FAILURE,\n GET_REGIONS_REQUESTED,\n GET_REGIONS_FAILURE,\n GET_REGIONS_SUCCESS,\n GET_PLANS_REQUESTED,\n GET_PLANS_SUCCESS,\n GET_PLANS_FAILURE,\n GET_FLAVORS_REQUESTED,\n GET_FLAVORS_SUCCESS,\n GET_FLAVORS_FAILURE,\n GET_ADDONS_REQUESTED,\n GET_ADDONS_SUCCESS,\n GET_ADDONS_FAILURE,\n GET_CATALOG_CONFIG_REQUEST,\n GET_CATALOG_CONFIG_FAILURE,\n GET_CATALOG_CONFIG_SUCCESS,\n} from '../actions';\n\nexport const initialState = {\n servicesCatalog: {\n services: [],\n isLoading: false,\n error: false,\n },\n serviceSubtypesCatalog: {\n serviceSubtypes: [],\n isLoading: false,\n error: false,\n },\n providersCatalog: {\n providers: [],\n isLoading: false,\n error: false,\n },\n versionsCatalog: {\n versions: [],\n isLoading: false,\n error: false,\n },\n regionsCatalog: {\n regions: [],\n isLoading: false,\n error: false,\n },\n plansCatalog: {\n plans: [],\n isLoading: false,\n error: false,\n },\n flavorsCatalog: {\n flavors: [],\n isLoading: false,\n error: false,\n },\n addonsCatalog: {\n addons: [],\n isLoading: false,\n error: false,\n },\n configurationsCatalog: {\n configurations: [],\n isLoading: false,\n error: false,\n },\n};\n\n// function getThingByName(things) {\n// return things.reduce((services, service) => [...services, service.name], []);\n// }\n\nexport default function catalogReducer(state = initialState, action) {\n switch (action.type) {\n case GET_SERVICES_REQUESTED:\n return {\n ...state,\n servicesCatalog: {\n ...state.servicesCatalog,\n isLoading: true,\n error: false,\n },\n };\n\n case GET_SERVICES_SUCCESS:\n return {\n ...state,\n servicesCatalog: {\n services: action.payload,\n isLoading: false,\n error: false,\n },\n };\n\n case GET_SERVICES_FAILURE:\n return {\n ...state,\n servicesCatalog: {\n ...state.servicesCatalog,\n isLoading: false,\n error: action.payload,\n },\n };\n\n case GET_SERVICESUBTYPES_REQUESTED:\n return {\n ...state,\n serviceSubtypesCatalog: {\n ...state.serviceSubtypesCatalog,\n isLoading: true,\n error: false,\n },\n };\n\n case GET_SERVICESUBTYPES_SUCCESS:\n return {\n ...state,\n serviceSubtypesCatalog: {\n serviceSubtypes: action.payload,\n isLoading: false,\n error: false,\n },\n };\n\n case GET_SERVICESUBTYPES_FAILURE:\n return {\n ...state,\n serviceSubtypesCatalog: {\n ...state.serviceSubtypesCatalog,\n isLoading: false,\n error: action.payload,\n },\n };\n\n case GET_PROVIDERS_REQUESTED:\n return {\n ...state,\n providersCatalog: {\n ...state.providersCatalog,\n isLoading: true,\n error: false,\n },\n };\n\n case GET_PROVIDERS_SUCCESS:\n return {\n ...state,\n providersCatalog: {\n providers: action.payload,\n isLoading: false,\n error: false,\n },\n };\n\n case GET_PROVIDERS_FAILURE:\n return {\n ...state,\n providersCatalog: {\n ...state.providersCatalog,\n isLoading: false,\n error: action.payload,\n },\n };\n\n case GET_VERSIONS_REQUESTED:\n return {\n ...state,\n versionsCatalog: {\n ...state.versionsCatalog,\n isLoading: true,\n error: false,\n },\n };\n\n case GET_VERSIONS_SUCCESS: {\n const sortedVersions = action.payload.slice().sort(versionsDescending);\n return {\n ...state,\n versionsCatalog: {\n versions: sortedVersions,\n isLoading: false,\n error: false,\n },\n };\n }\n\n case GET_VERSIONS_FAILURE:\n return {\n ...state,\n versionsCatalog: {\n ...state.versionsCatalog,\n isLoading: false,\n error: action.payload,\n },\n };\n\n case GET_REGIONS_REQUESTED:\n return {\n ...state,\n regionsCatalog: {\n ...state.regionsCatalog,\n isLoading: true,\n error: false,\n },\n };\n\n case GET_REGIONS_SUCCESS:\n return {\n ...state,\n regionsCatalog: {\n regions: action.payload,\n isLoading: false,\n error: false,\n },\n };\n\n case GET_REGIONS_FAILURE:\n return {\n ...state,\n regionsCatalog: {\n ...state.regionsCatalog,\n isLoading: false,\n error: action.payload,\n },\n };\n\n case GET_PLANS_REQUESTED:\n return {\n ...state,\n plansCatalog: {\n ...state.plansCatalog,\n isLoading: true,\n error: false,\n },\n };\n\n case GET_PLANS_FAILURE:\n return {\n ...state,\n plansCatalog: {\n ...state.plansCatalog,\n isLoading: false,\n error: action.payload,\n },\n };\n\n case GET_PLANS_SUCCESS: {\n const sortedPlans = action.payload.slice().sort(plansAscending);\n return {\n ...state,\n plansCatalog: {\n plans: sortedPlans,\n isLoading: false,\n error: false,\n },\n };\n }\n\n case GET_FLAVORS_REQUESTED:\n return {\n ...state,\n flavorsCatalog: {\n ...state.flavorsCatalog,\n isLoading: true,\n error: false,\n },\n };\n\n case GET_FLAVORS_SUCCESS:\n return {\n ...state,\n flavorsCatalog: {\n flavors: action.payload,\n isLoading: false,\n error: false,\n },\n };\n\n case GET_FLAVORS_FAILURE:\n return {\n ...state,\n flavorsCatalog: {\n ...state.flavorsCatalog,\n isLoading: false,\n error: action.payload,\n },\n };\n\n case GET_ADDONS_REQUESTED:\n return {\n ...state,\n addonsCatalog: {\n ...state.addonsCatalog,\n isLoading: true,\n error: false,\n },\n };\n\n case GET_ADDONS_SUCCESS:\n return {\n ...state,\n addonsCatalog: {\n addons: action.payload,\n isLoading: false,\n error: false,\n },\n };\n\n case GET_ADDONS_FAILURE:\n return {\n ...state,\n addonsCatalog: {\n ...state.addonsCatalog,\n isLoading: false,\n error: action.payload,\n },\n };\n\n case GET_CATALOG_CONFIG_REQUEST:\n return {\n ...state,\n configurationsCatalog: {\n ...state.configurationsCatalog,\n isLoading: true,\n error: false,\n },\n };\n\n case GET_CATALOG_CONFIG_FAILURE:\n return {\n ...state,\n configurationsCatalog: {\n ...state.configurationsCatalog,\n isLoading: false,\n error: action.payload,\n },\n };\n\n case GET_CATALOG_CONFIG_SUCCESS:\n return {\n ...state,\n configurationsCatalog: {\n isLoading: false,\n error: false,\n configurations: action.payload,\n },\n };\n\n default:\n return state;\n }\n}\n","import { RSAA } from 'redux-api-middleware';\n\nimport {\n GET_SERVICES_REQUESTED,\n GET_SERVICES_FAILURE,\n GET_SERVICES_SUCCESS,\n GET_SERVICESUBTYPES_REQUESTED,\n GET_SERVICESUBTYPES_FAILURE,\n GET_SERVICESUBTYPES_SUCCESS,\n GET_PROVIDERS_REQUESTED,\n GET_PROVIDERS_FAILURE,\n GET_PROVIDERS_SUCCESS,\n GET_VERSIONS_REQUESTED,\n GET_VERSIONS_SUCCESS,\n GET_VERSIONS_FAILURE,\n GET_REGIONS_REQUESTED,\n GET_REGIONS_FAILURE,\n GET_REGIONS_SUCCESS,\n GET_PLANS_REQUESTED,\n GET_PLANS_SUCCESS,\n GET_PLANS_FAILURE,\n GET_FLAVORS_REQUESTED,\n GET_FLAVORS_SUCCESS,\n GET_FLAVORS_FAILURE,\n GET_ADDONS_REQUESTED,\n GET_ADDONS_SUCCESS,\n GET_ADDONS_FAILURE,\n GET_CATALOG_CONFIG_REQUEST,\n GET_CATALOG_CONFIG_SUCCESS,\n GET_CATALOG_CONFIG_FAILURE,\n} from '../actions';\n\nexport const getServicesActionSet = () => ({\n [RSAA]: {\n types: [GET_SERVICES_REQUESTED, GET_SERVICES_SUCCESS, GET_SERVICES_FAILURE],\n method: 'GET',\n endpoint: '/services/',\n },\n});\n\nexport const getServices = () => (dispatch) => dispatch(getServicesActionSet());\n\nexport const getServiceSubtypesActionSet = () => ({\n [RSAA]: {\n types: [\n GET_SERVICESUBTYPES_REQUESTED,\n GET_SERVICESUBTYPES_SUCCESS,\n GET_SERVICESUBTYPES_FAILURE,\n ],\n method: 'GET',\n endpoint: '/servicesubtypes/',\n },\n});\n\nexport const getServiceSubtypes = () => (dispatch) => dispatch(getServiceSubtypesActionSet());\n\nexport const getProvidersActionSet = () => ({\n [RSAA]: {\n types: [GET_PROVIDERS_REQUESTED, GET_PROVIDERS_SUCCESS, GET_PROVIDERS_FAILURE],\n method: 'GET',\n endpoint: '/cloudproviders/',\n },\n});\n\nexport const getProviders = () => (dispatch) => dispatch(getProvidersActionSet());\n\nexport const getVersionsActionSet = () => ({\n [RSAA]: {\n types: [GET_VERSIONS_REQUESTED, GET_VERSIONS_SUCCESS, GET_VERSIONS_FAILURE],\n method: 'GET',\n endpoint: '/versions/',\n },\n});\n\nexport const getVersions = () => (dispatch) => dispatch(getVersionsActionSet());\n\nexport const getRegionsActionSet = () => ({\n [RSAA]: {\n types: [GET_REGIONS_REQUESTED, GET_REGIONS_SUCCESS, GET_REGIONS_FAILURE],\n method: 'GET',\n endpoint: '/regions/',\n },\n});\n\nexport const getRegions = () => (dispatch) => dispatch(getRegionsActionSet());\n\nexport const getPlansActionSet = () => ({\n [RSAA]: {\n types: [GET_PLANS_REQUESTED, GET_PLANS_SUCCESS, GET_PLANS_FAILURE],\n method: 'GET',\n endpoint: '/plans/',\n },\n});\n\nexport const getPlans = () => (dispatch) => dispatch(getPlansActionSet());\n\nexport const getFlavorsActionSet = () => ({\n [RSAA]: {\n types: [GET_FLAVORS_REQUESTED, GET_FLAVORS_SUCCESS, GET_FLAVORS_FAILURE],\n method: 'GET',\n endpoint: '/flavors/',\n },\n});\n\nexport const getFlavors = () => (dispatch) => dispatch(getFlavorsActionSet());\n\nexport const getAddonsActionSet = () => ({\n [RSAA]: {\n types: [GET_ADDONS_REQUESTED, GET_ADDONS_SUCCESS, GET_ADDONS_FAILURE],\n method: 'GET',\n endpoint: '/addons/',\n },\n});\n\nexport const getAddons = () => (dispatch) => dispatch(getAddonsActionSet());\n\nconst getConfigurationActionSet = (serviceSubtype) => ({\n [RSAA]: {\n types: [GET_CATALOG_CONFIG_REQUEST, GET_CATALOG_CONFIG_SUCCESS, GET_CATALOG_CONFIG_FAILURE],\n method: 'GET',\n endpoint: `/configurations/?serviceSubtype=${serviceSubtype.toLowerCase()}`,\n },\n});\n\nexport const getConfiguration = (serviceSubtype) => (dispatch) =>\n dispatch(getConfigurationActionSet(serviceSubtype));\n","import reducers from './reducers';\nimport * as actionCreators from './actionCreators';\nimport * as selectors from './selectors';\n\nexport { actionCreators, selectors };\n\nexport default reducers;\n","/**\n * Marketing-friendly event names for actions to be used for tracking purposes\n */\nimport {\n SET_SESSION_SUCCESS,\n LOG_OUT_REQUESTED,\n CREATE_ORG_SUCCESS,\n CREATE_EMAIL_VERIFICATION_SUCCESS,\n UPDATE_ORG_SUCCESS,\n CREATE_STRIPE_SOURCE_SUCCESS,\n UPDATE_STRIPE_SOURCE_SUCCESS,\n CREATEINSTANCE_REQUESTED,\n CREATEINSTANCE_FAILURE,\n CREATE_TOKEN_SUCCESS,\n DELETE_TOKEN_SUCCESS,\n CREATE_USERINVITE_SUCCESS,\n ACCEPT_INVITATION_SUCCESS,\n} from '../../dux/actions';\n\nconst map = {\n [SET_SESSION_SUCCESS]: {\n eventName: 'Account Logged In',\n eventCatagory: 'Account',\n },\n [LOG_OUT_REQUESTED]: {\n eventName: 'Account Logged Out',\n eventCatagory: 'Account',\n },\n [CREATE_EMAIL_VERIFICATION_SUCCESS]: {\n eventName: 'Verification Email Resent',\n eventCatagory: 'Account',\n },\n // Organization\n [CREATE_ORG_SUCCESS]: {\n eventName: 'Organization Created',\n eventCatagory: 'Organization',\n },\n [UPDATE_ORG_SUCCESS]: {\n eventName: 'Organization Updated',\n eventCatagory: 'Organization',\n },\n [CREATE_STRIPE_SOURCE_SUCCESS]: {\n eventName: 'Credit Card Added',\n eventCatagory: 'Organization',\n },\n [UPDATE_STRIPE_SOURCE_SUCCESS]: {\n eventName: 'Credit Card Updated',\n eventCatagory: 'Organization',\n },\n // Create Instance\n [CREATEINSTANCE_REQUESTED]: {\n eventName: 'Instance Creation Requested',\n eventCatagory: 'Instance Create',\n },\n [CREATEINSTANCE_FAILURE]: {\n eventName: 'Instance Creation Failed',\n eventCatagory: 'Instance Create',\n },\n\n // API Token\n [CREATE_TOKEN_SUCCESS]: {\n eventName: 'API Token Created',\n eventCatagory: 'API Token',\n },\n [DELETE_TOKEN_SUCCESS]: {\n eventName: 'API Token Deleted',\n eventCatagory: 'API Token',\n },\n // User Invite\n [CREATE_USERINVITE_SUCCESS]: {\n eventName: 'User Invited',\n eventCatagory: 'User Management',\n },\n [ACCEPT_INVITATION_SUCCESS]: {\n eventName: 'User Invite Accepted',\n eventCatagory: 'User Management',\n },\n};\n\nexport default map;\n","/**\n * Middleware that sets some sane default for redux-segment tracked events and\n * augments analytics metadata to make your life easier, including:\n * - Setting analytics event type to a track event by default\n * - Automatically mapping the action name to a corresponding human-friendly\n * tracking event you defined in the tracking.js file in the dux.\n * - Augmenting the properties on the event to include (mostly static) props\n * that should be included with every tracking request, including things like\n * userId, source, etc.\n */\nimport { EventTypes } from 'redux-segment';\nimport eventMap from './eventMap';\nimport { selectors } from '../../dux/user';\n\n// Event auto-tracked by Redux Segment that need to be augmented\nconst AUTOTRACKED_EVENTS = [\n '@@router/INIT_PATH',\n '@@router/UPDATE_PATH',\n '@@router/LOCATION_CHANGE',\n '@@reduxReactRouter/initRoutes',\n '@@reduxReactRouter/routerDidChange',\n '@@reduxReactRouter/replaceRoutes',\n];\n\n/**\n * Converts the action from a shorthand format that only specifies the event\n * type to a full action that includes an eventType and an eventPayload object\n * with a properties object.\n *\n * @param {object} action - Action to expand with metadata\n * @param {object} defaultEventType - The event type to use if not already\n * specififed in the action metadata\n * @returns {object} - The action augmented with analytics metadata\n */\nconst expandAnalyticsMetadata = (action, defaultEventType = EventTypes.track) => {\n const newAction = JSON.parse(JSON.stringify(action));\n let trackMeta;\n\n newAction.meta = newAction.meta || {};\n newAction.meta.analytics = newAction.meta.analytics || {};\n switch (typeof newAction.meta.analytics) {\n case 'boolean':\n newAction.meta.analytics = {\n eventType: defaultEventType,\n eventPayload: {\n properties: {},\n },\n };\n break;\n\n case 'string':\n newAction.meta.analytics = {\n eventType: action.meta.analytics,\n eventPayload: {\n properties: {},\n },\n };\n break;\n\n case 'object':\n trackMeta = newAction.meta.analytics;\n trackMeta.eventType = trackMeta.eventType || defaultEventType;\n trackMeta.eventPayload = trackMeta.eventPayload || {};\n trackMeta.eventPayload.properties = trackMeta.eventPayload.properties || {};\n break;\n\n default:\n newAction.meta.analytics = {\n eventType: defaultEventType,\n eventPayload: {\n properties: {},\n },\n };\n break;\n }\n\n return newAction;\n};\n\n/**\n * Expands the action's metadata to include an identify call where applicable\n *\n * @param {object} action - Action to expand with metadata\n * @param {object} store - The store where the app state lives\n * specififed in the action metadata\n * @returns {object} - The action augmented with analytics metadata\n */\nconst createIdentifyPayload = (action, store) => {\n const newAction = JSON.parse(JSON.stringify(action));\n const company = newAction.meta.company || null;\n const phone = newAction.meta.phone || null;\n const { id, email } = selectors.getIdentityState(store.getState());\n if (company && phone) {\n const trackEvent = newAction.meta.analytics;\n const identifyEvent = {\n eventType: EventTypes.identify,\n eventPayload: {\n userId: id,\n traits: {\n email,\n company,\n phone,\n },\n },\n };\n newAction.meta.analytics = [trackEvent, identifyEvent];\n delete newAction.meta.company;\n delete newAction.meta.phone;\n }\n return newAction;\n};\n\n/**\n * Gets the event name for a given action, either from the event map or directly\n * from the action itself\n *\n * @param {object} action - Action to get the event name for\n * @returns {string} - The event name for the action\n */\nconst getEventName = (action) => {\n if (eventMap[action.type]) {\n return eventMap[action.type].eventName;\n }\n if (action.meta.service) {\n return 'Instance Created - '.concat(action.meta.service, ' V5');\n }\n if (action.meta.trackClick) {\n if (action.meta.buttonName.includes(',')) {\n return action.meta.buttonName.replace(/,/g, '').concat(' Button Clicked');\n }\n return `${action.meta.buttonName} Button Clicked`;\n }\n return action.meta.analytics.eventPayload.event || action.type;\n};\n\n/**\n * Gets the event name for a given action, either from the event map or directly\n * from the action itself\n *\n * @param {object} action - Action to get the event name for\n * @returns {string} - The event name for the action\n */\nconst getCatagoryName = (action) => {\n if (eventMap[action.type]) {\n return eventMap[action.type].eventCatagory;\n }\n // if (action.meta.category) {\n // return action.meta.category;\n // }\n return null;\n};\n\n/**\n * Gets the global tracking properties from the store\n *\n * @param {object} store - The store where the app state lives\n * @returns {object} - An object of global properties that should be included\n * in each tracking event\n */\nconst getGlobalTrackingProps = (store) => {\n const { email, roles } = selectors.getIdentityState(store.getState());\n // TODO: Add more global props here when we know what they should be\n return {\n source: 'GUIV',\n email,\n roles,\n };\n};\n\n/**\n * Determines if an action already has analytics metadata\n *\n * @param {object} action - The action to examine\n * @returns {boolean} - Whether or not the action already contains analytics\n * metadata\n */\nconst hasAnalyticsMeta = (action) => action && action.meta && action.meta.analytics;\n\n/**\n * Determines if an action represents an page event that is auto-tracked by\n * the Segment library\n *\n * @param {object} action - The action to examine\n * @returns {boolean} - Whether or not the action is an autotracked page event\n */\nconst isAutoTrackedPageEvent = (action) => action && AUTOTRACKED_EVENTS.includes(action.type);\n\n/**\n * Middleware function that augments the action with analytics metadata\n *\n * @param {object} action - The action to examine\n * @returns {function} - Middleware function that adds the metadata to the\n * current action and calls the next action.\n */\nconst trackingAugmentor = (store) => (next) => (action) => {\n let augAction = action;\n const isAutoTracked = isAutoTrackedPageEvent(action);\n if (hasAnalyticsMeta(action) || isAutoTracked) {\n augAction = expandAnalyticsMetadata(action, isAutoTracked ? EventTypes.page : EventTypes.track);\n augAction.meta.analytics.eventPayload.event = getEventName(augAction);\n if (augAction.meta.analytics.eventType === EventTypes.track) {\n augAction.meta.analytics.eventPayload.properties.action = getEventName(augAction);\n augAction.meta.analytics.eventPayload.properties.category = getCatagoryName(augAction);\n }\n Object.assign(augAction.meta.analytics.eventPayload.properties, getGlobalTrackingProps(store));\n augAction = createIdentifyPayload(augAction, store);\n }\n return next(augAction);\n};\n\nexport default trackingAugmentor;\n","export const GENERIC_VALIDATION_ERROR =\n 'There was a problem with your submission. Please correct any errors and try again.';\nexport const GENERIC_API_ERROR =\n 'Something went wrong! Please try again or contact support if the problem continues.';\nexport const GENERIC_REQUEST_ERROR =\n 'Something is wrong with your connection to the server. Please try again or contact support if the problem continues.';\n","// Organization for _error prop used by Redux API Middlware\n/* eslint-disable no-underscore-dangle */\n/**\n * Middleware for handling various failure codes from middleware-base API\n * requests that should be handled in a consistent way throughout the application,\n * including preparing error messages to be consumed by redux form.\n */\nimport { replace } from 'connected-react-router';\n\nimport { enqueueSnackbar } from 'dux/notifications/actionCreators';\nimport { GENERIC_VALIDATION_ERROR, GENERIC_REQUEST_ERROR } from '../../constants/errors';\n\nconst ERROR_MAP = {\n 'organization with this company name already exists.':\n 'An organization with this name already exists.',\n};\n\n/**\n * Function for mapping API errors to an object that can be consumed by redux form\n *\n * @param {object} result - An API action result\n * @returns {object} - Object that represents the errors from the result\n * payload mapped to a redux form consumable format including a form-level\n * error message and field-specific error messages, all mapped from arrays to strings\n * as needed.\n */\nconst getFormErrors = (result) => {\n let errObj = {};\n\n if (result.payload && result.payload.response && Object.keys(result.payload.response).length) {\n Object.keys(result.payload.response).reduce((acc, key) => {\n const val = result.payload.response[key];\n // Show first validation message if there are multiple returned in an array\n // The last else/if is for cockroachdb error messages\n if (Array.isArray(val)) {\n acc[key] = val.length ? val[0] : null;\n } else if (typeof val === 'string') {\n acc[key] = val;\n } else if (typeof val === 'object' && val.pgmessage) {\n acc[key] = val.pgmessage;\n }\n return acc;\n }, errObj);\n\n // Map the error messages to a more user-friendly version if they exist\n errObj = Object.keys(errObj).reduce((acc, key) => {\n acc[key] = ERROR_MAP[errObj[key]] || errObj[key];\n return acc;\n }, errObj);\n }\n // If no field-specific error messages were found, then show a generic error\n // The assumption is that if there is some prop other than [error, errors] in\n // the response payload, then there is at least one field-level validation\n // message to correct, and there's no need for a generic, form-wide error message.\n if (errObj.error) {\n errObj._error = errObj.error;\n delete errObj.error;\n } else if (errObj.errors) {\n errObj._error = errObj.errors;\n delete errObj.errors;\n } else if (errObj.nonFieldErrors) {\n errObj._error = errObj.nonFieldErrors;\n delete errObj.nonFieldErrors;\n } else if (errObj.detail) {\n errObj._error = errObj.detail;\n delete errObj.detail;\n } else {\n errObj._error = GENERIC_VALIDATION_ERROR;\n }\n return errObj;\n};\n\n/**\n * Middleware function that handles API errors and maps them to form errors as\n * appropriate.\n *\n * @param {object} store - The root store\n * @returns {function} - Middleware function that adds maps API errors to\n * a formErrors prop or otherwise properly handlers redirects for various\n * HTTP status errors.\n */\nexport default (store) => (next) => (action) => {\n const additionalProps = {};\n if (action.payload && action.payload.name === 'ApiError') {\n switch (action.payload.status) {\n case 400: // Bad Request -> map validation errors for redux forms\n additionalProps.formErrors = getFormErrors(action);\n // show non-field form errors in Snackbar\n if (action.payload.response.nonFieldErrors) {\n const errorMsg = action.payload.response.nonFieldErrors[0]\n ? action.payload.response.nonFieldErrors[0]\n : 'Error - Bad Request';\n store.dispatch(\n enqueueSnackbar({\n message: errorMsg,\n options: {\n variant: 'error',\n },\n }),\n );\n }\n\n // show snackbar if max limit reached\n if (\n typeof action.payload.response === 'string' &&\n action.payload.response.includes('Maximum number')\n ) {\n store.dispatch(\n enqueueSnackbar({\n message: action.payload.response,\n options: {\n variant: 'error',\n },\n }),\n );\n }\n break;\n\n default: {\n let { message } = action.payload;\n if (action.payload.response?.detail) {\n message += ` - ${action.payload.response.detail}`;\n }\n store.dispatch(\n enqueueSnackbar({\n message,\n options: {\n variant: 'error',\n },\n }),\n );\n }\n }\n } else if (action.payload && action.payload.name === 'RequestError') {\n // No connection to API\n switch (action.type) {\n case 'CREATE_TOKEN_FAILURE': // Form submission with no server connection -> Redirect to Error page\n store.dispatch(\n replace('/error/requestError', {\n from: store.getState().router.location.pathname,\n }),\n );\n break;\n default:\n additionalProps.formErrors = { _error: GENERIC_REQUEST_ERROR };\n }\n }\n return next({ ...action, ...additionalProps });\n};\n","import { createStore, applyMiddleware, compose } from 'redux';\nimport { routerMiddleware } from 'connected-react-router';\nimport thunk from 'redux-thunk';\nimport { createBrowserHistory } from 'history';\nimport { createTracker } from 'redux-segment';\nimport { apiMiddleware } from 'redux-api-middleware';\n\nimport rootReducer from './dux/rootReducer';\nimport { loadState, saveState } from './services/stateStorage';\nimport trackingAugmentor from './middleware/trackingAugmentor';\nimport apiConfig from './middleware/apiConfig';\nimport apiError from './middleware/apiError';\n\nexport const history = createBrowserHistory();\nconst tracker = createTracker();\n\nconst initialState = loadState();\nconst enhancers = [];\nconst middleware = [\n thunk,\n routerMiddleware(history),\n apiConfig, // Must come before apiMiddleware\n apiMiddleware, // Must come before all tracking-related middleware\n trackingAugmentor,\n tracker, // Must come after trackingAugmentor\n apiError, // Must come after apiMiddleware\n];\n\nif (process.env.NODE_ENV === 'development' || process.env.REACT_APP_FEATURE_STAGING === 'staging') {\n const { __REDUX_DEVTOOLS_EXTENSION__ } = window;\n\n if (typeof __REDUX_DEVTOOLS_EXTENSION__ === 'function') {\n enhancers.push(__REDUX_DEVTOOLS_EXTENSION__());\n }\n}\n\nconst composedEnhancers = compose(applyMiddleware(...middleware), ...enhancers);\n\nconst store = createStore(rootReducer(history), initialState, composedEnhancers);\n\nstore.subscribe(() => {\n saveState({\n user: store.getState().user,\n catalog: store.getState().catalog,\n });\n});\n\nexport default store;\n","/**\n * Middlware for configuring API request-based actions with base URL for APIV\n * and adding the authenication header\n */\nimport { RSAA } from 'redux-api-middleware';\n\nimport { selectors } from '../../dux/user';\n\n/**\n * For CALL_API actions, prefixes the endpoint URL with APIV if base URL is not\n * specified and adds an authorization header for APIV calls\n *\n * @param {object} action - Action to modify\n * @returns {object} - The action augmented with any API-related properties if\n * it is a CALL_API action or the original action otherwise.\n */\nexport default (store) => (next) => (action) => {\n const callApi = action[RSAA];\n const { impersonatedOrganizationId } = selectors.getIdentityState(store.getState());\n\n if (callApi) {\n // Prefix URL with APIV base URL if not specified\n if (!callApi.endpoint.match(/http/i)) {\n callApi.endpoint = `${process.env.REACT_APP_APIV5_BASE_URL}${callApi.endpoint}`;\n }\n\n // Append org ID if an org is being impersonated\n if (impersonatedOrganizationId) {\n callApi.endpoint = `${callApi.endpoint}?organization=${impersonatedOrganizationId}`;\n }\n\n // If call for APIV, add auth token header (if needed) and content type\n if (callApi.endpoint.includes(process.env.REACT_APP_APIV5_BASE_URL)) {\n if (callApi.endpoint.match(/\\/userinvite\\/validate\\/|\\/userinvite\\/accept\\//i)) {\n callApi.headers = {\n ...callApi.headers,\n 'Content-Type': 'application/json',\n };\n } else {\n callApi.headers = {\n ...callApi.headers,\n Authorization: `Bearer ${selectors.getCredentialsState(store.getState()).accessToken}`,\n 'Content-Type': 'application/json',\n };\n }\n }\n }\n return next(action);\n};\n","import { combineReducers } from 'redux';\nimport { connectRouter } from 'connected-react-router';\nimport { reducer as formReducer } from 'redux-form';\nimport { uiStateReducer } from 'react-redux-ui-state';\nimport notifications from './notifications';\nimport apitokens from './apitokens';\nimport instances from './instances';\nimport instancesV4 from './instancesORv4';\nimport user from './user';\nimport usersManagement from './usersManagement';\nimport usersInviteSignup from './usersInviteSignup';\nimport org from './org';\nimport createInstance, { createInstanceForms } from './createInstance';\nimport catalog from './catalog';\n\nexport default (history) =>\n combineReducers({\n router: connectRouter(history),\n notifications,\n form: formReducer.plugin(createInstanceForms),\n uiState: uiStateReducer,\n user,\n usersManagement,\n usersInviteSignup,\n org,\n apitokens,\n instances,\n createInstance,\n catalog,\n instancesV4,\n });\n","import React from 'react';\nimport CloseIcon from '@material-ui/icons/Close';\nimport IconButton from '@material-ui/core/IconButton';\n\nimport PropTypes from 'prop-types';\n\nexport default class SnackbarNotifier extends React.Component {\n constructor() {\n super();\n this.displayed = [];\n }\n\n componentDidUpdate() {\n const { notifications, enqueueSnackbar, removeSnackbar, closeSnackbar } = this.props;\n\n notifications.forEach((notification) => {\n // Do nothing if snackbar is already displayed\n if (this.displayed.includes(notification.key)) return;\n // Display snackbar using notistack\n /* istanbul ignore next */\n const action = (key) => (\n <IconButton\n key=\"close\"\n aria-label=\"Close\"\n onClick={() => {\n closeSnackbar(key);\n }}\n color=\"inherit\"\n >\n <CloseIcon />\n </IconButton>\n );\n enqueueSnackbar(notification.message, { ...notification.options, action });\n // Keep track of snackbars that we've displayed\n this.storeDisplayed(notification.key);\n // Dispatch action to remove snackbar from redux store\n removeSnackbar(notification.key);\n });\n }\n\n storeDisplayed(key) {\n this.displayed = [...this.displayed, key];\n }\n\n render() {\n return null;\n }\n}\n\nSnackbarNotifier.propTypes = {\n notifications: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n enqueueSnackbar: PropTypes.func.isRequired,\n removeSnackbar: PropTypes.func.isRequired,\n closeSnackbar: PropTypes.func.isRequired,\n};\n","import { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { withSnackbar } from 'notistack';\nimport { removeSnackbar } from 'dux/notifications/actionCreators';\n\nimport SnackbarNotifier from './SnackNotifier';\n\nconst mapStateToProps = (store) => ({\n notifications: store.notifications.notifications,\n});\n\nconst mapDispatchToProps = (dispatch) => bindActionCreators({ removeSnackbar }, dispatch);\n\nexport default withSnackbar(connect(mapStateToProps, mapDispatchToProps)(SnackbarNotifier));\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Typography from '@material-ui/core/Typography';\nimport { withStyles } from '@material-ui/styles';\n\nimport { GENERIC_REQUEST_ERROR } from 'constants/errors';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n error: PropTypes.shape({\n error: PropTypes.string.isRequired,\n errorDescription: PropTypes.string.isRequired,\n }).isRequired,\n errorStatusCode: PropTypes.string,\n};\n\nconst defaultProps = {\n errorStatusCode: '',\n};\n\nexport function UnstyledErrorPage({ classes, error, errorStatusCode }) {\n const err = error || {};\n const customBadRequestError =\n err.errorDescription && err.error === 'access_denied' ? err.errorDescription : 'Bad Request';\n\n // Specific to user invite token\n let customError401 = \"You don't have permissions to view this page.\"\n if (err.error === 'Expired token')\n customError401 = \"This invite has expired. Please request a new invite.\"\n else if (err.error === 'Invalid token' || err.error === 'Invalid key')\n customError401 = \"Invalid link. Please request a new invite.\"\n\n const errorStatusList = {\n 400: {\n image: '/images/errors/400Error.svg',\n text: customBadRequestError,\n },\n 401: {\n image: '/images/errors/401Error.svg',\n text: customError401,\n },\n 403: {\n image: '/images/errors/403Error.svg',\n text: 'Forbidden',\n },\n 404: {\n image: '/images/errors/404Error.svg',\n text: \"We can't find the page you were looking for.\",\n },\n requestError: {\n image: '/images/logos/robot-dropped-icecream.png',\n text: GENERIC_REQUEST_ERROR,\n },\n default: {\n image: '/images/logos/robot-dropped-icecream.png',\n text: 'Something went wrong. Sorry about that.',\n },\n };\n\n const errorStatus = errorStatusList[errorStatusCode] || errorStatusList.default;\n\n return (\n <div className={classes.container}>\n <div className={classes.background} />\n <div className={classes.contentContainer}>\n <div className={classes.logoContainer}>\n <img src=\"/images/logos/or-ascii.svg\" className={classes.logo} alt=\"Object Rocket\" />\n </div>\n <div className={classes.imageContainer}>\n <div className={classes.rocketContainer}>\n <img\n src=\"/images/rockets/rocket-step3.svg\"\n className={classes.rocket}\n alt=\"rocket logo\"\n />\n </div>\n <div className={classes.errorStatusContainer}>\n {errorStatus !== errorStatusList.default && errorStatusCode !== 'requestError' ? (\n <img\n src={errorStatus.image}\n className={classes.errorStatus}\n alt={`${errorStatusCode} status code`}\n />\n ) : (\n <img src={errorStatus.image} className={classes.robot} alt=\"sad robot\" />\n )}\n </div>\n </div>\n <div className={classes.textContainer}>\n <Typography variant=\"h2\" className={classes.oops}>\n Oops!\n </Typography>\n <Typography variant=\"h4\" className={classes.errorMessage}>\n {errorStatus.text}\n </Typography>\n </div>\n </div>\n </div>\n );\n}\n\nUnstyledErrorPage.propTypes = propTypes;\nUnstyledErrorPage.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n container: {\n // cover the MissionControl content class padding\n margin: theme.spacing(-1),\n overflow: 'hidden',\n backgroundColor: '#1d191a',\n backgroundSize: 'cover',\n height: '100%',\n },\n background: {\n background: 'url(\"/images/errors/long-sliding-stars.png\")',\n backgroundSize: 'contain',\n height: '100vh',\n width: '10000px',\n animation: 'slide 60s linear infinite',\n },\n '@keyframes slide': {\n '0%': {\n transform: 'translate3d(0, 0, 0)',\n },\n '100%': {\n transform: 'translate3d(-7500px, 0, 0)',\n },\n },\n contentContainer: {\n position: 'absolute',\n top: 0,\n left: 0,\n padding: `${theme.spacing(3)}px ${theme.spacing(3)}px`,\n display: 'flex',\n flexFlow: 'column nowrap',\n width: '100%',\n },\n logoContainer: {\n display: 'flex',\n justifyContent: 'center',\n marginBottom: theme.spacing(2),\n },\n logo: {\n width: '100%',\n height: 'auto',\n maxHeight: '100px',\n },\n imageContainer: {\n display: 'flex',\n flexFlow: 'row wrap',\n justifyContent: 'space-between',\n flex: '1 1 50%',\n width: '100%',\n height: 'auto',\n },\n rocketContainer: {\n display: 'flex',\n alignItems: 'space-around',\n justifyContent: 'center',\n flex: '1 1 25%',\n paddingTop: theme.spacing(3),\n paddingRight: theme.spacing(1),\n },\n rocket: {\n width: '100%',\n height: 'auto',\n maxHeight: theme.spacing(5),\n },\n errorStatusContainer: {\n display: 'flex',\n alignItems: 'flex-start',\n justifyContent: 'center',\n flex: '1 1 75%',\n },\n errorStatus: {\n width: '100%',\n height: 'auto',\n maxHeight: '400px',\n },\n robot: {\n maxWidth: '400px',\n maxHeight: '400px',\n height: 'auto',\n width: '100%',\n },\n textContainer: {\n display: 'flex',\n width: '100%',\n flexFlow: 'column nowrap',\n flex: '1 1 auto',\n },\n oops: {\n display: 'flex',\n width: '100%',\n color: '#f7a80a',\n fontFamily: 'Courier',\n justifyContent: 'center',\n },\n errorMessage: {\n display: 'flex',\n width: '100%',\n color: '#f7a80a',\n fontFamily: 'Courier',\n paddingTop: theme.spacing(2),\n justifyContent: 'center',\n },\n});\n\nexport default withStyles(styles)(UnstyledErrorPage);\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport ErrorPage from 'components/ErrorPage/ErrorPage';\n\nconst propTypes = {\n error: PropTypes.shape({}).isRequired,\n};\n\n// For some reason passing ErrorPage to the <ErrorBoundary> component directly\n// results in an error.\nexport function UnstyledErrorBoundaryFallback({ error }) {\n return (\n <div role=\"alert\">\n <ErrorPage error={error} />\n </div>\n );\n}\n\nUnstyledErrorBoundaryFallback.propTypes = propTypes;\n\nexport default UnstyledErrorBoundaryFallback;\n","/**\n * Footer that appears on the sign up page\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport Typography from '@material-ui/core/Typography';\nimport classnames from 'classnames';\n\nconst propTypes = {\n classes: PropTypes.shape({\n root: PropTypes.string.isRequired,\n }).isRequired,\n className: PropTypes.string,\n};\n\nconst defaultProps = {\n className: null,\n};\n\nexport function UnstyledSignUpFooter({ className, classes }) {\n return (\n <footer className={classnames(className, classes.root)}>\n <Typography variant=\"body2\" align=\"center\">\n © {new Date(Date.now()).getFullYear()} Rackspace, US Inc.\n <span className=\"divider\">|</span>\n <a href=\"http://objectrocket.com/legal\" target=\"_blank\" rel=\"noreferrer noopener\">\n Privacy Statement\n </a>\n </Typography>\n </footer>\n );\n}\n\nUnstyledSignUpFooter.propTypes = propTypes;\nUnstyledSignUpFooter.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n root: {\n padding: theme.spacing(1),\n fontFamily: ['OpenSans', 'sans-serif'].join(','),\n '& .divider': {\n padding: '0 .5rem',\n },\n '& a': {\n marginLeft: '2px',\n color: theme.customColors.white,\n textDecoration: 'none',\n },\n },\n});\n\nexport default withStyles(styles)(UnstyledSignUpFooter);\n","/**\n * Service for disabling buttons that render or call\n * certain actions based on a users role or permissions\n */\nexport default function roleDisabled(userRoles, roles) {\n return userRoles && !roles.some((val) => userRoles.includes(val));\n}\n","/**\n * Component to redirect users to the profile page\n * */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { Redirect } from 'react-router-dom';\n\nimport roleDisabled from 'services/roleDisabled/index';\nimport {\n OWNER,\n OR_ADMIN,\n OR_SUPERUSER,\n OR_READONLY,\n OR_SUPERREAD,\n ADMIN,\n READONLY,\n BILLING,\n} from 'constants/roles';\n\nconst propTypes = {\n location: PropTypes.shape({\n pathname: PropTypes.string.isRequired,\n }).isRequired,\n userRoles: PropTypes.arrayOf(PropTypes.string).isRequired,\n};\n\nfunction InstancesPageRedirect({ location, userRoles }) {\n const allowedUserRoles = [\n OWNER,\n OR_ADMIN,\n OR_SUPERUSER,\n OR_READONLY,\n OR_SUPERREAD,\n ADMIN,\n READONLY,\n BILLING,\n ];\n return (\n <Redirect\n to={{\n pathname: roleDisabled(userRoles, allowedUserRoles)\n ? '/mission-ctrl/profile'\n : '/mission-ctrl/instances',\n state: { from: location.pathname },\n }}\n />\n );\n}\n\nInstancesPageRedirect.propTypes = propTypes;\n\nexport default InstancesPageRedirect;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport TextField from '@material-ui/core/TextField';\nimport InputAdornment from '@material-ui/core/InputAdornment';\n\nconst defaultProps = {\n adornment: null,\n};\n\nconst propTypes = {\n input: PropTypes.shape({}).isRequired,\n label: PropTypes.string.isRequired,\n meta: PropTypes.shape({}).isRequired,\n adornment: PropTypes.shape({\n position: PropTypes.string,\n value: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),\n }),\n};\n\nconst WrappedTextField = ({\n input,\n label,\n adornment,\n meta: { touched, error, invalid },\n ...rest\n}) =>\n adornment ? (\n <TextField\n label={label}\n error={touched && invalid}\n helperText={touched && error}\n {...input}\n {...rest}\n InputProps={{\n [`${adornment.position}Adornment`]: (\n <InputAdornment position={adornment.position}>{adornment.value}</InputAdornment>\n ),\n }}\n />\n ) : (\n <TextField\n label={label}\n error={touched && invalid}\n helperText={touched && error}\n {...input}\n {...rest}\n />\n );\n\nWrappedTextField.propTypes = propTypes;\nWrappedTextField.defaultProps = defaultProps;\n\nexport default WrappedTextField;\n","/**\n * Wrapper around Material UI button that allows button to be put into a loading\n * state, which shows a loading spinner over the disabled button\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport Button from '@material-ui/core/Button';\nimport CircularProgress from '@material-ui/core/CircularProgress';\nimport Fab from '@material-ui/core/Fab';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport { withStyles } from '@material-ui/styles';\n\nconst propTypes = {\n btnClassName: PropTypes.string,\n className: PropTypes.string,\n classes: PropTypes.shape({\n wrapper: PropTypes.string.isRequired,\n progress: PropTypes.string.isRequired,\n miniFabProgress: PropTypes.string.isRequired,\n fabProgress: PropTypes.string.isRequired,\n nonFabProgress: PropTypes.string.isRequired,\n }).isRequired,\n loading: PropTypes.bool,\n disabled: PropTypes.bool,\n variant: PropTypes.string,\n mini: PropTypes.bool,\n tooltip: PropTypes.string,\n tooltipPlacement: PropTypes.string,\n};\n\nconst defaultProps = {\n btnClassName: null,\n className: null,\n loading: false,\n disabled: false,\n variant: null,\n mini: false,\n tooltip: '',\n tooltipPlacement: 'bottom',\n};\n\nexport function UnstyledBusyButton({\n btnClassName,\n className,\n classes,\n loading,\n disabled,\n variant,\n mini,\n tooltip,\n tooltipPlacement,\n ...rest\n}) {\n let progressSize = 25;\n let thickness = 3.2;\n const progressClasses = [classes.progress];\n\n if (loading) {\n if (variant === 'fab') {\n if (mini) {\n progressSize = 47;\n thickness = 4.5;\n progressClasses.push(classes.miniFabProgress);\n } else {\n progressSize = 65;\n thickness = 4;\n progressClasses.push(classes.fabProgress);\n }\n } else {\n progressClasses.push(classes.nonFabProgress);\n }\n }\n\n let button;\n\n if (variant === 'fab' && tooltip) {\n button = (\n <Tooltip title={tooltip} placement={tooltipPlacement}>\n <span>\n <Fab disabled={disabled || loading} {...rest} className={btnClassName} />\n </span>\n </Tooltip>\n );\n } else if (variant === 'fab') {\n button = <Fab disabled={disabled || loading} {...rest} className={btnClassName} />;\n } else if (tooltip) {\n button = (\n <Tooltip title={tooltip} placement={tooltipPlacement}>\n <span>\n <Button\n variant={variant}\n disabled={disabled || loading}\n {...rest}\n className={btnClassName}\n />\n </span>\n </Tooltip>\n );\n } else {\n button = (\n <Button variant={variant} disabled={disabled || loading} {...rest} className={btnClassName} />\n );\n }\n\n return (\n <div className={className}>\n <div className={classes.wrapper}>\n {button}\n {loading && (\n <CircularProgress\n size={progressSize}\n className={classnames(progressClasses)}\n thickness={thickness}\n />\n )}\n </div>\n </div>\n );\n}\n\nUnstyledBusyButton.propTypes = propTypes;\nUnstyledBusyButton.defaultProps = defaultProps;\n\nconst styles = () => ({\n wrapper: {\n position: 'relative',\n },\n progress: {\n position: 'absolute',\n top: '50%',\n left: '50%',\n },\n miniFabProgress: {\n marginTop: -23,\n marginLeft: -22,\n },\n fabProgress: {\n marginTop: -32,\n marginLeft: -31,\n },\n nonFabProgress: {\n marginTop: -12,\n marginLeft: -12,\n },\n});\n\nexport default withStyles(styles)(UnstyledBusyButton);\n","/**\n * Service for validating form-related fields\n *\n * IMPORTANT: Before adding a rule, check the validator library to ensure\n * the rule does not already exist here: https://github.com/chriso/validator.js\n */\nimport validator from 'validator';\n\n/**\n * Determines whether or not a string contains a minimum number of chars\n *\n * @param {string} length - Minimum number of characters to accept\n * @param {string} value - String to test\n * @returns {boolean} - Whether or not string has the minimum number of chars\n */\nvalidator.hasMinLength = (minLength) => (value) => Boolean(!value || value.length >= minLength);\n\n/**\n * Determines whether or not a string contains a maximum number of chars\n *\n * @param {string} length - Maximum number of characters to accept\n * @param {string} value - String to test\n * @returns {boolean} - Whether or not string has the maximum number of chars\n */\nvalidator.hasMaxLength = (maxLength) => (value) => Boolean(!value || value.length <= maxLength);\n\n/**\n * Determines whether or not a value is defined or not\n *\n * @param {string} value - String to test\n * @returns {boolean} - Whether or not string has has a value\n */\nvalidator.isRequired = (value) => Boolean(value);\n\n/**\n * Determines whether or not a value is contains only alphanumeric\n * and underscore characters\n *\n * @param {string} value - String to test\n * @returns {boolean} - Whether or not string has has a value\n */\nvalidator.isAlphanumericUnderscore = (value) => RegExp('^[A-Za-z0-9_]+$').test(value);\n\n/**\n * Determines whether or not a value is contains is a valid\n * IPv4 address or range\n *\n * @param {string} value - String to test\n * @returns {boolean} - Whether or not string has has a value\n */\nvalidator.isCidr = (value) => {\n const ipv4Regex = /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/;\n const cidrv4Regex = /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$/;\n return cidrv4Regex.test(value) || ipv4Regex.test(value);\n};\n\nvalidator.isAclUnique = (newAcl, acls) =>\n acls.filter((acl) => acl.kind + acl.cidr === newAcl.kind + newAcl.cidr).length === 0;\n\nvalidator.isUserUnique = (newEmail, users, invites) =>\n users.filter((user) => user.email.toLowerCase() === newEmail.toLowerCase()).length === 0 &&\n invites.filter((invite) => invite.email2invite.toLowerCase() === newEmail.toLowerCase())\n .length === 0;\n\nexport default validator;\n","/**\n * Service for validating and returning appropriate error messages for form\n * validation rules\n */\nimport rules from '../validator';\n\n/**\n * Returns an appropriate error message for email address validation\n *\n * @param {string} value - Email address to test\n * @returns {string} - Error message if email is invalid or undefined otherwise\n */\nexport const email = (value) => (rules.isEmail(value) ? undefined : 'Invalid email address');\n\n/**\n * Returns an appropriate error message for max length validation\n *\n * @param {number} length - Maximum number of chars the value should have\n * @param {string} value - String to test\n * @returns {function} - Function that will return a string error message if\n * the value does not meet the maximum length or undefined otherwise\n */\nexport const maxLength = (length) => (value) =>\n rules.hasMaxLength(length)(value) ? undefined : `Field must be ${length} characters or less`;\n\n/**\n * Returns an appropriate error message for min length validation\n *\n * @param {number} length - Minimum number of chars the value should have\n * @param {string} value - String to test\n * @returns {function} - Function that will return a string error message if\n * the value does not meet the minimum length or undefined otherwise\n */\nexport const minLength = (length) => (value) =>\n rules.hasMinLength(length)(value) ? undefined : `Field must be at least ${length} characters`;\n\n/**\n * Returns an appropriate error message for required field validation\n *\n * @param {string} value - String to test\n * @returns {string} - Error message if the value is not defined or undefined\n * otherwise\n */\nexport const required = (value) => (rules.isRequired(value) ? undefined : 'Field required');\n\n/**\n * Returns an appropriate error message for the required field validation\n *\n * @param {string} value - String to test\n * @returns {string} - Error message if the value contains something other than\n * alphanumeric characters or underscores\n */\nexport const isAlphanumericUnderscore = (value) =>\n rules.isAlphanumericUnderscore(value)\n ? undefined\n : 'Field must be alphanumeric and can contain underscores';\n\n/**\n * Returns an appropriate error message for the required field validation\n *\n * @param {string} value - String to test\n * @returns {string} - Error message if the value is something other than a\n * valid IPv4 address or range\n */\nexport const validateCidr = (value) =>\n rules.isCidr(value) ? undefined : 'Must be a valid IPv4 address or range';\n\nexport const aclItemUnique = (value, values, { newAcl, newInstanceAcls }) =>\n rules.isAclUnique(newAcl, newInstanceAcls) ? undefined : 'Entry already exists in ACL';\n\nexport const isUserUniqueValidation = (value, values, users, invites) =>\n rules.isUserUnique(value, users, invites) ? undefined : 'User already exists';\n\nexport default {\n email,\n maxLength,\n minLength,\n required,\n isAlphanumericUnderscore,\n};\n","/**\n * Form for collecting organization information during sign up\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { Field, reduxForm, SubmissionError } from 'redux-form';\nimport { withStyles } from '@material-ui/styles';\nimport Typography from '@material-ui/core/Typography';\n\nimport WrappedTextField from 'components/WrappedTextField/WrappedTextField';\nimport BusyButton from 'components/BusyButton/BusyButton';\nimport { email, minLength, maxLength, required } from 'services/validationMsgs';\n\nconst minLength10 = minLength(10);\nconst maxLength20 = maxLength(20);\nconst maxLength128 = maxLength(128);\n\n/**\n * Determine if the form has any errors aside from an organization error regarding\n * an existing organization and a form-level error.\n *\n * @param {object} formErrors - Form errors to examine\n * @returns {boolean} - Whether the formErrors contain any errors other than\n * an existing organization error and a form-level error\n */\nconst hasNonOrganizationError = (formErrors) => {\n const errProps = ['organization', '_error'];\n return (\n formErrors &&\n (!formErrors.organization ||\n Object.keys(formErrors).filter((key) => !errProps.includes(key)).length ||\n !formErrors.organization.match(/already assigned to an organization/g))\n );\n};\n\nconst propTypes = {\n classes: PropTypes.shape({\n field: PropTypes.string.isRequired,\n next: PropTypes.string.isRequired,\n error: PropTypes.string.isRequired,\n }).isRequired,\n className: PropTypes.string.isRequired,\n error: PropTypes.string,\n handleOrgCreate: PropTypes.func.isRequired,\n handleOrgCreateSuccess: PropTypes.func.isRequired,\n handleSubmit: PropTypes.func.isRequired,\n pristine: PropTypes.bool.isRequired,\n submitSucceeded: PropTypes.bool.isRequired,\n submitting: PropTypes.bool.isRequired,\n valid: PropTypes.bool.isRequired,\n};\n\nconst defaultProps = {\n error: null,\n};\n\nexport function UnstyledOrgForm({\n classes,\n className,\n error,\n handleOrgCreate,\n handleOrgCreateSuccess,\n handleSubmit,\n pristine,\n submitSucceeded,\n submitting,\n valid,\n}) {\n const handleFormSubmissionReturn = (result) => {\n if (result.error) {\n // If user is already associated with an org, then don't trigger invalidation\n if (hasNonOrganizationError(result.formErrors)) {\n throw new SubmissionError(result.formErrors);\n }\n } else {\n handleOrgCreateSuccess();\n }\n };\n\n const submitHandler = (data) => handleOrgCreate(data).then(handleFormSubmissionReturn);\n\n return (\n <form onSubmit={handleSubmit(submitHandler)} className={className}>\n <Field\n name=\"primaryEmail\"\n component={WrappedTextField}\n label=\"Contact Email\"\n validate={[required, email, maxLength128]}\n className={classes.field}\n fullWidth\n helperText=\"We'll send important notifications for your organization to this address.\"\n />\n <Field\n name=\"companyName\"\n component={WrappedTextField}\n label=\"Organization Name\"\n className={classes.field}\n fullWidth\n validate={[required, maxLength128]}\n />\n <Field\n name=\"phoneNumber\"\n component={WrappedTextField}\n label=\"Phone Number\"\n fullWidth\n className={classes.field}\n validate={[minLength10, maxLength20]}\n />\n {error && !submitting ? (\n <Typography color=\"error\" className={classes.error}>\n {error}\n </Typography>\n ) : null}\n <BusyButton\n size=\"large\"\n type=\"submit\"\n fullWidth\n className={classes.next}\n color=\"primary\"\n variant=\"contained\"\n loading={submitting}\n disabled={!valid || pristine || submitSucceeded}\n >\n Next\n </BusyButton>\n </form>\n );\n}\n\nUnstyledOrgForm.propTypes = propTypes;\nUnstyledOrgForm.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n field: {\n marginTop: theme.spacing(2),\n },\n next: {\n marginTop: theme.spacing(4),\n },\n error: {\n marginTop: theme.spacing(2),\n },\n});\n\nexport default withStyles(styles)(\n reduxForm({\n form: 'orgInfoSignUp',\n enableReinitialize: true,\n })(UnstyledOrgForm),\n);\n","import { connect } from 'react-redux';\n\nimport OrgForm from './OrgForm';\nimport { selectors } from '../../../../dux/user';\n\nconst mapStateToProps = (state) => ({\n initialValues: {\n primaryEmail: selectors.getIdentityState(state).email,\n },\n});\n\nexport default connect(mapStateToProps, null)(OrgForm);\n","/**\n * Stepper progress indicator for sign up flow\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Classnames from 'classnames';\nimport { withStyles } from '@material-ui/styles';\nimport Stepper from '@material-ui/core/Stepper';\nimport Step from '@material-ui/core/Step';\nimport StepLabel from '@material-ui/core/StepLabel';\n\nconst propTypes = {\n classes: PropTypes.shape({\n root: PropTypes.string.isRequired,\n activeStep: PropTypes.string.isRequired,\n }).isRequired,\n className: PropTypes.string,\n activeStepIndex: PropTypes.oneOf([0, 1, 2]),\n};\n\nconst defaultProps = {\n className: null,\n activeStepIndex: 0,\n};\n\nexport function UnstyledSignUpProgress({ classes, className, activeStepIndex }) {\n const iconProps = {\n classes: {\n active: classes.activeStep,\n },\n };\n return (\n <Stepper className={Classnames(className, classes.root)} activeStep={activeStepIndex}>\n <Step>\n <StepLabel StepIconProps={iconProps}>Verify Email</StepLabel>\n </Step>\n <Step>\n <StepLabel StepIconProps={iconProps}>Organization Information</StepLabel>\n </Step>\n </Stepper>\n );\n}\n\nUnstyledSignUpProgress.propTypes = propTypes;\nUnstyledSignUpProgress.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n root: {\n '& $activeStep': {\n color: theme.customColors.orange,\n '& text': {\n fill: theme.customColors.white,\n },\n },\n },\n activeStep: {},\n});\n\nexport default withStyles(styles)(UnstyledSignUpProgress);\n","/**\n * Template for the sign up pages\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport Grid from '@material-ui/core/Grid';\nimport Typography from '@material-ui/core/Typography';\n\nimport SignUpProgress from './SignUpProgress/SignUpProgress';\n\nconst propTypes = {\n classes: PropTypes.shape({\n progress: PropTypes.string.isRequired,\n root: PropTypes.string.isRequired,\n logo: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n }).isRequired,\n header: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,\n subheader: PropTypes.PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n primaryEmail: PropTypes.string.isRequired,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n activeStep: PropTypes.number,\n email: PropTypes.bool.isRequired,\n migrated: PropTypes.bool.isRequired,\n};\n\nconst defaultProps = {\n children: null,\n activeStep: 0,\n subheader: null,\n};\n\nexport function UnstyledSignUpTemplate({\n classes,\n header,\n subheader,\n children,\n activeStep,\n migrated,\n primaryEmail,\n email,\n}) {\n const progress =\n typeof activeStep === 'number' ? (\n <SignUpProgress className={classes.progress} activeStepIndex={activeStep} />\n ) : null;\n const migrationMessage = migrated ? (\n <React.Fragment>\n <Typography variant=\"h4\" color=\"primary\" align=\"center\" className={classes.title}>\n Welcome to Mission Control!\n </Typography>\n <Typography className={classes.migration} variant=\"body2\" align=\"center\">\n You have been successfully migrated to our new platform. Please enter your Organization info\n below. Once you’re in you’ll find your existing MongoDB, Redis or ElasticSearch Instances.\n </Typography>\n </React.Fragment>\n ) : null;\n const emailSection = email ? (\n <Typography variant=\"body2\" color=\"primary\" align=\"center\" className={classes.email}>\n {primaryEmail}\n </Typography>\n ) : null;\n const subheaderSection = subheader ? (\n <Typography variant=\"body2\" align=\"center\">\n {subheader}\n </Typography>\n ) : null;\n return (\n <div className={classes.root}>\n <Grid\n container\n spacing={0}\n justify=\"center\"\n className={classes.content}\n alignContent=\"flex-start\"\n >\n <Grid item lg={4} md={3} sm={2} xs={false} />\n <Grid item lg={4} md={6} sm={8} xs={12}>\n <img\n src=\"../images/logos/or-logo-white-sans.svg\"\n className={classes.logo}\n alt=\"ObjectRocket logo\"\n />\n {progress}\n {migrationMessage}\n <Typography variant=\"h4\" color=\"primary\" align=\"center\" className={classes.title}>\n {header}\n </Typography>\n {emailSection}\n {subheaderSection}\n </Grid>\n <Grid item lg={4} md={3} sm={2} xs={false} />\n <Grid item lg={4} md={6} sm={8} xs={12}>\n {children}\n </Grid>\n </Grid>\n </div>\n );\n}\n\nUnstyledSignUpTemplate.propTypes = propTypes;\nUnstyledSignUpTemplate.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n root: {\n textAlign: 'center',\n\n [theme.breakpoints.down('lg')]: {\n padding: '.5rem',\n },\n },\n logo: {\n paddingTop: '4rem',\n maxWidth: 330,\n width: '100%',\n height: 'auto',\n\n [theme.breakpoints.down('lg')]: {\n padding: '2rem 0',\n },\n },\n progress: {\n paddingTop: '3rem',\n\n [theme.breakpoints.down('lg')]: {\n padding: '0 0',\n },\n },\n migration: {\n fontStyle: 'italic',\n },\n title: {\n paddingTop: '2rem',\n },\n email: {\n lineHeight: '3rem',\n fontSize: theme.typography.h6.fontSize,\n },\n});\n\nexport default withStyles(styles)(UnstyledSignUpTemplate);\n","import { connect } from 'react-redux';\n\nimport SignUpTemplate from './SignUpTemplate';\nimport { selectors } from '../../../dux/user';\n\nconst mapStateToProps = (state) => ({\n primaryEmail: selectors.getIdentityState(state).email,\n});\n\nexport default connect(mapStateToProps, null)(SignUpTemplate);\n","/**\n * Page for collecting organization information during sign up\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\n\nimport OrgFormContainer from './OrgForm/OrgFormContainer';\nimport SignUpTemplateContainer from '../SignUpTemplate/SignUpTemplateContainer';\n\nconst propTypes = {\n classes: PropTypes.shape({\n form: PropTypes.string.isRequired,\n }).isRequired,\n handleOrgCreate: PropTypes.func.isRequired,\n handleUpdateSession: PropTypes.func.isRequired,\n user: PropTypes.shape({\n identity: PropTypes.shape({\n ORv4ID: PropTypes.bool,\n }),\n }).isRequired,\n};\n\nexport function UnstyledOrgInfoPage({ classes, handleOrgCreate, handleUpdateSession, user }) {\n const handleOrgCreateSuccess = () => handleUpdateSession();\n return (\n <SignUpTemplateContainer\n header=\"Organization Information\"\n subheader=\"Once you finish signing up, you'll be able to invite other users to\n your organization.\"\n activeStep={1}\n email={false}\n migrated={!!user.identity.ORv4ID}\n >\n <OrgFormContainer\n handleOrgCreate={handleOrgCreate}\n handleOrgCreateSuccess={handleOrgCreateSuccess}\n className={classes.form}\n />\n </SignUpTemplateContainer>\n );\n}\n\nUnstyledOrgInfoPage.propTypes = propTypes;\n\nconst styles = (theme) => ({\n form: {\n marginTop: theme.spacing(2),\n\n [theme.breakpoints.down('lg')]: {\n padding: 0,\n },\n },\n});\n\nexport default withStyles(styles)(UnstyledOrgInfoPage);\n","import { connect } from 'react-redux';\n\nimport OrgInfoPage from './OrgInfoPage';\nimport { actionCreators as orgActionCreators } from '../../../dux/org';\nimport { actionCreators as userActionCreators, selectors } from '../../../dux/user';\n\nconst mapDispatchToProps = {\n handleUpdateSession: userActionCreators.updateSession,\n handleOrgCreate: orgActionCreators.createOrg,\n};\n\nconst mapStateToProps = (state) => ({\n user: selectors.getUserState(state),\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(OrgInfoPage);\n","/**\n * Form for submitting a request to resend the email verfication email\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { reduxForm, SubmissionError } from 'redux-form';\nimport { withStyles } from '@material-ui/styles';\nimport Typography from '@material-ui/core/Typography';\n\nimport BusyButton from 'components/BusyButton/BusyButton';\n\n/**\n * Appropriate throw an error with the relevant validation errors if necessary\n *\n * @param {result} value - Result of the form submission\n * @throws {error} - Throws SubmissionError if any errors were returned\n */\nconst handleFormSubmissionReturn = (result) => {\n if (result.error) {\n throw new SubmissionError(result.formErrors);\n }\n};\n\nconst propTypes = {\n classes: PropTypes.shape({\n status: PropTypes.string.isRequired,\n button: PropTypes.string.isRequired,\n }).isRequired,\n error: PropTypes.string,\n handleSendEmailVerification: PropTypes.func.isRequired,\n handleSubmit: PropTypes.func.isRequired,\n submitSucceeded: PropTypes.bool.isRequired,\n submitting: PropTypes.bool.isRequired,\n};\n\nconst defaultProps = {\n error: null,\n};\n\nexport function UnstyledVerifyEmailForm({\n classes,\n error,\n handleSendEmailVerification,\n handleSubmit,\n submitSucceeded,\n submitting,\n}) {\n const submitHandler = () => handleSendEmailVerification().then(handleFormSubmissionReturn);\n\n const errorElm = error ? (\n <Typography color=\"error\" className={classes.status}>\n {error}\n </Typography>\n ) : null;\n\n const successElm = submitSucceeded ? (\n <Typography color=\"secondary\" className={classes.status}>\n Verification email resent! Please check your email.\n </Typography>\n ) : null;\n\n return (\n <form onSubmit={handleSubmit(submitHandler)}>\n <BusyButton\n type=\"submit\"\n variant=\"contained\"\n color=\"primary\"\n loading={submitting}\n disabled={submitSucceeded}\n className={classes.button}\n >\n Resend Email\n </BusyButton>\n {errorElm}\n {successElm}\n </form>\n );\n}\n\nUnstyledVerifyEmailForm.defaultProps = defaultProps;\nUnstyledVerifyEmailForm.propTypes = propTypes;\n\nconst styles = () => ({\n button: {\n marginTop: '.5rem',\n },\n status: {\n marginTop: '.5rem',\n },\n});\n\nexport default withStyles(styles)(\n reduxForm({\n form: 'resendEmailVerification',\n })(UnstyledVerifyEmailForm),\n);\n","import { connect } from 'react-redux';\n\nimport VerifyEmailForm from './VerifyEmailForm';\nimport { actionCreators } from '../../../../dux/user';\n\nconst mapDispatchToProps = {\n handleSendEmailVerification: actionCreators.sendEmailVerification,\n};\n\nexport default connect(null, mapDispatchToProps)(VerifyEmailForm);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport Typography from '@material-ui/core/Typography';\n\nimport SignUpTemplateContainer from '../SignUpTemplate/SignUpTemplateContainer';\nimport VerifyEmailFormContainer from './VerifyEmailForm/VerifyEmailFormContainer';\n\nconst propTypes = {\n classes: PropTypes.shape({\n root: PropTypes.string.isRequired,\n emailIcon: PropTypes.string.isRequired,\n support: PropTypes.string.isRequired,\n btn: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nexport function UnstyledVerifyEmailPage({ classes }) {\n return (\n <SignUpTemplateContainer\n header=\"Verify Your Email Address\"\n email\n subheader=\"We've sent you an email with a link to verify your email address. Please check your email inbox and follow the provided link to continue.\"\n >\n <div className={classes.root}>\n <div>\n <div className={classes.options}>\n <Typography variant=\"h6\" align=\"center\">\n Don't see the email?\n <br />\n Already checked your spam folder?\n </Typography>\n <VerifyEmailFormContainer />\n </div>\n <div className={classes.support}>\n <Typography variant=\"h6\" align=\"center\">\n Still having problems?\n </Typography>\n <Typography align=\"center\">\n Reach out to our \n <a href=\"mailto:support@objectrocket.cloud\">support team</a>.\n </Typography>\n </div>\n </div>\n </div>\n </SignUpTemplateContainer>\n );\n}\n\nconst styles = (theme) => ({\n root: {\n '& a': {\n color: theme.customColors.white,\n },\n },\n options: {\n marginTop: '2rem',\n },\n support: {\n marginTop: '2.5rem',\n },\n btn: {\n marginTop: '.5rem',\n },\n emailIcon: {\n color: theme.customColors.white,\n fontSize: '7rem',\n marginTop: '1rem',\n },\n});\n\nUnstyledVerifyEmailPage.propTypes = propTypes;\n\nexport default withStyles(styles)(UnstyledVerifyEmailPage);\n","/**\n * Component to redirect users to the sign up flow\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { Redirect } from 'react-router-dom';\n\nconst propTypes = {\n location: PropTypes.shape({\n pathname: PropTypes.string,\n }).isRequired,\n};\n\nfunction OrgRedirect({ location }) {\n return (\n <Redirect\n to={{\n pathname: '/sign-up/org',\n state: { from: location.pathname },\n }}\n />\n );\n}\n\nOrgRedirect.propTypes = propTypes;\n\nexport default OrgRedirect;\n","/**\n * Component to redirect users to the email verification page\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { Redirect } from 'react-router-dom';\n\nconst propTypes = {\n location: PropTypes.shape({\n pathname: PropTypes.string,\n }).isRequired,\n};\n\nfunction VerifyEmailRedirect({ location }) {\n return (\n <Redirect\n to={{\n pathname: '/sign-up/verify-email',\n state: { from: location.pathname },\n }}\n />\n );\n}\n\nVerifyEmailRedirect.propTypes = propTypes;\n\nexport default VerifyEmailRedirect;\n","import { connect } from 'react-redux';\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nimport { selectors } from 'dux/user';\n\nimport ErrorPage from './ErrorPage';\n\nconst propTypes = {\n match: PropTypes.shape({}).isRequired,\n error: PropTypes.shape({}).isRequired,\n};\n\nconst mapStateToProps = (state) => ({\n error: selectors.getSessionState(state).error,\n});\n\nconst ErrorPageContainer = (props) => {\n const {\n match: {\n params: { statusCode },\n },\n error,\n } = props;\n return <ErrorPage errorStatusCode={statusCode} error={error} />;\n};\n\nErrorPageContainer.propTypes = propTypes;\n\nexport default connect(mapStateToProps, null)(ErrorPageContainer);\n","/**\n * Component to redirect users to the login page\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { Redirect } from 'react-router-dom';\n\nconst propTypes = {\n location: PropTypes.shape({\n pathname: PropTypes.string,\n }).isRequired,\n};\n\nfunction LoginRedirect({ location }) {\n return (\n <Redirect\n to={{\n pathname: '/login',\n state: { from: location.pathname },\n }}\n />\n );\n}\n\nLoginRedirect.propTypes = propTypes;\n\nexport default LoginRedirect;\n","/**\n * Component for validating that a user is authenticated and has the desired roles\n * and/or permissions for the organization before permitting a user to visit a route\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { Route } from 'react-router-dom';\n\nimport ErrorPageContainer from '../ErrorPage/ErrorPageContainer';\nimport LoginRedirect from '../LoginPage/LoginRedirect/LoginRedirect';\n\nconst propTypes = {\n userPerms: PropTypes.arrayOf(PropTypes.string),\n userRoles: PropTypes.arrayOf(PropTypes.string),\n perms: PropTypes.arrayOf(PropTypes.string),\n roles: PropTypes.arrayOf(PropTypes.string),\n isAuthenticated: PropTypes.func.isRequired,\n render: PropTypes.func,\n};\n\nconst defaultProps = {\n userPerms: null,\n userRoles: null,\n perms: null,\n roles: null,\n render: null,\n};\n\nfunction AuthorizedRoute({ userPerms, userRoles, perms, roles, isAuthenticated, render, ...rest }) {\n let props = rest;\n if (!isAuthenticated()) {\n props = { ...props, component: LoginRedirect };\n return <Route {...props} />;\n }\n const hasPerm = !perms || (userPerms && perms.some((val) => userPerms.includes(val)));\n const hasRole = !roles || (userRoles && roles.some((val) => userRoles.includes(val)));\n if (!hasPerm || !hasRole) {\n props = { ...props, component: ErrorPageContainer };\n return <Route {...props} />;\n }\n return <Route render={render} {...rest} />;\n}\n\nAuthorizedRoute.propTypes = propTypes;\nAuthorizedRoute.defaultProps = defaultProps;\n\nexport default AuthorizedRoute;\n","import { connect } from 'react-redux';\n\nimport AuthorizedRoute from './AuthorizedRoute';\nimport { selectors } from '../../dux/user';\n\nconst mapStateToProps = (state) => ({\n userPerms: selectors.getIdentityState(state).permissions,\n userRoles: selectors.getIdentityState(state).roles,\n isAuthenticated: selectors.isAuthenticated(state),\n organizationId: selectors.getIdentityState(state).organizationId,\n});\n\nexport default connect(mapStateToProps, {})(AuthorizedRoute);\n","/**\n * Placeholder page for a 401\n */\nimport React from 'react';\n\nfunction UnauthorizedPage() {\n return <h1>Sorry! You don't have permissions to view this page.</h1>;\n}\n\nexport default UnauthorizedPage;\n","/**\n * Component that allows access to the route if a specific condition is met\n * or displays the UnauthorizedPage (or another specified component) otherwise.\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { Route } from 'react-router-dom';\n\nimport UnauthorizedPage from '../../../UnauthorizedPage/UnauthorizedPage';\n\nconst propTypes = {\n conditionFn: PropTypes.func.isRequired,\n render: PropTypes.func,\n fallbackComponent: PropTypes.func,\n};\n\nconst defaultProps = {\n render: null,\n fallbackComponent: UnauthorizedPage,\n};\n\nfunction ConditionalRoute({ conditionFn, render, fallbackComponent, ...rest }) {\n let props = rest;\n if (!conditionFn()) {\n props = { ...props, component: fallbackComponent };\n return <Route {...props} />;\n }\n return <Route render={render} {...props} />;\n}\n\nConditionalRoute.propTypes = propTypes;\nConditionalRoute.defaultProps = defaultProps;\n\nexport default ConditionalRoute;\n","/**\n * Component that contains all routes that are part of the sign up flow\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { Switch } from 'react-router-dom';\n\nimport InstancesPageRedirect from '../../MissionCtrl/InstancesPageRedirect/InstancesPageRedirect';\nimport OrgInfoPageContainer from '../OrgInfoPage/OrgInfoPageContainer';\nimport VerifyEmailPage from '../VerifyEmailPage/VerifyEmailPage';\nimport OrgRedirect from '../OrgInfoPage/OrgRedirect/OrgRedirect';\nimport VerifyEmailRedirect from '../VerifyEmailPage/VerifyEmailRedirect/VerifyEmailRedirect';\nimport AuthorizedRouteContainer from '../../AuthorizedRoute/AuthorizedRouteContainer';\nimport ConditionalRoute from './ConditionalRoute/ConditionalRoute';\n\n/**\n * Determine which page should be redirected to based on the user's sign up\n * progress.\n *\n * @param {object} user - The user data to examine\n * @returns {object} - Element representing a <Redirect /> to the proper step\n * in the sign up flow.\n */\nconst getRedirect = ({ needsEmailVerification, needsOrg, isAuthenticated }) => {\n if (!isAuthenticated()) {\n return InstancesPageRedirect;\n }\n if (needsEmailVerification) {\n return VerifyEmailRedirect;\n }\n if (needsOrg) {\n return OrgRedirect;\n }\n return InstancesPageRedirect;\n};\n\nconst propTypes = {\n className: PropTypes.string,\n needsEmailVerification: PropTypes.bool.isRequired,\n needsOrg: PropTypes.bool.isRequired,\n isAuthenticated: PropTypes.func.isRequired,\n};\n\nconst defaultProps = {\n className: null,\n};\n\nfunction SignUpRoutes({ className, needsEmailVerification, needsOrg, isAuthenticated }) {\n /**\n * If any of the sign up steps are outstanding, ensure all other routes redirect to\n * the sign up flow.\n */\n const redirect = getRedirect({\n needsEmailVerification,\n needsOrg,\n isAuthenticated,\n });\n\n return (\n <Switch className={className}>\n <ConditionalRoute\n exact\n conditionFn={() => needsEmailVerification}\n path=\"/sign-up/verify-email\"\n component={VerifyEmailPage}\n fallbackComponent={redirect}\n />\n <ConditionalRoute\n exact\n conditionFn={() => !needsEmailVerification && needsOrg}\n path=\"/sign-up/org\"\n component={OrgInfoPageContainer}\n fallbackComponent={redirect}\n />\n <AuthorizedRouteContainer exact path=\"/sign-up\" component={redirect} />\n </Switch>\n );\n}\n\nSignUpRoutes.propTypes = propTypes;\nSignUpRoutes.defaultProps = defaultProps;\n\nexport default SignUpRoutes;\n","/**\n * Page that, when visited, initiates log in\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Paper from '@material-ui/core/Paper';\nimport { withStyles } from '@material-ui/styles';\nimport classnames from 'classnames';\nimport { Button } from '@material-ui/core';\n\nconst propTypes = {\n className: PropTypes.shape({}),\n activeMessage: PropTypes.shape({\n message: PropTypes.string,\n options: PropTypes.shape({}),\n title: PropTypes.string,\n }),\n classes: PropTypes.shape({}).isRequired,\n removeBanner: PropTypes.func.isRequired,\n activateBanner: PropTypes.func.isRequired,\n enqueueBanner: PropTypes.func.isRequired,\n setFreeCreditAware: PropTypes.func.isRequired,\n bannerNotifications: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n org: PropTypes.shape({}),\n freeCreditAware: PropTypes.bool.isRequired,\n user: PropTypes.shape({\n impersonatedOrganizationId: PropTypes.string,\n }).isRequired,\n stopOrgImpersonation: PropTypes.func.isRequired,\n getOrg: PropTypes.func.isRequired,\n voidPosition: PropTypes.bool,\n};\n\nconst defaultProps = {\n activeMessage: null,\n className: null,\n org: null,\n voidPosition: false,\n};\n\nfunction BuildBillingBanner(org, removeBanner) {\n if (org.billingType !== 1 || !org.trialCreditCents || org.trialCreditCents === 0) {\n return null;\n }\n const creditValue = parseInt(org.trialCreditCents, 10) / 100;\n const temp = {\n type: 'freeCredit',\n title: 'Congratulations! ', // space is required at the end\n message: `You have $${creditValue} in credit available to use towards your account. `,\n options: {\n DISMISS: removeBanner,\n },\n };\n return temp;\n}\n\nfunction BuildImpersonationBanner(org) {\n const temp = {\n type: 'impersonation',\n title: '',\n message: 'You are in impersonation Mode for ',\n companyName: org ? org.companyName || 'N/A' : 'N/A',\n options: {},\n };\n return temp;\n}\n\nexport function UnstyledBanner({\n classes,\n bannerNotifications,\n activeMessage,\n activateBanner,\n enqueueBanner,\n removeBanner,\n freeCreditAware,\n setFreeCreditAware,\n org,\n user,\n stopOrgImpersonation,\n getOrg,\n voidPosition,\n}) {\n const handleStopClick = () => {\n stopOrgImpersonation();\n getOrg();\n };\n\n function GenOptions(color) {\n const toRet = [];\n const optionsIndex = Object.keys(activeMessage.options);\n optionsIndex.forEach((key) => {\n toRet.push(\n <Button\n key={key}\n name=\"option\"\n className={color}\n onClick={(event) => {\n event.preventDefault();\n activeMessage.options[key](event);\n }}\n >\n {key}\n </Button>,\n );\n });\n return toRet;\n }\n\n if (!freeCreditAware && org) {\n const msg = BuildBillingBanner(org, removeBanner);\n if (msg) {\n setFreeCreditAware();\n enqueueBanner(msg); // This could be anywhere in your app.\n }\n }\n\n if (bannerNotifications.length > 0 && activeMessage === null) {\n activateBanner();\n }\n\n let bannerClass = classnames(classes.bannerFreeCredit);\n let msg = null;\n\n if (user.impersonatedOrganizationId) {\n msg = BuildImpersonationBanner(org);\n bannerClass = classnames(classes.bannerFreeCredit, classes.bannerFreeCreditPlusImper);\n }\n\n let position = {};\n if (voidPosition) {\n position = { position: 'unset' };\n }\n\n return (\n <React.Fragment>\n {msg && (\n <Paper className={classes.bannerImpersonation} style={position}>\n <i className={classnames('material-icons', classes.user)}>face</i>\n <div className={classes.blockImpersonation}>\n <div className={classes.messageImpersonation}>\n {msg.message}\n <div className={classes.companyName}>{msg.companyName}</div>\n </div>\n </div>\n <i\n name=\"stop\"\n role=\"button\"\n tabIndex=\"0\"\n className={classnames('material-icons', classes.rightIcon)}\n onClick={handleStopClick}\n onKeyDown={() => handleStopClick()}\n >\n cancel\n </i>\n </Paper>\n )}\n\n {activeMessage && (\n <Paper className={bannerClass}>\n <i className={classnames('material-icons', classes.cake)}>cake</i>\n <div className={classes.blockFreeCredit}>\n <div className={classes.title}>{activeMessage.title}</div>\n <div className={classes.messageFreeCredit}>\n <div className={classnames(classes.title, classes.titlesm)}>\n {activeMessage.title}\n </div>\n {activeMessage.message}\n {GenOptions(classes.option)}\n </div>\n </div>\n </Paper>\n )}\n </React.Fragment>\n );\n}\n\nUnstyledBanner.propTypes = propTypes;\nUnstyledBanner.defaultProps = defaultProps;\n\nconst freeCreditBannerHeight = 45;\nconst impersonationBannerHeight = 45;\nconst styles = (theme) => ({\n bannerFreeCredit: {\n display: 'flex',\n position: 'absolute',\n alignItems: 'center',\n justifyContent: 'flex-start',\n top: '0px',\n height: freeCreditBannerHeight,\n width: '100%',\n backgroundColor: theme.customColors.teal,\n color: theme.customColors.white,\n zIndex: theme.zIndex.drawer + 2, // Stay above drawer!\n borderRadius: '0px',\n [theme.breakpoints.down('sm')]: {\n position: 'fixed', // Avoid scrolling when in a cellphone size(like the header)\n },\n },\n bannerFreeCreditPlusImper: {\n top: impersonationBannerHeight,\n },\n bannerImpersonation: {\n display: 'flex',\n position: 'absolute',\n alignItems: 'center',\n justifyContent: 'flex-start',\n top: '0px',\n height: impersonationBannerHeight,\n width: '100%',\n backgroundColor: theme.customColors.orange,\n color: theme.customColors.white,\n zIndex: theme.zIndex.drawer + 2,\n borderRadius: '0px',\n [theme.breakpoints.down('sm')]: {\n position: 'fixed', // Avoid scrolling when in a cellphone size(like the header)\n },\n },\n cake: {\n fontSize: 30,\n marginLeft: 8,\n marginRight: 7,\n },\n user: {\n fontSize: 30,\n marginLeft: 8,\n marginRight: 7,\n },\n blockFreeCredit: {\n display: 'flex',\n flexWrap: 'wrap',\n alignContent: 'center',\n flexDirection: 'column',\n justifyContent: 'flex-start',\n },\n blockImpersonation: {\n display: 'flex',\n flexWrap: 'wrap',\n alignContent: 'center',\n flexDirection: 'row',\n justifyContent: 'flex-start',\n },\n title: {\n fontFamily: ['\"Roboto\"', 'sans-serif'].join(','),\n fontSize: 12,\n fontWeight: 900,\n lineHeight: '0.8em',\n marginTop: 8,\n flexWrap: 'wrap',\n [theme.breakpoints.down('sm')]: {\n display: 'None',\n },\n },\n rightIcon: {\n fontSize: 24,\n color: theme.customColors.white,\n marginLeft: 'auto',\n paddingRight: '5px',\n cursor: 'pointer',\n },\n titlesm: {\n [theme.breakpoints.down('sm')]: {\n display: 'contents',\n },\n [theme.breakpoints.up('md')]: {\n display: 'None',\n },\n },\n messageImpersonation: {\n display: 'flex',\n alignContent: 'space-between',\n flexWrap: 'wrap',\n overflowWrap: 'break-word',\n fontFamily: ['\"Roboto\"', 'sans-serif'].join(','),\n fontSize: 12,\n fontWeight: 400,\n lineHeight: '13px',\n },\n messageFreeCredit: {\n display: 'flex',\n alignContent: 'space-between',\n flexWrap: 'wrap',\n overflowWrap: 'break-word',\n fontFamily: ['\"Roboto\"', 'sans-serif'].join(','),\n fontSize: 12,\n fontWeight: 400,\n [theme.breakpoints.down('sm')]: {\n lineHeight: '13px',\n },\n },\n companyName: {\n fontFamily: ['\"Roboto\"', 'sans-serif'].join(','),\n fontSize: 12,\n fontWeight: 900,\n marginLeft: 4,\n display: 'contents',\n [theme.breakpoints.down('sm')]: {\n lineHeight: '13px',\n },\n },\n option: {\n fontFamily: ['\"Roboto\"', 'sans-serif'].join(','),\n fontSize: 12,\n fontWeight: 900,\n zIndex: theme.zIndex.drawer + 3,\n paddingLeft: 5,\n paddingRight: 0,\n paddingTop: 0,\n paddingBottom: 0,\n minWidth: '0px',\n color: 'white',\n textDecoration: 'underline',\n cursor: 'pointer',\n display: 'contents',\n lineHeight: '13px',\n },\n});\n\nexport default withStyles(styles)(UnstyledBanner);\n","/**\n * Returns the complete banner notification state\n *\n * @param {object} state - Current state\n * @returns {object} - The entire banner notification state\n */\nfunction getBannerNotificationsState(state) {\n const toRet = {\n bannerNotifications: state.notifications.bannerNotifications,\n activeMessage: state.notifications.activeMessage,\n freeCreditAware: state.notifications.freeCreditAware,\n };\n return toRet;\n}\n\nexport default getBannerNotificationsState;\n","import { connect } from 'react-redux';\nimport { actionCreators } from '../../dux/notifications';\nimport Banner from './Banner';\nimport getBannerNotificationsState from '../../dux/notifications/selectors';\nimport { getOrgState } from '../../dux/org/selectors';\nimport { actionCreators as userActionCreators, selectors } from '../../dux/user';\nimport { actionCreators as orgActionCreators } from '../../dux/org';\n\nconst mapStateToProps = (state) => ({\n ...getBannerNotificationsState(state),\n org: { ...getOrgState(state) },\n user: selectors.getIdentityState(state),\n});\n\nconst mapDispatchToProps = {\n activateBanner: actionCreators.activateBanner,\n removeBanner: actionCreators.removeBanner,\n enqueueBanner: actionCreators.enqueueBanner,\n setFreeCreditAware: actionCreators.setFreeCreditAware,\n stopOrgImpersonation: userActionCreators.stopOrgImpersonation,\n getOrg: orgActionCreators.getOrg,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Banner);\n","/**\n * Main wrapper for all sign up pages\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\n\nimport SignUpFooter from './SignUpFooter/SignUpFooter';\nimport SignUpRoutes from './SignUpRoutes/SignUpRoutes';\nimport Banner from '../Banner/BannerContainer';\n\nconst propTypes = {\n needsEmailVerification: PropTypes.bool.isRequired,\n needsOrg: PropTypes.bool.isRequired,\n classes: PropTypes.shape({\n root: PropTypes.string.isRequired,\n content: PropTypes.string.isRequired,\n footer: PropTypes.string.isRequired,\n }).isRequired,\n isAuthenticated: PropTypes.func.isRequired,\n location: PropTypes.shape({\n pathname: PropTypes.string,\n }).isRequired,\n};\n\nexport function UnstyledSignUp({\n classes,\n needsEmailVerification,\n needsOrg,\n isAuthenticated,\n location,\n}) {\n const isAWS = location.pathname.includes('aws_onboarding');\n\n if (isAWS) {\n return (\n <div className={classes.root}>\n <Banner voidPosition />\n <div className={classes.content}>\n <SignUpRoutes\n needsEmailVerification={needsEmailVerification}\n needsOrg={needsOrg}\n isAuthenticated={isAuthenticated}\n />\n </div>\n <SignUpFooter className={classes.footer} />\n </div>\n );\n }\n\n return (\n <div className={classes.root}>\n <Banner voidPosition />\n <div className={classes.content}>\n <SignUpRoutes\n needsEmailVerification={needsEmailVerification}\n needsOrg={needsOrg}\n isAuthenticated={isAuthenticated}\n />\n </div>\n <SignUpFooter className={classes.footer} />\n </div>\n );\n}\n\nUnstyledSignUp.propTypes = propTypes;\n\nconst styles = (theme) => ({\n root: {\n textAlign: 'center',\n minHeight: '100%',\n display: 'flex',\n flexDirection: 'column',\n },\n content: {\n flexGrow: 1,\n },\n footer: {\n flexShrink: 0,\n marginTop: theme.spacing(4),\n },\n banner: {\n position: 'unset',\n },\n});\n\nexport default withStyles(styles)(UnstyledSignUp);\n","import { connect } from 'react-redux';\n\nimport SignUp from './SignUp';\nimport { selectors as userSelectors } from '../../dux/user';\n\nconst mapStateToProps = (state) => ({\n user: userSelectors.getIdentityState(state),\n isAuthenticated: userSelectors.isAuthenticated(state),\n needsEmailVerification: userSelectors.needsEmailVerification(state),\n needsOrg: userSelectors.needsOrganization(state),\n});\n\nexport default connect(mapStateToProps, null)(SignUp);\n","import PropTypes from 'prop-types';\nimport roleDisabled from 'services/roleDisabled/index';\n\nconst propTypes = {\n userPerms: PropTypes.arrayOf(PropTypes.string),\n userRoles: PropTypes.arrayOf(PropTypes.string),\n perms: PropTypes.arrayOf(PropTypes.string),\n roles: PropTypes.arrayOf(PropTypes.string),\n disabled: PropTypes.bool,\n};\n\nconst defaultProps = {\n userPerms: null,\n userRoles: null,\n perms: null,\n roles: null,\n disabled: false,\n};\n\nexport function RBACWrapper({ userPerms, userRoles, perms, roles, ...rest }) {\n const { children } = rest;\n const hasPerm = !perms || !roleDisabled(userPerms, perms);\n const hasRole = !roles || !roleDisabled(userRoles, roles);\n return hasPerm && hasRole && children;\n}\n\nRBACWrapper.propTypes = propTypes;\nRBACWrapper.defaultProps = defaultProps;\n\nexport default RBACWrapper;\n","import { connect } from 'react-redux';\n\nimport { RBACWrapper } from './RBACWrapper';\nimport { selectors } from '../../dux/user';\n\nconst mapStateToProps = (state) => ({\n userPerms: selectors.getIdentityState(state).permissions,\n userRoles: selectors.getIdentityState(state).roles,\n});\n\nexport default connect(mapStateToProps, null)(RBACWrapper);\n","import { TRACK_BUTTON_CLICK } from '../actions';\n\nexport const trackButtonClickSet = (buttonName, data) => ({\n type: TRACK_BUTTON_CLICK,\n meta: data || {\n analytics: true,\n trackClick: true,\n buttonName,\n },\n});\n\n/* eslint-disable import/prefer-default-export */\nexport const trackButtonClick = (buttonName, data) => (dispatch) =>\n dispatch(trackButtonClickSet(buttonName, data));\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n buttonName: PropTypes.string.isRequired,\n component: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n trackButtonClick: PropTypes.func.isRequired,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,\n};\n\nconst defaultProps = {\n component: 'span',\n};\n\nexport function UnstyledSegmentClickTracker({\n buttonName,\n trackButtonClick,\n children,\n component,\n classes,\n ...other\n}) {\n const Component = component;\n\n return (\n <Component\n className={classes.tracker}\n onKeyDown={() => trackButtonClick(buttonName)}\n onClick={() => trackButtonClick(buttonName)}\n {...other}\n >\n {children}\n </Component>\n );\n}\n\nUnstyledSegmentClickTracker.propTypes = propTypes;\nUnstyledSegmentClickTracker.defaultProps = defaultProps;\n\nconst styles = () => ({\n tracker: {\n '&:focus': {\n outline: 'none',\n },\n },\n});\n\nexport default withStyles(styles)(UnstyledSegmentClickTracker);\n","import { connect } from 'react-redux';\nimport { actionCreators } from 'dux/clickTracker';\n// eslint-disable-next-line import/no-named-as-default\nimport SegmentClickTracker from './SegmentClickTracker';\n\nconst mapDispatchToProps = {\n trackButtonClick: actionCreators.trackButtonClick,\n};\n\nexport default connect(null, mapDispatchToProps)(SegmentClickTracker);\n","/**\n * Component that shows or hides a child component depending on whether the desired\n * flag exists\n */\nimport PropTypes from 'prop-types';\n\nconst propTypes = {\n flags: PropTypes.object, // eslint-disable-line react/forbid-prop-types\n flagKey: PropTypes.string.isRequired,\n render: PropTypes.func,\n negate: PropTypes.bool,\n};\n\nfunction FlagEnabled({ flags, flagKey, children, render, negate }) {\n let val = flags ? flags[flagKey] : false;\n val = val && Object.prototype.hasOwnProperty.call(val, 'current') ? val.current : val;\n if (negate) {\n val = !val;\n }\n if (val) {\n return render ? render() : children;\n }\n return null;\n}\n\nFlagEnabled.propTypes = propTypes;\nFlagEnabled.defaultProps = { negate: false };\n\nexport default FlagEnabled;\n","import { connect } from 'react-redux';\n\nimport FlagEnabled from './FlagEnabled';\nimport { selectors } from '../../dux/user';\n\nconst mapStateToProps = (state) => ({\n flags: selectors.getFeatureFlagsState(state, false).flags,\n});\n\nexport default connect(mapStateToProps, {})(FlagEnabled);\n","/**\n * Component containing all of the individual nav links for logged-in users\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { NavLink } from 'react-router-dom';\nimport classnames from 'classnames';\nimport { withStyles } from '@material-ui/styles';\nimport Badge from '@material-ui/core/Badge';\nimport List from '@material-ui/core/List';\nimport ListItem from '@material-ui/core/ListItem';\nimport ListItemIcon from '@material-ui/core/ListItemIcon';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport AddCircle from '@material-ui/icons/AddCircle';\nimport ExitToApp from '@material-ui/icons/ExitToApp';\nimport Dashboard from '@material-ui/icons/Dashboard';\nimport Assignment from '@material-ui/icons/Assignment';\nimport Group from '@material-ui/icons/Group';\nimport GroupWork from '@material-ui/icons/GroupWork';\nimport MailOutline from '@material-ui/icons/MailOutline';\nimport Help from '@material-ui/icons/Help';\nimport AccountCircle from '@material-ui/icons/AccountCircle';\nimport OpenInNew from '@material-ui/icons/OpenInNew';\nimport Description from '@material-ui/icons/Description';\nimport TransitEnterexit from '@material-ui/icons/TransitEnterexit';\nimport Warning from '@material-ui/icons/Warning';\n\nimport RBACWrapper from 'components/RBACWrapper/RBACWrapperContainer';\nimport SegmentClickTracker from 'components/SegmentClickTracker/SegmentClickTrackerContainer';\nimport FlagEnabledContainer from 'components/FlagEnabled/FlagEnabledContainer';\nimport {\n OWNER,\n ADMIN,\n METRICS,\n READONLY,\n OR_ADMIN,\n OR_READONLY,\n OR_SUPERUSER,\n OR_SUPERREAD,\n BILLING,\n} from 'constants/roles';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n className: PropTypes.string,\n isAuthenticated: PropTypes.func.isRequired,\n isAdmin: PropTypes.bool.isRequired,\n handleNavToggle: PropTypes.func.isRequired,\n location: PropTypes.shape({\n pathname: PropTypes.string.isRequired,\n }).isRequired,\n createString: PropTypes.string.isRequired,\n};\n\nconst defaultProps = {\n className: '',\n};\n\nexport function UnstyledNavItems({\n classes,\n className,\n isAuthenticated,\n isAdmin,\n handleNavToggle,\n location,\n createString,\n}) {\n return (\n <List\n role=\"navigation\"\n className={classnames(className, classes.root)}\n onClick={() => handleNavToggle(false)}\n >\n <FlagEnabledContainer flagKey=\"or-internal\">\n <SegmentClickTracker buttonName=\"Dashboard (Nav Bar)\">\n <ListItem\n component={NavLink}\n classes={{\n root: classes.link,\n divider: classes.divider,\n selected: classes.selectedLink,\n }}\n to=\"/mission-ctrl/dashboard\"\n button\n divider\n selected={location.pathname === '/mission-ctrl/dashboard'}\n >\n <ListItemIcon className={classes.icon}>\n <Dashboard />\n </ListItemIcon>\n <ListItemText primaryTypographyProps={{ className: classes.itemTextTypography }}>\n Dashboard\n </ListItemText>\n </ListItem>\n </SegmentClickTracker>\n </FlagEnabledContainer>\n <RBACWrapper\n roles={[OWNER, ADMIN, READONLY, BILLING, OR_ADMIN, OR_READONLY, OR_SUPERUSER, OR_SUPERREAD]}\n >\n <SegmentClickTracker buttonName=\"Instances (Nav Bar)\">\n <ListItem\n component={NavLink}\n classes={{\n root: classes.link,\n divider: classes.divider,\n selected: classes.selectedLink,\n }}\n to=\"/mission-ctrl/instances\"\n exact\n button\n divider\n selected={location.pathname === '/mission-ctrl/instances'}\n >\n <ListItemIcon className={classes.icon}>\n <GroupWork />\n </ListItemIcon>\n <ListItemText primaryTypographyProps={{ className: classes.itemTextTypography }}>\n Instances\n </ListItemText>\n </ListItem>\n </SegmentClickTracker>\n </RBACWrapper>\n <SegmentClickTracker buttonName=\"Create Instance (Nav Bar)\">\n <ListItem\n component={NavLink}\n classes={{\n root: classes.link,\n divider: classes.divider,\n selected: classes.selectedLink,\n }}\n to={createString}\n button\n divider\n selected={location.pathname === createString}\n >\n <ListItemIcon className={classnames(classes.icon, classes.orange)}>\n <AddCircle />\n </ListItemIcon>\n <ListItemText primaryTypographyProps={{ className: classes.itemTextTypography }}>\n Create Instance\n </ListItemText>\n </ListItem>\n </SegmentClickTracker>\n <RBACWrapper\n roles={[OWNER, ADMIN, METRICS, READONLY, OR_ADMIN, OR_READONLY, OR_SUPERUSER, OR_SUPERREAD]}\n >\n <SegmentClickTracker buttonName=\"Grafana Metrics (Nav Bar)\">\n <ListItem\n component=\"a\"\n classes={{\n root: classes.link,\n divider: classes.divider,\n selected: classes.selectedLink,\n }}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n href={process.env.REACT_APP_GRAFANA_DASHBOARD_URL}\n button\n divider\n >\n <ListItemIcon className={classnames(classes.icon)}>\n <img alt=\"grafana icon\" height=\"24px\" width=\"24px\" src=\"/images/logos/grafana.svg\" />\n </ListItemIcon>\n <ListItemText primaryTypographyProps={{ className: classes.itemTextTypography }}>\n Grafana Metrics\n </ListItemText>\n </ListItem>\n </SegmentClickTracker>\n </RBACWrapper>\n <FlagEnabledContainer flagKey=\"or-internal\">\n <SegmentClickTracker buttonName=\"Pricing (Nav Bar)\">\n <ListItem\n component={NavLink}\n classes={{\n root: classes.link,\n divider: classes.divider,\n selected: classes.selectedLink,\n }}\n to=\"/mission-ctrl/plans\"\n button\n divider\n selected={location.pathname === '/mission-ctrl/plans'}\n >\n <ListItemIcon className={classes.icon}>\n <Assignment />\n </ListItemIcon>\n <ListItemText primaryTypographyProps={{ className: classes.itemTextTypography }}>\n Pricing\n </ListItemText>\n </ListItem>\n </SegmentClickTracker>\n <SegmentClickTracker buttonName=\"Messages (Nav Bar)\">\n <ListItem\n component={NavLink}\n classes={{\n root: classes.link,\n divider: classes.divider,\n selected: classes.selectedLink,\n }}\n to=\"/mission-ctrl/messages\"\n button\n divider\n selected={location.pathname === '/mission-ctrl/messages'}\n >\n <ListItemIcon className={classes.icon}>\n <Badge classes={{ badge: classes.badge }} badgeContent=\"3\" color=\"secondary\">\n <MailOutline className={classes.icon} />\n </Badge>\n </ListItemIcon>\n <ListItemText primaryTypographyProps={{ className: classes.itemTextTypography }}>\n Messages\n </ListItemText>\n </ListItem>\n </SegmentClickTracker>\n </FlagEnabledContainer>\n <RBACWrapper roles={[OWNER, OR_ADMIN, OR_SUPERUSER]}>\n <SegmentClickTracker buttonName=\"Users (Nav Bar)\">\n <ListItem\n component={NavLink}\n classes={{\n root: classes.link,\n divider: classes.divider,\n selected: classes.selectedLink,\n }}\n to=\"/mission-ctrl/users\"\n button\n divider\n selected={location.pathname === '/mission-ctrl/users'}\n >\n <ListItemIcon className={classes.icon}>\n <Group />\n </ListItemIcon>\n <ListItemText primaryTypographyProps={{ className: classes.itemTextTypography }}>\n Users\n </ListItemText>\n </ListItem>\n </SegmentClickTracker>\n </RBACWrapper>\n <SegmentClickTracker buttonName=\"Profile Management (Nav Bar)\">\n <ListItem\n component={NavLink}\n className={classes.profile}\n classes={{\n root: classes.link,\n divider: classes.divider,\n selected: classes.selectedLink,\n }}\n to=\"/mission-ctrl/profile\"\n button\n divider\n selected={location.pathname === '/mission-ctrl/profile'}\n >\n <ListItemIcon className={classes.icon}>\n <AccountCircle />\n </ListItemIcon>\n <ListItemText primaryTypographyProps={{ className: classes.itemTextTypography }}>\n Profile Management\n </ListItemText>\n </ListItem>\n </SegmentClickTracker>\n <SegmentClickTracker buttonName=\"ORv4 SSO (Nav Bar)\">\n <ListItem\n component=\"a\"\n href={process.env.REACT_APP_ORV4_SSO_LOGIN}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={classes.profile}\n classes={{\n root: classes.link,\n divider: classes.divider,\n selected: classes.selectedLink,\n }}\n button\n divider\n >\n <ListItemIcon className={classes.icon}>\n <OpenInNew />\n </ListItemIcon>\n <ListItemText primaryTypographyProps={{ className: classes.itemTextTypography }}>\n <span className={classes.orv4link}>app.objectrocket.com</span>\n </ListItemText>\n </ListItem>\n </SegmentClickTracker>\n {isAdmin && (\n <SegmentClickTracker buttonName=\"Impersonate(Nav Bar)\">\n <ListItem\n className={classes.profile}\n component={NavLink}\n to=\"/mission-ctrl/org-impersonation\"\n classes={{\n root: classes.link,\n divider: classes.divider,\n selected: classes.selectedLink,\n }}\n button\n divider\n selected={location.pathname === '/mission-ctrl/org-impersonation'}\n >\n <ListItemIcon className={classes.icon}>\n <Warning />\n </ListItemIcon>\n <ListItemText primaryTypographyProps={{ className: classes.itemTextTypography }}>\n Impersonate an Org\n </ListItemText>\n </ListItem>\n </SegmentClickTracker>\n )}\n <SegmentClickTracker buttonName=\"Documentation (Nav Bar)\">\n <ListItem\n component=\"a\"\n classes={{\n root: classes.link,\n divider: classes.divider,\n selected: classes.selectedLink,\n }}\n href=\"https://docs.objectrocket.com\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n button\n divider\n >\n <ListItemIcon className={classes.icon}>\n <Description />\n </ListItemIcon>\n <ListItemText primaryTypographyProps={{ className: classes.itemTextTypography }}>\n Documentation\n </ListItemText>\n </ListItem>\n </SegmentClickTracker>\n <SegmentClickTracker buttonName=\"Support (Nav Bar)\">\n <ListItem\n component=\"a\"\n classes={{\n root: classes.link,\n divider: classes.divider,\n selected: classes.selectedLink,\n }}\n href=\"https://objectrocket.zendesk.com/hc/en-us\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n button\n divider\n >\n <ListItemIcon className={classes.icon}>\n <Help />\n </ListItemIcon>\n <ListItemText primaryTypographyProps={{ className: classes.itemTextTypography }}>\n Support\n </ListItemText>\n </ListItem>\n </SegmentClickTracker>\n {!isAuthenticated() ? (\n <ListItem\n component={NavLink}\n classes={{\n root: classes.link,\n divider: classes.divider,\n selected: classes.selectedLink,\n }}\n to={{\n pathname: '/login',\n state: { from: window.location.pathname },\n }}\n button\n divider\n >\n <ListItemIcon className={classes.icon}>\n <TransitEnterexit />\n </ListItemIcon>\n <ListItemText primaryTypographyProps={{ className: classes.itemTextTypography }}>\n Log In\n </ListItemText>\n </ListItem>\n ) : (\n <SegmentClickTracker buttonName=\"Log Out (Nav Bar)\">\n <ListItem\n component={NavLink}\n classes={{\n root: classes.link,\n divider: classes.divider,\n selected: classes.selectedLink,\n }}\n to={{\n pathname: '/logout',\n state: { from: window.location.pathname },\n }}\n button\n divider\n >\n <ListItemIcon className={classes.icon}>\n <ExitToApp />\n </ListItemIcon>\n <ListItemText primaryTypographyProps={{ className: classes.itemTextTypography }}>\n Log Out\n </ListItemText>\n </ListItem>\n </SegmentClickTracker>\n )}\n </List>\n );\n}\n\nUnstyledNavItems.propTypes = propTypes;\nUnstyledNavItems.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n textAlign: 'center',\n },\n link: {\n display: 'flex',\n minHeight: theme.spacing(5),\n justifyContent: 'center',\n flexDirection: 'row',\n width: '100%',\n },\n selectedLink: {\n backgroundColor: theme.customColors.mediumGrey,\n borderBottomColor: theme.customColors.teal,\n },\n icon: {\n marginRight: 0,\n /**\n * This should not be necessary. But either MUI4 has a default of min-width: 56px for\n * ListItemIcon, or there's some wierd magic inheritance going on.\n */\n minWidth: 'unset',\n },\n drawerPaper: {\n position: 'relative',\n },\n orange: {\n color: theme.customColors.orange,\n },\n itemTextTypography: {\n fontFamily: '\"Libre Light\", sans-serif',\n fontSize: '1rem',\n marginLeft: theme.spacing(2),\n },\n [theme.breakpoints.down('sm')]: {\n link: {\n minHeight: 50,\n flexDirection: 'row',\n justifyContent: 'flex-start',\n },\n badge: {\n top: 2,\n },\n },\n [theme.breakpoints.up('md')]: {\n profile: {\n display: 'none',\n },\n badge: {\n top: 2,\n },\n selected: {}, // Necessary to reference selectedLink within this media query\n divider: {\n '&:not($selectedLink)': {\n borderBottomColor: theme.customColors.mediumGrey,\n },\n },\n },\n orv4link: {\n color: theme.customColors.sky,\n },\n});\n\nexport default withStyles(styles)(UnstyledNavItems);\n","import { connect } from 'react-redux';\nimport { selectors as flagSelectors } from 'dux/user';\nimport NavItems from './NavItems';\n\nconst mapStateToProps = (state) => ({\n location: state.router.location,\n createString: flagSelectors.createStringSelector(state),\n});\n\nexport default connect(mapStateToProps, null)(NavItems);\n","/**\n * HOC component for applying a specific theme to a component\n */\nimport React from 'react';\nimport { ThemeProvider } from '@material-ui/styles';\n\nfunction WithSpecifiedTheme(theme) {\n return (ComposedComponent) => (props) => (\n <ThemeProvider theme={theme}>\n <ComposedComponent theme={theme} {...props} />\n </ThemeProvider>\n );\n}\n\nexport default WithSpecifiedTheme;\n","import { createMuiTheme } from '@material-ui/core';\n\nconst colors = {\n orange: '#F26923',\n teal: '#3C9BA0',\n green: '#0F4147',\n burntYellow: '#F4A52E',\n darkBlue: '#323B45',\n coolBlue: '#F2F6F6',\n black: '#231F20',\n darkGrey: '#353434',\n mediumGrey: '#6C6D6D',\n lightGrey: '#D8D8D8',\n coolGrey: '#F2F3F0',\n white: '#FFF',\n // Secondary color pallette\n darkPurple: '#4F0F44',\n darkBrown: '#2F1413',\n lightGreen: '#9DD485',\n magenta: '#892C23',\n red: '#D0021C',\n sky: '#9AD9E7',\n peas: '#B8B03C',\n peach: '#FEDFCE',\n khaki: '#F9D296',\n yellow: '#FFFF99',\n};\n\n// Font sizes and other styles common to both the light and dark themes go here\nconst globalThemeStyles = {\n breakpoints: {\n values: {\n xs: 0,\n sm: 321,\n md: 600,\n lg: 1024,\n xl: 1920,\n },\n },\n palette: {\n text: {\n primary: colors.white,\n },\n primary: {\n main: colors.orange,\n light: colors.orange,\n dark: colors.orange,\n },\n secondary: {\n main: colors.teal,\n light: colors.teal,\n dark: colors.teal,\n },\n error: {\n main: colors.red,\n light: colors.red,\n dark: colors.red,\n },\n },\n typography: {\n useNextVariants: true, // Preparing for typography migration https://material-ui.com/style/typography/#migration-to-typography-v2\n fontSize: 14,\n htmlFontSize: 14,\n fontFamily: ['\"Roboto\"', 'sans-serif'].join(','),\n h3: {\n fontSize: '3rem',\n lineHeight: '1.5em',\n letterSpacing: '.25rem',\n },\n h4: {\n fontSize: '1.857rem',\n lineHeight: '1.5em',\n letterSpacing: 0,\n fontFamily: ['\"Libre Franklin\"', 'sans-serif'].join(','),\n },\n h5: {\n fontSize: '1.571rem',\n lineHeight: '1.5em',\n letterSpacing: '.15px',\n fontFamily: ['\"Libre Franklin\"', 'sans-serif'].join(','),\n },\n h6: {\n fontSize: '1.286rem',\n lineHeight: '1.5em',\n letterSpacing: '.15px',\n },\n altTitle: {\n fontFamily: ['\"Libre Franklin\"', 'sans-serif'].join(','),\n fontWeight: 500,\n },\n subtitle1: {\n fontSize: '1.071rem',\n lineHeight: '1.5em',\n letterSpacing: '.1px',\n },\n altSubheading: {\n fontFamily: ['\"Libre Franklin\"', 'sans-serif'].join(','),\n fontWeight: 700,\n },\n caption: {\n fontSize: '.857rem',\n lineHeight: '1.5em',\n letterSpacing: '.1px',\n },\n body2: {\n lineHeight: '1.5em',\n letterSpacing: '.1px',\n },\n },\n overrides: {\n MuiCardHeader: {\n title: {\n fontSize: '1.286rem',\n fontFamily: ['\"Roboto\"', 'sans-serif'].join(','),\n },\n subheader: {\n opacity: 1,\n },\n },\n MuiInput: {\n underline: {\n '&:before': {\n // underline color when textfield is inactive\n borderBottom: `2px solid ${colors.orange}`,\n },\n '&:hover:not($disabled):before': {\n // underline color when hovered\n borderBottom: `3px solid ${colors.orange}`,\n },\n '&:after': {\n // underline color when textfield is inactive\n borderBottom: `2px solid ${colors.orange}`,\n },\n '&$error:after': {\n // underline color when textfield is has been touched but no input\n borderBottom: `3px solid ${colors.red}`,\n },\n },\n },\n MuiButton: {\n root: {\n '&[hover-override~=green]': {\n backgroundColor: colors.green,\n color: colors.white,\n '&:hover:not($disabled)': {\n backgroundColor: colors.green,\n },\n },\n '&[hover-override~=darkPurple]': {\n backgroundColor: colors.darkPurple,\n color: colors.white,\n '&:hover:not($disabled)': {\n backgroundColor: colors.darkPurple,\n },\n },\n '&[hover-override~=magenta]': {\n backgroundColor: colors.magenta,\n color: colors.white,\n '&:hover:not($disabled)': {\n backgroundColor: colors.magenta,\n },\n },\n '&[hover-override~=black]': {\n backgroundColor: colors.black,\n color: colors.white,\n '&:hover:not($disabled)': {\n backgroundColor: colors.black,\n },\n },\n '&[hover-override~=kibana]': {\n backgroundColor: colors.peach,\n color: colors.black,\n '&:hover:not($disabled)': {\n backgroundColor: colors.peach,\n },\n },\n '&[hover-override~=cerebro]': {\n backgroundColor: '#7cbbbe',\n color: colors.black,\n '&:hover:not($disabled)': {\n backgroundColor: '#7cbbbe',\n },\n },\n '&[hover-override~=cockroachdb_admin]': {\n backgroundColor: '#7cbbbe',\n color: colors.black,\n '&:hover:not($disabled)': {\n backgroundColor: '#7cbbbe',\n },\n },\n },\n },\n MuiFab: {\n root: {\n '&[hover-override~=red]': {\n backgroundColor: colors.red,\n color: colors.white,\n '&:hover:not($disabled)': {\n backgroundColor: colors.red,\n },\n },\n },\n },\n },\n customColors: colors,\n};\n\nconst darkThemeStyles = {\n palette: {\n ...globalThemeStyles.palette,\n type: 'dark',\n text: {\n primary: colors.white,\n },\n background: {\n default: colors.black,\n paper: colors.black,\n },\n typography: {\n useNextVariants: true, // Preparing for typography migration https://material-ui.com/style/typography/#migration-to-typography-v2\n suppressDeprecationWarnings: true,\n color: colors.coolGrey,\n },\n },\n overrides: {\n ...globalThemeStyles.overrides,\n MuiButton: {\n contained: {\n fontWeight: 'bold',\n },\n text: {\n color: colors.coolGrey,\n borderRadius: 0,\n },\n sizeLarge: {\n fontSize: '1.5rem',\n width: 340,\n maxWidth: '100%',\n },\n },\n MuiTypography: {\n colorPrimary: {\n color: colors.white,\n },\n },\n MuiFormLabel: {\n root: {\n // Need to specify focused class like this to get proper specificity for font color\n '&$focused': {\n color: colors.white,\n },\n },\n },\n },\n};\n\nconst lightThemeStyles = {\n palette: {\n ...globalThemeStyles.palette,\n type: 'light',\n text: {\n primary: colors.black,\n secondary: colors.mediumGrey,\n },\n background: {\n default: colors.coolBlue,\n paper: colors.white,\n },\n },\n overrides: {\n ...globalThemeStyles.overrides,\n MuiFormLabel: {\n root: {\n // Need to specify focused class like this to get proper specificity for font color\n '&$focused': {\n color: colors.black,\n },\n },\n },\n MuiCardHeader: {\n ...globalThemeStyles.overrides.MuiCardHeader,\n root: {\n padding: 8,\n paddingTop: 8, // Specificity requires these to be explicitly declared.\n paddingBottom: 8,\n borderBottom: `1px solid ${colors.lightGrey}`,\n },\n avatar: {\n marginRight: 8,\n },\n },\n MuiCardContent: {\n ...globalThemeStyles.overrides.MuiCardContent,\n root: {\n padding: 8,\n },\n },\n },\n};\n\n// Constructing theme allows us to use theme.breakpoints for media overrides.\nconst customLightTheme = () => {\n let theme = createMuiTheme({ ...globalThemeStyles, ...lightThemeStyles });\n theme = {\n ...theme,\n overrides: {\n ...theme.overrides,\n MuiCardHeader: {\n ...theme.overrides.MuiCardHeader,\n root: {\n ...theme.overrides.MuiCardHeader.root,\n [theme.breakpoints.up('sm')]: {\n paddingLeft: 8,\n paddingRight: 8,\n },\n },\n action: {\n ...theme.overrides.MuiCardHeader.action,\n [theme.breakpoints.up('sm')]: {\n marginRight: -4,\n },\n },\n },\n MuiCardContent: {\n ...theme.overrides.MuiCardContent,\n root: {\n ...theme.overrides.MuiCardHeader.content,\n ...theme.mixins.gutters({\n paddingTop: 8,\n paddingBottom: 8,\n '&:last-child': {\n paddingBottom: 8,\n },\n [theme.breakpoints.up('sm')]: {\n paddingLeft: 8,\n paddingRight: 8,\n },\n }),\n },\n },\n },\n };\n return theme;\n};\n\nexport const darkTheme = createMuiTheme({ ...globalThemeStyles, ...darkThemeStyles });\nexport const lightTheme = customLightTheme();\n","/**\n * Main navigation for logged in users\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport withWidth, { isWidthDown } from '@material-ui/core/withWidth';\nimport Drawer from '@material-ui/core/Drawer';\nimport classnames from 'classnames';\n\nimport NavItems from './NavItems/NavItemsContainer';\nimport WithSpecifiedTheme from '../../WithSpecifiedTheme/WithSpecifiedTheme';\nimport { darkTheme } from '../../App/App.theme';\n\nconst propTypes = {\n className: PropTypes.string,\n classes: PropTypes.shape({\n root: PropTypes.string.isRequired,\n drawerNav: PropTypes.string.isRequired,\n drawerPaper: PropTypes.string.isRequired,\n staticNav: PropTypes.string.isRequired,\n }).isRequired,\n isOpen: PropTypes.bool.isRequired,\n width: PropTypes.string.isRequired,\n isAuthenticated: PropTypes.func.isRequired,\n handleNavToggle: PropTypes.func.isRequired,\n isAdmin: PropTypes.bool.isRequired,\n};\n\nconst defaultProps = {\n className: null,\n};\n\nexport function UnstyledNav({\n className,\n classes,\n isOpen,\n width,\n isAuthenticated,\n handleNavToggle,\n isAdmin,\n}) {\n const isMobile = isWidthDown('sm', width);\n return isMobile ? (\n <Drawer\n className={classnames(className, classes.root, classes.drawerNav)}\n classes={{ paper: classes.drawerPaper }}\n open={isOpen}\n onClose={() => handleNavToggle(false)}\n >\n <NavItems\n className=\"navList\"\n isAuthenticated={isAuthenticated}\n isAdmin={isAdmin}\n handleNavToggle={handleNavToggle}\n />\n </Drawer>\n ) : (\n <NavItems\n className={classnames(className, classes.root, classes.staticNav)}\n isAuthenticated={isAuthenticated}\n isAdmin={isAdmin}\n handleNavToggle={handleNavToggle}\n />\n );\n}\n\nUnstyledNav.propTypes = propTypes;\nUnstyledNav.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n root: {\n backgroundColor: theme.palette.background.default,\n },\n staticNav: {\n textAlign: 'center',\n },\n drawerNav: {\n '& .navList': {\n padding: 0,\n },\n },\n drawerPaper: {\n position: 'relative',\n },\n});\n\nexport default withWidth()(WithSpecifiedTheme(darkTheme)(withStyles(styles)(UnstyledNav)));\n","/**\n * Menu that is triggered from the site header and shows profile-level nav items\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { withStyles } from '@material-ui/styles';\nimport Menu from '@material-ui/core/Menu';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport Icon from '@material-ui/core/Icon';\nimport Divider from '@material-ui/core/Divider';\nimport { NavLink } from 'react-router-dom';\n\nimport { lightTheme } from 'components/App/App.theme';\nimport SegmentClickTracker from 'components/SegmentClickTracker/SegmentClickTrackerContainer';\nimport WithSpecifiedTheme from 'components/WithSpecifiedTheme/WithSpecifiedTheme';\n\nconst propTypes = {\n className: PropTypes.string.isRequired,\n classes: PropTypes.shape({\n root: PropTypes.string.isRequired,\n selectedLink: PropTypes.string.isRequired,\n menuItem: PropTypes.string.isRequired,\n }).isRequired,\n anchorEl: PropTypes.oneOfType([PropTypes.object]),\n onClose: PropTypes.func.isRequired,\n isAdmin: PropTypes.bool.isRequired,\n isORv4Admin: PropTypes.bool.isRequired,\n user: PropTypes.shape({\n email: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nconst defaultProps = {\n anchorEl: null,\n};\n\nexport function UnstyledMenu({ className, classes, anchorEl, onClose, isAdmin, isORv4Admin, user }) {\n return (\n <Menu\n className={classnames(className, classes.root)}\n open={!!anchorEl}\n onClose={onClose}\n anchorEl={anchorEl}\n anchorOrigin={{ horizontal: 'right', vertical: 50 }}\n disableAutoFocusItem\n getContentAnchorEl={null}\n >\n <SegmentClickTracker buttonName=\"Profile Management (Menu)\">\n <MenuItem\n className={classnames(classes.menuItem)}\n component={NavLink}\n to=\"/mission-ctrl/profile\"\n onClick={onClose}\n classes={{ selected: classes.selectedLink }}\n >\n <span className={classes.profileTextContainer}>\n Profile Management\n <br />\n <span className={classes.email}>{user.email}</span>\n </span>\n </MenuItem>\n </SegmentClickTracker>\n\n {/* Only users with Admin, Owner, or 'OR Admin' roles can access V4 */}\n {isORv4Admin && (\n <SegmentClickTracker buttonName=\"ORv4 SSO (Menu)\">\n <MenuItem\n className={classnames(classes.menuItem)}\n component=\"a\"\n href={process.env.REACT_APP_ORV4_SSO_LOGIN}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n onClick={onClose}\n classes={{ selected: classes.selectedLink }}\n >\n <span className={classes.orv4link}>app.objectrocket.com</span>\n <Icon className={classes.linkIcon}>open_in_new</Icon>\n </MenuItem>\n </SegmentClickTracker>\n )}\n\n {isAdmin && (\n <SegmentClickTracker buttonName=\"Impersonate (Menu)\">\n <MenuItem\n className={classes.menuItem}\n component={NavLink}\n to=\"/mission-ctrl/org-impersonation\"\n onClick={onClose}\n classes={{ selected: classes.selectedLink }}\n >\n Impersonate an Org\n </MenuItem>\n </SegmentClickTracker>\n )}\n <Divider />\n <SegmentClickTracker buttonName=\"Log Out (Menu)\">\n <MenuItem\n className={classes.menuItem}\n component={NavLink}\n to=\"/logout\"\n onClick={onClose}\n classes={{ selected: classes.selectedLink }}\n >\n Log Out\n </MenuItem>\n </SegmentClickTracker>\n </Menu>\n );\n}\n\nUnstyledMenu.propTypes = propTypes;\nUnstyledMenu.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n root: {\n padding: 0,\n marginLeft: -15,\n },\n selectedLink: {\n backgroundColor: theme.palette.action.selected,\n },\n menuItem: {\n padding: theme.spacing(1),\n },\n orv4link: {\n color: 'blue',\n },\n linkIcon: {\n marginLeft: '2rem',\n },\n profileTextContainer: {\n display: 'flex',\n flexDirection: 'column',\n },\n email: {\n fontSize: '14px',\n color: theme.customColors.mediumGrey,\n },\n});\n\nexport default WithSpecifiedTheme(lightTheme)(withStyles(styles)(UnstyledMenu));\n","/**\n * Main site header for logged-in users\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from 'react-router-dom';\nimport classnames from 'classnames';\nimport { uiState } from 'react-redux-ui-state';\nimport { withStyles } from '@material-ui/styles';\nimport AppBar from '@material-ui/core/AppBar';\nimport MenuIcon from '@material-ui/icons/Menu';\nimport HelpIcon from '@material-ui/icons/Help';\nimport AccountCircle from '@material-ui/icons/AccountCircle';\nimport IconButton from '@material-ui/core/IconButton';\nimport Typography from '@material-ui/core/Typography';\n\nimport WithSpecifiedTheme from '../../WithSpecifiedTheme/WithSpecifiedTheme';\nimport Menu from './Menu/Menu';\nimport { darkTheme } from '../../App/App.theme';\n\nconst propTypes = {\n className: PropTypes.string,\n classes: PropTypes.shape({\n root: PropTypes.string.isRequired,\n tagline: PropTypes.string.isRequired,\n branding: PropTypes.string.isRequired,\n logo: PropTypes.string.isRequired,\n navToggle: PropTypes.string.isRequired,\n menu: PropTypes.string.isRequired,\n menuToggle: PropTypes.string.isRequired,\n }).isRequired,\n handleNavToggle: PropTypes.func.isRequired,\n isOpen: PropTypes.bool.isRequired,\n menuAnchorEl: PropTypes.shape({}),\n setUiState: PropTypes.func.isRequired,\n user: PropTypes.shape({}).isRequired,\n isAdmin: PropTypes.bool.isRequired,\n isORv4Admin: PropTypes.bool.isRequired,\n};\n\nconst defaultProps = {\n className: null,\n menuAnchorEl: null,\n};\n\nexport class UnstyledHeader extends React.Component {\n constructor(props) {\n super(props);\n this.onResize = this.onResize.bind(this);\n this.toggleNav = this.toggleNav.bind(this);\n this.openMenu = this.openMenu.bind(this);\n this.closeMenu = this.closeMenu.bind(this);\n }\n\n componentDidMount() {\n window.addEventListener('resize', this.onResize);\n }\n\n componentWillUnmount() {\n window.removeEventListener('resize', this.onResize);\n }\n\n onResize() {\n const { menuAnchorEl, setUiState } = this.props;\n if (menuAnchorEl) {\n setUiState({ menuAnchorEl: null });\n }\n }\n\n openMenu(event) {\n const { setUiState } = this.props;\n setUiState({ menuAnchorEl: event.currentTarget });\n }\n\n toggleNav() {\n const { handleNavToggle, isOpen } = this.props;\n handleNavToggle(!isOpen);\n }\n\n closeMenu() {\n const { setUiState } = this.props;\n setUiState({ menuAnchorEl: null });\n }\n\n render() {\n const { className, classes, menuAnchorEl, user, isAdmin, isORv4Admin } = this.props;\n\n return (\n <AppBar className={classnames(className, classes.root)} position=\"absolute\">\n <IconButton\n className={classes.navToggle}\n aria-label=\"Toggle Navigation\"\n onClick={this.toggleNav}\n >\n <MenuIcon />\n </IconButton>\n <div className={classes.branding}>\n <Link to=\"/\" className={classes.logo}>\n <img\n src=\"/images/logos/or-logo-white-no-tagline.svg\"\n alt=\"ObjectRocket - A Rackspace Company\"\n />\n </Link>\n <Typography variant=\"h6\" className={classes.tagline}>\n Mission Control\n </Typography>\n </div>\n <Menu\n className={classes.menu}\n anchorEl={menuAnchorEl}\n onClose={this.closeMenu}\n user={user}\n isAdmin={isAdmin}\n isORv4Admin={isORv4Admin}\n />\n <div className={classes.menuToggle}>\n <IconButton\n component=\"a\"\n href=\"https://objectrocket.zendesk.com/hc/en-us\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <HelpIcon fontSize=\"large\" />\n </IconButton>\n <IconButton aria-label=\"Toggle Menu\" onClick={this.openMenu}>\n <AccountCircle fontSize=\"large\" />\n </IconButton>\n </div>\n </AppBar>\n );\n }\n}\n\nconst styles = (theme) => ({\n root: {\n display: 'flex',\n justifyContent: 'space-between',\n backgroundColor: theme.customColors.black,\n },\n tagline: {\n color: theme.customColors.orange,\n },\n branding: {\n display: 'flex',\n height: '100%',\n justifyContent: 'center',\n },\n logo: {\n '& img': {\n height: '100%',\n },\n },\n orgIndicator: {\n maxHeight: '90%',\n },\n [theme.breakpoints.down('sm')]: {\n root: {\n position: 'fixed',\n flexDirection: 'row',\n },\n branding: {\n flexDirection: 'column',\n textAlign: 'center',\n margin: '0 auto',\n flex: 2,\n },\n navToggle: {\n position: 'absolute',\n top: theme.spacing(1),\n },\n logo: {\n margin: '0 auto',\n height: '47%',\n },\n tagline: {\n fontSize: '.857rem',\n },\n menuToggle: {\n display: 'none',\n },\n menu: {\n display: 'none',\n },\n },\n [theme.breakpoints.up('md')]: {\n root: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n alignContent: 'space-between',\n },\n navToggle: {\n display: 'none',\n },\n logo: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(1),\n height: '50%',\n },\n branding: {\n flexDirection: 'row',\n alignItems: 'center',\n alignContent: 'flex-start',\n },\n menuToggle: {\n textAlign: 'right',\n },\n },\n});\n\nUnstyledHeader.propTypes = propTypes;\nUnstyledHeader.defaultProps = defaultProps;\n\nexport const uiConfig = {\n persist: true,\n name: 'header',\n state: () => ({\n menuAnchorEl: null,\n }),\n};\n\nexport default uiState(uiConfig)(withStyles(styles)(WithSpecifiedTheme(darkTheme)(UnstyledHeader)));\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n};\n\nexport function UnstyledFooter({ classes }) {\n return (\n <footer className={classes.footer}>\n © ObjectRocket, a Rackspace Company |{' '}\n <a href=\"https://www.objectrocket.com/terms-of-service\" className={classes.footerLink}>\n Terms of Service\n </a>{' '}\n |{' '}\n <a href=\"https://www.objectrocket.com/legal\" className={classes.footerLink}>\n Legal\n </a>{' '}\n |{' '}\n <a\n href=\"https://www.rackspace.com/information/legal/privacystatement\"\n className={classes.footerLink}\n >\n Privacy Policy\n </a>\n </footer>\n );\n}\n\nUnstyledFooter.propTypes = propTypes;\n\nconst styles = (theme) => ({\n footer: {\n backgroundColor: theme.customColors.darkGrey,\n paddingLeft: theme.spacing(2),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n fontSize: '0.8571428571rem',\n // Make sure it's above the summary drawer in the create flow\n zIndex: 1201,\n\n [theme.breakpoints.down('sm')]: {\n textAlign: 'center',\n paddingLeft: 'unset',\n fontSize: '0.7142857143rem',\n },\n },\n footerLink: {\n color: theme.customColors.white,\n textDecoration: 'none',\n },\n});\n\nexport default withStyles(styles)(UnstyledFooter);\n","/**\n * Component that allows components to be hidden or shown based on whether a\n * a user has the desired role and/or permissions\n */\nimport PropTypes from 'prop-types';\n\nconst propTypes = {\n userPerms: PropTypes.arrayOf(PropTypes.string),\n userRoles: PropTypes.arrayOf(PropTypes.string),\n perms: PropTypes.arrayOf(PropTypes.string),\n roles: PropTypes.arrayOf(PropTypes.string),\n render: PropTypes.func,\n show: PropTypes.bool,\n};\n\nconst defaultProps = {\n userPerms: null,\n userRoles: null,\n perms: null,\n roles: null,\n show: true,\n render: null,\n};\n\nfunction Authorized({ userPerms, userRoles, perms, roles, render, show, children }) {\n const hasPerm = !perms || (userPerms && perms.some((val) => userPerms.includes(val)));\n const hasRole = !roles || (userRoles && roles.some((val) => userRoles.includes(val)));\n const shouldShow = (hasRole && hasPerm && show) || ((!hasRole || !hasPerm) && !show);\n\n if (shouldShow) {\n return render ? render() : children;\n }\n\n return null;\n}\n\nAuthorized.propTypes = propTypes;\nAuthorized.defaultProps = defaultProps;\n\nexport default Authorized;\n","import { connect } from 'react-redux';\n\nimport { selectors } from '../../dux/user';\nimport Authorized from './Authorized';\n\nconst mapStateToProps = (state) => ({\n userPermissions: selectors.getIdentityState(state).permissions,\n userRoles: selectors.getIdentityState(state).roles,\n});\n\nexport default connect(mapStateToProps, {})(Authorized);\n","/**\n * Placeholder dashboard page.\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Typography from '@material-ui/core/Typography';\nimport Grid from '@material-ui/core/Grid';\nimport List from '@material-ui/core/List';\nimport ListItem from '@material-ui/core/ListItem';\nimport Card from '@material-ui/core/Card';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport CardContent from '@material-ui/core/CardContent';\nimport MoodBad from '@material-ui/icons/MoodBad';\nimport Mood from '@material-ui/icons/Mood';\nimport LockOpen from '@material-ui/icons/LockOpen';\nimport MailOutline from '@material-ui/icons/MailOutline';\nimport Group from '@material-ui/icons/Group';\nimport AccountCircle from '@material-ui/icons/AccountCircle';\nimport { withStyles } from '@material-ui/styles';\n\nimport { OWNER } from 'constants/roles';\nimport AuthorizedContainer from '../../Authorized/AuthorizedContainer';\n\nconst propTypes = {\n classes: PropTypes.shape({\n header: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n content: PropTypes.string.isRequired,\n card: PropTypes.string.isRequired,\n cardHeader: PropTypes.string.isRequired,\n legend: PropTypes.string.isRequired,\n legendIcon: PropTypes.string.isRequired,\n token: PropTypes.string.isRequired,\n }).isRequired,\n user: PropTypes.shape({\n name: PropTypes.string.isRequired,\n email: PropTypes.string.isRequired,\n organizationId: PropTypes.string.isRequired,\n roles: PropTypes.arrayOf(PropTypes.string).isRequired,\n permissions: PropTypes.arrayOf(PropTypes.string).isRequired,\n }).isRequired,\n accessToken: PropTypes.string.isRequired,\n};\n\nexport function UnstyledDashboardPage({ user, accessToken, classes }) {\n return (\n <Grid container justify=\"center\">\n <Grid item xs={12}>\n <Typography className={classes.header} variant=\"h4\" align=\"center\">\n Welcome, <span className={classes.name}>{user.name}</span>!\n </Typography>\n </Grid>\n <Grid item md={1} sm={false} />\n <Grid item md={10} sm={12} className={classes.content}>\n <Card className={classes.card}>\n <CardHeader\n title=\"Email\"\n titleTypographyProps={{ className: classes.cardHeader }}\n avatar={<MailOutline />}\n />\n <CardContent>{user.email}</CardContent>\n </Card>\n <Card className={classes.card}>\n <CardHeader\n title=\"Organization Id\"\n titleTypographyProps={{ className: classes.cardHeader }}\n avatar={<Group />}\n />\n <CardContent>{user.organizationId}</CardContent>\n </Card>\n <Card className={classes.card}>\n <CardHeader\n title=\"Permissions\"\n titleTypographyProps={{ className: classes.cardHeader }}\n avatar={<AccountCircle />}\n />\n <CardContent>\n <List>\n {user.permissions.map((perm) => (\n <ListItem key={perm}>{perm}</ListItem>\n ))}\n </List>\n </CardContent>\n </Card>\n <Card className={classes.card}>\n <CardHeader\n title=\"Roles\"\n titleTypographyProps={{ className: classes.cardHeader }}\n avatar={<AccountCircle />}\n />\n <CardContent>\n <List>\n {user.roles.map((role) => (\n <ListItem key={role}>{role}</ListItem>\n ))}\n </List>\n </CardContent>\n </Card>\n <Card className={classes.card}>\n <CardHeader\n title=\"Roles Demo\"\n titleTypographyProps={{ className: classes.cardHeader }}\n avatar={<AccountCircle />}\n />\n <CardContent>\n <legend className={classes.legend}>\n <div>\n <Mood className={classes.legendIcon} />= owner\n </div>\n <div>\n <MoodBad className={classes.legendIcon} />= not an owner\n </div>\n </legend>\n <Typography variant=\"subtitle1\">Your role:</Typography>\n <AuthorizedContainer roles={[OWNER]}>\n <Mood className={classes.icon} />\n </AuthorizedContainer>\n <AuthorizedContainer roles={[OWNER]} show={false}>\n <MoodBad className={classes.icon} />\n </AuthorizedContainer>\n </CardContent>\n </Card>\n <Card className={classes.card}>\n <CardHeader\n title=\"Access Token\"\n titleTypographyProps={{ className: classes.cardHeader }}\n avatar={<LockOpen />}\n />\n <CardContent className={classes.token}>{accessToken}</CardContent>\n </Card>\n </Grid>\n <Grid item md={1} sm={false} />\n </Grid>\n );\n}\n\nUnstyledDashboardPage.propTypes = propTypes;\n\nconst styles = (theme) => ({\n header: {\n marginTop: theme.spacing(4),\n },\n content: {\n marginTop: theme.spacing(2),\n },\n name: {\n color: theme.customColors.orange,\n },\n icon: {\n margin: '0 auto',\n display: 'block',\n fontSize: '5rem',\n },\n legend: {\n marginBottom: theme.spacing(1),\n },\n legendIcon: {\n fontSize: '1.5rem',\n marginRight: theme.spacing(1),\n },\n card: {\n margin: theme.spacing(1),\n padding: theme.spacing(1),\n backgroundColor: theme.customColors.white,\n display: 'inline-block',\n maxWidth: '50%',\n verticalAlign: 'top',\n wordWrap: 'break-word',\n fontSize: '.8rem',\n },\n cardHeader: {\n color: theme.customColors.darkGrey,\n },\n token: {\n fontSize: '.5em',\n },\n});\n\nexport default withStyles(styles)(UnstyledDashboardPage);\n","import { connect } from 'react-redux';\n\nimport DashboardPage from './DashboardPage';\nimport { selectors } from '../../../dux/user';\n\nconst mapStateToProps = (state) => ({\n user: selectors.getIdentityState(state),\n accessToken: selectors.getCredentialsState(state).accessToken,\n});\n\nexport default connect(mapStateToProps, {})(DashboardPage);\n","/**\n * Component for rendering the alternate Typography variants from the OR\n * style guide that are not supported by Material UI Typography\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Typography from '@material-ui/core/Typography';\nimport { withStyles } from '@material-ui/styles';\n\nconst propTypes = {\n classes: PropTypes.shape({\n altTitle: PropTypes.string,\n altSubheading: PropTypes.string,\n colorTextPrimary: PropTypes.string,\n }).isRequired,\n variant: PropTypes.string,\n};\n\nconst defaultProps = {\n variant: undefined,\n};\n\nexport function UnstyledORTypography({ classes, variant, ...rest }) {\n const customClasses = { ...classes };\n delete customClasses.altTitle;\n delete customClasses.altSubheading;\n switch (variant) {\n case 'altTitle':\n return (\n <Typography variant=\"h6\" classes={{ h6: classes.altTitle, ...customClasses }} {...rest} />\n );\n case 'altSubheading':\n return (\n <Typography\n variant=\"subtitle1\"\n classes={{ subtitle1: classes.altSubheading, ...customClasses }}\n {...rest}\n />\n );\n default:\n return <Typography classes={customClasses} variant={variant} {...rest} />;\n }\n}\n\nUnstyledORTypography.propTypes = propTypes;\nUnstyledORTypography.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n altTitle: theme.typography.altTitle,\n altSubheading: theme.typography.altSubheading,\n colorTextPrimary: null,\n});\n\nexport default withStyles(styles)(UnstyledORTypography);\n","/**\n * Component for displaying a consistent loading placeholder that is centered\n * within the parent component\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport CircularProgress from '@material-ui/core/CircularProgress';\nimport Typography from '@material-ui/core/Typography';\nimport { withStyles } from '@material-ui/styles';\n\nconst propTypes = {\n text: PropTypes.string,\n className: PropTypes.string,\n classes: PropTypes.shape({\n root: PropTypes.string.isRequired,\n progress: PropTypes.string.isRequired,\n text: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nconst defaultProps = {\n text: null,\n className: null,\n};\n\nexport function UnstyledLoadingPlaceholder({ text, classes, className }) {\n return (\n <div className={classnames(className, classes.root)}>\n <CircularProgress className={classes.progress} />\n {text && (\n <Typography variant=\"body2\" align=\"center\" className={classes.text}>\n {text}\n </Typography>\n )}\n </div>\n );\n}\n\nUnstyledLoadingPlaceholder.propTypes = propTypes;\nUnstyledLoadingPlaceholder.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n root: {\n textAlign: 'center',\n width: '100%',\n padding: `${theme.spacing(4)}px 0`,\n },\n progress: {\n margin: '0 auto',\n },\n text: {\n marginTop: theme.spacing(2),\n },\n});\n\nexport default withStyles(styles)(UnstyledLoadingPlaceholder);\n","/**\n * Component to poll a given handler for new data on a certain interval.\n */\nimport { useEffect } from 'react';\nimport PropTypes from 'prop-types';\n\nconst propTypes = {\n intervalInMS: PropTypes.number.isRequired,\n actionCreator: PropTypes.func.isRequired,\n};\n\nexport default function Poll({ intervalInMS, actionCreator }) {\n useEffect(() => {\n const intervalId = setInterval(actionCreator, intervalInMS);\n const cleanupFunc = () => {\n clearInterval(intervalId);\n };\n\n return cleanupFunc;\n /* Empty array indicates that the component should not update for any variable change */\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return null;\n}\n\nPoll.propTypes = propTypes;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Card from '@material-ui/core/Card';\nimport Icon from '@material-ui/core/Icon';\nimport Typography from '@material-ui/core/Typography';\nimport { withStyles } from '@material-ui/styles';\nimport classnames from 'classnames';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n noInstances: PropTypes.bool,\n className: PropTypes.string,\n isORv4User: PropTypes.bool.isRequired,\n};\n\nconst defaultProps = {\n noInstances: false,\n className: null,\n};\n\nexport function UnstyledORv4Link({ noInstances, classes, className, isORv4User }) {\n const cardClass = noInstances\n ? classnames(classes.noInstanceCard, classes.theCard, className)\n : classnames(classes.instanceCard, classes.theCard, className);\n const textClass = noInstances ? classes.noInstanceText : classes.instanceText;\n const iconClass = noInstances ? classes.noInstanceLinkIcon : classes.instanceLinkIcon;\n\n if (isORv4User) {\n return (\n <Card\n className={cardClass}\n component=\"a\"\n href={process.env.REACT_APP_ORV4_SSO_LOGIN}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n elevation={0}\n >\n <div className={textClass}>\n <Typography className={classes.cardText}>\n <span className={classes.question}>\n Looking for existing MongoDB, Redis and Elasticsearch instances?{' '}\n </span>\n </Typography>\n <Typography className={classes.cardText}>\n Log into app.objectrocket.com with SSO.\n </Typography>\n </div>\n <Icon className={iconClass}>open_in_new</Icon>\n </Card>\n );\n }\n return null;\n}\n\nUnstyledORv4Link.propTypes = propTypes;\nUnstyledORv4Link.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n theCard: {\n backgroundColor: theme.customColors.sky,\n border: `1px solid ${theme.customColors.mediumGrey}`,\n borderRadius: 3,\n color: theme.customColors.darkGrey,\n textDecoration: 'none',\n justifyContent: 'center',\n alignItems: 'center',\n position: 'relative',\n },\n instanceCard: {\n display: 'block',\n padding: theme.spacing(2),\n },\n noInstanceCard: {\n display: 'flex',\n padding: theme.spacing(1),\n paddingBottom: theme.spacing(2),\n },\n cardText: {\n fontSize: '1rem',\n '&:not(:last-child)': {\n marginBottom: theme.spacing(1),\n },\n },\n noInstanceText: {\n textAlign: 'left',\n },\n instanceText: {\n textAlign: 'center',\n },\n question: {\n fontWeight: 'bold',\n textTransform: 'uppercase',\n },\n instanceLinkIcon: {\n fontSize: '2rem',\n position: 'absolute',\n top: '50%',\n right: 10,\n transform: 'translateY(-50%)',\n },\n noInstanceLinkIcon: {\n fontSize: '2rem',\n alignSelf: 'flex-start',\n },\n});\n\nexport default withStyles(styles)(UnstyledORv4Link);\n","import { connect } from 'react-redux';\n\nimport { selectors } from 'dux/user';\nimport ORv4Link from './ORv4Link';\n\nfunction mapStateToProps(state) {\n return { isORv4User: selectors.isORv4User(state) };\n}\n\nexport default connect(mapStateToProps, null)(ORv4Link);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport Divider from '@material-ui/core/Divider';\n\nimport ORTypography from 'components/ORTypography/ORTypography';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n children: PropTypes.node.isRequired,\n hasDivider: PropTypes.bool,\n};\n\nconst defaultProps = {\n hasDivider: false,\n};\n\nexport function UnstyledORContentHeader({ children, hasDivider, classes }) {\n return (\n <React.Fragment>\n <ORTypography variant=\"h5\" component=\"h1\" className={classes.header}>\n {children}\n </ORTypography>\n {hasDivider && <Divider className={classes.divider} />}\n </React.Fragment>\n );\n}\n\nUnstyledORContentHeader.defaultProps = defaultProps;\nUnstyledORContentHeader.propTypes = propTypes;\n\nconst styles = (theme) => ({\n header: {\n color: theme.palette.text.primary,\n fontSize: '1.285714rem',\n },\n divider: {\n marginBottom: theme.spacing(2),\n },\n});\n\nexport default withStyles(styles)(UnstyledORContentHeader);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n children: PropTypes.node.isRequired,\n};\n\nexport function UnstyledORContentArea({ children, classes }) {\n return <div className={classes.contentArea}>{children}</div>;\n}\n\nUnstyledORContentArea.propTypes = propTypes;\n\nconst styles = () => ({\n contentArea: {\n maxWidth: 1300,\n margin: `0 auto`,\n },\n});\n\nexport default withStyles(styles)(UnstyledORContentArea);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Button from '@material-ui/core/Button';\nimport Typography from '@material-ui/core/Typography';\nimport { withStyles } from '@material-ui/styles';\nimport { uiState } from 'react-redux-ui-state';\nimport { Link } from 'react-router-dom';\n\nimport SegmentClickTracker from 'components/SegmentClickTracker/SegmentClickTrackerContainer';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n robotImage: PropTypes.string.isRequired,\n subtextColor: PropTypes.string.isRequired,\n setUiState: PropTypes.func.isRequired,\n createString: PropTypes.string.isRequired,\n};\n\nexport function UnstyledNoInstancesPage({\n classes,\n robotImage,\n subtextColor,\n setUiState,\n createString,\n}) {\n const robotList = [\n {\n image: '../images/logos/robot-dropped-icecream.png',\n color: '#e35746',\n },\n {\n image: '../images/logos/robot-juggling-purple.png',\n color: '#510d45',\n },\n {\n image: '../images/logos/robot-mohawk.png',\n color: '#32a2c2',\n },\n {\n image: '../images/logos/robot-withSpyglass.png',\n color: '#38b19b',\n },\n {\n image: '../images/logos/robot-withTools.png',\n color: '#38b19b',\n },\n ];\n\n function RandomRobot() {\n const robot = robotList[Math.floor(Math.random() * robotList.length)];\n if (!robotImage) {\n setUiState({\n robotImage: robot.image,\n subtextColor: robot.color,\n });\n }\n }\n\n RandomRobot();\n\n return (\n <React.Fragment>\n <div className={classes.root}>\n <div className={classes.textAndButtons}>\n <Typography variant=\"h1\" className={classes.welcomeText} style={{ color: subtextColor }}>\n Welcome\n </Typography>\n <Typography variant=\"h3\" className={classes.subText}>\n You have no Instances setup yet!\n </Typography>\n\n <div className={classes.theButtons}>\n <SegmentClickTracker buttonName=\"Create Instance (Get Started With An Instance)\">\n <Link to={createString} className={classes.buttonLink}>\n <Button\n variant=\"contained\"\n color=\"primary\"\n className={classes.createInstanceButton}\n >\n Get started with an instance\n </Button>\n </Link>\n </SegmentClickTracker>\n </div>\n </div>\n\n <div className={classes.imageArea}>\n <img className={classes.robot} src={robotImage} alt=\"\" />\n </div>\n </div>\n </React.Fragment>\n );\n}\n\nUnstyledNoInstancesPage.propTypes = propTypes;\n\nconst styles = (theme) => ({\n root: {\n display: 'flex',\n flexFlow: 'row',\n padding: '8px',\n justifyContent: 'center',\n alignItems: 'center',\n marginTop: theme.spacing(20),\n\n [theme.breakpoints.down('md')]: {\n marginTop: theme.spacing(3),\n flexDirection: 'column',\n },\n },\n welcomeText: {\n fontSize: '5.14rem',\n fontFamily: '\"Libre Medium\", sans-serif',\n fontWeight: 400,\n },\n subText: {\n color: theme.customColors.black,\n fontSize: '1.71rem',\n lineHeight: '2.57rem',\n letterSpacing: 1,\n fontFamily: '\"Libre Medium\", sans-serif',\n },\n theButtons: {\n maxWidth: 310,\n },\n createInstanceButton: {\n color: theme.customColors.white,\n fontWeight: 'bold',\n width: '100%',\n },\n robot: {\n height: 300,\n },\n buttonLink: {\n textDecoration: 'none',\n },\n orv4Link: {\n width: '100%',\n marginTop: '1rem',\n },\n textAndButtons: {\n marginRight: '3rem',\n alignSelf: 'stretch',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'space-between',\n\n [theme.breakpoints.down('md')]: {\n height: 300,\n alignSelf: 'unset',\n marginRight: 'unset',\n },\n },\n imageArea: {\n marginLeft: '3rem',\n\n [theme.breakpoints.down('md')]: {\n marginLeft: 'unset',\n marginTop: '3rem',\n },\n },\n});\n\nexport const uiConfig = {\n name: 'NoInstancesPage',\n state: () => ({\n robotImage: '',\n subtextColor: '',\n }),\n};\n\nexport default uiState(uiConfig)(withStyles(styles)(UnstyledNoInstancesPage));\n","import { connect } from 'react-redux';\nimport { selectors as flagSelectors } from 'dux/user';\n\nimport NoInstancesPage from './NoInstancesPage';\n\nconst mapStateToProps = (state) => ({\n createString: flagSelectors.createStringSelector(state),\n});\n\nexport default connect(mapStateToProps, null)(NoInstancesPage);\n","/**\n * SVG MongoDB icon\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport SvgIcon from '@material-ui/core/SvgIcon';\n\nconst propTypes = {\n classes: PropTypes.shape({\n circleStyle: PropTypes.string.isRequired,\n leafStyle: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nexport function UnstyledMongoDBIcon({ ...props }) {\n const { classes, ...additionalProps } = props;\n const { circleStyle, leafStyle } = classes;\n return (\n <SvgIcon viewBox=\"0 0 120 120\" {...additionalProps}>\n <g>\n <circle className={circleStyle} cx=\"60\" cy=\"60\" r=\"55.5\" />\n <path\n className={leafStyle}\n d=\"M84.6,57.7c-1.3-8-10.7-18.1-20.3-25.1c-9.5-7.2-19.1-11.4-19.1-11.4c-0.1,0-2.1,8.8-5,18.9c-2.7,10.2-6.1,21.7-5,28.4\n c2.4,13.3,15,21,27.1,20.2c0,0,0.5,5.7,1.6,9.2c0.3,1,0.8,1.8,1.2,2.5c0.2,0.3,0.5,0.7,0.8,0.9c0.3,0.3,0.7,0.6,1.4,0.6h0\n c0.4,0,0.7-0.1,1-0.3c0.4-0.3,0.6-0.7,0.8-1c0.2-0.4,0.3-0.8,0.3-1.2c0.1-0.8,0.2-1.6,0.2-2.5c0-2.8-1-9.9-1-9.9\n C79,82.5,87,71,84.6,57.7z M66.3,80.8c0.3,2.2,0.5,4.5,0.7,6.9c0.5,5,1.6,10.5,0.1,10.3c-2.2-0.3-2.9-6.8-3.1-9.6\n c-0.2-2.6-0.5-5-0.8-7.4c-9.1-2-15.6-7.3-20.3-14.2c5.5,6.7,12.5,10.3,20,11.3c-0.8-7.1-1.8-13.6-3.5-20.4c-6.5-1.4-11.5-5-14.8-10\n c3.9,4.8,8.9,7.4,14.3,8.1c-2.5-9.7-6.2-19.8-12.5-32.3C53.3,35,57.9,44.9,61.1,55.4c4.2-3.1,7.2-7.7,8.4-13.5\n c-0.6,5.8-3.1,11.1-7.9,15.4c1.9,6.4,3.2,13.1,4.2,20.5c6.3-4.5,10.8-11.1,12.6-19.8C77.6,66.6,74.2,74.4,66.3,80.8z\"\n />\n </g>\n </SvgIcon>\n );\n}\n\nUnstyledMongoDBIcon.propTypes = propTypes;\n\nconst styles = (theme) => ({\n circleStyle: {\n fillRule: 'evenodd',\n clipRule: 'evenodd',\n fill: theme.customColors.white,\n stroke: theme.customColors.teal,\n strokeWidth: 7,\n },\n leafStyle: {\n fillRule: 'evenodd',\n clipRule: 'evenodd',\n fill: theme.customColors.teal,\n },\n});\n\nexport default withStyles(styles)(UnstyledMongoDBIcon);\n","/**\n * SVG Redis icon\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport SvgIcon from '@material-ui/core/SvgIcon';\n\nconst propTypes = {\n classes: PropTypes.shape({\n circleStyle: PropTypes.string.isRequired,\n redisStyle: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nexport function UnstyledRedisIcon({ ...props }) {\n const { classes, ...additionalProps } = props;\n const { circleStyle, redisStyle } = classes;\n return (\n <SvgIcon viewBox=\"0 0 120 120\" {...additionalProps}>\n <circle className={circleStyle} cx=\"60\" cy=\"60\" r=\"55.5\" />\n <g>\n <path\n className={redisStyle}\n d=\"M97.4,44.9c0,0.4,0,0.9,0,1.3c-0.9,0.9-1.7,2-2.8,2.6C84,54.6,73.3,60.2,62.7,65.9c-1.9,1-3.5,1-5.4,0\n c-10.6-5.7-21.3-11.3-31.9-17c-1.1-0.6-1.9-1.7-2.8-2.6c0-0.4,0-0.9,0-1.3c0.9-0.9,1.7-2.1,2.8-2.6c10.8-4.9,21.8-9.8,32.6-14.6\n c1.4-0.6,2.6-0.6,4,0c10.9,4.9,21.8,9.7,32.6,14.7C95.7,42.8,96.5,44,97.4,44.9z\"\n />\n <path\n className={redisStyle}\n d=\"M97.4,58.2c0,0.6,0,1.1,0,1.7c-0.9,0.8-1.7,1.9-2.7,2.5C84,68.2,73.2,73.9,62.4,79.7c-1.7,0.9-3.1,0.9-4.8,0\n c-10.7-5.8-21.5-11.5-32.3-17.3c-1-0.6-1.8-1.7-2.7-2.5c0-0.6,0-1.1,0-1.7c1.6-2.6,2.9-2.9,5.6-1.5C38.4,62.2,48.5,67.6,58.6,73\n c1,0.5,1.7,0.5,2.7,0c10.1-5.4,20.3-10.8,30.4-16.2C94.5,55.3,95.8,55.6,97.4,58.2z\"\n />\n <path\n className={redisStyle}\n d=\"M97.4,72.5c-0.8,0.8-1.5,1.7-2.5,2.3c-10.8,5.8-21.6,11.5-32.4,17.3c-1.7,0.9-3.2,0.9-5,0c-10.8-5.8-21.6-11.5-32.4-17.3\n c-1-0.5-1.7-1.5-2.5-2.3c0-0.6,0-1.1,0-1.7c1.4-2.6,2.9-3.1,5.5-1.6C38.3,74.6,48.5,80,58.7,85.5c1,0.5,1.6,0.5,2.6,0\n C71.5,80,81.7,74.6,91.9,69.2c2.7-1.4,4.1-1,5.5,1.6C97.4,71.4,97.4,71.9,97.4,72.5z\"\n />\n </g>\n </SvgIcon>\n );\n}\n\nUnstyledRedisIcon.propTypes = propTypes;\n\nconst styles = (theme) => ({\n circleStyle: {\n fillRule: 'evenodd',\n clipRule: 'evenodd',\n fill: theme.customColors.white,\n stroke: theme.customColors.teal,\n strokeWidth: 7,\n },\n redisStyle: {\n fillRule: 'evenodd',\n clipRule: 'evenodd',\n fill: theme.customColors.teal,\n },\n});\n\nexport default withStyles(styles)(UnstyledRedisIcon);\n","/**\n * SVG Elasticsearch icon\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport SvgIcon from '@material-ui/core/SvgIcon';\n\nconst propTypes = {\n classes: PropTypes.shape({\n circleStyle: PropTypes.string.isRequired,\n searchStyle: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nexport function UnstyledElasticsearchIcon({ ...props }) {\n const { classes, ...additionalProps } = props;\n const { circleStyle, searchStyle } = classes;\n return (\n <SvgIcon viewBox=\"0 0 120 120\" {...additionalProps}>\n <g>\n <circle className={circleStyle} cx=\"60\" cy=\"60\" r=\"55.5\" />\n <path\n className={searchStyle}\n d=\"M77,41.3c-5.5-12.4-20-17.9-32.4-12.4c-12.4,5.5-17.9,20-12.4,32.4c5.5,12.4,20,17.9,32.4,12.4\n C77,68.1,82.5,53.6,77,41.3z M62.6,69.2c-9.9,4.4-21.5,0-25.9-9.9c-4.4-9.9,0-21.5,9.9-25.9c9.9-4.4,21.5,0,25.9,9.9\n C76.9,53.1,72.5,64.8,62.6,69.2z\"\n />\n <path\n className={searchStyle}\n d=\"M60.4,76.2l6.2,20.9c0.9,3.2,5.4,4.3,9.6,2.4l0,0c4.2-1.9,6.3-5.9,4.6-8.7L69.4,72.2C68,73,66.6,73.8,65,74.5\n C63.5,75.2,61.9,75.8,60.4,76.2z\"\n />\n </g>\n </SvgIcon>\n );\n}\n\nUnstyledElasticsearchIcon.propTypes = propTypes;\n\nconst styles = (theme) => ({\n circleStyle: {\n fillRule: 'evenodd',\n clipRule: 'evenodd',\n fill: theme.customColors.white,\n stroke: theme.customColors.teal,\n strokeWidth: 7,\n },\n searchStyle: {\n fill: theme.customColors.teal,\n stroke: theme.customColors.teal,\n },\n});\n\nexport default withStyles(styles)(UnstyledElasticsearchIcon);\n","/**\n * SVG PostgreSQL icon\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport SvgIcon from '@material-ui/core/SvgIcon';\n\nconst propTypes = {\n classes: PropTypes.shape({\n circleStyle: PropTypes.string.isRequired,\n elephantStyle: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nexport function UnstyledPostgreSQLIcon({ ...props }) {\n const { classes, ...additionalProps } = props;\n const { circleStyle, elephantStyle } = classes;\n return (\n <SvgIcon viewBox=\"0 0 120 120\" {...additionalProps}>\n <g>\n <circle className={circleStyle} cx=\"60\" cy=\"60\" r=\"55.5\" />\n <g>\n <path\n className={elephantStyle}\n d=\"M75.9,104.2c-1.1-0.2-4.5-1.1-5.4-1.6c-0.8-0.3-0.7-0.4-1.3-0.8c-1.1-1.4-3.8-3.6-4-5.3c-0.2-2.1-0.1-0.1-0.2-2.2\n c-0.1-2.9-0.2-5.8-0.1-8.7c0-1.3,0-2.6,0.1-3.8c0-2.5-5-6.5-7.5-6.9c-0.3,0-0.5,0-0.8-0.1c-0.6-0.1-0.4-0.1-0.3-0.4\n c0.3-1.1,0.7-2.2,1.1-3.3c0.6-1.5,1.3-2.9,1.9-4.5c0.6-1.7,1-3.4,1.1-5.2c0.3-3.6-0.2-7.1-1-10.6c-0.4-1.8-1.3-3.2-3-4.1\n c-1.2-0.6-2.4-0.8-3.7-0.8c-2.5,0-4.8,0.9-7.1,2c-0.1,0.1-0.3,0.3-0.5,0.2c-0.2-0.1-0.1-0.4-0.1-0.5c0.2-2,0.5-3.9,1-5.8\n c0.6-2.3,1.5-4.5,2.8-6.5c2.5-3.9,6-6.3,10.7-6.8c6.6-0.7,12.6,1,17.7,5.3c3.7,3,6.3,6.8,8.1,11.2c0.3,0.7,0.3,0.7-0.4,0.7\n c-1.6-0.1-3.1-0.1-4.6,0.3c-2,0.5-3.7,1.5-4.6,3.5c-0.5,1.1-0.7,2.3-0.6,3.6c0.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.7,4.8c0,2.1,0.3,5.9,1,7.8c1.5,4,4.6,8.1,6.4,11.9c0,0.1-1.1,4,0.4,4.6\n c0.1,0,2.2-2.5,3-5.1c0.2-0.5,0.2-1.3,0.3-1.9c0.6-2.2,0.4-4.5,0.1-6.7C85.5,59.7,85.3,58.2,85.3,56.7z M77.4,53.7\n c-0.7,0-1.3-0.6-1.3-1.3c0-0.7,0.6-1.3,1.3-1.3s1.3,0.6,1.3,1.3C78.7,53.1,78.1,53.7,77.4,53.7z\"\n />\n </g>\n </g>\n </SvgIcon>\n );\n}\n\nUnstyledPostgreSQLIcon.propTypes = propTypes;\n\nconst styles = (theme) => ({\n circleStyle: {\n fillRule: 'evenodd',\n clipRule: 'evenodd',\n fill: theme.customColors.white,\n stroke: theme.customColors.teal,\n strokeWidth: 7,\n },\n elephantStyle: {\n fillRule: 'evenodd',\n clipRule: 'evenodd',\n fill: theme.customColors.teal,\n stroke: theme.customColors.teal,\n },\n});\n\nexport default withStyles(styles)(UnstyledPostgreSQLIcon);\n","/**\n * SVG CockroachDB icon\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport SvgIcon from '@material-ui/core/SvgIcon';\n\nconst propTypes = {\n classes: PropTypes.shape({\n circleStyle: PropTypes.string.isRequired,\n cockroachStyle: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nexport function UnstyledCockroachDBIcon({ ...props }) {\n const { classes, ...additionalProps } = props;\n const { circleStyle, cockroachStyle } = classes;\n return (\n <SvgIcon viewBox=\"0 0 120 120\" {...additionalProps}>\n <g>\n <circle className={circleStyle} cx=\"60\" cy=\"60\" r=\"55.5\" />\n <path\n className={cockroachStyle}\n d=\"M92.1,32.4c-3.3-0.9-6.6-1.3-10-1.3c-7.8,0-15.5,2.3-22,6.6c-6.5-4.3-14.1-6.7-22-6.6c-3.4,0-6.8,0.4-10.1,1.3\n c-1.4,0.3-2.7,0.8-4.1,1.3c0,0.1,0,0.1,0,0.2c0.6,1.2,1.2,2.4,1.9,3.6c0.1,0,0.1,0,0.2,0c1.3-0.5,2.7-0.9,4.1-1.2\n c9-2,18.4-0.5,26.3,4.3c-3.4,2.9-6.3,6.3-8.6,10.2c-0.5,0.7-0.8,1.5-1.2,2.3c-0.4,0.8-0.5,1-0.7,1.6c-0.2,0.5-0.7,1.6-1,2.4\n c-5.5,14.8-1.7,31.5,9.7,42.4c0.6,0.6,1.2,1.1,1.8,1.7c0.6,0.5,1,0.8,1.5,1.2s1.3,1,2,1.5c0.1,0,0.1,0,0.2,0c0.7-0.5,1.4-1,2-1.5\n c0.7-0.5,1-0.8,1.5-1.2c0.5-0.4,1.2-1.1,1.8-1.7c7.8-7.5,12.2-17.8,12.2-28.6c0-4.7-0.8-9.4-2.5-13.8c-0.3-0.8-0.7-1.7-1-2.5\n c-0.4-0.8-0.5-1.1-0.7-1.6c-0.2-0.5-0.8-1.5-1.2-2.3c-2.3-3.8-5.2-7.3-8.6-10.2c7.9-4.8,17.3-6.3,26.3-4.2c1.4,0.3,2.8,0.7,4.1,1.2\n c0.1,0,0.1,0,0.2,0c0.7-1.1,1.3-2.3,1.9-3.5c0-0.1,0-0.1,0-0.2C94.9,33.3,93.5,32.8,92.1,32.4z\"\n />\n </g>\n </SvgIcon>\n );\n}\n\nUnstyledCockroachDBIcon.propTypes = propTypes;\n\nconst styles = (theme) => ({\n circleStyle: {\n fillRule: 'evenodd',\n clipRule: 'evenodd',\n fill: theme.customColors.white,\n stroke: theme.customColors.teal,\n strokeWidth: 7,\n },\n cockroachStyle: {\n fillRule: 'evenodd',\n clipRule: 'evenodd',\n fill: theme.customColors.teal,\n },\n});\n\nexport default withStyles(styles)(UnstyledCockroachDBIcon);\n","/**\n * SVG Timescale icon\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport SvgIcon from '@material-ui/core/SvgIcon';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n};\n\nexport function UnstyledTimescaleDBIcon({ ...props }) {\n const { classes, ...additionalProps } = props;\n return (\n <SvgIcon viewBox=\"0 0 120 120\" {...additionalProps}>\n <g>\n <circle className={classes.st0} cx=\"60\" cy=\"60\" r=\"55.5\" />\n <g>\n <circle className={classes.st1} cx=\"60.2\" cy=\"66.1\" r=\"24.7\" />\n <g>\n <circle className={classes.st1} cx=\"60.2\" cy=\"46.3\" r=\"1.7\" />\n </g>\n <g>\n <path\n className={classes.st1}\n d=\"M71.5,49.8c-0.5,0.8-1.5,1.1-2.3,0.6s-1.1-1.5-0.6-2.3s1.5-1.1,2.3-0.6C71.7,48,72,49,71.5,49.8z\"\n />\n </g>\n <g>\n <path\n className={classes.st1}\n d=\"M78.1,57.6c-0.8,0.5-1.8,0.2-2.3-0.6s-0.2-1.8,0.6-2.3c0.8-0.5,1.8-0.2,2.3,0.6\n C79.2,56.2,78.9,57.2,78.1,57.6z\"\n />\n </g>\n <g>\n <circle className={classes.st1} cx=\"80\" cy=\"66.1\" r=\"1.7\" />\n </g>\n <g>\n <ellipse className={classes.st2} cx=\"77.3\" cy=\"75.9\" rx=\"1.7\" ry=\"1.7\" />\n </g>\n <g>\n <ellipse className={classes.st3} cx=\"70.1\" cy=\"83.2\" rx=\"1.7\" ry=\"1.7\" />\n </g>\n <g>\n <ellipse className={classes.st4} cx=\"60.2\" cy=\"85.8\" rx=\"1.7\" ry=\"1.7\" />\n </g>\n <g>\n <path\n className={classes.st1}\n d=\"M48.9,82.3c0.5-0.8,1.5-1.1,2.3-0.6s1.1,1.5,0.6,2.3s-1.5,1.1-2.3,0.6C48.8,84.2,48.5,83.1,48.9,82.3z\"\n />\n </g>\n <g>\n <path\n className={classes.st1}\n d=\"M42.3,74.5c0.8-0.5,1.8-0.2,2.3,0.6c0.5,0.8,0.2,1.8-0.6,2.3s-1.8,0.2-2.3-0.6C41.2,76,41.5,75,42.3,74.5z\"\n />\n </g>\n <g>\n <path\n className={classes.st1}\n d=\"M40.5,64.4c0.9,0,1.7,0.7,1.7,1.7c0,0.9-0.7,1.7-1.7,1.7c-0.9,0-1.7-0.7-1.7-1.7\n C38.8,65.2,39.6,64.4,40.5,64.4z\"\n />\n </g>\n <g>\n <path\n className={classes.st1}\n d=\"M43.9,54.8c0.8,0.5,1.1,1.5,0.6,2.3s-1.5,1.1-2.3,0.6s-1.1-1.5-0.6-2.3C42.1,54.6,43.1,54.3,43.9,54.8z\"\n />\n </g>\n <g>\n <circle className={classes.st1} cx=\"50.3\" cy=\"49\" r=\"1.7\" />\n </g>\n <g>\n <path\n className={classes.st1}\n d=\"M61.8,46.3c0,0.9-0.7,1.7-1.7,1.7c-0.9,0-1.7-0.7-1.7-1.7c0-0.9,0.7-1.7,1.7-1.7\n C61.1,44.7,61.8,45.4,61.8,46.3z\"\n />\n </g>\n <g>\n <path\n className={classes.st1}\n d=\"M60.2,93.9c-15.3,0-27.8-12.5-27.8-27.8s12.5-27.8,27.8-27.8S88,50.7,88,66.1S75.6,93.9,60.2,93.9z\n M60.2,41.6c-13.5,0-24.4,11-24.4,24.4c0,13.5,11,24.4,24.4,24.4c13.5,0,24.4-11,24.4-24.4C84.7,52.6,73.7,41.6,60.2,41.6z\"\n />\n </g>\n <g>\n <path\n className={classes.st1}\n d=\"M40,98.2c-0.3,0-0.7-0.1-0.9-0.3c-0.8-0.5-1-1.6-0.4-2.3l3.2-4.7c0.5-0.8,1.6-1,2.3-0.4\n c0.8,0.5,1,1.6,0.4,2.3l-3.2,4.7C41,97.9,40.5,98.2,40,98.2z\"\n />\n </g>\n <g>\n <path\n className={classes.st1}\n d=\"M75.2,46.3c-0.3,0-0.7-0.1-0.9-0.3c-0.8-0.5-1-1.6-0.4-2.3l1.2-1.8c0.5-0.8,1.6-1,2.3-0.4\n c0.8,0.5,1,1.6,0.4,2.3l-1.2,1.8C76.3,46.1,75.8,46.3,75.2,46.3z\"\n />\n </g>\n <g>\n <path\n className={classes.st1}\n d=\"M84.3,32.9c-0.3,0-0.7-0.1-0.9-0.3c-0.8-0.5-1-1.6-0.4-2.3l1.6-2.3c0.5-0.8,1.6-1,2.3-0.4\n c0.8,0.5,1,1.6,0.4,2.3l-1.6,2.3C85.4,32.7,84.9,32.9,84.3,32.9z\"\n />\n </g>\n <g>\n <path\n className={classes.st1}\n d=\"M87.6,49.6L87.6,49.6c-0.6,0-1.1-0.3-1.4-0.7c-2.2-3.3-4.9-6.1-8.1-8.3c-3.1-2.2-6.5-3.7-10.2-4.6\n c-0.5-0.1-1-0.5-1.2-1.1c-0.2-0.5-0.1-1.1,0.2-1.6c2.5-3.5,6.6-5.6,11-5.6c7.4,0,13.5,6.1,13.5,13.5c0,2.8-0.8,5.4-2.4,7.7\n C88.6,49.3,88.1,49.6,87.6,49.6z M71.4,33.4c3,1,5.9,2.5,8.6,4.4c2.8,2,5.3,4.3,7.4,7c0.4-1.1,0.7-2.3,0.7-3.6\n C88,35.5,83.5,31,77.9,31C75.5,31,73.2,31.9,71.4,33.4z\"\n />\n </g>\n <g>\n <path\n className={classes.st1}\n d=\"M80,98.2c-0.5,0-1.1-0.3-1.4-0.7l-3.2-4.7c-0.5-0.8-0.3-1.8,0.4-2.3c0.8-0.5,1.8-0.3,2.3,0.4l3.2,4.7\n c0.5,0.8,0.3,1.8-0.4,2.3C80.7,98.1,80.3,98.2,80,98.2z\"\n />\n </g>\n <g>\n <path\n className={classes.st1}\n d=\"M44.8,46.3c-0.5,0-1.1-0.3-1.4-0.7l-1.2-1.8c-0.5-0.8-0.3-1.8,0.4-2.3c0.8-0.5,1.8-0.3,2.3,0.4l1.2,1.8\n c0.5,0.8,0.3,1.8-0.4,2.3C45.4,46.3,45.1,46.3,44.8,46.3z\"\n />\n </g>\n <g>\n <path\n className={classes.st1}\n d=\"M35.7,32.9c-0.5,0-1.1-0.3-1.4-0.7l-1.6-2.3c-0.5-0.8-0.3-1.8,0.4-2.3c0.8-0.5,1.8-0.3,2.3,0.4l1.6,2.3\n c0.5,0.8,0.3,1.8-0.4,2.3C36.3,32.8,36,32.9,35.7,32.9z\"\n />\n </g>\n <g>\n <path\n className={classes.st1}\n d=\"M32.4,49.6c-0.5,0-1.1-0.3-1.4-0.7c-1.6-2.3-2.4-4.9-2.4-7.7c0-7.4,6.1-13.5,13.5-13.5c4.3,0,8.4,2.1,11,5.6\n c0.3,0.5,0.4,1,0.2,1.6c-0.2,0.5-0.6,0.9-1.2,1.1c-3.6,0.9-7.1,2.5-10.2,4.6c-3.2,2.3-6,5.1-8.1,8.3C33.5,49.3,33,49.6,32.4,49.6\n L32.4,49.6z M42.1,31C36.5,31,32,35.5,32,41.1c0,1.2,0.2,2.5,0.7,3.6c2.1-2.7,4.6-5,7.4-7c2.7-1.9,5.5-3.3,8.6-4.4\n C46.8,31.9,44.5,31,42.1,31z\"\n />\n </g>\n </g>\n <g>\n <path\n className={classes.st5}\n d=\"M60.6,70.5c-0.5,0-1-0.2-1.3-0.6L48.7,56.7c-0.6-0.7-0.5-1.8,0.3-2.4c0.7-0.6,1.8-0.5,2.4,0.3L61,66.5\n l6.6-4.8c0.7-0.5,1.8-0.4,2.4,0.4c0.5,0.7,0.4,1.8-0.4,2.4l-7.9,5.7C61.3,70.4,61,70.5,60.6,70.5z\"\n />\n </g>\n </g>\n </SvgIcon>\n );\n}\n\nUnstyledTimescaleDBIcon.propTypes = propTypes;\n\nconst styles = (theme) => ({\n circleStyle: {\n fillRule: 'evenodd',\n clipRule: 'evenodd',\n fill: theme.customColors.teal,\n stroke: theme.customColors.teal,\n },\n searchStyle: {\n fill: theme.customColors.white,\n stroke: theme.customColors.teal,\n },\n st0: {\n fill: theme.customColors.white,\n stroke: theme.customColors.teal,\n strokeWidth: 7,\n },\n st1: {\n fill: theme.customColors.teal,\n stroke: theme.customColors.teal,\n strokeWidth: 0.1309,\n strokeMiterlimit: 10,\n },\n st2: {\n fill: theme.customColors.teal,\n stroke: theme.customColors.teal,\n strokeWidth: 0.1309,\n strokeMiterlimit: 10.0002,\n },\n st3: {\n fill: theme.customColors.teal,\n stroke: theme.customColors.teal,\n strokeWidth: 0.1309,\n strokeMiterlimit: 9.9997,\n },\n st4: {\n fill: theme.customColors.teal,\n stroke: theme.customColors.teal,\n strokeWidth: 0.1309,\n strokeMiterlimit: 10.0001,\n },\n st5: { fill: theme.customColors.white },\n});\n\nexport default withStyles(styles)(UnstyledTimescaleDBIcon);\n","/**\n * SVG Default icon\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport SvgIcon from '@material-ui/core/SvgIcon';\n\nconst propTypes = {\n classes: PropTypes.shape({\n styleOne: PropTypes.string.isRequired,\n styleTwo: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nexport function UnstyledDefaultIcon({ ...props }) {\n const { classes, ...additionalProps } = props;\n const { styleOne } = classes;\n return (\n <SvgIcon viewBox=\"0 0 25 28.1\" {...additionalProps}>\n <g>\n <polygon\n id=\"Polygon\"\n className={styleOne}\n points=\"12.5,0.6 24.5,7.3 24.5,20.8 12.5,27.6 0.5,20.8 0.5,7.3\"\n />\n </g>\n </SvgIcon>\n );\n}\n\nUnstyledDefaultIcon.propTypes = propTypes;\n\nconst styles = () => ({\n styleOne: {\n fillRule: 'evenodd',\n clipRule: 'evenodd',\n fill: '#F2F2F0',\n stroke: '#3C9BA0',\n },\n styleTwo: {\n fillRule: 'evenodd',\n clipRule: 'evenodd',\n fill: '#3C9BA0',\n },\n});\n\nexport default withStyles(styles)(UnstyledDefaultIcon);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport Badge from '@material-ui/core/Badge';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport classnames from 'classnames';\n\nimport MongoDBIcon from './MongoDBIcon/MongoDBIcon';\nimport RedisIcon from './RedisIcon/RedisIcon';\nimport ElasticsearchIcon from './ElasticsearchIcon/ElasticsearchIcon';\nimport PostgreSQLIcon from './PostgreSQLIcon/PostgreSQLIcon';\nimport CockroachDBIcon from './CockroachDBIcon/CockroachDBIcon';\nimport TimescaleDBIcon from './TimescaleDBIcon/TimescaleDBIcon';\nimport DefaultIcon from './DefaultIcon/DefaultIcon';\n\nconst IconMap = {\n mongodb: MongoDBIcon,\n redis: RedisIcon,\n elasticsearch: ElasticsearchIcon,\n postgresql: PostgreSQLIcon,\n cockroachdb: CockroachDBIcon,\n timescaledb: TimescaleDBIcon,\n};\n\nconst propTypes = {\n service: PropTypes.string.isRequired,\n className: PropTypes.string,\n classes: PropTypes.shape({}).isRequired,\n badgeClass: PropTypes.string,\n isAlpha: PropTypes.bool,\n status: PropTypes.string,\n};\n\nconst defaultProps = {\n className: null,\n badgeClass: null,\n isAlpha: false,\n status: null,\n};\n\nexport function UnstyledServiceIcon({\n service,\n className,\n classes,\n badgeClass,\n isAlpha,\n status,\n ...props\n}) {\n const Icon = IconMap[service.toLowerCase()] || DefaultIcon;\n\n if (status && status !== 'Failed' && status !== 'Ready') {\n return (\n <Tooltip placement=\"top-start\" classes={{ tooltip: classes.tooltipText }} title={status}>\n <Badge\n badgeContent=\"!\"\n classes={{ badge: classnames([classes.buildingBadge, badgeClass]) }}\n >\n <Icon className={className} {...props} />\n </Badge>\n </Tooltip>\n );\n }\n\n if (status === 'Failed') {\n return (\n <Tooltip placement=\"top-start\" classes={{ tooltip: classes.tooltipText }} title=\"Failed\">\n <Badge badgeContent=\"!\" classes={{ badge: classnames([classes.failedBadge, badgeClass]) }}>\n <Icon className={className} {...props} />\n </Badge>\n </Tooltip>\n );\n }\n\n return <Icon className={className} {...props} />;\n}\n\nUnstyledServiceIcon.propTypes = propTypes;\nUnstyledServiceIcon.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n badge: {\n fontSize: 'unset',\n fontWeight: 'bold',\n },\n buildingBadge: {\n color: theme.customColors.white,\n fontSize: 'unset',\n fontWeight: 'bold',\n backgroundColor: theme.customColors.burntYellow,\n },\n failedBadge: {\n color: theme.customColors.white,\n fontSize: 'unset',\n fontWeight: 'bold',\n backgroundColor: theme.customColors.red,\n },\n tooltipText: {\n marginBottom: theme.spacing(1.5),\n marginLeft: theme.spacing(2.5),\n fontSize: '.857rem',\n backgroundColor: theme.customColors.mediumGrey,\n },\n});\n\nexport default withStyles(styles)(UnstyledServiceIcon);\n","export default ['Elasticsearch', 'PostgreSQL', 'CockroachDB', 'TimescaleDB', 'MongoDB'];\n","export default ['CockroachDB', 'MongoDB'];\n","import { darkTheme } from 'components/App/App.theme';\n\nexport const PIECHART_COLORS = [\n darkTheme.customColors.peas,\n darkTheme.customColors.sky,\n darkTheme.customColors.peach,\n darkTheme.customColors.khaki,\n darkTheme.customColors.yellow,\n darkTheme.customColors.darkPurple,\n darkTheme.customColors.lightGreen,\n darkTheme.customColors.magenta,\n darkTheme.customColors.red,\n darkTheme.customColors.darkBrown,\n];\n\nexport const freeSpaceColor = darkTheme.customColors.lightGrey;\n\nexport function getPieChartColor(index) {\n return PIECHART_COLORS[index % PIECHART_COLORS.length];\n}\n\nexport default PIECHART_COLORS;\n","export const bytesToGB = (num) => num / (1024 * 1024 * 1024);\nexport const toPercentage = (part, whole) => (part / whole) * 100;\n\nexport default { bytesToGB, toPercentage };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles, makeStyles } from '@material-ui/styles';\nimport LinearProgress from '@material-ui/core/LinearProgress';\n\nconst makeBarStyles = makeStyles({\n bar: { backgroundColor: (props) => props.backgroundColor },\n});\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n variant: PropTypes.string.isRequired,\n value: PropTypes.number.isRequired,\n barBackgroundColor: PropTypes.string.isRequired,\n};\n\nexport function UnstyledNodeLinearProgress({ classes, variant, value, barBackgroundColor }) {\n const barStyle = makeBarStyles({ backgroundColor: barBackgroundColor }).bar;\n return (\n <LinearProgress\n variant={variant}\n value={value}\n classes={{\n root: classes.linearBarRoot,\n bar: barStyle,\n }}\n />\n );\n}\n\nUnstyledNodeLinearProgress.propTypes = propTypes;\n\nconst styles = (theme) => ({\n linearBarRoot: {\n backgroundColor: theme.customColors.lightGrey,\n },\n});\n\nexport default withStyles(styles)(UnstyledNodeLinearProgress);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\n\nimport { getPieChartColor } from 'constants/pieChartColors';\nimport { bytesToGB, toPercentage } from 'services/conversions';\nimport NodeLinearProgress from './NodeLinearProgress/NodeLinearProgress';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n nodes: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n};\n\nexport function UnstyledORSpaceUsageLegend({ nodes, classes }) {\n const legendBars = nodes.map((node, index) => (\n <div key={node.nodeid} className={classes.nodeLegend}>\n <div className={classes.nameAndUsage}>\n <div className={classes.nodeName}>{node.name}</div>\n\n <div className={classes.nodeUsage}>\n {bytesToGB(node.spaceUsed).toFixed(2)}\n GB of {bytesToGB(node.spaceTotal).toFixed(2)}\n GB\n </div>\n </div>\n <NodeLinearProgress\n variant=\"determinate\"\n value={toPercentage(node.spaceUsed, node.spaceTotal)}\n barBackgroundColor={getPieChartColor(index)}\n />\n </div>\n ));\n return <React.Fragment>{legendBars}</React.Fragment>;\n}\n\nUnstyledORSpaceUsageLegend.propTypes = propTypes;\n\nconst styles = (theme) => ({\n nodeLegend: {\n marginTop: theme.spacing(1),\n },\n nameAndUsage: {\n display: 'flex',\n justifyContent: 'space-between',\n },\n nodeUsage: {\n color: theme.customColors.mediumGrey,\n },\n});\n\nexport default withStyles(styles)(UnstyledORSpaceUsageLegend);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { ResponsivePie } from '@nivo/pie';\nimport { withStyles } from '@material-ui/styles';\n\nimport { freeSpaceColor, getPieChartColor } from 'constants/pieChartColors';\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport { bytesToGB, toPercentage } from 'services/conversions';\nimport ORSpaceUsageLegend from './ORSpaceUsageLegend/ORSpaceUsageLegend';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n spaceUsage: PropTypes.shape({\n sampleTime: PropTypes.number,\n spaceTotal: PropTypes.number,\n spaceAvailable: PropTypes.number,\n spaceUsed: PropTypes.number,\n nodes: PropTypes.arrayOf(\n PropTypes.shape({\n spaceAvailable: PropTypes.number,\n spaceTotal: PropTypes.number,\n }),\n ),\n }),\n instanceIsReady: PropTypes.bool,\n instanceService: PropTypes.string.isRequired,\n};\n\nconst defaultProps = {\n spaceUsage: {},\n instanceIsReady: true,\n};\n\nexport function UnstyledORSpaceUsage({ spaceUsage, instanceIsReady, instanceService, classes }) {\n if (!instanceIsReady || Object.keys(spaceUsage).length === 0 || spaceUsage.nodes.length === 0) {\n return (\n <img\n className={classes.placeHolderImage}\n src=\"/images/stats/nostats.png\"\n alt=\"Stats will go here when available\"\n />\n );\n }\n\n const { spaceTotal, spaceUsed, spaceAvailable, nodes } = spaceUsage;\n\n // If we have have more services where the total space is based on a single node rather than all\n // nodes added together, add it here.\n const isReplicatedService = ['MongoDB'].includes(instanceService);\n\n const serviceSpaceAvailable = isReplicatedService ? nodes[0].spaceAvailable : spaceAvailable;\n\n const freeSpace = {\n id: 'available',\n label: 'available',\n value: parseFloat(bytesToGB(serviceSpaceAvailable).toFixed(2)),\n color: freeSpaceColor,\n };\n\n const nodeData = nodes.map((node, index) => ({\n id: node.name,\n label: node.name,\n value: parseFloat(bytesToGB(node.spaceUsed).toFixed(2)),\n color: getPieChartColor(index),\n }));\n\n const serviceNodeData = isReplicatedService ? nodeData.slice(0, 1) : nodeData;\n\n const nodeDataAndFreeSpace = [...serviceNodeData, freeSpace];\n\n const serviceTotal = isReplicatedService ? nodes[0].spaceTotal : spaceTotal;\n\n return (\n <div className={classes.usageContainer}>\n <div className={classes.pieContainer}>\n <div className={classes.usageText}>\n <ORTypography>Usage Details</ORTypography>\n <ORTypography className={classes.usedOutOfTotal}>\n <span className={classes.spaceUsed}>{bytesToGB(spaceUsed).toFixed(2)}</span>\n GB\n <br />\n <span className={classes.spaceTotal}>\n of {bytesToGB(serviceTotal).toFixed(2)}\n GB\n </span>\n </ORTypography>\n </div>\n\n <div className={classes.pie}>\n <ResponsivePie\n data={nodeDataAndFreeSpace}\n enableRadialLabels={false}\n innerRadius={0.85}\n enableSlicesLabels={false}\n colors={{ datum: 'color' }}\n />\n <div className={classes.percentUsed}>\n <span className={classes.percent}>\n {toPercentage(spaceUsed, serviceTotal).toFixed(2)}%\n </span>\n <br />\n <span className={classes.used}>USED</span>\n </div>\n </div>\n </div>\n <div className={classes.legendContainer}>\n <ORSpaceUsageLegend nodes={nodes} />\n </div>\n </div>\n );\n}\n\nUnstyledORSpaceUsage.propTypes = propTypes;\nUnstyledORSpaceUsage.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n placeHolderImage: {\n maxWidth: '100%',\n maxHeight: 300,\n },\n usageContainer: {\n border: `1px solid ${theme.customColors.lightGrey}`,\n borderRadius: 5,\n display: 'flex',\n flexDirection: 'column',\n padding: theme.spacing(1),\n height: '100%',\n },\n pieContainer: {\n display: 'flex',\n justifyContent: 'space-between',\n },\n pie: {\n height: 150,\n width: 150,\n position: 'relative',\n },\n usedOutOfTotal: {\n color: theme.customColors.mediumGrey,\n marginTop: theme.spacing(2),\n },\n spaceUsed: {\n fontSize: '2rem',\n color: theme.palette.text.primary,\n },\n spaceTotal: {\n fontSize: '.9rem',\n },\n percentUsed: {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n textAlign: 'center',\n lineHeight: '1.2em',\n },\n percent: {\n fontSize: '1.4rem',\n },\n used: {\n color: theme.customColors.mediumGrey,\n fontSize: '.8rem',\n },\n legendContainer: {\n overflowY: 'scroll',\n maxHeight: '12.5rem',\n paddingRight: theme.spacing(1),\n marginRight: -theme.spacing(1),\n },\n});\n\nexport default withStyles(styles)(UnstyledORSpaceUsage);\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\n\nimport {\n OWNER,\n ADMIN,\n METRICS,\n READONLY,\n OR_ADMIN,\n OR_READONLY,\n OR_SUPERUSER,\n OR_SUPERREAD,\n} from 'constants/roles';\nimport roleDisabled from 'services/roleDisabled/index';\nimport { selectors, actionCreators } from 'dux/instances';\nimport ORSpaceUsage from './ORSpaceUsage';\n\nconst propTypes = {\n instanceId: PropTypes.string.isRequired,\n getSpaceUsage: PropTypes.func.isRequired,\n spaceUsage: PropTypes.shape({}),\n instanceIsReady: PropTypes.bool.isRequired,\n userRoles: PropTypes.arrayOf(PropTypes.string).isRequired,\n};\n\nconst defaultProps = {\n spaceUsage: {},\n};\n\nconst allowedAccess = [\n OWNER,\n ADMIN,\n METRICS,\n READONLY,\n OR_ADMIN,\n OR_READONLY,\n OR_SUPERUSER,\n OR_SUPERREAD,\n];\n\nclass ORSpaceUsageContainer extends React.Component {\n componentDidMount() {\n const { instanceId, getSpaceUsage, instanceIsReady, userRoles } = this.props;\n if (instanceIsReady && !roleDisabled(userRoles, allowedAccess)) {\n getSpaceUsage(instanceId);\n }\n }\n\n render() {\n return <ORSpaceUsage {...this.props} />;\n }\n}\n\nORSpaceUsageContainer.propTypes = propTypes;\nORSpaceUsageContainer.defaultProps = defaultProps;\n\nfunction mapStateToProps(state, ownProps) {\n const { instanceId } = ownProps;\n return {\n spaceUsage: selectors.getInstanceSpaceUsage(state)(instanceId),\n instanceService: selectors.instanceServiceSelector(state, ownProps),\n };\n}\n\nconst mapDispatchToProps = {\n getSpaceUsage: actionCreators.getSpaceUsage,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ORSpaceUsageContainer);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport startCase from 'lodash/startCase';\n\nimport ORTypography from 'components/ORTypography/ORTypography';\n\nconst propTypes = {\n features: PropTypes.shape({\n addons: PropTypes.shape({}),\n }).isRequired,\n};\n\nconst addOnMap = {\n replicasForHa: 'Replicas for HA',\n};\n\nexport function UnstyledFeaturesList({ features }) {\n if (!Object.prototype.hasOwnProperty.call(features, 'addons')) {\n return null;\n }\n\n const { addons } = features;\n\n const addonsList = Object.keys(addons).map((addon) => (\n <li key={addon}>\n <ORTypography variant=\"subtitle1\">\n {addOnMap[addon] ? addOnMap[addon] : startCase(addon)}: {addons[addon].toString()}\n </ORTypography>\n </li>\n ));\n\n return <React.Fragment>{addonsList}</React.Fragment>;\n}\n\nUnstyledFeaturesList.propTypes = propTypes;\n\nexport default UnstyledFeaturesList;\n","export const handleClickAway = (event, anchor, callback) => {\n if (anchor !== event.target && !anchor.contains(event.target)) {\n callback();\n }\n return null;\n};\n\nexport default handleClickAway;\n","const ACL_KINDS = {\n 1: { kind: 1, label: 'Default', service: 'Redis' },\n 2: { kind: 2, label: 'Elasticsearch', service: 'Elasticsearch' },\n 4: { kind: 4, label: 'Kibana', service: 'Elasticsearch' },\n 5: { kind: 5, label: 'Cerebro', service: 'Elasticsearch' },\n 6: { kind: 6, label: 'CockroachDB', service: 'CockroachDB' },\n 7: { kind: 7, label: 'CockroachDB Admin UI', service: 'CockroachDB' },\n 8: { kind: 8, label: 'PostgreSQL Master', service: 'PostgreSQL' },\n 9: { kind: 9, label: 'PostgreSQL Replica', service: 'PostgreSQL' },\n 10: { kind: 10, label: 'TimescaleDB Master', service: 'TimescaleDB' },\n 11: { kind: 11, label: 'TimescaleDB Replica', service: 'TimescaleDB' },\n};\n\nexport default ACL_KINDS;\n","/**\n * Service for normalizing form-related fields\n */\n\n/**\n * Forces form input to adhere to IPV4 / cidr construction standards\n *\n * @param {string} value - value to coerce\n * @returns {string} - returns new value\n */\nexport function normalizeCidr(value) {\n return value.replace(/[^0-9./]/, '');\n}\n\nexport default {\n normalizeCidr,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport Done from '@material-ui/icons/Done';\n\nimport roleDisabled from 'services/roleDisabled/index';\nimport BusyButton from 'components/BusyButton/BusyButton';\n\nconst propTypes = {\n userAccess: PropTypes.arrayOf(PropTypes.string).isRequired,\n allowedAccess: PropTypes.arrayOf(PropTypes.string).isRequired,\n submitting: PropTypes.bool.isRequired,\n disabled: PropTypes.bool.isRequired,\n classes: PropTypes.shape({}).isRequired,\n};\n\nexport function UnstyledRBACSubmitButton({\n userAccess,\n allowedAccess,\n submitting,\n disabled,\n classes,\n}) {\n const theButton = (buttonDisabled) => (\n <BusyButton\n loading={submitting}\n disabled={buttonDisabled}\n name=\"submit\"\n type=\"submit\"\n variant=\"fab\"\n color=\"primary\"\n size=\"small\"\n className={classes.addButton}\n mini\n >\n <Done fontSize=\"large\" />\n </BusyButton>\n );\n return roleDisabled(userAccess, allowedAccess) ? (\n <Tooltip title=\"You do not have the required access for this resource. Contact your organization owner.\">\n <span>{theButton(true)}</span>\n </Tooltip>\n ) : (\n theButton(disabled)\n );\n}\n\nconst styles = (theme) => ({\n addButton: {\n margin: theme.spacing(2),\n },\n});\n\nUnstyledRBACSubmitButton.propTypes = propTypes;\n\nexport default withStyles(styles)(UnstyledRBACSubmitButton);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport Chip from '@material-ui/core/Chip';\nimport Icon from '@material-ui/core/Icon';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport classnames from 'classnames';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n isSelected: PropTypes.bool.isRequired,\n isORv4: PropTypes.bool,\n};\n\nconst defaultProps = {\n isORv4: false,\n};\n\nexport function UnstyledRocketChip({ classes, label, onClick, isSelected, isORv4, ...rest }) {\n let icon = <React.Fragment> </React.Fragment>;\n if (isORv4) {\n icon = <Icon>open_in_new</Icon>;\n } else if (isSelected) {\n icon = <Icon>done</Icon>;\n }\n\n const theChip = (\n <Chip\n variant={isORv4 ? 'outlined' : 'default'}\n label={label}\n onClick={onClick}\n onDelete={onClick}\n deleteIcon={icon}\n className={classnames(\n classes.chip,\n isSelected ? classes.chipSelected : null,\n isORv4 ? classes.orv4Chip : null,\n )}\n classes={{\n root: classes.chipRoot,\n label: isSelected || isORv4 ? null : classes.chipUnselectedLabel,\n icon: classes.chipIcon,\n deleteIcon: classes.chipDeleteIcon,\n }}\n {...rest}\n />\n );\n\n if (isORv4) {\n return <Tooltip title=\"Exit to app.objectrocket.com\">{theChip}</Tooltip>;\n }\n return theChip;\n}\n\nUnstyledRocketChip.propTypes = propTypes;\nUnstyledRocketChip.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n chip: {\n justifyContent: 'space-between',\n backgroundColor: theme.customColors.lightGrey,\n marginTop: theme.spacing(1),\n '&:not(:last-child)': {\n marginRight: theme.spacing(1),\n },\n '&:hover': {\n backgroundColor: 'theme.customColors.lightGrey',\n },\n '&:active, &:focus': {\n backgroundColor: theme.customColors.peach,\n },\n\n [theme.breakpoints.down('xs')]: {\n width: '100%',\n },\n },\n orv4Chip: {\n backgroundColor: theme.customColors.white,\n borderColor: theme.customColors.darkGrey,\n\n '&:active, &:focus': {\n backgroundColor: `${theme.customColors.white} !important`,\n },\n },\n chipSelected: {\n backgroundColor: theme.customColors.peach,\n },\n chipContainer: {\n display: 'flex',\n flexWrap: 'wrap',\n width: '90%',\n marginTop: `-${theme.spacing(1)}px`,\n\n [theme.breakpoints.down('xs')]: {\n width: '100%',\n flexDirection: 'column',\n marginTop: theme.spacing(0.5),\n },\n },\n chipUnselectedLabel: {\n paddingRight: theme.spacing(5.6),\n },\n chipRoot: {\n marginTop: theme.spacing(1),\n justifyContent: 'space-between',\n '&:not(:last-child)': {\n marginRight: theme.spacing(1),\n },\n\n [theme.breakpoints.down('xs')]: {\n '&:not(:last-child)': {\n marginRight: 0,\n marginBottom: theme.spacing(1),\n },\n flex: 'unset',\n minWidth: 'unset',\n maxWidth: 'unset',\n marginTop: 0,\n },\n },\n chipIcon: {\n backgroundColor: theme.customColors.teal,\n padding: '2px',\n borderRadius: '50%',\n },\n chipDeleteIcon: {\n color: theme.customColors.teal,\n marginLeft: theme.spacing(1),\n },\n});\n\nexport default withStyles(styles)(UnstyledRocketChip);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport MorePropTypes from 'airbnb-prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport Button from '@material-ui/core/Button';\nimport Close from '@material-ui/icons/Close';\nimport Fab from '@material-ui/core/Fab';\nimport { Field, reduxForm, SubmissionError } from 'redux-form';\nimport { uiState } from 'react-redux-ui-state';\nimport classnames from 'classnames';\n\nimport WrappedTextField from 'components/WrappedTextField/WrappedTextField';\nimport ACL_KINDS from 'constants/aclKinds';\nimport { required, validateCidr, aclItemUnique, maxLength } from 'services/validationMsgs';\nimport { normalizeCidr } from 'services/normalizer';\nimport RBACSubmitButton from 'components/RBACWrapper/RBACSubmitButton/RBACSubmitButton';\nimport { OWNER, ADMIN, OR_ADMIN, OR_SUPERUSER } from 'constants/roles';\nimport RocketChip from '../MissionCtrl/RocketChip/RocketChip';\nimport ORTypography from '../ORTypography/ORTypography';\n\n/**\n * Appropriate throw an error with the relevant validation errors if necessary\n *\n * @param {result} value - Result of the form submission\n * @throws {error} - Throws SubmissionError if any errors were returned\n */\nconst handleFormSubmissionReturn = (result) => {\n if (result.error) {\n throw new SubmissionError(result.formErrors);\n }\n};\n\nconst propTypes = {\n classes: PropTypes.shape({\n root: PropTypes.string.isRequired,\n addButton: PropTypes.string.isRequired,\n aclButton: PropTypes.string.isRequired,\n formStatus: PropTypes.string.isRequired,\n kindContainer: PropTypes.string.isRequired,\n fieldContainer: PropTypes.string.isRequired,\n buttonContainer: PropTypes.string.isRequired,\n chipContainer: PropTypes.string.isRequired,\n }).isRequired,\n newInstanceAcls: PropTypes.instanceOf(Array), // eslint-disable-line react/no-unused-prop-types\n selectedKind: PropTypes.number.isRequired,\n defaultSelectedKind: PropTypes.bool.isRequired,\n setUiState: PropTypes.func.isRequired,\n instanceService: PropTypes.string.isRequired,\n instanceId: PropTypes.string.isRequired,\n handleSubmit: PropTypes.func.isRequired,\n submitSucceeded: PropTypes.bool.isRequired,\n submitting: PropTypes.bool.isRequired,\n addInstanceAcl: PropTypes.func.isRequired,\n getIp: PropTypes.func.isRequired,\n getIpClear: PropTypes.func.isRequired,\n myip: PropTypes.string,\n error: PropTypes.string,\n change: PropTypes.func.isRequired,\n touch: PropTypes.func.isRequired,\n pristine: PropTypes.bool.isRequired,\n valid: PropTypes.bool.isRequired,\n closePopout: MorePropTypes.or([MorePropTypes.explicitNull, PropTypes.func]),\n userRoles: PropTypes.arrayOf(PropTypes.string).isRequired,\n formType: PropTypes.string,\n reset: PropTypes.func.isRequired,\n};\n\nconst defaultProps = {\n newInstanceAcls: [],\n error: null,\n closePopout: null,\n myip: null,\n formType: '',\n};\n\nconst maxLength128 = maxLength(128);\n\n/**\n * Wrapper function for the redux-form aclUniqueItem validation\n *\n * @param {string} value - value of field with validation\n * @param {string} formValues - values of all fields in the form\n * @param {object} props - component props\n * @returns {undefined || string} - Returns undefined if no error, message\n * if there is an error\n */\nexport function aclItemUniqueValidation(value, formValues, props) {\n const payload = {\n cidr: formValues.cidr,\n name: formValues.name,\n kind: props.selectedKind,\n };\n return aclItemUnique(null, null, { newAcl: payload, newInstanceAcls: props.newInstanceAcls });\n}\n\n/**\n * Checks to see if there are any kinds compatible with the selected instance service\n *\n * @param {result} value - Result of the form submission\n * @returns {boolean} - Returns true if there is at least one compatible kind\n */\nconst serviceCompatibleAcl = (instanceService) => {\n let match = false;\n Object.values(ACL_KINDS).forEach((value) => {\n if (value.service === instanceService) {\n match = true;\n }\n });\n return match;\n};\n\nexport function UnstyledAclForm({\n classes,\n selectedKind,\n defaultSelectedKind,\n setUiState,\n instanceService,\n instanceId,\n handleSubmit,\n submitSucceeded,\n submitting,\n addInstanceAcl,\n error,\n change,\n touch,\n pristine,\n valid,\n getIp,\n getIpClear,\n myip,\n closePopout,\n userRoles,\n formType,\n reset,\n}) {\n /**\n * Fills 0.0.0.0/0 into cidr form field\n *\n */\n const handleAnyIpClick = () => {\n const ipWildcard = '0.0.0.0/0';\n change('cidr', ipWildcard);\n touch('cidr');\n change('name', 'Allow All');\n touch('name');\n };\n\n /**\n * Selects an ACL kind (role) by setting it to a prop.\n *\n * @param {string} kind - Accepts the kind you would like to select\n */\n const handleKindClick = (event, name, kind) => {\n change(name, kind);\n setUiState({\n selectedKind: kind,\n });\n };\n\n /**\n * Submission handler called when the form is executed. Checks\n * for ACL uniqueness.\n *\n * @param {object} data - data posted from the aclPopoutItem form\n * @throws {error} - Throws SubmissionError if ACL is unique.\n */\n const submitHandler = (data) =>\n addInstanceAcl(instanceId, instanceService, data).then(handleFormSubmissionReturn);\n\n if (submitSucceeded && closePopout) {\n closePopout();\n }\n\n const errorElm = error ? (\n <ORTypography color=\"error\" className={classes.formStatus}>\n {error}\n </ORTypography>\n ) : null;\n\n const aclTitle = serviceCompatibleAcl(instanceService) ? (\n <ORTypography component=\"p\" className={classes.roleTextBlurb}>\n Set a Role for the IP:\n </ORTypography>\n ) : null;\n\n if (!defaultSelectedKind) {\n const aclKinds = Object.values(ACL_KINDS);\n const defaultChip = aclKinds.find((el) => el.service === instanceService && el.label);\n\n if (defaultChip) {\n setUiState({\n selectedKind: defaultChip.kind,\n defaultSelectedKind: true,\n });\n change('kind', defaultChip.kind);\n }\n }\n\n const aclKindChips = Object.keys(ACL_KINDS)\n .sort()\n .map((key) => {\n const el = ACL_KINDS[key];\n if (el.service === instanceService && ACL_KINDS[key].label) {\n return (\n <RocketChip\n key={el.kind}\n label={el.label}\n onClick={(event) => handleKindClick(event, 'kind', el.kind)}\n isSelected={el.kind === selectedKind}\n clickable\n />\n );\n }\n return null;\n });\n\n if (myip) {\n change('cidr', myip);\n touch('cidr');\n getIpClear();\n change('name', 'My IP');\n touch('name');\n }\n\n return (\n <form onSubmit={handleSubmit(submitHandler)}>\n <div className={classes.buttonContainer}>\n <Button\n hover-override=\"green\"\n className={classes.aclButton}\n onClick={handleAnyIpClick}\n value=\"0.0.0.0/0\"\n variant=\"contained\"\n >\n AllOW ANY IP\n </Button>\n <ORTypography align=\"center\" variant=\"subtitle1\" className={classes.ORText}>\n -OR-\n </ORTypography>\n <Button\n name=\"useMyIP\"\n hover-override=\"green\"\n className={classes.myIPButton}\n onClick={(event) => getIp(event)}\n variant=\"contained\"\n >\n USE MY IP\n </Button>\n </div>\n <div className={classes.fieldContainer}>\n <Field\n name=\"cidr\"\n label=\"Cidr\"\n variant=\"outlined\"\n placeholder=\"#.#.#.#/#\"\n component={WrappedTextField}\n className={classes.aclInput}\n validate={[aclItemUniqueValidation, validateCidr, required]}\n normalize={normalizeCidr}\n props={{ InputLabelProps: { shrink: true, className: classes.inputLabel } }}\n fullWidth\n />\n <Field\n name=\"name\"\n label=\"Description\"\n variant=\"outlined\"\n placeholder=\"Home Office\"\n component={WrappedTextField}\n className={classnames(classes.aclInput, classes.descInput)}\n props={{ InputLabelProps: { shrink: true, className: classes.inputLabel } }}\n validate={[maxLength128, required]}\n fullWidth\n />\n </div>\n <div className={classes.kindContainer}>\n {aclTitle}\n <div className={classes.chipContainer}>{aclKindChips}</div>\n {errorElm}\n <div\n className={\n formType !== 'embedded'\n ? classes.addButtonContainer\n : classes.embeddedAddButtonContainer\n }\n >\n {formType === 'embedded' && (\n <Fab\n size=\"small\"\n color=\"secondary\"\n className={classes.cancelButton}\n onClick={() => reset()}\n >\n <Close fontSize=\"large\" />\n </Fab>\n )}\n <RBACSubmitButton\n userAccess={userRoles}\n allowedAccess={[OWNER, ADMIN, OR_ADMIN, OR_SUPERUSER]}\n submitting={submitting}\n disabled={!valid || pristine}\n />\n </div>\n </div>\n </form>\n );\n}\n\nUnstyledAclForm.propTypes = propTypes;\nUnstyledAclForm.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n root: {\n zIndex: '1300',\n maxWidth: '100%',\n display: 'flex',\n },\n addButton: {\n margin: theme.spacing(2),\n },\n addButtonContainer: {\n width: '100%',\n display: 'flex',\n justifyContent: 'flex-end',\n },\n embeddedAddButtonContainer: {\n width: '100%',\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n },\n cancelButton: {\n margin: theme.spacing(2),\n },\n addButtonLabel: {\n flexGrow: 3,\n },\n aclButton: {\n color: 'white',\n backgroundColor: theme.customColors.green,\n margin: '1rem 0 1rem 1rem',\n flex: '1 1 45%',\n },\n aclInput: {\n [theme.breakpoints.down('sm')]: {\n '& input': {\n fontSize: '4.5vw',\n },\n },\n },\n descInput: {\n marginTop: theme.spacing(2),\n },\n inputLabel: {\n color: theme.palette.text.primary,\n },\n formStatus: {\n margin: `${theme.spacing(2)}px auto auto auto`,\n fontSize: '.8rem',\n fontStyle: 'italic, Roboto Regular',\n maxWidth: '300px',\n },\n kindContainer: {\n textAlign: 'left',\n },\n fieldContainer: {\n margin: theme.spacing(1),\n '& input': {\n textAlign: 'center',\n },\n },\n buttonContainer: {\n display: 'flex',\n flexWrap: 'nowrap',\n alignItems: 'center',\n [theme.breakpoints.down('sm')]: {\n width: '100%',\n minWidth: 'unset',\n maxWidth: 'unset',\n },\n },\n chipContainer: {\n display: 'flex',\n flexWrap: 'wrap',\n flexDirection: 'column',\n flexBasis: '100%',\n alignItems: 'center',\n justifyContent: 'center',\n margin: `0 ${theme.spacing(2)}px`,\n\n [theme.breakpoints.up('sm')]: {\n flexDirection: 'row',\n },\n\n '& [role|=button]': {\n marginTop: 0,\n },\n },\n chipColorPrimary: {\n backgroundColor: theme.customColors.peach,\n color: theme.customColors.black,\n },\n ORText: {\n flex: '1 1 10%',\n fontWeight: 'bold',\n margin: `0 ${theme.spacing(0.5)}px`,\n },\n myIPButton: {\n color: 'white',\n backgroundColor: theme.customColors.green,\n margin: '1rem 1rem 1rem 0',\n flex: '1 1 45%',\n },\n roleTextBlurb: {\n margin: `${theme.spacing(1)}px 0`,\n fontSize: '1rem',\n marginLeft: theme.spacing(2),\n },\n});\n\nexport const uiConfig = {\n name: 'instanceAclFormItem',\n state: () => ({\n selectedKind: 1,\n defaultSelectedKind: false,\n }),\n};\n\nexport default uiState(uiConfig)(\n withStyles(styles)(reduxForm({ form: 'newAcl' })(UnstyledAclForm)),\n);\n","import { connect } from 'react-redux';\n\nimport { selectors as userSelectors } from 'dux/user';\nimport { actionCreators } from '../../dux/instances';\nimport { actionCreators as act2, selectors } from '../../dux/createInstance';\nimport AclPopoutItem from './AclForm';\n\nconst mapStateToProps = (state) => ({\n myip: selectors.getCreateInstanceState(state).myip,\n userRoles: userSelectors.getIdentityState(state).roles,\n});\n\nconst mapDispatchToProps = {\n addInstanceAcl: actionCreators.addInstanceAcl,\n getIp: act2.getIp,\n getIpClear: act2.getIpClear,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(AclPopoutItem);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport MorePropTypes from 'airbnb-prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport Paper from '@material-ui/core/Paper';\nimport Popper from '@material-ui/core/Popper';\nimport { DialogActions } from '@material-ui/core';\nimport ClickAwayListener from '@material-ui/core/ClickAwayListener';\nimport Close from '@material-ui/icons/Close';\nimport Fab from '@material-ui/core/Fab';\n\nconst propTypes = {\n children: PropTypes.node.isRequired,\n classes: PropTypes.shape({}).isRequired,\n open: PropTypes.bool.isRequired,\n anchorEl: MorePropTypes.or([PropTypes.shape({}), PropTypes.func]).isRequired,\n handleClick: PropTypes.func.isRequired,\n handleClickAway: PropTypes.func.isRequired,\n placement: PropTypes.string.isRequired,\n popperId: MorePropTypes.or([MorePropTypes.explicitNull, PropTypes.string.isRequired]),\n closeButton: PropTypes.bool,\n};\n\nconst defaultProps = {\n popperId: null,\n closeButton: true,\n};\n\nexport function UnstyledPopoutItem({\n children,\n classes,\n anchorEl,\n open,\n handleClick,\n handleClickAway,\n placement,\n popperId,\n closeButton,\n}) {\n return (\n <Popper\n id={popperId}\n open={open}\n anchorEl={anchorEl}\n className={classes.root}\n placement={placement}\n modifiers={{\n flip: {\n enabled: false,\n },\n preventOverflow: {\n enabled: true,\n boundariesElement: 'window',\n },\n }}\n onClick={(e) => e.stopPropagation()}\n >\n <ClickAwayListener onClickAway={handleClickAway} disableReactTree>\n <Paper>\n {children}\n {closeButton && (\n <DialogActions classes={{ root: classes.dialog }}>\n <Fab size=\"small\" classes={{ root: classes.cancelButton }} onClick={handleClick}>\n <Close fontSize=\"large\" />\n </Fab>\n </DialogActions>\n )}\n </Paper>\n </ClickAwayListener>\n </Popper>\n );\n}\n\nUnstyledPopoutItem.propTypes = propTypes;\nUnstyledPopoutItem.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n root: {\n zIndex: '1300',\n maxWidth: '100%',\n display: 'flex',\n\n [theme.breakpoints.down('xs')]: {\n flexDirection: 'column',\n width: '100%',\n },\n },\n dialog: {\n flex: '1 1 100%',\n justifyContent: 'space-between',\n margin: 0,\n padding: 0,\n },\n cancelButton: {\n position: 'absolute',\n marginLeft: theme.spacing(1),\n left: theme.spacing(1),\n bottom: theme.spacing(2),\n color: theme.customColors.white,\n backgroundColor: theme.customColors.teal,\n '&:hover': {\n background: theme.customColors.teal,\n },\n },\n});\n\nexport default withStyles(styles)(UnstyledPopoutItem);\n","const styles = () => ({\n instanceButtonItemContainer: {\n display: 'flex',\n justifyContent: 'space-around',\n maxWidth: '112px',\n },\n popoutIcon: {\n height: '35px',\n width: '35px',\n fontSize: '2.5em',\n padding: '5px',\n borderRadius: '50%',\n boxShadow:\n '0px 2px 3px 0px rgba(0,0,0,0.2), 0px 3px 2px 0px rgba(0,0,0,0.14), 0px 3px 2px -1px rgba(0,0,0,0.12)',\n color: 'white',\n background: '#4f0043',\n '&[disabled]': {\n background: 'rgba(77, 0, 66, 0.26)',\n },\n },\n popoutIconContainer: {\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n },\n popoutIconLabel: {\n paddingTop: '0.75em',\n width: '100%',\n textTransform: 'none',\n fontSize: '.785714rem',\n },\n actionButton: {\n '&:hover': {\n background: 'none',\n },\n },\n zeroPadding: {\n padding: '0',\n },\n tooltip: {\n marginTop: -25,\n marginLeft: 25,\n },\n});\n\nexport default styles;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport { uiState } from 'react-redux-ui-state';\nimport Button from '@material-ui/core/Button';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport Lock from '@material-ui/icons/Lock';\n\nimport { handleClickAway } from 'services/handleClickAway';\nimport AclFormContainer from 'components/AclForm/AclFormContainer';\nimport PopoutItem from 'components/PopoutItem/PopoutItem';\nimport styles from '../InstanceButtonItem.styles';\n\nconst propTypes = {\n open: PropTypes.bool.isRequired,\n classes: PropTypes.shape({\n actionButton: PropTypes.string.isRequired,\n popoutIconContainer: PropTypes.string.isRequired,\n popoutIconLabel: PropTypes.string.isRequired,\n }).isRequired,\n setUiState: PropTypes.func.isRequired,\n disabled: PropTypes.bool.isRequired,\n anchorEl: PropTypes.shape({}).isRequired,\n statusDisplay: PropTypes.string.isRequired,\n instanceService: PropTypes.string.isRequired,\n instanceId: PropTypes.string.isRequired,\n newInstanceAcls: PropTypes.instanceOf(Array).isRequired,\n};\n\nexport function UnstyledAclInstanceButtonItem({\n open,\n classes,\n setUiState,\n disabled,\n anchorEl,\n statusDisplay,\n instanceService,\n instanceId,\n newInstanceAcls,\n}) {\n function handleClick(e) {\n e.stopPropagation();\n\n setUiState({\n open: !open,\n anchorEl: e.currentTarget,\n });\n }\n\n const theButton = (\n <div className={classes.instanceButtonItemContainer}>\n <Button\n disabled={disabled}\n onClick={handleClick}\n classes={{ root: classes.zeroPadding, text: classes.zeroPadding }}\n className={classes.actionButton}\n id=\"aclformpopout-button\"\n >\n <div className={classes.popoutIconContainer}>\n <Lock disabled={disabled} className={classes.popoutIcon} />\n <span className={classes.popoutIconLabel}>Firewall</span>\n </div>\n </Button>\n <PopoutItem\n anchorEl={anchorEl}\n handleClick={handleClick}\n handleClickAway={(e) => handleClickAway(e, anchorEl, () => setUiState({ open: false }))}\n placement=\"bottom-end\"\n open={open}\n popperId=\"aclformpopout\"\n >\n <AclFormContainer\n instanceService={instanceService}\n instanceId={instanceId}\n newInstanceAcls={newInstanceAcls}\n closePopout={() => setUiState({ open: false })}\n />\n </PopoutItem>\n </div>\n );\n\n return disabled && statusDisplay === 'Ready' ? (\n <Tooltip\n title=\"You do not have the required access for this resource. Contact your organization owner.\"\n classes={{ tooltip: classes.tooltip }}\n >\n <span>{theButton}</span>\n </Tooltip>\n ) : (\n theButton\n );\n}\n\nUnstyledAclInstanceButtonItem.propTypes = propTypes;\n\nexport const uiConfig = {\n name: 'aclformpopoutitem',\n state: () => ({\n open: false,\n anchorEl: {},\n }),\n};\n\nexport default uiState(uiConfig)(withStyles(styles)(UnstyledAclInstanceButtonItem));\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport { Fade } from '@material-ui/core';\nimport Select from '@material-ui/core/Select';\nimport FormControl from '@material-ui/core/FormControl';\nimport InputLabel from '@material-ui/core/InputLabel';\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport LinearProgress from '@material-ui/core/LinearProgress';\nimport { Field, reduxForm, SubmissionError } from 'redux-form';\nimport { uiState } from 'react-redux-ui-state';\nimport MorePropTypes from 'airbnb-prop-types';\nimport zxcvbn from 'zxcvbn';\n\nimport WrappedTextField from 'components/WrappedTextField/WrappedTextField';\nimport RBACSubmitButton from 'components/RBACWrapper/RBACSubmitButton/RBACSubmitButton';\nimport { OWNER, ADMIN, OR_ADMIN, OR_SUPERUSER } from 'constants/roles';\nimport Fab from '@material-ui/core/Fab';\nimport Close from '@material-ui/icons/Close';\nimport { required, maxLength } from '../../services/validationMsgs';\n\nconst propTypes = {\n addInstanceUser: PropTypes.func.isRequired,\n instanceId: PropTypes.string.isRequired,\n instanceService: PropTypes.string.isRequired,\n handleSubmit: PropTypes.func.isRequired,\n submitSucceeded: PropTypes.bool.isRequired,\n submitting: PropTypes.bool.isRequired,\n valid: PropTypes.bool.isRequired,\n pristine: PropTypes.bool.isRequired,\n error: MorePropTypes.or([MorePropTypes.explicitNull, PropTypes.string, PropTypes.shape({})]),\n setUiState: PropTypes.func.isRequired,\n selectedRole: PropTypes.string.isRequired,\n passwordLength: PropTypes.number.isRequired,\n strength: PropTypes.shape({}).isRequired,\n classes: PropTypes.shape({}).isRequired,\n closePopout: MorePropTypes.or([MorePropTypes.explicitNull, PropTypes.func]),\n userRoles: PropTypes.arrayOf(PropTypes.string).isRequired,\n reset: PropTypes.func.isRequired,\n selectedDatabase: PropTypes.string.isRequired,\n databases: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n parentDb: PropTypes.string,\n};\n\nconst defaultProps = {\n parentDb: '',\n error: null,\n closePopout: null,\n};\n\nconst handleFormSubmissionReturn = (result) => {\n if (result.error) {\n throw new SubmissionError(result.formErrors);\n }\n};\n\nconst maxLength128 = maxLength(128);\n\nexport function UnstyledAddUserForm({\n addInstanceUser,\n instanceId,\n instanceService,\n handleSubmit,\n submitSucceeded,\n submitting,\n valid,\n pristine,\n error,\n setUiState,\n selectedRole,\n passwordLength,\n strength,\n closePopout,\n classes,\n userRoles,\n reset,\n selectedDatabase,\n databases,\n parentDb,\n}) {\n const isCockroachDB = instanceService === 'CockroachDB';\n const isMongoDB = instanceService === 'MongoDB';\n\n const submitHandler = (data) => {\n // If the instance is Mongo and there's a parentdb from the DBs tab, newDb is parentdb\n // If the instance is Mongo and a DB is selected from the Users tab, newDb is selectedDatabase\n // If the instance is not Mongo, newDb will be 0, the default value for selectedDatabase. That will be\n // garbage data for the addInstanceUser call and that's ok.\n const newDb = parentDb || selectedDatabase;\n\n const newUser = { ...data, roles: [selectedRole], database: newDb };\n return addInstanceUser(instanceId, instanceService, newUser).then(handleFormSubmissionReturn);\n };\n\n const messageDictionary = {\n 0: 'Awful',\n 1: 'Weak',\n 2: 'Mediocre',\n 3: 'Good',\n 4: 'Strong',\n };\n\n const passwordStrengthCheck = (event, password) => {\n setUiState({ passwordLength: password ? password.length : 0 });\n const { score } = zxcvbn(password);\n setUiState({\n strength: {\n score,\n message: password ? messageDictionary[score] : 'None',\n },\n });\n };\n\n function handleCancel() {\n reset();\n passwordStrengthCheck(null, '');\n }\n\n const errorElm = error ? (\n <ORTypography color=\"error\" className={classes.formStatus}>\n {error}\n </ORTypography>\n ) : null;\n\n if (submitSucceeded && closePopout) {\n closePopout();\n }\n\n const DB_USER_ROLES = {\n Elasticsearch: ['admin', 'kibana', 'readonly'],\n PostgreSQL: ['admin'],\n TimescaleDB: ['admin'],\n MongoDB: ['read', 'readWrite'],\n // The admin role for CRDB is a placeholder until there are actual roles in the API\n CockroachDB: ['admin'],\n };\n\n const StrengthMessage = (\n <ORTypography\n align=\"left\"\n color=\"textPrimary\"\n className={classes.strengthMeterText}\n classes={{ colorTextPrimary: classes[`${strength.message}Text`] }}\n >\n {strength.message}\n </ORTypography>\n );\n\n const roleOptions = DB_USER_ROLES[instanceService].map((role) => (\n <option key={role} value={role}>\n {role}\n </option>\n ));\n\n const databaseOptions = parentDb ? (\n <option key={parentDb} value={parentDb}>\n {parentDb}\n </option>\n ) : (\n databases.map((database) => (\n <option key={database.db} value={database.db}>\n {database.db}\n </option>\n ))\n );\n\n const noDatabases = databases.length === 0 && !parentDb;\n\n const handleChange = (event) => {\n setUiState({ selectedRole: event.target.value });\n };\n\n return (\n <React.Fragment>\n <ORTypography className={classes.header} component=\"h2\" variant=\"h5\">\n Add a User\n </ORTypography>\n <form onSubmit={handleSubmit(submitHandler)}>\n <div className={classes.fieldContainer}>\n <Field\n name=\"username\"\n variant=\"outlined\"\n label=\"Username\"\n placeholder=\"admin\"\n component={WrappedTextField}\n validate={[maxLength128, required]}\n props={{ InputLabelProps: { shrink: true, className: classes.inputLabel } }}\n fullWidth\n />\n <Field\n name=\"password\"\n variant=\"outlined\"\n label=\"Password\"\n placeholder=\"**********\"\n className={classes.userInput}\n component={WrappedTextField}\n type=\"password\"\n validate={isCockroachDB ? [maxLength128] : [maxLength128, required]}\n onChange={passwordStrengthCheck}\n props={{ InputLabelProps: { shrink: true, className: classes.inputLabel } }}\n fullWidth\n />\n {isCockroachDB && (\n <ORTypography align=\"left\" component=\"p\" className={classes.noPasswordNeeded}>\n <i>If no password is provided, this user must connect with client certificates.</i>\n </ORTypography>\n )}\n {passwordLength > 0 && (\n <Fade in={passwordLength > 0}>\n <div className={classes.strengthMeterContainer}>\n <LinearProgress\n classes={{\n colorPrimary: classes.colorPrimary,\n barColorPrimary: classes[strength.message],\n root: classes.strengthMeter,\n }}\n variant=\"determinate\"\n value={strength.message === 'Awful' ? 5 : strength.score * 25}\n />\n <ORTypography align=\"left\" component=\"p\" className={classes.strengthMeterText}>\n Password Strength: {StrengthMessage}\n </ORTypography>\n </div>\n </Fade>\n )}\n {!isCockroachDB && (\n <FormControl variant=\"outlined\" className={classes.formControl}>\n <InputLabel id=\"demo-simple-select-outlined-label\">Roles</InputLabel>\n <Select\n labelId=\"demo-simple-select-outlined-label\"\n id=\"demo-simple-select-outlined\"\n value={selectedRole}\n onChange={handleChange}\n label=\"Roles\"\n native\n >\n <option disabled aria-label=\"\" value=\"0\">\n Select Your Role\n </option>\n {roleOptions}\n </Select>\n </FormControl>\n )}\n {isMongoDB && !parentDb && (\n <React.Fragment>\n <FormControl variant=\"outlined\" className={classes.formControl}>\n <InputLabel id=\"demo-simple-select-outlined-two-label\">Database</InputLabel>\n <Select\n labelId=\"demo-simple-select-outlined-two-label\"\n id=\"demo-simple-select-outlined-two\"\n value={selectedDatabase}\n label=\"Database\"\n native\n onChange={(e) => {\n setUiState({ selectedDatabase: e.target.value });\n }}\n disabled={noDatabases}\n >\n <option disabled aria-label=\"Select Your Database\" value=\"0\">\n Select Your Database\n </option>\n {databaseOptions}\n </Select>\n </FormControl>\n {noDatabases && (\n <ORTypography align=\"left\" component=\"p\" className={classes.noDatabases}>\n <i>\n You have no Databases setup yet. Please create one now before adding a User.\n </i>\n </ORTypography>\n )}\n </React.Fragment>\n )}\n </div>\n {errorElm}\n <div className={classes.addButtonContainer}>\n <Fab\n size=\"small\"\n color=\"secondary\"\n className={classes.cancelButton}\n onClick={handleCancel}\n >\n <Close fontSize=\"large\" />\n </Fab>\n <RBACSubmitButton\n userAccess={userRoles}\n allowedAccess={[OWNER, ADMIN, OR_ADMIN, OR_SUPERUSER]}\n submitting={submitting}\n disabled={isCockroachDB ? !valid || pristine : !valid || pristine || !selectedRole}\n />\n </div>\n </form>\n </React.Fragment>\n );\n}\n\nUnstyledAddUserForm.propTypes = propTypes;\nUnstyledAddUserForm.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n formControl: {\n width: '100%',\n marginTop: '16px',\n },\n select: {\n width: '100%',\n },\n header: {\n margin: '1rem',\n },\n fieldContainer: {\n margin: '1rem',\n '& input': {\n textAlign: 'left',\n },\n },\n roleContainer: {\n textAlign: 'center',\n },\n chipContainer: {\n display: 'flex',\n flexWrap: 'wrap',\n flexDirection: 'column',\n flexBasis: '100%',\n alignItems: 'center',\n justifyContent: 'center',\n margin: theme.spacing(2),\n\n [theme.breakpoints.up('sm')]: {\n flexDirection: 'row',\n },\n },\n addButtonContainer: {\n width: '100%',\n display: 'flex',\n justifyContent: 'space-between',\n },\n addButton: {\n margin: theme.spacing(2),\n },\n cancelButton: {\n margin: theme.spacing(2),\n },\n strengthMeterContainer: {\n top: theme.spacing(2.25),\n marginTop: theme.spacing(1),\n zIndex: 10,\n display: 'flex',\n flexDirection: 'column',\n },\n strengthMeter: {\n flexGrow: 1,\n },\n noPasswordNeeded: {\n paddingTop: 8,\n display: 'block',\n fontSize: 12,\n fontStyle: 'italic, Roboto Regular',\n color: theme.customColors.darkGrey,\n },\n noDatabases: {\n color: theme.customColors.red,\n fontStyle: 'italic',\n fontSize: '.8rem',\n marginTop: theme.spacing(1),\n },\n strengthMeterText: {\n marginTop: theme.spacing(1),\n fontSize: '.8rem',\n },\n colorPrimary: {\n backgroundColor: '#eee0',\n },\n NoneText: {\n display: 'inline',\n },\n Awful: {\n backgroundColor: theme.customColors.red,\n },\n AwfulText: {\n display: 'inline',\n color: theme.customColors.red,\n },\n Weak: {\n backgroundColor: theme.customColors.red,\n },\n WeakText: {\n display: 'inline',\n color: theme.customColors.red,\n },\n Mediocre: {\n backgroundColor: theme.customColors.burntYellow,\n },\n MediocreText: {\n display: 'inline',\n color: theme.customColors.burntYellow,\n },\n Good: {\n backgroundColor: theme.customColors.lightGreen,\n },\n GoodText: {\n display: 'inline',\n color: theme.customColors.lightGreen,\n },\n Strong: {\n backgroundColor: '#008100',\n },\n StrongText: {\n display: 'inline',\n color: '#008100',\n },\n inputLabel: {\n color: theme.palette.text.primary,\n },\n formStatus: {\n margin: `${theme.spacing(2)}px auto auto auto`,\n fontSize: '.8rem',\n fontStyle: 'italic, Roboto Regular',\n maxWidth: '300px',\n },\n userInput: {\n marginTop: '16px',\n },\n});\n\nexport const uiConfig = {\n name: 'instanceUserFormItem',\n state: () => ({\n selectedDatabase: '0',\n selectedRole: '0',\n passwordLength: 0,\n strength: {\n score: 0,\n message: 'None',\n },\n }),\n};\n\nexport default uiState(uiConfig)(\n withStyles(styles)(reduxForm({ form: 'newUser' })(UnstyledAddUserForm)),\n);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\n\nimport { selectors as userSelectors } from 'dux/user';\nimport { actionCreators, selectors as instanceSelectors } from 'dux/instances';\nimport AddUserForm from './AddUserForm';\n\nconst propTypes = {\n instanceId: PropTypes.string.isRequired,\n instanceService: PropTypes.string.isRequired,\n getInstanceDatabases: PropTypes.func.isRequired,\n pullInstanceDatabases: PropTypes.func.isRequired,\n};\n\nconst mapStateToProps = (state) => ({\n userRoles: userSelectors.getIdentityState(state).roles,\n getInstanceDatabases: instanceSelectors.getInstanceDatabases(state),\n});\n\nconst mapDispatchToProps = {\n addInstanceUser: actionCreators.addInstanceUser,\n pullInstanceDatabases: actionCreators.pullInstanceDatabases,\n};\n\nclass AddUserFormContainer extends React.Component {\n componentDidMount() {\n const { instanceId, instanceService, pullInstanceDatabases } = this.props;\n\n if (\n instanceService.toLowerCase() === 'cockroachdb' ||\n instanceService.toLowerCase() === 'mongodb'\n ) {\n pullInstanceDatabases(instanceId, instanceService.toLowerCase());\n }\n }\n\n render() {\n const { instanceId, getInstanceDatabases } = this.props;\n const databases = getInstanceDatabases(instanceId) || [];\n return <AddUserForm databases={databases} {...this.props} />;\n }\n}\n\nAddUserFormContainer.propTypes = propTypes;\n\nexport default connect(mapStateToProps, mapDispatchToProps)(AddUserFormContainer);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport { uiState } from 'react-redux-ui-state';\nimport Button from '@material-ui/core/Button';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport PersonAdd from '@material-ui/icons/PersonAdd';\n\nimport { handleClickAway } from 'services/handleClickAway';\nimport AddUserFormContainer from 'components/AddUserForm/AddUserFormContainer';\nimport PopoutItem from 'components/PopoutItem/PopoutItem';\nimport styles from '../InstanceButtonItem.styles';\n\nconst propTypes = {\n open: PropTypes.bool.isRequired,\n classes: PropTypes.shape({\n actionButton: PropTypes.string.isRequired,\n popoutIconContainer: PropTypes.string.isRequired,\n popoutIconLabel: PropTypes.string.isRequired,\n }).isRequired,\n setUiState: PropTypes.func.isRequired,\n disabled: PropTypes.bool.isRequired,\n anchorEl: PropTypes.shape({}).isRequired,\n statusDisplay: PropTypes.string.isRequired,\n instanceService: PropTypes.string.isRequired,\n instanceId: PropTypes.string.isRequired,\n parentDb: PropTypes.string,\n noLabel: PropTypes.bool,\n customClasses: PropTypes.shape({\n button: PropTypes.shape({}),\n popout: PropTypes.shape({}),\n buttonContainer: PropTypes.shape({}),\n }),\n};\n\nconst defaultProps = {\n parentDb: '',\n noLabel: false,\n customClasses: {\n button: {},\n popout: {},\n buttonContainer: {},\n },\n};\n\nexport function UnstyledUserInstanceButtonItem({\n open,\n classes,\n setUiState,\n disabled,\n anchorEl,\n statusDisplay,\n instanceService,\n instanceId,\n parentDb,\n noLabel,\n customClasses,\n}) {\n function handleClick(e) {\n e.stopPropagation();\n\n setUiState({\n open: !open,\n anchorEl: e.currentTarget,\n });\n }\n\n const theButton = (\n <div style={customClasses.buttonContainer} className={classes.instanceButtonItemContainer}>\n <Button\n style={customClasses.button}\n disabled={disabled}\n onClick={handleClick}\n classes={{ root: classes.zeroPadding, text: classes.zeroPadding }}\n className={classes.actionButton}\n id=\"userformpopout-button\"\n >\n <div className={classes.popoutIconContainer}>\n <PersonAdd\n style={customClasses.popout}\n disabled={disabled}\n className={classes.popoutIcon}\n />\n {!noLabel && <span className={classes.popoutIconLabel}>Users</span>}\n </div>\n </Button>\n <PopoutItem\n anchorEl={anchorEl}\n handleClick={handleClick}\n handleClickAway={(e) => handleClickAway(e, anchorEl, () => setUiState({ open: false }))}\n placement=\"bottom-end\"\n open={open}\n popperId=\"userformpopout\"\n >\n <AddUserFormContainer\n instanceId={instanceId}\n instanceService={instanceService}\n closePopout={() => setUiState({ open: false })}\n parentDb={parentDb}\n />\n </PopoutItem>\n </div>\n );\n\n let buttonItem;\n\n if (disabled && statusDisplay === 'Ready') {\n buttonItem = (\n <Tooltip\n title=\"You do not have the required access for this resource. Contact your organization owner.\"\n classes={{ tooltip: classes.tooltip }}\n >\n {theButton}\n </Tooltip>\n );\n } else if (noLabel) {\n buttonItem = (\n <Tooltip placement=\"left\" title=\"Add User\" classes={{ tooltip: classes.tooltip }}>\n {theButton}\n </Tooltip>\n );\n } else {\n buttonItem = theButton;\n }\n\n return buttonItem;\n}\n\nUnstyledUserInstanceButtonItem.propTypes = propTypes;\nUnstyledUserInstanceButtonItem.defaultProps = defaultProps;\n\nexport const uiConfig = {\n name: 'userformpopoutitem',\n state: () => ({\n open: false,\n anchorEl: {},\n }),\n};\n\nexport default uiState(uiConfig)(withStyles(styles)(UnstyledUserInstanceButtonItem));\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport { Field, reduxForm, SubmissionError } from 'redux-form';\nimport MorePropTypes from 'airbnb-prop-types';\nimport { uiState } from 'react-redux-ui-state';\n\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport WrappedTextField from 'components/WrappedTextField/WrappedTextField';\nimport RBACSubmitButton from 'components/RBACWrapper/RBACSubmitButton/RBACSubmitButton';\nimport { OWNER, ADMIN, OR_ADMIN, OR_SUPERUSER } from 'constants/roles';\nimport { required, maxLength } from '../../services/validationMsgs';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n addInstanceDatabase: PropTypes.func.isRequired,\n instanceId: PropTypes.string.isRequired,\n handleSubmit: PropTypes.func.isRequired,\n valid: PropTypes.bool.isRequired,\n error: MorePropTypes.or([MorePropTypes.explicitNull, PropTypes.string, PropTypes.shape({})]),\n closePopout: MorePropTypes.or([MorePropTypes.explicitNull, PropTypes.func]),\n pristine: PropTypes.bool.isRequired,\n submitting: PropTypes.bool.isRequired,\n submitSucceeded: PropTypes.bool.isRequired,\n databaseName: PropTypes.string.isRequired,\n setUiState: PropTypes.func.isRequired,\n userRoles: PropTypes.arrayOf(PropTypes.string).isRequired,\n service: PropTypes.string.isRequired,\n pullInstanceDatabases: PropTypes.func.isRequired,\n};\n\nconst defaultProps = {\n error: null,\n closePopout: null,\n};\n\nconst maxLength128 = maxLength(128);\n\nexport function UnstyledAddDatabaseForm({\n classes,\n addInstanceDatabase,\n instanceId,\n handleSubmit,\n valid,\n error,\n closePopout,\n pristine,\n submitting,\n submitSucceeded,\n databaseName,\n setUiState,\n userRoles,\n service,\n pullInstanceDatabases,\n}) {\n const handleFormSubmissionReturn = (result) => {\n if (result.error && result.formErrors) {\n throw new SubmissionError(result.formErrors);\n } else if (result.error && result.payload) {\n throw new SubmissionError(result.payload);\n } else {\n pullInstanceDatabases(instanceId, service);\n }\n };\n\n const changeDatabaseName = (event, name) => {\n setUiState({\n databaseName: name,\n });\n };\n\n const submitHandler = (data) =>\n addInstanceDatabase(instanceId, service, data).then(handleFormSubmissionReturn);\n\n const errorElm = error && (\n <ORTypography color=\"error\" className={classes.formStatus}>\n {error}\n </ORTypography>\n );\n\n if (submitSucceeded && closePopout) {\n closePopout();\n }\n\n return (\n <form onSubmit={handleSubmit(submitHandler)}>\n <div className={classes.fieldContainer}>\n <Field\n name=\"name\"\n label=\"Database Name\"\n variant=\"outlined\"\n placeholder=\"staging-db\"\n component={WrappedTextField}\n props={{ InputLabelProps: { shrink: true, className: classes.inputLabel } }}\n validate={[maxLength128, required]}\n fullWidth\n onChange={changeDatabaseName}\n />\n </div>\n <div className={classes.actionContainer}>\n {errorElm}\n <div className={classes.addButtonContainer}>\n <RBACSubmitButton\n userAccess={userRoles}\n allowedAccess={[OWNER, ADMIN, OR_ADMIN, OR_SUPERUSER]}\n submitting={submitting}\n disabled={!valid || pristine || !databaseName}\n />\n </div>\n </div>\n </form>\n );\n}\n\nUnstyledAddDatabaseForm.propTypes = propTypes;\nUnstyledAddDatabaseForm.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n fieldContainer: {\n margin: '1rem',\n '& input': {\n textAlign: 'left',\n },\n minWidth: '355px',\n },\n addButtonContainer: {\n width: '100%',\n display: 'flex',\n justifyContent: 'flex-end',\n },\n addButton: {\n margin: theme.spacing(2),\n },\n formStatus: {\n margin: `${theme.spacing(2)}px auto auto auto`,\n fontSize: '.8rem',\n fontStyle: 'italic, Roboto Regular',\n maxWidth: '300px',\n },\n actionContainer: {\n textAlign: 'center',\n },\n inputLabel: {\n color: theme.palette.text.primary,\n },\n});\n\nexport const uiConfig = {\n name: 'instanceDatabaseFormItem',\n state: () => ({\n databaseName: '',\n }),\n};\n\nexport default uiState(uiConfig)(\n withStyles(styles)(reduxForm({ form: 'newDatabase' })(UnstyledAddDatabaseForm)),\n);\n","import { connect } from 'react-redux';\n\nimport { selectors as userSelectors } from 'dux/user';\nimport { actionCreators } from '../../dux/instances';\nimport AddDatabaseForm from './AddDatabaseForm';\n\nconst mapStateToProps = (state) => ({\n userRoles: userSelectors.getIdentityState(state).roles,\n});\n\nconst mapDispatchToProps = {\n addInstanceDatabase: actionCreators.addInstanceDatabase,\n pullInstanceDatabases: actionCreators.pullInstanceDatabases,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(AddDatabaseForm);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport { uiState } from 'react-redux-ui-state';\nimport Button from '@material-ui/core/Button';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport Storage from '@material-ui/icons/Storage';\n\nimport { handleClickAway } from 'services/handleClickAway';\nimport AddDatabaseFormContainer from 'components/AddDatabaseForm/AddDatabaseFormContainer';\nimport PopoutItem from 'components/PopoutItem/PopoutItem';\nimport styles from '../InstanceButtonItem.styles';\n\nconst propTypes = {\n open: PropTypes.bool.isRequired,\n classes: PropTypes.shape({\n actionButton: PropTypes.string.isRequired,\n popoutIconContainer: PropTypes.string.isRequired,\n popoutIconLabel: PropTypes.string.isRequired,\n }).isRequired,\n setUiState: PropTypes.func.isRequired,\n disabled: PropTypes.bool.isRequired,\n anchorEl: PropTypes.shape({}).isRequired,\n statusDisplay: PropTypes.string.isRequired,\n instanceId: PropTypes.string.isRequired,\n service: PropTypes.string.isRequired,\n};\n\nexport function UnstyledDatabaseInstanceButtonItem({\n open,\n classes,\n setUiState,\n disabled,\n anchorEl,\n statusDisplay,\n instanceId,\n service,\n}) {\n function handleClick(e) {\n e.stopPropagation();\n\n setUiState({\n open: !open,\n anchorEl: e.currentTarget,\n });\n }\n\n const theButton = (\n <div className={classes.instanceButtonItemContainer}>\n <Button\n disabled={disabled}\n onClick={handleClick}\n classes={{ root: classes.zeroPadding, text: classes.zeroPadding }}\n className={classes.actionButton}\n id=\"userformpopout-button\"\n >\n <div className={classes.popoutIconContainer}>\n <Storage disabled={disabled} className={classes.popoutIcon} />\n <span className={classes.popoutIconLabel}>Database</span>\n </div>\n </Button>\n <PopoutItem\n anchorEl={anchorEl}\n handleClick={handleClick}\n handleClickAway={(e) => handleClickAway(e, anchorEl, () => setUiState({ open: false }))}\n placement=\"bottom-end\"\n open={open}\n popperId=\"databaseformpopout\"\n >\n <AddDatabaseFormContainer\n instanceId={instanceId}\n service={service}\n closePopout={() => setUiState({ open: false })}\n />\n </PopoutItem>\n </div>\n );\n\n return disabled && statusDisplay === 'Ready' ? (\n <Tooltip\n title=\"You do not have the required access for this resource. Contact your organization owner.\"\n classes={{ tooltip: classes.tooltip }}\n >\n <span>{theButton}</span>\n </Tooltip>\n ) : (\n theButton\n );\n}\n\nUnstyledDatabaseInstanceButtonItem.propTypes = propTypes;\n\nexport const uiConfig = {\n name: 'databaseformpopoutitem',\n state: () => ({\n open: false,\n anchorEl: {},\n }),\n};\n\nexport default uiState(uiConfig)(withStyles(styles)(UnstyledDatabaseInstanceButtonItem));\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport { withSnackbar } from 'notistack';\nimport { uiState } from 'react-redux-ui-state';\nimport Typography from '@material-ui/core/Typography';\nimport Icon from '@material-ui/core/Icon';\nimport CloseIcon from '@material-ui/icons/Close';\nimport IconButton from '@material-ui/core/IconButton';\nimport Hidden from '@material-ui/core/Hidden';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport Button from '@material-ui/core/Button';\nimport ExpansionPanel from '@material-ui/core/ExpansionPanel';\nimport ExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails';\nimport ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport RegionsIcon from '@material-ui/icons/Language';\nimport LinearProgress from '@material-ui/core/LinearProgress';\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport BusyButton from 'components/BusyButton/BusyButton';\nimport Done from '@material-ui/icons/Done';\n\nimport roleDisabled from 'services/roleDisabled/index';\nimport { OWNER, ADMIN, OR_ADMIN, OR_SUPERUSER } from 'constants/roles';\n\nconst propTypes = {\n instanceId: PropTypes.string.isRequired,\n getUnusedCockroachDBRegions: PropTypes.func.isRequired,\n getValidFlavorsByInstanceId: PropTypes.func.isRequired,\n getServiceSubtypeIdByName: PropTypes.func.isRequired,\n getServiceSubtypeNameByInstanceId: PropTypes.func.isRequired,\n catalog: PropTypes.shape({\n regionsCatalog: PropTypes.shape({\n regions: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n }).isRequired,\n serviceSubtypesCatalog: PropTypes.shape({\n serviceSubtypes: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n }).isRequired,\n flavorsCatalog: PropTypes.shape({\n flavors: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n }).isRequired,\n plansCatalog: PropTypes.shape({\n plans: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n }).isRequired,\n }).isRequired,\n createInstance: PropTypes.func.isRequired,\n provider: PropTypes.string.isRequired,\n region: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n version: PropTypes.string.isRequired,\n selectedRegion: PropTypes.shape({\n name: PropTypes.string,\n id: PropTypes.string,\n }).isRequired,\n setUiState: PropTypes.func.isRequired,\n service: PropTypes.string.isRequired,\n newInstancePlanIndex: PropTypes.number.isRequired,\n newInstanceFlavorIndex: PropTypes.number.isRequired,\n loading: PropTypes.bool.isRequired,\n pristine: PropTypes.bool.isRequired,\n metadata: PropTypes.shape({ multiInstanceId: PropTypes.string }).isRequired,\n classes: PropTypes.shape({}).isRequired,\n enqueueSnackbar: PropTypes.func.isRequired,\n closeSnackbar: PropTypes.func.isRequired,\n formType: PropTypes.string,\n userRoles: PropTypes.arrayOf(PropTypes.string).isRequired,\n closePopout: PropTypes.func.isRequired,\n};\n\nconst defaultProps = {\n formType: '',\n};\n\nexport function UnstyledAddRegionForm({\n instanceId,\n getUnusedCockroachDBRegions,\n getValidFlavorsByInstanceId,\n getServiceSubtypeIdByName,\n getServiceSubtypeNameByInstanceId,\n catalog,\n createInstance,\n provider,\n region,\n name,\n version,\n selectedRegion,\n setUiState,\n service,\n newInstancePlanIndex,\n newInstanceFlavorIndex,\n loading,\n pristine,\n metadata,\n enqueueSnackbar,\n closeSnackbar,\n classes,\n formType,\n userRoles,\n closePopout,\n}) {\n const { plans } = catalog.plansCatalog;\n const serviceSubtype = getServiceSubtypeNameByInstanceId(instanceId);\n const serviceSubtypeId = getServiceSubtypeIdByName(serviceSubtype);\n const allowedUserRoles = [OWNER, ADMIN, OR_ADMIN, OR_SUPERUSER];\n const { multiInstanceId } = metadata;\n\n const availableRegions = getUnusedCockroachDBRegions(instanceId);\n\n const availableFlavors = getValidFlavorsByInstanceId(instanceId);\n\n const plansBySubtype = plans.filter(\n (catalogPlan) => catalogPlan.serviceSubtype === serviceSubtypeId,\n );\n\n const validPlans = availableFlavors.reduce((acc, validFlavor) => {\n acc[validFlavor.id] = plansBySubtype.filter(\n (planBySubtype) =>\n planBySubtype.flavor === validFlavor.id && planBySubtype.displaySetting === 1,\n );\n return acc;\n }, {});\n\n const selectedFlavor = availableFlavors[newInstanceFlavorIndex];\n\n const instancePlan = validPlans[selectedFlavor.id][newInstancePlanIndex];\n\n const planNode =\n typeof instancePlan.nodes !== 'undefined' ? instancePlan.nodes[service.toLowerCase()] : {};\n\n const selectFlavor = (index) => {\n setUiState({\n newInstanceFlavorIndex: index,\n pristine: false,\n });\n };\n\n const availableFlavorCards = availableFlavors.map((availableFlavor, index) => (\n <div\n role=\"button\"\n tabIndex={index}\n key={availableFlavor.id}\n variant=\"outlined\"\n className={newInstanceFlavorIndex === index ? classes.selectedFlavorCard : classes.flavorCard}\n onClick={() => selectFlavor(index)}\n onKeyDown={() => selectFlavor(index)}\n >\n {availableFlavor.name}\n <br />\n <span\n className={classes.popoutPanelDetail}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{ __html: availableFlavor.description }}\n />\n </div>\n ));\n\n const newInstanceData = {\n plan: validPlans[selectedFlavor.id][newInstancePlanIndex].name,\n name: `${name}-${selectedRegion.name}`,\n version,\n region: selectedRegion.name,\n provider,\n service,\n serviceSubtype,\n features: {},\n settings: {},\n metadata: {\n multiInstanceId: metadata.multiInstanceId,\n },\n acls: [],\n };\n\n const buttonText = loading ? 'Building' : 'Confirm';\n\n const selectRegion = (e, regionToSelect) => {\n if (e.keyCode && e.keyCode !== 13) {\n return;\n }\n if (regionToSelect.name === region) {\n return;\n }\n setUiState({\n selectedRegion: regionToSelect,\n pristine: false,\n });\n };\n\n function handleButtonClick(newPlanIndex) {\n setUiState({\n newInstancePlanIndex: newPlanIndex,\n prisitine: false,\n });\n }\n\n function handleCancelButtonClick() {\n setUiState({\n selectedRegion: {},\n newInstancePlanIndex: 0,\n newInstanceFlavorIndex: 0,\n });\n }\n\n const action = (key) => (\n <IconButton\n key=\"close\"\n aria-label=\"Close\"\n onClick={() => {\n closeSnackbar(key);\n }}\n color=\"inherit\"\n >\n <CloseIcon />\n </IconButton>\n );\n\n function handleCreateClick(data) {\n const options = {\n variant: 'success',\n };\n setUiState({\n loading: true,\n });\n createInstance(data, () => {\n enqueueSnackbar('Instance Created Successfully', { ...options, action });\n }).then(() => {\n setUiState(\n {\n loading: false,\n },\n () => closePopout(),\n );\n });\n }\n\n const updateButton = (disabled = false) => (\n <React.Fragment>\n <Button\n disabled={loading || disabled || pristine || !selectedRegion.name}\n className={classes.updateButton}\n variant=\"contained\"\n color=\"primary\"\n onClick={() => handleCreateClick(newInstanceData)}\n >\n {buttonText}\n </Button>\n {loading && (\n <LinearProgress\n classes={{\n root: classes.progress,\n colorPrimary: classes.progressPrimary,\n bar: classes.progressSecondary,\n }}\n />\n )}\n </React.Fragment>\n );\n\n const popoutUpdateButton = (buttonDisabled = false) => (\n <BusyButton\n loading={loading}\n disabled={buttonDisabled}\n variant=\"fab\"\n color=\"primary\"\n size=\"small\"\n className={classes.popoutUpdateButton}\n mini\n onClick={(event) => handleCreateClick(event, service.toLowerCase(), newInstanceData)}\n >\n <Done fontSize=\"large\" />\n </BusyButton>\n );\n\n const createButton = (button, userAccess, allowedAccess) =>\n roleDisabled(userAccess, allowedAccess) ? (\n <Tooltip title=\"You do not have the required access for this resource. Contact your organization owner.\">\n <span>{formType !== 'popout' ? updateButton(true) : popoutUpdateButton(true)}</span>\n </Tooltip>\n ) : (\n <span>{formType !== 'popout' ? updateButton() : popoutUpdateButton()}</span>\n );\n\n let match = false;\n const displayRegions = availableRegions.map((displayRegion, index) => {\n if (Object.keys(selectedRegion).length === 0 && !match && displayRegion.name !== region) {\n setUiState({\n selectedRegion: displayRegion,\n });\n match = true;\n }\n return (\n <div\n style={displayRegion.name !== region ? { cursor: 'pointer' } : {}}\n key={displayRegion.id}\n role=\"button\"\n tabIndex={index}\n className={\n selectedRegion.id === displayRegion.id ? classes.selectedRegionCard : classes.regionCard\n }\n onClick={(e) => selectRegion(e, displayRegion)}\n onKeyDown={(e) => selectRegion(e, displayRegion)}\n >\n <RegionsIcon className={classes.regionIcon} size=\"small\" color=\"secondary\" />\n <div className={classes.regionTitle}>{displayRegion.name}</div>\n </div>\n );\n });\n\n const regionHeader =\n availableRegions.length === 1\n ? `You already have ${selectedRegion.name} selected. There are no remaining regions compatible with this cluster.`\n : 'Based on your Instance setup, here’s a list of available Regions you can add.';\n\n const displayFlavors = availableFlavors.map((displayFlavor, index) => (\n <ExpansionPanel\n key={displayFlavor.id}\n id={displayFlavor.id}\n style={newInstanceFlavorIndex === index ? { border: '2px solid #3C9BA0' } : {}}\n elevation={0}\n classes={{\n root: classes.panelRoot,\n expanded: classes.panelExpanded,\n }}\n expanded={newInstanceFlavorIndex === index}\n >\n <ExpansionPanelSummary\n expandIcon={<ExpandMoreIcon />}\n classes={{\n root: classes.panelSummaryRoot,\n content: classes.panelSummaryContent,\n expanded: classes.panelSummaryExpanded,\n expandIcon: classes.panelSumaryExpandIcon,\n }}\n onClick={() => selectFlavor(index)}\n >\n {displayFlavor.name}\n </ExpansionPanelSummary>\n <ExpansionPanelDetails className={classes.panelDetail}>\n {/* eslint-disable-next-line react/no-danger */}\n <div dangerouslySetInnerHTML={{ __html: displayFlavor.description }} />\n </ExpansionPanelDetails>\n </ExpansionPanel>\n ));\n\n return (\n <React.Fragment>\n <div className={formType !== 'popout' ? classes.groupTitle : classes.popoutGroupTitle}>\n {formType !== 'popout' ? (\n <ORTypography>\n Regions Management for \n <Hidden mdUp>\n <br />\n </Hidden>\n Group: \n {multiInstanceId}\n </ORTypography>\n ) : (\n <ORTypography className={classes.popoutTitle}>Regions, Flavors and Capacity</ORTypography>\n )}\n </div>\n {formType !== 'popout' && <div className={classes.border} />}\n <div className={classes.contentContainer}>\n <ORTypography className={classes.planSectionHeader} component=\"h5\">\n {regionHeader}\n </ORTypography>\n {availableRegions.length !== 0 ? displayRegions : null}\n <ORTypography className={classes.planSectionHeader} component=\"h5\">\n Pick Your Flavor:\n </ORTypography>\n {formType !== 'popout' ? displayFlavors : availableFlavorCards}\n <ORTypography className={classes.planSectionHeader} component=\"h5\">\n Capacity (Storage/Memory):\n </ORTypography>\n <div className={classes.sliderStuff}>\n <div className={classes.sliderButtonContainer}>\n <Button\n disabled={newInstancePlanIndex <= 0}\n variant=\"contained\"\n color=\"secondary\"\n classes={{ root: classes.removeButtonRoot }}\n onClick={() => handleButtonClick(newInstancePlanIndex - 1)}\n >\n <Icon>remove</Icon>\n </Button>\n <Typography\n component=\"span\"\n color=\"primary\"\n classes={{\n root:\n formType !== 'popout' ? classes.sizeDisplayRoot : classes.popoutSizeDisplayRoot,\n }}\n >\n {newInstanceFlavorIndex > -1 ? planNode.diskSizeGb * planNode.quantity : null}\n GB / {(planNode.memoryMb / 1024) * planNode.quantity}\n GB\n </Typography>\n <Button\n disabled={newInstancePlanIndex >= validPlans[selectedFlavor.id].length - 1}\n variant=\"contained\"\n color=\"secondary\"\n classes={{ root: classes.addButtonRoot }}\n onClick={() => handleButtonClick(newInstancePlanIndex + 1)}\n >\n <Icon>add</Icon>\n </Button>\n </div>\n <div\n className={\n formType !== 'popout'\n ? classes.updateButtonContainer\n : classes.popoutUpdateButtonContainer\n }\n >\n {formType !== 'popout' && (\n <Button\n className={classes.cancelButton}\n variant=\"contained\"\n color=\"secondary\"\n onClick={() => handleCancelButtonClick()}\n >\n Cancel\n </Button>\n )}\n <div\n className={\n formType !== 'popout'\n ? classes.updateButtonProgressContainer\n : classes.popoutUpdateButtonProgressContainer\n }\n >\n {createButton(updateButton, userRoles, allowedUserRoles)}\n </div>\n </div>\n </div>\n </div>\n </React.Fragment>\n );\n}\n\nUnstyledAddRegionForm.propTypes = propTypes;\nUnstyledAddRegionForm.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n theForm: {\n padding: theme.spacing(0.5),\n minWidth: 325,\n },\n popoutTitle: {\n marginBottom: '-16px',\n marginTop: '-4px',\n },\n popoutGroupTitle: {\n paddingTop: theme.spacing(1.25),\n paddingBottom: theme.spacing(1.5),\n paddingRight: theme.spacing(1),\n paddingLeft: theme.spacing(1),\n },\n flavorCard: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flexDirection: 'column',\n textAlign: 'center',\n marginTop: theme.spacing(0.5),\n marginBottom: theme.spacing(0.5),\n padding: theme.spacing(1),\n border: `1px solid ${theme.customColors.lightGrey}`,\n borderRadius: theme.spacing(0.5),\n '&:hover': {\n cursor: 'pointer',\n },\n '&:focus': {\n outline: 0,\n },\n },\n selectedFlavorCard: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flexDirection: 'column',\n textAlign: 'center',\n marginTop: theme.spacing(0.5),\n marginBottom: theme.spacing(0.5),\n padding: theme.spacing(1),\n border: `2px solid ${theme.customColors.teal}`,\n backgroundColor: theme.customColors.coolGrey,\n borderRadius: theme.spacing(0.5),\n '&:hover': {\n cursor: 'default !important',\n },\n '&:focus': {\n outline: 0,\n },\n },\n addButtonContainer: {\n display: 'flex',\n justifyContent: 'flex-end',\n marginBottom: '-16px',\n },\n progress: {\n position: 'absolute',\n clear: 'both',\n left: 0,\n bottom: 0,\n width: '100%',\n },\n progressPrimary: {\n backgroundColor: theme.customColors.orange,\n },\n progressSecondary: {\n backgroundColor: theme.customColors.lightGrey,\n },\n planSectionHeader: {\n fontSize: 12,\n marginTop: theme.spacing(1.5),\n marginBottom: theme.spacing(1),\n color: theme.customColors.mediumGrey,\n },\n panelSummaryExpanded: {\n backgroundColor: theme.customColors.sky,\n minHeight: 'unset',\n marginTop: 0,\n },\n panelSumaryExpandIcon: {\n backgroundColor: 'unset',\n },\n panelSummaryRoot: {\n height: '35px',\n minHeight: '35px !important',\n paddingRight: theme.spacing(1),\n },\n panelSummaryContent: {\n textAlign: 'center',\n fontWeight: 'bold',\n display: 'block',\n },\n panelRoot: {\n border: `1px solid ${theme.customColors.mediumGrey}`,\n borderRadius: theme.spacing(0.5),\n marginBottom: theme.spacing(0.5),\n marginTop: 0,\n },\n panelExpanded: {\n marginTop: '0 !important',\n },\n groupTitle: {\n paddingTop: theme.spacing(2.5),\n paddingBottom: theme.spacing(1.5),\n paddingRight: theme.spacing(1),\n paddingLeft: theme.spacing(1),\n },\n regionIcon: {\n verticalAlign: 'middle',\n marginRight: theme.spacing(0.5),\n },\n regionCard: {\n borderRadius: theme.spacing(0.5),\n padding: theme.spacing(1),\n border: `1px solid ${theme.customColors.mediumGrey}`,\n marginBottom: theme.spacing(1),\n marginTop: '-2px',\n '&:focus': {\n outline: 0,\n },\n },\n selectedRegionCard: {\n borderRadius: theme.spacing(0.5),\n padding: theme.spacing(1),\n border: `2px solid ${theme.customColors.teal}`,\n backgroundColor: theme.customColors.coolGrey,\n marginBottom: theme.spacing(1),\n marginTop: '-2px',\n '&:hover': {\n cursor: 'default !important',\n },\n '&:focus': {\n outline: 0,\n },\n },\n usedRegionCard: {\n borderRadius: theme.spacing(0.5),\n padding: theme.spacing(1),\n border: `2px solid ${theme.customColors.coolGrey}`,\n backgroundColor: theme.customColors.coolGrey,\n marginBottom: theme.spacing(1),\n marginTop: '-2px',\n '&:focus': {\n outline: 0,\n },\n },\n regionTitle: {\n verticalAlign: 'middle',\n display: 'inline',\n color: theme.customColors.mediumGrey,\n },\n panelDetail: {\n justifyContent: 'center',\n padding: theme.spacing(2),\n\n '& ul': {\n margin: 0,\n padding: 0,\n fontSize: '0.8571rem',\n color: theme.customColors.mediumGrey,\n listStyleType: 'none',\n textAlign: 'center',\n lineHeight: '21px',\n },\n '& h6': { display: 'none' },\n },\n popoutPanelDetail: {\n justifyContent: 'center',\n padding: theme.spacing(1),\n\n '& ul': {\n margin: 0,\n padding: 0,\n fontSize: '0.8571rem',\n color: theme.customColors.mediumGrey,\n listStyleType: 'none',\n textAlign: 'center',\n lineHeight: '21px',\n },\n '& h6': { display: 'none' },\n },\n sliderStuff: {\n flexGrow: '1',\n display: 'flex',\n flexDirection: 'column',\n padding: `0 ${theme.spacing(2)}px`,\n justifyContent: 'space-between',\n '&:last-child': {\n marginBottom: '1rem',\n },\n\n [theme.breakpoints.down('md')]: {\n padding: `0 ${theme.spacing(1)}px`,\n },\n },\n sliderButtonContainer: {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n\n [theme.breakpoints.down('md')]: {\n marginTop: theme.spacing(1),\n },\n },\n sizeDisplayRoot: {\n fontSize: '2.5rem',\n border: `1px solid ${theme.customColors.mediumGrey}`,\n borderRadius: theme.spacing(0.5),\n width: '100%',\n textAlign: 'center',\n\n [theme.breakpoints.down('md')]: {\n marginTop: theme.spacing(1),\n },\n },\n popoutSizeDisplayRoot: {\n border: `1px solid ${theme.customColors.mediumGrey}`,\n borderRadius: theme.spacing(0.5),\n width: '100%',\n textAlign: 'center',\n padding: '12px',\n },\n removeButtonRoot: {\n borderRadius: '50% 0 0 50%',\n minWidth: 'unset',\n width: theme.spacing(6),\n height: theme.spacing(6),\n marginRight: theme.spacing(1),\n },\n addButtonRoot: {\n borderRadius: '0 50% 50% 0',\n minWidth: 'unset',\n width: theme.spacing(6),\n height: theme.spacing(6),\n marginLeft: theme.spacing(1),\n },\n nodeLabel: {\n ...theme.typography.h5,\n textAlign: 'center',\n marginTop: theme.spacing(1),\n fontSize: '12px',\n\n [theme.breakpoints.down('md')]: {\n textAlign: 'left',\n marginTop: theme.spacing(2),\n },\n },\n updateButtonContainer: {\n marginTop: theme.spacing(2),\n display: 'flex',\n justifyContent: 'space-between',\n [theme.breakpoints.up('md')]: {\n justifyContent: 'flex-end',\n },\n marginBottom: theme.spacing(2),\n },\n popoutUpdateButtonContainer: {\n display: 'flex',\n width: '100%',\n justifyContent: 'flex-end',\n marginBottom: '-16px',\n },\n updateButtonProgressContainer: {\n width: '50%',\n position: 'relative',\n marginLeft: theme.spacing(0.5),\n\n [theme.breakpoints.up('md')]: {\n width: '150px',\n },\n },\n popoutUpdateButtonProgressContainer: {\n position: 'relative',\n marginLeft: theme.spacing(0.5),\n [theme.breakpoints.up('md')]: {\n marginRight: '-24px',\n },\n marginRight: '-16px',\n },\n updateButton: {\n width: '100%',\n '&:disabled': {\n color: theme.customColors.mediumGrey,\n fontWeight: 'bold',\n },\n },\n popoutUpdateButton: {\n margin: theme.spacing(2),\n '&:disabled': {\n color: theme.customColors.mediumGrey,\n },\n },\n cancelButton: {\n width: '50%',\n marginRight: theme.spacing(0.5),\n [theme.breakpoints.up('md')]: {\n width: '150px',\n marginRight: theme.spacing(1),\n },\n },\n border: {\n borderBottom: `1px solid ${theme.customColors.mediumGrey}`,\n width: '100%',\n },\n contentContainer: {\n paddingRight: theme.spacing(1),\n paddingLeft: theme.spacing(1),\n },\n});\n\nexport const uiConfig = {\n name: 'regionTabSelection',\n state: () => ({\n selectedRegion: {},\n newInstancePlanIndex: 0,\n newInstanceFlavorIndex: 0,\n loading: false,\n pristine: true,\n }),\n};\n\nexport default withSnackbar(uiState(uiConfig)(withStyles(styles)(UnstyledAddRegionForm)));\n","import { selectors as catalogSelectors } from 'dux/catalog';\nimport { selectors as instanceSelectors } from 'dux/instances';\nimport { selectors as userSelectors } from 'dux/user';\nimport { actionCreators } from 'dux/createInstance';\nimport { connect } from 'react-redux';\nimport AddRegionForm from './AddRegionForm';\n\nconst mapStateToProps = (state) => ({\n catalog: catalogSelectors.getCatalogState(state),\n userRoles: userSelectors.getIdentityState(state).roles,\n getServiceSubtypeIdByName: catalogSelectors.getServiceSubtypeIdByName(state),\n getUnusedCockroachDBRegions: instanceSelectors.getUnusedCockroachDBRegions(state),\n getValidFlavorsByInstanceId: instanceSelectors.getValidFlavorsByInstanceId(state),\n getServiceSubtypeNameByInstanceId: instanceSelectors.getServiceSubtypeNameByInstanceId(state),\n});\n\nconst mapDispatchToProps = {\n createInstance: actionCreators.createInstance,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(AddRegionForm);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport { uiState } from 'react-redux-ui-state';\nimport Button from '@material-ui/core/Button';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport Language from '@material-ui/icons/Language';\n\nimport { handleClickAway } from 'services/handleClickAway';\nimport AddRegionFormContainer from 'components/AddRegionForm/AddRegionFormContainer';\nimport PopoutItem from 'components/PopoutItem/PopoutItem';\nimport styles from '../InstanceButtonItem.styles';\n\nconst propTypes = {\n open: PropTypes.bool.isRequired,\n classes: PropTypes.shape({\n actionButton: PropTypes.string.isRequired,\n popoutIconContainer: PropTypes.string.isRequired,\n popoutIconLabel: PropTypes.string.isRequired,\n }).isRequired,\n setUiState: PropTypes.func.isRequired,\n disabled: PropTypes.bool.isRequired,\n anchorEl: PropTypes.shape({}).isRequired,\n statusDisplay: PropTypes.string.isRequired,\n instanceId: PropTypes.string.isRequired,\n metadata: PropTypes.shape({ multiInstanceId: PropTypes.string }).isRequired,\n provider: PropTypes.string.isRequired,\n region: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n version: PropTypes.string.isRequired,\n service: PropTypes.string.isRequired,\n regionsUnavailable: PropTypes.bool.isRequired,\n};\n\nexport function UnstyledRegionInstanceButtonItem({\n open,\n classes,\n setUiState,\n disabled,\n anchorEl,\n statusDisplay,\n instanceId,\n metadata,\n provider,\n region,\n name,\n version,\n service,\n regionsUnavailable,\n}) {\n function handleClick(e) {\n e.stopPropagation();\n\n setUiState({\n open: !open,\n anchorEl: e.currentTarget,\n });\n }\n\n const theButton = (\n <div className={classes.instanceButtonItemContainer}>\n <Button\n disabled={disabled}\n onClick={handleClick}\n classes={{ root: classes.zeroPadding, text: classes.zeroPadding }}\n className={classes.actionButton}\n id=\"userformpopout-button\"\n >\n <div className={classes.popoutIconContainer}>\n <Language disabled={disabled} className={classes.popoutIcon} />\n <span className={classes.popoutIconLabel}>Regions</span>\n </div>\n </Button>\n <PopoutItem\n anchorEl={anchorEl}\n handleClick={handleClick}\n handleClickAway={(e) => handleClickAway(e, anchorEl, () => setUiState({ open: false }))}\n placement=\"bottom-end\"\n open={open}\n popperId=\"regionformpopout\"\n >\n <AddRegionFormContainer\n instanceId={instanceId}\n metadata={metadata}\n provider={provider}\n region={region}\n name={name}\n version={version}\n service={service}\n closePopout={() => setUiState({ open: false })}\n formType=\"popout\"\n />\n </PopoutItem>\n </div>\n );\n\n const title = regionsUnavailable\n ? 'All available regions have been used.'\n : 'You do not have the required access for this resource. Contact your organization owner.';\n\n return disabled && statusDisplay === 'Ready' ? (\n <Tooltip title={title} classes={{ tooltip: classes.tooltip }}>\n <span>{theButton}</span>\n </Tooltip>\n ) : (\n theButton\n );\n}\n\nUnstyledRegionInstanceButtonItem.propTypes = propTypes;\n\nexport const uiConfig = {\n name: 'databaseformpopoutitem',\n state: () => ({\n open: false,\n anchorEl: {},\n }),\n};\n\nexport default uiState(uiConfig)(withStyles(styles)(UnstyledRegionInstanceButtonItem));\n","import moment from 'moment';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport ExpansionPanel from '@material-ui/core/ExpansionPanel';\nimport ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary';\nimport ExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport Icon from '@material-ui/core/Icon';\nimport Launch from '@material-ui/icons/Launch';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport Typography from '@material-ui/core/Typography';\nimport LinearProgress from '@material-ui/core/LinearProgress';\nimport Button from '@material-ui/core/Button';\nimport { Link } from 'react-router-dom';\n\nimport ServiceIcon from 'components/ServiceIcon/ServiceIcon';\nimport SERVICES_WITH_USERS from 'constants/servicesWithUsers';\nimport SERVICES_WITH_DATABASES from 'constants/servicesWithDatabases';\nimport ORSpaceUsage from 'components/ORSpaceUsage/ORSpaceUsageContainer';\nimport { bytesToGB } from 'services/conversions';\nimport roleDisabled from 'services/roleDisabled/index';\nimport { OWNER, ADMIN, OR_ADMIN, OR_SUPERUSER } from 'constants/roles';\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport FeaturesList from 'components/MissionCtrl/InstancesPage/FeaturesList/FeaturesList';\nimport AclInstanceButtonItem from './AclInstanceButtonItem/AclInstanceButtonItem';\nimport UserInstanceButtonItem from './UserInstanceButtonItem/UserInstanceButtonItem';\nimport DatabaseInstanceButtonItem from './DatabaseInstanceButtonItem/DatabaseInstanceButtonItem';\nimport RegionInstanceButtonItem from './RegionInstanceButtonItem/RegionInstanceButtonItem';\n\nconst propTypes = {\n acls: PropTypes.instanceOf(Array).isRequired,\n id: PropTypes.string.isRequired,\n version: PropTypes.string.isRequired,\n statusDisplay: PropTypes.string.isRequired,\n dtCreated: PropTypes.string.isRequired,\n dtModified: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n shortId: PropTypes.string.isRequired,\n service: PropTypes.string.isRequired,\n region: PropTypes.string.isRequired,\n provider: PropTypes.string.isRequired,\n classes: PropTypes.shape({}).isRequired,\n serviceMaturity: PropTypes.number.isRequired,\n hosts: PropTypes.instanceOf(Array).isRequired,\n spaceUsage: PropTypes.shape({\n sampleTime: PropTypes.number,\n spaceTotal: PropTypes.number,\n spaceAvailable: PropTypes.number,\n spaceUsed: PropTypes.number,\n nodes: PropTypes.arrayOf(PropTypes.shape({ spaceTotal: PropTypes.number })),\n }),\n userRoles: PropTypes.arrayOf(PropTypes.string).isRequired,\n getTotalSpace: PropTypes.func.isRequired,\n getRedisMemoryCapacity: PropTypes.func.isRequired,\n metadata: PropTypes.shape({\n multiInstanceId: PropTypes.string,\n }).isRequired,\n getUnusedCockroachDBRegions: PropTypes.func.isRequired,\n features: PropTypes.shape({\n addons: PropTypes.shape({}),\n }).isRequired,\n};\n\nconst defaultProps = {\n spaceUsage: {},\n};\n\nexport function UnstyledInstanceItem({\n acls,\n id,\n version,\n statusDisplay,\n dtCreated,\n dtModified,\n name,\n shortId,\n service,\n region,\n provider,\n classes,\n serviceMaturity,\n hosts,\n spaceUsage,\n userRoles,\n getTotalSpace,\n getRedisMemoryCapacity,\n metadata,\n getUnusedCockroachDBRegions,\n features,\n}) {\n let statusColor;\n let statusTextColor;\n const serviceStatus = statusDisplay;\n if (statusDisplay === 'Ready') {\n statusColor = classes.ready;\n statusTextColor = classes.textReady;\n } else if (statusDisplay === 'Failed') {\n statusColor = classes.failed;\n statusTextColor = classes.textFailed;\n } else {\n statusColor = classes.building;\n statusTextColor = classes.textBuilding;\n }\n\n const allowedUserRoles = [OWNER, ADMIN, OR_ADMIN, OR_SUPERUSER];\n\n const allowedUserRolesInstanceDetail = [OWNER, ADMIN, OR_ADMIN, OR_SUPERUSER];\n\n const detailButton = (disabled = false) => (\n <Button\n variant=\"contained\"\n hover-override=\"black\"\n disabled={disabled}\n className={classes.moreDetailsButton}\n >\n view more details\n </Button>\n );\n\n const createInstanceDetailButton = (button, userAccess, allowedAccess) =>\n roleDisabled(userAccess, allowedAccess) ? (\n <Tooltip title=\"You do not have the required access for this resource. Contact your organization owner.\">\n <span className={classes.detailLink}>{button(true)}</span>\n </Tooltip>\n ) : (\n <Link className={classes.detailLink} to={`/mission-ctrl/instances/${service}/${id}`}>\n {button()}\n </Link>\n );\n\n return (\n <ExpansionPanel\n classes={{\n root: classes.panel,\n expanded: classes.panelExpanded,\n }}\n TransitionProps={{ unmountOnExit: true }}\n >\n <ExpansionPanelSummary\n classes={{\n root: classes.summaryRoot,\n content: classes.summaryContent,\n expanded: classes.sumamryExpanded,\n focused: classes.summaryFocused,\n }}\n expandIcon={<ExpandMoreIcon className={classes.expandIcon} />}\n IconButtonProps={{\n classes: {\n root: classes.expandIconButton,\n },\n }}\n >\n <div className={statusColor} />\n <div className={classes.summary}>\n <div className={classes.flexContainer}>\n <ServiceIcon\n className={classes.serviceIcon}\n service={service}\n isAlpha={serviceMaturity === 1}\n status={serviceStatus}\n badgeClass={classes.badgeClass}\n />\n <div className={classes.instanceInfo}>\n <Typography className={classes.name} variant=\"h6\">\n {name}\n </Typography>\n <Typography variant=\"caption\" className={classes.productInfo}>\n {service}\n </Typography>\n {statusDisplay === 'Ready' &&\n (getTotalSpace(id) !== 0 || service === 'Redis') && ( // bypass redis host = redis_replica returning 0 for totalSize\n <Typography variant=\"caption\" className={classes.productInfo}>\n {service !== 'Redis' ? getTotalSpace(id) : getRedisMemoryCapacity(id)}\n GB\n {service !== 'Redis' ? null : '\\u00a0RAM'}\n </Typography>\n )}\n </div>\n </div>\n <div className={classes.actionArea}>\n {[...SERVICES_WITH_DATABASES].includes(service) && (\n <DatabaseInstanceButtonItem\n key=\"databaseforminstancebtn\"\n classes={{\n popoutIconLabel: classes.popoutIconLabel,\n }}\n statusDisplay={statusDisplay}\n instanceId={id}\n service={service}\n disabled={statusDisplay !== 'Ready' || roleDisabled(userRoles, allowedUserRoles)}\n />\n )}\n {[...SERVICES_WITH_USERS].includes(service) && (\n <UserInstanceButtonItem\n key=\"userforminstancebtn\"\n classes={{\n popoutIconLabel: classes.popoutIconLabel,\n }}\n statusDisplay={statusDisplay}\n instanceService={service}\n instanceId={id}\n disabled={statusDisplay !== 'Ready' || roleDisabled(userRoles, allowedUserRoles)}\n />\n )}\n <AclInstanceButtonItem\n key=\"aclforminstancebtn\"\n classes={{\n popoutIconLabel: classes.popoutIconLabel,\n }}\n statusDisplay={statusDisplay}\n instanceService={service}\n instanceId={id}\n newInstanceAcls={acls}\n disabled={statusDisplay !== 'Ready' || roleDisabled(userRoles, allowedUserRoles)}\n />\n {service === 'CockroachDB' && metadata.multiInstanceId && (\n <RegionInstanceButtonItem\n key=\"regionforminstancebtn\"\n classes={{\n popoutIconLabel: classes.popoutIconLabel,\n }}\n statusDisplay={statusDisplay}\n instanceId={id}\n metadata={metadata}\n provider={provider}\n region={region}\n name={name}\n version={version}\n service={service}\n disabled={\n statusDisplay !== 'Ready' ||\n roleDisabled(userRoles, allowedUserRoles) ||\n getUnusedCockroachDBRegions(id).length === 0\n }\n regionsUnavailable={getUnusedCockroachDBRegions(id).length === 0}\n />\n )}\n </div>\n </div>\n {statusDisplay !== 'Ready' && statusDisplay !== 'Failed' ? (\n <LinearProgress\n classes={{\n root: classes.progress,\n colorPrimary: classes.progressPrimary,\n bar: classes.progressSecondary,\n }}\n />\n ) : null}\n </ExpansionPanelSummary>\n <ExpansionPanelDetails className={classes.details}>\n <div className={classes.charContainer}>\n <ORSpaceUsage\n userRoles={userRoles}\n instanceId={id}\n instanceIsReady={statusDisplay.toLowerCase() === 'ready'}\n />\n </div>\n <div className={classes.detailsListContainer}>\n <div className={classes.detailsListInfoContainer}>\n <Icon className={classes.detailsListIcon}>language_24</Icon>\n <div className={classes.detailsListLocationContainer}>\n <ORTypography className={classes.detailsListLocation}>{region}</ORTypography>\n <ORTypography className={classes.detailsListSize}>\n {spaceUsage &&\n service !== 'Redis' &&\n spaceUsage.nodes &&\n spaceUsage.nodes.length > 0 &&\n spaceUsage.nodes &&\n bytesToGB(spaceUsage.nodes[0].spaceTotal).toFixed(0)}\n {service === 'Redis' && statusDisplay === 'Ready' && getRedisMemoryCapacity(id)}\n GB\n {service !== 'Redis' ? '\\u00a0' : '\\u00a0RAM\\u00a0'}\n <span className={classes.detailsListSizeParenthesis}>(per data node)</span>\n </ORTypography>\n </div>\n </div>\n <ul className={classes.detailsList}>\n <li>\n <Typography variant=\"subtitle1\">\n Engine: \n {service}\n </Typography>\n </li>\n <li>\n <Typography variant=\"subtitle1\" className={statusTextColor}>\n <span className={classes.detailsListReadyState}>State: </span>\n {statusDisplay === 'Ready' ? 'Active' : statusDisplay}\n </Typography>\n </li>\n <li>\n <Typography variant=\"subtitle1\">\n Version: \n {version}\n </Typography>\n </li>\n <li>\n <Typography variant=\"subtitle1\">\n ID: \n {id}\n </Typography>\n </li>\n {service === 'MongoDB' ? (\n <li>\n <Typography variant=\"subtitle1\">\n Short ID: \n {shortId}\n </Typography>\n </li>\n ) : null}\n <li>\n <Typography variant=\"subtitle1\">\n Created: \n {moment(dtCreated).format('dddd, MMMM Do YYYY, h:mm:ss a')}\n </Typography>\n </li>\n <li>\n <Typography variant=\"subtitle1\">\n Modified: \n {moment(dtModified).format('dddd, MMMM Do YYYY, h:mm:ss a')}\n </Typography>\n </li>\n <li>\n <Typography variant=\"subtitle1\">\n Cloud Provider: \n {provider}\n </Typography>\n </li>\n <FeaturesList features={features} />\n </ul>\n </div>\n <div className={classes.detailContainer}>\n {hosts.map((host, index) =>\n (service === 'Elasticsearch' &&\n host.connectionUri &&\n host.role !== 'elasticsearch' &&\n statusDisplay === 'Ready') ||\n host.role === 'cockroachdb_admin' ? (\n <a\n key={index.toString()}\n className={classes.featureDetailLink}\n href={host.connectionUri}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <Button\n variant=\"contained\"\n hover-override={host.role}\n className={classes[`${host.role}Button`]}\n >\n <div className={classes.spacer} />\n {host.role.split('_').join(' ')}\n <Launch className={classes.featureButtonIcon} />\n </Button>\n </a>\n ) : null,\n )}\n {createInstanceDetailButton(detailButton, userRoles, allowedUserRolesInstanceDetail)}\n </div>\n </ExpansionPanelDetails>\n </ExpansionPanel>\n );\n}\n\nUnstyledInstanceItem.propTypes = propTypes;\nUnstyledInstanceItem.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n panel: {\n '&:first-child': {\n marginTop: `${theme.spacing(3)}px !important`,\n },\n '&:last-child': {\n marginBottom: '20rem',\n },\n marginTop: `${theme.spacing(1)}px`,\n marginBottom: 0,\n },\n panelExpanded: {\n marginTop: `${theme.spacing(1)}px !important`,\n marginBottom: '0 !important',\n },\n summaryRoot: {\n paddingLeft: 0,\n\n [theme.breakpoints.down('md')]: {\n maxHeight: 'unset',\n },\n },\n summaryContent: {\n display: 'flex',\n margin: '0 !important',\n '&$expanded': {\n margin: 0,\n },\n '& > :last-child': {\n paddingRight: '0px',\n },\n },\n summaryExpanded: {\n margin: 0,\n },\n summaryFocused: {\n backgroundColor: 'unset !important',\n },\n badgeClass: {\n top: theme.spacing(0.5),\n right: theme.spacing(2.5),\n\n [theme.breakpoints.down('sm')]: {\n display: 'none',\n },\n },\n name: {\n whiteSpace: 'pre-wrap' /* css-3 */,\n whiteSpace: '-moz-pre-wrap' /* Mozilla, since 1999 */, // eslint-disable-line no-dupe-keys\n whiteSpace: '-pre-wrap' /* Opera 4-6 */, // eslint-disable-line no-dupe-keys\n whiteSpace: '-o-pre-wrap' /* Opera 7 */, // eslint-disable-line no-dupe-keys\n overflowWrap: 'break-word',\n wordWrap: 'break-word',\n wordBreak: 'break-all' /* Check this on Safari */,\n fontFamily: '\"Libre Medium\", sans-serif',\n },\n actionArea: {\n display: 'flex',\n flex: '1 0 30%',\n alignSelf: 'center',\n justifyContent: 'flex-end',\n alignItems: 'center',\n marginTop: theme.spacing(1.25),\n paddingRight: theme.spacing(1.25),\n\n [theme.breakpoints.down('md')]: {\n marginTop: theme.spacing(1),\n justifyContent: 'flex-start',\n alignSelf: 'start',\n flex: '1 0 100%',\n },\n },\n details: {\n borderTop: ['1px', 'solid', theme.customColors.lightGrey].join(' '),\n justifyContent: 'space-between',\n display: 'grid',\n gridTemplateColumns: '1fr 1fr',\n gridGap: '0px 16px',\n gridTemplateAreas: `\n 'chart list'\n 'chart buttons'\n `,\n padding: theme.spacing(1),\n\n [theme.breakpoints.down('md')]: {\n gridTemplateColumns: '2fr 1fr',\n },\n\n [theme.breakpoints.down('sm')]: {\n gridTemplateAreas: `\n 'list'\n 'chart'\n 'buttons'\n `,\n gridTemplateColumns: '1fr',\n },\n\n [theme.breakpoints.down('xs')]: {\n flexDirection: 'column-reverse',\n alignItems: 'center',\n '& ul': {\n margin: 0,\n paddingLeft: theme.spacing(2.5),\n },\n },\n },\n charContainer: {\n gridArea: 'chart',\n },\n detailsListContainer: {\n gridArea: 'list',\n justifySelf: 'center',\n [theme.breakpoints.down('md')]: {\n justifySelf: 'flex-start',\n },\n },\n detailsListInfoContainer: {\n display: 'flex',\n flexFlow: 'row wrap',\n },\n detailsListLocationContainer: {\n display: 'flex',\n flexFlow: 'column nowrap',\n },\n detailsList: {\n gridArea: 'list',\n justifySelf: 'center',\n '& li': {\n paddingLeft: theme.spacing(2),\n '& h6': {\n fontFamily: '\"Libre Franklin Regular\", sans-serif',\n fontSize: '14px',\n lineHeight: '21px',\n },\n },\n },\n detailsListIcon: {\n gridArea: 'list',\n justifySelf: 'flex-start',\n marginLeft: theme.spacing(2),\n height: theme.spacing(3),\n width: theme.spacing(3),\n color: theme.customColors.mediumGrey,\n },\n detailsListLocation: {\n fontFamily: '\"Libre Franklin Regular\", sans-serif',\n paddingLeft: theme.spacing(2),\n },\n detailsListSize: {\n fontFamily: '\"Libre Franklin Regular\", sans-serif',\n paddingLeft: theme.spacing(2),\n },\n detailsListSizeParenthesis: {\n fontFamily: '\"Libre Franklin Regular\", sans-serif',\n color: theme.customColors.mediumGrey,\n },\n detailsListReadyState: {\n color: theme.customColors.black,\n },\n summary: {\n width: '100%',\n display: 'flex',\n flexFlow: 'row wrap',\n\n [theme.breakpoints.up('md')]: {\n flexDirection: 'row',\n },\n [theme.breakpoints.down('sm')]: {\n padding: `${theme.spacing(1)}px 0 ${theme.spacing(1)}px 0`,\n maxHeight: 'unset',\n },\n },\n flexContainer: {\n display: 'flex',\n flexFlow: 'row',\n flex: '1 1 70%',\n width: '100%',\n minWidth: '50%',\n\n [theme.breakpoints.up('md')]: {\n alignSelf: 'center',\n },\n [theme.breakpoints.down('sm')]: {\n flexFlow: 'column nowrap',\n },\n },\n detailContainer: {\n marginTop: theme.spacing(1),\n display: 'flex',\n flexFlow: 'column wrap',\n alignItems: 'center',\n justifyContent: 'flex-end',\n gridArea: 'buttons',\n\n [theme.breakpoints.down('xs')]: {\n width: '100%',\n marginBottom: theme.spacing(1.25),\n },\n },\n serviceIcon: {\n height: '40px',\n width: '45px',\n display: 'inline-block',\n margin: `${theme.spacing(0.5)}px ${theme.spacing(1)}px ${theme.spacing(1)}px ${theme.spacing(\n 1,\n )}px`,\n paddingTop: theme.spacing(0.5),\n\n [theme.breakpoints.down('sm')]: {\n display: 'none',\n },\n },\n instanceInfo: {\n flex: '1 1 50%',\n\n [theme.breakpoints.down('sm')]: {\n paddingLeft: theme.spacing(1),\n },\n },\n productInfo: {\n lineHeight: '1.1rem',\n display: 'block',\n },\n progress: {\n position: 'absolute',\n clear: 'both',\n left: 0,\n bottom: 0,\n width: '100%',\n },\n progressPrimary: {\n backgroundColor: theme.customColors.khaki,\n },\n progressSecondary: {\n backgroundColor: theme.customColors.burntYellow,\n },\n textReady: {\n color: theme.customColors.teal,\n },\n textFailed: {\n color: theme.customColors.magenta,\n },\n textBuilding: {\n color: theme.customColors.burntYellow,\n },\n ready: {\n minHeight: theme.spacing(10),\n width: theme.spacing(0.75),\n display: 'inline-block',\n backgroundColor: theme.customColors.orange,\n },\n failed: {\n minHeight: theme.spacing(10),\n width: theme.spacing(0.75),\n display: 'inline-block',\n backgroundColor: theme.customColors.orange,\n },\n building: {\n minHeight: theme.spacing(10),\n width: theme.spacing(0.75),\n display: 'inline-block',\n backgroundColor: theme.customColors.orange,\n },\n moreDetailsButton: {\n color: theme.customColors.black,\n width: '100%',\n padding: theme.spacing(1),\n fontWeight: 400,\n },\n detailLink: {\n textDecoration: 'none',\n width: '100%',\n marginTop: theme.spacing(1),\n },\n expandIcon: {\n color: theme.customColors.white,\n },\n expandIconButton: {\n borderRadius: '4px',\n padding: '6px',\n backgroundColor: theme.customColors.black,\n '&:hover:not($disabled)': {\n backgroundColor: theme.customColors.black,\n },\n boxShadow:\n '0 0 3px 1px rgba(0,0,0,0.2), 0 0 2px 01px rgba(0,0,0,0.14), 0 0 2px 1px rgba(0,0,0,0.12)',\n marginBottom: theme.spacing(2),\n },\n popoutIconLabel: {\n paddingTop: '0.75em',\n width: '100%',\n textTransform: 'none',\n fontSize: '.785714rem',\n\n [theme.breakpoints.down('sm')]: {\n display: 'none',\n },\n },\n featureButtonIcon: {},\n featureDetailLink: {\n textDecoration: 'none',\n width: '100%',\n },\n kibanaButton: {\n gridArea: 'kibana',\n marginTop: theme.spacing(1),\n color: theme.customColors.black,\n backgroundColor: theme.customColors.peach,\n width: '100%',\n padding: theme.spacing(1),\n justifyContent: 'space-between',\n fontWeight: 400,\n },\n cerebroButton: {\n gridArea: 'cerebro',\n marginTop: theme.spacing(1),\n color: theme.customColors.black,\n backgroundColor: '#7cbbbe',\n width: '100%',\n padding: theme.spacing(1),\n justifyContent: 'space-between',\n fontWeight: 400,\n },\n cockroachdb_adminButton: {\n marginTop: theme.spacing(1),\n color: theme.customColors.black,\n backgroundColor: '#7cbbbe',\n width: '100%',\n padding: theme.spacing(1),\n justifyContent: 'space-between',\n fontWeight: 400,\n },\n spacer: {\n width: '25px',\n },\n});\n\nexport default withStyles(styles)(UnstyledInstanceItem);\n","import { connect } from 'react-redux';\n\nimport { selectors as userSelectors } from 'dux/user';\nimport { selectors as instancesSelectors } from 'dux/instances';\nimport InstanceItem from './InstanceItem';\n\nconst mapStateToProps = (state) => ({\n userRoles: userSelectors.getIdentityState(state).roles,\n getTotalSpace: instancesSelectors.getInstanceTotalSpace(state),\n getRedisMemoryCapacity: instancesSelectors.getRedisMemoryCapacity(state),\n getUnusedCockroachDBRegions: instancesSelectors.getUnusedCockroachDBRegions(state),\n});\n\nexport default connect(mapStateToProps, null)(InstanceItem);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport Typography from '@material-ui/core/Typography';\n\nimport Icon from '@material-ui/core/Icon';\nimport Card from '@material-ui/core/Card';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport Button from '@material-ui/core/Button';\n\nimport ServiceIcon from 'components/ServiceIcon/ServiceIcon';\n\nconst propTypes = {\n plan: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n service: PropTypes.string.isRequired,\n isORv4Admin: PropTypes.bool.isRequired,\n classes: PropTypes.shape({}).isRequired,\n};\n\nconst defaultProps = {};\n\nexport function UnstyledInstanceItem({ plan, name, service, isORv4Admin, classes }) {\n // Redo this link when we have a way to login and redirect to a customer's instance.\n // var ORv4Href = `${process.env.REACT_APP_ORV4_URL}instances#/v2/${service}/details/${id}`;\n const ORv4Href = process.env.REACT_APP_ORV4_SSO_LOGIN;\n return (\n <Card\n classes={{\n root: classes.panel,\n }}\n TransitionProps={{ unmountOnExit: true }}\n >\n <div className={classes.orv4Color} />\n <ServiceIcon\n className={classes.serviceIcon}\n service={service}\n isAlpha={false}\n status=\"Ready\"\n badgeClass={classes.badgeClass}\n />\n <div className={classes.instanceInfo}>\n <Typography className={classes.name} variant=\"h6\">\n {name}\n </Typography>\n <Typography variant=\"caption\" className={classes.productInfo}>\n {service}\n </Typography>\n <Typography variant=\"caption\" className={classes.productInfo}>\n {plan}\n {service === 'redis' ? 'MB' : 'GB'}\n </Typography>\n </div>\n\n {isORv4Admin && (\n <div className={classes.lastColumn}>\n <Tooltip\n title={\n <div>\n Manage this instance on\n <br />\n app.objectrocket.com\n </div>\n }\n placement=\"left\"\n >\n <Button variant=\"contained\" className={classes.goORv4}>\n <a className={classes.link} href={ORv4Href} rel=\"noopener noreferrer\" target=\"_blank\">\n <Icon className={classes.instanceLinkIcon}>open_in_new</Icon>\n </a>\n </Button>\n </Tooltip>\n </div>\n )}\n </Card>\n );\n}\n\nUnstyledInstanceItem.propTypes = propTypes;\nUnstyledInstanceItem.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n orv4Color: {\n minHeight: theme.spacing(10),\n width: theme.spacing(0.75),\n backgroundColor: theme.customColors.sky,\n },\n serviceIcon: {\n height: '40px',\n width: '45px',\n margin: `${theme.spacing(0.5)}px ${theme.spacing(1)}px ${theme.spacing(1)}px ${theme.spacing(\n 1,\n )}px`,\n paddingTop: theme.spacing(0.5),\n alignSelf: 'center',\n\n [theme.breakpoints.down('sm')]: {\n display: 'none',\n },\n },\n instanceInfo: {\n alignSelf: 'center',\n\n [theme.breakpoints.down('sm')]: {\n marginLeft: theme.spacing(1),\n },\n },\n panel: {\n '&:first-child': {\n marginTop: `${theme.spacing(3)}px !important`,\n },\n '&:last-child': {\n marginBottom: '20rem',\n },\n marginTop: `${theme.spacing(1)}px`,\n marginBottom: 0,\n borderTop: ['1px', 'solid', theme.customColors.lightGrey].join(' '),\n borderRadius: 0,\n boxShadow:\n '0px 2px 1px -1px rgba(0,0,0,0.2), 0px 1px 1px 0px rgba(0,0,0,0.14), 0px 1px 3px 0px rgba(0,0,0,0.12)',\n display: 'flex',\n position: 'relative',\n },\n badgeClass: {\n right: 20,\n },\n name: {\n whiteSpace: 'pre-wrap' /* css-3 */,\n whiteSpace: '-moz-pre-wrap' /* Mozilla, since 1999 */, // eslint-disable-line no-dupe-keys\n whiteSpace: '-pre-wrap' /* Opera 4-6 */, // eslint-disable-line no-dupe-keys\n whiteSpace: '-o-pre-wrap' /* Opera 7 */, // eslint-disable-line no-dupe-keys\n overflowWrap: 'break-word',\n wordWrap: 'break-word',\n wordBreak: 'break-all' /* Check this on Safari */,\n fontFamily: '\"Libre Medium\", sans-serif',\n },\n productInfo: {\n lineHeight: '1.1rem',\n display: 'block',\n },\n lastColumn: {\n alignSelf: 'center',\n position: 'absolute',\n right: '20px',\n },\n instanceLinkIcon: {\n color: theme.customColors.black,\n margin: theme.spacing(1),\n },\n goORv4: {\n height: '40px',\n padding: '0',\n minWidth: 'auto',\n backgroundColor: theme.customColors.sky,\n boxShadow:\n '0px 3px 5px -1px rgba(0,0,0,0.2), 0px 6px 10px 0px rgba(0,0,0,0.14), 0px 1px 18px 0px rgba(0,0,0,0.12)',\n },\n link: {\n textDecoration: 'none',\n },\n});\n\nexport default withStyles(styles)(UnstyledInstanceItem);\n","import { connect } from 'react-redux';\n\nimport { selectors as userSelectors } from 'dux/user';\nimport InstanceItemORv4 from './InstanceItemORv4';\n\nconst mapStateToProps = (state) => ({\n isORv4Admin: userSelectors.isORv4Admin(state),\n});\n\nexport default connect(mapStateToProps, null)(InstanceItemORv4);\n","/**\n * Instances page\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\n\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport LoadingPlaceHolder from 'components/LoadingPlaceholder/LoadingPlaceholder';\nimport Poll from 'components/Poll/Poll';\nimport ORv4Link from 'components/ORv4Link/ORv4LinkContainer';\nimport FlagEnabledContainer from 'components/FlagEnabled/FlagEnabledContainer';\nimport ORContentHeader from 'components/ORContentHeader/ORContentHeader';\nimport ORContentArea from 'components/ORContentArea/ORContentArea';\nimport SegmentClickTracker from 'components/SegmentClickTracker/SegmentClickTrackerContainer';\nimport NoInstancesPageContainer from './NoInstancesPage/NoInstancesPageContainer';\nimport InstanceItemContainer from './InstanceItem/InstanceItemContainer';\nimport InstanceItemORv4Container from './InstanceItem/InstanceItemORv4Container';\n\nconst propTypes = {\n catalog: PropTypes.shape({}).isRequired,\n getInstancesPoll: PropTypes.func.isRequired,\n instancesORv4: PropTypes.shape({\n instancesORv4: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n isLoading: PropTypes.bool.isRequired,\n }).isRequired,\n instancesState: PropTypes.shape({\n instances: PropTypes.shape({}).isRequired,\n isLoading: PropTypes.bool.isRequired,\n }).isRequired,\n cockroachdbMultiInstanceIDs: PropTypes.arrayOf(PropTypes.string).isRequired,\n};\n\nconst maturity = (catalog, instance) => {\n const service = catalog.servicesCatalog.services.find(\n (catalogService) => catalogService.name === instance.service,\n );\n // If a service is set to display none, then it won't be available in the catalog. However,\n // instances of that service can still be created by developers. This lets those instances show up\n // in the UI without an error.\n // 1 === MATURITY_ALPHA\n if (typeof service === 'undefined') {\n return 1;\n }\n const { maturityLevel } = service;\n return maturityLevel;\n};\n\nconst instanceORv5ListBuilder = (list, catalog, serviceMap, instancesByService) => {\n if (list.length) {\n list\n .sort((a, b) => (a.name > b.name ? 1 : -1))\n .forEach((instance) => {\n Object.keys(serviceMap).forEach((service) => {\n if (serviceMap[service].includes(instance.service)) {\n instancesByService[service].push(\n <InstanceItemContainer\n serviceMaturity={maturity(catalog, instance)}\n {...instance}\n key={instance.id}\n />,\n );\n }\n });\n });\n }\n return instancesByService;\n};\n\nconst instanceORv4ListBuilder = (data, serviceMap, instancesByService) => {\n if (data.instancesORv4.length) {\n data.instancesORv4\n .sort((a, b) => (a.name > b.name ? 1 : -1))\n .forEach((item) => {\n Object.keys(serviceMap).forEach((service) => {\n if (serviceMap[service].includes(item.service)) {\n instancesByService[service].push(\n <FlagEnabledContainer key={item.id} flagKey=\"showORv4\">\n <InstanceItemORv4Container {...item} subtype={item.type} key={item.id} />\n </FlagEnabledContainer>,\n );\n }\n });\n });\n }\n return instancesByService;\n};\n\n/* Hard coding normalizing, sorting and filtering into the UI for each service.\n TODO: Add some sort of sane default to catch new services as they're added.\n*/\nconst instancesBuilder = (instancesORv4, instancesORv5, catalog, classes, crdbIds) => {\n const serviceMap = {\n MongoDB: ['mongodb', 'MongoDB'],\n Redis: ['redis', 'Redis'],\n Elasticsearch: ['elasticsearch', 'Elasticsearch'],\n CockroachDB: ['CockroachDB'],\n PostgreSQL: ['PostgreSQL'],\n TimescaleDB: ['TimescaleDB'],\n };\n\n /* If the service matches one of the service types above it will get added to the list of\n instances for that service */\n let instancesByService = {\n MongoDB: [],\n CockroachDB: [],\n Redis: [],\n Elasticsearch: [],\n PostgreSQL: [],\n TimescaleDB: [],\n };\n\n instancesByService = instanceORv4ListBuilder(instancesORv4, serviceMap, instancesByService);\n instancesByService = instanceORv5ListBuilder(\n instancesORv5,\n catalog,\n serviceMap,\n instancesByService,\n );\n\n const crdbs = instancesByService.CockroachDB.slice();\n\n instancesByService.CockroachDB = crdbIds.reduce((acc, crdbId) => {\n const headerComponent = crdbId ? (\n <ORTypography key={crdbId} variant=\"h6\" component=\"h2\" className={classes.secondaryHeader}>\n Group: {crdbId}\n </ORTypography>\n ) : null;\n const crdbInstances = crdbs.filter((crdb) => crdb.props.metadata.multiInstanceId === crdbId);\n const newcrdbServices = [...acc, headerComponent, ...crdbInstances];\n\n return newcrdbServices;\n }, []);\n\n const instancesListWithHeadings = [];\n\n Object.keys(instancesByService).forEach((service) => {\n if (instancesByService[service].length) {\n instancesListWithHeadings.push(\n <ORTypography key={service} variant=\"h5\" component=\"h1\" className={classes.secondaryHeader}>\n {service}\n </ORTypography>,\n );\n instancesByService[service].forEach((instanceComponent) =>\n instancesListWithHeadings.push(instanceComponent),\n );\n }\n });\n\n return instancesListWithHeadings;\n};\n\nexport function UnstyledInstancesPage({\n getInstancesPoll,\n instancesState,\n cockroachdbMultiInstanceIDs,\n instancesORv4,\n catalog,\n classes,\n}) {\n const orv5instances = instancesState.instances || {};\n return (\n <React.Fragment>\n <ORContentHeader hasDivider>Instances</ORContentHeader>\n <Poll intervalInMS={15000} actionCreator={getInstancesPoll} />\n {!instancesState.isLoading && !instancesORv4.isLoading ? (\n <React.Fragment>\n <ORContentArea>\n <FlagEnabledContainer flagKey=\"showORv4\" negate>\n {instancesORv4.instancesORv4.length === 0 && (\n <div style={{ margin: '16px 0' }}>\n <SegmentClickTracker buttonName=\"ORv4 SSO (Instance List)\">\n <ORv4Link />\n </SegmentClickTracker>\n </div>\n )}\n </FlagEnabledContainer>\n {Object.values(orv5instances).length + instancesORv4.instancesORv4.length ? (\n instancesBuilder(\n instancesORv4,\n Object.values(orv5instances),\n catalog,\n classes,\n cockroachdbMultiInstanceIDs,\n )\n ) : (\n <NoInstancesPageContainer />\n )}\n </ORContentArea>\n </React.Fragment>\n ) : (\n <LoadingPlaceHolder />\n )}\n </React.Fragment>\n );\n}\n\nUnstyledInstancesPage.propTypes = propTypes;\n\nconst styles = (theme) => ({\n secondaryHeader: {\n marginBottom: theme.spacing(2),\n marginTop: theme.spacing(2),\n color: theme.palette.text.secondary,\n },\n});\nexport default withStyles(styles)(UnstyledInstancesPage);\n","/**\n * Instances page container\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport MorePropTypes from 'airbnb-prop-types';\nimport { connect } from 'react-redux';\nimport { selectors as catalogSelectors } from 'dux/catalog';\nimport { selectors as selectorORv4 } from 'dux/instancesORv4';\nimport { actionCreators, selectors } from '../../../dux/instances';\nimport InstancesPage from './InstancesPage';\nimport { getInstancesORv4 } from '../../../dux/instancesORv4/actionCreators';\n\nconst propTypes = {\n getInstances: PropTypes.func.isRequired,\n getInstancesPoll: PropTypes.func.isRequired,\n getInstancesFromORv4: PropTypes.func.isRequired,\n ORv4ID: MorePropTypes.or([PropTypes.bool, PropTypes.string]).isRequired,\n};\n\nclass InstancesPageContainer extends React.Component {\n componentDidMount() {\n const { getInstances, getInstancesFromORv4, ORv4ID } = this.props;\n getInstances();\n if (ORv4ID) {\n getInstancesFromORv4();\n }\n }\n\n render() {\n const { getInstances, ...props } = this.props;\n return <InstancesPage {...props} />;\n }\n}\n\nconst mapStateToProps = (state) => ({\n catalog: catalogSelectors.getCatalogState(state),\n instancesState: selectors.getInstancesState(state),\n cockroachdbMultiInstanceIDs: selectors.getCockroachdbMultiInstanceIDs(state),\n instancesORv4: selectorORv4.getInstancesORv4(state),\n ORv4ID: selectorORv4.getORv4ID(state),\n});\n\nconst mapDispatchToProps = {\n getInstances: actionCreators.getInstances,\n getInstancesPoll: actionCreators.getInstancesPoll,\n getInstancesFromORv4: getInstancesORv4,\n};\n\nInstancesPageContainer.propTypes = propTypes;\n\nexport default connect(mapStateToProps, mapDispatchToProps)(InstancesPageContainer);\n","/* eslint-disable */\nimport React from 'react';\nimport { fade, useTheme } from '@material-ui/core/styles';\n\nexport default function StripeInput(props) {\n const {\n component: Component,\n inputRef,\n 'aria-invalid': ariaInvalid,\n 'aria-describedby': ariaDescribeBy,\n defaultValue,\n required,\n onKeyDown,\n onKeyUp,\n readOnly,\n autoComplete,\n autoFocus,\n type,\n name,\n rows,\n style,\n ...other\n } = props;\n const theme = useTheme();\n const [mountNode, setMountNode] = React.useState(null);\n\n React.useImperativeHandle(\n inputRef,\n () => ({\n focus: () => mountNode.focus(),\n }),\n [mountNode],\n );\n\n return <Component onReady={setMountNode} style={style} {...other} />;\n}\n","/**\n * Wrapper for Stripe payment information to make it behave like a standard\n * form field\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport FormControl from '@material-ui/core/FormControl';\nimport { withStyles, withTheme } from '@material-ui/styles';\nimport OutlinedInput from '@material-ui/core/OutlinedInput';\nimport InputLabel from '@material-ui/core/InputLabel';\nimport FormHelperText from '@material-ui/core/FormHelperText';\nimport { CardElement } from 'react-stripe-elements';\nimport { uiState } from 'react-redux-ui-state';\nimport StripeInput from './StripeInput';\n\nconst propTypes = {\n onChange: PropTypes.func,\n onReset: PropTypes.func,\n onReady: PropTypes.func,\n shouldReset: PropTypes.bool.isRequired,\n className: PropTypes.string,\n theme: PropTypes.shape({\n typography: PropTypes.shape({\n fontSize: PropTypes.number.isRequired,\n fontFamily: PropTypes.string.isRequired,\n }),\n customColors: PropTypes.shape({\n white: PropTypes.string.isRequired,\n }),\n }).isRequired,\n classes: PropTypes.shape({}).isRequired,\n empty: PropTypes.bool.isRequired,\n focused: PropTypes.bool.isRequired,\n complete: PropTypes.bool.isRequired,\n pristine: PropTypes.bool.isRequired,\n error: PropTypes.shape({\n code: PropTypes.string.isRequired,\n message: PropTypes.string.isRequired,\n type: PropTypes.string.isRequired,\n }),\n stripeElm: PropTypes.shape({\n clear: PropTypes.func.isRequired,\n addEventListener: PropTypes.func.isRequired,\n removeEventListener: PropTypes.func.isRequired,\n }),\n setUiState: PropTypes.func.isRequired,\n};\n\nconst defaultProps = {\n className: null,\n onChange: null,\n onReset: null,\n onReady: null,\n error: null,\n stripeElm: null,\n};\n\nexport class UnstyledStripeInputWrapper extends React.Component {\n constructor(props) {\n super(props);\n this.resetAfterChangeHandler = this.resetAfterChangeHandler.bind(this);\n this.blurHandler = this.blurHandler.bind(this);\n this.focusHandler = this.focusHandler.bind(this);\n this.readyHandler = this.readyHandler.bind(this);\n this.fieldChangeHandler = this.fieldChangeHandler.bind(this);\n }\n\n componentDidUpdate(prevProps) {\n const { stripeElm, shouldReset } = this.props;\n const stripeElmChanged = prevProps.stripeElm !== stripeElm;\n const shouldResetChanged = prevProps.shouldReset !== shouldReset;\n if ((stripeElmChanged || shouldResetChanged) && stripeElm && shouldReset) {\n // The form needs to be reset AFTER the Stripe input finishes clearing\n stripeElm.addEventListener('change', this.resetAfterChangeHandler);\n stripeElm.clear();\n }\n }\n\n componentWillUnmount() {\n const { stripeElm } = this.props;\n if (stripeElm) {\n stripeElm.removeEventListener('change', this.resetAfterChangeHandler);\n }\n }\n\n resetAfterChangeHandler() {\n const { setUiState, onReset, stripeElm } = this.props;\n setUiState({ pristine: true });\n if (onReset) {\n onReset();\n }\n stripeElm.removeEventListener('change', this.resetAfterChangeHandler);\n }\n\n blurHandler() {\n const { setUiState } = this.props;\n setUiState({ focused: false });\n }\n\n focusHandler() {\n const { setUiState } = this.props;\n setUiState({ focused: true });\n }\n\n readyHandler(elm) {\n const { setUiState, onReady } = this.props;\n setUiState({ stripeElm: elm });\n if (onReady) {\n onReady();\n }\n }\n\n fieldChangeHandler(obj) {\n const { setUiState, onChange } = this.props;\n setUiState({\n error: obj.error,\n empty: obj.empty,\n complete: obj.complete,\n pristine: false,\n });\n\n if (onChange) {\n onChange(obj);\n }\n }\n\n render() {\n const {\n className,\n theme,\n classes,\n empty,\n focused,\n error,\n complete,\n pristine,\n stripeElm,\n } = this.props;\n\n const style = {\n base: {\n fontSize: `${theme.typography.fontSize}px`,\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n fontWeight: 100,\n '::placeholder': {\n textTransform: 'capitalize',\n color: 'inherit',\n },\n },\n };\n\n const showPlaceholderLabel = empty && !focused;\n const needsIncompleteError = !focused && !pristine && !error && !complete;\n let errMsg = error ? error.message : null;\n errMsg = errMsg || (needsIncompleteError ? 'Remaining fields required' : null);\n\n if (showPlaceholderLabel) {\n Object.assign(style.base['::placeholder'], {\n color: 'transparent',\n });\n }\n /**\n * When thinking about refactoring this form wrapper in the future,\n * or adding additional stripe fields that do not come with react-stripe-elements\n * and making them work with Material-UI,\n * refer to this link: https://github.com/mui-org/material-ui/issues/16037\n * and this codesandbox: https://codesandbox.io/s/stripe-0xez4\n * This link may be helpful also: https://github.com/stripe/react-stripe-elements/issues/164\n */\n return (\n <React.Fragment>\n <FormControl fullWidth error={!!errMsg}>\n <InputLabel\n variant=\"outlined\"\n className={showPlaceholderLabel ? classes.indentedLabel : null}\n classes={{ shrink: classes.shrink }}\n shrink={!showPlaceholderLabel}\n >\n Card Number\n </InputLabel>\n <OutlinedInput\n notched // this is required for style overrides\n placeholder=\"Card Number\"\n classes={{ notchedOutline: classes.outline }}\n disabled={!stripeElm}\n fullWidth\n inputComponent={StripeInput}\n /**\n * This is a bit of a hack. Putting the event handlers in the inputProps gets the form\n * to function properly. Keeping them also at this level makes sure the tests don't\n * break. This is likely due to the nature of the shallow rendering in the tests and\n * the way Material UI now does things. Taking the time to rewrite the tests with\n * @testing-library/react may be a cleaner solution.\n */\n onChange={this.fieldChangeHandler}\n onBlur={this.blurHandler}\n onFocus={this.focusHandler}\n inputProps={{\n className,\n style,\n onReady: this.readyHandler,\n onChange: this.fieldChangeHandler,\n onBlur: this.blurHandler,\n onFocus: this.focusHandler,\n component: CardElement,\n }}\n />\n </FormControl>\n {errMsg && <FormHelperText error>{errMsg}</FormHelperText>}\n </React.Fragment>\n );\n }\n}\n\nUnstyledStripeInputWrapper.propTypes = propTypes;\nUnstyledStripeInputWrapper.defaultProps = defaultProps;\n\nexport const uiConfig = {\n name: 'stripeInput',\n state: () => ({\n error: null,\n focused: false,\n empty: true,\n complete: false,\n pristine: true,\n stripeElm: null,\n }),\n};\n\nconst styles = (theme) => ({\n shrink: {\n padding: '0 8px',\n background: 'white',\n },\n indentedLabel: {\n marginLeft: 30,\n },\n outline: {\n border: `2px solid ${theme.customColors.orange} !important`,\n },\n});\n\nexport default uiState(uiConfig)(withTheme(withStyles(styles)(UnstyledStripeInputWrapper)));\n","/**\n * Placeholder page for billing info collection during sign up\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { uiState } from 'react-redux-ui-state';\nimport { reduxForm, SubmissionError, Field } from 'redux-form';\nimport { injectStripe } from 'react-stripe-elements';\nimport { withStyles } from '@material-ui/styles';\nimport Typography from '@material-ui/core/Typography';\n\nimport classnames from 'classnames';\nimport { GENERIC_API_ERROR } from '../../../constants/errors';\nimport StripeInputWrapper from './StripeInputWrapper/StripeInputWrapper';\nimport BusyButton from '../../BusyButton/BusyButton';\nimport LoadingPlaceholder from '../../LoadingPlaceholder/LoadingPlaceholder';\n\nconst propTypes = {\n onStripeSubmit: PropTypes.func.isRequired,\n onStripeSuccess: PropTypes.func.isRequired,\n onSuccess: PropTypes.func,\n allowMultipleSubmissions: PropTypes.bool,\n buttonText: PropTypes.node.isRequired,\n // This could include any current or future-supported MUI button props\n buttonProps: PropTypes.object, // eslint-disable-line react/forbid-prop-types\n stripe: PropTypes.shape({\n createSource: PropTypes.func.isRequired,\n }).isRequired,\n className: PropTypes.string,\n classes: PropTypes.shape({\n root: PropTypes.string.isRequired,\n submit: PropTypes.string.isRequired,\n hidden: PropTypes.string.isRequired,\n }).isRequired,\n ready: PropTypes.bool.isRequired,\n shouldReset: PropTypes.bool.isRequired,\n successMessage: PropTypes.string,\n setUiState: PropTypes.func.isRequired,\n submitting: PropTypes.bool.isRequired,\n pristine: PropTypes.bool.isRequired,\n valid: PropTypes.bool.isRequired,\n submitSucceeded: PropTypes.bool.isRequired,\n error: PropTypes.string,\n handleSubmit: PropTypes.func.isRequired,\n asyncValidate: PropTypes.func.isRequired,\n touch: PropTypes.func.isRequired,\n change: PropTypes.func.isRequired,\n reset: PropTypes.func.isRequired,\n innerText: PropTypes.shape({}),\n screen: PropTypes.string.isRequired,\n};\n\nconst defaultProps = {\n onSuccess: null,\n allowMultipleSubmissions: true,\n buttonProps: null,\n className: null,\n error: null,\n successMessage: null,\n innerText: null,\n};\n\nexport function UnstyledBillingForm({\n onStripeSubmit,\n onStripeSuccess,\n onSuccess,\n allowMultipleSubmissions,\n buttonProps,\n buttonText,\n stripe,\n classes,\n className,\n setUiState,\n submitting,\n pristine,\n valid,\n submitSucceeded,\n error,\n handleSubmit,\n asyncValidate,\n touch,\n change,\n reset,\n ready,\n shouldReset,\n successMessage,\n innerText,\n screen,\n}) {\n const readyHandler = () => {\n setUiState({ ready: true });\n };\n\n const fieldChangeHandler = (obj) => {\n touch('stripe');\n change('stripe', true);\n asyncValidate('stripe', obj);\n };\n\n const resetHandler = () => {\n if (shouldReset) {\n setUiState({ shouldReset: false });\n reset();\n }\n };\n\n const submitHandler = () => {\n setUiState({ successMessage: null });\n return onStripeSubmit(stripe.createSource, { type: 'card' })\n .then((payload) => onStripeSuccess(payload.source.id))\n .then((payload) => {\n if (payload.error) {\n throw new SubmissionError();\n }\n if (onSuccess) {\n onSuccess();\n }\n if (allowMultipleSubmissions) {\n setUiState({\n shouldReset: true,\n successMessage: 'Success! Your payment information has been updated.',\n });\n }\n })\n .catch(() => {\n throw new SubmissionError({\n _error: GENERIC_API_ERROR,\n });\n });\n };\n\n const formStyle = {\n create: 'createFieldWrapper',\n profile: 'fieldWrapper',\n };\n\n return (\n <React.Fragment>\n {!ready && <LoadingPlaceholder />}\n <form\n onSubmit={handleSubmit(submitHandler)}\n className={classnames(\n screen === 'profile' ? classes.root : null,\n !ready ? classes.hidden : null,\n className,\n )}\n >\n <div className={classes[formStyle[screen]]}>\n <Field\n name=\"stripe\"\n component={StripeInputWrapper}\n props={{\n onChange: fieldChangeHandler,\n onReset: resetHandler,\n onReady: readyHandler,\n shouldReset,\n screen,\n }}\n />\n {error && !submitting ? (\n <Typography color=\"error\" className={classes.formStatus}>\n {error}\n </Typography>\n ) : null}\n {successMessage && pristine ? (\n <Typography color=\"secondary\" className={classes.formStatus}>\n {successMessage}\n </Typography>\n ) : null}\n </div>\n {innerText}\n <BusyButton\n {...buttonProps}\n type=\"submit\"\n className={classnames(buttonProps.className, classes.submit)}\n loading={submitting}\n mini\n disabled={!valid || (submitSucceeded && !allowMultipleSubmissions) || pristine}\n >\n {buttonText}\n </BusyButton>\n </form>\n </React.Fragment>\n );\n}\n\nUnstyledBillingForm.propTypes = propTypes;\nUnstyledBillingForm.defaultProps = defaultProps;\n\nexport const asyncValidateHandler = (fields) =>\n new Promise((resolve, reject) => {\n const { stripe } = fields;\n if (stripe) {\n if (stripe.error) {\n // Redux form expects plain objects when rejecting\n reject({ stripe: stripe.error.message }); // eslint-disable-line prefer-promise-reject-errors\n }\n if (!stripe.complete) {\n // Redux form expects plain objects when rejecting\n reject({ stripe: true }); // eslint-disable-line prefer-promise-reject-errors\n }\n }\n resolve();\n });\n\nconst styles = (theme) => ({\n root: {\n marginTop: theme.spacing(2),\n },\n submit: {\n margin: theme.spacing(1),\n marginLeft: theme.spacing(1.5),\n },\n formStatus: {\n marginTop: theme.spacing(2),\n },\n hidden: {\n visibility: 'hidden',\n height: 0,\n },\n fieldWrapper: {\n width: '100%',\n },\n createFieldWrapper: {\n border: `1px solid ${theme.customColors.teal}`,\n borderTop: 'unset',\n padding: theme.spacing(1),\n width: '100%',\n },\n field: {\n margin: `${theme.spacing(2)}px 0`,\n },\n});\n\nexport const uiConfig = {\n name: 'billingForm',\n state: () => ({\n ready: false,\n shouldReset: false,\n successMessage: null,\n }),\n};\n\nexport const formConfig = {\n form: 'billingForm',\n destroyOnUnmount: true,\n initialValues: { stripe: null },\n shouldAsyncValidate: ({ trigger }) => trigger !== 'submit',\n asyncValidate: asyncValidateHandler,\n onSubmitFail: () => {},\n};\n\nconst injectedForm = injectStripe(UnstyledBillingForm, { withRef: true });\n\nexport default reduxForm(formConfig)(uiState(uiConfig)(withStyles(styles)(injectedForm)));\n","import { connect } from 'react-redux';\n\nimport BillingForm from './BillingForm';\nimport { actionCreators } from '../../../dux/org';\n\nconst mapDispatchToProps = {\n onStripeSubmit: actionCreators.createStripeSource,\n onStripeSuccess: actionCreators.updateStripeSource,\n};\n\nexport default connect(null, mapDispatchToProps)(BillingForm);\n","/**\n * Wrapper for billing form, mainly to inject <Elements />, which must be done\n * before Stripe inject (which is done in BillingForm)\n */\nimport React from 'react';\nimport { Elements } from 'react-stripe-elements';\n\nimport BillingFormContainer from './BillingForm/BillingFormContainer';\n\nfunction BillingFormWrapper({ ...rest }) {\n return (\n <Elements font={[{ cssSrc: 'https://fonts.googleapis.com/css?family=Roboto:400' }]}>\n <BillingFormContainer {...rest} />\n </Elements>\n );\n}\n\nexport default BillingFormWrapper;\n","/**\n * Page for billing info collection during instance creation\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport Drawer from '@material-ui/core/Drawer';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport Close from '@material-ui/icons/Close';\nimport CreditCard from '@material-ui/icons/CreditCard';\nimport Fab from '@material-ui/core/Fab';\nimport Tabs from '@material-ui/core/Tabs';\nimport Tab from '@material-ui/core/Tab';\nimport AppBar from '@material-ui/core/AppBar';\nimport Cake from '@material-ui/icons/Cake';\nimport Hidden from '@material-ui/core/Hidden';\n\nimport BillingFormWrapper from 'components/BillingFormWrapper/BillingFormWrapper';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n completeBillingSetup: PropTypes.func.isRequired,\n getOrg: PropTypes.func.isRequired,\n trialCreditCents: PropTypes.number,\n open: PropTypes.bool.isRequired,\n billingOpen: PropTypes.func.isRequired,\n price: PropTypes.number.isRequired,\n createInstance: PropTypes.func.isRequired,\n newInstanceData: PropTypes.shape({}).isRequired,\n redirectToInstances: PropTypes.func.isRequired,\n isBillingUser: PropTypes.bool.isRequired,\n};\n\nconst defaultProps = {\n trialCreditCents: 20000,\n};\n\nexport function UnstyledBillingPage({\n classes,\n completeBillingSetup,\n getOrg,\n trialCreditCents,\n open,\n billingOpen,\n price,\n createInstance,\n newInstanceData,\n redirectToInstances,\n isBillingUser,\n}) {\n const billingCompleteHandler = () => {\n completeBillingSetup();\n getOrg().then(() => createInstance(newInstanceData, redirectToInstances));\n };\n\n const priceDifference =\n trialCreditCents && trialCreditCents < price\n ? ((price - trialCreditCents) / 100).toFixed(0)\n : ((trialCreditCents - price) / 100).toFixed(0);\n\n const priceString =\n trialCreditCents && trialCreditCents < price ? (\n <span>\n You are using \n <strong>\n ${(trialCreditCents / 100).toFixed(0)}\n in credits\n </strong>\n after this instance is created.\n <Hidden smDown>\n <br />\n </Hidden>\n <Hidden mdUp> </Hidden>\n You will be charged \n <strong>${priceDifference}</strong>\n today.\n <Hidden smDown>\n <br />\n </Hidden>\n <Hidden mdUp> </Hidden>\n You will be charged \n <strong>\n ${(price / 100).toFixed(0)}\n monthly\n </strong>\n after applying your credits.\n </span>\n ) : (\n <span>\n After this instance is created you will have a balance of \n <strong>\n ${priceDifference}\n in credits.\n </strong>\n <Hidden smDown>\n <br />\n </Hidden>\n <Hidden mdUp> </Hidden>\n You will be charged \n <strong>$0</strong>\n today.\n <Hidden smDown>\n <br />\n </Hidden>\n <Hidden mdUp> </Hidden>\n After using all of your credits you will be charged \n <strong>\n ${(price / 100).toFixed(0)}\n per month.\n </strong>\n </span>\n );\n\n const cakeIcon = (\n <div className={classes.cakeIcon}>\n <Cake fontSize=\"large\" color=\"secondary\" />\n </div>\n );\n\n const mobileCakeIcon = (\n <div className={classes.mobileCakeIcon}>\n <Cake fontSize=\"large\" color=\"secondary\" />\n </div>\n );\n\n const creditCalculation =\n trialCreditCents > 0 ? (\n <React.Fragment>\n <Hidden mdUp>\n <div className={classes.mobileCreditText}>\n {mobileCakeIcon}\n <ORTypography color=\"secondary\" align=\"center\" className={classes.mobilePriceText}>\n {priceString}\n </ORTypography>\n </div>\n </Hidden>\n <Hidden smDown>\n <div className={classes.creditText}>\n {cakeIcon}\n <ORTypography color=\"secondary\" align=\"right\" className={classes.priceText}>\n {priceString}\n </ORTypography>\n </div>\n </Hidden>\n </React.Fragment>\n ) : (\n <div className={classes.noTrialCreditsText}>\n <ORTypography color=\"secondary\" align=\"right\" className={classes.priceText}>\n You will be charged \n <strong>${(price / 100).toFixed(0)}</strong>\n today.\n </ORTypography>\n </div>\n );\n\n const nonOwnerContent = (\n <DialogContent classes={{ root: classes.billingDialogContent }}>\n <ORTypography align=\"center\" variant=\"h5\">\n Please contact your organization owner to submit a method of payment\n <br />\n to get unlimited access to all of ObjectRocket's platform.\n </ORTypography>\n </DialogContent>\n );\n\n const fineText =\n price > trialCreditCents ? (\n <ORTypography variant=\"subtitle2\" align=\"center\" className={classes.fineText}>\n <i>By confirming this amount, you are agreeing to a recurring monthly payment.</i>\n </ORTypography>\n ) : (\n <ORTypography variant=\"subtitle2\" align=\"center\" className={classes.fineText}>\n {/* eslint-disable-next-line max-len */}\n <i>\n Your credit card will not be charged until you’ve used all your credits, and you can\n delete your instance at any time.\n </i>\n <Hidden smDown>\n <br />\n </Hidden>\n <Hidden mdUp> </Hidden>\n <i>By confirming this amount, you are agreeing to a recurring monthly payment.</i>\n </ORTypography>\n );\n\n return (\n <Drawer\n classes={{ paper: classes.billingDialog }}\n anchor=\"bottom\"\n open={open}\n onClose={billingOpen}\n >\n <Fab\n onClick={billingOpen}\n size=\"small\"\n classes={{ root: classes.billingCancelButton }}\n aria-label=\"close\"\n >\n <Close fontSize=\"small\" />\n </Fab>\n {!isBillingUser ? (\n nonOwnerContent\n ) : (\n <React.Fragment>\n <DialogTitle classes={{ root: classes.billingDialogTitle }}>\n <ORTypography align=\"center\" variant=\"h5\">\n Please confirm your method of payment to get\n <br />\n unlimited access to all of ObjectRocket's platform.\n </ORTypography>\n </DialogTitle>\n <DialogContent classes={{ root: classes.billingDialogContent }}>\n <AppBar\n elevation={0}\n position=\"static\"\n classes={{ colorPrimary: classes.billingDialogAppBar }}\n >\n {/*\n Tabs will possibly contain more payment options in the future.\n Remember to add the dynamic value for the tabs\n and an onChange attribute when more options are available\n */}\n <Tabs\n indicatorColor=\"primary\"\n value={0}\n classes={{ root: classes.billingDialogTabs }}\n >\n <Tab label=\"Credit Card\" icon={<CreditCard />} />\n </Tabs>\n </AppBar>\n <BillingFormWrapper\n screen=\"create\"\n onSuccess={billingCompleteHandler}\n allowMultipleSubmissions={false}\n buttonText=\"Create Instance\"\n buttonProps={{\n variant: 'contained',\n size: 'large',\n color: 'primary',\n fullWidth: true,\n className: classes.billingSubmitButton,\n }}\n className={classes.billingDialogForm}\n innerText={creditCalculation}\n />\n {fineText}\n </DialogContent>\n </React.Fragment>\n )}\n </Drawer>\n );\n}\n\nconst styles = (theme) => ({\n supportLink: {\n color: theme.customColors.white,\n },\n billingDialog: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n overflowY: 'unset',\n borderTop: `4px solid ${theme.customColors.teal}`,\n },\n billingDialogTitle: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n padding: `${theme.spacing(2)}px 0 0 0`,\n },\n billingDialogContent: {\n minWidth: '50%',\n maxWidth: '800px',\n [theme.breakpoints.down('sm')]: {\n minWidth: 'unset',\n maxWidth: 'unset',\n },\n margin: `${theme.spacing(1)}px 0px`,\n padding: theme.spacing(1),\n },\n billingDialogAppBar: {\n color: theme.customColors.black,\n backgroundColor: 'rgba(0, 0, 0, 0.12)',\n border: `1px solid ${theme.customColors.teal}`,\n borderBottom: '1px solid rgba(0, 0, 0, 0.12)',\n },\n billingDialogTabs: {\n backgroundColor: 'white',\n },\n billingDialogForm: {\n marginBottom: theme.spacing(1),\n },\n billingSubmitButton: {\n margin: '8px 0 8px 0',\n },\n billingCancelButton: {\n position: 'absolute',\n top: theme.spacing(-2.5),\n right: 0,\n zIndex: 900,\n color: theme.customColors.white,\n backgroundColor: theme.customColors.teal,\n '&:hover': {\n background: theme.customColors.teal,\n },\n },\n creditText: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n marginTop: theme.spacing(1),\n marginBottom: 0,\n },\n mobileCreditText: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n flexFlow: 'column nowrap',\n marginTop: theme.spacing(1),\n marginBottom: 0,\n },\n noTrialCreditsText: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n flexFlow: 'column nowrap',\n marginTop: theme.spacing(1),\n marginBottom: 0,\n },\n cake: {\n color: theme.customColors.teal,\n fontSize: 30,\n paddingTop: 8,\n marginRight: 7,\n },\n cakeIcon: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n },\n mobileCakeIcon: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n margin: '8px 0',\n },\n priceText: {\n fontSize: '11px',\n paddingLeft: theme.spacing(3),\n },\n mobilePriceText: {\n fontSize: '11px',\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n fineText: {\n fontSize: '10px',\n },\n});\n\nUnstyledBillingPage.propTypes = propTypes;\nUnstyledBillingPage.defaultProps = defaultProps;\n\nexport default withStyles(styles)(UnstyledBillingPage);\n","import { connect } from 'react-redux';\n\nimport { selectors as instanceSelectors } from 'dux/createInstance';\nimport { actionCreators, selectors as orgSelectors } from 'dux/org';\nimport { selectors as userSelectors } from 'dux/user';\n\nimport BillingPage from './BillingPage';\n\nconst mapStateToProps = (state) => ({\n getOrgState: orgSelectors.getOrgState(state).trialCreditCents,\n price: instanceSelectors.getCreateInstanceState(state).price,\n isBillingUser: userSelectors.isBillingUser(state),\n});\n\nconst mapDispatchToProps = {\n completeBillingSetup: actionCreators.completeBillingSetup,\n getOrg: actionCreators.getOrg,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(BillingPage);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport Typography from '@material-ui/core/Typography';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport Paper from '@material-ui/core/Paper';\nimport { Field, reduxForm } from 'redux-form';\nimport classnames from 'classnames';\n\nimport WrappedTextField from 'components/WrappedTextField/WrappedTextField';\nimport ServiceIcon from 'components/ServiceIcon/ServiceIcon';\nimport { required, maxLength } from 'services/validationMsgs';\nimport RocketChip from 'components/MissionCtrl/RocketChip/RocketChip';\nimport SegmentClickTracker from 'components/SegmentClickTracker/SegmentClickTrackerContainer';\n\nconst maxLength128 = maxLength(128);\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n newInstanceName: PropTypes.string.isRequired,\n newInstanceService: PropTypes.shape({\n id: PropTypes.string,\n name: PropTypes.string,\n maturityLevel: PropTypes.number,\n }).isRequired,\n newInstanceServiceSubtype: PropTypes.shape({\n id: PropTypes.string,\n }).isRequired,\n newInstanceVersion: PropTypes.string.isRequired,\n newInstanceRegion: PropTypes.string.isRequired,\n newInstanceCloudProvider: PropTypes.shape({\n id: PropTypes.string,\n name: PropTypes.string,\n }).isRequired,\n selectService: PropTypes.func.isRequired,\n selectServiceSubtype: PropTypes.func.isRequired,\n selectProvider: PropTypes.func.isRequired,\n selectVersion: PropTypes.func.isRequired,\n selectRegion: PropTypes.func.isRequired,\n enterName: PropTypes.func.isRequired,\n services: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n serviceSubtypes: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n cloudProviders: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n versions: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n initialize: PropTypes.func.isRequired,\n isORv4User: PropTypes.bool.isRequired,\n trackButtonClick: PropTypes.func.isRequired,\n validRegions: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n user: PropTypes.shape({\n id: PropTypes.string,\n email: PropTypes.string,\n organizationId: PropTypes.string,\n ORv4ID: PropTypes.string,\n }).isRequired,\n};\n\nexport function UnstyledStepOne({\n newInstanceName,\n newInstanceService,\n newInstanceServiceSubtype,\n newInstanceVersion,\n newInstanceRegion,\n newInstanceCloudProvider,\n selectService,\n selectVersion,\n selectRegion,\n enterName,\n selectProvider,\n classes,\n services,\n serviceSubtypes,\n cloudProviders,\n versions,\n selectServiceSubtype,\n initialize,\n isORv4User,\n trackButtonClick,\n validRegions,\n user,\n}) {\n const isStateEmpty = (state) => !state || Object.keys(state).length === 0;\n\n const currentVersions = !isStateEmpty(newInstanceService)\n ? versions\n .filter(\n (catalogVersion) =>\n catalogVersion.serviceSubtype === newInstanceServiceSubtype.id &&\n catalogVersion.displaySetting === 1,\n )\n .map((catalogVersion) => (\n <MenuItem key={catalogVersion.id} value={catalogVersion.name}>\n {catalogVersion.name}\n </MenuItem>\n ))\n : [];\n\n const handleWidgetClick = (requestSource) => {\n // init user specs\n const { id, email, organizationId, ORv4ID } = user;\n // init realtime instance spec. selections\n const instanceName = newInstanceName || '';\n const instanceService = newInstanceService.name || '';\n const instanceVersion = newInstanceVersion || '';\n const instanceCloudProvider = newInstanceCloudProvider.name || '';\n const requestType = requestSource || '';\n // eslint-disable-next-line no-underscore-dangle\n const chatlioWidget = window._chatlio;\n\n // hide the widget if it's shown\n if (chatlioWidget.isShown()) {\n chatlioWidget.hide();\n chatlioWidget.reset();\n } else {\n // identify the user\n chatlioWidget.identify(id, {\n email,\n organizationId,\n ORv4ID,\n instanceName,\n instanceService,\n instanceVersion,\n instanceCloudProvider,\n requestType,\n });\n // configure the widget\n chatlioWidget.configure({\n status: 'offline',\n offlineGreeting: 'Looking for a new region? Let us know!',\n offlineMessagePlaceholder: 'Where would you like to host your data?',\n });\n chatlioWidget.show({ expanded: true });\n }\n };\n\n const regionOptions = !isStateEmpty(newInstanceService)\n ? validRegions.map((currentRegion) => (\n <MenuItem key={currentRegion.id} value={currentRegion.name}>\n {currentRegion.name}\n </MenuItem>\n ))\n : null;\n\n const currentSubtypes = {};\n\n const isRedisInCatalog =\n services.filter((service) => service.name === 'Redis' && service.displaySetting === 1).length >\n 0;\n\n const servicesOnlyInORv4 = isRedisInCatalog ? ['MongoDB'] : ['MongoDB', 'Redis'];\n const orv4Chips = isORv4User\n ? servicesOnlyInORv4.map((orv4Service) => (\n <SegmentClickTracker key={orv4Service} buttonName={orv4Service.concat(' SSO')}>\n <RocketChip\n component=\"a\"\n href={process.env.REACT_APP_ORV4_SSO_LOGIN}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n key={orv4Service}\n label={orv4Service}\n icon={<ServiceIcon service={orv4Service} isAlpha={false} />}\n onClick={() => {}}\n isORv4\n isSelected={false}\n />\n </SegmentClickTracker>\n ))\n : [];\n\n const clickService = (event, catalogService) => {\n selectService(\n event,\n catalogService,\n currentSubtypes[catalogService.id][0],\n newInstanceCloudProvider.id ? newInstanceCloudProvider : cloudProviders[0],\n );\n\n if (newInstanceCloudProvider.name === 'GCP' && catalogService.name === 'CockroachDB') {\n selectProvider({}, cloudProviders[0]);\n }\n };\n\n const serviceChips = !isStateEmpty(services)\n ? services\n .filter((service) => service.displaySetting === 1)\n .map((catalogService) => {\n currentSubtypes[catalogService.id] = serviceSubtypes.filter(\n (catalogServiceSubtype) =>\n catalogServiceSubtype.service === catalogService.id &&\n catalogServiceSubtype.displaySetting === 1,\n );\n return (\n <SegmentClickTracker key={catalogService.id} buttonName={catalogService.name}>\n <RocketChip\n key={catalogService.id}\n label={catalogService.name}\n onClick={(event) => clickService(event, catalogService)}\n isSelected={catalogService.name === newInstanceService.name}\n icon={\n <ServiceIcon\n service={catalogService.name}\n isAlpha={catalogService.maturityLevel === 1}\n />\n }\n clickable\n />\n </SegmentClickTracker>\n );\n })\n : null;\n\n const allServiceChips = !isStateEmpty(services) ? [...serviceChips, ...orv4Chips] : null;\n\n const serviceSubtypeChips = !isStateEmpty(newInstanceService)\n ? currentSubtypes[newInstanceService.id].map((catalogServiceSubtype) => (\n <SegmentClickTracker\n key={catalogServiceSubtype.id}\n buttonName={newInstanceService.name.concat(' ', catalogServiceSubtype.name.toUpperCase())}\n >\n <RocketChip\n key={catalogServiceSubtype.id}\n label={catalogServiceSubtype.name}\n onClick={(event) => selectServiceSubtype(event, catalogServiceSubtype)}\n isSelected={catalogServiceSubtype.id === newInstanceServiceSubtype.id}\n />\n </SegmentClickTracker>\n ))\n : null;\n\n let visibleCloudProviders = cloudProviders;\n\n if (newInstanceService.name === 'CockroachDB') {\n visibleCloudProviders = cloudProviders.filter((cloudProvider) => cloudProvider.name !== 'GCP');\n }\n\n const orv5cloudProviderChips = visibleCloudProviders.map((catalogCloudProvider) => (\n // eslint-disable-next-line max-len\n <SegmentClickTracker\n key={catalogCloudProvider.id}\n buttonName={catalogCloudProvider.name.toUpperCase()}\n >\n <RocketChip\n key={catalogCloudProvider.id}\n label={catalogCloudProvider.name}\n onClick={(event) => selectProvider(event, catalogCloudProvider)}\n isSelected={catalogCloudProvider.id === newInstanceCloudProvider.id}\n className={classnames(\n classes.serviceSubtype,\n catalogCloudProvider.id === newInstanceCloudProvider.id\n ? classes.selectedServiceSubtype\n : null,\n )}\n />\n </SegmentClickTracker>\n ));\n\n const orv4CloudProviders = ['Rackspace'];\n const servicesAlsoInORv4 = ['Redis', 'Elasticsearch'];\n const orv4CloudProviderChips = servicesAlsoInORv4.includes(newInstanceService.name)\n ? orv4CloudProviders.map((orv4CloudProvider) => (\n <SegmentClickTracker key={orv4CloudProvider} buttonName={orv4CloudProvider.concat(' SSO')}>\n <RocketChip\n component=\"a\"\n href={process.env.REACT_APP_ORV4_SSO_LOGIN}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n key={orv4CloudProvider}\n label={orv4CloudProvider}\n onClick={() => {}}\n isORv4\n isSelected={false}\n />\n </SegmentClickTracker>\n ))\n : [];\n\n const cloudProviderChips = [...orv5cloudProviderChips, ...orv4CloudProviderChips];\n\n React.useEffect(() => {\n initialize({ name: newInstanceName });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n <React.Fragment>\n <div className={classes.container}>\n <div className={classes.form}>\n <Field\n name=\"name\"\n label=\"Name\"\n variant=\"outlined\"\n placeholder=\"What do you want to name your instance?\"\n validate={[required, maxLength128]}\n onChange={enterName}\n component={WrappedTextField}\n props={{ InputLabelProps: { shrink: true, className: classes.inputLabel } }}\n className={classes.nameField}\n fullWidth\n autoFocus\n />\n\n <div className={classes.servicesContainer}>\n <Typography className={classes.chipSectionLabel} component=\"p\">\n Select Your Service:\n </Typography>\n <div className={classes.serviceChipContainer}>{allServiceChips}</div>\n </div>\n\n {!isStateEmpty(newInstanceService) ? (\n <div className={classes.cloudAndServiceContainer}>\n <div className={classes.cloudContainer}>\n <Typography className={classes.chipSectionLabel} component=\"p\">\n Cloud Provider:\n </Typography>\n {cloudProviderChips}\n </div>\n\n <div className={classes.typeContainer}>\n <Typography className={classes.chipSectionLabel} component=\"p\">\n Type:\n </Typography>\n {serviceSubtypeChips}\n </div>\n </div>\n ) : null}\n\n <div className={classes.selectionContainer}>\n <Field\n classes={{ root: classes.selectionFormRoot }}\n variant=\"outlined\"\n name=\"versions\"\n label=\"Version\"\n component={WrappedTextField}\n disabled={currentVersions.length === 0}\n onChange={(e) => {\n selectVersion(e);\n trackButtonClick(\n newInstanceService.name.concat(' ', e.target.value.toUpperCase(), ' Version'),\n );\n }}\n select\n validate={[maxLength128, required]}\n InputLabelProps={{\n shrink: true,\n className: classes.inputLabel,\n }}\n SelectProps={{\n displayEmpty: true,\n value: newInstanceVersion,\n classes: { root: classes.selectRoot },\n }}\n className={classes.state}\n >\n <MenuItem value=\"0\" disabled>\n Select Your Version\n </MenuItem>\n {currentVersions}\n </Field>\n <div className={classes.selectionFormRootSubText}>\n <Field\n classes={{ root: classes.selectionFormRoot }}\n variant=\"outlined\"\n name=\"regions\"\n label=\"Region\"\n component={WrappedTextField}\n disabled={isStateEmpty(newInstanceService)}\n onChange={(e) => {\n selectRegion(e);\n trackButtonClick(\n newInstanceService.name.concat(' ', e.target.value.toUpperCase(), ' Region'),\n );\n }}\n select\n validate={[maxLength128, required]}\n InputLabelProps={{\n shrink: true,\n className: classes.inputLabel,\n }}\n SelectProps={{\n displayEmpty: true,\n value: newInstanceRegion,\n classes: { root: classes.selectRoot },\n }}\n className={classes.state}\n >\n <MenuItem value=\"0\" disabled>\n Select Your Region\n </MenuItem>\n {regionOptions}\n </Field>\n <Typography\n name=\"regionRequest\"\n className={classes.widgetButtonLabel}\n onClick={() => handleWidgetClick('Request Region')}\n >\n Request Another Region\n </Typography>\n </div>\n </div>\n </div>\n <Paper className={classes.infoBox} elevation={0}>\n <Typography component=\"div\">\n <div>\n <p>\n Configure your ObjectRocket datastore instance and receive best-in-class service.\n </p>\n </div>\n {(newInstanceService.maturityLevel === 1 || newInstanceService.maturityLevel === 2) && (\n <div>\n <p>\n <strong>\n Our \n {newInstanceService.name}\n service is currently in \n {newInstanceService.maturityLevel === 1 ? 'alpha' : 'beta'}.\n </strong>\n </p>\n </div>\n )}\n {newInstanceService.maturityLevel === 1 && (\n <div>\n <p>\n ObjectRocket Alpha products are subject to our \n <a\n href=\"https://www.rackspace.com/information/legal/testterms\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Test Terms\n </a>\n and do not adhere to ObjectRocket support SLAs. Alpha products are for\n evaluation and testing purposes only and carry a limited feature set.\n </p>\n <p>\n Features like HA, backups, security, and ObjectRocket support are not guaranteed\n on all services while in Alpha.\n </p>\n </div>\n )}\n {newInstanceService.maturityLevel === 2 && (\n <div>\n <p>\n ObjectRocket Beta products are subject to our \n <a\n href=\"https://www.rackspace.com/information/legal/testterms\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Test Terms\n </a>\n and do not adhere to ObjectRocket support SLAs. Therefore we strongly\n advise against using Beta services in any production environment.\n </p>\n <p>\n Features like HA, backups, and ObjectRocket support are not guaranteed on all\n services while in Beta.\n </p>\n </div>\n )}\n {newInstanceService.maturityLevel === 3 && (\n <div>\n All ObjectRocket services include:\n <ul>\n <li>HA clusters</li>\n <li>Dedicated containers</li>\n <li>\n Security via IP whitelists, encryption in transit, encryption at rest, and user\n auth\n </li>\n <li>24x7 ObjectRocket support</li>\n </ul>\n </div>\n )}\n <div>\n <p>\n Don’t see what you’re looking for? ObjectRocket offers a number of customer options\n and features, so contact \n <a href=\"mailto:sales@objectrocket.com\">sales@objectrocket.com</a>\n for more information\n </p>\n </div>\n </Typography>\n </Paper>\n </div>\n </React.Fragment>\n );\n}\n\nUnstyledStepOne.propTypes = propTypes;\n\nconst styles = (theme) => ({\n container: {\n display: 'flex',\n justifyContent: 'space-between',\n marginBottom: '1rem',\n\n [theme.breakpoints.down('sm')]: {\n flexDirection: 'column',\n marginBottom: 0,\n },\n },\n form: {\n flex: '0 0 60%',\n '& > *': {\n marginTop: theme.spacing(1),\n },\n },\n nameField: {\n width: '100%',\n\n [theme.breakpoints.down('sm')]: {\n width: '100%',\n '& input': {\n fontSize: '4.5vw',\n },\n },\n },\n inputLabel: {\n color: theme.palette.text.primary,\n },\n chipSectionLabel: {\n fontSize: 12,\n },\n widgetButtonLabel: {\n align: 'left',\n color: '#0000EE',\n textDecoration: 'underline',\n cursor: 'pointer',\n fontStyle: 'italic',\n fontSize: '11px',\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n marginLeft: theme.spacing(1),\n width: 'max-content',\n },\n selectionContainer: {\n display: 'flex',\n justifyContent: 'space-between',\n flexWrap: 'wrap',\n marginTop: theme.spacing(2.5),\n\n [theme.breakpoints.down('xs')]: {\n flexDirection: 'column',\n width: '100%',\n },\n },\n selectionFormRoot: {\n flex: '0 0 49%',\n },\n selectionFormRootSubText: {\n flex: '0 0 49%',\n display: 'grid',\n },\n selectRoot: {\n '&:focus': {\n backgroundColor: 'unset',\n },\n },\n serviceChipContainer: {\n display: 'flex',\n flexWrap: 'wrap',\n columnGap: theme.spacing(1),\n\n [theme.breakpoints.down('xs')]: {\n flexDirection: 'column',\n rowGap: `${theme.spacing(1)}px`,\n },\n },\n serviceSubtype: {\n justifyContent: 'space-between',\n backgroundColor: theme.customColors.lightGrey,\n marginTop: theme.spacing(1),\n '&:not(:last-child)': {\n marginRight: theme.spacing(1),\n },\n '&:hover': {\n backgroundColor: theme.customColors.lightGrey,\n },\n '&:active, &:focus': {\n backgroundColor: theme.customColors.peach,\n },\n\n [theme.breakpoints.down('xs')]: {\n width: '100%',\n },\n },\n selectedServiceSubtype: {\n backgroundColor: theme.customColors.peach,\n },\n infoBox: {\n flex: '0 0 27%',\n alignSelf: 'flex-start',\n marginTop: '2rem',\n marginRight: '2rem',\n borderLeft: `1px solid ${theme.customColors.mediumGrey}`,\n borderRadius: 'unset',\n fontStyle: 'italic',\n paddingLeft: theme.spacing(1),\n color: theme.customColors.mediumGrey,\n fontSize: '.9rem',\n '& div': {\n color: 'unset',\n fontSize: 'unset',\n },\n\n [theme.breakpoints.down('sm')]: {\n display: 'none',\n },\n },\n cloudAndServiceContainer: {\n display: 'flex',\n\n [theme.breakpoints.down('xs')]: {\n flexDirection: 'column',\n },\n },\n cloudContainer: {\n marginRight: theme.spacing(2),\n\n [theme.breakpoints.down('xs')]: {\n marginRight: 'unset',\n },\n },\n listItemRoot: {\n padding: 'unset',\n },\n listItemIconRoot: {\n alignSelf: 'flex-start',\n marginRight: '.2rem',\n marginTop: '.375rem',\n },\n listBullet: {\n // Using px instead of rem because Chrome doesn't display\n // this icon properly at rems less than one. It doesn't scale,\n // but it still looks ok at larger font sizes.\n fontSize: '4px',\n },\n rocketContainer: {\n marginTop: '2rem',\n },\n});\n\nexport default withStyles(styles)(reduxForm({ form: 'newInstanceName' })(UnstyledStepOne));\n","import { connect } from 'react-redux';\n\nimport { actionCreators } from 'dux/clickTracker';\nimport { selectors as userSelectors } from 'dux/user';\nimport { selectors as catalogSelectors } from 'dux/catalog';\nimport StepOne from './StepOne';\n\nfunction mapStateToProps(state) {\n return {\n isORv4User: userSelectors.isORv4User(state),\n validRegions: catalogSelectors.regionsByServiceSubtypeSelector(state),\n user: userSelectors.getIdentityState(state),\n };\n}\n\nconst mapDispatchToProps = {\n trackButtonClick: actionCreators.trackButtonClick,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(StepOne);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport Menu from '@material-ui/core/Menu';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport Icon from '@material-ui/core/Icon';\nimport range from 'lodash/range';\nimport { uiState } from 'react-redux-ui-state';\n\nimport ORTypography from 'components/ORTypography/ORTypography';\n\nconst propTypes = {\n addons: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n newInstanceAddons: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n selectAddon: PropTypes.func.isRequired,\n deselectAddon: PropTypes.func.isRequired,\n getPrice: PropTypes.func.isRequired,\n openMenu: PropTypes.string.isRequired,\n anchorEl: PropTypes.shape({}).isRequired,\n classes: PropTypes.shape({}).isRequired,\n setUiState: PropTypes.func.isRequired,\n priceNeedsUpdating: PropTypes.bool.isRequired,\n priceInfo: PropTypes.instanceOf(Array).isRequired,\n};\n\nexport function UnstyledAddonCards({\n addons,\n priceInfo,\n newInstanceAddons,\n selectAddon,\n deselectAddon,\n getPrice,\n openMenu,\n anchorEl,\n priceNeedsUpdating,\n classes,\n setUiState,\n}) {\n const handleCardIconClick = (addonId, addonName, addonValue, isSelected) => () => {\n if (isSelected) {\n deselectAddon(addonId);\n } else {\n selectAddon(addonId, addonName, addonValue);\n }\n setUiState({ priceNeedsUpdating: true });\n };\n\n const handleMenuClick = (menuId) => (event) => {\n setUiState({\n openMenu: menuId,\n anchorEl: event.currentTarget,\n });\n };\n\n const handleClose = () => {\n setUiState({\n openMenu: '',\n anchorEl: {},\n });\n };\n\n const handleMenuItemClick = (addonId, addonName, addonValue) => () => {\n handleClose();\n selectAddon(addonId, addonName, addonValue);\n setUiState({ priceNeedsUpdating: true });\n };\n\n function createMenu(addonId, addonName, valueObject) {\n let options;\n const validValueTypes = ['integer', 'string'];\n\n if (!validValueTypes.includes(valueObject.type)) {\n return null;\n }\n\n if (valueObject.type === 'integer') {\n options = range(Number(valueObject.minimum), Number(valueObject.maximum) + 1).reverse();\n }\n if (valueObject.type === 'string') {\n options = valueObject.enum;\n }\n\n return options.map((option) => {\n const isSelected =\n newInstanceAddons.filter((newAddon) => newAddon.value === option).length > 0 ? '1' : '0';\n return (\n <MenuItem\n key={option}\n onClick={handleMenuItemClick(addonId, addonName, option)}\n className={classes.addonMenuItem}\n is-selected={isSelected}\n >\n {option}\n </MenuItem>\n );\n });\n }\n\n const addonCards = addons\n .filter((addon) => addon.displaySetting === 1)\n .map((addon) => {\n const isSelected =\n newInstanceAddons.filter((newAddon) => newAddon.id === addon.id).length > 0 ? '1' : '0';\n let defaultValue;\n if (addon.value.type === 'boolean') {\n defaultValue = true;\n } else if (addon.value.type === 'string') {\n [defaultValue] = addon.value.enum;\n } else {\n defaultValue = addon.value.default;\n }\n\n return (\n <div key={addon.id} className={classes.addonCard} is-selected={isSelected}>\n <Icon\n className={classes.addonCardSelectionIndicator}\n onClick={handleCardIconClick(addon.id, addon.name, defaultValue, Number(isSelected))}\n is-selected={isSelected}\n >\n done\n </Icon>\n\n <div className={classes.addonCardTextSection}>\n <ORTypography variant=\"h6\" className={classes.addonCardHeader}>\n {addon.displayName}\n </ORTypography>\n <ORTypography className={classes.addonCardText}>{addon.description}</ORTypography>\n </div>\n\n {addon.value.type !== 'boolean' && (\n <React.Fragment>\n <Icon\n className={classes.addonCardSelectionMenuIcon}\n onClick={handleMenuClick(addon.id)}\n >\n more_horiz\n </Icon>\n\n <Menu\n id={`${addon.id}-menu`}\n transformOrigin={{\n vertical: 'top',\n horizontal: 'right',\n }}\n anchorEl={anchorEl}\n keepMounted\n open={openMenu === addon.id}\n onClose={handleClose}\n >\n {createMenu(addon.id, addon.name, addon.value)}\n </Menu>\n </React.Fragment>\n )}\n </div>\n );\n });\n\n if (priceNeedsUpdating) {\n getPrice(...priceInfo, newInstanceAddons);\n setUiState({\n priceNeedsUpdating: false,\n });\n }\n return <React.Fragment>{addonCards}</React.Fragment>;\n}\n\nUnstyledAddonCards.propTypes = propTypes;\n\nconst styles = (theme) => ({\n addonCard: {\n border: `1px solid ${theme.customColors.black}`,\n borderRadius: 4,\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n padding: theme.spacing(1),\n marginBottom: theme.spacing(1),\n\n '&[is-selected=\"1\"]': {\n border: `2px solid ${theme.customColors.teal}`,\n },\n },\n addonCardSelectionIndicator: {\n alignSelf: 'flex-start',\n fontSize: '4rem',\n marginRight: theme.spacing(1),\n\n '&:hover': {\n cursor: 'pointer',\n },\n\n '&[is-selected=\"1\"]': {\n color: theme.customColors.teal,\n },\n },\n addonCardSelectionMenuIcon: {\n alignSelf: 'baseline',\n\n '&:hover': {\n cursor: 'pointer',\n },\n },\n addonMenuItem: {\n '&[is-selected=\"1\"]': {\n backgroundColor: theme.customColors.sky,\n },\n },\n addonCardHeader: {\n fontSize: '1rem',\n color: theme.customColors.black,\n },\n addonCardText: {\n fontSize: '1rem',\n color: theme.customColors.mediumGrey,\n },\n});\n\nexport const uiConfig = {\n name: 'createInstance',\n state: () => ({\n openMenu: '',\n anchorEl: {},\n priceNeedsUpdating: false,\n }),\n};\n\nexport default uiState(uiConfig)(withStyles(styles)(UnstyledAddonCards));\n","import { connect } from 'react-redux';\n\nimport { actionCreators, selectors } from 'dux/createInstance';\nimport AddonCards from './AddonCards';\n\nfunction mapStateToProps(state) {\n const { newInstanceAddons } = selectors.getCreateInstanceState(state).newInstance;\n return { newInstanceAddons };\n}\n\nconst mapDispatchToProps = {\n selectAddon: actionCreators.selectAddon,\n deselectAddon: actionCreators.deselectAddon,\n getPrice: actionCreators.getPrice,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(AddonCards);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport Typography from '@material-ui/core/Typography';\nimport Icon from '@material-ui/core/Icon';\nimport Button from '@material-ui/core/Button';\nimport ExpansionPanel from '@material-ui/core/ExpansionPanel';\nimport ExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails';\nimport ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport { uiState } from 'react-redux-ui-state';\n\nimport AddonCards from './AddonCards/AddonCardsContainer';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n newInstanceService: PropTypes.shape({\n name: PropTypes.string,\n }).isRequired,\n newInstanceFlavorIndex: PropTypes.number.isRequired,\n newInstancePlan: PropTypes.shape({\n nodes: PropTypes.shape({}),\n }).isRequired,\n selectFlavor: PropTypes.func.isRequired,\n selectPlan: PropTypes.func.isRequired,\n flavors: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n addons: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n plans: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n newInstanceServiceSubtype: PropTypes.shape({\n id: PropTypes.string,\n }).isRequired,\n newInstancePlanIndex: PropTypes.number.isRequired,\n newInstanceAddons: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n getPrice: PropTypes.func.isRequired,\n regionId: PropTypes.string.isRequired,\n getPriceDebounced: PropTypes.func.isRequired,\n setUiState: PropTypes.func.isRequired,\n priceInitialized: PropTypes.bool.isRequired,\n user: PropTypes.shape({\n id: PropTypes.string,\n email: PropTypes.string,\n organizationId: PropTypes.string,\n ORv4ID: PropTypes.string,\n }).isRequired,\n};\n\nexport function UnstyledStepTwo(props) {\n const {\n classes,\n newInstanceFlavorIndex,\n newInstancePlan,\n selectFlavor,\n selectPlan,\n flavors,\n plans,\n addons,\n newInstanceServiceSubtype,\n newInstancePlanIndex,\n newInstanceService,\n newInstanceAddons,\n getPrice,\n regionId,\n getPriceDebounced,\n setUiState,\n priceInitialized,\n user,\n } = props;\n\n const handleWidgetClick = (requestSource) => {\n // init user specs\n const { id, email, organizationId, ORv4ID } = user;\n // init realtime instance spec. selections\n const instanceService = newInstanceService.name || '';\n const requestType = requestSource || '';\n // eslint-disable-next-line no-underscore-dangle\n const chatlioWidget = window._chatlio;\n if (chatlioWidget.isShown()) {\n chatlioWidget.hide();\n chatlioWidget.reset();\n } else {\n // identify the user\n chatlioWidget.identify(id, {\n email,\n organizationId,\n ORv4ID,\n instanceService,\n requestType,\n });\n // configure the widget\n chatlioWidget.configure({\n status: 'offline',\n offlineGreeting: 'Looking for a custom plan size? Let us know!',\n offlineMessagePlaceholder: 'What would you like your plan to look like?',\n });\n chatlioWidget.show({ expanded: true });\n }\n };\n\n const validFlavors = flavors.filter(\n (catalogFlavor) =>\n catalogFlavor.serviceSubtype === newInstanceServiceSubtype.id &&\n catalogFlavor.displaySetting === 1,\n );\n\n const plansBySubtype = plans.filter(\n (catalogPlan) => catalogPlan.serviceSubtype === newInstanceServiceSubtype.id,\n );\n\n const validPlans = validFlavors.reduce((acc, validFlavor) => {\n acc[validFlavor.id] = plansBySubtype.filter(\n (planBySubtype) =>\n planBySubtype.flavor === validFlavor.id && planBySubtype.displaySetting === 1,\n );\n return acc;\n }, {});\n\n const addonsByServiceSubtype = addons.filter(\n (addon) => addon.serviceSubtype === newInstanceServiceSubtype.id && addon.displaySetting === 1,\n );\n\n const hasAddons = addonsByServiceSubtype.length > 0;\n\n if (!priceInitialized) {\n getPrice(\n regionId,\n newInstancePlanIndex,\n validPlans[validFlavors[newInstanceFlavorIndex > 0 ? newInstanceFlavorIndex : 0].id],\n newInstanceAddons,\n );\n setUiState({ priceInitialized: true });\n }\n\n function panelChanger(index, defaultPlan) {\n selectFlavor(index, defaultPlan);\n setUiState({ priceInitialized: false });\n }\n\n const flavorPanels = validFlavors.map((validFlavor, index) => (\n <ExpansionPanel\n id={`panel${index}`}\n key={validFlavor.name}\n elevation={0}\n value={index}\n className={classes.flavorPanel}\n // expanded={hasAddons ? newInstanceFlavorIndex === index : true}\n expanded={newInstanceFlavorIndex === index}\n onChange={hasAddons ? () => panelChanger(index, validPlans[validFlavor.id][0]) : null}\n onClick={hasAddons ? null : () => panelChanger(index, validPlans[validFlavor.id][0])}\n >\n <ExpansionPanelSummary\n expandIcon={validFlavors.length === 1 ? null : <ExpandMoreIcon />}\n className={classes.panelSummary}\n classes={{\n content: classes.panelSummaryContent,\n expanded: classes.panelSummaryExpanded,\n expandIcon: classes.panelSumaryExpandIcon,\n }}\n is-selected={newInstanceFlavorIndex === index ? '1' : '0'}\n >\n {validFlavor.name}\n </ExpansionPanelSummary>\n <ExpansionPanelDetails className={classes.panelDetail}>\n {/* eslint-disable-next-line react/no-danger */}\n <div dangerouslySetInnerHTML={{ __html: validFlavor.description }} />\n </ExpansionPanelDetails>\n </ExpansionPanel>\n ));\n\n const planNode =\n typeof newInstancePlan.nodes !== 'undefined'\n ? newInstancePlan.nodes[newInstanceService.name.toLowerCase()]\n : {};\n\n function handleButtonClick(newPlanIndex) {\n selectPlan(newPlanIndex, validPlans[validFlavors[newInstanceFlavorIndex].id]);\n getPriceDebounced(\n regionId,\n newPlanIndex,\n validPlans[validFlavors[newInstanceFlavorIndex].id],\n newInstanceAddons,\n );\n }\n\n let currentPlan;\n if (newInstanceFlavorIndex === -1) {\n selectFlavor(0, validPlans[validFlavors[0].id][0]);\n currentPlan = validPlans[validFlavors[0].id];\n } else {\n currentPlan = validPlans[validFlavors[newInstanceFlavorIndex].id];\n }\n\n const dbtype = newInstanceService.name.toLowerCase();\n const selectedPlanStorage = (() => {\n if (dbtype === 'redis') {\n return null;\n }\n if (dbtype === 'mongodb') {\n return `${planNode.diskSizeGb}GB`;\n }\n const storageSize =\n newInstanceFlavorIndex > -1 ? planNode.diskSizeGb * planNode.quantity : null;\n return `${storageSize}GB`;\n })();\n\n const selectedPlanMemory = (() => {\n if (newInstanceFlavorIndex === -1) {\n return null;\n }\n\n let memorySize;\n if (dbtype === 'redis' || dbtype === 'mongodb') {\n memorySize = planNode.memoryMb / 1024;\n } else {\n memorySize = (planNode.memoryMb / 1024) * planNode.quantity;\n }\n return `${memorySize}GB`;\n })();\n\n const separator = selectedPlanStorage && selectedPlanMemory ? ' / ' : null;\n\n return (\n <React.Fragment>\n <div className={classes.planContainer}>\n <div className={classes.cardStuff}>\n <div className={classes.flavorSection} addonspresent={hasAddons ? '1' : '0'}>\n <Typography className={classes.planSectionHeader} component=\"h5\">\n Pick Your Flavor:\n </Typography>\n <div className={classes.cardContainer} addonspresent={hasAddons ? '1' : '0'}>\n {flavorPanels}\n </div>\n </div>\n\n {hasAddons && (\n <div className={classes.addonSection}>\n <Typography className={classes.planSectionHeader} component=\"h5\">\n Customize Your Instance:\n </Typography>\n <AddonCards\n addons={addonsByServiceSubtype}\n priceInfo={[regionId, newInstancePlanIndex, currentPlan]}\n />\n </div>\n )}\n </div>\n <div className={classes.sliderStuff}>\n <Typography className={classes.planSectionHeader} component=\"h5\">\n Capacity (Storage/Memory):\n </Typography>\n <div className={classes.sliderButtonContainer}>\n <Button\n name=\"lowerPlanButton\"\n disabled={newInstanceFlavorIndex < 0}\n variant=\"contained\"\n color=\"secondary\"\n classes={{ root: classes.removeButtonRoot }}\n onClick={() => handleButtonClick(newInstancePlanIndex - 1)}\n >\n <Icon>remove</Icon>\n </Button>\n <Typography\n component=\"span\"\n color=\"primary\"\n classes={{ root: classes.sizeDisplayRoot }}\n >\n {selectedPlanStorage}\n {separator}\n {selectedPlanMemory}\n </Typography>\n <Button\n name=\"higherPlanButton\"\n disabled={newInstanceFlavorIndex < 0}\n variant=\"contained\"\n color=\"secondary\"\n classes={{ root: classes.addButtonRoot }}\n onClick={() => handleButtonClick(newInstancePlanIndex + 1)}\n >\n <Icon>add</Icon>\n </Button>\n </div>\n </div>\n <div className={classes.widgetContainer}>\n <Typography\n name=\"requestPlan\"\n className={classes.widgetButtonLabel}\n onClick={() => handleWidgetClick('Request Plan')}\n >\n Don't Like What You See? Request A Custom Plan\n </Typography>\n </div>\n </div>\n </React.Fragment>\n );\n}\n\nUnstyledStepTwo.propTypes = propTypes;\n\nconst styles = (theme) => ({\n planContainer: {\n display: 'flex',\n marginBottom: theme.spacing(2),\n flexDirection: 'column',\n rowGap: `${theme.spacing(2)}px`,\n\n [theme.breakpoints.down('md')]: {\n marginBottom: 0,\n },\n },\n planSectionHeader: {\n fontSize: 12,\n marginBottom: '.2rem',\n },\n cardStuff: {\n display: 'flex',\n justifyContent: 'space-around',\n columnGap: theme.spacing(2),\n rowGap: `${theme.spacing(2)}px`,\n\n [theme.breakpoints.down('md')]: {\n flexDirection: 'column',\n },\n },\n flavorSection: {\n flex: '1',\n },\n addonSection: {\n flex: '1',\n },\n cardContainer: {\n '&[addonspresent=\"0\"]': {\n display: 'flex',\n alignItems: 'baseline',\n columnGap: theme.spacing(2),\n\n [theme.breakpoints.down('md')]: {\n alignItems: 'stretch',\n },\n },\n\n [theme.breakpoints.down('md')]: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'stretch',\n },\n },\n flavorPanel: {\n flex: 1,\n border: `1px solid ${theme.customColors.black}`,\n borderRadius: 4,\n overflow: 'hidden',\n '&&': { margin: `0 0 ${theme.spacing(1)}px 0` },\n\n '&:hover': {\n cursor: 'pointer',\n },\n },\n panelSummary: {\n '&&': { minHeight: 'unset' },\n display: 'block',\n position: 'relative',\n\n '&[is-selected=\"1\"]': {\n backgroundColor: theme.customColors.sky,\n },\n },\n panelSummaryContent: {\n justifyContent: 'center',\n fontWeight: 'bold',\n '&&': { margin: 0 },\n\n '&[expanded]': {\n margin: 0,\n },\n },\n panelSumaryExpandIcon: {\n margin: 0,\n padding: 0,\n position: 'absolute',\n top: 0,\n right: 0,\n },\n panelDetail: {\n justifyContent: 'center',\n padding: theme.spacing(2),\n\n '& ul': {\n margin: 0,\n padding: 0,\n fontSize: '0.8571rem',\n color: theme.customColors.mediumGrey,\n listStyleType: 'none',\n textAlign: 'center',\n lineHeight: '1.2857rem',\n },\n '& h6': { display: 'none' },\n },\n planHeader: {\n fontWeight: 'bold',\n },\n sliderStuff: {\n flexGrow: '1',\n display: 'flex',\n flexDirection: 'column',\n padding: '0',\n marginTop: '24px',\n justifyContent: 'space-between',\n '&:last-child': {\n marginBottom: '1rem',\n },\n\n [theme.breakpoints.down('md')]: {\n padding: `0 ${theme.spacing(1)}px`,\n },\n },\n sliderRoot: {\n marginTop: '.5rem',\n },\n sliderTrack: {\n backgroundColor: theme.customColors.teal,\n },\n sliderButtonContainer: {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n\n [theme.breakpoints.down('md')]: {\n marginTop: theme.spacing(1),\n },\n },\n sizeDisplayRoot: {\n fontSize: '2.5rem',\n border: `1px solid ${theme.customColors.mediumGrey}`,\n borderRadius: 4,\n width: '100%',\n textAlign: 'center',\n\n [theme.breakpoints.down('md')]: {\n marginTop: theme.spacing(1),\n },\n },\n removeButtonRoot: {\n borderRadius: '50% 0 0 50%',\n minWidth: 'unset',\n width: theme.spacing(6),\n height: theme.spacing(6),\n marginRight: theme.spacing(1),\n },\n addButtonRoot: {\n borderRadius: '0 50% 50% 0',\n minWidth: 'unset',\n width: theme.spacing(6),\n height: theme.spacing(6),\n marginLeft: theme.spacing(1),\n },\n nodeLabel: {\n ...theme.typography.h5,\n textAlign: 'center',\n marginTop: theme.spacing(1),\n fontSize: '12px',\n\n [theme.breakpoints.down('md')]: {\n textAlign: 'left',\n marginTop: theme.spacing(2),\n },\n },\n nodesAndInfo: {\n display: 'flex',\n flexDirection: 'column',\n\n [theme.breakpoints.down('md')]: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n [theme.breakpoints.down('xs')]: {\n flexDirection: 'column',\n justifyContent: 'space-between',\n },\n },\n nodeGrid: {\n justifyContent: 'center',\n\n [theme.breakpoints.down('md')]: {\n marginTop: theme.spacing(1),\n width: 'unset',\n },\n },\n nodeRoot: {\n boxShadow:\n '0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)',\n fontSize: '1.15rem',\n margin: '0 10px',\n\n [theme.breakpoints.down('md')]: {\n marginRight: '.5rem',\n },\n [theme.breakpoints.down('xs')]: {\n marginRight: 'unset',\n },\n },\n primaryNode: {\n backgroundColor: theme.customColors.black,\n },\n secondaryNode: {\n color: theme.customColors.black,\n backgroundColor: theme.customColors.lightGrey,\n },\n sizeInfo: {\n textAlign: 'center',\n color: theme.customColors.orange,\n fontSize: '1.25rem',\n marginTop: theme.spacing(3),\n },\n contactSupportText: {\n fontSize: '.8rem',\n borderRadius: 'unset',\n textAlign: 'center',\n fontStyle: 'italic',\n color: theme.customColors.mediumGrey,\n paddingTop: theme.spacing(1),\n marginTop: theme.spacing(2),\n },\n rocketContainer: {\n marginTop: '1rem',\n },\n widgetButtonLabel: {\n color: '#0000EE',\n textDecoration: 'underline',\n cursor: 'pointer',\n fontStyle: 'italic',\n fontSize: '11px',\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(2),\n width: 'max-content',\n },\n widgetContainer: {\n display: 'flex',\n justifyContent: 'center',\n },\n sliderComponent: {\n marginLeft: theme.spacing(1),\n marginRight: theme.spacing(1),\n },\n});\n\nexport const uiConfig = {\n name: 'createInstance',\n state: () => ({\n priceInitialized: false,\n }),\n};\n\nexport default uiState(uiConfig)(withStyles(styles)(UnstyledStepTwo));\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport Grid from '@material-ui/core/Grid';\nimport Button from '@material-ui/core/Button';\nimport Typography from '@material-ui/core/Typography';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport Checkbox from '@material-ui/core/Checkbox';\nimport Chip from '@material-ui/core/Chip';\nimport Icon from '@material-ui/core/Icon';\nimport List from '@material-ui/core/List';\nimport ListItem from '@material-ui/core/ListItem';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction';\nimport Fab from '@material-ui/core/Fab';\nimport Divider from '@material-ui/core/Divider';\nimport { Field, reduxForm } from 'redux-form';\n\nimport WrappedTextField from 'components/WrappedTextField/WrappedTextField';\nimport ACL_KINDS from 'constants/aclKinds';\nimport { required, validateCidr, aclItemUnique, maxLength } from 'services/validationMsgs';\nimport { normalizeCidr } from 'services/normalizer';\nimport whichIcon from '../WhichIcon';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n newAcl: PropTypes.shape({\n id: PropTypes.string,\n cidr: PropTypes.string,\n kind: PropTypes.number,\n description: PropTypes.string,\n name: PropTypes.string,\n }).isRequired,\n enterCidr: PropTypes.func.isRequired,\n getIp: PropTypes.func.isRequired,\n getIpClear: PropTypes.func.isRequired,\n myip: PropTypes.string,\n enterAclName: PropTypes.func.isRequired,\n selectAclKind: PropTypes.func.isRequired,\n addAcl: PropTypes.func.isRequired,\n newInstanceAcls: PropTypes.instanceOf(Array).isRequired,\n removeAcl: PropTypes.func.isRequired,\n addIpsLater: PropTypes.bool.isRequired,\n checkAddIpsLater: PropTypes.func.isRequired,\n newInstanceService: PropTypes.shape({\n name: PropTypes.string,\n }).isRequired,\n change: PropTypes.func.isRequired,\n touch: PropTypes.func.isRequired,\n reset: PropTypes.func.isRequired,\n};\n\nconst maxLength128 = maxLength(128);\n\nconst defaultProps = {\n myip: null,\n};\n\nexport function UnstyledStepThree(props) {\n const {\n classes,\n newAcl,\n enterCidr,\n getIp,\n getIpClear,\n myip,\n enterAclName,\n selectAclKind,\n addAcl,\n removeAcl,\n newInstanceAcls,\n addIpsLater,\n checkAddIpsLater,\n newInstanceService,\n change,\n touch,\n reset,\n } = props;\n\n const hasOpenAcl = newInstanceAcls.filter((acl) => acl.cidr === '0.0.0.0/0').length !== 0;\n\n const handleAnyIpClick = () => {\n const ipWildcard = '0.0.0.0/0';\n change('ipaddress', ipWildcard);\n touch('ipaddress');\n enterCidr(null, ipWildcard);\n\n change('name', 'Allow All');\n touch('name');\n enterAclName({ target: { value: 'Allow All' } });\n };\n\n const handleKindClick = (event, name, kind) => {\n change(name, kind);\n selectAclKind(event, kind);\n };\n\n const isAclKindRequired = () =>\n (newInstanceService.name.toLowerCase() === 'Elasticsearch'.toLowerCase() ||\n newInstanceService.name.toLowerCase() === 'CockroachDB'.toLowerCase() ||\n newInstanceService.name.toLowerCase() === 'PostgreSQL'.toLowerCase() ||\n newInstanceService.name.toLowerCase() === 'Redis'.toLowerCase() ||\n newInstanceService.name.toLowerCase() === 'TimescaleDB'.toLowerCase()) &&\n typeof newAcl.kind === 'undefined';\n\n /**\n * Validation function, enables the \"Add\" button for ACLs as long as\n * 1. The ACL is unique\n * 2. The CIDR is valid\n * 3. The instance service is either ES or Cockroach\n * 4. The ACL being added has a kind (if required for that service)\n * 5. The ACl being added has a name\n *\n * @returns {true || false} - Returns true if all conditions met,\n * false if any one fails\n */\n const isAclValid = () =>\n aclItemUnique(null, null, props) !== undefined ||\n validateCidr(newAcl.cidr) !== undefined ||\n !newAcl.name ||\n isAclKindRequired();\n\n const aclKindChips = Object.keys(ACL_KINDS)\n .sort()\n .map((key) => {\n const el = ACL_KINDS[key];\n if (ACL_KINDS[key].service === newInstanceService.name && ACL_KINDS[key].label) {\n return (\n <Chip\n key={el.kind}\n color={newAcl.kind === el.kind ? 'primary' : 'default'}\n label={el.label}\n deleteIcon={whichIcon(newAcl.kind === el.kind)}\n onClick={(event) => handleKindClick(event, 'kind', el.kind)}\n onDelete={(event) => handleKindClick(event, 'kind', el.kind)}\n classes={{\n root: classes.chipRoot,\n colorPrimary: classes.chipColorPrimary,\n deleteIcon: classes.chipDeleteIcon,\n }}\n />\n );\n }\n return null;\n });\n\n const primaryText = (acl) => (\n <Typography variant=\"body1\" className={classes.primary} component=\"span\">\n {`${acl.cidr} ${acl.kind >= 1 ? ACL_KINDS[acl.kind].label : ''}`}\n </Typography>\n );\n\n const secondaryText = (acl) => (\n <Typography variant=\"body2\" className={classes.secondary} color=\"textSecondary\">\n {`${acl.name}`}\n </Typography>\n );\n\n const disableTypography = true;\n\n const aclListItems = newInstanceAcls.map((acl, index) => (\n <React.Fragment key={acl.kind + acl.cidr}>\n <ListItem>\n <ListItemText\n disableTypography={disableTypography}\n primary={secondaryText(acl)}\n secondary={primaryText(acl)}\n />\n <ListItemSecondaryAction>\n <Fab\n size=\"small\"\n classes={{ root: classes.listItemDeleteRoot }}\n onClick={(event) => removeAcl(event, index)}\n >\n <Icon>delete</Icon>\n </Fab>\n </ListItemSecondaryAction>\n </ListItem>\n <Divider />\n </React.Fragment>\n ));\n\n if (myip) {\n const tempMyip = myip;\n change('ipaddress', myip);\n touch('ipaddress');\n getIpClear(); // Clear the myip variable so we don't execute those statements again.\n enterCidr(null, tempMyip); // Enable the \"Add\" button.\n\n change('name', 'My IP');\n touch('name');\n enterAclName({ target: { value: 'My IP' } });\n }\n\n function handleAnyIpCheck() {\n checkAddIpsLater();\n reset('IP Address');\n }\n\n return (\n <React.Fragment>\n <Grid container classes={{ container: classes.aclContainer }}>\n <Grid item container xs={12} md={6} classes={{ item: classes.aclFormItem }}>\n <Grid\n item\n container\n xs={12}\n classes={{ item: classes.ipButtonsItem, container: classes.ipButtonsContainer }}\n >\n <Button\n hover-override=\"green\"\n variant=\"contained\"\n classes={{ root: classes.ipButtonRoot }}\n onClick={handleAnyIpClick}\n value=\"0.0.0.0/0\"\n >\n allow any ip\n </Button>\n <Typography align=\"center\" className={classes.or}>\n -OR-\n </Typography>\n <Button\n name=\"useMyIP\"\n hover-override=\"green\"\n variant=\"contained\"\n classes={{ root: classes.ipButtonRoot }}\n onClick={(event) => getIp(event)}\n >\n use my ip\n </Button>\n </Grid>\n\n <Grid item container classes={{ container: classes.fieldContainer }}>\n <Field\n label=\"IP Address\"\n variant=\"outlined\"\n className={classes.aclFormField}\n name=\"ipaddress\"\n value={newAcl.cidr}\n component={WrappedTextField}\n placeholder=\"#.#.#.#/#\"\n onChange={enterCidr}\n validate={[validateCidr, aclItemUnique, required]}\n normalize={normalizeCidr}\n autoFocus\n InputLabelProps={{\n shrink: true,\n className: classes.inputLabel,\n }}\n disabled={addIpsLater}\n />\n <Field\n label=\"Name\"\n variant=\"outlined\"\n className={classes.aclFormField}\n name=\"name\"\n value={newAcl.name}\n component={WrappedTextField}\n placeholder=\"Name\"\n onChange={enterAclName}\n validate={[maxLength128, required]}\n InputLabelProps={{\n shrink: true,\n className: classes.inputLabel,\n }}\n disabled={addIpsLater}\n />\n </Grid>\n\n <Typography classes={{ root: classes.chipInstructionsRoot }}>\n Select a Role for the IP:\n </Typography>\n\n <div className={classes.chipContainer}>{aclKindChips}</div>\n\n <Field\n name=\"kind\"\n label=\"\"\n component={WrappedTextField}\n className={classes.kindField}\n validate={[aclItemUnique]}\n />\n\n <Button\n name=\"submit\"\n classes={{ root: classes.addButtonRoot }}\n variant=\"contained\"\n onClick={(event) => addAcl(event, newAcl)}\n disabled={isAclValid()}\n hover-override=\"magenta\"\n >\n <span className={classes.addButtonText}>add</span>\n <Icon classes={{ root: classes.downArrow }}>arrow_downward</Icon>\n <Icon classes={{ root: classes.rightArrow }}>arrow_forward</Icon>\n </Button>\n </Grid>\n\n <Grid item xs={12} md={6} classes={{ item: classes.aclListItem }}>\n <List>{aclListItems}</List>\n {hasOpenAcl && (\n <Typography className={classes.openAclWarning}>\n 0.0.0.0/0 ACLs can be dangerous, as they allow anyone to attempt to log into your\n instance. Please ensure you're using strong passwords and/or narrow your ACLs to\n trusted ranges.\n </Typography>\n )}\n </Grid>\n\n <div className={classes.addLater}>\n <FormControlLabel\n classes={{ root: classes.aclLaterLabelRoot }}\n control={<Checkbox />}\n onChange={handleAnyIpCheck}\n checked={addIpsLater}\n label=\"Add my IPs later\"\n />\n <Typography className={classes.aclWarning}>\n Please note that your instance isn’t fully setup for access unless an IP is added.\n </Typography>\n </div>\n </Grid>\n </React.Fragment>\n );\n}\n\nUnstyledStepThree.propTypes = propTypes;\nUnstyledStepThree.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n aclContainer: {\n border: `1px solid ${theme.customColors.black}`,\n padding: theme.spacing(1),\n flexDirection: 'column',\n\n [theme.breakpoints.up('sm')]: {\n padding: 'unset',\n justifyContent: 'space-between',\n flexDirection: 'row',\n border: 'none',\n },\n },\n aclFormItem: {\n alignSelf: 'flex-start',\n\n [theme.breakpoints.up('sm')]: {\n padding: theme.spacing(1),\n border: `1px solid ${theme.customColors.black}`,\n },\n },\n ipButtonsContainer: {\n flexDirection: 'column',\n marginBottom: 8,\n\n [theme.breakpoints.up('sm')]: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n },\n },\n ipButtonRoot: {\n color: theme.customColors.white,\n\n [theme.breakpoints.up('sm')]: {\n flex: '1 0 25%',\n },\n },\n or: {\n margin: '0 16px',\n },\n fieldContainer: {\n flexDirection: 'column',\n\n '& input': {\n textAlign: 'center',\n },\n },\n aclFormField: {\n marginTop: theme.spacing(1),\n },\n inputLabel: {\n color: theme.palette.text.primary,\n },\n chipInstructionsRoot: {\n [theme.breakpoints.up('sm')]: {\n margin: '8px auto 0 auto',\n },\n },\n chipContainer: {\n display: 'flex',\n flexWrap: 'wrap',\n flexDirection: 'column',\n flexBasis: '100%',\n alignItems: 'center',\n marginTop: theme.spacing(1),\n\n [theme.breakpoints.up('sm')]: {\n flexDirection: 'row',\n },\n },\n chipColorPrimary: {\n backgroundColor: theme.customColors.peach,\n color: theme.customColors.black,\n },\n chipRoot: {\n width: '100%',\n justifyContent: 'space-between',\n '&:focus': {\n backgroundColor: theme.customColors.peach,\n },\n '&:not(:last-child)': {\n marginBottom: theme.spacing(1),\n },\n\n [theme.breakpoints.up('sm')]: {\n '&:not(:last-child)': {\n marginBottom: 'unset',\n },\n width: 'unset',\n margin: '2px 4px',\n flexGrow: 1,\n maxWidth: '210px',\n },\n },\n chipDeleteIcon: {\n color: theme.customColors.teal,\n fontSize: '1.3rem',\n },\n kindField: {\n display: 'none',\n },\n addButtonRoot: {\n backgroundColor: theme.customColors.magenta,\n width: '100%',\n color: theme.customColors.white,\n marginTop: theme.spacing(1),\n\n [theme.breakpoints.up('sm')]: {\n width: '50%',\n marginLeft: 'auto',\n marginRight: 'auto',\n marginBottom: theme.spacing(1),\n },\n\n [theme.breakpoints.up('md')]: {\n width: '125px',\n marginRight: '0',\n },\n },\n addButtonText: {\n [theme.breakpoints.up('md')]: {\n flexGrow: 3,\n },\n },\n aclListItem: {\n [theme.breakpoints.up('md')]: {\n flexBasis: '40%',\n },\n },\n listItemDeleteRoot: {\n color: theme.customColors.white,\n backgroundColor: theme.customColors.red,\n },\n aclLaterLabelRoot: {\n padding: `${theme.spacing(1)}px 0 0 ${theme.spacing(0.5)}px`,\n },\n aclWarning: {\n color: theme.customColors.red,\n fontStyle: 'italic',\n fontSize: '.8rem',\n },\n openAclWarning: {\n color: theme.customColors.red,\n fontStyle: 'italic',\n fontSize: '.8rem',\n marginTop: theme.spacing(1),\n maxWidth: '500px',\n },\n downArrow: {\n fontSize: '1.25rem',\n\n [theme.breakpoints.up('md')]: {\n display: 'none',\n },\n },\n rightArrow: {\n fontSize: '1.25rem',\n display: 'none',\n\n [theme.breakpoints.up('md')]: {\n display: 'unset',\n },\n },\n rocketContainer: {\n marginTop: theme.spacing(2),\n },\n});\n\nexport default withStyles(styles)(reduxForm({ form: 'aclEntry' })(UnstyledStepThree));\n","import React from 'react';\nimport Icon from '@material-ui/core/Icon';\n\nexport default function whichIcon(isTrue) {\n return isTrue ? <Icon>done</Icon> : <Icon> </Icon>;\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n price: PropTypes.number.isRequired,\n};\n\nexport function UnstyledPrice({ price, classes }) {\n const priceString = (price / 100).toFixed(2);\n return <div className={classes.price}>${priceString}</div>;\n}\n\nUnstyledPrice.propTypes = propTypes;\n\nconst styles = (theme) => ({\n price: {\n ...theme.typography.h5,\n color: theme.customColors.mediumGrey,\n fontWeight: 500,\n fontSize: 21,\n flex: 0.01,\n },\n asterisk: {\n fontSize: '20px',\n color: theme.customColors.magenta,\n },\n});\n\nexport default withStyles(styles)(UnstyledPrice);\n","import { connect } from 'react-redux';\n\nimport { selectors } from 'dux/createInstance';\nimport Price from './Price';\n\nfunction mapStateToProps(state) {\n return { ...selectors.getCreateInstanceState(state) };\n}\n\nexport default connect(mapStateToProps, null)(Price);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport classnames from 'classnames';\n\nconst propTypes = {\n activeStep: PropTypes.number.isRequired,\n classes: PropTypes.shape({}).isRequired,\n};\n\nexport function UnstyledRocketProgress({ activeStep, classes }) {\n const rocketImageSrc = [\n '/images/rockets/rocket-step1.svg',\n '/images/rockets/rocket-step2.svg',\n '/images/rockets/rocket-step3.svg',\n ];\n const rocketImageClasses = (thisStep) => {\n switch (thisStep) {\n case 1:\n return classnames(classes.rocketImage, classes.rocketProgressStepTwo);\n case 2:\n return classnames(classes.rocketImage, classes.rocketProgressStepThree);\n default:\n return classes.rocketImage;\n }\n };\n return (\n <React.Fragment>\n <img\n src={rocketImageSrc[activeStep]}\n className={rocketImageClasses(activeStep)}\n alt=\"Rocket\"\n />\n <hr className={classes.rocketLine} />\n </React.Fragment>\n );\n}\n\nUnstyledRocketProgress.propTypes = propTypes;\n\nconst styles = (theme) => ({\n rocketLine: {\n width: `calc(100% + ${theme.spacing(2)}px)`,\n marginLeft: theme.spacing(-1),\n marginRight: theme.spacing(-1),\n border: 'unset',\n height: 1,\n backgroundColor: theme.customColors.lightGrey,\n top: theme.spacing(-4.6),\n position: 'relative',\n zIndex: 1,\n\n [theme.breakpoints.down('sm')]: {\n width: `calc(100% + ${theme.spacing(2)}px)`,\n marginLeft: theme.spacing(-1),\n top: theme.spacing(-2.5),\n },\n },\n rocketImage: {\n height: theme.spacing(4),\n transition: 'all 500ms ease-in-out',\n position: 'relative',\n zIndex: 2,\n top: theme.spacing(-1.75),\n\n [theme.breakpoints.down('sm')]: {\n top: '3px',\n },\n },\n rocketProgressStepTwo: {\n paddingLeft: '27.5%',\n [theme.breakpoints.down('sm')]: {\n paddingLeft: '40%',\n },\n },\n rocketProgressStepThree: {\n paddingLeft: '46%',\n [theme.breakpoints.down('sm')]: {\n paddingLeft: 'calc(100% - 209px)',\n },\n },\n});\n\nexport default withStyles(styles)(UnstyledRocketProgress);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport Typography from '@material-ui/core/Typography';\nimport CheckCircleIcon from '@material-ui/icons/CheckCircle';\nimport classnames from 'classnames';\n\nconst propTypes = {\n isComplete: PropTypes.bool.isRequired,\n title: PropTypes.string.isRequired,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n classes: PropTypes.shape({}).isRequired,\n};\n\nconst defaultProps = {\n children: null,\n};\n\nexport function UnstyledOverviewStep({ isComplete, title, children, classes }) {\n const thisClasses = isComplete\n ? classnames(classes.check, classes.checkActive)\n : classnames(classes.check, classes.checkInactive);\n return (\n <div className={classes.step}>\n <div className={classes.stepTitle}>\n <CheckCircleIcon className={thisClasses} />\n <Typography className={classes.title} variant=\"h6\">\n {title}\n </Typography>\n </div>\n {children}\n </div>\n );\n}\n\nUnstyledOverviewStep.defaultProps = defaultProps;\nUnstyledOverviewStep.propTypes = propTypes;\n\nconst styles = (theme) => ({\n step: {\n display: 'inline-block',\n width: '27%',\n position: 'relative',\n top: theme.spacing(-4),\n verticalAlign: 'top',\n [theme.breakpoints.down('sm')]: {\n width: '100%',\n top: '0px',\n },\n },\n title: {\n color: theme.customColors.teal,\n display: 'inline-block',\n ...theme.typography.altTitle,\n fontSize: 18,\n },\n stepTitle: {\n [theme.breakpoints.down('sm')]: {\n display: 'None',\n },\n },\n check: {\n color: theme.customColors.orange,\n display: 'inline-block',\n marginBottom: theme.spacing(-0.5),\n paddingRight: theme.spacing(0.5),\n transition: 'opacity 250ms ease-in-out',\n },\n checkInactive: {\n opacity: 0,\n },\n checkActive: {\n opacity: 1,\n },\n});\n\nexport default withStyles(styles)(UnstyledOverviewStep);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport { uiState } from 'react-redux-ui-state';\nimport Button from '@material-ui/core/Button';\nimport Paper from '@material-ui/core/Paper';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport classnames from 'classnames';\nimport InfoOutlinedIcon from '@material-ui/icons/InfoOutlined';\n\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport roleDisabled from 'services/roleDisabled/index';\nimport BillingPageContainer from 'components/BillingPage/BillingPageContainer';\nimport Price from 'components/Price/PriceContainer';\nimport { OWNER, ADMIN, OR_ADMIN, OR_SUPERUSER } from 'constants/roles';\nimport SegmentClickTracker from 'components/SegmentClickTracker/SegmentClickTrackerContainer';\nimport RocketProgress from '../RocketProgress/RocketProgress';\nimport OverviewStep from './OverviewStep/OverviewStep';\n\nconst propTypes = {\n activeStep: PropTypes.number.isRequired,\n resetSteps: PropTypes.func.isRequired,\n instanceName: PropTypes.string,\n instanceService: PropTypes.string,\n instanceVersion: PropTypes.string,\n instanceRegion: PropTypes.string,\n instanceProvider: PropTypes.string,\n instancePlan: PropTypes.shape({\n nodes: PropTypes.shape({}),\n flavorName: PropTypes.string,\n }),\n instanceAcls: PropTypes.instanceOf(Array),\n isValid: PropTypes.bool.isRequired,\n addIpsLater: PropTypes.bool,\n instanceType: PropTypes.string,\n classes: PropTypes.shape({}).isRequired,\n newInstanceData: PropTypes.shape({}).isRequired,\n redirectToInstances: PropTypes.func.isRequired,\n createInstance: PropTypes.func.isRequired,\n needsBilling: PropTypes.bool.isRequired,\n setUiState: PropTypes.func.isRequired,\n trackButtonClick: PropTypes.func.isRequired,\n open: PropTypes.bool.isRequired,\n userRoles: PropTypes.arrayOf(PropTypes.string).isRequired,\n price: PropTypes.number.isRequired,\n supportLevelName: PropTypes.string.isRequired,\n};\n\nconst defaultProps = {\n instanceName: null,\n instanceService: null,\n instanceVersion: null,\n instanceRegion: null,\n instanceProvider: null,\n instancePlan: {},\n instanceAcls: [],\n addIpsLater: false,\n instanceType: null,\n};\n\nexport function UnstyledRocketOverview({\n activeStep,\n resetSteps,\n instanceName,\n instanceService,\n instanceVersion,\n instanceRegion,\n instanceProvider,\n instancePlan,\n instanceAcls,\n isValid,\n addIpsLater,\n instanceType,\n classes,\n newInstanceData,\n redirectToInstances,\n trackButtonClick,\n createInstance,\n needsBilling,\n setUiState,\n open,\n userRoles,\n price,\n supportLevelName,\n}) {\n const isStepComplete = (thisStep) => Boolean(activeStep > thisStep);\n const isAclComplete = () => instanceAcls.length > 0 || addIpsLater;\n const planNode = instancePlan.nodes ? instancePlan.nodes[instanceService.toLowerCase()] : null;\n\n const billingOpen = (instanceData) => {\n const buttonName = 'Instance Snapshot on Billing Popup';\n const data = {\n analytics: {\n eventPayload: {\n event: buttonName,\n properties: {\n instance_name: instanceData.name,\n service: instanceData.service,\n plan: instanceData.plan,\n version: instanceData.version,\n region: instanceData.region,\n provider: instanceData.provider,\n service_subtype: instanceData.serviceSubtype,\n features: instanceData.features,\n },\n },\n },\n };\n trackButtonClick(buttonName, data);\n setUiState({\n open: !open,\n });\n };\n\n const submitButton = (disabled = false) => (\n <SegmentClickTracker buttonName=\"Create Instance Submit (Desktop)\">\n <Button\n className={classes.nextButton}\n variant=\"contained\"\n color=\"primary\"\n disabled={!isValid || disabled}\n onClick={() =>\n needsBilling\n ? billingOpen(newInstanceData)\n : createInstance(newInstanceData, redirectToInstances)\n }\n >\n Create Instance\n </Button>\n </SegmentClickTracker>\n );\n\n const createInstanceButton = (button, userAccess, allowedAccess) =>\n roleDisabled(userAccess, allowedAccess) ? (\n <Tooltip title=\"You do not have the required access for this resource. Contact your organization owner.\">\n <span>{button(true)}</span>\n </Tooltip>\n ) : (\n button()\n );\n\n const discount = supportLevelName === 'Promotional_20_Percent' ? 20 : 0;\n const discountCalculation = ((price - price * (1 - discount / 100)) / 100).toFixed(2);\n\n const promotionalTextBuilder = (primaryText, number, additionalText) =>\n discount > 0 && (\n <div className={classes.promotionalText}>\n <ORTypography className={classes.promotionalTextDetail} color=\"secondary\">\n {primaryText}\n </ORTypography>\n {number}\n <span>{additionalText}</span>\n </div>\n );\n\n const promoIcon = discount > 0 && (\n <Tooltip arrow title=\"New Customer Promotion: 20% off for 12 months\" placement=\"top\">\n <InfoOutlinedIcon className={classes.infoIcon} fontSize=\"small\" />\n </Tooltip>\n );\n\n const promotionalText = promotionalTextBuilder(\n 'Promotional Pricing Discount:\\u00A0',\n discount,\n '%',\n );\n const discountText = promotionalTextBuilder(\n 'Discount:\\u00A0',\n `-$${discountCalculation}`,\n '\\u00A0/Month',\n );\n\n const pricingSupportText = (\n <div className={classes.supportTextContainer}>\n <ORTypography className={classes.supportText}>\n Looking for enterprise-level solutions?\n </ORTypography>\n <ORTypography className={classes.supportText}>\n <a href=\"mailto:sales@objectrocket.com\">Contact us for a custom quote today!</a>\n </ORTypography>\n </div>\n );\n\n const priceInformation = (\n <div className={classes.totalRow}>\n <div className={classes.promoAndPriceContainer}>\n <div className={classes.totalRowWithPromo}>\n <div className={classes.totalLabel}>Total: </div>\n <Price />\n <div className={classes.totalPerMonthLabel}> /Month</div>\n {promoIcon}\n </div>\n {promotionalText}\n {discountText}\n <div className={classnames(classes.showWhenSmall)}>{pricingSupportText}</div>\n </div>\n </div>\n );\n\n return (\n <Paper square elevation={0} className={classes.resetContainer}>\n <RocketProgress activeStep={activeStep} />\n <div className={classes.showWhenBig}>\n <div className={classes.summaryCaption}>Summary:</div>\n <OverviewStep title=\"Step 1\" isComplete={isStepComplete(0)}>\n <ul className={classes.summaryItems}>\n {instanceName && <li>{instanceName}</li>}\n {instanceService && (\n <li>\n {instanceService} {instanceVersion !== '0' && instanceVersion}\n </li>\n )}\n {instanceType && <li>{instanceType}</li>}\n {instanceProvider && (\n <li>\n {instanceProvider} {instanceRegion !== '0' && instanceRegion}\n </li>\n )}\n </ul>\n </OverviewStep>\n <OverviewStep title=\"Step 2\" isComplete={isStepComplete(1)}>\n {planNode && (\n <ul className={classes.summaryItems}>\n <li>{instancePlan.flavorName}</li>\n <li>\n Size: {planNode.diskSizeGb * planNode.quantity}\n GB Disk/\n {(planNode.memoryMb / 1024) * planNode.quantity}\n GB RAM ({planNode.quantity} × {planNode.diskSizeGb}\n GB/\n {planNode.memoryMb / 1024}\n GB Nodes)\n </li>\n </ul>\n )}\n </OverviewStep>\n <OverviewStep title=\"Step 3\" isComplete={isAclComplete()}>\n <ul className={classes.summaryItems}>\n {instanceAcls.length > 0 && <li>Whitelist IPs Added</li>}\n {addIpsLater && <li>IPs to be added later</li>}\n </ul>\n </OverviewStep>\n </div>\n\n <div className={classes.showWhenSmall}>\n {instanceService && <div className={classes.summaryCaption}>Summary:</div>}\n <ul className={classes.summaryItems}>\n {instanceService && (\n <li>\n {instanceService} {instanceVersion !== '0' && instanceVersion}\n </li>\n )}\n {instanceType && <li>{instanceType}</li>}\n {instanceProvider && (\n <li>\n {instanceProvider} {instanceRegion !== '0' && instanceRegion}\n </li>\n )}\n {planNode && (\n <li>\n {instancePlan.flavorName} {planNode.diskSizeGb * planNode.quantity}\n GB Disk/\n {(planNode.memoryMb / 1024) * planNode.quantity}\n GB RAM ({planNode.quantity} × {planNode.diskSizeGb}\n GB/\n {planNode.memoryMb / 1024}\n GB Nodes)\n </li>\n )}\n </ul>\n </div>\n\n <React.Fragment>\n {priceInformation}\n <div\n className={classnames(classes.actionsContainer, classes.showWhenBig, classes.actionRow)}\n >\n <Button\n onClick={resetSteps}\n className={classes.button}\n variant=\"contained\"\n color=\"secondary\"\n >\n Cancel\n </Button>\n {createInstanceButton(submitButton, userRoles, [OWNER, ADMIN, OR_ADMIN, OR_SUPERUSER])}\n </div>\n <div\n className={classnames(classes.actionsContainer, classes.showWhenBig, classes.actionRow)}\n >\n {pricingSupportText}\n </div>\n <BillingPageContainer\n open={open}\n billingOpen={billingOpen}\n createInstance={createInstance}\n newInstanceData={newInstanceData}\n redirectToInstances={redirectToInstances}\n />\n </React.Fragment>\n </Paper>\n );\n}\n\nUnstyledRocketOverview.propTypes = propTypes;\nUnstyledRocketOverview.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n onlySteps: {\n marginBottom: theme.spacing(2),\n display: 'flex',\n },\n actionsContainer: {\n marginBottom: theme.spacing(2),\n display: 'flex',\n justifyContent: 'flex-end',\n },\n resetContainer: {\n padding: theme.spacing(3),\n left: 0,\n width: '100%',\n border: `1px solid ${theme.customColors.lightGrey}`,\n },\n connectorBasic: {\n border: 'unset',\n padding: 'unset',\n minHeight: 'unset',\n },\n nextButton: {\n marginLeft: theme.spacing(1),\n color: theme.customColors.black,\n },\n summaryCaption: {\n ...theme.typography.h6,\n color: theme.customColors.darkGrey,\n fontWeight: 800,\n paddingLeft: 7,\n [theme.breakpoints.up('md')]: {\n display: 'None',\n },\n },\n summaryItems: {\n color: theme.customColors.mediumGrey,\n paddingLeft: 35,\n fontFamily: ['\"Roboto\"', 'sans-serif'].join(','),\n fontSize: 12,\n fontWeight: 400,\n margin: 0,\n\n [theme.breakpoints.down('sm')]: {\n marginTop: '.5rem',\n marginBottom: '.5rem',\n paddingLeft: 20,\n },\n },\n stepTitle: {\n color: theme.customColors.teal,\n display: 'inline-block',\n },\n stepCheck: {\n color: theme.customColors.orange,\n display: 'inline-block',\n marginBottom: theme.spacing(-0.5),\n paddingRight: theme.spacing(0.5),\n transition: 'opacity 250ms ease-in-out',\n },\n actionRow: {\n display: 'flex',\n position: 'relative',\n },\n totalRow: {\n display: 'flex',\n justifyContent: 'flex-end',\n position: 'relative',\n marginTop: '-3rem',\n\n [theme.breakpoints.down('sm')]: {\n justifyContent: 'flex-start',\n marginTop: 'unset',\n },\n },\n totalLabel: {\n ...theme.typography.h5,\n color: theme.customColors.mediumGrey,\n fontWeight: 500,\n fontSize: 21,\n flex: 0.01,\n },\n totalPerMonthLabel: {\n ...theme.typography.h6,\n color: theme.customColors.lightGrey,\n fontWeight: 500,\n flex: 0.01,\n alignSelf: 'center',\n },\n stepCheckInactive: {\n opacity: 0,\n },\n stepCheckActive: {\n opacity: 1,\n },\n showWhenSmall: {\n [theme.breakpoints.up('md')]: {\n display: 'none',\n },\n },\n showWhenBig: {\n [theme.breakpoints.down('sm')]: {\n display: 'none',\n },\n },\n totalRowWithPromo: {\n display: 'flex',\n justifyContent: 'center',\n position: 'relative',\n alignItems: 'center',\n\n [theme.breakpoints.down('sm')]: {\n justifyContent: 'flex-start',\n marginTop: 'unset',\n },\n },\n promoAndPriceContainer: {\n display: 'flex',\n flexFlow: 'column wrap',\n },\n promotionalText: {\n display: 'flex',\n flexFlow: 'row nowrap',\n justifyContent: 'flex-start',\n alignItems: 'center',\n color: theme.customColors.mediumGrey,\n fontSize: '.8571rem',\n\n [theme.breakpoints.up('lg')]: {\n justifyContent: 'center',\n },\n },\n promotionalTextDetail: {\n fontSize: '.8571rem',\n fontWeight: 'bold',\n },\n infoIcon: {\n marginLeft: theme.spacing(0.5),\n },\n supportTextContainer: {\n textAlign: 'center',\n marginTop: '-8px',\n marginRight: theme.spacing(1),\n\n [theme.breakpoints.down('sm')]: {\n marginTop: 'unset',\n textAlign: 'left',\n },\n },\n supportText: {\n fontStyle: 'italic',\n fontSize: '.8571rem',\n },\n});\n\nexport const uiConfig = {\n name: 'rocketOverview',\n state: () => ({\n open: false,\n }),\n};\n\nexport default uiState(uiConfig)(withStyles(styles)(UnstyledRocketOverview));\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport { uiState } from 'react-redux-ui-state';\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport Stepper from '@material-ui/core/Stepper';\nimport StepLabel from '@material-ui/core/StepLabel';\nimport Step from '@material-ui/core/Step';\nimport StepContent from '@material-ui/core/StepContent';\nimport StepConnector from '@material-ui/core/StepConnector';\nimport Button from '@material-ui/core/Button';\nimport ArrowForwardIcon from '@material-ui/icons/ArrowForward';\nimport ArrowBackIcon from '@material-ui/icons/ArrowBack';\nimport Divider from '@material-ui/core/Divider';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport withWidth, { isWidthDown } from '@material-ui/core/withWidth';\nimport classname from 'classnames';\n\nimport roleDisabled from 'services/roleDisabled/index';\nimport LoadingPlaceholder from 'components/LoadingPlaceholder/LoadingPlaceholder';\nimport BillingPageContainer from 'components/BillingPage/BillingPageContainer';\nimport { OWNER, ADMIN, OR_ADMIN, OR_SUPERUSER } from 'constants/roles';\nimport SegmentClickTracker from 'components/SegmentClickTracker/SegmentClickTrackerContainer';\nimport StepOne from './StepOne/StepOneContainer';\nimport StepTwo from './StepTwo/StepTwo';\nimport StepThree from './StepThree/StepThree';\nimport RocketOverview from './RocketOverview/RocketOverview';\n\nconst propTypes = {\n activeStep: PropTypes.number.isRequired,\n resetSteps: PropTypes.func.isRequired,\n goToNextStage: PropTypes.func.isRequired,\n goToPreviousStage: PropTypes.func.isRequired,\n classes: PropTypes.shape({}).isRequired,\n newInstance: PropTypes.shape({\n newInstanceName: PropTypes.string.isRequired,\n newInstanceService: PropTypes.shape({\n name: PropTypes.string,\n }).isRequired,\n newInstanceServiceSubtype: PropTypes.shape({\n name: PropTypes.string,\n }).isRequired,\n newInstanceVersion: PropTypes.string.isRequired,\n newInstanceRegion: PropTypes.string.isRequired,\n newInstanceFlavorIndex: PropTypes.number.isRequired,\n newInstancePlan: PropTypes.shape({\n name: PropTypes.string,\n }).isRequired,\n newInstanceAcls: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n newInstanceCloudProvider: PropTypes.shape({\n name: PropTypes.string,\n }).isRequired,\n newInstanceAddons: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n }).isRequired,\n selectService: PropTypes.func.isRequired,\n selectServiceSubtype: PropTypes.func.isRequired,\n selectProvider: PropTypes.func.isRequired,\n selectVersion: PropTypes.func.isRequired,\n selectRegion: PropTypes.func.isRequired,\n enterName: PropTypes.func.isRequired,\n selectFlavor: PropTypes.func.isRequired,\n selectPlan: PropTypes.func.isRequired,\n enterCidr: PropTypes.func.isRequired,\n getIp: PropTypes.func.isRequired,\n getIpClear: PropTypes.func.isRequired,\n myip: PropTypes.string,\n enterAclName: PropTypes.func.isRequired,\n selectAclKind: PropTypes.func.isRequired,\n newAcl: PropTypes.shape({\n id: PropTypes.string,\n cidr: PropTypes.string,\n kind: PropTypes.number,\n name: PropTypes.string,\n }),\n addAcl: PropTypes.func.isRequired,\n removeAcl: PropTypes.func.isRequired,\n addIpsLater: PropTypes.bool.isRequired,\n checkAddIpsLater: PropTypes.func.isRequired,\n catalog: PropTypes.shape({\n regionsCatalog: PropTypes.shape({\n regions: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n }).isRequired,\n servicesCatalog: PropTypes.shape({\n services: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n }).isRequired,\n serviceSubtypesCatalog: PropTypes.shape({\n serviceSubtypes: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n }).isRequired,\n providersCatalog: PropTypes.shape({\n providers: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n }).isRequired,\n versionsCatalog: PropTypes.shape({\n versions: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n }).isRequired,\n flavorsCatalog: PropTypes.shape({\n flavors: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n }).isRequired,\n plansCatalog: PropTypes.shape({\n plans: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n }).isRequired,\n addonsCatalog: PropTypes.shape({\n addons: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n }).isRequired,\n }).isRequired,\n createInstance: PropTypes.func.isRequired,\n history: PropTypes.shape({}).isRequired,\n isLoading: PropTypes.bool.isRequired,\n getPrice: PropTypes.func.isRequired,\n getPriceDebounced: PropTypes.func.isRequired,\n needsBilling: PropTypes.bool.isRequired,\n trackButtonClick: PropTypes.func.isRequired,\n setUiState: PropTypes.func.isRequired,\n open: PropTypes.bool.isRequired,\n userRoles: PropTypes.arrayOf(PropTypes.string).isRequired,\n width: PropTypes.string.isRequired,\n user: PropTypes.shape({\n idq: PropTypes.string,\n email: PropTypes.string,\n }).isRequired,\n price: PropTypes.number.isRequired,\n supportLevelName: PropTypes.string.isRequired,\n};\n\nconst defaultProps = {\n newAcl: {\n cidr: '',\n kind: 1,\n name: '',\n },\n myip: null,\n};\n\nexport function UnstyledCreateInstancePage({\n activeStep,\n resetSteps,\n goToNextStage,\n goToPreviousStage,\n classes,\n newInstance,\n selectService,\n selectServiceSubtype,\n selectVersion,\n selectRegion,\n enterName,\n selectProvider,\n catalog,\n selectFlavor,\n selectPlan,\n getIp,\n getIpClear,\n myip,\n enterCidr,\n enterAclName,\n selectAclKind,\n newAcl,\n addAcl,\n removeAcl,\n addIpsLater,\n checkAddIpsLater,\n createInstance,\n history,\n isLoading,\n getPrice,\n getPriceDebounced,\n needsBilling,\n trackButtonClick,\n setUiState,\n open,\n userRoles,\n width,\n user,\n price,\n supportLevelName,\n}) {\n const {\n newInstanceName,\n newInstanceService,\n newInstanceVersion,\n newInstanceRegion,\n newInstancePlan,\n newInstanceCloudProvider,\n newInstanceAcls,\n newInstanceFlavorIndex,\n newInstanceServiceSubtype,\n newInstanceAddons,\n } = newInstance;\n\n const billingOpen = () => {\n setUiState({\n open: !open,\n });\n };\n\n const isMobile = isWidthDown('sm', width);\n const mobileStepText = ['Step 1 of 3: ', 'Step 2 of 3: ', 'Step 3: '];\n const steps = [\n 'Select Service, Region, and Provider',\n `Configure ${activeStep >= 1 ? newInstanceName : ''}`,\n `Add a Whitelist IP ${activeStep >= 1 ? `to ${newInstanceName}` : ''}`,\n ];\n\n if (isMobile) {\n steps.forEach((step, index) => {\n steps[index] = mobileStepText[index].concat(step);\n });\n }\n\n const isValid = activeStep === steps.length - 1 && (addIpsLater || newInstanceAcls.length > 0);\n\n const connector = (\n <StepConnector classes={{ line: classes.connectorBasic, vertical: classes.connectorBasic }} />\n );\n\n const selectedNewInstanceRegionId =\n newInstanceRegion !== '0'\n ? catalog.regionsCatalog.regions.filter((region) => region.name === newInstanceRegion)[0].id\n : '';\n\n function getStepContent(step) {\n if (step === 0) {\n return (\n <StepOne\n {...newInstance}\n selectService={selectService}\n selectServiceSubtype={selectServiceSubtype}\n selectVersion={selectVersion}\n selectRegion={selectRegion}\n regions={catalog.regionsCatalog.regions}\n selectProvider={selectProvider}\n enterName={enterName}\n services={catalog.servicesCatalog.services}\n serviceSubtypes={catalog.serviceSubtypesCatalog.serviceSubtypes}\n cloudProviders={catalog.providersCatalog.providers}\n versions={catalog.versionsCatalog.versions}\n />\n );\n }\n if (step === 1) {\n return (\n <StepTwo\n {...newInstance}\n selectFlavor={selectFlavor}\n selectPlan={selectPlan}\n flavors={catalog.flavorsCatalog.flavors}\n plans={catalog.plansCatalog.plans}\n getPrice={getPrice}\n getPriceDebounced={getPriceDebounced}\n regionId={selectedNewInstanceRegionId}\n addons={catalog.addonsCatalog.addons}\n newInstanceAddons={newInstanceAddons}\n user={user}\n />\n );\n }\n return (\n <StepThree\n newInstanceAcls={newInstanceAcls}\n enterCidr={enterCidr}\n getIp={getIp}\n getIpClear={getIpClear}\n myip={myip}\n enterAclName={enterAclName}\n selectAclKind={selectAclKind}\n newAcl={newAcl}\n addAcl={addAcl}\n removeAcl={removeAcl}\n addIpsLater={addIpsLater}\n checkAddIpsLater={checkAddIpsLater}\n newInstanceService={newInstanceService}\n />\n );\n }\n\n function isStepInvalid(step) {\n if (step === 0) {\n return (\n !newInstanceName ||\n !newInstanceService ||\n newInstanceVersion === '0' ||\n newInstanceRegion === '0'\n );\n }\n return newInstanceFlavorIndex < 0;\n }\n\n const newInstanceAddonsObject = newInstanceAddons.reduce((curr, newInstanceAddon) => {\n const retObj = { ...curr, [newInstanceAddon.name]: newInstanceAddon.value };\n return retObj;\n }, {});\n\n const newInstanceData = {\n plan: newInstancePlan.name,\n name: newInstanceName,\n version: newInstanceVersion,\n region: newInstanceRegion,\n provider: newInstanceCloudProvider.name,\n service: newInstanceService.name,\n serviceSubtype: newInstanceServiceSubtype.name,\n features: {\n addons: newInstanceAddonsObject,\n },\n settings: {\n system_userlist: {},\n },\n acls: newInstanceAcls,\n };\n\n const redirectToInstances = () => history.push('/mission-ctrl/instances');\n\n const submitButton = (disabled = false) => (\n <SegmentClickTracker buttonName=\"Create Instance Submit (Mobile)\">\n <Button\n className={classname(classes.createButton, classes.stepButton)}\n variant=\"contained\"\n color=\"primary\"\n disabled={!isValid || disabled}\n onClick={() =>\n needsBilling ? billingOpen() : createInstance(newInstanceData, redirectToInstances)\n }\n >\n Create\n <span className={classes.instance}> Instance </span>\n </Button>\n </SegmentClickTracker>\n );\n\n const createInstanceButton = (button, userAccess, allowedAccess) =>\n roleDisabled(userAccess, allowedAccess) ? (\n <Tooltip title=\"You do not have the required access for this resource. Contact your organization owner.\">\n <span>{button(true)}</span>\n </Tooltip>\n ) : (\n button()\n );\n\n function getActionButtons(classType, bottomPage = true) {\n return (\n <div className={classname(classes.actionsContainer, classType)}>\n {activeStep > 0 && (\n <SegmentClickTracker buttonName={'Create Instance Step '.concat(activeStep)}>\n <Button\n variant=\"contained\"\n color=\"secondary\"\n onClick={(event) => goToPreviousStage(event, activeStep)}\n className={classname(classes.backButton, classes.stepButton)}\n >\n <ArrowBackIcon />\n <span className={classes.stepButtonLabel}>\n <span className={classes.goto}>Back to</span> step {activeStep}\n </span>\n </Button>\n </SegmentClickTracker>\n )}\n {activeStep < steps.length - 1 && (\n <SegmentClickTracker buttonName={'Create Instance Step '.concat(activeStep + 2)}>\n <Button\n disabled={isStepInvalid(activeStep)}\n variant=\"contained\"\n color=\"primary\"\n onClick={(event) => goToNextStage(event, activeStep)}\n className={classname(classes.nextButton, classes.stepButton)}\n >\n <span className={classes.stepButtonLabel}>\n <span className={classes.goto}>Go to</span> step {activeStep + 2}\n </span>\n <ArrowForwardIcon />\n </Button>\n </SegmentClickTracker>\n )}\n {activeStep === steps.length - 1 &&\n bottomPage &&\n createInstanceButton(submitButton, userRoles, [OWNER, ADMIN, OR_ADMIN, OR_SUPERUSER])}\n </div>\n );\n }\n\n return (\n <React.Fragment>\n {isLoading ? (\n <LoadingPlaceholder />\n ) : (\n <React.Fragment>\n <div className={classes.stepperContainer}>\n <ORTypography variant=\"h5\" component=\"h1\" className={classes.header}>\n Create an Instance\n </ORTypography>\n <Divider className={classes.divider} />\n <Stepper\n activeStep={activeStep}\n orientation=\"vertical\"\n connector={connector}\n classes={{ root: classes.stepperRoot }}\n >\n {steps.map((label, index) => (\n <Step key={label} className={classes.stepContainer}>\n <StepLabel icon=\"\" classes={{ label: classes.stepLabel }}>\n {label}\n </StepLabel>\n <StepContent className={classes.stepContentContainer}>\n {getStepContent(index)}\n {getActionButtons(classes.showWhenBig, false)}\n <div className={classname(classes.showWhenSmall)}>\n <RocketOverview\n classes={{\n resetContainer: classes.rocketOverview,\n }}\n activeStep={activeStep}\n resetSteps={resetSteps}\n instanceName={newInstanceName}\n instanceService={newInstanceService.name}\n instanceVersion={newInstanceVersion}\n instanceRegion={newInstanceRegion}\n instanceProvider={newInstanceCloudProvider.name}\n instancePlan={newInstancePlan}\n instanceAcls={newInstanceAcls}\n isValid={isValid}\n addIpsLater={addIpsLater}\n instanceType={newInstanceServiceSubtype.name}\n newInstanceData={newInstanceData}\n newInstanceService={newInstanceService}\n trackButtonClick={trackButtonClick}\n redirectToInstances={redirectToInstances}\n createInstance={createInstance}\n needsBilling={needsBilling}\n userRoles={userRoles}\n price={price}\n supportLevelName={supportLevelName}\n />\n </div>\n {getActionButtons(classes.showWhenSmall)}\n </StepContent>\n </Step>\n ))}\n <div className={classname(classes.showWhenBig)}>\n <RocketOverview\n classes={{\n resetContainer: classes.rocketOverview,\n }}\n activeStep={activeStep}\n resetSteps={resetSteps}\n instanceName={newInstanceName}\n instanceService={newInstanceService.name}\n instanceVersion={newInstanceVersion}\n instanceRegion={newInstanceRegion}\n instanceProvider={newInstanceCloudProvider.name}\n instancePlan={newInstancePlan}\n instanceAcls={newInstanceAcls}\n isValid={isValid}\n addIpsLater={addIpsLater}\n instanceType={newInstanceServiceSubtype.name}\n newInstanceData={newInstanceData}\n newInstanceService={newInstanceService}\n trackButtonClick={trackButtonClick}\n redirectToInstances={redirectToInstances}\n createInstance={createInstance}\n needsBilling={needsBilling}\n userRoles={userRoles}\n price={price}\n supportLevelName={supportLevelName}\n />\n </div>\n </Stepper>\n </div>\n <BillingPageContainer\n open={open}\n billingOpen={billingOpen}\n createInstance={createInstance}\n newInstanceData={newInstanceData}\n redirectToInstances={redirectToInstances}\n />\n </React.Fragment>\n )}\n </React.Fragment>\n );\n}\n\nUnstyledCreateInstancePage.propTypes = propTypes;\nUnstyledCreateInstancePage.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n stepperRoot: {\n padding: 0,\n },\n stepperContainer: {\n padding: theme.spacing(1),\n },\n divider: {\n marginBottom: theme.spacing(1.5),\n },\n header: {\n marginBottom: theme.spacing(2),\n color: theme.customColors.black,\n },\n backButton: {\n marginRight: theme.spacing(1) / 2,\n },\n nextButton: {\n marginLeft: theme.spacing(1),\n color: theme.customColors.black,\n },\n stepLabel: {\n fontSize: '1.571rem',\n },\n stepButton: {\n flexGrow: 0.2,\n '& svg': {\n fontSize: '1.2rem',\n },\n },\n stepButtonLabel: {\n flexGrow: 3,\n },\n createButton: {\n color: theme.customColors.black,\n\n [theme.breakpoints.down('sm')]: {\n marginLeft: theme.breakpoints.unit / 2,\n },\n },\n instance: {\n [theme.breakpoints.down('xs')]: {\n display: 'none',\n },\n },\n stepContainer: {\n border: '1px solid',\n borderColor: theme.customColors.lightGrey,\n padding: `0 ${theme.spacing(1)}px`,\n },\n stepContentContainer: {\n border: 'unset',\n margin: 'unset',\n padding: 'unset',\n },\n actionsContainer: {\n marginBottom: theme.spacing(2),\n display: 'flex',\n justifyContent: 'flex-end',\n },\n resetContainer: {\n padding: theme.spacing(3),\n position: 'absolute',\n left: 0,\n bottom: 0,\n width: '100%',\n },\n connectorBasic: {\n border: 'unset',\n padding: 'unset',\n minHeight: 'unset',\n },\n showWhenBig: {\n display: 'none',\n [theme.breakpoints.up('md')]: {\n display: 'flex',\n },\n },\n showWhenSmall: {\n display: 'none',\n [theme.breakpoints.down('sm')]: {\n display: 'flex',\n },\n },\n rocketOverview: {\n paddingBottom: '0px',\n paddingLeft: '8px',\n paddingRight: '8px',\n\n [theme.breakpoints.down('sm')]: {\n padding: 0,\n },\n },\n [theme.breakpoints.down('sm')]: {\n rocketOverview: {\n border: '0px',\n },\n stepLabel: {\n fontSize: '1.3rem',\n },\n goto: {\n display: 'none',\n },\n actionsContainer: {\n margin: '10px',\n justifyContent: 'activeStep',\n },\n stepButton: {\n flexGrow: 0.5,\n },\n nextButton: {\n marginLeft: 0,\n },\n },\n});\n\nexport const uiConfig = {\n name: 'createInstance',\n state: () => ({\n open: false,\n }),\n};\n\nexport default withWidth()(uiState(uiConfig)(withStyles(styles)(UnstyledCreateInstancePage)));\n","import { connect } from 'react-redux';\n\nimport { selectors as catalogSelectors } from 'dux/catalog';\nimport { selectors as userSelectors } from 'dux/user';\nimport { actionCreators, selectors as createInstanceSelectors } from 'dux/createInstance';\nimport { actionCreators as clickTrackerActionCreators } from 'dux/clickTracker';\nimport { selectors as orgSelectors } from 'dux/org';\nimport CreateInstancePage from './CreateInstancePage';\n\nfunction mapStateToProps(state) {\n const catalog = catalogSelectors.getCatalogState(state);\n const needsBilling = orgSelectors.needsBilling(state);\n const { supportLevelName } = orgSelectors.getOrgState(state);\n const isBillingUser = userSelectors.isBillingUser(state);\n const userRoles = userSelectors.getIdentityState(state).roles;\n const user = userSelectors.getIdentityState(state);\n return {\n ...createInstanceSelectors.getCreateInstanceState(state),\n catalog,\n needsBilling,\n supportLevelName,\n isBillingUser,\n userRoles,\n user,\n };\n}\n\nconst mapDispatchToProps = {\n goToNextStage: actionCreators.goToNextStage,\n goToPreviousStage: actionCreators.goToPreviousStage,\n resetSteps: actionCreators.resetSteps,\n selectService: actionCreators.selectService,\n selectServiceSubtype: actionCreators.selectServiceSubtype,\n selectVersion: actionCreators.selectVersion,\n selectRegion: actionCreators.selectRegion,\n enterName: actionCreators.enterName,\n selectProvider: actionCreators.selectProvider,\n selectFlavor: actionCreators.selectFlavor,\n selectPlan: actionCreators.selectPlan,\n enterCidr: actionCreators.enterCidr,\n getIp: actionCreators.getIp,\n getIpClear: actionCreators.getIpClear,\n enterAclName: actionCreators.enterAclName,\n selectAclKind: actionCreators.selectAclKind,\n addAcl: actionCreators.addAcl,\n removeAcl: actionCreators.removeAcl,\n checkAddIpsLater: actionCreators.checkAddIpsLater,\n createInstance: actionCreators.createInstance,\n getPrice: actionCreators.getPrice,\n getPriceDebounced: actionCreators.getPriceDebounced,\n trackButtonClick: clickTrackerActionCreators.trackButtonClick,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(CreateInstancePage);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Drawer from '@material-ui/core/Drawer';\nimport classnames from 'classnames';\n\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport Price from 'components/Price/PriceContainer';\n\nconst propTypes = {\n availablePlans: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n availableAddons: PropTypes.arrayOf(PropTypes.shape({ name: PropTypes.string })).isRequired,\n selectedService: PropTypes.string.isRequired,\n isServiceBeta: PropTypes.bool.isRequired,\n selectedVersion: PropTypes.string.isRequired,\n selectedCloudProvider: PropTypes.string,\n selectedCloudProviderIsBeta: PropTypes.bool.isRequired,\n selectedRegion: PropTypes.string,\n selectedFlavor: PropTypes.shape({ name: PropTypes.string }).isRequired,\n selectedAddons: PropTypes.arrayOf(PropTypes.shape({})),\n selectedPlan: PropTypes.shape({\n id: PropTypes.string,\n name: PropTypes.string,\n nodes: PropTypes.shape({}),\n }).isRequired,\n selectedCidr: PropTypes.string.isRequired,\n enteredName: PropTypes.string,\n isOpen: PropTypes.bool.isRequired,\n toggle: PropTypes.func.isRequired,\n getPrice: PropTypes.func.isRequired,\n price: PropTypes.number.isRequired,\n supportLevelName: PropTypes.string,\n regionsCatalog: PropTypes.shape({\n regions: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n }).isRequired,\n planInfoString: PropTypes.string.isRequired,\n nodeInfoString: PropTypes.string.isRequired,\n isFastlaneCustomer: PropTypes.bool.isRequired,\n};\n\nconst defaultProps = {\n selectedCloudProvider: '',\n selectedRegion: '',\n selectedAddons: [],\n enteredName: '',\n supportLevelName: '',\n};\n\nconst useStyles = makeStyles((theme) => ({\n header: {\n borderBottom: `1px solid ${theme.customColors.lightGrey}`,\n color: theme.customColors.teal,\n textTransform: 'uppercase',\n padding: `0 ${theme.spacing(0.5)}px`,\n fontSize: '1.2857rem',\n display: 'grid',\n gridTemplateAreas: '\"a a\"',\n gridAutoColumns: 'min-content 1fr',\n cursor: 'pointer',\n },\n theX: {\n justifySelf: 'left',\n fontSize: '2.2857rem',\n },\n monthlyCostEstimate: {\n justifySelf: 'center',\n\n [theme.breakpoints.down('md')]: {\n justifySelf: 'left',\n marginLeft: theme.spacing(1),\n },\n },\n drawerPaper: {\n position: 'absolute',\n top: theme.spacing(1),\n minWidth: 330,\n backgroundColor: theme.palette.background.default,\n textAlign: 'left',\n\n [theme.breakpoints.up('lg')]: {\n textAlign: 'center',\n },\n\n [theme.breakpoints.down('md')]: {\n width: '100%',\n minWidth: 'unset',\n },\n\n [theme.breakpoints.down('sm')]: {\n width: '100%',\n },\n },\n content: {\n backgroundColor: theme.customColors.white,\n padding: theme.spacing(0.5),\n height: '100%',\n },\n content_header: {\n fontSize: '.8571rem',\n fontWeight: 'bold',\n },\n content_detail: {\n fontSize: '.8571rem',\n },\n content_beta_warning: {\n color: theme.palette.primary.main,\n maxWidth: '19rem',\n margin: '0 auto',\n\n [theme.breakpoints.down('md')]: {\n margin: '0 1rem 0 0',\n maxWidth: 'unset',\n },\n },\n content_beta_warning_link: {\n color: 'blue',\n },\n promotionalText: {\n display: 'flex',\n flexFlow: 'row nowrap',\n justifyContent: 'flex-start',\n alignItems: 'center',\n color: theme.customColors.mediumGrey,\n\n [theme.breakpoints.up('lg')]: {\n justifyContent: 'center',\n },\n },\n billingContent: {\n marginTop: '40px',\n },\n priceContainer: {\n display: 'flex',\n flexFlow: 'row nowrap',\n justifyContent: 'flex-start',\n alignItems: 'center',\n\n [theme.breakpoints.up('lg')]: {\n justifyContent: 'center',\n },\n },\n priceText: {\n color: theme.customColors.teal,\n },\n additionalPriceText: {\n color: theme.customColors.lightGrey,\n fontWeight: 500,\n fontSize: 21,\n },\n removePromo: {\n color: theme.customColors.magenta,\n backgroundColor: 'inherit',\n boxShadow: 'none',\n '&:hover': {\n backgroundColor: 'inherit',\n },\n },\n infoIcon: {\n marginLeft: theme.spacing(0.5),\n },\n supportText: {\n fontStyle: 'italic',\n fontSize: '.8571rem',\n },\n betaText: {\n color: theme.palette.primary.main,\n fontStyle: 'italic',\n fontSize: '0.7857142857rem',\n fontWeight: 'bold',\n },\n}));\n\nexport function UnstyledSummaryDrawer({\n selectedService,\n isServiceBeta,\n selectedVersion,\n selectedCloudProvider,\n selectedCloudProviderIsBeta,\n selectedRegion,\n selectedFlavor,\n selectedAddons,\n selectedPlan,\n selectedCidr,\n enteredName,\n isOpen,\n toggle,\n getPrice,\n price,\n availablePlans,\n availableAddons,\n regionsCatalog,\n supportLevelName,\n planInfoString,\n nodeInfoString,\n isFastlaneCustomer,\n}) {\n const { regions } = regionsCatalog;\n const { name: flavorName } = selectedFlavor;\n const classes = useStyles();\n\n const discount = supportLevelName === 'Promotional_20_Percent' ? 20 : 0;\n const discountCalculation = ((price - price * (1 - discount / 100)) / 100).toFixed(2);\n\n const promotionalTextBuilder = (primaryText, number, additionalText) =>\n discount > 0 && (\n <div className={classes.promotionalText}>\n <ORTypography className={classes.content_header} color=\"secondary\">\n {primaryText}\n </ORTypography>\n <ORTypography className={classes.content_detail}>\n {number}\n {additionalText}\n </ORTypography>\n </div>\n );\n\n const promotionalText = promotionalTextBuilder(\n 'Promotional Pricing Discount:\\u00A0',\n discount,\n '%',\n );\n const discountText = promotionalTextBuilder(\n 'Discount:\\u00A0',\n `-$${discountCalculation}`,\n '\\u00A0/Month',\n );\n\n // Calculate the price when region and plan are selected, recalculate when pricing factors change\n React.useEffect(() => {\n if (selectedRegion && selectedPlan.name) {\n // eslint-disable-next-line react/prop-types\n const region = regions.find((rg) => rg.name === selectedRegion);\n const planIndex = availablePlans.findIndex((ap) => ap.id === selectedPlan.id);\n const pricingAddons = selectedAddons.map((selectedAddon) => {\n const ao = availableAddons.find((availAddon) => availAddon.name === selectedAddon.name);\n return {\n id: ao.id,\n ...selectedAddon,\n };\n });\n getPrice(region.id, planIndex, availablePlans, pricingAddons);\n }\n }, [\n selectedRegion,\n selectedPlan,\n selectedAddons,\n regions,\n availableAddons,\n availablePlans,\n getPrice,\n ]);\n\n const addons = selectedAddons.map((addon) => (\n <ORTypography key={addon.name} className={classes.content_detail}>\n {addon.displayName}: {addon.value}\n </ORTypography>\n ));\n\n return (\n <div className={classes.drawerContainer}>\n <Drawer\n anchor=\"right\"\n open={isOpen}\n variant=\"persistent\"\n classes={{ paper: classes.drawerPaper }}\n >\n <div className=\"headerContainer\">\n <ORTypography variant=\"h5\" component=\"h1\" className={classes.header} onClick={toggle}>\n <span className={classes.theX}>×</span>\n <span className={classes.monthlyCostEstimate}>Monthly Cost Estimate</span>\n </ORTypography>\n </div>\n\n <div className={classes.content}>\n <ORTypography className={classes.content_header} color=\"secondary\">\n Service\n </ORTypography>\n <ORTypography className={classes.content_detail}>{selectedService}</ORTypography>\n {isServiceBeta && (\n <ORTypography\n className={classnames(classes.content_detail, classes.content_beta_warning)}\n >\n You have selected a BETA service and are agreeing to the{' '}\n <a\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={classes.content_beta_warning_link}\n href=\"https://www.rackspace.com/information/legal/testterms\"\n >\n Rackspace test terms\n </a>\n .\n </ORTypography>\n )}\n <ORTypography className={classes.content_header} color=\"secondary\">\n Version\n </ORTypography>\n <ORTypography className={classes.content_detail}>{selectedVersion}</ORTypography>\n <ORTypography className={classes.content_header} color=\"secondary\">\n Cloud Provider\n </ORTypography>\n <ORTypography className={classes.content_detail}>\n {selectedCloudProvider}\n {selectedCloudProviderIsBeta && <span className={classes.betaText}> BETA</span>}\n </ORTypography>\n {selectedCloudProviderIsBeta && (\n <ORTypography\n className={classnames(classes.content_detail, classes.content_beta_warning)}\n >\n You have selected a BETA service and are agreeing to the{' '}\n <a\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={classes.content_beta_warning_link}\n href=\"https://www.rackspace.com/information/legal/testterms\"\n >\n Rackspace test terms\n </a>\n .\n </ORTypography>\n )}\n <ORTypography className={classes.content_header} color=\"secondary\">\n Region\n </ORTypography>\n <ORTypography className={classes.content_detail}>{selectedRegion}</ORTypography>\n <ORTypography className={classes.content_header} color=\"secondary\">\n Flavor\n </ORTypography>\n <ORTypography className={classes.content_detail}>{flavorName}</ORTypography>\n {addons}\n <ORTypography className={classes.content_header} color=\"secondary\">\n Storage / Memory\n </ORTypography>\n <ORTypography className={classes.content_detail}>{planInfoString}</ORTypography>\n <ORTypography className={classes.content_detail}>\n <em>{nodeInfoString}</em>\n </ORTypography>\n <ORTypography className={classes.content_header} color=\"secondary\">\n Authorized Firewall IP\n </ORTypography>\n <ORTypography className={classes.content_detail}>{selectedCidr}</ORTypography>\n <ORTypography className={classes.content_header} color=\"secondary\">\n Name\n </ORTypography>\n <ORTypography className={classes.content_detail}>{enteredName}</ORTypography>\n <div className={classes.billingContent}>\n <div className={classes.priceContainer}>\n <ORTypography variant=\"h5\" component=\"h1\" className={classes.priceText}>\n Total: \n </ORTypography>\n <Price />\n <ORTypography variant=\"h6\" component=\"h1\" className={classes.additionalPriceText}>\n /Month\n </ORTypography>\n </div>\n {isFastlaneCustomer && (\n <ORTypography className={classes.betaText}>\n This amount will be added to your Rackspace bill.\n </ORTypography>\n )}\n {promotionalText}\n {discountText}\n <div>\n <ORTypography className={classes.supportText}>\n Looking for enterprise-level solutions?\n </ORTypography>\n <ORTypography className={classes.supportText}>\n <a href=\"mailto:sales@objectrocket.com\">Contact us for a custom quote today!</a>\n </ORTypography>\n </div>\n </div>\n </div>\n </Drawer>\n </div>\n );\n}\n\nUnstyledSummaryDrawer.propTypes = propTypes;\nUnstyledSummaryDrawer.defaultProps = defaultProps;\n\nexport default UnstyledSummaryDrawer;\n","import { connect } from 'react-redux';\n\nimport { actionCreators, selectors } from 'dux/createInstance';\nimport { selectors as orgSelectors } from 'dux/org';\nimport { selectors as catalogSelectors } from 'dux/catalog';\nimport SummaryDrawer from './SummaryDrawer';\n\nfunction mapStateToProps(state) {\n return {\n selectedService: selectors.selectedServiceSelector(state),\n // This feels a little hacky, but seemed better than writing a separate selector function\n // to see if the selected service is in beta\n isServiceBeta: selectors.isServiceBetaSelector(state, {\n serviceName: selectors.selectedServiceSelector(state),\n }),\n selectedVersion: selectors.selectedVersionSelector(state),\n selectedCloudProvider: selectors.selectedCloudProviderSelector(state),\n selectedCloudProviderIsBeta: selectors.selectedCloudProviderIsBetaSelector(state),\n selectedRegion: selectors.selectedRegionSelector(state),\n selectedFlavor: selectors.selectedFlavorSelector(state),\n selectedAddons: selectors.selectedAddonsSelector(state),\n selectedPlan: selectors.selectedPlanSelector(state),\n selectedCidr: selectors.selectedCidrSelector(state),\n enteredName: selectors.enteredNameSelector(state),\n supportLevelName: orgSelectors.getOrgState(state).supportLevelName,\n availableAddons: selectors.availableAddonsSelector(state),\n availablePlans: selectors.availablePlansSelector(state),\n regionsCatalog: catalogSelectors.getRegionsState(state),\n price: selectors.getCreateInstanceState(state).price,\n planInfoString: selectors.planInfoStringSelector(state),\n nodeInfoString: selectors.nodeInfoStringSelector(state),\n isFastlaneCustomer: orgSelectors.isFastlaneCustomerSelector(state),\n };\n}\n\nconst mapDispatchToProps = {\n getPrice: actionCreators.getPrice,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(SummaryDrawer);\n","/**\n * Component for rendering a the alternate Tooltip variants from the OR\n * style guide that are not supported by Material UI Typography\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport Hidden from '@material-ui/core/Hidden';\n\nconst propTypes = {\n children: PropTypes.shape({}).isRequired,\n};\n\nexport function UnstyledORTooltip({ children, ...rest }) {\n return (\n <React.Fragment>\n <Hidden smDown>\n <Tooltip placement=\"left\" {...rest}>\n {children}\n </Tooltip>\n </Hidden>\n\n <Hidden mdUp>\n <Tooltip placement=\"bottom\" {...rest}>\n {children}\n </Tooltip>\n </Hidden>\n </React.Fragment>\n );\n}\n\nUnstyledORTooltip.propTypes = propTypes;\n\nexport default UnstyledORTooltip;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { reduxForm } from 'redux-form';\nimport Paper from '@material-ui/core/Paper';\nimport IconButton from '@material-ui/core/IconButton';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport Menu from '@material-ui/core/Menu';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport classnames from 'classnames';\n\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport ORTooltip from 'components/ORTooltip/ORTooltip';\nimport ServiceIcon from 'components/ServiceIcon/ServiceIcon';\n\nconst propTypes = {\n serviceName: PropTypes.string.isRequired,\n isServiceBeta: PropTypes.bool.isRequired,\n versionNamesByService: PropTypes.arrayOf(PropTypes.string).isRequired,\n selectedService: PropTypes.string,\n className: PropTypes.string,\n change: PropTypes.func.isRequired,\n initialize: PropTypes.func.isRequired,\n trackButtonClick: PropTypes.func.isRequired,\n orgIsAwsOnly: PropTypes.bool.isRequired,\n};\n\nconst defaultProps = {\n selectedService: '',\n className: '',\n};\n\nconst useStyles = makeStyles((theme) => ({\n tooltip: {\n maxWidth: 125,\n },\n serviceSelector: {\n border: (props) =>\n props.selected\n ? `2px solid ${theme.customColors.teal}`\n : `2px solid ${theme.customColors.mediumGrey}`,\n width: '200px',\n height: '60px',\n position: 'relative',\n cursor: 'pointer',\n display: 'inline-block',\n },\n serviceIcon: {\n height: '95%',\n left: '1%',\n width: 'unset',\n opacity: 0.5,\n position: 'absolute',\n top: '50%',\n transform: 'translate(0,-50%)',\n },\n serviceName: {\n top: '50%',\n position: 'absolute',\n transform: 'translate(0,-50%)',\n left: '2rem',\n fontWeight: 500,\n },\n betaText: {\n color: theme.palette.primary.main,\n fontStyle: 'italic',\n fontSize: '0.7857142857rem',\n fontWeight: 'bold',\n },\n versionMenuButton: {\n position: 'absolute',\n right: 0,\n padding: 0,\n },\n versionMenuButtonLabel: {\n fontFamily: ['\"Libre Franklin\"', 'sans-serif'],\n fontSize: '.857rem',\n },\n isSelected: {\n backgroundColor: theme.customColors.coolGrey,\n },\n launchButton: {\n position: 'absolute',\n top: '50%',\n right: '3%',\n transform: 'translate(0,-50%)',\n backgroundColor: theme.customColors.sky,\n color: theme.customColors.black,\n padding: theme.spacing(1),\n borderRadius: 3,\n boxShadow: `1px 1px 4px ${theme.customColors.black}`,\n\n '&:hover': {\n backgroundColor: theme.customColors.sky,\n },\n },\n}));\n\nconst tooltipText = {\n Elasticsearch: 'An Open Source Distributed, RESTful Search & Analytics Engine.',\n CockroachDB: 'A relational Database for next-generation, cloud-native applications.',\n PostgreSQL: 'A powerful, open source object-relational database system.',\n Redis:\n 'Open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker.',\n MongoDB:\n 'A document database with the scalability and flexibility that you want with the querying and indexing that you need.',\n TimescaleDB:\n 'A time-series SQL database providing fast analytics, scalability, with automated data management on a proven storage engine.',\n FoundationDB:\n 'An open-source, multi-model, easily scalable and fault tolerant distributed database.',\n};\n\nexport function UnstyledServiceSelector({\n serviceName,\n isServiceBeta,\n versionNamesByService,\n selectedService,\n className,\n change,\n initialize,\n trackButtonClick,\n orgIsAwsOnly,\n}) {\n const classes = useStyles({ selected: serviceName === selectedService });\n const [anchorEl, setAnchorEl] = React.useState(null);\n\n const [currentVersionDisplay, setCurrentVersionDisplay] = React.useState(0);\n\n const handleServiceNameClick = () => {\n // Don't reset the whole form on service selection.\n // Initialize the form with the service & version\n // Reset the rest of step one and all of step two\n // The second object keeps the steps three & four values if they exist\n initialize(\n {\n cloudProvider: orgIsAwsOnly ? 'AWS' : undefined,\n region: undefined,\n flavor: undefined,\n addons: undefined,\n plan: undefined,\n version: versionNamesByService[currentVersionDisplay],\n service: serviceName,\n },\n {\n updateUnregisteredFields: true,\n keepDirty: true,\n },\n );\n };\n\n const handleVersionMenuClick = (event) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleVersionMenuItemClick = (event) => {\n event.stopPropagation();\n change('version', event.target.textContent);\n setCurrentVersionDisplay(Number(event.target.getAttribute('index')));\n setAnchorEl(null);\n };\n\n /* istanbul ignore next */\n const handleVersionMenuClose = () => {\n setAnchorEl(null);\n };\n\n const versionMenuItems = versionNamesByService.map((version, index) => (\n <MenuItem\n key={version}\n onClick={(e) => {\n handleVersionMenuItemClick(e);\n trackButtonClick(selectedService.concat(' ', version));\n }}\n index={index}\n >\n {version}\n </MenuItem>\n ));\n\n const actionIcon = (\n <IconButton\n className={classes.versionMenuButton}\n classes={{ label: classes.versionMenuButtonLabel }}\n onClick={handleVersionMenuClick}\n >\n {selectedService === serviceName\n ? `v. ${versionNamesByService[currentVersionDisplay] || ''}`\n : null}\n <ExpandMoreIcon />\n </IconButton>\n );\n\n const selectedClass = serviceName === selectedService && classes.isSelected;\n\n return (\n <ORTooltip classes={{ tooltip: classes.tooltip }} title={tooltipText[serviceName] || ''} arrow>\n <Paper\n className={classnames(classes.serviceSelector, className, selectedClass)}\n onClick={handleServiceNameClick}\n elevation={0}\n component=\"div\"\n >\n {' '}\n <ServiceIcon service={serviceName} isAlpha={false} className={classes.serviceIcon} />\n <ORTypography className={classes.serviceName}>\n {serviceName} {isServiceBeta && <span className={classes.betaText}>BETA</span>}\n </ORTypography>\n {actionIcon}\n <Menu\n keepMounted\n anchorEl={anchorEl}\n open={Boolean(anchorEl)}\n onClose={handleVersionMenuClose}\n >\n {versionMenuItems}\n </Menu>\n </Paper>\n </ORTooltip>\n );\n}\n\nUnstyledServiceSelector.propTypes = propTypes;\nUnstyledServiceSelector.defaultProps = defaultProps;\n\nexport default reduxForm({\n form: 'create',\n destroyOnUnmount: false,\n forceUnregisterOnUnmount: true,\n})(UnstyledServiceSelector);\n","import { connect } from 'react-redux';\n\nimport { selectors as createSelectors } from 'dux/createInstance';\nimport { actionCreators as clickTrackerActionCreators } from 'dux/clickTracker';\nimport { selectors as orgSelectors } from 'dux/org';\nimport ServiceSelector from './ServiceSelector';\n\nfunction mapStateToProps(state, ownProps) {\n return {\n selectedService: createSelectors.selectedServiceSelector(state),\n isServiceBeta: createSelectors.isServiceBetaSelector(state, ownProps),\n versionNamesByService: createSelectors.versionNamesByServiceSelector(state, ownProps),\n orgIsAwsOnly: orgSelectors.awsOnlySelector(state),\n };\n}\n\nconst mapDispatchToProps = {\n trackButtonClick: clickTrackerActionCreators.trackButtonClick,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ServiceSelector);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles } from '@material-ui/core/styles';\nimport FormControl from '@material-ui/core/FormControl';\nimport InputLabel from '@material-ui/core/InputLabel';\nimport Select from '@material-ui/core/Select';\n\nconst propTypes = {\n input: PropTypes.shape({ name: PropTypes.string }).isRequired,\n label: PropTypes.string.isRequired,\n className: PropTypes.string.isRequired,\n children: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n disabled: PropTypes.bool.isRequired,\n};\n\nconst useStyles = makeStyles(() => ({\n selectElement: {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n },\n}));\n\nfunction WrappedSelectField({\n input,\n label,\n className,\n meta: { touched, error },\n children,\n disabled,\n}) {\n const classes = useStyles();\n const labelString = label.replace(/\\s/g, '');\n return (\n <FormControl\n className={className}\n error={touched && error}\n variant=\"outlined\"\n disabled={disabled}\n >\n <InputLabel htmlFor={`${labelString}`}>{label}</InputLabel>\n <Select\n classes={{ select: classes.selectElement }}\n autoWidth\n MenuProps={{\n anchorOrigin: {\n vertical: 'top',\n horizontal: 'right',\n },\n transformOrigin: {\n vertical: 'top',\n horizontal: 'right',\n },\n getContentAnchorEl: null,\n }}\n defaultValue=\"\"\n {...input}\n label={label}\n inputProps={{\n name: input.name,\n id: `${labelString}`,\n }}\n >\n {children}\n </Select>\n </FormControl>\n );\n}\n\nWrappedSelectField.propTypes = propTypes;\n\nexport default WrappedSelectField;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { Field, reduxForm } from 'redux-form';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport IconButton from '@material-ui/core/IconButton';\nimport LaunchIcon from '@material-ui/icons/Launch';\nimport classnames from 'classnames';\n\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport WrappedSelectField from 'components/WrappedSelectField/WrappedSelectField';\n\nconst propTypes = {\n input: PropTypes.shape({ name: PropTypes.string }),\n label: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n className: PropTypes.string.isRequired,\n availableCloudProviders: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n availableServiceSubtypesNames: PropTypes.arrayOf(PropTypes.string).isRequired,\n availableRegionsNames: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n selectedRegion: PropTypes.string,\n selectedService: PropTypes.string,\n isDisabled: PropTypes.bool,\n isORv4: PropTypes.bool,\n change: PropTypes.func.isRequired,\n trackButtonClick: PropTypes.func.isRequired,\n};\n\nconst defaultProps = {\n input: {},\n isDisabled: false,\n isORv4: false,\n selectedRegion: '',\n selectedService: '',\n};\n\nconst useStyles = makeStyles((theme) => ({\n regionMenuItem: {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n },\n regionMenuIcon: {\n position: 'relative',\n marginLeft: theme.spacing(2),\n color: theme.customColors.mediumGrey,\n },\n launchButton: {\n marginLeft: theme.spacing(2),\n backgroundColor: theme.customColors.sky,\n color: theme.customColors.black,\n padding: theme.spacing(1),\n borderRadius: 3,\n boxShadow: `1px 1px 4px ${theme.customColors.black}`,\n\n '&:hover': {\n backgroundColor: theme.customColors.sky,\n },\n },\n selected: {\n color: theme.customColors.teal,\n },\n privateRegionAsterisk: {\n color: theme.customColors.red,\n },\n cloudMenuItem: {\n justifyContent: 'space-between',\n alignItems: 'baseline',\n },\n betaText: {\n color: theme.palette.primary.main,\n fontStyle: 'italic',\n fontSize: '0.7857142857rem',\n fontWeight: 'bold',\n },\n}));\n\nexport function UnstyledFormSelect({\n label,\n className,\n name,\n availableCloudProviders,\n availableServiceSubtypesNames,\n availableRegionsNames,\n selectedRegion,\n selectedService,\n isDisabled,\n isORv4,\n change,\n trackButtonClick,\n // isPrivateRegion,\n}) {\n /**\n * As of 2020-04, we have only one service subtype per service.\n * This automatically selects the first service subtype available.\n * If we actually get other subtypes, this can be removed.\n */\n React.useEffect(() => {\n if (availableServiceSubtypesNames.length > 0 && name === 'cloudProvider') {\n change('serviceSubtype', availableServiceSubtypesNames[0]);\n }\n }, [availableServiceSubtypesNames, change, name]);\n\n const handleCloudClick = () => {\n change('region', undefined);\n };\n\n const classes = useStyles();\n\n const menuLabel = (\n <MenuItem key=\"label\" value=\"\" disabled>\n <em>{label}</em>\n </MenuItem>\n );\n const rackspaceCloudLink = isORv4 ? (\n <MenuItem\n key=\"ORv4-link\"\n component=\"a\"\n value=\"Rackspace SSO\"\n href={process.env.REACT_APP_ORV4_SSO_LOGIN}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Rackspace Cloud\n <IconButton className={classes.launchButton}>\n <LaunchIcon />\n </IconButton>\n </MenuItem>\n ) : null;\n\n let cloudList = availableCloudProviders.map((cloudProvider) => (\n <MenuItem\n key={cloudProvider.id}\n value={cloudProvider.name}\n onClick={handleCloudClick}\n className={classes.cloudMenuItem}\n >\n {cloudProvider.name}\n {cloudProvider.maturityLevel === 2 && (\n <ORTypography className={classes.betaText}>BETA</ORTypography>\n )}\n </MenuItem>\n ));\n\n cloudList = [menuLabel, ...cloudList, rackspaceCloudLink];\n\n let regionList = availableRegionsNames.map((region) => {\n const isSelected = region.name === selectedRegion;\n return (\n <MenuItem\n key={region.name}\n value={region.name}\n ListItemClasses={{ root: classes.regionMenuItem }}\n >\n {region.organization ? (\n <div>\n {region.name}\n <span className={classes.privateRegionAsterisk}>*</span>\n </div>\n ) : (\n region.name\n )}\n <LanguageIcon\n className={classnames(classes.regionMenuIcon, isSelected ? classes.selected : '')}\n />\n </MenuItem>\n );\n });\n\n regionList = [menuLabel, ...regionList];\n\n let typeList = availableServiceSubtypesNames.map((subtype) => (\n <MenuItem key={subtype} value={subtype}>\n {subtype}\n </MenuItem>\n ));\n\n typeList = [menuLabel, ...typeList];\n\n const listMap = {\n cloudProvider: cloudList,\n region: regionList,\n serviceSubtype: typeList,\n };\n return (\n <Field\n className={className}\n name={name}\n component={WrappedSelectField}\n label={label}\n disabled={isDisabled}\n onChange={(e) => {\n trackButtonClick(selectedService.concat(' ', e.target.value.toUpperCase()));\n }}\n >\n {listMap[name]}\n </Field>\n );\n}\n\nUnstyledFormSelect.propTypes = propTypes;\nUnstyledFormSelect.defaultProps = defaultProps;\n\nexport default reduxForm({\n form: 'create',\n destroyOnUnmount: false,\n forceUnregisterOnUnmount: true,\n})(UnstyledFormSelect);\n","import { connect } from 'react-redux';\n\nimport { selectors as createSelectors } from 'dux/createInstance';\nimport { actionCreators as clickTrackerActionCreators } from 'dux/clickTracker';\nimport FormSelect from './FormSelect';\n\nfunction mapStateToProps(state) {\n return {\n availableServiceSubtypesNames: createSelectors.availableServiceSubtypesNamesSelector(state),\n availableCloudProviders: createSelectors.availableCloudProvidersSelector(state),\n availableRegionsNames: createSelectors.availableRegionsNamesSelector(state),\n selectedRegion: createSelectors.selectedRegionSelector(state),\n isPrivateRegion: createSelectors.isPrivateRegionSelector(state),\n selectedService: createSelectors.selectedServiceSelector(state),\n };\n}\n\nconst mapDispatchToProps = {\n trackButtonClick: clickTrackerActionCreators.trackButtonClick,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(FormSelect);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { reduxForm } from 'redux-form';\nimport InfoOutlinedIcon from '@material-ui/icons/InfoOutlined';\n\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport SegmentClickTracker from 'components/SegmentClickTracker/SegmentClickTrackerContainer';\nimport ServiceSelector from './ServiceSelector/ServiceSelectorContainer';\nimport FormSelect from './FormSelect/FormSelectContainer';\n\nconst propTypes = {\n catalogServiceNames: PropTypes.arrayOf(PropTypes.string).isRequired,\n availableServiceSubtypesNames: PropTypes.arrayOf(PropTypes.string).isRequired,\n selectedService: PropTypes.string,\n selectedProvider: PropTypes.string,\n orgIsAwsOnly: PropTypes.bool.isRequired,\n isPrivateRegion: PropTypes.bool.isRequired,\n};\n\nconst useStyles = makeStyles((theme) => ({\n serviceSelectionSectionLabel: {\n marginBottom: theme.spacing(1),\n fontSize: '.8571rem',\n color: theme.palette.text.primary,\n },\n serviceSelectorsContainer: {\n display: 'flex',\n flexWrap: 'wrap',\n\n [theme.breakpoints.down('sm')]: {\n flexDirection: 'column',\n },\n },\n serviceSelector: {\n marginRight: theme.spacing(1),\n marginBottom: theme.spacing(1),\n\n [theme.breakpoints.down('sm')]: {\n marginRight: 'unset',\n width: '100%',\n },\n },\n selectField: {\n marginTop: theme.spacing(1),\n width: '100%',\n },\n privateRegionText: {\n fontSize: '.8571rem',\n color: theme.customColors.red,\n paddingLeft: theme.spacing(1),\n display: 'block',\n },\n regionInfoIconContainer: {\n display: 'flex',\n flexFlow: 'row nowrap',\n justifyContent: 'flex-start',\n alignItems: 'flex-end',\n marginTop: theme.spacing(1),\n },\n regionInfoIcon: {\n color: theme.customColors.mediumGrey,\n },\n regionInfoText: {\n marginLeft: theme.spacing(0.5),\n fontSize: '.8571rem',\n color: theme.palette.text.primary,\n fontStyle: 'italic',\n },\n}));\n\nconst defaultProps = {\n selectedService: '',\n selectedProvider: '',\n};\n\nexport function UnstyledStepOne({\n catalogServiceNames,\n availableServiceSubtypesNames,\n selectedService,\n selectedProvider,\n orgIsAwsOnly,\n isPrivateRegion,\n}) {\n const classes = useStyles();\n\n const servicesAlsoInORv4 = orgIsAwsOnly ? [] : ['MongoDB', 'Redis', 'Elasticsearch'];\n const orv5ServiceSelectors = catalogServiceNames.map((serviceName) => (\n <SegmentClickTracker key={serviceName} buttonName={serviceName}>\n <ServiceSelector\n key={serviceName}\n serviceName={serviceName}\n className={classes.serviceSelector}\n />\n </SegmentClickTracker>\n ));\n\n const serviceSelectors = orv5ServiceSelectors;\n\n return (\n <form>\n <ORTypography className={classes.serviceSelectionSectionLabel}>\n Select your service:\n </ORTypography>\n\n <div className={classes.serviceSelectorsContainer}>{serviceSelectors}</div>\n\n <FormSelect\n label=\"Cloud Provider\"\n name=\"cloudProvider\"\n className={classes.selectField}\n isDisabled={Boolean(!selectedService)}\n isORv4={servicesAlsoInORv4.includes(selectedService)}\n />\n <FormSelect\n label=\"Region\"\n name=\"region\"\n className={classes.selectField}\n isDisabled={Boolean(!selectedProvider)}\n />\n {isPrivateRegion && (\n <span className={classes.privateRegionText}>\n * FYI: You have selected a private region for your instance.\n </span>\n )}\n <div className={classes.regionInfoIconContainer}>\n <InfoOutlinedIcon className={classes.regionInfoIcon} fontSize=\"small\" />\n <ORTypography className={classes.regionInfoText}>\n {/* TODO The link below needs to point directly to the page about private regions */}\n <a href=\"https://docs.objectrocket.com\" target=\"_blank\" rel=\"noopener noreferrer\">\n See our docs\n </a>\n for guidance on choosing a Private or Public Option.\n </ORTypography>\n </div>\n {availableServiceSubtypesNames.length > 1 && (\n <FormSelect label=\"Type\" name=\"serviceSubtype\" className={classes.selectField} />\n )}\n </form>\n );\n}\n\nUnstyledStepOne.propTypes = propTypes;\nUnstyledStepOne.defaultProps = defaultProps;\n\nexport default reduxForm({\n form: 'create',\n destroyOnUnmount: false,\n forceUnregisterOnUnmount: true,\n})(UnstyledStepOne);\n","import { connect } from 'react-redux';\n\nimport { selectors } from 'dux/catalog';\nimport { selectors as createSelectors } from 'dux/createInstance';\nimport { selectors as orgSelectors } from 'dux/org';\nimport StepOne from './StepOne';\n\nfunction mapStateToProps(state) {\n return {\n catalogServiceNames: selectors.getCatalogServicesNames(state),\n selectedService: createSelectors.selectedServiceSelector(state),\n selectedProvider: createSelectors.selectedCloudProviderSelector(state),\n availableServiceSubtypesNames: createSelectors.availableServiceSubtypesNamesSelector(state),\n orgIsAwsOnly: orgSelectors.awsOnlySelector(state),\n isPrivateRegion: createSelectors.isPrivateRegionSelector(state),\n };\n}\n\nconst mapDispatchToProps = {};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(StepOne);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { reduxForm } from 'redux-form';\nimport Paper from '@material-ui/core/Paper';\nimport classnames from 'classnames';\n\nimport ORTypography from 'components/ORTypography/ORTypography';\n\nconst propTypes = {\n title: PropTypes.string.isRequired,\n description: PropTypes.string.isRequired,\n isSelected: PropTypes.bool.isRequired,\n onClick: PropTypes.func.isRequired,\n className: PropTypes.string,\n};\n\nconst defaultProps = {\n className: '',\n};\n\nconst useStyles = makeStyles((theme) => ({\n container: {\n padding: `${theme.spacing(1)}px ${theme.spacing(3)}px`,\n border: `2px solid ${theme.customColors.mediumGrey}`,\n cursor: 'pointer',\n backgroundColor: (props) =>\n props.isSelected ? theme.customColors.teal : theme.customColors.white,\n color: (props) => (props.isSelected ? theme.customColors.white : theme.customColors.black),\n },\n title: {\n textAlign: 'center',\n display: 'inline-block',\n },\n description: {\n '& > h6': {\n display: 'none',\n },\n '& > ul': {\n textAlign: 'center',\n listStyle: 'none',\n padding: 0,\n fontSize: '.8571rem',\n },\n },\n betaText: {\n float: 'right',\n display: 'inline-block',\n color: theme.palette.primary.main,\n fontStyle: 'italic',\n fontSize: '0.7857142857rem',\n fontWeight: 'bold',\n },\n}));\n\nexport function UnstyledFlavorSelector({ title, description, isSelected, onClick, className }) {\n const classes = useStyles({ isSelected });\n\n return (\n <Paper className={classnames(classes.container, className)} onClick={onClick} elevation={0}>\n <ORTypography className={classes.title} variant=\"h6\">\n {title}\n </ORTypography>\n {title === 'Sharded' && <ORTypography className={classes.betaText}>BETA</ORTypography>}\n {/* eslint-disable-next-line react/no-danger */}\n <div className={classes.description} dangerouslySetInnerHTML={{ __html: description }} />\n </Paper>\n );\n}\n\nUnstyledFlavorSelector.propTypes = propTypes;\nUnstyledFlavorSelector.defaultProps = defaultProps;\n\nexport default reduxForm({\n form: 'create',\n destroyOnUnmount: false,\n forceUnregisterOnUnmount: true,\n})(UnstyledFlavorSelector);\n","import { connect } from 'react-redux';\n\nimport { selectors as createSelectors } from 'dux/createInstance';\nimport FlavorSelector from './FlavorSelector';\n\nfunction mapStateToProps(state) {\n return {\n selectedFlavor: createSelectors.selectedFlavorSelector(state),\n };\n}\n\nexport default connect(mapStateToProps, null)(FlavorSelector);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { reduxForm } from 'redux-form';\nimport Paper from '@material-ui/core/Paper';\nimport IconButton from '@material-ui/core/IconButton';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport Menu from '@material-ui/core/Menu';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport classnames from 'classnames';\nimport range from 'lodash/range';\n\nimport ORTypography from 'components/ORTypography/ORTypography';\n\nconst propTypes = {\n addonId: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n displayName: PropTypes.string.isRequired,\n description: PropTypes.string,\n addonValue: PropTypes.shape({type: PropTypes.Any }).isRequired,\n className: PropTypes.string,\n change: PropTypes.func.isRequired,\n trackButtonClick: PropTypes.func.isRequired,\n selectedService: PropTypes.string.isRequired,\n};\n\nconst defaultProps = {\n description: '',\n className: '',\n};\n\nconst useStyles = makeStyles((theme) => ({\n tooltip: {\n maxWidth: 125,\n },\n addonSelector: {\n border: `2px solid ${theme.customColors.mediumGrey}`,\n backgroundColor: (props) =>\n props.selected ? `${theme.customColors.teal}` : `${theme.customColors.white}`,\n color: (props) =>\n props.selected ? `${theme.customColors.white}` : `${theme.customColors.black}`,\n position: 'relative',\n cursor: 'pointer',\n padding: theme.spacing(1),\n },\n addonName: {\n fontWeight: 500,\n fontSize: '1rem',\n },\n addonDescription: {\n fontSize: '1rem',\n },\n valueMenuButton: {\n position: 'absolute',\n top: 0,\n right: 0,\n padding: 0,\n color: (props) =>\n props.selected ? `${theme.customColors.white}` : `${theme.customColors.black}`,\n },\n valueMenuButtonLabel: {\n fontFamily: ['\"Libre Franklin\"', 'sans-serif'],\n fontSize: '.857rem',\n color: (props) =>\n props.selected ? `${theme.customColors.white}` : `${theme.customColors.black}`,\n },\n}));\n\nfunction getPossibleValues(valueObject) {\n const { type } = valueObject;\n if (type === 'integer') {\n return range(Number(valueObject.minimum), Number(valueObject.maximum) + 1);\n }\n if (type === 'string') {\n return [...valueObject.enum];\n }\n return [];\n}\n\nconst REQUIRED_MONGODB_ADDONS = ['shards', 'mongos', 'mongos_plan', 'configsvr_plan'];\nconst REQUIRED_MONGODB_ADDONS_NOT_SELECTED = ['per_mongos'];\n\nexport function UnstyledAddonSelector({\n className,\n addonId,\n name,\n displayName,\n description,\n addonValue,\n change,\n trackButtonClick,\n selectedService,\n}) {\n const [isSelected, toggleIsSelected] = React.useState(false);\n const [anchorEl, setAnchorEl] = React.useState(null);\n const [currentAddonDisplayIndex, setCurrentAddonDisplayIndex] = React.useState(0);\n\n const classes = useStyles({ selected: isSelected });\n const addonValueArray = getPossibleValues(addonValue);\n const hasAddonValues = addonValueArray.length > 0;\n\n // On initial mount, if the addon is required, select it by default.\n // Really it seems like there should be a \"required\" attribute in the API or something.\n // Note that mongo addons will ONLY be mounted if the service is mongodb and sharded is selected.\n React.useEffect(() => {\n if (REQUIRED_MONGODB_ADDONS.includes(name)) {\n toggleIsSelected(true);\n change('addons', (values) => {\n return {\n ...values,\n [addonId]: {\n value: addonValueArray[currentAddonDisplayIndex],\n name,\n displayName,\n },\n };\n });\n } else if (REQUIRED_MONGODB_ADDONS_NOT_SELECTED.includes(name)) {\n toggleIsSelected(false);\n change('addons', (values) => {\n let selectedValue = addonValueArray[currentAddonDisplayIndex];\n if (addonValue.type === \"boolean\") {\n selectedValue = false\n }\n return {\n ...values,\n [addonId]: {\n value: selectedValue,\n name,\n displayName,\n },\n };\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const handleClick = () => {\n // Prevent a user from deselecting a required addon.\n if (REQUIRED_MONGODB_ADDONS.includes(name)) {\n return;\n }\n if (isSelected) {\n toggleIsSelected(false);\n change('addons', (values) => {\n const retObj = { ...values };\n\n // While deselecting the boolean addons, we only to change their value to false.\n if (!REQUIRED_MONGODB_ADDONS_NOT_SELECTED.includes(name) && addonValue.type !== \"boolean\") {\n delete retObj[addonId];\n } else {\n retObj[addonId].value = false\n }\n // If there are no addons selected, this will remove the\n // addons entry completely from the redux-form store\n if (Object.keys(retObj).length === 0) {\n return undefined;\n }\n return retObj;\n });\n } else {\n toggleIsSelected(true);\n let selectedValue = addonValueArray[currentAddonDisplayIndex];\n if (addonValue.type === \"boolean\") {\n selectedValue = true\n }\n\n change('addons', (values) => {\n return {\n ...values,\n [addonId]: {\n value: selectedValue,\n name,\n displayName,\n },\n };\n });\n }\n };\n\n const handleAddonMenuClick = (event) => {\n if (isSelected) {\n event.stopPropagation();\n }\n setAnchorEl(event.currentTarget);\n };\n\n const handleAddonMenuItemClick = (event) => {\n event.stopPropagation();\n change('addons', (values) => {\n return {\n ...values,\n [addonId]: {\n value: event.target.textContent,\n name,\n displayName,\n },\n };\n });\n setCurrentAddonDisplayIndex(Number(event.target.getAttribute('index')));\n setAnchorEl(null);\n };\n\n /* istanbul ignore next */\n const handleVersionMenuClose = (event) => {\n if (isSelected) {\n event.stopPropagation();\n }\n setAnchorEl(null);\n };\n\n const addonMenuItems = addonValueArray.map((value, index) => (\n <MenuItem\n key={value}\n index={index}\n onClick={(e) => {\n trackButtonClick(selectedService.concat(' ', value.toString(), ' Add On Menu Item'));\n handleAddonMenuItemClick(e);\n }}\n >\n {value}\n </MenuItem>\n ));\n\n const actionIcon = (\n <IconButton\n className={classes.valueMenuButton}\n classes={{ label: classes.valueMenuButtonLabel }}\n onClick={handleAddonMenuClick}\n >\n {isSelected ? `${addonValueArray[currentAddonDisplayIndex] || ''}` : null}\n <ExpandMoreIcon />\n </IconButton>\n );\n\n return (\n <Paper\n className={classnames(classes.addonSelector, className)}\n onClick={handleClick}\n elevation={0}\n >\n <ORTypography className={classes.addonName}>{displayName}</ORTypography>\n <ORTypography className={classes.addonDescription}>{description}</ORTypography>\n {hasAddonValues && actionIcon}\n <Menu\n keepMounted\n anchorEl={anchorEl}\n getContentAnchorEl={null}\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'center',\n }}\n open={Boolean(anchorEl)}\n onClose={handleVersionMenuClose}\n >\n {addonMenuItems}\n </Menu>\n </Paper>\n );\n}\n\nUnstyledAddonSelector.propTypes = propTypes;\nUnstyledAddonSelector.defaultProps = defaultProps;\n\nexport default reduxForm({\n form: 'create',\n destroyOnUnmount: false,\n forceUnregisterOnUnmount: true,\n})(UnstyledAddonSelector);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Field, reduxForm } from 'redux-form';\nimport MenuItem from '@material-ui/core/MenuItem';\n\nimport WrappedSelectField from 'components/WrappedSelectField/WrappedSelectField';\n\nconst propTypes = {\n input: PropTypes.shape({ name: PropTypes.string }),\n name: PropTypes.string.isRequired,\n className: PropTypes.string,\n availablePlans: PropTypes.arrayOf(PropTypes.shape({ id: PropTypes.string })).isRequired,\n selectedService: PropTypes.string.isRequired,\n isDisabled: PropTypes.bool,\n trackButtonClick: PropTypes.func.isRequired,\n availablePlansInfo: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n};\n\nconst defaultProps = {\n input: {},\n className: '',\n isDisabled: false,\n};\n\nexport function UnstyledPlanSelect({\n className,\n name,\n availablePlans,\n isDisabled,\n selectedService,\n trackButtonClick,\n availablePlansInfo,\n}) {\n const label = 'Total Capacity';\n\n const menuLabel = (\n <MenuItem key=\"label\" value=\"\" disabled>\n <em>{label}</em>\n </MenuItem>\n );\n\n let planList = availablePlansInfo.map((availablePlanInfo) => {\n return (\n <MenuItem key={availablePlanInfo.planId} value={availablePlanInfo.planId}>\n {availablePlanInfo.sizeInfo}\n </MenuItem>\n );\n });\n\n planList = [menuLabel, ...planList];\n\n return (\n <Field\n className={className}\n name={name}\n component={WrappedSelectField}\n label={label}\n disabled={isDisabled}\n onChange={(e) => {\n trackButtonClick(\n selectedService.concat(' ', availablePlans.find((x) => x.id === e.target.value).name),\n );\n }}\n >\n {planList}\n </Field>\n );\n}\n\nUnstyledPlanSelect.propTypes = propTypes;\nUnstyledPlanSelect.defaultProps = defaultProps;\n\nexport default reduxForm({\n form: 'create',\n destroyOnUnmount: false,\n forceUnregisterOnUnmount: true,\n})(UnstyledPlanSelect);\n","import { connect } from 'react-redux';\n\nimport { selectors } from 'dux/createInstance';\nimport { actionCreators as clickTrackerActionCreators } from 'dux/clickTracker';\nimport UnstyledPlanSelector from './PlanSelector';\n\nfunction mapStateToProps(state) {\n return {\n availablePlans: selectors.availablePlansSelector(state),\n selectedService: selectors.selectedServiceSelector(state),\n availablePlansInfo: selectors.availablePlansInfoSelector(state),\n };\n}\n\nconst mapDispatchToProps = {\n trackButtonClick: clickTrackerActionCreators.trackButtonClick,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(UnstyledPlanSelector);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Grid from '@material-ui/core/Grid';\nimport { reduxForm } from 'redux-form';\n\nimport FlagEnabledContainer from 'components/FlagEnabled/FlagEnabledContainer';\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport SegmentClickTracker from 'components/SegmentClickTracker/SegmentClickTrackerContainer';\nimport FlavorSelectorContainer from './FlavorSelector/FlavorSelectorContainer';\nimport AddonSelector from './AddonSelector/AddonSelector';\nimport PlanSelectorContainer from './PlanSelector/PlanSelectorContainer';\n\nconst propTypes = {\n availablePlans: PropTypes.arrayOf(PropTypes.shape({ id: PropTypes.string })).isRequired,\n availableFlavors: PropTypes.arrayOf(PropTypes.shape({ id: PropTypes.string })).isRequired,\n availableAddons: PropTypes.arrayOf(PropTypes.shape({ name: PropTypes.string })).isRequired,\n selectedPlan: PropTypes.shape({ id: PropTypes.string }).isRequired,\n selectedFlavor: PropTypes.shape({ id: PropTypes.string }).isRequired,\n selectedService: PropTypes.string.isRequired,\n change: PropTypes.func.isRequired,\n trackButtonClick: PropTypes.func.isRequired,\n nodeInfoString: PropTypes.string.isRequired,\n addonInfoString: PropTypes.string.isRequired,\n};\n\nconst useStyles = makeStyles((theme) => ({\n stepSection: {\n marginBottom: theme.spacing(3),\n },\n sectionLabel: {\n marginBottom: theme.spacing(1),\n fontSize: '.8571rem',\n },\n flavorSelectorContainer: {\n display: 'flex',\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(2),\n marginLeft: theme.spacing(-1),\n marginRight: theme.spacing(-1),\n\n [theme.breakpoints.down('sm')]: {\n flexDirection: 'column',\n },\n },\n flavorSelector: {\n maxWidth: 210,\n margin: `0 ${theme.spacing(1)}px`,\n\n [theme.breakpoints.down('sm')]: {\n maxWidth: 'unset',\n marginBottom: theme.spacing(1),\n },\n },\n addonSelector: {\n width: '100%',\n marginBottom: theme.spacing(1),\n },\n planSelector: {\n width: '100%',\n },\n planInfo: {\n color: theme.customColors.orange,\n fontSize: '.85714rem',\n fontStyle: 'italic',\n marginTop: theme.spacing(0.5),\n },\n}));\n\nexport function UnstyledStepTwo({\n availableFlavors,\n availableAddons,\n availablePlans,\n selectedPlan,\n selectedFlavor,\n selectedService,\n trackButtonClick,\n change,\n nodeInfoString,\n addonInfoString,\n}) {\n const [mongoServiceType, setMongoServiceType] = React.useState('replicaset');\n const classes = useStyles();\n\n // Select the first available flavor by default\n React.useEffect(() => {\n if (availableFlavors.length > 0) {\n const flavor = availableFlavors.find((af) => af.id === selectedFlavor.id);\n if (!flavor) {\n change('flavor', availableFlavors[0].id);\n }\n }\n }, [availableFlavors, change, selectedFlavor]);\n\n // Select the first available plan by default\n React.useEffect(() => {\n if (availablePlans.length > 0) {\n const plan = availablePlans.find((ap) => ap.id === selectedPlan.id);\n if (!plan) {\n change('plan', availablePlans[0].id);\n }\n }\n }, [availablePlans, change, selectedPlan]);\n\n const flavorSelectors = availableFlavors.map((flavor) => (\n <FlavorSelectorContainer\n className={classes.flavorSelector}\n key={flavor.id}\n flavorId={flavor.id}\n title={flavor.name}\n description={flavor.description}\n isSelected={selectedFlavor.id === flavor.id}\n onClick={() => change('flavor', flavor.id)}\n />\n ));\n\n const addonSelectors = availableAddons.map((addon) => (\n <SegmentClickTracker\n key={addon.id}\n buttonName={selectedService.concat(' ', addon.displayName, ' Add On')}\n >\n <AddonSelector\n className={classes.addonSelector}\n key={addon.id}\n addonId={addon.id}\n displayName={addon.displayName}\n name={addon.name}\n description={addon.description}\n addonValue={addon.value}\n trackButtonClick={trackButtonClick}\n selectedService={selectedService}\n />\n </SegmentClickTracker>\n ));\n\n const isMongo = selectedService === 'MongoDB';\n let showAddons = false;\n if (!isMongo || mongoServiceType === 'sharded') {\n showAddons = true;\n }\n\n return (\n <form>\n <div className={classes.stepSection}>\n <ORTypography className={classes.sectionLabel}>Pick Your Flavor:</ORTypography>\n <div className={classes.flavorSelectorContainer}>{flavorSelectors}</div>\n <FlagEnabledContainer flagKey=\"mongos\">\n {isMongo && (\n <Grid container spacing={2}>\n <Grid item xs>\n <FlavorSelectorContainer\n title=\"Replicaset\"\n description=\"This is the replicaset type\"\n isSelected={mongoServiceType === 'replicaset'}\n onClick={() => {\n setMongoServiceType('replicaset');\n change('addons', undefined);\n }}\n />\n </Grid>\n <Grid item xs>\n <FlavorSelectorContainer\n title=\"Sharded\"\n description=\"This is the sharded type\"\n isSelected={mongoServiceType === 'sharded'}\n onClick={() => setMongoServiceType('sharded')}\n />\n </Grid>\n </Grid>\n )}\n </FlagEnabledContainer>\n </div>\n\n <div className={classes.stepSection}>\n <ORTypography className={classes.sectionLabel}>Customize Your Instance:</ORTypography>\n {showAddons && <div>{addonSelectors}</div>}\n </div>\n\n <div className={classes.stepSection}>\n <PlanSelectorContainer className={classes.planSelector} name=\"plan\" />\n {isMongo && <p className={classes.planInfo}>Plan includes two replicas.</p>}\n <p className={classes.planInfo}>\n {nodeInfoString}\n {addonInfoString}\n </p>\n </div>\n </form>\n );\n}\n\nUnstyledStepTwo.propTypes = propTypes;\n\nexport default reduxForm({\n form: 'create',\n destroyOnUnmount: false,\n forceUnregisterOnUnmount: true,\n})(UnstyledStepTwo);\n","import { connect } from 'react-redux';\n\nimport { selectors } from 'dux/createInstance';\nimport { actionCreators as clickTrackerActionCreators } from 'dux/clickTracker';\nimport StepTwo from './StepTwo';\n\nfunction mapStateToProps(state) {\n return {\n availableFlavors: selectors.availableFlavorsSelector(state),\n availableAddons: selectors.availableAddonsSelector(state),\n availablePlans: selectors.availablePlansSelector(state),\n selectedPlan: selectors.selectedPlanSelector(state),\n selectedFlavor: selectors.selectedFlavorSelector(state),\n selectedService: selectors.selectedServiceSelector(state),\n nodeInfoString: selectors.nodeInfoStringSelector(state),\n addonInfoString: selectors.addonInfoStringSelector(state),\n };\n}\n\nconst mapDispatchToProps = {\n trackButtonClick: clickTrackerActionCreators.trackButtonClick,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(StepTwo);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { reduxForm, Field } from 'redux-form';\nimport InfoOutlinedIcon from '@material-ui/icons/InfoOutlined';\n\nimport WrappedTextField from 'components/WrappedTextField/WrappedTextField';\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport { required, validateCidr, maxLength } from 'services/validationMsgs';\nimport { normalizeCidr } from 'services/normalizer';\n\nconst maxLength128 = maxLength(128);\n\nconst propTypes = {\n myip: PropTypes.string,\n availableAclKinds: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n selectedService: PropTypes.string.isRequired,\n selectedCidr: PropTypes.string.isRequired,\n change: PropTypes.func.isRequired,\n};\n\nconst defaultProps = {\n myip: '',\n};\n\nconst useStyles = makeStyles((theme) => ({\n howText: {\n fontSize: '.8571rem',\n color: theme.customColors.mediumGrey,\n },\n stepThreeForm: {\n display: 'flex',\n flexDirection: 'column',\n },\n stepThreeField: {\n marginTop: theme.spacing(2),\n },\n infoText: {\n display: 'flex',\n marginTop: theme.spacing(2),\n fontSize: '.8571rem',\n color: theme.customColors.mediumGrey,\n },\n infoIcon: {\n fontSize: '1.14285rem',\n marginTop: theme.spacing(0.25),\n marginRight: theme.spacing(0.5),\n },\n}));\n\nfunction UnstyledStepThree({ myip, availableAclKinds, selectedService, selectedCidr, change }) {\n React.useEffect(() => {\n if (!selectedCidr) {\n change('cidr', myip);\n }\n }, [change, myip, selectedCidr]);\n\n React.useEffect(() => {\n // For the create flow only, we're adding one firewall IP for all\n // ACL kinds for a service\n change(\n 'cidrKinds',\n availableAclKinds.map((aclKind) => aclKind.kind),\n );\n }, [availableAclKinds, change]);\n\n const classes = useStyles();\n\n return (\n <React.Fragment>\n <ORTypography className={classes.howText}>\n <strong>How it works:</strong>\n <br />\n In order to secure your instance, all access is blocked by default. In order to connect to\n your instance, you will need to authorize an IP.\n </ORTypography>\n\n <form className={classes.stepThreeForm}>\n <Field\n className={classes.stepThreeField}\n name=\"cidr\"\n label=\"Your current IP\"\n variant=\"outlined\"\n validate={[validateCidr, required]}\n normalize={normalizeCidr}\n component={WrappedTextField}\n />\n <Field\n className={classes.stepThreeField}\n name=\"cidrName\"\n label=\"IP Name\"\n variant=\"outlined\"\n validate={[maxLength128, required]}\n component={WrappedTextField}\n />\n </form>\n\n {selectedService === 'Elasticsearch' && (\n <ORTypography className={classes.infoText}>\n <InfoOutlinedIcon className={classes.infoIcon} />\n <em>\n You can add, remove, or delete IPs after creating your Instance. For more in-depth\n information regarding IPs,{' '}\n <a\n href=\"https://docs.objectrocket.com/elastic_getting_started.html#\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n please see our docs\n </a>\n .\n </em>\n </ORTypography>\n )}\n </React.Fragment>\n );\n}\n\nUnstyledStepThree.propTypes = propTypes;\nUnstyledStepThree.defaultProps = defaultProps;\n\nexport default reduxForm({\n form: 'create',\n destroyOnUnmount: false,\n forceUnregisterOnUnmount: true,\n})(UnstyledStepThree);\n","import { connect } from 'react-redux';\n\nimport { selectors } from 'dux/createInstance';\nimport StepThree from './StepThree';\n\nfunction mapStateToProps(state) {\n return {\n myip: selectors.getCreateInstanceState(state).myip,\n availableAclKinds: selectors.availableACLKindsSelector(state),\n selectedService: selectors.selectedServiceSelector(state),\n selectedCidr: selectors.selectedCidrSelector(state),\n };\n}\n\nexport default connect(mapStateToProps)(StepThree);\n","import React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { reduxForm, Field } from 'redux-form';\nimport InfoOutlinedIcon from '@material-ui/icons/InfoOutlined';\n\nimport WrappedTextField from 'components/WrappedTextField/WrappedTextField';\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport { required, maxLength } from 'services/validationMsgs';\n\nconst maxLength128 = maxLength(128);\n\nconst useStyles = makeStyles((theme) => ({\n stepFourField: {\n marginTop: theme.spacing(2),\n width: '100%',\n },\n infoText: {\n display: 'flex',\n fontSize: '.8571rem',\n color: theme.customColors.mediumGrey,\n },\n infoIcon: {\n fontSize: '1.14285rem',\n marginTop: theme.spacing(0.25),\n marginRight: theme.spacing(0.5),\n },\n}));\n\nexport function UnstyledStepFour() {\n const classes = useStyles();\n\n return (\n <React.Fragment>\n <ORTypography className={classes.infoText}>\n <InfoOutlinedIcon className={classes.infoIcon} />\n <em>The instance name cannot be changed afterwards.</em>\n </ORTypography>\n\n <form\n onSubmit={(e) => {\n e.preventDefault();\n }}\n >\n <Field\n className={classes.stepFourField}\n name=\"name\"\n label=\"Name\"\n variant=\"outlined\"\n validate={[maxLength128, required]}\n component={WrappedTextField}\n />\n </form>\n </React.Fragment>\n );\n}\n\nexport default reduxForm({\n form: 'create',\n destroyOnUnmount: false,\n forceUnregisterOnUnmount: true,\n})(UnstyledStepFour);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Stepper from '@material-ui/core/Stepper';\nimport Step from '@material-ui/core/Step';\nimport StepButton from '@material-ui/core/StepButton';\nimport StepLabel from '@material-ui/core/StepLabel';\nimport StepContent from '@material-ui/core/StepContent';\nimport Button from '@material-ui/core/Button';\nimport Hidden from '@material-ui/core/Hidden';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogActions from '@material-ui/core/DialogActions';\n\nimport ORContentHeader from 'components/ORContentHeader/ORContentHeader';\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport LoadingPlaceholder from 'components/LoadingPlaceholder/LoadingPlaceholder';\nimport BillingPageContainer from 'components/BillingPage/BillingPageContainer';\nimport BusyButton from 'components/BusyButton/BusyButton';\nimport SummaryDrawer from './SummaryDrawer/SummaryDrawerContainer';\nimport StepOneContainer from './StepOne/StepOneContainer';\nimport StepTwoContainer from './StepTwo/StepTwoContainer';\nimport StepThreeContainer from './StepThree/StepThreeContainer';\nimport StepFour from './StepFour/StepFour';\n\nconst propTypes = {\n catalogIsLoading: PropTypes.bool.isRequired,\n createIsLoading: PropTypes.bool.isRequired,\n stepOneComplete: PropTypes.bool.isRequired,\n stepTwoComplete: PropTypes.bool.isRequired,\n stepThreeComplete: PropTypes.bool.isRequired,\n stepFourComplete: PropTypes.bool.isRequired,\n createInstanceBody: PropTypes.shape({\n service: PropTypes.string,\n version: PropTypes.string,\n region: PropTypes.string,\n provider: PropTypes.string,\n serviceSubtype: PropTypes.string,\n features: PropTypes.shape({}),\n plan: PropTypes.string,\n name: PropTypes.string,\n }),\n mongoLicenseWarningNeeded: PropTypes.bool.isRequired,\n needsBilling: PropTypes.bool.isRequired,\n createInstance: PropTypes.func.isRequired,\n getIp: PropTypes.func.isRequired,\n destroy: PropTypes.func.isRequired,\n trackButtonClickSet: PropTypes.func.isRequired,\n};\n\nconst defaultProps = {\n createInstanceBody: {\n service: '',\n },\n};\n\nconst useStyles = makeStyles((theme) => ({\n createContainer: {\n height: '100%',\n },\n stepperContainer: {\n height: '100%',\n backgroundColor: theme.customColors.white,\n },\n headerContainer: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n borderBottom: `1px solid ${theme.customColors.lightGrey}`,\n },\n header: {\n color: theme.customColors.black,\n fontSize: '1.2857rem',\n },\n stepper: {\n maxWidth: 700,\n padding: theme.spacing(1),\n },\n stepButtonIcon: {\n color: [theme.customColors.teal, '!important'],\n },\n theArrow: {\n color: theme.customColors.orange,\n marginRight: theme.spacing(1),\n },\n summaryButton: {\n color: theme.customColors.teal,\n textTransform: 'uppercase',\n fontSize: '1.2857rem',\n cursor: 'pointer',\n },\n stepActionButton: {\n width: '100%',\n maxWidth: '15rem',\n marginRight: theme.spacing(2),\n display: 'inline-flex',\n\n [theme.breakpoints.down('sm')]: {\n maxWidth: 'unset',\n margin: 'unset',\n '&:nth-child(2)': {\n marginLeft: theme.spacing(1),\n },\n },\n },\n busyButtonWrapperAndButton: {\n width: '100%',\n },\n monthlyCost: {\n [theme.breakpoints.down('sm')]: {\n display: 'none',\n },\n },\n estimate: {\n [theme.breakpoints.down('xs')]: {\n display: 'none',\n },\n },\n mobileStepperContainer: {\n border: `1px solid ${theme.customColors.lightGrey}`,\n marginTop: theme.spacing(1),\n padding: theme.spacing(1),\n borderRadius: 3,\n },\n mobileHeaderContainer: {\n marginBottom: theme.spacing(1),\n },\n mobileStepper: {\n display: 'flex',\n padding: `${theme.spacing(4)}px 0 ${theme.spacing(1)}px 0`,\n backgroundColor: theme.customColors.white,\n },\n mobileProgressBar: {\n display: 'none',\n },\n}));\n\nfunction getSteps() {\n return [\n 'Service, Region, and Provider',\n 'Configure and Customize',\n 'Authorized Firewall IPs',\n 'Name Your Instance',\n ];\n}\n\nexport function getStepContent(step) {\n switch (step) {\n case 0:\n return <StepOneContainer />;\n case 1:\n return <StepTwoContainer />;\n case 2:\n return <StepThreeContainer />;\n case 3:\n return <StepFour />;\n default:\n return null;\n }\n}\n\nexport function UnstyledCreateInstancePage({\n catalogIsLoading,\n createIsLoading,\n stepOneComplete,\n stepTwoComplete,\n stepThreeComplete,\n stepFourComplete,\n createInstanceBody,\n createInstance,\n mongoLicenseWarningNeeded,\n needsBilling,\n getIp,\n destroy,\n history,\n trackButtonClickSet,\n}) {\n React.useEffect(() => {\n getIp();\n }, [getIp]);\n\n const stepsComplete = [stepOneComplete, stepTwoComplete, stepThreeComplete, stepFourComplete];\n const [activeStep, setActiveStep] = React.useState(0);\n const [mongoWarningOpen, setMongoWarningOpen] = React.useState(false);\n\n // Above a small desktop width, have the drawer open on initial loads. On smaller\n // screens, the drawer is closed on initial load.\n const [summaryOpen, setSummaryOpen] = React.useState(window.innerWidth > 1024);\n const [billingOpen, setBillingOpen] = React.useState(false);\n\n const classes = useStyles();\n\n const steps = getSteps();\n const isLastStep = activeStep === steps.length - 1;\n\n const trackStep = (index) => {\n const stepsArray = getSteps();\n const nextStep = stepsArray[index];\n trackButtonClickSet(nextStep);\n };\n\n const handleStep = (step) => () => {\n setActiveStep(step);\n trackStep(step);\n };\n const handlePrevious = () => {\n setActiveStep((prevActiveStep) => prevActiveStep - 1);\n trackStep(activeStep - 1);\n };\n const handleNext = () => {\n setActiveStep((prevActiveStep) => prevActiveStep + 1);\n trackStep(activeStep + 1);\n };\n const toggleSummary = () => {\n setSummaryOpen((prevSummaryOpen) => {\n const newSummaryOpen = !prevSummaryOpen;\n trackButtonClickSet(`Summary Toggled ${newSummaryOpen ? '(Open)' : '(Closed)'}`);\n return newSummaryOpen;\n });\n };\n const handleReset = () => {\n setActiveStep(() => {\n destroy('create');\n trackButtonClickSet('Cancel');\n return 0;\n });\n };\n\n const contactSupportClick = () => {\n setMongoWarningOpen(true);\n };\n const supportAlertOKClick = () => {\n destroy('create');\n setMongoWarningOpen(false);\n };\n const handleSupportAlertClose = () => {\n setMongoWarningOpen(false);\n };\n\n const redirectToInstances = () => history.push('/mission-ctrl/instances');\n\n const createInstanceClick = () => {\n trackButtonClickSet('Create Instance Submit');\n if (needsBilling) {\n const buttonName = 'Instance Snapshot on Billing Popup';\n const data = {\n analytics: {\n eventPayload: {\n event: buttonName,\n properties: {\n instance_name: createInstanceBody.name,\n service: createInstanceBody.service,\n plan: createInstanceBody.plan,\n version: createInstanceBody.version,\n region: createInstanceBody.region,\n provider: createInstanceBody.provider,\n service_subtype: createInstanceBody.serviceSubtype,\n features: createInstanceBody.features,\n },\n },\n },\n };\n trackButtonClickSet(buttonName, data);\n setBillingOpen(true);\n } else {\n createInstance(createInstanceBody, redirectToInstances);\n }\n };\n\n let advanceButtonText = 'Continue';\n let advanceButtonAction = handleNext;\n if (mongoLicenseWarningNeeded) {\n advanceButtonText = 'Contact Support';\n advanceButtonAction = contactSupportClick;\n } else if (isLastStep) {\n advanceButtonText = 'Create Instance';\n advanceButtonAction = createInstanceClick;\n }\n\n return (\n <React.Fragment>\n <Dialog open={mongoWarningOpen} onClose={handleSupportAlertClose}>\n <DialogContent>\n MongoDB in AWS/GCP/Azure is currently only available in private DBaaS regions. For\n information and pricing on private DBaaS deployments please contact{' '}\n <a href=\"mailto:support@objectrocket.com\">support@objectrocket.com</a>, or see{' '}\n <a\n href=\"https://www.objectrocket.com/private-dbaas/\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n our docs\n </a>\n .\n </DialogContent>\n <DialogActions>\n <Button color=\"primary\" onClick={supportAlertOKClick}>\n OK\n </Button>\n </DialogActions>\n </Dialog>\n {catalogIsLoading ? (\n <LoadingPlaceholder />\n ) : (\n <div className={classes.createContainer}>\n <div className={classes.headerContainer}>\n <ORContentHeader>Create an Instance</ORContentHeader>\n <ORTypography\n variant=\"h5\"\n component=\"h1\"\n className={classes.summaryButton}\n onClick={toggleSummary}\n >\n <span className={classes.theArrow}><</span>\n <span className={classes.monthlyCost}>Monthly Cost </span>\n <span className={classes.estimate}>Estimate</span>\n </ORTypography>\n </div>\n\n <div className={classes.stepperContainer}>\n <Hidden mdUp>\n <div className={classes.mobileStepperContainer}>\n <div className={classes.mobileHeaderContainer}>\n <ORTypography variant=\"h5\" component=\"h2\" className={classes.header}>\n Step {activeStep + 1} of {steps.length}\n </ORTypography>\n <ORTypography variant=\"h5\" component=\"h2\" className={classes.header}>\n {steps[activeStep]}\n </ORTypography>\n </div>\n {getStepContent(activeStep)}\n <div className={classes.mobileStepper}>\n {activeStep > 0 && (\n <Button\n className={classes.stepActionButton}\n variant=\"contained\"\n color=\"secondary\"\n onClick={handlePrevious}\n >\n Previous\n </Button>\n )}\n <BusyButton\n loading={createIsLoading}\n className={classes.stepActionButton}\n classes={{ wrapper: classes.busyButtonWrapperAndButton }}\n btnClassName={classes.busyButtonWrapperAndButton}\n disabled={!stepsComplete[activeStep]}\n mini={false}\n variant=\"contained\"\n color=\"primary\"\n onClick={advanceButtonAction}\n >\n {advanceButtonText}\n </BusyButton>\n </div>\n </div>\n </Hidden>\n\n <Hidden smDown>\n <Stepper activeStep={activeStep} orientation=\"vertical\" className={classes.stepper}>\n {steps.map((label, index) => (\n <Step key={label}>\n <StepButton onClick={handleStep(index)} completed={stepsComplete[index]}>\n <StepLabel StepIconProps={{ classes: { root: classes.stepButtonIcon } }}>\n {label}\n </StepLabel>\n </StepButton>\n <StepContent>\n {getStepContent(index)}\n <br />\n {isLastStep && (\n <Button\n className={classes.stepActionButton}\n variant=\"contained\"\n color=\"secondary\"\n onClick={handleReset}\n >\n Cancel\n </Button>\n )}\n <BusyButton\n loading={createIsLoading}\n className={classes.stepActionButton}\n classes={{ wrapper: classes.busyButtonWrapperAndButton }}\n btnClassName={classes.busyButtonWrapperAndButton}\n disabled={!stepsComplete[activeStep]}\n mini={false}\n variant=\"contained\"\n color=\"primary\"\n onClick={advanceButtonAction}\n >\n {advanceButtonText}\n </BusyButton>\n </StepContent>\n </Step>\n ))}\n </Stepper>\n </Hidden>\n </div>\n <SummaryDrawer isOpen={summaryOpen} toggle={toggleSummary} />\n </div>\n )}\n <BillingPageContainer\n open={billingOpen}\n billingOpen={() => setBillingOpen(false)}\n createInstance={createInstance}\n newInstanceData={createInstanceBody}\n redirectToInstances={redirectToInstances}\n />\n </React.Fragment>\n );\n}\n\nUnstyledCreateInstancePage.propTypes = propTypes;\nUnstyledCreateInstancePage.defaultProps = defaultProps;\n\nexport default UnstyledCreateInstancePage;\n","import { connect } from 'react-redux';\nimport { destroy } from 'redux-form';\n\nimport { selectors as catalogSelectors } from 'dux/catalog';\nimport { selectors as createSelectors, actionCreators } from 'dux/createInstance';\nimport { selectors as orgSelectors } from 'dux/org';\nimport { actionCreators as clickTrackerActionCreators } from 'dux/clickTracker';\nimport CreateInstancePage from './CreateInstancePage';\n\nfunction mapStateToProps(state) {\n return {\n catalogIsLoading: catalogSelectors.catalogIsLoadingSelector(state),\n createIsLoading: createSelectors.getCreateInstanceState(state).isLoading,\n stepOneComplete: createSelectors.stepOneCompleteSelector(state),\n stepTwoComplete: createSelectors.stepTwoCompleteSelector(state),\n stepThreeComplete: createSelectors.stepThreeCompleteSelector(state),\n stepFourComplete: createSelectors.stepFourCompleteSelector(state),\n createInstanceBody: createSelectors.createInstanceBodySelector(state),\n mongoLicenseWarningNeeded: createSelectors.mongoLicenseWarningNeededSelector(state),\n needsBilling: orgSelectors.needsBilling(state),\n };\n}\n\nconst mapDispatchToProps = {\n createInstance: actionCreators.createInstance,\n getIp: actionCreators.getIp,\n destroy,\n trackButtonClickSet: clickTrackerActionCreators.trackButtonClickSet,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(CreateInstancePage);\n","/**\n * Form for generating an api token.\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { Field, reduxForm, SubmissionError } from 'redux-form';\nimport { withStyles } from '@material-ui/core';\nimport Typography from '@material-ui/core/Typography';\n\nimport BusyButton from 'components/BusyButton/BusyButton';\nimport WrappedTextField from 'components/WrappedTextField/WrappedTextField';\nimport { maxLength, required, isAlphanumericUnderscore } from 'services/validationMsgs';\n\nconst maxLength16 = maxLength(16);\n\nconst propTypes = {\n classes: PropTypes.shape({\n field: PropTypes.string.isRequired,\n btn: PropTypes.string.isRequired,\n }).isRequired,\n error: PropTypes.string,\n className: PropTypes.string,\n handleSubmit: PropTypes.func.isRequired,\n submitting: PropTypes.bool.isRequired,\n valid: PropTypes.bool.isRequired,\n pristine: PropTypes.bool.isRequired,\n onTokenCreate: PropTypes.func.isRequired,\n};\n\nconst defaultProps = {\n className: null,\n error: null,\n};\n\nexport function UnStyledApiTokenForm({\n classes,\n className,\n valid,\n error,\n pristine,\n submitting,\n handleSubmit,\n onTokenCreate,\n}) {\n const handleFormSubmissionReturn = (result) => {\n if (result.payload && result.payload.name === 'RequestError') return;\n if (result.error) {\n throw new SubmissionError(result.formErrors);\n }\n };\n\n const submitHandler = (data) => onTokenCreate(data).then(handleFormSubmissionReturn);\n\n return (\n <form onSubmit={handleSubmit(submitHandler)} className={className}>\n <Field\n placeholder=\"Name\"\n name=\"name\"\n component={WrappedTextField}\n label=\"Name\"\n variant=\"outlined\"\n props={{ InputLabelProps: { shrink: true, className: classes.inputLabel } }}\n validate={[required, maxLength16, isAlphanumericUnderscore]}\n className={classes.field}\n fullWidth\n autoComplete=\"off\"\n />\n {error && !submitting ? (\n <Typography color=\"error\" className={classes.error}>\n {error}\n </Typography>\n ) : null}\n <BusyButton\n size=\"large\"\n type=\"submit\"\n fullWidth\n loading={submitting}\n disabled={!valid || pristine}\n variant=\"contained\"\n color=\"primary\"\n className={classes.btn}\n >\n Generate API Token\n </BusyButton>\n </form>\n );\n}\n\nUnStyledApiTokenForm.propTypes = propTypes;\nUnStyledApiTokenForm.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n field: {\n marginTop: theme.spacing(2),\n '& label': {\n color: '#231f20 !important',\n },\n },\n btn: {\n marginTop: theme.spacing(2),\n },\n error: {\n marginTop: theme.spacing(2),\n },\n inputLabel: {\n color: theme.palette.text.primary,\n },\n});\n\nexport default withStyles(styles)(\n reduxForm({\n form: 'apiTokenForm',\n destroyOnUnmount: true,\n })(UnStyledApiTokenForm),\n);\n","import { connect } from 'react-redux';\n\nimport { actionCreators } from 'dux/apitokens';\nimport ApiTokenForm from './ApiTokenForm';\n\nconst mapDispatchToProps = {\n onTokenCreate: actionCreators.createToken,\n};\n\nexport default connect(null, mapDispatchToProps)(ApiTokenForm);\n","/**\n * SVG Content Copy icon\n */\nimport React from 'react';\nimport SvgIcon from '@material-ui/core/SvgIcon';\n\nexport default function ContentCopyIcon({ ...props }) {\n return (\n <SvgIcon {...props}>\n <path d=\"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z\" />\n </SvgIcon>\n );\n}\n","/**\n * Copy to clipboard element.\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport { uiState } from 'react-redux-ui-state';\nimport CheckCircle from '@material-ui/icons/CheckCircle';\nimport Fab from '@material-ui/core/Fab';\nimport ContentCopyIcon from './ContentCopyIcon/ContentCopyIcon';\n\nconst propTypes = {\n copyString: PropTypes.string.isRequired,\n classes: PropTypes.shape({\n hidden: PropTypes.string.isRequired,\n }).isRequired,\n setUiState: PropTypes.func.isRequired,\n copySuccess: PropTypes.bool.isRequired,\n copyStyles: PropTypes.shape({}).isRequired,\n size: PropTypes.string.isRequired,\n checkColor: PropTypes.string.isRequired,\n};\n\nexport function UnStyledCopyToClipboard({\n copyString,\n classes,\n setUiState,\n copySuccess,\n copyStyles,\n size,\n checkColor,\n}) {\n const handleCopy = () => {\n if (copySuccess) {\n return;\n }\n const tempInput = document.createElement('input');\n tempInput.style = 'position: absolute; left: -1000px; top: -1000px';\n tempInput.value = copyString;\n document.body.appendChild(tempInput);\n tempInput.select();\n document.execCommand('copy');\n document.body.removeChild(tempInput);\n setUiState({ copySuccess: true });\n setTimeout(() => {\n setUiState({ copySuccess: false });\n }, 3000);\n };\n\n return (\n <div className={!document.queryCommandSupported('copy') ? classes.hidden : null}>\n <Fab style={copyStyles} size={size} aria-label=\"Copy to clipboard\" onClick={handleCopy}>\n {copySuccess ? <CheckCircle color={checkColor} /> : <ContentCopyIcon />}\n </Fab>\n </div>\n );\n}\n\nUnStyledCopyToClipboard.propTypes = propTypes;\n\nconst styles = (theme) => ({\n hidden: {\n color: '#000',\n visibility: 'hidden',\n display: 'none',\n height: 0,\n },\n svg: {\n fill: theme.palette.text.primary,\n },\n});\n\nexport const uiConfig = {\n name: 'copyToClipboard',\n state: () => ({\n copySuccess: false,\n }),\n};\n\nexport default uiState(uiConfig)(withStyles(styles)(UnStyledCopyToClipboard));\n","/**\n * Show More or Less of a String\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Button from '@material-ui/core/Button';\nimport { uiState } from 'react-redux-ui-state';\nimport { withStyles } from '@material-ui/core';\n\nconst propTypes = {\n className: PropTypes.string,\n classes: PropTypes.shape({\n break: PropTypes.string.isRequired,\n link: PropTypes.string.isRequired,\n }).isRequired,\n lessChars: PropTypes.number,\n string: PropTypes.string.isRequired,\n setUiState: PropTypes.func.isRequired,\n more: PropTypes.bool.isRequired,\n};\n\nconst defaultProps = {\n className: null,\n lessChars: 80,\n};\n\nexport function UnstyledMoreLessString({\n className,\n classes,\n lessChars,\n string,\n setUiState,\n more,\n}) {\n const toggleClick = () => {\n setUiState({ more: !more });\n };\n\n let displayString = string;\n\n if (!more) {\n displayString = string.slice(0, lessChars);\n displayString = `${displayString}...`;\n }\n\n return (\n <span className={className}>\n <span className={classes.break}>{displayString}</span>\n <Button type=\"button\" tabIndex={0} className={classes.link} onClick={toggleClick}>\n {more ? 'less' : 'more'}\n </Button>\n </span>\n );\n}\n\nUnstyledMoreLessString.propTypes = propTypes;\nUnstyledMoreLessString.defaultProps = defaultProps;\n\nconst styles = () => ({\n break: {\n display: 'inline-block',\n whiteSpace: 'pre-wrap' /* css-3 */,\n whiteSpace: '-moz-pre-wrap' /* Mozilla, since 1999 */, // eslint-disable-line no-dupe-keys\n whiteSpace: '-pre-wrap' /* Opera 4-6 */, // eslint-disable-line no-dupe-keys\n whiteSpace: '-o-pre-wrap' /* Opera 7 */, // eslint-disable-line no-dupe-keys\n overflowWrap: 'break-word',\n wordWrap: 'break-word',\n wordBreak: 'break-all' /* Check this on Safari */,\n },\n link: {\n marginLeft: '.5em',\n color: 'blue',\n background: 'none',\n border: 'none',\n font: 'inherit',\n cursor: 'pointer',\n outline: 'inherit',\n minHeight: 'inherit',\n padding: 0,\n margin: 0,\n textTransform: 'lowercase',\n },\n});\n\nexport const uiConfig = {\n name: 'moreOrLessString',\n state: () => ({\n more: false,\n }),\n};\n\nexport default uiState(uiConfig)(withStyles(styles)(UnstyledMoreLessString));\n","/**\n * Form for displaying and deleteing an api token.\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { reduxForm, SubmissionError } from 'redux-form';\nimport { withStyles } from '@material-ui/core';\nimport Fab from '@material-ui/core/Fab';\nimport Icon from '@material-ui/core/Icon';\nimport Typography from '@material-ui/core/Typography';\n\nimport CopyToClipboard from 'components/CopyToClipboard/CopyToClipboard';\nimport MoreLessString from './MoreLessString/MoreLessString';\n\nconst propTypes = {\n classes: PropTypes.shape({\n field: PropTypes.string.isRequired,\n }).isRequired,\n name: PropTypes.string.isRequired,\n token: PropTypes.string.isRequired,\n className: PropTypes.string,\n handleSubmit: PropTypes.func.isRequired,\n valid: PropTypes.bool.isRequired,\n onTokenDelete: PropTypes.func.isRequired,\n};\n\nconst defaultProps = {\n className: null,\n};\n\nexport function UnStyledApiTokenItem({\n classes,\n className,\n name,\n token,\n valid,\n handleSubmit,\n onTokenDelete,\n}) {\n const handleFormSubmissionReturn = (result) => {\n if (result.error) {\n throw new SubmissionError(result.formErrors);\n }\n };\n\n const submitHandler = (data) => onTokenDelete(data.id).then(handleFormSubmissionReturn);\n\n return (\n <form onSubmit={handleSubmit(submitHandler)} className={classnames([className, classes.root])}>\n <div className={classes.root}>\n <div className={classes.col}>\n <Typography variant=\"subtitle1\">{name}</Typography>\n <Typography className={classes.apikey} variant=\"body2\">\n <MoreLessString string={token} />\n </Typography>\n </div>\n <div className={classes.col}>\n <CopyToClipboard\n copyString={token}\n copyStyles={{\n marginTop: '8px',\n backgroundColor: '#3C9BA0',\n color: '#FFF',\n }}\n checkColor=\"inherit\"\n size=\"small\"\n />\n </div>\n <div className={classes.col}>\n <Fab type=\"submit\" size=\"small\" disabled={!valid} classes={{ root: classes.trash }}>\n <Icon>delete</Icon>\n </Fab>\n </div>\n </div>\n </form>\n );\n}\n\nUnStyledApiTokenItem.propTypes = propTypes;\nUnStyledApiTokenItem.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n root: {\n display: 'flex',\n },\n field: {\n marginTop: theme.spacing(2),\n },\n trash: {\n color: theme.customColors.white,\n backgroundColor: theme.customColors.red,\n marginTop: theme.spacing(1),\n marginLeft: theme.spacing(1),\n [theme.breakpoints.only('xs')]: {\n marginTop: 0,\n marginLeft: theme.spacing(1),\n },\n },\n});\n\nexport default withStyles(styles)(\n reduxForm({\n form: 'apiTokenItemDeleteForm',\n field: ['id'],\n destroyOnUnmount: true,\n })(UnStyledApiTokenItem),\n);\n","import { connect } from 'react-redux';\n\nimport { actionCreators } from 'dux/apitokens';\nimport ApiTokenItem from './ApiTokenItem';\n\nconst mapDispatchToProps = {\n onTokenDelete: actionCreators.deleteToken,\n};\n\nexport default connect(null, mapDispatchToProps)(ApiTokenItem);\n","/**\n * Card for updating api token\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport LoadingPlaceHolder from 'components/LoadingPlaceholder/LoadingPlaceholder';\nimport ApiTokenFormContainer from './ApiTokenForm/ApiTokenFormContainer';\nimport ApiTokenItem from './ApiTokenItem/ApiTokenItemContainer';\n\nconst propTypes = {\n className: PropTypes.string,\n tokenState: PropTypes.shape({\n apitokens: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n isLoading: PropTypes.bool.isRequired,\n isSaving: PropTypes.bool.isRequired,\n }).isRequired,\n classes: PropTypes.shape({\n apikey: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nconst defaultProps = {\n className: null,\n};\n\nexport function UnstyledApiTokenCard({ className, classes, tokenState }) {\n const { isLoading, apitokens } = tokenState;\n\n return (\n <Card className={className}>\n <CardHeader title=\"API Token\" />\n <CardContent>\n {isLoading ? <LoadingPlaceHolder /> : null}\n {!isLoading && !apitokens.length ? (\n <ApiTokenFormContainer />\n ) : (\n apitokens.map((apitoken) => (\n <ApiTokenItem\n initialValues={{ id: apitoken.id }}\n className={classes.apikey}\n key={apitoken.id}\n id={apitoken.id}\n name={apitoken.name}\n token={apitoken.token}\n />\n ))\n )}\n </CardContent>\n </Card>\n );\n}\n\nUnstyledApiTokenCard.propTypes = propTypes;\nUnstyledApiTokenCard.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n apikey: {\n color: theme.palette.text.primary,\n },\n});\n\nexport default withStyles(styles)(UnstyledApiTokenCard);\n","import { connect } from 'react-redux';\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { selectors, actionCreators } from 'dux/apitokens';\nimport ApiTokenCard from './ApiTokenCard';\n\nconst propTypes = {\n getTokens: PropTypes.func.isRequired,\n};\n\nclass ApiTokenCardContainer extends Component {\n componentDidMount() {\n const { getTokens } = this.props;\n getTokens();\n }\n\n render() {\n const { props } = this;\n return <ApiTokenCard {...props} />;\n }\n}\n\nconst mapStateToProps = (state) => ({\n tokenState: selectors.getApiTokenState(state),\n});\n\nconst mapDispatchToProps = {\n getTokens: actionCreators.getTokens,\n};\n\nApiTokenCardContainer.propTypes = propTypes;\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ApiTokenCardContainer);\n","/**\n * A MUI card that collapses/expands the card content by toggling the header\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { withStyles } from '@material-ui/styles';\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport ExpansionPanel from '@material-ui/core/ExpansionPanel';\nimport ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary';\nimport ExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails';\nimport ExpandMore from '@material-ui/icons/ExpandMore';\n\nconst propTypes = {\n // This could include any current or future-supported MUI card header props\n headerProps: PropTypes.object, // eslint-disable-line react/forbid-prop-types\n children: PropTypes.node,\n className: PropTypes.string,\n classes: PropTypes.shape({\n summary: PropTypes.string.isRequired,\n summaryContent: PropTypes.string.isRequired,\n summaryExpanded: PropTypes.string.isRequired,\n detail: PropTypes.string.isRequired,\n fullWidth: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nconst defaultProps = {\n headerProps: null,\n children: null,\n className: null,\n};\n\nexport function UnstyledCollapsibleCard({ headerProps, children, className, classes }) {\n return (\n <Card className={className}>\n <ExpansionPanel defaultExpanded>\n <ExpansionPanelSummary\n classes={{\n expanded: classes.summaryExpanded,\n content: classes.summaryContent,\n root: classes.summaryBorder,\n expandIcon: classes.expandIcon,\n }}\n className={classes.summary}\n expandIcon={<ExpandMore />}\n >\n <CardHeader\n {...headerProps}\n className={classnames(classes.fullWidth, headerProps.className)}\n />\n </ExpansionPanelSummary>\n <ExpansionPanelDetails className={classes.detail}>\n <CardContent className={classes.fullWidth}>{children}</CardContent>\n </ExpansionPanelDetails>\n </ExpansionPanel>\n </Card>\n );\n}\n\nUnstyledCollapsibleCard.propTypes = propTypes;\nUnstyledCollapsibleCard.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n summary: {\n padding: 0,\n display: 'flex',\n },\n summaryBorder: {\n borderBottom: '1px solid #D8D8D8',\n },\n // Need empty declaration to get proper rule specificity for expanded summary state\n summaryExpanded: {},\n summaryContent: {\n margin: 0,\n '&$summaryExpanded': {\n margin: 0,\n },\n },\n expandIcon: {\n marginRight: theme.spacing(1),\n },\n detail: {\n padding: 0,\n display: 'flex',\n },\n fullWidth: {\n width: '100%',\n borderBottom: 'unset',\n },\n});\n\nexport default withStyles(styles)(UnstyledCollapsibleCard);\n","/**\n * Card for displaying/updating the user profile\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport TextField from '@material-ui/core/TextField';\n\nimport AccountCircle from '@material-ui/icons/AccountCircle';\nimport CollapsibleCard from './CollapsibleCard/CollapsibleCard';\n\nconst propTypes = {\n email: PropTypes.string.isRequired,\n role: PropTypes.string.isRequired,\n className: PropTypes.string,\n classes: PropTypes.shape({\n cardSubheader: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nconst defaultProps = {\n className: null,\n};\n\nexport function UnstyledProfileCard({ email, role, className, classes }) {\n return (\n <CollapsibleCard\n className={className}\n headerProps={{\n title: 'Profile Management',\n subheader: role,\n className: classes.content,\n classes: {\n subheader: classes.cardSubheader,\n },\n subheaderTypographyProps: {\n color: 'textPrimary',\n },\n avatar: <AccountCircle fontSize=\"large\" color=\"secondary\" />,\n }}\n >\n <TextField\n variant=\"outlined\"\n label=\"Email\"\n value={email}\n fullWidth\n className={classes.field}\n InputProps={{\n readOnly: true,\n disableUnderline: true,\n }}\n />\n </CollapsibleCard>\n );\n}\n\nUnstyledProfileCard.propTypes = propTypes;\nUnstyledProfileCard.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n cardSubheader: {\n textTransform: 'capitalize',\n },\n field: {\n marginTop: theme.spacing(1),\n '& label': {\n color: '#231f20 !important',\n },\n },\n});\n\nexport default withStyles(styles)(UnstyledProfileCard);\n","import { connect } from 'react-redux';\n\nimport { selectors } from 'dux/user';\nimport ProfileCard from './ProfileCard';\n\nconst mapStateToProps = (state) => ({\n email: selectors.getIdentityState(state).email,\n role: selectors.getIdentityState(state).roles[0],\n});\n\nexport default connect(mapStateToProps, null)(ProfileCard);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport KeyboardArrowDown from '@material-ui/icons/KeyboardArrowDown';\nimport { reduxForm, Field, SubmissionError } from 'redux-form';\n\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport { required, maxLength, email } from 'services/validationMsgs';\nimport WrappedTextField from 'components/WrappedTextField/WrappedTextField';\nimport CollapsibleCard from '../ProfileCard/CollapsibleCard/CollapsibleCard';\n\nconst maxLength128 = maxLength(128);\n\nconst propTypes = {\n org: PropTypes.shape({\n companyName: PropTypes.string.isRequired,\n primaryEmail: PropTypes.string.isRequired,\n phoneNumber: PropTypes.string,\n }),\n className: PropTypes.string,\n classes: PropTypes.shape({\n cardSubheader: PropTypes.string.isRequired,\n }).isRequired,\n updateOrg: PropTypes.func.isRequired,\n handleSubmit: PropTypes.func.isRequired,\n};\n\nconst defaultProps = {\n className: null,\n org: {\n phoneNumber: '',\n },\n};\n\nexport function UnstyledOrganizationCard({ org, className, classes, updateOrg, handleSubmit }) {\n const handleFormSubmissionReturn = (result) => {\n if (result.error) {\n throw new SubmissionError(result.formErrors);\n }\n };\n\n const submitHandler = (data) => updateOrg(data).then(handleFormSubmissionReturn);\n\n return (\n <CollapsibleCard\n className={className}\n headerProps={{\n title: 'Organization',\n className: classes.content,\n classes: {\n subheader: classes.cardSubheader,\n },\n subheaderTypographyProps: {\n color: 'textPrimary',\n },\n }}\n >\n <form onSubmit={handleSubmit(submitHandler)}>\n <div className={classes.fieldContainer}>\n <Field\n variant=\"outlined\"\n name=\"organization\"\n label=\"Organization\"\n placeholder={org.companyName}\n component={WrappedTextField}\n fullWidth\n disabled\n validate={[maxLength128, required]}\n InputLabelProps={{\n shrink: true,\n }}\n />\n <Field\n variant=\"outlined\"\n name=\"email\"\n label=\"Email\"\n placeholder={org.primaryEmail}\n component={WrappedTextField}\n fullWidth\n disabled\n validate={[maxLength128, required, email]}\n margin=\"normal\"\n InputLabelProps={{\n shrink: true,\n }}\n />\n <div className={classes.addressFieldContainer}>\n <ORTypography variant=\"subtitle2\">Billing Address</ORTypography>\n <div className={classes.streetAddress}>\n <Field\n variant=\"outlined\"\n name=\"address\"\n label=\"Address\"\n placeholder=\"Address Line 1\"\n component={WrappedTextField}\n disabled\n validate={[maxLength128, required]}\n InputLabelProps={{\n shrink: true,\n }}\n className={classes.street}\n />\n <Field\n variant=\"outlined\"\n name=\"suite\"\n label=\"Suite\"\n placeholder=\"Suite\"\n component={WrappedTextField}\n disabled\n validate={[maxLength128, required]}\n InputLabelProps={{\n shrink: true,\n }}\n className={classes.suite}\n />\n </div>\n <Field\n variant=\"outlined\"\n name=\"city\"\n label=\"City\"\n placeholder=\"City\"\n component={WrappedTextField}\n fullWidth\n disabled\n validate={[maxLength128, required]}\n InputLabelProps={{\n shrink: true,\n }}\n />\n <div className={classes.stateAndZip}>\n <Field\n variant=\"outlined\"\n name=\"state\"\n label=\"State\"\n placeholder=\"State\"\n component={WrappedTextField}\n disabled\n select\n validate={[maxLength128, required]}\n InputLabelProps={{\n shrink: true,\n }}\n SelectProps={{\n displayEmpty: true,\n IconComponent: KeyboardArrowDown,\n value: '',\n classes: { root: classes.disabledSelectText },\n }}\n className={classes.state}\n >\n <MenuItem value=\"\" disabled>\n State\n </MenuItem>\n </Field>\n <Field\n variant=\"outlined\"\n name=\"zip\"\n label=\"Zip Code\"\n placeholder=\"Zip Code\"\n component={WrappedTextField}\n disabled\n validate={[maxLength128, required]}\n InputLabelProps={{\n shrink: true,\n }}\n className={classes.zip}\n />\n </div>\n </div>\n <Field\n variant=\"outlined\"\n name=\"phone\"\n label=\"Phone Number\"\n placeholder={org.phoneNumber || 'Phone Number'}\n component={WrappedTextField}\n fullWidth\n disabled\n validate={[maxLength128, required]}\n margin=\"normal\"\n InputLabelProps={{\n shrink: true,\n }}\n />\n </div>\n </form>\n </CollapsibleCard>\n );\n}\n\nUnstyledOrganizationCard.propTypes = propTypes;\nUnstyledOrganizationCard.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n content: {\n marginBottom: '-4px',\n },\n cardSubheader: {\n textTransform: 'capitalize',\n marginBottom: '5px',\n },\n fieldContainer: {\n marginTop: theme.spacing(1),\n '& input': {\n textAlign: 'left',\n },\n '& label': {\n color: '#231f20 !important',\n },\n },\n addressFieldContainer: {\n display: 'flex',\n flexDirection: 'column',\n '& input': {\n textAlign: 'left',\n },\n '& > *': {\n marginBottom: theme.spacing(2),\n },\n marginTop: theme.spacing(1),\n },\n streetAddress: {\n display: 'Flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n street: {\n flex: '1 1 75%',\n },\n suite: {\n marginLeft: theme.spacing(1),\n flex: '2 1 25%',\n },\n stateAndZip: {\n display: 'Flex',\n flexDirection: 'row',\n },\n state: {\n flex: '1 1 60%',\n },\n zip: {\n marginLeft: theme.spacing(1),\n flex: '2 1 40%',\n },\n disabledSelectText: {\n color: 'rgba(219, 219, 219, 1)',\n },\n});\n\nexport default withStyles(styles)(reduxForm({ form: 'orgInfo' })(UnstyledOrganizationCard));\n","import { connect } from 'react-redux';\n\nimport { actionCreators, selectors as orgSelectors } from 'dux/org';\n\nimport OrganizationCard from './OrganizationCard';\n\nconst mapStateToProps = (state) => ({\n org: orgSelectors.getOrgState(state),\n});\n\nconst mapDispatchToProps = {\n updateOrg: actionCreators.updateOrg,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(OrganizationCard);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core';\n\nimport { OWNER, OR_ADMIN, OR_SUPERUSER } from 'constants/roles';\nimport RBACWrapper from 'components/RBACWrapper/RBACWrapperContainer';\nimport ApiTokenCardContainer from './ApiTokenCard/ApiTokenCardContainer';\nimport ProfileCardContainer from './ProfileCard/ProfileCardContainer';\nimport OrganizationCardContainer from './OrganizationCard/OrganizationCardContainer';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n};\n\nexport function UnstyledPersonalInfoTab({ classes }) {\n return (\n <div className={classes.root}>\n <ProfileCardContainer className={classes.profileCard} />\n <RBACWrapper roles={[OWNER, OR_ADMIN, OR_SUPERUSER]}>\n <ApiTokenCardContainer className={classes.apiCard} />\n </RBACWrapper>\n <OrganizationCardContainer className={classes.orgCard} />\n </div>\n );\n}\n\nUnstyledPersonalInfoTab.propTypes = propTypes;\n\nconst styles = (theme) => ({\n root: {\n display: 'grid',\n gridTemplateColumns: '1fr 1fr',\n gridGap: `${theme.spacing(1)}px ${theme.spacing(2)}px`,\n gridAutoFlow: 'dense',\n gridTemplateAreas: `\n 'profile org'\n 'api org'\n '. org'\n `,\n },\n profileCard: {\n gridArea: 'profile',\n },\n orgCard: {\n gridArea: 'org',\n },\n apiCard: {\n gridArea: 'api',\n },\n [theme.breakpoints.down('md')]: {\n root: {\n flexDirection: 'column',\n gridTemplateColumns: '1fr',\n gridGap: `${theme.spacing(1)}px ${theme.spacing(2)}px`,\n gridTemplateAreas: `\n 'profile'\n 'org'\n 'api'\n `,\n },\n },\n});\n\nexport default withStyles(styles)(UnstyledPersonalInfoTab);\n","/**\n * Card for updating billing information that appears on the profile management page\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport Typography from '@material-ui/core/Typography';\nimport Done from '@material-ui/icons/Done';\n\nimport BillingFormWrapper from 'components/BillingFormWrapper/BillingFormWrapper';\n\nconst propTypes = {\n className: PropTypes.string,\n classes: PropTypes.shape({\n submit: PropTypes.string.isRequired,\n blurb: PropTypes.string.isRequired,\n }).isRequired,\n completeBillingSetup: PropTypes.func.isRequired,\n getOrg: PropTypes.func.isRequired,\n needsBilling: PropTypes.bool.isRequired,\n isFastlaneCustomer: PropTypes.bool.isRequired,\n};\n\nconst defaultProps = {\n className: null,\n};\n\nexport function UnstyledBillingCard({\n className,\n classes,\n completeBillingSetup,\n getOrg,\n needsBilling,\n isFastlaneCustomer,\n}) {\n // eslint-disable-next-line consistent-return\n function billingCompleteHandler() {\n if (needsBilling) {\n completeBillingSetup();\n getOrg();\n } else {\n return false;\n }\n }\n\n let blurb =\n 'Your current Credit Card has been stored. To update, please enter your new information below.';\n\n if (isFastlaneCustomer) {\n blurb =\n 'Your account is currently consolidated with your Rackspace account. You can convert to credit card billing by entering a card below.';\n } else if (needsBilling) {\n blurb =\n \"Please confirm your method of payment to get unlimited access to all of ObjectRocket's platform.\";\n }\n\n return (\n <Card className={className}>\n <CardHeader title=\"Payment Method\" />\n <CardContent>\n <Typography className={classes.blurb}>{blurb}</Typography>\n <BillingFormWrapper\n onSuccess={billingCompleteHandler}\n screen=\"profile\"\n className={classes.billingForm}\n allowMultipleSubmissions\n buttonText={<Done />}\n buttonProps={{\n name: 'submit',\n variant: 'fab',\n color: 'primary',\n size: 'small',\n className: classes.submit,\n }}\n />\n </CardContent>\n </Card>\n );\n}\n\nUnstyledBillingCard.propTypes = propTypes;\nUnstyledBillingCard.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n submit: {\n display: 'flex',\n justifyContent: 'flex-end',\n marginTop: theme.spacing(1),\n marginLeft: theme.spacing(1),\n\n [theme.breakpoints.only('sm')]: {\n marginTop: 0,\n marginLeft: theme.spacing(1),\n },\n },\n blurb: {\n fontStyle: 'italic',\n },\n betaBlurb: {\n fontStyle: 'italic',\n marginTop: theme.spacing(2),\n },\n billingForm: {\n [theme.breakpoints.up('md')]: {\n display: 'flex',\n },\n [theme.breakpoints.only('sm')]: {\n display: 'flex',\n },\n },\n});\n\nexport default withStyles(styles)(UnstyledBillingCard);\n","import { connect } from 'react-redux';\n\nimport { actionCreators, selectors as orgSelectors } from 'dux/org';\n\nimport BillingCard from './BillingCard';\n\nconst mapStateToProps = (state) => ({\n needsBilling: orgSelectors.needsBilling(state),\n isFastlaneCustomer: orgSelectors.isFastlaneCustomerSelector(state),\n});\n\nconst mapDispatchToProps = {\n completeBillingSetup: actionCreators.completeBillingSetup,\n getOrg: actionCreators.getOrg,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(BillingCard);\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst propTypes = {\n onChangePage: PropTypes.func.isRequired,\n rowsPerPage: PropTypes.number.isRequired,\n count: PropTypes.number.isRequired,\n page: PropTypes.number.isRequired,\n};\n\nexport function UnstyledTablePaginationActions(props) {\n const { count, page, rowsPerPage, onChangePage } = props;\n\n function handleBackButtonClick(event) {\n onChangePage(event, page - 1);\n }\n\n function handleNextButtonClick(event) {\n onChangePage(event, page + 1);\n }\n\n function handlePageButtonClick(event, newPage) {\n onChangePage(event, newPage);\n }\n\n const selectedStyle = {\n borderRadius: '50%',\n backgroundColor: '#3C9BA0',\n color: 'white',\n outline: 'none',\n };\n\n return (\n <div style={{ margin: 'auto' }}>\n <button\n type=\"button\"\n onClick={handleBackButtonClick}\n disabled={page === 0}\n aria-label=\"Previous Page\"\n >\n Previous\n </button>\n {[...Array(Math.ceil(count / rowsPerPage)).keys()].map((pageButton, index) => (\n <span\n role=\"button\"\n tabIndex={index}\n key={pageButton}\n style={page === pageButton ? selectedStyle : {}}\n onClick={(event) => handlePageButtonClick(event, pageButton)}\n onKeyDown={(event) => handlePageButtonClick(event, pageButton)}\n value={pageButton}\n >\n {pageButton + 1}\n </span>\n ))}\n <button\n type=\"button\"\n onClick={handleNextButtonClick}\n disabled={page >= Math.ceil(count / rowsPerPage) - 1}\n aria-label=\"Next Page\"\n >\n Next\n </button>\n </div>\n );\n}\n\nUnstyledTablePaginationActions.propTypes = propTypes;\n\nexport default UnstyledTablePaginationActions;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport TableCell from '@material-ui/core/TableCell';\nimport TableRow from '@material-ui/core/TableRow';\nimport Done from '@material-ui/icons/Done';\nimport NotificationImportant from '@material-ui/icons/NotificationImportant';\nimport ErrorOutline from '@material-ui/icons/ErrorOutline';\nimport Publish from '@material-ui/icons/Publish';\n\nimport ORTypography from 'components/ORTypography/ORTypography';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n status: PropTypes.string.isRequired,\n total: PropTypes.number.isRequired,\n dates: PropTypes.string.isRequired,\n};\n\nexport function formatDateRange(date) {\n const dateArray = date.split('-');\n const dateYear = dateArray[0].substring(2);\n let dateMonth = Number(dateArray[1]);\n let dateDay = dateArray[2].split('T')[0];\n\n // Correct range for dates that straddle years\n let prevDateMonth;\n\n if (dateMonth === 1) {\n prevDateMonth = 12;\n } else {\n prevDateMonth = dateMonth - 1;\n }\n\n // zero-pad the month and day values\n prevDateMonth = prevDateMonth.toString().padStart(2, '0');\n dateMonth = dateMonth.toString().padStart(2, '0');\n dateDay = dateDay.toString().padStart(2, '0');\n\n return `${prevDateMonth}/${dateDay} - ${dateMonth}/${dateDay}/${dateYear}`;\n}\n\nexport function UnstyledInvoiceItem({ classes, status, total, dates }) {\n let statusClass;\n\n if (status === 'Past due') {\n statusClass = 'pastDue';\n } else if (status === 'Paid') {\n statusClass = 'paid';\n } else {\n statusClass = 'estimate';\n }\n\n return (\n <TableRow>\n <TableCell classes={{ root: classes.tableCellRoot }}>\n <Publish className={classes.fileDownload} fontSize=\"large\" />\n <ORTypography align=\"left\" component=\"p\" className={classes.invoiceInfo}>\n {formatDateRange(dates)}\n <br />\n <span className={classes[statusClass]}>\n Total: $\n {(total / 100).toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',')}\n <span className={classes.statusMsg}>({status})</span>\n </span>\n </ORTypography>\n </TableCell>\n <TableCell>\n {status === 'Paid' && <Done classes={{ root: classes.checkmarkRoot }} fontSize=\"large\" />}\n {status === 'Past due' && (\n <NotificationImportant classes={{ root: classes.notificationRoot }} fontSize=\"large\" />\n )}\n {status === 'Estimate' && (\n <ErrorOutline classes={{ root: classes.estimateRoot }} fontSize=\"large\" />\n )}\n </TableCell>\n </TableRow>\n );\n}\n\nUnstyledInvoiceItem.propTypes = propTypes;\n\nconst styles = (theme) => ({\n fileDownload: {\n color: theme.customColors.mediumGrey,\n transform: 'rotate(180deg)',\n },\n invoiceInfo: {\n marginLeft: theme.spacing(2),\n display: 'inline-block',\n },\n paid: {\n color: theme.palette.secondary.main,\n },\n pastDue: {\n color: theme.customColors.red,\n },\n estimate: {\n color: theme.customColors.burntYellow,\n },\n checkmarkRoot: {\n color: theme.palette.secondary.main,\n float: 'right',\n },\n notificationRoot: {\n color: theme.customColors.red,\n float: 'right',\n },\n estimateRoot: {\n color: theme.customColors.burntYellow,\n float: 'right',\n },\n statusMsg: {\n marginLeft: theme.spacing(0.5),\n },\n tableCellRoot: {\n [theme.breakpoints.down('sm')]: {\n paddingRight: 0,\n paddingLeft: 0,\n },\n },\n});\n\nexport default withStyles(styles)(UnstyledInvoiceItem);\n","/**\n * Card for displaying upcoming, paid, and past-due invoices.\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { uiState } from 'react-redux-ui-state';\nimport { withStyles } from '@material-ui/styles';\nimport Card from '@material-ui/core/Card';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport CardContent from '@material-ui/core/CardContent';\nimport Table from '@material-ui/core/Table';\nimport TableBody from '@material-ui/core/TableBody';\nimport TableFooter from '@material-ui/core/TableFooter';\nimport TablePagination from '@material-ui/core/TablePagination';\n\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport TablePaginationActions from 'components/ORTable/TablePaginationActions';\nimport InvoiceItem from './InvoiceItem/InvoiceItem';\n\nconst propTypes = {\n className: PropTypes.string,\n classes: PropTypes.shape({}).isRequired,\n org: PropTypes.shape({\n upcomingInvoices: PropTypes.arrayOf(PropTypes.shape({})),\n pastInvoices: PropTypes.arrayOf(PropTypes.shape({})),\n }).isRequired,\n page: PropTypes.number.isRequired,\n isFastlaneCustomer: PropTypes.bool.isRequired,\n setUiState: PropTypes.func.isRequired,\n};\n\nconst defaultProps = {\n className: null,\n};\n\nexport function UnstyledInvoiceCard({\n className,\n classes,\n org,\n page,\n isFastlaneCustomer,\n setUiState,\n}) {\n // Invoicing doesn't currently work for Fastlane customers\n if (isFastlaneCustomer) {\n return null;\n }\n\n const rowsPerPage = 6;\n\n function handleChangePage(event, newPage) {\n setUiState({\n page: newPage,\n });\n }\n\n const invoices = [...org.upcomingInvoices, ...org.pastInvoices];\n\n const invoiceRows = invoices\n .slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)\n .map((invoice) => (\n <InvoiceItem\n key={invoice.date}\n status={invoice.paidStatus}\n dates={invoice.date}\n total={invoice.amountDueCents}\n />\n ));\n\n const invoiceTable = (\n <Table>\n <TableBody>{invoiceRows}</TableBody>\n <TableFooter>\n <TablePagination\n classes={{\n root: classes.paginationRoot,\n spacer: classes.paginationSpacer,\n caption: classes.paginationCaption,\n input: classes.paginationInput,\n toolbar: classes.paginationToolbar,\n }}\n colSpan={3}\n count={invoices.length}\n rowsPerPage={rowsPerPage}\n page={page}\n onChangePage={handleChangePage}\n ActionsComponent={TablePaginationActions}\n />\n </TableFooter>\n </Table>\n );\n\n const noInvoiceMsg = (\n <ORTypography component=\"p\" align=\"center\" className={classes.noInvoiceMsg}>\n You have no previous invoices. Enjoy your day!\n </ORTypography>\n );\n\n return (\n <Card className={className}>\n <CardHeader title=\"Invoices\" />\n <CardContent>{invoices.length !== 0 ? invoiceTable : noInvoiceMsg}</CardContent>\n </Card>\n );\n}\n\nUnstyledInvoiceCard.propTypes = propTypes;\nUnstyledInvoiceCard.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n noInvoiceMsg: {\n padding: theme.spacing(2),\n fontSize: '12px',\n fontStyle: 'italic',\n color: '#4A4A4A',\n },\n paginationRoot: {\n fontSize: '1rem',\n paddingRight: 'unset',\n border: 'none',\n '& span': {\n color: theme.customColors.lightGrey,\n marginRight: theme.spacing(0.25),\n marginLeft: theme.spacing(0.25),\n display: 'inline-block',\n width: '20px',\n textAlign: 'center',\n },\n '& span:hover': {\n cursor: 'pointer',\n },\n '& button': {\n border: 'none',\n fontSize: '1rem',\n color: theme.palette.secondary.main,\n display: 'inline',\n cursor: 'pointer',\n },\n },\n paginationSpacer: {\n flex: 'unset',\n },\n // uses !important to prevent media query overwrites\n paginationCaption: {\n display: 'none !important',\n },\n paginationInput: {\n display: 'none !important',\n },\n paginationToolbar: {\n height: '30px',\n minHeight: '30px',\n paddingTop: '8px',\n paddingLeft: '0px',\n },\n pageButtonStyles: {\n fontSize: '1rem',\n },\n});\n\nexport const uiConfig = {\n name: 'invoiceCard',\n state: () => ({\n page: 0,\n }),\n};\n\nexport default uiState(uiConfig)(withStyles(styles)(UnstyledInvoiceCard));\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\n\nimport { actionCreators, selectors } from 'dux/org';\nimport InvoiceCard from './InvoiceCard';\n\nconst propTypes = {\n getUpcomingInvoice: PropTypes.func.isRequired,\n getPastInvoices: PropTypes.func.isRequired,\n org: PropTypes.shape({\n id: PropTypes.string,\n billingType: PropTypes.number,\n billingSetupComplete: PropTypes.bool,\n }).isRequired,\n};\n\nconst mapStateToProps = (state) => ({\n org: selectors.getOrgState(state),\n isFastlaneCustomer: selectors.isFastlaneCustomerSelector(state),\n});\n\nconst mapDispatchToProps = {\n getUpcomingInvoice: actionCreators.getUpcomingInvoice,\n getPastInvoices: actionCreators.getPastInvoices,\n};\n\nclass UnstyledInvoiceCardContainer extends Component {\n componentDidMount() {\n const { getUpcomingInvoice, getPastInvoices, org } = this.props;\n if (org.billingSetupComplete && org.billingType === 1) {\n getUpcomingInvoice(org.id);\n getPastInvoices(org.id);\n }\n }\n\n render() {\n const { props } = this;\n return <InvoiceCard {...props} />;\n }\n}\n\nUnstyledInvoiceCardContainer.propTypes = propTypes;\n\nexport default connect(mapStateToProps, mapDispatchToProps)(UnstyledInvoiceCardContainer);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport moment from 'moment';\nimport { withStyles } from '@material-ui/styles';\nimport TableCell from '@material-ui/core/TableCell';\nimport TableRow from '@material-ui/core/TableRow';\nimport Cake from '@material-ui/icons/Cake';\n\nimport ORTypography from 'components/ORTypography/ORTypography';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n status: PropTypes.string.isRequired,\n discount: PropTypes.number.isRequired,\n dtCreated: PropTypes.string.isRequired,\n trialCreditCents: PropTypes.number,\n billingSetupComplete: PropTypes.bool,\n};\n\nconst defaultProps = {\n trialCreditCents: 0,\n billingSetupComplete: false,\n};\n\nexport function UnstyledPromotionItem({\n classes,\n status,\n discount,\n dtCreated,\n trialCreditCents,\n billingSetupComplete,\n}) {\n const expirationDate = moment(dtCreated).add(1, 'years').format('MM/DD/YY');\n const currentDate = moment().format('MM/DD/YY');\n const expired = moment(currentDate).isAfter(expirationDate);\n const trialCreditDollars = trialCreditCents > 0 ? trialCreditCents / 100 : 0;\n\n return billingSetupComplete || discount ? (\n <TableRow>\n <TableCell classes={{ root: classes.tableCellRoot }}>\n <Cake className={classes[expired ? 'promotionExpired' : 'promotion']} fontSize=\"large\" />\n </TableCell>\n <TableCell classes={{ root: classes.infoCellRoot }}>\n <ORTypography\n align=\"left\"\n component=\"p\"\n className={classes[expired ? 'promotionExpired' : 'promotion']}\n >\n {status}\n </ORTypography>\n <ORTypography align=\"left\" component=\"p\" className={classes.discountInfo}>\n {discount ? (\n <React.Fragment>\n <span className={classes.discount}>\n Discount \n {discount}%\n </span>\n <br />\n <span className={classes.expiration}>\n {expired ? 'Expired: ' : 'Expires: '}\n {expirationDate}\n </span>\n </React.Fragment>\n ) : (\n <span className={classes.discount}>\n Balance: ${trialCreditDollars}\n out of $200\n </span>\n )}\n </ORTypography>\n </TableCell>\n <TableCell classes={{ root: classes.tableCellRoot }} />\n </TableRow>\n ) : (\n <TableRow>\n <TableCell classes={{ root: classes.tableCellRoot }} />\n <TableCell classes={{ root: classes.noPaymentCellRoot }}>\n <ORTypography align=\"center\" component=\"p\" className={classes.noPaymentMsg}>\n Activate your $200 in Free Credits by entering your Credit Card.\n </ORTypography>\n </TableCell>\n <TableCell classes={{ root: classes.tableCellRoot }} />\n </TableRow>\n );\n}\n\nUnstyledPromotionItem.propTypes = propTypes;\nUnstyledPromotionItem.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n noPaymentContainer: {\n padding: theme.spacing(2),\n },\n noPaymentMsg: {\n fontSize: '12px',\n fontStyle: 'italic',\n color: '#4A4A4A',\n },\n promotion: {\n color: theme.customColors.black,\n },\n promotionExpired: {\n color: theme.customColors.mediumGrey,\n },\n discountInfo: {\n lineHeight: '1.1rem',\n },\n discount: {\n color: theme.palette.secondary.main,\n fontSize: '14px',\n },\n expiration: {\n color: theme.customColors.mediumGrey,\n fontSize: '12px',\n },\n infoCellRoot: {\n padding: theme.spacing(0.5),\n },\n noPaymentCellRoot: {\n padding: theme.spacing(1.5),\n },\n tableCellRoot: {\n width: '50px',\n padding: theme.spacing(1),\n [theme.breakpoints.down('sm')]: {\n paddingRight: 0,\n paddingLeft: 0,\n },\n },\n});\n\nexport default withStyles(styles)(UnstyledPromotionItem);\n","/**\n * Card for displaying upcoming, paid, and past-due invoices.\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\n\nimport Card from '@material-ui/core/Card';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport CardContent from '@material-ui/core/CardContent';\nimport Table from '@material-ui/core/Table';\n\nimport PromotionItem from './PromotionItem/PromotionItem';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n className: PropTypes.string.isRequired,\n org: PropTypes.shape({\n dtCreated: PropTypes.string.isRequired,\n trialCreditCents: PropTypes.number.isRequired,\n billingSetupComplete: PropTypes.bool.isRequired,\n supportLevelName: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nexport function UnstyledPromotionCard({ classes, className, org }) {\n const { dtCreated, trialCreditCents, billingSetupComplete, supportLevelName } = org;\n\n return (\n <Card className={className}>\n <CardHeader title=\"Promotional Credits\" />\n <CardContent>\n <Table className={classes.table}>\n <PromotionItem\n key={dtCreated}\n status=\"Free Trial\"\n dtCreated={dtCreated}\n trialCreditCents={trialCreditCents}\n billingSetupComplete={billingSetupComplete}\n />\n {supportLevelName === 'Promotional_20_Percent' ? (\n <PromotionItem\n key={dtCreated}\n status=\"Promotional Pricing\"\n dtCreated={dtCreated}\n discount={20}\n />\n ) : null}\n </Table>\n </CardContent>\n </Card>\n );\n}\n\nUnstyledPromotionCard.propTypes = propTypes;\n\nconst styles = () => ({\n table: {\n '& tr:last-child td': {\n borderBottom: 'none',\n },\n },\n});\n\nexport default withStyles(styles)(UnstyledPromotionCard);\n","import { connect } from 'react-redux';\n\nimport { selectors } from 'dux/org';\n\nimport PromotionCard from './PromotionCard';\n\nconst mapStateToProps = (state) => ({\n org: selectors.getOrgState(state),\n});\n\nexport default connect(mapStateToProps, null)(PromotionCard);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core';\n\nimport { OWNER, OR_ADMIN, OR_SUPERUSER, BILLING, OR_READONLY, OR_SUPERREAD } from 'constants/roles';\nimport RBACWrapper from 'components/RBACWrapper/RBACWrapperContainer';\nimport BillingCardContainer from './BillingCard/BillingCardContainer';\nimport InvoiceCardContainer from './InvoiceCard/InvoiceCardContainer';\nimport PromotionCardContainer from './PromotionCard/PromotionCardContainer';\n\nconst propTypes = {\n classes: PropTypes.shape({\n root: PropTypes.string.isRequired,\n leftCol: PropTypes.string.isRequired,\n rightCol: PropTypes.string.isRequired,\n card: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nexport function UnstyledBillingTab({ classes }) {\n return (\n <div className={classes.root}>\n <div className={classes.leftCol}>\n <RBACWrapper roles={[OWNER, BILLING, OR_SUPERUSER, OR_ADMIN]}>\n <BillingCardContainer className={classes.card} />\n </RBACWrapper>\n <RBACWrapper roles={[OWNER, BILLING, OR_SUPERUSER, OR_ADMIN, OR_READONLY, OR_SUPERREAD]}>\n <PromotionCardContainer className={classes.card} />\n </RBACWrapper>\n </div>\n <div className={classes.rightCol}>\n <RBACWrapper roles={[OWNER, BILLING, OR_SUPERUSER, OR_ADMIN, OR_READONLY, OR_SUPERREAD]}>\n <InvoiceCardContainer className={classes.card} />\n </RBACWrapper>\n </div>\n </div>\n );\n}\n\nUnstyledBillingTab.propTypes = propTypes;\n\nconst styles = (theme) => ({\n root: {\n display: 'flex',\n flexDirection: 'row',\n },\n leftCol: {\n flex: 1,\n },\n rightCol: {\n flex: 1,\n },\n card: {\n '&:not(:first-child)': {\n marginTop: theme.spacing(1),\n },\n },\n\n [theme.breakpoints.down('md')]: {\n root: {\n flexDirection: 'column',\n },\n rightCol: {\n marginTop: theme.spacing(1),\n },\n },\n\n [theme.breakpoints.up('lg')]: {\n leftCol: {\n marginRight: theme.spacing(1),\n },\n rightCol: {\n marginLeft: theme.spacing(1),\n },\n },\n});\n\nexport default withStyles(styles)(UnstyledBillingTab);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport { uiState } from 'react-redux-ui-state';\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport Typography from '@material-ui/core/Typography';\nimport Switch from '@material-ui/core/Switch';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport Button from '@material-ui/core/Button';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n setUiState: PropTypes.func.isRequired,\n open: PropTypes.bool.isRequired,\n checked: PropTypes.bool.isRequired,\n MFAEnabled: PropTypes.bool.isRequired,\n userId: PropTypes.string.isRequired,\n startMFASignupFlow: PropTypes.func.isRequired,\n enrollmentId: PropTypes.string.isRequired,\n removeMFAEnrollment: PropTypes.func.isRequired,\n};\n\nexport function UnstyledMFACard({\n classes,\n setUiState,\n open,\n MFAEnabled,\n checked,\n userId,\n startMFASignupFlow,\n enrollmentId,\n removeMFAEnrollment,\n}) {\n const handleChange = (event) => {\n setUiState({\n checked: !event.target.checked,\n open: true,\n });\n };\n\n const handleCancel = () => {\n setUiState({\n open: !open,\n checked: !checked,\n });\n };\n\n const handleConfirm = (callback) => {\n setUiState({ open: !open });\n return callback;\n };\n\n const confirmButton = (\n <Button\n color=\"primary\"\n className={classes.dialogButton}\n onClick={() =>\n handleConfirm(\n MFAEnabled\n ? removeMFAEnrollment(userId, enrollmentId)\n : startMFASignupFlow(userId, false),\n )\n }\n >\n Confirm\n </Button>\n );\n const switchText = MFAEnabled ? 'enabled' : 'disabled';\n const dialogText = MFAEnabled\n ? 'You are currently enrolled in Multi-factor authentication (MFA). Clicking Confirm will remove MFA from your account.'\n : 'You are currently not enrolled in Multi-factor authentication (MFA). In order to securely enroll you in MFA, you will be logged out of the application and will be guided through the MFA process upon logging back in. Click confirm if you wish to add MFA to your account.';\n\n return (\n <React.Fragment>\n <Card>\n <CardHeader title=\"Multi-Factor Authentication\" />\n <CardContent className={classes.content}>\n <div className={classes.securityTextContainer}>\n <Typography className={classes.securityText}>\n Add Multi-Factor Authentication To Your Account\n </Typography>\n <Typography className={classes.securitySubtext} variant=\"body2\">\n Help protect your account, even if someone gets ahold of your password. We'll ask\n for a Passcode provided by an Authentication App of your choice during login.\n </Typography>\n </div>\n <div className={classes.switchContainer}>\n <Switch checked={MFAEnabled} value=\"MFASwitch\" onChange={handleChange} />\n <Typography className={classes[switchText]}>{switchText}</Typography>\n </div>\n </CardContent>\n </Card>\n <Dialog open={open}>\n <DialogContent classes={{ root: classes.dialogText }}>{dialogText}</DialogContent>\n <DialogActions>\n <Button color=\"secondary\" onClick={handleCancel} className={classes.dialogButton}>\n Cancel\n </Button>\n {confirmButton}\n </DialogActions>\n </Dialog>\n </React.Fragment>\n );\n}\n\nUnstyledMFACard.propTypes = propTypes;\n\nconst styles = (theme) => ({\n content: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n },\n securityTextContainer: {\n flexDirection: 'column',\n },\n securityText: {\n fontStyle: 'bold',\n color: theme.customColors.mediumGrey,\n },\n securitySubtext: {\n color: theme.customColors.mediumGrey,\n },\n enabled: {\n textTransform: 'uppercase',\n color: theme.customColors.teal,\n fontSize: '12px',\n fontFamily: '\"Roboto Regular\", sans-serif',\n },\n disabled: {\n textTransform: 'uppercase',\n color: `${theme.customColors.red} !important`,\n fontSize: '12px',\n fontFamily: '\"Roboto Regular\", sans-serif',\n },\n dialogText: {\n padding: '8px 16px',\n },\n dialogButton: {\n marginRight: theme.spacing(1),\n },\n});\n\nexport const uiConfig = {\n name: 'MFACard',\n state: () => ({\n open: false,\n checked: false,\n }),\n};\n\nexport default uiState(uiConfig)(withStyles(styles)(UnstyledMFACard));\n","import { connect } from 'react-redux';\n\nimport { selectors, actionCreators } from 'dux/user';\nimport MFACard from './MFACard';\n\nconst mapStateToProps = (state) => ({\n enrollmentId: selectors.getIdentityState(state).enrollmentId,\n});\n\nconst mapDispatchToProps = {\n startMFASignupFlow: actionCreators.startMFASignupFlow,\n getMFAStatus: actionCreators.getMFAStatus,\n removeMFAEnrollment: actionCreators.removeMFAEnrollment,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(MFACard);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core';\n\nimport MFACard from './MFACard/MFACardContainer';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n userId: PropTypes.string.isRequired,\n MFAEnabled: PropTypes.bool.isRequired,\n};\n\nexport function UnstyledSecurityTab({ classes, userId, MFAEnabled }) {\n return (\n <div className={classes.root}>\n <MFACard MFAEnabled={MFAEnabled} userId={userId} />\n </div>\n );\n}\n\nUnstyledSecurityTab.propTypes = propTypes;\n\nconst styles = () => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n },\n});\n\nexport default withStyles(styles)(UnstyledSecurityTab);\n","/**\n * Page for profile management\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core';\nimport Divider from '@material-ui/core/Divider';\nimport Tab from '@material-ui/core/Tab';\nimport Tabs from '@material-ui/core/Tabs';\nimport { uiState } from 'react-redux-ui-state';\n\nimport ORContentHeader from 'components/ORContentHeader/ORContentHeader';\nimport ORContentArea from 'components/ORContentArea/ORContentArea';\nimport PersonalInfoTab from './PersonalInfoTab/PersonalInfoTab';\nimport BillingTab from './BillingTab/BillingTab';\nimport SecurityTab from './SecurityTab/SecurityTab';\n// import WelcomeCard from './WelcomeCard/WelcomeCard';\n\nconst propTypes = {\n classes: PropTypes.shape({\n root: PropTypes.string.isRequired,\n leftCol: PropTypes.string.isRequired,\n rightCol: PropTypes.string.isRequired,\n card: PropTypes.string.isRequired,\n }).isRequired,\n setUiState: PropTypes.func.isRequired,\n profileTabSelectionValue: PropTypes.string.isRequired,\n userId: PropTypes.string.isRequired,\n MFAEnabled: PropTypes.bool.isRequired,\n flags: PropTypes.shape({}), // eslint-disable-line react/require-default-props\n};\n\nexport function UnstyledProfilePage({\n classes,\n setUiState,\n profileTabSelectionValue,\n userId,\n MFAEnabled,\n flags,\n}) {\n const changeTabSelection = (event, value) => {\n setUiState({\n profileTabSelectionValue: value,\n });\n };\n\n let currentDisplayedTab = null;\n\n if (profileTabSelectionValue === 'personal') {\n currentDisplayedTab = <PersonalInfoTab />;\n } else if (profileTabSelectionValue === 'security') {\n currentDisplayedTab = <SecurityTab MFAEnabled={MFAEnabled} userId={userId} />;\n } else if (profileTabSelectionValue === 'billing') {\n currentDisplayedTab = <BillingTab />;\n }\n\n return (\n <React.Fragment>\n <ORContentHeader hasDivider>Profile Management</ORContentHeader>\n <ORContentArea>\n <Tabs\n value={profileTabSelectionValue}\n onChange={changeTabSelection}\n variant=\"scrollable\"\n indicatorColor=\"primary\"\n scrollButtons=\"auto\"\n className={classes.profileTabsBar}\n classes={{ indicator: classes.tabsIndicator, flexContainer: classes.tabsFlexContainer }}\n >\n <Tab value=\"personal\" label=\"Personal Info\" />\n {\n flags && flags['security-tab'] && <Tab value=\"security\" label=\"Security\" /> // eslint-disable-line react/prop-types\n }\n <Tab value=\"billing\" label=\"Billing\" />\n </Tabs>\n <Divider className={classes.tabDivider} />\n {currentDisplayedTab}\n {/* Leaving this here for now because Ange says she wants it out now\n but back later after some changes\n <WelcomeCard className={classes.card} />\n */}\n </ORContentArea>\n </React.Fragment>\n );\n}\n\nUnstyledProfilePage.propTypes = propTypes;\n\nconst styles = (theme) => ({\n root: {\n display: 'flex',\n flexDirection: 'row',\n },\n leftCol: {\n flex: 1,\n },\n rightCol: {\n flex: 1,\n },\n card: {\n marginTop: theme.spacing(2),\n },\n [theme.breakpoints.down('md')]: {\n root: {\n flexDirection: 'column',\n },\n leftCol: {\n flex: 1,\n },\n },\n [theme.breakpoints.only('sm')]: {\n leftCol: {\n marginLeft: theme.spacing(1),\n marginRight: theme.spacing(1),\n },\n rightCol: {\n marginLeft: theme.spacing(1),\n marginRight: theme.spacing(1),\n },\n },\n [theme.breakpoints.only('md')]: {\n leftCol: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2),\n },\n rightCol: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2),\n },\n },\n [theme.breakpoints.up('md')]: {\n leftCol: {\n marginLeft: theme.spacing(2),\n },\n rightCol: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2),\n },\n },\n profileTabsBar: {\n width: '100%',\n color: theme.customColors.black,\n backgroundColor: theme.customColors.coolBlue,\n },\n tabDivider: {\n position: 'relative',\n top: '-2px',\n height: '2px',\n marginBottom: theme.spacing(2),\n },\n tabsIndicator: {\n zIndex: 1,\n },\n tabsFlexContainer: {\n justifyContent: 'center',\n },\n});\n\nexport const uiConfig = {\n name: 'profileTabSelectionValue',\n state: () => ({\n profileTabSelectionValue: 'personal',\n }),\n};\n\nexport default uiState(uiConfig)(withStyles(styles)(UnstyledProfilePage));\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\n\nimport { selectors, actionCreators } from 'dux/user';\nimport ProfilePage from './ProfilePage';\n\nconst propTypes = {\n getMFAStatus: PropTypes.func.isRequired,\n userId: PropTypes.string.isRequired,\n MFAEnabled: PropTypes.bool.isRequired,\n};\n\nclass ProfilePageContainer extends React.Component {\n componentDidMount() {\n const { getMFAStatus, userId } = this.props;\n getMFAStatus(userId);\n }\n\n render() {\n const { ...props } = this.props;\n return <ProfilePage {...props} />;\n }\n}\n\nconst mapStateToProps = (state) => ({\n isAdmin: selectors.isAdmin(state),\n isCustomerAdmin: selectors.isCustomerAdmin(state),\n isBillingUser: selectors.isBillingUser(state),\n userId: selectors.getIdentityState(state).id,\n MFAEnabled: selectors.getIdentityState(state).MFAEnabled,\n flags: selectors.getFeatureFlagsState(state, false).flags,\n});\n\nconst mapDispatchToProps = {\n getMFAStatus: actionCreators.getMFAStatus,\n};\n\nProfilePageContainer.propTypes = propTypes;\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ProfilePageContainer);\n","import { connect } from 'react-redux';\n\nimport { selectors as userSelectors } from 'dux/user';\nimport InstancesPageRedirect from './InstancesPageRedirect';\n\nconst mapStateToProps = (state) => ({\n userRoles: userSelectors.getIdentityState(state).roles,\n});\n\nexport default connect(mapStateToProps, null)(InstancesPageRedirect);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport moment from 'moment';\nimport { withStyles } from '@material-ui/core';\nimport Typography from '@material-ui/core/Typography';\nimport Button from '@material-ui/core/Button';\nimport Launch from '@material-ui/icons/Launch';\nimport Icon from '@material-ui/core/Icon';\n\nimport ORSpaceUsage from 'components/ORSpaceUsage/ORSpaceUsageContainer';\nimport { bytesToGB } from 'services/conversions';\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport FeaturesList from 'components/MissionCtrl/InstancesPage/FeaturesList/FeaturesList';\n\nconst propTypes = {\n id: PropTypes.string.isRequired,\n service: PropTypes.string.isRequired,\n // serviceSubtype: PropTypes.string.isRequired,\n shortId: PropTypes.string.isRequired,\n region: PropTypes.string.isRequired,\n dtCreated: PropTypes.string.isRequired,\n dtModified: PropTypes.string.isRequired,\n statusDisplay: PropTypes.string.isRequired,\n version: PropTypes.string.isRequired,\n features: PropTypes.shape({\n storageEngine: PropTypes.string,\n }).isRequired,\n provider: PropTypes.string.isRequired,\n hosts: PropTypes.arrayOf(PropTypes.object).isRequired,\n classes: PropTypes.shape({}).isRequired,\n spaceUsage: PropTypes.shape({\n nodes: PropTypes.arrayOf(PropTypes.shape({ spaceTotal: PropTypes.number })),\n }),\n userRoles: PropTypes.arrayOf(PropTypes.string).isRequired,\n getRedisMemoryCapacity: PropTypes.func.isRequired,\n};\n\nconst defaultProps = {\n spaceUsage: {},\n};\n\nexport function UnstyledDetailOverview({\n service,\n // serviceSubtype,\n shortId,\n region,\n statusDisplay,\n version,\n id,\n dtCreated,\n dtModified,\n features,\n provider,\n hosts,\n classes,\n spaceUsage,\n userRoles,\n getRedisMemoryCapacity,\n}) {\n let statusTextColor;\n if (statusDisplay === 'Ready') {\n statusTextColor = classes.textReady;\n } else if (statusDisplay === 'Failed') {\n statusTextColor = classes.textFailed;\n } else {\n statusTextColor = classes.textBuilding;\n }\n return (\n <React.Fragment>\n <div className={classes.details}>\n <div className={classes.charContainer}>\n <ORSpaceUsage\n userRoles={userRoles}\n instanceId={id}\n instanceIsReady={statusDisplay.toLowerCase() === 'ready'}\n />\n </div>\n <div className={classes.detailsListContainer}>\n <div className={classes.detailsListInfoContainer}>\n <Icon className={classes.detailsListIcon}>language_24</Icon>\n <div className={classes.detailsListLocationContainer}>\n <ORTypography className={classes.detailsListLocation}>{region}</ORTypography>\n <ORTypography className={classes.detailsListSize}>\n {spaceUsage &&\n service !== 'Redis' &&\n spaceUsage.nodes &&\n spaceUsage.nodes.length > 0 &&\n bytesToGB(spaceUsage.nodes[0].spaceTotal).toFixed(0)}\n {service === 'Redis' && statusDisplay === 'Ready' && getRedisMemoryCapacity(id)}\n GB\n {service !== 'Redis' ? '\\u00a0' : '\\u00a0RAM\\u00a0'}\n <span className={classes.detailsListSizeParenthesis}>(per data node)</span>\n </ORTypography>\n </div>\n </div>\n <ul className={classes.detailsList}>\n <li>\n <Typography variant=\"subtitle1\">\n Engine: \n {service}\n </Typography>\n </li>\n <li>\n <Typography variant=\"subtitle1\" className={statusTextColor}>\n <span className={classes.detailsListReadyState}>State: </span>\n {statusDisplay === 'Ready' ? 'Active' : statusDisplay}\n </Typography>\n </li>\n <li>\n <Typography variant=\"subtitle1\">\n Version: \n {version}\n </Typography>\n </li>\n <li>\n <Typography variant=\"subtitle1\">\n ID: \n {id}\n </Typography>\n </li>\n {service === 'MongoDB' ? (\n <li>\n <Typography variant=\"subtitle1\">\n Short ID: \n {shortId}\n </Typography>\n </li>\n ) : null}\n <li>\n <Typography variant=\"subtitle1\">\n Created: \n {moment(dtCreated).format('dddd, MMMM Do YYYY, h:mm:ss a')}\n </Typography>\n </li>\n <li>\n <Typography variant=\"subtitle1\">\n Modified: \n {moment(dtModified).format('dddd, MMMM Do YYYY, h:mm:ss a')}\n </Typography>\n </li>\n {service === 'MongoDB' && (\n <li>\n <Typography variant=\"subtitle1\">\n Storage Engine: {features.storageEngine}\n </Typography>\n </li>\n )}\n <li>\n <Typography variant=\"subtitle1\">\n Cloud Provider: \n {provider}\n </Typography>\n </li>\n <FeaturesList features={features} />\n </ul>\n </div>\n <div className={classes.featureButtonContainer}>\n {hosts.map((host, index) =>\n (service === 'Elasticsearch' &&\n host.connectionUri &&\n host.role !== 'elasticsearch' &&\n statusDisplay === 'Ready') ||\n host.role === 'cockroachdb_admin' ? (\n <a\n key={index.toString()}\n className={classes.detailLink}\n href={host.connectionUri}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <Button\n variant=\"contained\"\n hover-override={host.role}\n className={classes[`${host.role}Button`]}\n >\n <div className={classes.spacer} />\n {host.role.split('_').join(' ')}\n <Launch className={classes.featureButtonIcon} />\n </Button>\n </a>\n ) : null,\n )}\n </div>\n </div>\n </React.Fragment>\n );\n}\n\nUnstyledDetailOverview.propTypes = propTypes;\nUnstyledDetailOverview.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n details: {\n backgroundColor: theme.customColors.white,\n border: `1px solid ${theme.customColors.lightGrey}`,\n justifyContent: 'space-between',\n display: 'grid',\n gridTemplateColumns: '1fr 1fr',\n gridGap: '0px 16px',\n gridTemplateAreas: `\n 'chart list'\n 'chart buttons'\n `,\n padding: theme.spacing(1),\n\n [theme.breakpoints.down('md')]: {\n gridTemplateColumns: '2fr 1fr',\n },\n\n [theme.breakpoints.down('sm')]: {\n gridTemplateAreas: `\n 'list'\n 'buttons'\n 'chart'\n `,\n gridTemplateColumns: '1fr',\n },\n\n [theme.breakpoints.down('xs')]: {\n flexDirection: 'column-reverse',\n alignItems: 'center',\n '& ul': {\n margin: 0,\n paddingLeft: theme.spacing(2.5),\n },\n },\n },\n charContainer: {\n gridArea: 'chart',\n },\n detailsListContainer: {\n gridArea: 'list',\n justifySelf: 'center',\n [theme.breakpoints.down('md')]: {\n justifySelf: 'flex-start',\n },\n },\n detailsListInfoContainer: {\n display: 'flex',\n flexFlow: 'row wrap',\n },\n detailsListLocationContainer: {\n display: 'flex',\n flexFlow: 'column nowrap',\n },\n detailsList: {\n gridArea: 'list',\n justifySelf: 'center',\n '& li': {\n paddingLeft: theme.spacing(2),\n '& h6': {\n fontFamily: '\"Libre Franklin Regular\", sans-serif',\n fontSize: '14px',\n lineHeight: '21px',\n },\n },\n },\n detailsListIcon: {\n gridArea: 'list',\n justifySelf: 'flex-start',\n marginLeft: theme.spacing(2),\n height: theme.spacing(3),\n width: theme.spacing(3),\n color: theme.customColors.mediumGrey,\n },\n detailsListLocation: {\n fontFamily: '\"Libre Franklin Regular\", sans-serif',\n paddingLeft: theme.spacing(2),\n },\n detailsListSize: {\n fontFamily: '\"Libre Franklin Regular\", sans-serif',\n paddingLeft: theme.spacing(2),\n },\n detailsListSizeParenthesis: {\n fontFamily: '\"Libre Franklin Regular\", sans-serif',\n color: theme.customColors.mediumGrey,\n },\n detailsListReadyState: {\n color: theme.customColors.black,\n },\n summary: {\n width: '100%',\n display: 'flex',\n flexFlow: 'row wrap',\n maxHeight: '85px',\n\n [theme.breakpoints.up('md')]: {\n flexDirection: 'row',\n },\n [theme.breakpoints.down('md')]: {\n padding: `${theme.spacing(1)}px 0 ${theme.spacing(1)}px 0`,\n maxHeight: 'unset',\n },\n\n [theme.breakpoints.down('sm')]: {\n paddingLeft: theme.spacing(1),\n flexFlow: 'column nowrap',\n },\n },\n flexContainer: {\n display: 'flex',\n flexFlow: 'row wrap',\n flex: '1 0 50%',\n\n [theme.breakpoints.down('md')]: {\n flexFlow: 'column nowrap',\n },\n },\n detailContainer: {\n display: 'flex',\n flexFlow: 'column wrap',\n alignItems: 'center',\n justifyContent: 'flex-end',\n gridArea: 'buttons',\n\n [theme.breakpoints.down('xs')]: {\n width: '100%',\n marginBottom: theme.spacing(1.25),\n },\n },\n textReady: {\n color: theme.customColors.teal,\n },\n textFailed: {\n color: theme.customColors.magenta,\n },\n textBuilding: {\n color: theme.customColors.burntYellow,\n },\n featureButtonContainer: {\n display: 'grid',\n gridTemplateColumns: '1fr',\n gridGap: '0px 16px',\n gridTemplateAreas: `\n 'kibana'\n 'cerebro'\n `,\n gridArea: 'buttons',\n width: '100%',\n\n [theme.breakpoints.down('sm')]: {\n gridTemplateColumns: '1fr 1fr',\n gridTemplateAreas: `\n 'kibana cerebro'\n `,\n marginBottom: theme.spacing(1.25),\n },\n\n [theme.breakpoints.down('xs')]: {\n gridTemplateColumns: '1fr',\n gridTemplateAreas: `\n 'kibana'\n 'cerebro'\n `,\n },\n },\n featureButtonIcon: {},\n detailLink: {\n display: 'flex',\n flex: '1 0 50%',\n textDecoration: 'none',\n width: '100%',\n },\n kibanaButton: {\n gridArea: 'kibana',\n marginTop: theme.spacing(1),\n color: theme.customColors.black,\n backgroundColor: theme.customColors.peach,\n width: '100%',\n padding: theme.spacing(1),\n justifyContent: 'space-between',\n fontWeight: 400,\n },\n cerebroButton: {\n gridArea: 'cerebro',\n marginTop: theme.spacing(1),\n color: theme.customColors.black,\n backgroundColor: '#7cbbbe',\n width: '100%',\n padding: theme.spacing(1),\n justifyContent: 'space-between',\n fontWeight: 400,\n },\n cockroachdb_adminButton: {\n marginTop: theme.spacing(1),\n color: theme.customColors.black,\n backgroundColor: '#7cbbbe',\n width: '100%',\n padding: theme.spacing(1),\n justifyContent: 'space-between',\n fontWeight: 400,\n },\n spacer: {\n width: '25px',\n },\n});\n\nexport default withStyles(styles)(UnstyledDetailOverview);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core';\nimport Icon from '@material-ui/core/Icon';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n instanceId: PropTypes.string.isRequired,\n instanceService: PropTypes.string.isRequired,\n getInstanceWithPassword: PropTypes.func.isRequired,\n};\n\nexport function UnstyledShowPasswordIcon({\n classes,\n instanceId,\n instanceService,\n getInstanceWithPassword,\n}) {\n const [passwordIsShowing, setPasswordIsShowing] = React.useState(false);\n\n const handleEyePoke = () => {\n getInstanceWithPassword(instanceId, instanceService, !passwordIsShowing).then((data) => {\n if (data.type === 'GET_INSTANCE_WITH_PASSWORD_SUCCESS') {\n setPasswordIsShowing(!passwordIsShowing);\n }\n });\n };\n\n if (instanceService.toLowerCase() !== 'redis') {\n return null;\n }\n\n if (passwordIsShowing) {\n return (\n <Icon className={classes.showPasswordIcon} onClick={handleEyePoke}>\n visibility_off\n </Icon>\n );\n }\n\n return (\n <Icon className={classes.showPasswordIcon} onClick={handleEyePoke}>\n visibility\n </Icon>\n );\n}\n\nUnstyledShowPasswordIcon.propTypes = propTypes;\n\nconst styles = () => ({\n showPasswordIcon: {\n cursor: 'pointer',\n },\n});\n\nexport default withStyles(styles)(UnstyledShowPasswordIcon);\n","import { connect } from 'react-redux';\n\nimport { actionCreators, selectors } from 'dux/instances';\nimport ShowPasswordIcon from './ShowPasswordIcon';\n\nfunction mapStateToProps(state, ownProps) {\n return {\n instanceService: selectors.instanceServiceSelector(state, ownProps),\n };\n}\n\nconst mapDispatchToProps = {\n getInstanceWithPassword: actionCreators.getInstanceWithPassword,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ShowPasswordIcon);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport MorePropTypes from 'airbnb-prop-types';\nimport { withStyles } from '@material-ui/core';\nimport TextField from '@material-ui/core/TextField';\nimport InputAdornment from '@material-ui/core/InputAdornment';\n\nimport CopyToClipboard from 'components/CopyToClipboard/CopyToClipboard';\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport ShowPasswordIcon from 'components/MissionCtrl/InstancesPage/InstanceDetail/ShowPasswordIcon/ShowPasswordIconContainer';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n title: PropTypes.string.isRequired,\n description: MorePropTypes.or([MorePropTypes.explicitNull, PropTypes.string]).isRequired,\n connectionString: PropTypes.string.isRequired,\n instanceId: PropTypes.string.isRequired,\n};\n\nexport function UnstyledConnectItem({ classes, title, description, connectionString, instanceId }) {\n const copyButton = (\n <CopyToClipboard\n copyString={connectionString}\n copyStyles={{\n marginTop: '6px',\n marginBottom: '4px',\n backgroundColor: 'inherit',\n color: 'inherit',\n boxShadow: 'none',\n }}\n checkColor=\"secondary\"\n size=\"small\"\n />\n );\n\n return (\n <div className={classes.hostContainer}>\n <div className={classes.hostRole}>\n {description && (\n <ORTypography data-lookup=\"descriptionTypography\">{description}</ORTypography>\n )}\n </div>\n <div className={classes.connectionStringContainer}>\n <TextField\n fullWidth\n variant=\"outlined\"\n label={title}\n value={connectionString}\n InputLabelProps={{\n shrink: true,\n className: classes.inputLabel,\n }}\n InputProps={{\n endAdornment: (\n <InputAdornment position=\"end\">\n <ShowPasswordIcon instanceId={instanceId} />\n {copyButton}\n </InputAdornment>\n ),\n classes: {\n root: classes.connectionStringText,\n },\n }}\n />\n </div>\n </div>\n );\n}\n\nUnstyledConnectItem.propTypes = propTypes;\n\nconst styles = (theme) => ({\n hostContainer: {\n display: 'flex',\n flexFlow: 'column wrap',\n margin: `${theme.spacing(4)}px ${theme.spacing(1)}px ${theme.spacing(2)}px ${theme.spacing(\n 1,\n )}px`,\n },\n hostRole: {\n display: 'flex',\n margin: `${theme.spacing(1.25)}px 0 -${theme.spacing(1.25)}px 0`,\n padding: '0',\n wordBreak: 'break-all',\n paddingRight: '48px',\n textTransform: 'capitalize',\n },\n connectionStringContainer: {\n display: 'flex',\n flexFlow: 'row wrap',\n },\n connectionStringText: {\n color: theme.customColors.mediumGrey,\n fontFamily: 'Monospace, sans-serif',\n wordBreak: 'break-all',\n },\n inputLabel: {\n color: theme.customColors.black,\n },\n showPasswordIcon: {\n cursor: 'pointer',\n },\n});\n\nexport default withStyles(styles)(UnstyledConnectItem);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport MorePropTypes from 'airbnb-prop-types';\nimport { withStyles } from '@material-ui/core';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n children: MorePropTypes.or([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node,\n MorePropTypes.explicitNull,\n ]).isRequired,\n};\n\nexport function UnstyledConnectWarning({ classes, children }) {\n return (\n <div className={classes.warningContainer}>\n <div data-lookup=\"connectWarningChildren\" className={classes.children}>\n {children}\n </div>\n </div>\n );\n}\n\nUnstyledConnectWarning.propTypes = propTypes;\n\nconst styles = (theme) => ({\n warningContainer: {\n display: 'flex',\n margin: `${theme.spacing(2)}px 0`,\n borderRadius: `${theme.spacing(0.5)}px`,\n backgroundColor: theme.customColors.khaki,\n padding: `${theme.spacing(1)}px`,\n boxShadow: '4px 5px 5px 0px rgba(216,216,216,1);',\n\n [theme.breakpoints.down('md')]: {\n textAlign: 'center',\n },\n },\n warning: {\n color: theme.customColors.magenta,\n },\n children: {\n width: '100%',\n '& p, & h6': {\n margin: `${theme.spacing(0.5)}px`,\n },\n },\n});\n\nexport default withStyles(styles)(UnstyledConnectWarning);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\n\nimport Button from '@material-ui/core/Button';\n\nconst propTypes = {\n filename: PropTypes.string.isRequired,\n CACertId: PropTypes.string.isRequired,\n getInstanceCertificateDownload: PropTypes.func.isRequired,\n service: PropTypes.string.isRequired,\n instanceId: PropTypes.string.isRequired,\n classes: PropTypes.shape({}).isRequired,\n};\n\nexport function UnstyledCADownloadLink({\n filename,\n CACertId,\n service,\n instanceId,\n classes,\n getInstanceCertificateDownload,\n}) {\n const createDownloadFile = () => {\n getInstanceCertificateDownload(service.toLowerCase(), instanceId, CACertId)\n .then((data) => {\n if (data.payload.certificate) {\n const element = document.createElement('a');\n element.download = `${filename}.crt`;\n element.style = 'display: none;';\n const file = new Blob([data.payload.certificate], { type: 'text/plain;charset=utf-8;' }); // eslint-disable-line no-undef\n element.href = window.URL.createObjectURL(file);\n document.body.appendChild(element);\n element.click();\n document.body.removeChild(element);\n }\n })\n .catch((error) => error);\n };\n\n return (\n <Button\n component=\"a\"\n disableFocusRipple\n disableRipple\n onClick={createDownloadFile}\n href=\"#\"\n classes={{ root: classes.button }}\n >\n Download Certification Authority\n </Button>\n );\n}\n\nUnstyledCADownloadLink.propTypes = propTypes;\n\nconst styles = () => ({\n button: {\n fontSize: '.857rem',\n fontFamily: ['\"Roboto\"', 'sans-serif'].join(','),\n fontWeight: 400,\n background: 'none!important',\n color: 'rgb(0, 0, 238)',\n border: 'none',\n padding: '0!important',\n textTransform: 'none',\n cursor: 'pointer',\n '&:hover': {\n color: 'rgb(0, 100, 238)',\n background: 'none',\n textDecoration: 'underline',\n },\n '&:visited': {\n color: 'purple',\n },\n },\n});\n\nexport default withStyles(styles)(UnstyledCADownloadLink);\n","import { connect } from 'react-redux';\n\nimport { actionCreators } from 'dux/instances';\nimport CADownloadLink from './CADownloadLink';\n\nconst mapDispatchToProps = {\n getInstanceCertificateDownload: actionCreators.getInstanceCertificateDownload,\n};\n\nexport default connect(null, mapDispatchToProps)(CADownloadLink);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport { withSnackbar } from 'notistack';\nimport { uiState } from 'react-redux-ui-state';\nimport { Field, reduxForm } from 'redux-form';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport Table from '@material-ui/core/Table';\nimport TableBody from '@material-ui/core/TableBody';\nimport TableRow from '@material-ui/core/TableRow';\nimport TableCell from '@material-ui/core/TableCell';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport Icon from '@material-ui/core/Icon';\nimport CloseIcon from '@material-ui/icons/Close';\nimport IconButton from '@material-ui/core/IconButton';\nimport Button from '@material-ui/core/Button';\nimport Fab from '@material-ui/core/Fab';\nimport RotateIcon from '@material-ui/icons/ThreeSixty';\nimport VerifiedUserIcon from '@material-ui/icons/VerifiedUser';\nimport DownloadIcon from '@material-ui/icons/GetApp';\nimport PopoutItem from 'components/PopoutItem/PopoutItem';\nimport WrappedTextField from 'components/WrappedTextField/WrappedTextField';\nimport BusyButton from 'components/BusyButton/BusyButton';\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport { handleClickAway } from 'services/handleClickAway/index';\nimport { required } from 'services/validationMsgs';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n getInstanceCertificates: PropTypes.func.isRequired,\n getInstanceCertificatesState: PropTypes.func.isRequired,\n createInstanceCertificate: PropTypes.func.isRequired,\n createInstanceClientCertificate: PropTypes.func.isRequired,\n getInstanceCertificateDownload: PropTypes.func.isRequired,\n deleteInstanceCertificate: PropTypes.func.isRequired,\n getPrimaryCertId: PropTypes.func.isRequired,\n instanceId: PropTypes.string.isRequired,\n service: PropTypes.string.isRequired,\n open: PropTypes.bool.isRequired,\n deleteDialogOpen: PropTypes.bool.isRequired,\n setUiState: PropTypes.func.isRequired,\n handleSubmit: PropTypes.func.isRequired,\n rotateLoading: PropTypes.bool.isRequired,\n downloadLoading: PropTypes.bool.isRequired,\n deleteLoading: PropTypes.bool.isRequired,\n enqueueSnackbar: PropTypes.func.isRequired,\n closeSnackbar: PropTypes.func.isRequired,\n showCADownloadButton: PropTypes.bool,\n};\n\nconst defaultProps = {\n showCADownloadButton: false,\n};\n\nfunction createCertificateTableCells(certificates, classes) {\n if (!certificates.length) {\n return [];\n }\n\n const { clientCertificates } = certificates[0];\n\n if (!clientCertificates.length) {\n return [];\n }\n\n return clientCertificates.map((clientCertificate) => {\n /*\n When a DB user is deleted, their associated client cert goes into a delete_requested state,\n or 4. As of 2020-02-04, this is the only state where a client cert would still be associated\n with a CA and be invalid.\n */\n const isCertInvalid = clientCertificate.status === 4;\n const certCellText = isCertInvalid ? 'Invalid Certificate' : 'Valid Certificate';\n const certCellIcon = isCertInvalid ? 'verified_user' : 'done';\n const certCellClass = isCertInvalid ? classes.certCellInvalid : classes.certCellValid;\n return (\n <TableRow key={clientCertificate.id} className={classes.tableRow}>\n <TableCell classes={{ root: classes.userCellRoot }} size=\"small\">\n <ORTypography variant=\"body2\">{clientCertificate.username}</ORTypography>\n </TableCell>\n <TableCell className={certCellClass} classes={{ root: classes.certCellRoot }} size=\"small\">\n <Icon>{certCellIcon}</Icon>\n <ORTypography variant=\"body2\">{certCellText}</ORTypography>\n </TableCell>\n </TableRow>\n );\n });\n}\n\nexport function UnstyledCRCAMgmt({\n getInstanceCertificates,\n getInstanceCertificatesState,\n createInstanceCertificate,\n createInstanceClientCertificate,\n getInstanceCertificateDownload,\n deleteInstanceCertificate,\n getPrimaryCertId,\n instanceId,\n service,\n classes,\n open,\n deleteDialogOpen,\n setUiState,\n handleSubmit,\n rotateLoading,\n downloadLoading,\n deleteLoading,\n enqueueSnackbar,\n closeSnackbar,\n showCADownloadButton,\n}) {\n const certificates = getInstanceCertificatesState(instanceId);\n\n const primaryCA = certificates ? certificates.filter((certificate) => certificate.primary) : [];\n const secondaryCA = certificates\n ? certificates.filter((certificate) => !certificate.primary)\n : [];\n\n const primaryClientCertCells = createCertificateTableCells(primaryCA, classes);\n const secondaryClientCertCells = createCertificateTableCells(secondaryCA, classes);\n\n const secondaryHasUsers =\n secondaryCA.length !== 0 ? secondaryCA[0].clientCertificates.length !== 0 : false;\n\n const userCount = primaryClientCertCells.length;\n const userCountPlural = userCount === 1 ? '' : 's';\n\n let anchorEl;\n function handleClick() {\n setUiState({\n open: !open,\n });\n }\n\n const setRef = (node) => {\n anchorEl = node;\n };\n\n const getAnchorEl = () => anchorEl;\n\n const options = {\n variant: 'success',\n };\n\n const action = (key) => (\n <IconButton\n key=\"close\"\n aria-label=\"Close\"\n onClick={() => {\n closeSnackbar(key);\n }}\n color=\"inherit\"\n >\n <CloseIcon />\n </IconButton>\n );\n\n const submitHandler = (data) => {\n setUiState({\n open: false,\n });\n const formattedCSR = data.csr.replace(/\\\\n/gm, 'NEWLINE');\n return createInstanceClientCertificate(service, instanceId, formattedCSR, () => {\n enqueueSnackbar('Certificate Created Successfully', { ...options, action });\n }).then(() => {\n getInstanceCertificates(service, instanceId);\n });\n };\n\n const handleRotateClick = () => {\n setUiState({\n rotateLoading: true,\n });\n createInstanceCertificate(service, instanceId, () => {\n enqueueSnackbar('Certificate Created Successfully', { ...options, action });\n }).then(() => {\n getInstanceCertificates(service, instanceId);\n setUiState({\n rotateLoading: false,\n });\n });\n };\n\n const handleDownloadClick = () => {\n setUiState({\n downloadLoading: true,\n });\n const CACertId = getPrimaryCertId(instanceId);\n getInstanceCertificateDownload(service.toLowerCase(), instanceId, CACertId)\n .then((data) => {\n if (data.payload.certificate) {\n const element = document.createElement('a');\n element.download = 'primary-cert.crt';\n element.style = 'display: none;';\n const file = new Blob([data.payload.certificate], { type: 'text/plain;charset=utf-8;' }); // eslint-disable-line no-undef\n element.href = window.URL.createObjectURL(file);\n document.body.appendChild(element);\n element.click();\n document.body.removeChild(element);\n }\n setUiState({\n downloadLoading: false,\n });\n })\n .catch((error) => error);\n };\n\n const handleDeleteClick = () => {\n setUiState({\n deleteDialogOpen: false,\n deleteLoading: true,\n });\n deleteInstanceCertificate(service.toLowerCase(), instanceId, () => {\n enqueueSnackbar('Certificate Scheduled for Deletion', { ...options, action });\n }).then(() => {\n getInstanceCertificates(service, instanceId);\n setUiState({\n deleteLoading: false,\n });\n });\n };\n\n const handleCancelClick = () => {\n setUiState({\n deleteDialogOpen: false,\n });\n };\n\n const deleteCertDialog = (\n <Dialog open={deleteDialogOpen}>\n <DialogContent className={classes.dialogContent}>\n There are still users on the Secondary CA. Deleting this will remove their access.\n </DialogContent>\n <DialogActions>\n <Button color=\"secondary\" onClick={handleCancelClick}>\n Cancel\n </Button>\n <Button color=\"primary\" onClick={handleDeleteClick}>\n Confirm\n </Button>\n </DialogActions>\n </Dialog>\n );\n\n const createCertForm = (\n <div className={classes.certFormContainer}>\n <ORTypography className={classes.certFormTitle} component=\"h3\" variant=\"h6\">\n Create User Cert by Submitting a CSR\n </ORTypography>\n <form onSubmit={handleSubmit(submitHandler)}>\n <Field\n multiline\n rows={6}\n name=\"csr\"\n type=\"textarea\"\n variant=\"outlined\"\n placeholder=\"Please enter your Certificate Signing Requests (CSR) to generate a signed cert for the user. This will assign the Primary CA to their cert.\"\n component={WrappedTextField}\n InputProps={{ classes: { input: classes.input } }}\n props={{ InputLabelProps: { shrink: true } }}\n validate={[required]}\n fullWidth\n />\n <Button\n variant=\"contained\"\n color=\"primary\"\n type=\"submit\"\n className={classes.certFormButton}\n >\n CONFIRM AND GENERATE\n </Button>\n </form>\n </div>\n );\n\n return (\n <React.Fragment>\n {showCADownloadButton ? (\n <Button\n hover-override=\"white\"\n className={classes.caButton}\n onClick={handleDownloadClick}\n variant=\"contained\"\n >\n DOWNLOAD CA\n </Button>\n ) : (\n <React.Fragment>\n <div className={classes.headerSection}>\n <div className={classes.headerText}>\n <ORTypography className={classes.headerTitle} component=\"h2\" variant=\"h4\">\n Certificate Authority (CA) Management\n </ORTypography>\n <ORTypography variant=\"body2\" className={classes.info}>\n To secure your cluster’s node communication you need a Certificate Authority\n (CA) in order to verify identity.\n </ORTypography>\n </div>\n <div className={classes.headerAction}>\n <BusyButton\n loading={rotateLoading}\n className={classes.rotateButton}\n name=\"submit\"\n variant=\"fab\"\n color=\"secondary\"\n size=\"small\"\n tooltip=\"Rotate CA\"\n tooltipPlacement=\"top-start\"\n mini\n onClick={handleRotateClick}\n >\n <RotateIcon />\n </BusyButton>\n </div>\n </div>\n\n <div className={classes.certificateSection}>\n <ORTypography className={classes.certificateTitle} component=\"h3\" variant=\"h6\">\n Primary Certificate Authority\n </ORTypography>\n <ORTypography variant=\"body2\" className={classes.info}>\n There are {userCount} user\n {userCountPlural} on this Primary CA. Rotating the CA will move the Primary users to\n the Secondary position. It will also create a new Primary CA which will allow access\n for all current users. A user can have access to a Database through either the Primary\n or secondary CA.\n </ORTypography>\n <Table className={classes.certTable}>\n <TableBody>{primaryClientCertCells}</TableBody>\n </Table>\n <div className={classes.primaryCertActions}>\n <BusyButton\n loading={downloadLoading}\n className={classes.downloadButton}\n name=\"submit\"\n variant=\"fab\"\n color=\"secondary\"\n size=\"small\"\n mini\n tooltip=\"Download\"\n tooltipPlacement=\"left\"\n onClick={handleDownloadClick}\n >\n <DownloadIcon />\n </BusyButton>\n <Tooltip title=\"Create a User Cert by Submitting a CSR.\">\n <span>\n <Fab\n onClick={handleClick}\n buttonRef={setRef}\n size=\"small\"\n color=\"secondary\"\n className={classes.createButton}\n >\n <div className={classes.iconContainer}>\n <VerifiedUserIcon />\n <span className={classes.iconLabel}>What's this?</span>\n </div>\n </Fab>\n </span>\n </Tooltip>\n <PopoutItem\n closeButton={false}\n anchorEl={getAnchorEl}\n handleClick={handleClick}\n handleClickAway={(e) =>\n handleClickAway(e, anchorEl, () => setUiState({ open: false }))\n }\n placement=\"bottom\"\n open={open}\n >\n {createCertForm}\n </PopoutItem>\n </div>\n </div>\n\n {secondaryCA.length !== 0 && (\n <div className={classes.certificateSection}>\n <ORTypography className={classes.certificateTitle} component=\"h3\" variant=\"h6\">\n Secondary Certificate Authority\n </ORTypography>\n <Table className={classes.certTable}>\n <TableBody>{secondaryClientCertCells}</TableBody>\n </Table>\n <div className={classes.secondaryCertActions}>\n <div className={classes.deleteButtonWrapper}>\n <BusyButton\n loading={deleteLoading}\n style={{\n color: 'white',\n backgroundColor: '#D0021C',\n }}\n name=\"delete\"\n variant=\"fab\"\n size=\"small\"\n mini\n tooltip=\"Delete Secondary CA\"\n tooltipPlacement=\"left\"\n onClick={() =>\n secondaryHasUsers\n ? setUiState({ deleteDialogOpen: true })\n : handleDeleteClick()\n }\n >\n <Icon>delete</Icon>\n </BusyButton>\n </div>\n {deleteCertDialog}\n </div>\n </div>\n )}\n </React.Fragment>\n )}\n </React.Fragment>\n );\n}\n\nUnstyledCRCAMgmt.propTypes = propTypes;\nUnstyledCRCAMgmt.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n dialogContent: {\n color: theme.customColors.mediumGrey,\n },\n input: {\n '&::placeholder': {\n fontSize: theme.typography.caption.fontSize,\n },\n },\n iconContainer: {\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n position: 'absolute',\n top: '50%',\n bottom: '0',\n\n '& :first-child': {\n padding: theme.spacing(1),\n borderRadius: '50%',\n fontSize: '2.75rem',\n },\n },\n iconLabel: {\n paddingTop: '0.25em',\n fontSize: '0.75rem',\n color: 'blue',\n width: '175%',\n textTransform: 'Capitalize',\n fontStyle: 'italic',\n },\n certFormContainer: {\n padding: theme.spacing(1),\n },\n certFormTitle: {\n paddingBottom: theme.spacing(1),\n },\n certFormButton: {\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(1),\n width: '100%',\n },\n headerSection: {\n padding: `0 ${theme.spacing(1)}px ${theme.spacing(1)}px ${theme.spacing(1)}px`,\n borderBottom: `1px solid ${theme.customColors.black}`,\n display: 'block',\n justifyContent: 'space-between',\n [theme.breakpoints.up('md')]: {\n display: 'flex',\n },\n },\n headerText: {\n maxWidth: '100%',\n [theme.breakpoints.up('md')]: {\n maxWidth: '90%',\n },\n },\n headerTitle: {\n [theme.breakpoints.down('sm')]: {\n fontSize: '16px',\n },\n },\n headerAction: {\n position: 'relative',\n },\n rotateButton: {\n display: 'flex',\n justifyContent: 'flex-end',\n marginBottom: theme.spacing(1),\n marginRight: theme.spacing(1),\n [theme.breakpoints.up('md')]: {\n position: 'absolute',\n bottom: theme.spacing(1),\n right: theme.spacing(1),\n marginBottom: 'unset',\n marginRight: 'unset',\n },\n },\n createButton: {\n marginRight: theme.spacing(1),\n marginBottom: theme.spacing(1.5),\n },\n downloadButton: {\n marginRight: theme.spacing(1.5),\n marginBottom: theme.spacing(1),\n },\n deleteButtonWrapper: {\n marginBottom: theme.spacing(1),\n marginRight: theme.spacing(1),\n },\n header: {\n color: theme.customColors.darkGrey,\n },\n primaryCertActions: {\n display: 'flex',\n justifyContent: 'flex-end',\n },\n secondaryCertActions: {\n display: 'flex',\n justifyContent: 'flex-end',\n },\n info: {\n fontStyle: 'italic',\n color: theme.customColors.mediumGrey,\n },\n certificateSection: {\n borderBottom: `1px solid ${theme.customColors.black}`,\n padding: theme.spacing(1),\n },\n certificateTitle: {\n [theme.breakpoints.down('sm')]: {\n fontSize: '16px',\n },\n },\n certTable: {\n marginTop: theme.spacing(1),\n // we may be able to eliminate or reduce this bottom margin once the action buttons are in place\n marginBottom: theme.spacing(2),\n },\n tableRow: {\n borderBottom: `1px solid ${theme.customColors.lightGrey}`,\n borderTop: `1px solid ${theme.customColors.lightGrey}`,\n },\n userCellRoot: {\n border: 0,\n paddingLeft: 0,\n },\n certCellRoot: {\n display: 'flex',\n alignItems: 'center',\n fontStyle: 'italic',\n justifyContent: 'flex-end',\n border: 0,\n },\n certCellValid: {\n color: theme.customColors.teal,\n },\n certCellInvalid: {\n color: theme.customColors.magenta,\n },\n caButton: {\n color: theme.customColors.black,\n backgroundColor: theme.customColors.white,\n paddingLeft: '2rem',\n paddingRight: '2rem',\n\n [theme.breakpoints.down('md')]: {\n width: '100%',\n },\n },\n});\n\nexport const uiConfig = {\n name: 'createCert',\n state: () => ({\n open: false,\n deleteDialogOpen: false,\n rotateLoading: false,\n downloadLoading: false,\n deleteLoading: false,\n }),\n};\n\nexport default withSnackbar(\n uiState(uiConfig)(withStyles(styles)(reduxForm({ form: 'createNewCert' })(UnstyledCRCAMgmt))),\n);\n","import { connect } from 'react-redux';\n\nimport { actionCreators, selectors } from 'dux/instances';\nimport CRCAMgmt from './CRCAMgmt';\n\nconst mapStateToProps = (state) => ({\n getInstanceCertificatesState: selectors.getInstanceCertificatesState(state),\n getPrimaryCertId: selectors.getPrimaryCertId(state),\n});\n\nconst mapDispatchToProps = {\n getInstanceCertificates: actionCreators.getInstanceCertificates,\n createInstanceCertificate: actionCreators.createInstanceCertificate,\n createInstanceClientCertificate: actionCreators.createInstanceClientCertificate,\n getInstanceCertificateDownload: actionCreators.getInstanceCertificateDownload,\n deleteInstanceCertificate: actionCreators.deleteInstanceCertificate,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(CRCAMgmt);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core';\n\nimport ConnectItem from './ConnectItem/ConnectItem';\nimport ConnectWarning from './ConnectWarning/ConnectWarning';\nimport ORTypography from '../../../../ORTypography/ORTypography';\nimport CADownloadLinkContainer from './CADownloadLinkContainer';\nimport CRCAMgmtContainer from './CRCAMgmt/CRCAMgmtContainer';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n connectionString: PropTypes.string.isRequired,\n service: PropTypes.string.isRequired,\n hosts: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n name: PropTypes.string.isRequired,\n id: PropTypes.string.isRequired,\n CACertId: PropTypes.string,\n};\n\nconst defaultProps = {\n CACertId: '',\n};\n\nexport function UnstyledConnectTab({\n classes,\n connectionString,\n service,\n hosts,\n name,\n id,\n CACertId,\n}) {\n return (\n <React.Fragment>\n <div className={classes.pageContainer}>\n {/*\n * TODO\n * Create a new component for headerSection, database user select box\n * and connection-string box.\n */}\n <div className={classes.headerSection}>\n <div className={classes.headerText}>\n <ORTypography className={classes.headerTitle} component=\"h2\" variant=\"h4\">\n Certificate Authority (CA) Management\n </ORTypography>\n <ORTypography variant=\"body2\" className={classes.info}>\n To secure your cluster’s node communication you need a Certificate Authority\n (CA) in order to verify identity.\n </ORTypography>\n </div>\n </div>\n {/*\n {(service.toLowerCase() === 'cockroachdb' || service.toLowerCase() === 'mongodb') && (\n <CRCAMgmtContainer service={service} instanceId={id} />\n )}\n */}\n <ConnectItem\n key=\"main\"\n instanceId={id}\n title={service}\n description={null}\n connectionString={connectionString}\n />\n {hosts.map((host, index) => {\n const { role, connectionUri } = host;\n\n if (service.toLowerCase() === role) {\n return null;\n }\n\n if (!connectionUri) {\n return null;\n }\n\n if (service.toLowerCase() === 'mongodb') {\n return null;\n }\n\n return (\n <ConnectItem\n key={index.toString()}\n instanceId={id}\n title={role}\n description={null}\n connectionString={connectionUri}\n />\n );\n })}\n </div>\n\n {service.toLowerCase() === 'mongodb' && (\n <ConnectWarning>\n <ORTypography variant=\"altSubheading\">\n Download the Certificate Authority (CA) File for your Instance.\n </ORTypography>\n <ORTypography variant=\"caption\">\n <p>\n You must download the CA Bundle and point to it with the --sslCAFile parameter on your\n Mongo client in order to securely connect with SSL.\n </p>\n <p>\n If you’re using client certificate authentication, more in-depth information can be\n found in our{' '}\n <a\n href=\"https://docs.api.objectrocket.cloud/#mongodb-certificates-instructions\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n API Docs\n </a>\n .\n </p>\n </ORTypography>\n <div className={classes.caContainer}>\n <CRCAMgmtContainer service={service} instanceId={id} showCADownloadButton />\n </div>\n </ConnectWarning>\n )}\n\n {service.toLowerCase() === 'cockroachdb' && (\n <ConnectWarning>\n <ORTypography variant=\"altSubheading\">\n Download the Certificate Authority (CA) File for your Instance.\n </ORTypography>\n <ORTypography variant=\"caption\">\n <p>\n You must download the CA Bundle In order to use higher `sslmode` settings, like\n `verify-ca`\n </p>\n <p>\n If you’re using client certificate authentication, more in-depth information can be\n found in our{' '}\n <a\n href=\"https://docs.api.objectrocket.cloud/#cockroachdb-certificates-instructions\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n API Docs\n </a>\n .\n </p>\n </ORTypography>\n <div className={classes.caContainer}>\n <CRCAMgmtContainer service={service} instanceId={id} showCADownloadButton />\n </div>\n </ConnectWarning>\n )}\n\n {['postgresql', 'timescaledb'].indexOf(service.toLowerCase()) !== -1 && (\n <ConnectWarning>\n <ORTypography variant=\"caption\">\n <p>\n <b>Download the Certificate Authority (CA) File for your instance</b>\n </p>\n <p>\n In order to use higher `sslmode` settings, like `verify-ca`, you will need the CA\n certificate.\n </p>\n <p>\n <CADownloadLinkContainer\n service={service}\n instanceId={id}\n filename={`${name}_CA`}\n CACertId={CACertId}\n />\n </p>\n </ORTypography>\n </ConnectWarning>\n )}\n </React.Fragment>\n );\n}\n\nUnstyledConnectTab.propTypes = propTypes;\nUnstyledConnectTab.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n pageContainer: {\n backgroundColor: theme.customColors.white,\n border: `1px solid ${theme.customColors.lightGrey}`,\n paddingBottom: theme.spacing(1),\n },\n headerSection: {\n padding: `0 ${theme.spacing(1)}px ${theme.spacing(1)}px ${theme.spacing(1)}px`,\n borderBottom: `1px solid ${theme.customColors.black}`,\n display: 'block',\n justifyContent: 'space-between',\n [theme.breakpoints.up('md')]: {\n display: 'flex',\n },\n },\n caContainer: {\n display: 'flex',\n justifyContent: 'flex-end',\n },\n warningContainer: {\n width: '100%',\n },\n});\n\nexport default withStyles(styles)(UnstyledConnectTab);\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\n\nimport { actionCreators } from 'dux/instances';\nimport ConnectTab from './ConnectTab';\n\nconst propTypes = {\n service: PropTypes.string.isRequired,\n id: PropTypes.string.isRequired,\n getInstanceCertificates: PropTypes.func.isRequired,\n};\n\nclass ConnectTabContainer extends React.Component {\n componentDidMount() {\n const { service, id: instanceId, getInstanceCertificates } = this.props;\n if (\n service.toLowerCase() === 'cockroachdb' ||\n service.toLowerCase() === 'postgresql' ||\n service.toLowerCase() === 'timescaledb' ||\n service.toLowerCase() === 'mongodb'\n ) {\n getInstanceCertificates(service.toLowerCase(), instanceId);\n }\n }\n\n render() {\n return <ConnectTab {...this.props} />;\n }\n}\n\nconst mapDispatchToProps = {\n getInstanceCertificates: actionCreators.getInstanceCertificates,\n};\n\nConnectTabContainer.propTypes = propTypes;\n\nexport default connect(null, mapDispatchToProps)(ConnectTabContainer);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport { withStyles } from '@material-ui/core';\nimport Fab from '@material-ui/core/Fab';\nimport Icon from '@material-ui/core/Icon';\n\nimport roleDisabled from 'services/roleDisabled/index';\n\nconst propTypes = {\n size: PropTypes.string.isRequired,\n userAccess: PropTypes.arrayOf(PropTypes.string).isRequired,\n allowedAccess: PropTypes.arrayOf(PropTypes.string).isRequired,\n onClick: PropTypes.func.isRequired,\n invalidField: PropTypes.bool,\n classes: PropTypes.shape({}).isRequired,\n clear: PropTypes.bool,\n tooltip: PropTypes.string,\n};\n\nconst defaultProps = {\n invalidField: false,\n clear: false,\n tooltip: '',\n};\n\nexport function UnstyledRBACDeleteButton({\n size,\n userAccess,\n allowedAccess,\n onClick,\n invalidField,\n classes,\n clear,\n tooltip,\n}) {\n const hoverOverride = clear ? 'none' : 'red';\n const theButton = (disabled = false) => (\n <Fab\n data-testid=\"deleteButton\"\n size={size}\n hover-override={hoverOverride}\n classes={clear ? { root: classes.clearButton } : { root: classes.listItemDeleteRoot }}\n onClick={onClick}\n disabled={disabled || invalidField}\n >\n <Icon>delete</Icon>\n </Fab>\n );\n let formattedButton;\n if (roleDisabled(userAccess, allowedAccess)) {\n formattedButton = (\n <Tooltip title=\"You do not have the required access for this resource. Contact your organization owner.\">\n {theButton(true)}\n </Tooltip>\n );\n } else if (tooltip && !invalidField) {\n formattedButton = (\n <Tooltip placement=\"left\" title={tooltip}>\n {theButton()}\n </Tooltip>\n );\n } else if (tooltip && invalidField) {\n formattedButton = (\n <Tooltip placement=\"left\" title={tooltip}>\n <span>{theButton()}</span>\n </Tooltip>\n );\n } else {\n formattedButton = theButton();\n }\n\n return <React.Fragment>{formattedButton}</React.Fragment>;\n}\n\nconst styles = (theme) => ({\n clearButton: {\n color: theme.customColors.red,\n backgroundColor: 'inherit',\n boxShadow: 'none',\n '&:hover': {\n backgroundColor: 'inherit',\n },\n },\n listItemDeleteRoot: {\n color: theme.customColors.white,\n backgroundColor: theme.customColors.red,\n boxShadow: 'none',\n '&:hover': {\n backgroundColor: theme.customColors.red,\n },\n '&:disabled': {\n color: 'rgba(0, 0, 0, 0.26)',\n backgroundColor: 'rgba(0, 0, 0, 0.12)',\n },\n },\n});\n\nUnstyledRBACDeleteButton.propTypes = propTypes;\nUnstyledRBACDeleteButton.defaultProps = defaultProps;\n\nexport default withStyles(styles)(UnstyledRBACDeleteButton);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core';\nimport Button from '@material-ui/core/Button';\nimport Tooltip from '@material-ui/core/Tooltip';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n openForm: PropTypes.func.isRequired,\n setRef: PropTypes.func.isRequired,\n icon: PropTypes.node.isRequired,\n disabled: PropTypes.bool.isRequired,\n tooltip: PropTypes.string,\n};\n\nconst defaultProps = {\n tooltip: '',\n};\n\nexport function UnstyledFormToggleButton({ classes, openForm, setRef, icon, disabled, tooltip }) {\n const theButton = (\n <React.Fragment>\n {/* eslint-disable-next-line max-len */}\n <Button\n buttonRef={setRef}\n hover-override=\"darkPurple\"\n className={classes.addButton}\n onClick={openForm}\n disabled={disabled}\n >\n <div className={classes.iconContainer}>{icon}</div>\n </Button>\n </React.Fragment>\n );\n\n let formattedButton;\n if (disabled) {\n formattedButton = (\n <Tooltip\n title=\"You do not have the required access for this resource. Contact your organization owner.\"\n classes={{ tooltip: classes.tooltip }}\n >\n <span>{theButton}</span>\n </Tooltip>\n );\n } else if (tooltip) {\n formattedButton = (\n <Tooltip placement=\"left\" title={tooltip} classes={{ tooltip: classes.tooltip }}>\n <span>{theButton}</span>\n </Tooltip>\n );\n } else {\n formattedButton = theButton;\n }\n\n return <React.Fragment>{formattedButton}</React.Fragment>;\n}\n\nUnstyledFormToggleButton.propTypes = propTypes;\n\nconst styles = (theme) => ({\n iconContainer: {\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n\n '& :first-child': {\n width: '40px',\n height: '40px',\n padding: '7px',\n boxShadow: 'none',\n fontSize: '2.5em',\n borderRadius: '50%',\n color: theme.customColors.white,\n background: theme.customColors.darkPurple,\n '&[disabled]': {\n background: 'rgba(77, 0, 66, 0.26)',\n '& svg': {\n background: 'rgba(77, 0, 66, 0.26)',\n },\n },\n },\n '&[disabled]': {\n background: 'rgba(77, 0, 66, 0.26)',\n },\n },\n iconLabel: {\n paddingTop: '0.25em',\n width: '100%',\n },\n addButton: {\n '&[disabled]': {\n '& span div svg': {\n background: 'rgba(77, 0, 66, 0.26)',\n },\n color: theme.customColors.white,\n background: 'rgba(77, 0, 66, 0.26)',\n },\n '&[hover-override~=darkPurple]': {\n color: theme.customColors.black,\n background: 'unset!important',\n padding: theme.spacing(1),\n minWidth: 'unset',\n },\n },\n addButtonLabel: {\n flexGrow: 3,\n },\n});\n\nUnstyledFormToggleButton.defaultProps = defaultProps;\n\nexport default withStyles(styles)(UnstyledFormToggleButton);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core';\nimport Table from '@material-ui/core/Table';\nimport TableFooter from '@material-ui/core/TableFooter';\nimport TablePagination from '@material-ui/core/TablePagination';\nimport TableRow from '@material-ui/core/TableRow';\n\nimport TablePaginationActions from './TablePaginationActions';\n\nconst propTypes = {\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,\n classes: PropTypes.shape({}).isRequired,\n page: PropTypes.number,\n rowsPerPage: PropTypes.number,\n count: PropTypes.number,\n onChangePage: PropTypes.func,\n};\n\nconst defaultProps = {\n page: 0,\n rowsPerPage: 10,\n count: 0,\n onChangePage: null,\n};\n\nexport function UnstyledORTable({ children, classes, rowsPerPage, page, count, onChangePage }) {\n return count <= rowsPerPage ? (\n <Table className={classes.table}>{children}</Table>\n ) : (\n <Table className={classes.table}>\n {children}\n <TableFooter>\n <TableRow>\n <TablePagination\n classes={{\n root: classes.paginationRoot,\n spacer: classes.paginationSpacer,\n caption: classes.paginationCaption,\n input: classes.paginationInput,\n toolbar: classes.paginationToolbar,\n }}\n count={count}\n rowsPerPage={rowsPerPage}\n page={page}\n onChangePage={onChangePage}\n ActionsComponent={TablePaginationActions}\n />\n </TableRow>\n </TableFooter>\n </Table>\n );\n}\n\nUnstyledORTable.propTypes = propTypes;\nUnstyledORTable.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n table: {\n backgroundColor: theme.customColors.white,\n border: `1px solid ${theme.customColors.lightGrey}`,\n lineHeight: '1.8rem',\n borderRadius: '3px',\n borderCollapse: 'separate',\n '& th': {\n border: 0,\n height: '80px',\n paddingTop: '25px',\n fontSize: theme.typography.h6.fontSize,\n color: theme.customColors.black,\n },\n '& td': {\n border: 0,\n fontSize: theme.typography.subtitle1.fontSize,\n },\n '& tbody tr:nth-child(odd)': {\n backgroundColor: theme.customColors.coolGrey,\n },\n '& tfoot': {\n width: '100%',\n },\n },\n paginationRoot: {\n padding: 0,\n fontSize: '1rem',\n paddingRight: 'unset',\n '& span': {\n color: theme.customColors.lightGrey,\n marginRight: theme.spacing(0.25),\n marginLeft: theme.spacing(0.25),\n display: 'inline-block',\n width: '20px',\n textAlign: 'center',\n },\n '& span:hover': {\n cursor: 'pointer',\n },\n '& button': {\n border: 'none',\n fontSize: '1rem',\n color: theme.palette.secondary.main,\n display: 'inline',\n cursor: 'pointer',\n },\n },\n paginationSpacer: {\n flex: 'unset',\n },\n // uses !important to prevent media query overwrites\n paginationCaption: {\n display: 'none !important',\n },\n paginationInput: {\n display: 'none !important',\n },\n paginationToolbar: {\n padding: theme.spacing(1),\n borderTop: '1px solid rgb(216, 216, 216)',\n },\n pageButtonStyles: {\n fontSize: '1rem',\n },\n});\n\nexport default withStyles(styles)(UnstyledORTable);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { uiState } from 'react-redux-ui-state';\nimport { withStyles } from '@material-ui/core';\nimport UsersIcon from '@material-ui/icons/PersonAdd';\nimport CertIcon from '@material-ui/icons/NoteAdd';\nimport Done from '@material-ui/icons/Done';\nimport NoCertIcon from '@material-ui/icons/NotInterested';\nimport VerifiedUser from '@material-ui/icons/VerifiedUser';\nimport TableBody from '@material-ui/core/TableBody';\nimport TableRow from '@material-ui/core/TableRow';\nimport TableCell from '@material-ui/core/TableCell';\nimport Card from '@material-ui/core/Card';\nimport Hidden from '@material-ui/core/Hidden';\nimport DatabasesIcon from '@material-ui/icons/Storage';\n\nimport roleDisabled from 'services/roleDisabled/index';\nimport RBACDeleteButton from 'components/RBACWrapper/RBACDeleteButton/RBACDeleteButton';\nimport { OWNER, ADMIN, OR_ADMIN, OR_SUPERUSER } from 'constants/roles';\nimport MoreLessString from 'components/MissionCtrl/ProfilePage/PersonalInfoTab/ApiTokenCard/ApiTokenItem/MoreLessString/MoreLessString';\nimport SegmentClickTracker from 'components/SegmentClickTracker/SegmentClickTrackerContainer';\nimport AddUserFormContainer from '../AddUserForm/AddUserFormContainer';\nimport FormToggleButton from '../FormToggleButton/FormToggleButton';\nimport PopoutItem from '../PopoutItem/PopoutItem';\nimport ORTable from '../ORTable/ORTable';\nimport { handleClickAway } from '../../services/handleClickAway/index';\n\nconst propTypes = {\n users: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n certs: PropTypes.arrayOf(PropTypes.shape({})),\n clientCerts: PropTypes.arrayOf(PropTypes.shape({})),\n classes: PropTypes.shape({}).isRequired,\n instanceId: PropTypes.string.isRequired,\n instanceService: PropTypes.string.isRequired,\n deleteInstanceUser: PropTypes.func.isRequired,\n setUiState: PropTypes.func.isRequired,\n open: PropTypes.bool.isRequired,\n userRoles: PropTypes.arrayOf(PropTypes.string).isRequired,\n page: PropTypes.number.isRequired,\n rowsPerPage: PropTypes.number.isRequired,\n};\n\nconst defaultProps = {\n certs: [],\n clientCerts: [],\n};\n\nexport function UnstyledUserList({\n users,\n certs,\n clientCerts,\n classes,\n instanceId,\n instanceService,\n deleteInstanceUser,\n setUiState,\n open,\n userRoles,\n page,\n rowsPerPage,\n}) {\n function handleChangePage(event, newPage) {\n setUiState({\n page: newPage,\n });\n }\n\n const allowedUserRoles = [OWNER, ADMIN, OR_ADMIN, OR_SUPERUSER];\n let anchorEl;\n const handleClick = () => {\n setUiState({\n open: !open,\n });\n };\n\n const handDeleteClick = (id, service, username, db) => {\n if (db) {\n deleteInstanceUser(id, service, username, db);\n } else {\n deleteInstanceUser(id, service, username);\n }\n };\n\n const findCA = (user) => {\n const ca = certs.find((cert) => {\n const temp = cert.clientCertificates.some((clientCA) => clientCA.username === user.username);\n return temp;\n });\n // Return the entire item if any single sub item matches the username\n return ca;\n };\n\n const getAnchorEl = () => anchorEl;\n\n const setRef = (node) => {\n anchorEl = node;\n };\n\n const mobileUserCells = (user) => {\n if (instanceService === 'CockroachDB' || instanceService === 'MongoDB') {\n const ca = findCA(user);\n const clientCert = clientCerts.find((cc) => cc.username === user.username);\n let primary;\n if (!ca) {\n primary = '';\n } else if (ca.primary) {\n primary = 'Primary CA';\n } else {\n primary = 'Secondary CA';\n }\n const isValid = clientCert ? certs.find((ct) => ct.id === clientCert.caCertificate) : null;\n\n let validity;\n if (!clientCert) {\n validity = (\n <div className={classes.validity}>\n <NoCertIcon className={classes.mobileCertIcon} />\n <div className={classes.validityText}>No Certificate</div>\n </div>\n );\n } else if (isValid) {\n validity = (\n <div className={classes.validity}>\n <Done className={classes.mobileCertIcon} />\n <div className={classes.validityText}>Valid Certificate</div>\n </div>\n );\n } else {\n validity = (\n <div className={classes.validity}>\n <VerifiedUser className={classes.mobileCertIcon} />\n <div className={classes.validityText}>Invalid Certificate</div>\n </div>\n );\n }\n\n return (\n <React.Fragment>\n <div className={classes.mobileCertCell}>\n {user.database && (\n <div className={classes.validity}>\n <DatabasesIcon className={classes.mobileCertIcon} />\n <div className={classes.caTypeText}>{user.database}</div>\n </div>\n )}\n {primary && (\n <div className={classes.caType}>\n <CertIcon className={classes.mobileCertIcon} />\n <div className={classes.caTypeText}>{primary}</div>\n </div>\n )}\n {validity}\n </div>\n </React.Fragment>\n );\n }\n return null;\n };\n\n /**\n * the userCells variable is being commented out for now until\n * a refactor is done for the UserList to fit the comps better\n * in this ticket: UX-3703\n */\n\n // const userCells = (user) => {\n // if (instanceService === 'CockroachDB' || instanceService === 'MongoDB') {\n // const ca = findCA(user);\n // const clientCert = clientCerts.find((cc) => cc.username === user.username);\n // let primary;\n // if (!ca) {\n // primary = '';\n // } else if (ca.primary) {\n // primary = 'Primary CA';\n // } else {\n // primary = 'Secondary CA';\n // }\n // const isValid = clientCert ? certs.find((ct) => ct.id === clientCert.caCertificate) : null;\n\n // let validity;\n // if (!clientCert) {\n // validity = (\n // <div className={classes.certCell}>\n // <NoCertIcon className={classes.certIcon} />\n // No Certificate\n // </div>\n // );\n // } else if (isValid) {\n // validity = (\n // <div className={classes.certCell}>\n // <Done className={classes.certIcon} />\n // Valid Certificate\n // </div>\n // );\n // } else {\n // validity = (\n // <div className={classes.errorCertCell}>\n // <VerifiedUser className={classes.certIcon} />\n // Invalid Certificate\n // </div>\n // );\n // }\n\n // return (\n // <React.Fragment>\n // {user.database\n // && (\n // <TableCell align=\"left\">\n // <div className={classes.certCell} style={{ textAlign: 'left' }}>\n // <DatabasesIcon className={classes.certIcon} />\n // {user.database}\n // </div>\n // </TableCell>\n // )}\n // <TableCell align=\"left\">\n // <div className={classes.certCell}>\n // {primary && <CertIcon className={classes.certIcon} />}\n // {primary}\n // </div>\n // </TableCell>\n // <TableCell align=\"left\">\n // {validity}\n // </TableCell>\n // </React.Fragment>\n // );\n // }\n // return null;\n // };\n\n const addUserForm = (\n <AddUserFormContainer\n instanceId={instanceId}\n instanceService={instanceService}\n closePopout={handleClick}\n />\n );\n\n const addUserFormButton =\n users.length === 0 ? null : (\n <SegmentClickTracker buttonName=\"Users (Instance Details)\">\n <FormToggleButton\n openForm={handleClick}\n setRef={setRef}\n label=\"USERS\"\n icon={<UsersIcon />}\n disabled={roleDisabled(userRoles, allowedUserRoles)}\n tooltip=\"Add a User\"\n />\n </SegmentClickTracker>\n );\n\n const embeddedAddUserForm =\n users.length === 0 ? (\n <Card className={classes.embeddedFormContainer}>\n <AddUserFormContainer instanceId={instanceId} instanceService={instanceService} />\n </Card>\n ) : null;\n\n const defaultUsersFilter = (user) => {\n if (\n (instanceService === 'CockroachDB' &&\n (user.username === 'admin' ||\n user.username === 'cluster_user' ||\n user.username === `_${instanceId.replace(/-/g, '_')}_cluster_admin`)) ||\n user.systemUser\n ) {\n return true;\n }\n return false;\n };\n\n const defaultUserText = (\n <div className={classes.defaultUserText}>\n <em>This is a Default user and they cannot be removed.</em>\n </div>\n );\n\n const usernameText = (user) => (\n <div className={classes.username}>\n <Hidden smDown>\n {user.username.length >= 40 ? (\n <MoreLessString lessChars={40} string={user.username} />\n ) : (\n user.username\n )}\n </Hidden>\n <Hidden mdUp>\n {user.username.length >= 20 ? (\n <MoreLessString lessChars={20} string={user.username} />\n ) : (\n user.username\n )}\n </Hidden>\n </div>\n );\n\n const defaultUserList = users.filter(defaultUsersFilter);\n const nonDefaultUserList = users.filter((user) => !defaultUsersFilter(user));\n\n /**\n * some code in both defaultUserItems and userItems\n * is being commented out for now until a refactor is done\n * for the UserList to fit the comps better in this ticket: UX-3703\n */\n\n const defaultUserItems =\n defaultUserList.length > 0 &&\n defaultUserList.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map((user) => (\n <TableRow key={user.username}>\n <TableCell align=\"left\">\n {usernameText(user)}\n {/* <Hidden mdUp> */}\n {defaultUserText}\n {/* </Hidden> */}\n </TableCell>\n {/* <Hidden smDown>\n <TableCell align=\"left\" colSpan=\"1000\">\n {defaultUserText}\n </TableCell>\n </Hidden> */}\n {/* <Hidden mdUp> */}\n <TableCell align=\"right\"> </TableCell>\n {/* </Hidden> */}\n </TableRow>\n ));\n\n const userItems = nonDefaultUserList\n .slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)\n .map((user) => (\n <TableRow key={user.username}>\n <TableCell align=\"left\">\n {usernameText(user)}\n {/* <Hidden mdUp> */}\n {mobileUserCells(user)}\n {/* </Hidden> */}\n </TableCell>\n {/* <Hidden smDown>\n {userCells(user)}\n </Hidden> */}\n <TableCell align=\"right\">\n <RBACDeleteButton\n tooltip=\"Delete User\"\n clear\n size=\"small\"\n userAccess={userRoles}\n allowedAccess={allowedUserRoles}\n onClick={() =>\n handDeleteClick(\n instanceId,\n instanceService.toLowerCase(),\n user.username,\n user.database,\n )\n }\n />\n </TableCell>\n </TableRow>\n ));\n\n const userTable =\n users.length === 0 ? null : (\n <div className={classes.tableWrapper}>\n <ORTable\n className={classes.table}\n count={users.length}\n rowsPerPage={rowsPerPage}\n page={page}\n onChangePage={handleChangePage}\n >\n <TableBody>\n {defaultUserItems}\n {userItems}\n </TableBody>\n </ORTable>\n </div>\n );\n\n return (\n <div className={classes.listContainer}>\n {embeddedAddUserForm}\n <div className={classes.addUserButtonContainer}>\n \n <div className={classes.addUserButtonWrapper}>\n {addUserFormButton}\n <PopoutItem\n anchorEl={getAnchorEl}\n handleClick={handleClick}\n handleClickAway={(e) => handleClickAway(e, anchorEl, () => setUiState({ open: false }))}\n placement=\"bottom\"\n open={open}\n >\n {addUserForm}\n </PopoutItem>\n </div>\n </div>\n {userTable}\n </div>\n );\n}\n\nUnstyledUserList.propTypes = propTypes;\nUnstyledUserList.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n caType: {\n display: 'inline-block',\n position: 'relative',\n },\n caTypeText: {\n position: 'relative',\n left: '20px',\n },\n validity: {\n position: 'relative',\n },\n validityText: {\n position: 'relative',\n left: '20px',\n },\n username: {\n [theme.breakpoints.down('sm')]: {\n paddingTop: theme.spacing(1),\n paddingLeft: theme.spacing(1),\n minHeight: 'unset',\n },\n minHeight: theme.spacing(5),\n display: 'flex',\n alignItems: 'center',\n maxWidth: 'fit-content',\n fontSize: '14px',\n },\n defaultUserText: {\n [theme.breakpoints.down('sm')]: {\n paddingTop: theme.spacing(1),\n paddingLeft: theme.spacing(1),\n },\n fontStyle: 'italic',\n fontSize: '12px',\n },\n mobileCertCell: {\n color: theme.customColors.teal,\n fontStyle: 'italic',\n fontSize: theme.typography.caption.fontSize,\n textAlign: 'left',\n },\n mobileErrorCertCell: {\n color: theme.customColors.magenta,\n fontStyle: 'italic',\n fontSize: theme.typography.caption.fontSize,\n textAlign: 'left',\n },\n mobileCertIcon: {\n height: '15px',\n position: 'absolute',\n bottom: '4px',\n },\n certCell: {\n verticalAlign: 'middle',\n color: theme.customColors.teal,\n fontStyle: 'italic',\n fontSize: theme.typography.caption.fontSize,\n textAlign: 'center',\n },\n errorCertCell: {\n verticalAlign: 'middle',\n color: theme.customColors.magenta,\n fontStyle: 'italic',\n fontSize: theme.typography.caption.fontSize,\n textAlign: 'center',\n },\n certIcon: {\n marginBottom: `-${theme.spacing(0.75)}px`,\n marginRight: theme.spacing(0.25),\n },\n embeddedFormContainer: {\n maxWidth: '900px',\n marginRight: 'auto',\n marginLeft: 'auto',\n boxShadow: '3px 5px 5px 3px rgba(216,216,216,1)',\n },\n listItemDeleteRoot: {\n color: theme.customColors.white,\n backgroundColor: theme.customColors.red,\n },\n listContainer: {\n position: 'relative',\n },\n addUserButtonContainer: {\n display: 'flex',\n justifyContent: 'space-between',\n verticalAlign: 'center',\n [theme.breakpoints.down('sm')]: {\n alignItems: 'center',\n },\n },\n userlistHeader: {\n display: 'flex',\n alignItems: 'center',\n },\n headerIcon: {\n display: 'flex',\n alignItems: 'center',\n color: theme.customColors.darkPurple,\n height: '35px',\n width: '35px',\n },\n headerText: {\n fontFamily: '\"Libre Franklin Regular\", sans-serif',\n fontSize: '21px',\n },\n table: {\n border: `1px solid ${theme.customColors.mediumGrey}`,\n },\n tableWrapper: {\n backgroundColor: theme.customColors.white,\n '& th': {\n height: 'unset',\n padding: theme.spacing(1),\n },\n '& td': {\n paddingTop: 0,\n paddingBottom: 0,\n paddingRight: 0,\n paddingLeft: theme.spacing(1),\n },\n },\n});\n\nexport const uiConfig = {\n name: 'userList',\n state: () => ({\n open: false,\n page: 0,\n rowsPerPage: 10,\n }),\n};\n\nexport default uiState(uiConfig)(withStyles(styles)(UnstyledUserList));\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport { selectors as userSelectors } from 'dux/user';\nimport { actionCreators, selectors as instanceSelectors } from '../../dux/instances';\nimport UserList from './UserList';\n\nconst propTypes = {\n instanceId: PropTypes.string.isRequired,\n instanceService: PropTypes.string.isRequired,\n getInstanceCertificates: PropTypes.func.isRequired,\n getInstanceClientCertificates: PropTypes.func.isRequired,\n getCerts: PropTypes.func.isRequired,\n getClientCerts: PropTypes.func.isRequired,\n};\n\nconst mapStateToProps = (state) => ({\n userRoles: userSelectors.getIdentityState(state).roles,\n getCerts: instanceSelectors.getCerts(state),\n getClientCerts: instanceSelectors.getClientCerts(state),\n});\n\nconst mapDispatchToProps = {\n getInstanceCertificates: actionCreators.getInstanceCertificates,\n getInstanceClientCertificates: actionCreators.getInstanceClientCertificates,\n deleteInstanceUser: actionCreators.deleteInstanceUser,\n};\n\nclass UserListContainer extends React.Component {\n componentDidMount() {\n const {\n instanceId,\n instanceService,\n getInstanceCertificates,\n getInstanceClientCertificates,\n } = this.props;\n\n if (\n instanceService.toLowerCase() === 'cockroachdb' ||\n instanceService.toLowerCase() === 'mongodb'\n ) {\n getInstanceCertificates(instanceService, instanceId);\n getInstanceClientCertificates(instanceService, instanceId);\n }\n }\n\n render() {\n const { instanceId, getCerts, getClientCerts } = this.props;\n const certs = getCerts(instanceId);\n const clientCerts = getClientCerts(instanceId);\n return <UserList certs={certs} clientCerts={clientCerts} {...this.props} />;\n }\n}\n\nUserListContainer.propTypes = propTypes;\n\nexport default connect(mapStateToProps, mapDispatchToProps)(UserListContainer);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport UserListContainer from '../../../../UserList/UserListContainer';\n\nconst propTypes = {\n users: PropTypes.instanceOf(Array),\n service: PropTypes.string.isRequired,\n id: PropTypes.string.isRequired,\n};\n\nconst defaultProps = {\n users: [],\n};\n\nexport function UnstyledUsersTab({ users, service, id }) {\n return <UserListContainer users={users} instanceService={service} instanceId={id} />;\n}\n\nUnstyledUsersTab.propTypes = propTypes;\nUnstyledUsersTab.defaultProps = defaultProps;\n\nexport default UnstyledUsersTab;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core';\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\nimport { Field, reduxForm } from 'redux-form';\nimport { required } from 'services/validationMsgs';\nimport WrappedTextField from 'components/WrappedTextField/WrappedTextField';\nimport { uiState } from 'react-redux-ui-state';\nimport RBACDeleteButton from 'components/RBACWrapper/RBACDeleteButton/RBACDeleteButton';\nimport roleDisabled from 'services/roleDisabled/index';\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport { OWNER, ADMIN, OR_ADMIN, OR_SUPERUSER } from 'constants/roles';\n\nconst propTypes = {\n id: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n service: PropTypes.string.isRequired,\n deleteInstance: PropTypes.func.isRequired,\n history: PropTypes.shape({}).isRequired,\n classes: PropTypes.shape({}).isRequired,\n setUiState: PropTypes.func.isRequired,\n instanceToDelete: PropTypes.string.isRequired,\n userRoles: PropTypes.arrayOf(PropTypes.string).isRequired,\n};\n\nexport function UnstyledDeleteSection({\n id,\n name,\n service,\n deleteInstance,\n history,\n classes,\n setUiState,\n instanceToDelete,\n userRoles,\n}) {\n const redirectToInstances = () => history.push('/mission-ctrl/instances');\n const updateInstanceToDelete = (instance) =>\n setUiState({\n instanceToDelete: instance,\n });\n const instanceNameMatch = () => instanceToDelete !== name;\n const allowedUserRoles = [OWNER, ADMIN, OR_ADMIN, OR_SUPERUSER];\n\n return (\n <Card elevation={0} className={classes.dangerCard}>\n <CardContent className={classes.dangerCardContent}>\n <ORTypography component=\"h2\" variant=\"h5\">\n Remove Instance\n </ORTypography>\n <ORTypography className={classes.dangerText}>\n Confirm that you want to delete this instance by entering the name below\n </ORTypography>\n <div className={classes.form}>\n <Field\n name=\"name\"\n label=\"Instance Name (Case Sensitive)\"\n placeholder=\"Instance Name\"\n variant=\"outlined\"\n props={{\n InputLabelProps: {\n shrink: true,\n className: classes.inputLabel,\n },\n }}\n validate={[required]}\n onChange={(event) => updateInstanceToDelete(event.target.value)}\n component={WrappedTextField}\n className={classes.nameField}\n fullWidth\n disabled={roleDisabled(userRoles, allowedUserRoles)}\n />\n <div className={classes.deleteButtonContainer}>\n <RBACDeleteButton\n size=\"medium\"\n userAccess={userRoles}\n allowedAccess={allowedUserRoles}\n invalidField={instanceNameMatch()}\n onClick={() => deleteInstance(id, service.toLowerCase(), redirectToInstances)}\n classes={{ listItemDeleteRoot: classes.makeSquared }}\n />\n </div>\n </div>\n </CardContent>\n </Card>\n );\n}\n\nUnstyledDeleteSection.propTypes = propTypes;\n\nconst styles = (theme) => ({\n dangerCard: {\n border: `1px solid ${theme.customColors.lightGrey}`,\n borderRadius: 0,\n },\n dangerCardContent: {\n display: 'flex',\n flexFlow: 'column nowrap',\n justifyContent: 'space-between',\n marginBottom: theme.spacing(4),\n\n [theme.breakpoints.down('sm')]: {\n marginBottom: theme.spacing(1),\n },\n },\n dangerText: {\n color: '#6C6D6D',\n font: 'italic 12px Roboto',\n },\n deleteButtonContainer: {\n display: 'flex',\n\n [theme.breakpoints.down('sm')]: {\n justifyContent: 'flex-end',\n },\n },\n deleteButton: {\n backgroundColor: theme.customColors.red,\n color: theme.customColors.white,\n },\n form: {\n display: 'flex',\n flexFlow: 'row nowrap',\n flex: '1 0 100%',\n '& > *': {\n marginTop: '1.5rem',\n marginLeft: theme.spacing(0.5),\n },\n\n [theme.breakpoints.down('sm')]: {\n flexFlow: 'column wrap',\n },\n },\n inputLabel: {\n color: theme.palette.text.primary,\n },\n nameField: {\n width: '95%',\n '& label': {\n color: theme.customColors.black,\n },\n marginTop: theme.spacing(2),\n\n [theme.breakpoints.down('sm')]: {\n width: '100%',\n },\n },\n makeSquared: {\n borderRadius: '4px',\n },\n});\n\nexport const uiConfig = {\n name: 'instanceDeleteItem',\n state: () => ({\n instanceToDelete: '',\n }),\n};\n\nexport default uiState(uiConfig)(\n withStyles(styles)(reduxForm({ form: 'customConfig' })(UnstyledDeleteSection)),\n);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core';\nimport TextField from '@material-ui/core/TextField';\nimport MenuItem from '@material-ui/core/MenuItem';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n catalogConfigurations: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n addConfig: PropTypes.func.isRequired,\n};\n\nexport function UnstyledSettingsDropDown({ classes, catalogConfigurations, addConfig }) {\n return (\n <TextField\n name=\"config\"\n label=\"Add Configuration Option\"\n placeholder=\"Select configuration\"\n variant=\"outlined\"\n select\n value={0}\n className={classes.nameField}\n fullWidth\n onChange={(event) => addConfig(event.target.value)}\n >\n <MenuItem value=\"0\" disabled>\n {catalogConfigurations && catalogConfigurations.length\n ? 'Configuration Option'\n : 'There are no Configurations to add'}\n </MenuItem>\n {catalogConfigurations.map((item) => (\n <MenuItem key={item.name} value={item.name}>\n {item.name}\n {item.restartRequired ? '*' : null}\n </MenuItem>\n ))}\n </TextField>\n );\n}\n\nUnstyledSettingsDropDown.propTypes = propTypes;\n\nconst styles = (theme) => ({\n listContent: {\n paddingLeft: '0px',\n paddingRight: '0px',\n },\n inputLabel: {\n color: theme.palette.text.primary,\n },\n nameField: {\n '& label': {\n color: theme.customColors.black,\n },\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n },\n});\n\nexport default withStyles(styles)(UnstyledSettingsDropDown);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core';\nimport Card from '@material-ui/core/Card';\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport MorePropTypes from 'airbnb-prop-types';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport TableCell from '@material-ui/core/TableCell';\nimport RBACDeleteButton from 'components/RBACWrapper/RBACDeleteButton/RBACDeleteButton';\nimport TextField from '@material-ui/core/TextField';\n\nconst propTypes = {\n keyName: PropTypes.string.isRequired,\n addConfig: PropTypes.func.isRequired,\n deleteConfig: PropTypes.func.isRequired,\n catalogItem: PropTypes.shape({\n name: PropTypes.string.isRequired,\n description: PropTypes.string.isRequired,\n restartRequired: PropTypes.bool.isRequired,\n }),\n classes: PropTypes.shape({}).isRequired,\n error: MorePropTypes.or([MorePropTypes.explicitNull, PropTypes.string, PropTypes.shape({})]),\n keyValue: MorePropTypes.or([PropTypes.string, PropTypes.number]).isRequired,\n};\n\nconst defaultProps = {\n error: null,\n catalogItem: null,\n};\n\nexport function UnstyledSettingsRowItem({\n classes,\n keyName,\n keyValue,\n error,\n catalogItem,\n addConfig,\n deleteConfig,\n}) {\n const errorElm = error ? (\n <ORTypography color=\"error\" className={classes.formStatus}>\n {error}\n </ORTypography>\n ) : null;\n\n const restartStarTitle = (restart) =>\n restart ? (\n <ORTypography className={classes.configKeyText}>\n {catalogItem.name}\n \n <span style={{ color: 'red' }}>*</span>\n </ORTypography>\n ) : (\n <ORTypography className={classes.configKeyText}>{catalogItem.name}</ORTypography>\n );\n\n const fieldDataType = (cfg) => {\n switch (cfg.value.type) {\n case 'integer':\n return (\n <TextField\n name={keyName}\n type=\"number\"\n variant=\"outlined\"\n className={classes.field}\n fullWidth\n value={keyValue}\n onChange={(e) => addConfig(keyName, parseInt(e.target.value, 10))}\n />\n );\n default:\n // string or enum\n if ('enum' in cfg.value) {\n return (\n <TextField\n name={keyName}\n variant=\"outlined\"\n className={classes.field}\n select\n fullWidth\n value={keyValue || cfg.value.enum[0]}\n onChange={(e) => addConfig(keyName, e.target.value)}\n >\n {cfg.value.enum.map((option) => (\n <MenuItem key={option} value={option}>\n {option}\n </MenuItem>\n ))}\n </TextField>\n );\n }\n return (\n <TextField\n name={keyName}\n variant=\"outlined\"\n className={classes.field}\n fullWidth\n value={keyValue}\n onChange={(e) => addConfig(keyName, e.target.value)}\n />\n );\n }\n };\n\n if (!catalogItem) {\n return (\n <Card elevation={0} className={classes.card}>\n {keyName}\n IS NOT PROPERLY SEEDED IN THE CONFIGURATION CATALOG\n </Card>\n );\n }\n\n const restart = catalogItem.restartRequired;\n\n return (\n <React.Fragment>\n <div className={classes.row}>\n <TableCell classes={{ root: classes.cellLeft }} flex=\"auto\">\n {restartStarTitle(restart)}\n </TableCell>\n <TableCell classes={{ root: classes.cellMiddle }} flex=\"auto\">\n <div className={classes.nameField}>\n {fieldDataType(catalogItem)}\n {errorElm}\n </div>\n </TableCell>\n <TableCell classes={{ root: classes.cellRight }}>\n <RBACDeleteButton\n size=\"medium\"\n classes={{ listItemDeleteRoot: classes.makeSquared }}\n onClick={() => deleteConfig(keyName)}\n />\n </TableCell>\n </div>\n </React.Fragment>\n );\n}\n\nUnstyledSettingsRowItem.propTypes = propTypes;\nUnstyledSettingsRowItem.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n field: {\n backgroundColor: 'white',\n },\n clearButton: {\n color: theme.customColors.red,\n backgroundColor: 'inherit',\n boxShadow: 'none',\n '&:hover': {\n backgroundColor: 'inherit',\n },\n },\n configKeyText: {\n fontFamily: theme.typography.altTitle.fontFamily,\n fontWeight: theme.typography.altTitle.fontWeight,\n fontSize: '16px',\n color: '#231F20',\n },\n cellLeft: {\n display: 'flex',\n alignItems: 'center',\n flex: '40%',\n paddingRight: '0px',\n },\n cellMiddle: {\n flex: '55%',\n paddingRight: '0px',\n },\n cellRight: {\n flex: '5%',\n display: 'flex',\n alignItems: 'center',\n margin: 'auto',\n paddingRight: '8px',\n paddingLeft: '6px',\n },\n row: {\n display: 'flex',\n justifyContent: 'flex-end',\n },\n makeSquared: {\n borderRadius: '4px',\n },\n});\n\nexport default withStyles(styles)(UnstyledSettingsRowItem);\n","import React, { useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core';\nimport { uiState } from 'react-redux-ui-state';\nimport TableBody from '@material-ui/core/TableBody';\nimport TableRow from '@material-ui/core/TableRow';\nimport TableContainer from '@material-ui/core/TableContainer';\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport Collapse from '@material-ui/core/Collapse';\nimport CardActions from '@material-ui/core/CardActions';\nimport Button from '@material-ui/core/Button';\nimport SettingsDropDown from './SettingsDropDown/SettingsDropDown';\nimport SettingsRowItem from './SettingsRowItem/SettingsRowItem';\nimport FlagEnabled from '../../../../../FlagEnabled/FlagEnabledContainer';\nimport ORTable from '../../../../../ORTable/ORTable';\nimport ORTypography from '../../../../../ORTypography/ORTypography';\n\n// Django converts dictionary keys from sneak_case to camelCase,\n// so we lower case everything and remove underscore with this function.\n// NOTE: str.replace only changes first occurrence but in cases\n// with_multiple_occurrences RegExp is necessary with the `greed` flag.\nconst fixCase = (name) => name.toLowerCase().replace(RegExp('_', 'g'), '');\n\nexport const removeUsedItems = (catalogConfigurations, instanceConfig) => {\n const tempInstanceConfig = Object.keys(instanceConfig).map((item) => fixCase(item));\n return catalogConfigurations.filter((item) => tempInstanceConfig.indexOf(fixCase(item.name)) < 0);\n};\n\nexport const filterCfg = (catalog, keyName) =>\n catalog.filter((config) => fixCase(config.name) === fixCase(keyName));\n\nconst propTypes = {\n id: PropTypes.string.isRequired,\n setUiState: PropTypes.func.isRequired,\n classes: PropTypes.shape({}).isRequired,\n serviceSubtype: PropTypes.string.isRequired,\n service: PropTypes.string.isRequired,\n instanceSettings: PropTypes.shape({\n datastoreConfigurations: PropTypes.shape({}),\n }).isRequired,\n catalogConfigurations: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n getCatalogConfiguration: PropTypes.func.isRequired,\n setInstanceConfiguration: PropTypes.func.isRequired,\n flags: PropTypes.shape({}),\n newConfig: PropTypes.shape({}).isRequired,\n};\n\nconst defaultProps = {\n flags: {\n settings: false,\n },\n};\n\nconst allowConfig = ['timescaledb_cluster', 'postgresql_cluster', 'elasticsearch_cluster'];\n\nexport function UnstyledConfigSection({\n id,\n classes,\n serviceSubtype,\n instanceSettings,\n flags,\n catalogConfigurations,\n service,\n getCatalogConfiguration,\n setInstanceConfiguration,\n setUiState,\n newConfig,\n}) {\n useEffect(() => {\n getCatalogConfiguration(serviceSubtype);\n }, [serviceSubtype, getCatalogConfiguration]);\n\n if (allowConfig.indexOf(serviceSubtype.toLowerCase()) < 0) {\n return null;\n }\n\n let activeSettings = {};\n if (instanceSettings.datastoreConfigurations) {\n activeSettings = { ...instanceSettings.datastoreConfigurations };\n }\n\n /* new values at the bottom, so editing a value can change an old value */\n const oldAndNewSettings = { ...activeSettings, ...newConfig };\n\n const filteredUnusedCatalogConfig = removeUsedItems(catalogConfigurations, oldAndNewSettings);\n\n const addConfig = (keyName, keyValue = null) => {\n // If an item is added for the first time, set keyValue to null and we will automatically\n // get the default value, thus we implemented the reading of the default for multiple types.\n // If the item is edited, then set keyValue to desired value and we will ignore default value.\n setUiState({\n newConfig: {\n ...newConfig /* Allow multiple configurations to be pending confirmation */,\n [keyName]:\n keyValue ||\n filterCfg(catalogConfigurations, keyName)[0].value.default ||\n filterCfg(catalogConfigurations, keyName)[0].value.enum[0],\n },\n });\n };\n\n const clear = () => {\n setUiState({\n newConfig: {},\n });\n };\n\n const save = (items2save) => {\n // Delete will triggers the save with all old(active items) minus the deleted item since we\n // don't want to patch the new items because those should only be sent on confirmation - witch\n // calls save ALL cfgs to save the merge between new(unsaved items) and\n // old(active items configuration); that is oldAndNewSettings\n const tempData = { settings: { datastoreConfigurations: { ...items2save } } };\n setInstanceConfiguration(id, service, tempData);\n };\n\n const deleteConfig = (keyName) => {\n // The key is an item that was never saved or it is being edited\n if (keyName in newConfig) {\n const temp = { ...newConfig };\n delete temp[keyName];\n setUiState({\n newConfig: { ...temp },\n });\n }\n // The key is an item that was active in the instance\n if (keyName in activeSettings) {\n activeSettings[keyName] = null;\n save(activeSettings);\n }\n };\n\n const subtitleWithStar = (\n <ORTypography className={classes.subHeader}>\n Configurations marked with an asterisk (<span style={{ color: 'red' }}>*</span>) will trigger\n instance to restart\n </ORTypography>\n );\n\n const instaceSettingsTable = () => (\n <TableContainer>\n <ORTable classes={{ table: classes.table }}>\n <TableBody>\n {Object.keys(oldAndNewSettings).map((key) => (\n <TableRow key={key}>\n <SettingsRowItem\n key={key}\n keyName={key}\n keyValue={oldAndNewSettings[key]}\n initialValues={oldAndNewSettings}\n catalogItem={filterCfg(catalogConfigurations, key)[0]}\n addConfig={addConfig}\n deleteConfig={deleteConfig}\n />\n </TableRow>\n ))}\n </TableBody>\n </ORTable>\n </TableContainer>\n );\n\n return (\n <FlagEnabled flags={flags} flagKey=\"settings\">\n <div className={classes.configurationArea}>\n <div className={classes.listContainer}>\n <Card>\n <CardHeader\n title={\n <ORTypography component=\"h2\" variant=\"h5\">\n Custom Configuration\n </ORTypography>\n }\n subheader={subtitleWithStar}\n />\n\n {/* Dropdown With Catalog configuration */}\n <CardContent>\n <SettingsDropDown\n catalogConfigurations={filteredUnusedCatalogConfig}\n addConfig={addConfig}\n />\n </CardContent>\n\n {/* Table with configuration items in use or being edited */}\n <CardContent className={classes.tableContent}>{instaceSettingsTable()}</CardContent>\n\n {/* Confirm/Cancel section */}\n <Collapse in={Object.keys(newConfig).length > 0} timeout={1500}>\n <CardActions>\n <Button\n name=\"cancel\"\n className={classes.cancelButton}\n onClick={clear}\n variant=\"contained\"\n >\n CANCEL\n </Button>\n <Button\n name=\"cancel\"\n className={classes.confirmButton}\n onClick={() => save(oldAndNewSettings)}\n variant=\"contained\"\n >\n CONFIRM\n </Button>\n </CardActions>\n </Collapse>\n </Card>\n </div>\n </div>\n </FlagEnabled>\n );\n}\n\nUnstyledConfigSection.propTypes = propTypes;\nUnstyledConfigSection.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n table: {\n border: 'unset',\n borderRadius: 'unset',\n },\n subHeader: {\n color: '#6C6D6D',\n font: 'italic 12px Roboto',\n },\n listContainer: {\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n alignItems: 'normal',\n },\n configurationArea: {\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(2),\n },\n tableContent: {\n paddingLeft: '0px',\n paddingRight: '0px',\n paddingBottom: '0px !important',\n },\n cancelButton: {\n flexGrow: 0.1,\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n color: theme.customColors.white,\n backgroundColor: theme.customColors.teal,\n '&:hover': {\n background: theme.customColors.teal,\n },\n },\n confirmButton: {\n flexGrow: 0.1,\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n color: theme.customColors.white,\n backgroundColor: theme.customColors.orange,\n '&:hover': {\n background: theme.customColors.orange,\n },\n },\n});\n\nexport const uiConfig = {\n name: 'ConfigSection',\n state: () => ({\n newConfig: {},\n }),\n};\n\nexport default uiState(uiConfig)(withStyles(styles)(UnstyledConfigSection));\n","import { connect } from 'react-redux';\n\nimport { actionCreators, selectors } from 'dux/catalog';\nimport { selectors as flagSelectors } from 'dux/user';\nimport { actionCreators as ac } from 'dux/instances';\nimport ConfigSection from './ConfigSection';\n\nconst mapStateToProps = (state) => ({\n catalogConfigurations: selectors.getConfigurationState(state).configurations,\n flags: flagSelectors.getFeatureFlagsState(state, true).flags,\n});\n\nconst mapDispatchToProps = {\n getCatalogConfiguration: actionCreators.getConfiguration,\n setInstanceConfiguration: ac.setInstanceConfiguration,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ConfigSection);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport DeleteSection from './DeleteSection/DeleteSection';\nimport ConfigSection from './ConfigSection/ConfigSectionContainer';\n\nconst propTypes = {\n id: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n service: PropTypes.string.isRequired,\n deleteInstance: PropTypes.func.isRequired,\n history: PropTypes.shape({}).isRequired,\n userRoles: PropTypes.arrayOf(PropTypes.string).isRequired,\n settings: PropTypes.shape({}).isRequired,\n serviceSubtype: PropTypes.string.isRequired,\n};\n\nexport function UnstyledSettingsTab({ id, service, serviceSubtype, settings, ...props }) {\n return (\n <React.Fragment>\n <ConfigSection\n id={id}\n service={service}\n instanceSettings={settings}\n serviceSubtype={serviceSubtype}\n />\n\n <DeleteSection id={id} service={service} {...props} />\n </React.Fragment>\n );\n}\n\nUnstyledSettingsTab.propTypes = propTypes;\n\nexport default UnstyledSettingsTab;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogContentText from '@material-ui/core/DialogContentText';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport Button from '@material-ui/core/Button';\n\nconst propTypes = {\n open: PropTypes.bool.isRequired,\n message: PropTypes.string.isRequired,\n onCancel: PropTypes.func.isRequired,\n onOk: PropTypes.func.isRequired,\n};\n\nexport function UnstyledORAlert({ open, message, onCancel, onOk }) {\n return (\n <Dialog open={open} maxWidth=\"sm\">\n <DialogContent>\n <DialogContentText>{message}</DialogContentText>\n </DialogContent>\n <DialogActions>\n <Button color=\"secondary\" onClick={onCancel}>\n Cancel\n </Button>\n <Button color=\"primary\" onClick={onOk}>\n OK\n </Button>\n </DialogActions>\n </Dialog>\n );\n}\n\nUnstyledORAlert.propTypes = propTypes;\n\nexport default UnstyledORAlert;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { uiState } from 'react-redux-ui-state';\nimport { withStyles } from '@material-ui/core';\nimport Hidden from '@material-ui/core/Hidden';\nimport Lock from '@material-ui/icons/Lock';\nimport TableBody from '@material-ui/core/TableBody';\nimport TableCell from '@material-ui/core/TableCell';\nimport TableHead from '@material-ui/core/TableHead';\nimport TableRow from '@material-ui/core/TableRow';\nimport Card from '@material-ui/core/Card';\n\nimport ORAlert from 'components/ORAlert/ORAlert';\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport RBACDeleteButton from 'components/RBACWrapper/RBACDeleteButton/RBACDeleteButton';\nimport SegmentClickTracker from 'components/SegmentClickTracker/SegmentClickTrackerContainer';\nimport roleDisabled from 'services/roleDisabled/index';\nimport { OWNER, ADMIN, OR_ADMIN, OR_SUPERUSER } from 'constants/roles';\nimport ACL_KINDS from '../../constants/aclKinds';\nimport AclFormContainer from '../AclForm/AclFormContainer';\nimport FormToggleButton from '../FormToggleButton/FormToggleButton';\nimport ORTable from '../ORTable/ORTable';\nimport PopoutItem from '../PopoutItem/PopoutItem';\nimport { handleClickAway } from '../../services/handleClickAway/index';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n acls: PropTypes.instanceOf(Array).isRequired,\n open: PropTypes.bool.isRequired,\n setUiState: PropTypes.func.isRequired,\n deleteInstanceAcl: PropTypes.func.isRequired,\n instanceService: PropTypes.string.isRequired,\n instanceId: PropTypes.string.isRequired,\n userRoles: PropTypes.arrayOf(PropTypes.string).isRequired,\n page: PropTypes.number.isRequired,\n rowsPerPage: PropTypes.number.isRequired,\n};\n\nexport function UnstyledAclList({\n acls,\n open,\n setUiState,\n classes,\n deleteInstanceAcl,\n instanceService,\n instanceId,\n userRoles,\n page,\n rowsPerPage,\n}) {\n const [deleteConfirmationOpen, setDeleteConfirmationOpen] = React.useState(false);\n const [aclToDelete, setAclToDelete] = React.useState(null);\n\n function handleDeleteButtonClick(acl) {\n setDeleteConfirmationOpen(true);\n setAclToDelete(() => acl);\n }\n\n function handleConfirmationOk() {\n deleteInstanceAcl(instanceService, instanceId, aclToDelete.id);\n setDeleteConfirmationOpen(false);\n }\n\n function handleConfirmationCancel() {\n setDeleteConfirmationOpen(false);\n setAclToDelete(null);\n }\n\n function handleChangePage(event, newPage) {\n setUiState({\n page: newPage,\n });\n }\n\n const allowedUserRoles = [OWNER, ADMIN, OR_ADMIN, OR_SUPERUSER];\n let anchorEl;\n function handleClick() {\n setUiState({\n open: !open,\n });\n }\n\n const setRef = (node) => {\n anchorEl = node;\n };\n\n const getAnchorEl = () => anchorEl;\n\n const aclForm = (\n <AclFormContainer\n instanceService={instanceService}\n instanceId={instanceId}\n newInstanceAcls={acls}\n closePopout={handleClick}\n />\n );\n\n const aclFormButton =\n acls.length === 0 ? null : (\n <SegmentClickTracker buttonName=\"Firewall (Instance Details)\">\n <FormToggleButton\n openForm={handleClick}\n setRef={setRef}\n label=\"Firewall\"\n icon={<Lock />}\n disabled={roleDisabled(userRoles, allowedUserRoles)}\n />\n </SegmentClickTracker>\n );\n\n const embeddedAclForm =\n acls.length === 0 ? (\n <Card className={classes.embeddedAclFormContainer}>\n <AclFormContainer\n instanceService={instanceService}\n instanceId={instanceId}\n newInstanceAcls={acls}\n formType=\"embedded\"\n />\n </Card>\n ) : null;\n\n const aclRows = acls.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map((acl) => (\n <TableRow key={acl.id}>\n <Hidden smDown>\n <TableCell component=\"td\" scope=\"row\">\n {acl.name}\n {acl.cidr === '0.0.0.0/0' && (\n <ORTypography component=\"p\" className={classes.openAclWarning}>\n 0.0.0.0/0 ACLs can be dangerous, as they allow anyone to attempt to log into your\n instance. Please ensure you're using strong passwords and/or narrow your ACLs to\n trusted ranges.\n </ORTypography>\n )}\n </TableCell>\n <TableCell\n style={{ verticalAlign: acl.cidr === '0.0.0.0/0' ? 'top' : 'middle' }}\n align=\"left\"\n >\n {acl.cidr}\n </TableCell>\n <TableCell\n style={{ verticalAlign: acl.cidr === '0.0.0.0/0' ? 'top' : 'middle' }}\n align=\"left\"\n >\n {acl.kind === 1 || typeof ACL_KINDS[acl.kind] === 'undefined'\n ? ''\n : ACL_KINDS[acl.kind].label}\n </TableCell>\n </Hidden>\n <Hidden mdUp>\n <TableCell component=\"td\" scope=\"row\">\n {acl.name}\n <br />\n {acl.cidr}\n <br />\n {acl.kind === 1 || typeof ACL_KINDS[acl.kind] === 'undefined'\n ? ''\n : ACL_KINDS[acl.kind].label}\n {acl.cidr === '0.0.0.0/0' && (\n <ORTypography component=\"p\" className={classes.openAclWarning}>\n 0.0.0.0/0 ACLs can be dangerous, as they allow anyone to attempt to log into your\n instance. Please ensure you're using strong passwords and/or narrow your ACLs to\n trusted ranges.\n </ORTypography>\n )}\n </TableCell>\n </Hidden>\n <TableCell style={{ paddingBottom: acl.cidr === '0.0.0.0/0' ? '25px' : '8px' }} align=\"right\">\n <RBACDeleteButton\n size=\"small\"\n userAccess={userRoles}\n allowedAccess={allowedUserRoles}\n onClick={() => handleDeleteButtonClick(acl)}\n />\n </TableCell>\n </TableRow>\n ));\n\n const aclTable =\n acls.length === 0 ? null : (\n <div className={classes.tableWrapper}>\n <ORTable\n count={acls.length}\n rowsPerPage={rowsPerPage}\n page={page}\n onChangePage={handleChangePage}\n >\n <Hidden smDown>\n <TableHead>\n <TableRow>\n <TableCell>Name</TableCell>\n <TableCell>CIDR</TableCell>\n <TableCell>Role</TableCell>\n <TableCell />\n </TableRow>\n </TableHead>\n </Hidden>\n <Hidden mdUp>\n <TableHead>\n <TableRow>\n <TableCell>ACL</TableCell>\n <TableCell />\n </TableRow>\n </TableHead>\n </Hidden>\n <TableBody>{aclRows}</TableBody>\n </ORTable>\n </div>\n );\n\n return (\n <React.Fragment>\n <ORAlert\n open={deleteConfirmationOpen}\n message={`Are you sure you want to delete the Firewall IP ${\n aclToDelete ? aclToDelete.name : ''\n }? This action cannot be undone.`}\n onOk={handleConfirmationOk}\n onCancel={handleConfirmationCancel}\n />\n <div className={classes.listContainer}>\n {embeddedAclForm}\n <div className={classes.ipButtonContainer}>\n {aclFormButton}\n <PopoutItem\n anchorEl={getAnchorEl}\n handleClick={handleClick}\n handleClickAway={(e) => handleClickAway(e, anchorEl, () => setUiState({ open: false }))}\n placement=\"bottom\"\n open={open}\n >\n {aclForm}\n </PopoutItem>\n </div>\n {aclTable}\n </div>\n </React.Fragment>\n );\n}\n\nUnstyledAclList.propTypes = propTypes;\n\nconst styles = (theme) => ({\n embeddedAclFormContainer: {\n maxWidth: '900px',\n marginRight: 'auto',\n marginLeft: 'auto',\n boxShadow: '3px 5px 5px 3px rgba(216,216,216,1)',\n },\n listItemDeleteRoot: {\n color: theme.customColors.white,\n backgroundColor: theme.customColors.red,\n },\n listContainer: {\n position: 'relative',\n },\n ipButtonContainer: {\n display: 'flex',\n justifyContent: 'flex-end',\n verticalAlign: 'center',\n [theme.breakpoints.down('sm')]: {\n alignItems: 'center',\n },\n },\n tableWrapper: {\n '& th': {\n height: '20px',\n paddingTop: '15px',\n paddingBottom: '5px',\n },\n '& td': {\n padding: theme.spacing(1),\n },\n '& td:first-child': {\n paddingLeft: theme.spacing(2),\n },\n },\n openAclWarning: {\n color: theme.customColors.red,\n fontStyle: 'italic',\n fontSize: '.8rem',\n marginTop: theme.spacing(1),\n maxWidth: '500px',\n },\n});\n\nexport const uiConfig = {\n name: 'aclList',\n state: () => ({\n open: false,\n page: 0,\n rowsPerPage: 10,\n }),\n};\nexport default uiState(uiConfig)(withStyles(styles)(UnstyledAclList));\n","import { connect } from 'react-redux';\nimport { selectors as userSelectors } from 'dux/user';\nimport { actionCreators } from '../../dux/instances';\nimport AclList from './AclList';\n\nconst mapStateToProps = (state) => ({\n userRoles: userSelectors.getIdentityState(state).roles,\n});\n\nconst mapDispatchToProps = {\n deleteInstanceAcl: actionCreators.deleteInstanceAcl,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(AclList);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core';\nimport AclListContainer from 'components/AclList/AclListContainer';\n\nconst propTypes = {\n acls: PropTypes.instanceOf(Array),\n service: PropTypes.string.isRequired,\n id: PropTypes.string.isRequired,\n};\n\nconst defaultProps = {\n acls: [],\n};\n\nexport function UnstyledAclTab({ acls, service, id, classes }) {\n return (\n <div className={classes.aclContainer}>\n <AclListContainer acls={acls} instanceService={service} instanceId={id} />\n </div>\n );\n}\n\nUnstyledAclTab.propTypes = propTypes;\nUnstyledAclTab.defaultProps = defaultProps;\n\nconst styles = () => ({\n aclContainer: {\n padding: '20px 8px',\n },\n});\n\nexport default withStyles(styles)(UnstyledAclTab);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { uiState } from 'react-redux-ui-state';\nimport { withStyles } from '@material-ui/core';\nimport Storage from '@material-ui/icons/Storage';\nimport TableBody from '@material-ui/core/TableBody';\nimport TableRow from '@material-ui/core/TableRow';\nimport TableCell from '@material-ui/core/TableCell';\nimport Card from '@material-ui/core/Card';\n\nimport roleDisabled from 'services/roleDisabled/index';\nimport RBACDeleteButton from 'components/RBACWrapper/RBACDeleteButton/RBACDeleteButton';\nimport { OWNER, ADMIN, OR_ADMIN, OR_SUPERUSER } from 'constants/roles';\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport UserInstanceButtonItem from 'components/MissionCtrl/InstancesPage/InstanceItem/UserInstanceButtonItem/UserInstanceButtonItem';\nimport ORAlert from 'components/ORAlert/ORAlert';\nimport LoadingPlaceholder from 'components/LoadingPlaceholder/LoadingPlaceholder';\nimport AddDatabaseFormContainer from '../AddDatabaseForm/AddDatabaseFormContainer';\nimport FormToggleButton from '../FormToggleButton/FormToggleButton';\nimport PopoutItem from '../PopoutItem/PopoutItem';\nimport ORTable from '../ORTable/ORTable';\nimport { handleClickAway } from '../../services/handleClickAway/index';\n\nconst propTypes = {\n databases: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n classes: PropTypes.shape({}).isRequired,\n instanceId: PropTypes.string.isRequired,\n deleteInstanceDatabase: PropTypes.func.isRequired,\n setUiState: PropTypes.func.isRequired,\n open: PropTypes.bool.isRequired,\n userRoles: PropTypes.arrayOf(PropTypes.string).isRequired,\n page: PropTypes.number.isRequired,\n rowsPerPage: PropTypes.number.isRequired,\n service: PropTypes.string.isRequired,\n deleteConfirmationDialogOpen: PropTypes.bool.isRequired,\n databaseToDelete: PropTypes.string.isRequired,\n instanceDatabaseIsLoading: PropTypes.bool.isRequired,\n};\n\nexport function UnstyledDatabaseList({\n classes,\n databases,\n instanceId,\n deleteInstanceDatabase,\n setUiState,\n open,\n userRoles,\n page,\n rowsPerPage,\n service,\n deleteConfirmationDialogOpen,\n databaseToDelete,\n instanceDatabaseIsLoading,\n}) {\n function handleChangePage(event, newPage) {\n setUiState({\n page: newPage,\n });\n }\n\n function handleDeleteConfirmation(dbName) {\n setUiState({\n deleteConfirmationDialogOpen: true,\n databaseToDelete: dbName,\n });\n }\n\n function handleDatabaseDeleteCancel() {\n setUiState({\n deleteConfirmationDialogOpen: false,\n databaseToDelete: '',\n });\n }\n\n function handleDatabaseDelete() {\n deleteInstanceDatabase(instanceId, service, databaseToDelete);\n setUiState({\n databaseToDelete: '',\n deleteConfirmationDialogOpen: false,\n });\n }\n\n const allowedUserRoles = [OWNER, ADMIN, OR_ADMIN, OR_SUPERUSER];\n let anchorEl;\n const handleClick = () => {\n setUiState({\n open: !open,\n });\n };\n\n const getAnchorEl = () => anchorEl;\n\n const setRef = (node) => {\n anchorEl = node;\n };\n\n const addDatabaseForm = (\n <AddDatabaseFormContainer instanceId={instanceId} service={service} closePopout={handleClick} />\n );\n\n const addDatabaseFormButton =\n databases.length === 0 ? null : (\n <FormToggleButton\n openForm={handleClick}\n setRef={setRef}\n label=\"ADD A NEW DATABASE\"\n tooltip=\"Add Database\"\n icon={<Storage />}\n disabled={roleDisabled(userRoles, allowedUserRoles)}\n />\n );\n\n const embeddedAddDatabaseForm =\n databases.length === 0 ? (\n <Card className={classes.embeddedFormContainer}>\n <AddDatabaseFormContainer service={service} instanceId={instanceId} />\n </Card>\n ) : null;\n\n const boldText = (text) => (\n <strong>\n {text}\n : \n </strong>\n );\n\n const databaseItems = databases\n .slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)\n .map((database) => {\n const dbName = database.name || database.db; // For keys CRDB uses name, Mongo uses db\n return (\n <TableRow key={dbName} style={{ verticalAlign: 'top' }}>\n <TableCell classes={{ root: classes.tableCellRoot }} align=\"left\">\n <ORTypography className={classes.dbName} align=\"left\" variant=\"h6\">\n {dbName}\n </ORTypography>\n {service.toLowerCase() === 'mongodb' && (\n <div className={classes.dbDetails}>\n {database.collections && (\n <React.Fragment>\n {boldText('Collections')}\n {database.collections}\n <br />\n </React.Fragment>\n )}\n {database.objects && (\n <React.Fragment>\n {boldText('Objects')}\n {database.objects}\n <br />\n </React.Fragment>\n )}\n {database.indexes && (\n <React.Fragment>\n {boldText('Index Count')}\n {database.indexes}\n <br />\n </React.Fragment>\n )}\n {database.indexSize && (\n <React.Fragment>\n {boldText('Index Size')}\n {database.indexSize / 1024}\n KiB\n <br />\n </React.Fragment>\n )}\n {database.dataSize && (\n <React.Fragment>\n {boldText('Data Size')}\n {database.dataSize}\n Bytes\n <br />\n </React.Fragment>\n )}\n {database.storageSize && (\n <React.Fragment>\n {boldText('Storage Size')}\n {database.storageSize / 1024}\n KiB\n <br />\n </React.Fragment>\n )}\n {database.avgObjSize && (\n <React.Fragment>\n {boldText('Avg Object Size')}\n {database.avgObjSize}\n Bytes\n <br />\n </React.Fragment>\n )}\n {database.fsTotalSize && (\n <React.Fragment>\n {boldText('File Size')}\n {database.fsTotalSize / 1048576}\n MiB\n </React.Fragment>\n )}\n </div>\n )}\n </TableCell>\n <TableCell classes={{ root: classes.tableCellRootIcon }} align=\"right\">\n <div className={classes.buttonContainer}>\n {service.toLowerCase() === 'mongodb' && (\n <div className={classes.tooltipContainer}>\n <UserInstanceButtonItem\n key=\"userforminstancebtn\"\n instanceService={service}\n instanceId={instanceId}\n parentDb={dbName}\n noLabel\n customClasses={{\n popout: {\n width: '40px',\n height: '40px',\n padding: '7px',\n boxShadow: 'none',\n },\n buttonContainer: {\n display: 'block',\n maxWidth: '40px',\n },\n button: {\n minWidth: 'unset',\n marginBottom: '1rem',\n },\n }}\n />\n </div>\n )}\n <div>\n <RBACDeleteButton\n tooltip=\"Delete Database\"\n size=\"small\"\n userAccess={userRoles}\n allowedAccess={allowedUserRoles}\n onClick={() => handleDeleteConfirmation(dbName)}\n />\n </div>\n </div>\n </TableCell>\n </TableRow>\n );\n });\n\n const databaseTable =\n databases.length === 0 ? null : (\n <div className={classes.tableWrapper}>\n <ORTable\n count={databases.length}\n rowsPerPage={rowsPerPage}\n page={page}\n onChangePage={handleChangePage}\n >\n <TableBody>\n {databaseItems}\n {instanceDatabaseIsLoading ? (\n <TableRow>\n <LoadingPlaceholder />\n </TableRow>\n ) : null}\n </TableBody>\n </ORTable>\n </div>\n );\n\n return (\n <div className={classes.listContainer}>\n <ORAlert\n open={deleteConfirmationDialogOpen}\n onOk={handleDatabaseDelete}\n onCancel={handleDatabaseDeleteCancel}\n message={`Please confirm that you want to delete the database ${databaseToDelete}. All data will be permanently lost.`}\n />\n {embeddedAddDatabaseForm}\n <div className={classes.addDatabaseButtonContainer}>\n \n <div className={classes.addDatabaseButtonWrapper}>\n {addDatabaseFormButton}\n <PopoutItem\n anchorEl={getAnchorEl}\n handleClick={handleClick}\n handleClickAway={(e) => handleClickAway(e, anchorEl, () => setUiState({ open: false }))}\n placement=\"bottom\"\n open={open}\n >\n {addDatabaseForm}\n </PopoutItem>\n </div>\n </div>\n {databaseTable}\n </div>\n );\n}\n\nUnstyledDatabaseList.propTypes = propTypes;\n\nconst styles = (theme) => ({\n buttonContainer: {\n display: 'flex',\n flexDirection: 'column',\n },\n tooltipContainer: {\n display: 'flex',\n alignSelf: 'flex-end',\n },\n dbName: {\n fontFamily: theme.typography.altTitle.fontFamily,\n fontWeight: theme.typography.altTitle.fontWeight,\n fontSize: '18px',\n color: '#231F20',\n },\n dbDetails: {\n lineHeight: '21px',\n },\n tableCellRoot: {\n width: '75%',\n padding: '7px 8px 7px 8px',\n fontSize: '12px !important',\n },\n tableCellRootIcon: {\n width: '25%',\n padding: '7px 8px 7px 8px',\n },\n embeddedFormContainer: {\n maxWidth: '900px',\n marginRight: 'auto',\n marginLeft: 'auto',\n boxShadow: '3px 5px 5px 3px rgba(216,216,216,1)',\n },\n listItemDeleteRoot: {\n color: theme.customColors.white,\n backgroundColor: theme.customColors.red,\n },\n listContainer: {\n position: 'relative',\n },\n addDatabaseButtonContainer: {\n display: 'flex',\n justifyContent: 'space-between',\n verticalAlign: 'center',\n [theme.breakpoints.down('sm')]: {\n alignItems: 'center',\n },\n },\n addFormButtonContainer: {\n display: 'block',\n },\n tableWrapper: {\n '& th': {\n height: 'unset',\n padding: theme.spacing(1),\n },\n '& td': {\n padding: theme.spacing(1),\n },\n },\n});\n\nexport const uiConfig = {\n name: 'userList',\n state: () => ({\n open: false,\n page: 0,\n rowsPerPage: 10,\n deleteConfirmationDialogOpen: false,\n databaseToDelete: '',\n }),\n};\n\nexport default uiState(uiConfig)(withStyles(styles)(UnstyledDatabaseList));\n","import { connect } from 'react-redux';\nimport { selectors as userSelectors } from 'dux/user';\nimport { selectors as instanceSelectors } from 'dux/instances';\nimport { actionCreators } from '../../dux/instances';\nimport DatabaseList from './DatabaseList';\n\nconst mapStateToProps = (state) => ({\n userRoles: userSelectors.getIdentityState(state).roles,\n instanceDatabaseIsLoading: instanceSelectors.instanceDatabaseIsLoadingSelector(state),\n});\n\nconst mapDispatchToProps = {\n deleteInstanceDatabase: actionCreators.deleteInstanceDatabase,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(DatabaseList);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport DatabaseListContainer from 'components/DatabaseList/DatabaseListContainer';\n\nconst propTypes = {\n databases: PropTypes.instanceOf(Array),\n id: PropTypes.string.isRequired,\n service: PropTypes.string.isRequired,\n};\n\nconst defaultProps = {\n databases: [],\n};\n\nexport function UnstyledDatabasesTab({ databases, id, service }) {\n return <DatabaseListContainer service={service} databases={databases} instanceId={id} />;\n}\n\nUnstyledDatabasesTab.propTypes = propTypes;\nUnstyledDatabasesTab.defaultProps = defaultProps;\n\nexport default UnstyledDatabasesTab;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport moment from 'moment';\nimport { uiState } from 'react-redux-ui-state';\nimport { withStyles } from '@material-ui/styles';\nimport TableBody from '@material-ui/core/TableBody';\nimport TableRow from '@material-ui/core/TableRow';\nimport TableCell from '@material-ui/core/TableCell';\nimport Done from '@material-ui/icons/Done';\nimport NotificationImportant from '@material-ui/icons/NotificationImportant';\nimport ErrorOutline from '@material-ui/icons/ErrorOutline';\nimport TableHead from '@material-ui/core/TableHead';\n\nimport ORTable from 'components/ORTable/ORTable';\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport ConnectWarning from 'components/MissionCtrl/InstancesPage/InstanceDetail/ConnectTab/ConnectWarning/ConnectWarning';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n instanceId: PropTypes.string.isRequired,\n instanceService: PropTypes.string.isRequired,\n backups: PropTypes.instanceOf(Array),\n page: PropTypes.number.isRequired,\n rowsPerPage: PropTypes.number.isRequired,\n setUiState: PropTypes.func.isRequired,\n pitrBackupInfo: PropTypes.shape({\n message: PropTypes.string,\n lastSnapshotTimeStamp: PropTypes.string,\n lastPitrChunkTimeStamp: PropTypes.string,\n state: PropTypes.string,\n status: PropTypes.number,\n }),\n};\n\nconst defaultProps = {\n backups: [],\n pitrBackupInfo: {},\n};\n\nconst styles = (theme) => ({\n emptyBackupsMsg: {\n textAlign: 'center',\n },\n tableCellRoot: {\n width: '75%',\n padding: '7px 8px 7px 8px',\n fontSize: '12px !important',\n },\n tableCellRootIcon: {\n width: '25%',\n padding: '7px 8px 7px 8px',\n },\n tableHeader: {\n '& th': {\n height: '20px',\n padding: '15px 8px 5px 8px',\n },\n },\n notificationText: {\n color: theme.customColors.red,\n fontStyle: 'italic',\n width: '100%',\n fontSize: '10px !important',\n },\n successText: {\n color: theme.palette.secondary.main,\n },\n warningText: {\n color: theme.palette.warning.main,\n },\n criticalText: {\n color: theme.palette.error.main,\n },\n unknownText: {\n color: theme.customColors.gray,\n },\n checkmarkRoot: {\n color: theme.palette.secondary.main,\n float: 'right',\n fontSize: '2rem',\n },\n notificationRoot: {\n color: theme.customColors.red,\n float: 'right',\n fontSize: '2rem',\n },\n estimateRoot: {\n color: theme.customColors.burntYellow,\n float: 'right',\n fontSize: '2rem',\n },\n pitrBackupInfo: {\n margin: \"16px 0\",\n padding: \"8px\",\n boxShadow: \"4px 5px 5px 0px rgb(216 216 216)\",\n borderRadius: \"4px\",\n backgroundColor: theme.customColors.lightGrey,\n }\n});\n\nexport function UnstyledBackupList({\n classes,\n backups,\n page,\n rowsPerPage,\n instanceService,\n setUiState,\n pitrBackupInfo,\n}) {\n function handleChangePage(event, newPage) {\n setUiState({\n page: newPage,\n });\n }\n\n const noBackups = (\n <ORTypography component=\"p\" className={classes.emptyBackupsMsg}>\n You have no backups. If you need a backup restored, please contact \n <a href=\"https://objectrocket.zendesk.com/hc/en-us\" target=\"_blank\" rel=\"noopener noreferrer\">\n support\n </a>\n .\n </ORTypography>\n );\n\n const notificationText = (\n <span className={classes.notificationText}>\n This backup is experiencing delays. Support is currently working on fixing the error. \n <a href=\"https://objectrocket.zendesk.com/hc/en-us\" target=\"_blank\" rel=\"noopener noreferrer\">\n View the Zendesk Ticket\n </a>\n .\n </span>\n );\n\n const successText = <span className={classes.successText}>Success</span>;\n\n const boldText = (text) => (\n <strong>\n {text}\n : \n </strong>\n );\n\n const backupItems = backups\n .slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)\n .map((backup) => {\n const start = moment.utc(backup.start).format('YYYY/MM/DD h:mm:ss A z');\n const end = backup.end === null ? '(TBD)' : moment.utc(backup.end).format('YYYY/MM/DD h:mm:ss A z');\n const { id } = backup;\n\n return (\n <TableRow key={id} style={{ verticalAlign: 'top' }}>\n <TableCell classes={{ root: classes.tableCellRoot }} align=\"left\">\n {boldText('Backup ID')}\n {id}\n <br />\n {boldText('Start')}\n {start}\n <br />\n {boldText('End')}\n {end}\n <br />\n {boldText('Status')}\n {backup.status !== 2 ? notificationText : successText}\n <br />\n </TableCell>\n <TableCell classes={{ root: classes.tableCellRootIcon }} align=\"center\">\n {backup.status === 1 && (\n <ErrorOutline classes={{ root: classes.estimateRoot }} fontSize=\"large\" />\n )}\n {backup.status === 2 && (\n <Done classes={{ root: classes.checkmarkRoot }} fontSize=\"large\" />\n )}\n {backup.status === 3 && (\n <NotificationImportant\n classes={{ root: classes.notificationRoot }}\n fontSize=\"large\"\n />\n )}\n </TableCell>\n </TableRow>\n );\n });\n\n const mongoDbPitrBanner = (\n <ConnectWarning>\n <ORTypography variant=\"altSubheading\">\n MongoDB Point-In-Time-Recovery backups\n </ORTypography>\n <ORTypography variant=\"caption\">\n <p>\n In addition to full backups, ObjectRocket also provides Point-In-Time-Recovery (PITR)\n backups, which are enabled by default. With PITR enabled, the operations log (an internal\n MongoDB log of all operations performed on the shard, also called oplog slices or chunks)\n will be backed up every 10 minutes, concurrently, from each shard.\n </p>\n </ORTypography>\n <ORTypography variant=\"caption\">\n <p>\n Visit the {' '}\n <a\n href=\"https://docs.objectrocket.com/mongodb_backup_and_recovery_cloud.html?#backups\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n documentation\n </a> to learn more about MongoDB Backups.\n </p>\n </ORTypography>\n </ConnectWarning>\n );\n\n const pitrNotificationText = (\n <span className={classes.notificationText}>Backup information currently unavailable</span>\n );\n\n const status = (pitrStatus) => {\n switch (pitrStatus) {\n case 0:\n return successText;\n case 1:\n return <span className={classes.warningText}>Warning</span>;\n case 2:\n return <span className={classes.criticalText}>Critical</span>;\n case null:\n return pitrNotificationText;\n default:\n return <span className={classes.unknownText}>Unknown</span>;\n }\n};\n\n const lastSnapshotTimeStamp = pitrBackupInfo.lastSnapshotTimeStamp === undefined ? '' : moment.utc(pitrBackupInfo.lastSnapshotTimeStamp).format('YYYY/MM/DD h:mm:ss A z');\n const lastPitrChunkTimeStamp = pitrBackupInfo.lastPitrChunkTimeStamp === undefined ? '' : moment.utc(pitrBackupInfo.lastPitrChunkTimeStamp).format('YYYY/MM/DD h:mm:ss A z');\n\n const mongoDbPitrBackupInfo = (\n <div className={classes.pitrBackupInfo} id=\"pitrBackupInfo\">\n <ORTypography variant=\"altSubheading\">Point-In-Time-Recovery Backup Details</ORTypography>\n <ORTypography variant=\"caption\">\n <div>\n {boldText('Last Full backup timestamp')}\n {lastSnapshotTimeStamp}\n <br />\n {boldText('Last PITR chunk timestamp')}\n {lastPitrChunkTimeStamp}\n <br />\n {boldText('Status')}\n {status(pitrBackupInfo.status)}\n </div>\n </ORTypography>\n </div>\n );\n\n const backupTabPitrInfo = (\n <div>\n {instanceService === \"MongoDB\" ? mongoDbPitrBanner : null}\n {instanceService === \"MongoDB\" ? mongoDbPitrBackupInfo : null}\n </div>\n )\n\n const backupTable =\n backups.length === 0 ? (\n <div>{noBackups}{backupTabPitrInfo}</div>\n ) : (\n <div>\n {backupTabPitrInfo}\n <ORTable\n count={backups.length}\n rowsPerPage={rowsPerPage}\n page={page}\n onChangePage={handleChangePage}\n >\n <TableHead classes={{ root: classes.tableHeader }}>\n <TableRow>\n <TableCell>Backup Details</TableCell>\n </TableRow>\n </TableHead>\n <TableBody>{backupItems}</TableBody>\n </ORTable>\n </div>\n );\n\n return backupTable;\n}\n\nUnstyledBackupList.propTypes = propTypes;\nUnstyledBackupList.defaultProps = defaultProps;\n\nexport const uiConfig = {\n name: 'backupsTable',\n state: () => ({\n page: 0,\n rowsPerPage: 10,\n }),\n};\n\nexport default uiState(uiConfig)(withStyles(styles)(UnstyledBackupList));\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\n\nimport { actionCreators } from 'dux/instances';\nimport BackupList from './BackupList';\n\nconst propTypes = {\n instanceId: PropTypes.string.isRequired,\n instanceService: PropTypes.string.isRequired,\n getBackups: PropTypes.func.isRequired,\n backups: PropTypes.instanceOf(Array).isRequired,\n getPitrBackupStatus: PropTypes.func.isRequired,\n pitrBackupInfo: PropTypes.shape({\n message: PropTypes.string,\n lastSnapshotTimeStamp: PropTypes.string,\n lastPitrChunkTimeStamp: PropTypes.string,\n state: PropTypes.number,\n status: PropTypes.string,\n }),\n};\n\nclass BackupListContainer extends React.Component {\n componentDidMount() {\n const { instanceId, instanceService, getBackups, getPitrBackupStatus } = this.props;\n getBackups(instanceId, instanceService);\n if (instanceService === \"MongoDB\") {\n getPitrBackupStatus(instanceId, instanceService);\n }\n }\n\n render() {\n return <BackupList {...this.props} />;\n }\n}\n\nBackupListContainer.propTypes = propTypes;\nBackupListContainer.defaultProps = {\n pitrBackupInfo: {},\n};\n\nconst mapDispatchToProps = {\n getBackups: actionCreators.getBackups,\n getPitrBackupStatus: actionCreators.getPitrBackupStatus,\n};\n\nexport default connect(null, mapDispatchToProps)(BackupListContainer);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport BackupListContainer from 'components/BackupList/BackupListContainer';\n\nconst propTypes = {\n service: PropTypes.string.isRequired,\n id: PropTypes.string.isRequired,\n backups: PropTypes.instanceOf(Array),\n pitrBackupInfo: PropTypes.shape({\n message: PropTypes.string,\n lastSnapshotTimeStamp: PropTypes.string,\n lastPitrChunkTimeStamp: PropTypes.string,\n state: PropTypes.number,\n status: PropTypes.string,\n }),\n};\n\nconst defaultProps = {\n backups: [],\n pitrBackupInfo: {},\n};\n\nexport function UnstyledBackupsTab({ service, id, backups, pitrBackupInfo }) {\n return (\n <BackupListContainer\n backups={backups}\n instanceService={service}\n instanceId={id}\n pitrBackupInfo={pitrBackupInfo}\n />\n );\n}\n\nUnstyledBackupsTab.propTypes = propTypes;\nUnstyledBackupsTab.defaultProps = defaultProps;\n\nexport default UnstyledBackupsTab;\n","const SERVICES_WITH_NODE_SCALING = {\n Elasticsearch: {\n dedicated_master: {\n minQuantity: 3,\n maxQuantity: 3,\n },\n elasticsearch: {\n minQuantity: 1,\n maxQuantity: 5,\n },\n },\n CockroachDB: {\n cockroachdb: {\n minQuantity: 3,\n maxQuantity: 8,\n },\n },\n};\n\nexport default SERVICES_WITH_NODE_SCALING;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Language from '@material-ui/icons/Language';\nimport Table from '@material-ui/core/Table';\nimport TableCell from '@material-ui/core/TableCell';\nimport TableRow from '@material-ui/core/TableRow';\nimport TableBody from '@material-ui/core/TableBody';\nimport Divider from '@material-ui/core/Divider';\nimport Hidden from '@material-ui/core/Hidden';\n\nimport ORAlert from 'components/ORAlert/ORAlert';\nimport RBACDeleteButton from 'components/RBACWrapper/RBACDeleteButton/RBACDeleteButton';\nimport { withStyles } from '@material-ui/core';\nimport { OWNER, ADMIN, OR_ADMIN, OR_SUPERUSER } from 'constants/roles';\nimport SERVICES_WITH_NODE_SCALING from 'constants/servicesWithNodeScaling';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n region: PropTypes.string.isRequired,\n hosts: PropTypes.arrayOf(\n PropTypes.shape({\n memoryMb: PropTypes.number,\n }),\n ).isRequired,\n userRoles: PropTypes.arrayOf(PropTypes.string).isRequired,\n changeNodeQuantity: PropTypes.func.isRequired,\n instanceId: PropTypes.string.isRequired,\n service: PropTypes.string.isRequired,\n statusDisplay: PropTypes.string.isRequired,\n};\n\nexport function UnstyledNodeList({\n classes,\n region,\n hosts,\n userRoles,\n changeNodeQuantity,\n service,\n instanceId,\n statusDisplay,\n}) {\n const [deleteConfirmationOpen, setDeleteConfirmationOpen] = React.useState(false);\n const [desiredQuantity, setDesiredQuantity] = React.useState(0);\n const [role, setRole] = React.useState(null);\n const nodeWord = desiredQuantity === 1 ? 'node' : 'nodes';\n\n const handleDeleteClick = (newQuantity, newRole) => {\n setDeleteConfirmationOpen(true);\n setDesiredQuantity(newQuantity);\n setRole(newRole);\n };\n const handleConfirmationOk = () => {\n changeNodeQuantity(service, instanceId, JSON.stringify({ desiredQuantity, role }));\n setDeleteConfirmationOpen(false);\n };\n const handleConfirmationCancel = () => {\n setDeleteConfirmationOpen(false);\n };\n\n const allowedUserRoles = [OWNER, ADMIN, OR_ADMIN, OR_SUPERUSER];\n\n const renderTooltipText = (host) => {\n let text = '';\n if (!SERVICES_WITH_NODE_SCALING[service]) {\n text = 'Removing Nodes is not available for this service';\n } else if (\n host.quantity === SERVICES_WITH_NODE_SCALING[service][host.role].minQuantity &&\n statusDisplay === 'Ready'\n ) {\n text = 'You cannot go below the minimum node count';\n } else if (statusDisplay !== 'Ready') {\n text = 'Please wait for the cluster to be ready before removing additional nodes.';\n }\n return text;\n };\n\n const determineInvalidDeleteField = (host) => {\n if (\n !SERVICES_WITH_NODE_SCALING[service] ||\n host.quantity === SERVICES_WITH_NODE_SCALING[service][host.role].minQuantity ||\n statusDisplay !== 'Ready'\n ) {\n return true;\n }\n return false;\n };\n\n const nodeListItemsMobile = hosts.map((host) => {\n const usageText = `${host.diskSizeGb}GB Storage / ${host.memoryMb}MB Memory`;\n const tooltipText = renderTooltipText(host);\n const invalidDeleteField = determineInvalidDeleteField(host);\n\n return [...Array(host.quantity).keys()].map((num) => (\n <TableRow classes={{ root: classes.rowRoot }} key={num}>\n <TableCell classes={{ root: classes.nameText }} align=\"left\">\n Node \n {num + 1}\n <br />\n <span className={classes.textMobile}>{usageText}</span>\n <br />\n <Language color=\"secondary\" className={classes.languageIcon} />\n <span className={classes.textMobile}>{region}</span>\n </TableCell>\n <TableCell classes={{ root: classes.deleteIcon }} align=\"right\">\n <RBACDeleteButton\n size=\"small\"\n classes={{ listItemDeleteRoot: classes.makeSquared }}\n userAccess={userRoles}\n allowedAccess={allowedUserRoles}\n onClick={() => handleDeleteClick(host.quantity - 1, host.role)}\n invalidField={invalidDeleteField}\n tooltip={tooltipText}\n />\n </TableCell>\n </TableRow>\n ));\n });\n\n const nodeListItems = hosts.map((host) => {\n const usageText = `${host.diskSizeGb}GB Storage / ${host.memoryMb}MB Memory`;\n const tooltipText = renderTooltipText(host);\n const invalidDeleteField = determineInvalidDeleteField(host);\n\n return [...Array(host.quantity).keys()].map((num) => (\n <TableRow classes={{ root: classes.rowRoot }} key={num}>\n <TableCell classes={{ root: classes.nameText }}>\n Node \n {num + 1}\n </TableCell>\n <TableCell classes={{ root: classes.storageText }}>{usageText}</TableCell>\n <TableCell classes={{ root: classes.regionText }}>\n <Language color=\"secondary\" className={classes.languageIcon} />\n {region}\n </TableCell>\n <TableCell classes={{ root: classes.deleteIcon }} align=\"right\">\n <RBACDeleteButton\n classes={{ listItemDeleteRoot: classes.makeSquared }}\n size=\"small\"\n userAccess={userRoles}\n allowedAccess={allowedUserRoles}\n onClick={() => handleDeleteClick(host.quantity - 1, host.role)}\n invalidField={invalidDeleteField}\n tooltip={tooltipText}\n />\n </TableCell>\n </TableRow>\n ));\n });\n\n return (\n <React.Fragment>\n <Divider classes={{ root: classes.divider }} />\n <Table>\n <TableBody>\n <Hidden smDown>{nodeListItems}</Hidden>\n <Hidden mdUp>{nodeListItemsMobile}</Hidden>\n </TableBody>\n </Table>\n <ORAlert\n open={deleteConfirmationOpen}\n message={`You’ve selected to scale down from ${\n desiredQuantity + 1\n } to ${desiredQuantity} ${nodeWord}. This action cannot be undone.`}\n onOk={handleConfirmationOk}\n onCancel={handleConfirmationCancel}\n />\n </React.Fragment>\n );\n}\n\nconst styles = (theme) => ({\n secondaryListRoot: {\n right: 0,\n },\n divider: {\n width: '100%',\n borderTop: `1px solid ${theme.customColors.mediumGrey}`,\n },\n listGutters: {\n paddingLeft: '0',\n },\n listRoot: {\n padding: '0',\n margin: '0',\n },\n languageIcon: {\n verticalAlign: 'middle',\n marginRight: theme.spacing(0.5),\n },\n rowRoot: {\n borderColor: theme.customColors.mediumGrey,\n },\n nameText: {\n paddingLeft: 0,\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n borderBottom: `1px solid ${theme.customColors.mediumGrey}`,\n },\n regionText: {\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n color: theme.customColors.mediumGrey,\n borderBottom: `1px solid ${theme.customColors.mediumGrey}`,\n },\n storageText: {\n paddingRight: 0,\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n color: theme.customColors.mediumGrey,\n borderBottom: `1px solid ${theme.customColors.mediumGrey}`,\n },\n deleteIcon: {\n paddingRight: 0,\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n borderBottom: `1px solid ${theme.customColors.mediumGrey}`,\n },\n textMobile: {\n color: theme.customColors.mediumGrey,\n },\n makeSquared: {\n borderRadius: '4px',\n },\n});\n\nUnstyledNodeList.propTypes = propTypes;\n\nexport default withStyles(styles)(UnstyledNodeList);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport Grid from '@material-ui/core/Grid';\nimport Divider from '@material-ui/core/Divider';\nimport Hidden from '@material-ui/core/Hidden';\nimport Button from '@material-ui/core/Button';\nimport LinearProgress from '@material-ui/core/LinearProgress';\nimport { Field, reduxForm } from 'redux-form';\n\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport NodeList from 'components/NodeList/NodeList';\nimport SERVICES_WITH_NODE_SCALING from 'constants/servicesWithNodeScaling';\nimport WrappedTextField from 'components/WrappedTextField/WrappedTextField';\nimport { bytesToGB } from 'services/conversions';\n\nconst propTypes = {\n spaceUsage: PropTypes.shape({\n nodes: PropTypes.instanceOf(Array),\n spaceUsed: PropTypes.number.isRequired,\n }),\n classes: PropTypes.shape({}).isRequired,\n region: PropTypes.string.isRequired,\n hosts: PropTypes.arrayOf(\n PropTypes.shape({\n memoryMb: PropTypes.number,\n role: PropTypes.string,\n }),\n ).isRequired,\n id: PropTypes.string.isRequired,\n service: PropTypes.string.isRequired,\n statusDisplay: PropTypes.string.isRequired,\n userRoles: PropTypes.arrayOf(PropTypes.string).isRequired,\n changeNodeQuantity: PropTypes.func.isRequired,\n};\n\nconst defaultProps = {\n spaceUsage: {\n nodes: [],\n },\n};\n\nexport function UnstyledNodesTab({\n classes,\n region,\n hosts,\n id,\n service,\n statusDisplay,\n userRoles,\n changeNodeQuantity,\n spaceUsage,\n}) {\n const physicalHosts = hosts.filter(\n (host) => host.diskSizeGb !== 0 && host.role !== 'cockroachdb_admin',\n );\n const [selectedHost, selectHost] = React.useState(physicalHosts[0] ? physicalHosts[0].role : 0);\n const [displayHost, toggleDisplayHost] = React.useState(true);\n const [selectedNodeQuantity, selectNodeQuantity] = React.useState(0);\n\n const handleSelection = (event) => {\n selectHost(event.target.value);\n selectNodeQuantity(0);\n };\n\n const handleConfirm = () => {\n changeNodeQuantity(service, id, selectedNodeQuantity);\n selectNodeQuantity(0);\n };\n\n const showDedicatedMasterOption =\n service === 'Elasticsearch' && !physicalHosts.some((host) => host.role === 'dedicated_master');\n\n let displayHosts = physicalHosts.filter((host) => host.role === selectedHost);\n\n if (showDedicatedMasterOption && selectedHost === 'dedicated_master') {\n displayHosts = [\n {\n diskSizeGb: 0,\n quantity: 0,\n memoryMb: 0,\n role: 'dedicated_master',\n },\n ];\n }\n\n const dedicatedMasterOption = (\n <MenuItem value=\"dedicated_master\">Add Dedicated Master Nodes</MenuItem>\n );\n\n const displayRole = (role) =>\n role\n .split('_')\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n\n const hostOptions = physicalHosts.map((host) => {\n const displayText = `${host.quantity} Node${host.quantity > 1 ? 's' : ''}, ${\n host.diskSizeGb\n }GB Storage/${host.memoryMb}MB Memory each`;\n return (\n <MenuItem value={host.role} key={host.id}>\n {displayRole(host.role)}\n <Hidden mdUp>\n <br />\n {displayHost && displayText}\n </Hidden>\n <Hidden smDown>{displayHost && `: ${displayText}`}</Hidden>\n </MenuItem>\n );\n });\n\n let addNodeQuantityRemainder;\n let addNodeQuantityOptions;\n let defaultAddNodeMenuOption;\n const validHost =\n SERVICES_WITH_NODE_SCALING[service] && SERVICES_WITH_NODE_SCALING[service][selectedHost]; // eslint-disable-line max-len\n const selectedHostMaxQuantity = validHost\n ? SERVICES_WITH_NODE_SCALING[service][selectedHost].maxQuantity\n : 0; // eslint-disable-line max-len\n\n const validDedicatedMasterAddonOptions = [\n {\n desiredQuantity: 3,\n role: selectedHost,\n desiredPerNodeMemoryMb: 2048,\n desiredPerNodeDiskSizeGb: 8,\n },\n {\n desiredQuantity: 3,\n role: selectedHost,\n desiredPerNodeMemoryMb: 4096,\n desiredPerNodeDiskSizeGb: 16,\n },\n {\n desiredQuantity: 3,\n role: selectedHost,\n desiredPerNodeMemoryMb: 8192,\n desiredPerNodeDiskSizeGb: 32,\n },\n ];\n\n // this if statement helps services without scaling from breaking the nodes tab\n if (validHost) {\n if (selectedHost === 'dedicated_master') {\n // the option variable here is one of the objects from validDedicatedMasterAddonOptions\n // it needs to be stringified or it comes back as [Object object] and MUI throws an error\n addNodeQuantityOptions = validDedicatedMasterAddonOptions.map((option, index) => (\n <MenuItem value={JSON.stringify(option)} key={index.toString()}>\n 3X \n {option.desiredPerNodeMemoryMb / 1024}\n GB RAM/\n {option.desiredPerNodeDiskSizeGb}\n GB Disk\n </MenuItem>\n ));\n } else {\n addNodeQuantityRemainder = [\n ...Array(selectedHostMaxQuantity - displayHosts[0].quantity).keys(),\n ];\n // the option variable here is just a number (0 should be the first number), not an object\n addNodeQuantityOptions = addNodeQuantityRemainder.map((option, index) => (\n <MenuItem\n value={JSON.stringify({\n desiredQuantity: option + 1 + displayHosts[0].quantity,\n role: selectedHost,\n })} // eslint-disable-line max-len\n key={index.toString()}\n >\n {option + 1}\n </MenuItem>\n ));\n }\n if (statusDisplay !== 'Ready') {\n defaultAddNodeMenuOption =\n 'Please wait for the cluster to be ready before adding additional nodes.';\n } else if (selectedHost === 'dedicated_master' && showDedicatedMasterOption) {\n defaultAddNodeMenuOption = 'Please select an option for your dedicated master nodes.';\n } else if (selectedHostMaxQuantity > displayHosts[0].quantity) {\n defaultAddNodeMenuOption = 'How many nodes would you like to add?';\n } else if (selectedHostMaxQuantity === displayHosts[0].quantity) {\n defaultAddNodeMenuOption = 'You have reached the maximum number of nodes.';\n }\n }\n\n const filteredNodesSpaceUsage = () => {\n const reducer = (accumulator, currentValue) => accumulator + currentValue.spaceUsed;\n let spaceUsed = spaceUsage.nodes.reduce(reducer, 0);\n if (service === 'Elasticsearch') {\n spaceUsed = spaceUsage.nodes\n .filter((node) =>\n node.name.includes(\n selectedHost === 'dedicated_master' ? 'es-dedicated-master' : selectedHost,\n ),\n )\n .reduce(reducer, 0);\n }\n return bytesToGB(spaceUsed).toFixed(2);\n };\n\n return (\n <div className={classes.pageContainer}>\n <div className={classes.titleContainer}>\n <ORTypography component=\"h2\" variant=\"h5\">\n Manage and Scale Nodes\n </ORTypography>\n </div>\n <Divider classes={{ root: classes.divider }} variant=\"fullWidth\" />\n <Grid container classes={{ container: classes.nodeContainer }}>\n <Grid item container xs={12} md={12} classes={{ item: classes.nodePanel }}>\n {physicalHosts.length > 0 && (\n <Field\n name=\"nodes_class\"\n label=\"Node Class\"\n variant=\"outlined\"\n select\n props={{\n InputLabelProps: {\n shrink: true,\n className: classes.inputLabel,\n },\n }}\n SelectProps={{\n value: selectedHost,\n onOpen: () => toggleDisplayHost(false),\n onClose: () => toggleDisplayHost(true),\n IconComponent: ExpandMoreIcon,\n }}\n component={WrappedTextField}\n className={classes.formControl}\n fullWidth\n onChange={handleSelection}\n >\n {hostOptions}\n {showDedicatedMasterOption && dedicatedMasterOption}\n </Field>\n )}\n <div className={classes.textPanel}>\n <ORTypography component=\"span\" className={classes.textContent} variant=\"subtitle1\">\n You have \n <strong>\n {displayHosts.length > 0 ? displayHosts[0].quantity : 0}\n \n {displayHosts.length > 0 && displayHosts[0].quantity > 1 ? 'Nodes' : 'Node'}\n with \n {displayHosts.length > 0 ? displayHosts[0].diskSizeGb : 0}\n GB Storage/\n {displayHosts.length > 0 && displayHosts[0].memoryMb}\n MB Memory \n </strong>\n each. You are currently using \n <strong>\n {spaceUsage.nodes.length > 0 ? filteredNodesSpaceUsage(service) : 0}\n GB of \n {/* eslint-disable-next-line max-len */}\n {displayHosts.length > 0\n ? displayHosts[0].diskSizeGb * displayHosts[0].quantity\n : 0}\n GB storage.\n </strong>\n </ORTypography>\n {showDedicatedMasterOption && selectedHost === 'dedicated_master' && (\n <React.Fragment>\n <br />\n <ORTypography component=\"span\" className={classes.textContent} variant=\"subtitle1\">\n <strong>Please add nodes to get started.</strong>\n </ORTypography>\n </React.Fragment>\n )}\n </div>\n <NodeList\n instanceId={id}\n service={service}\n region={region}\n hosts={displayHosts}\n userRoles={userRoles}\n changeNodeQuantity={changeNodeQuantity}\n statusDisplay={statusDisplay}\n />\n </Grid>\n {validHost && (\n <Grid item container xs={12} md={12} classes={{ item: classes.nodePanel }}>\n <ORTypography component=\"h4\" variant=\"h6\">\n Add Nodes\n </ORTypography>\n <div className={classes.textPanel}>\n <ORTypography component=\"span\" className={classes.textContent} variant=\"subtitle1\">\n You can add multiple nodes to scale horizontally and each will have the same storage\n and memory as your current nodes. After confirming, \n {service}\n will utilize the new resources as soon as they connect.\n </ORTypography>\n </div>\n <Field\n name=\"add_nodes\"\n label=\"Add Nodes\"\n placeholder=\"How many nodes would you like to add?\"\n variant=\"outlined\"\n select\n disabled={\n !(selectedHostMaxQuantity > displayHosts[0].quantity) || statusDisplay !== 'Ready'\n }\n props={{\n InputLabelProps: {\n shrink: true,\n className: classes.inputLabel,\n },\n }}\n SelectProps={{\n displayEmpty: true,\n value: selectedNodeQuantity,\n IconComponent: ExpandMoreIcon,\n }}\n component={WrappedTextField}\n className={classes.formControl}\n fullWidth\n onChange={(event) => selectNodeQuantity(event.target.value)}\n >\n <MenuItem value=\"0\" disabled>\n {defaultAddNodeMenuOption}\n </MenuItem>\n {addNodeQuantityOptions}\n </Field>\n <div className={classes.buttonContainer}>\n <Button\n className={classes.nodeActionButton}\n variant=\"contained\"\n color=\"secondary\"\n onClick={() => selectNodeQuantity(0)}\n disabled={\n selectedNodeQuantity < 1 ||\n selectedHostMaxQuantity === displayHosts[0].quantity ||\n statusDisplay !== 'Ready'\n }\n >\n Cancel\n </Button>\n <Button\n className={classes.nodeActionButton}\n variant=\"contained\"\n color=\"primary\"\n onClick={handleConfirm}\n disabled={\n selectedNodeQuantity < 1 ||\n selectedHostMaxQuantity === displayHosts[0].quantity ||\n statusDisplay !== 'Ready'\n }\n >\n {(statusDisplay === 'Update Requested' || statusDisplay === 'Updating') && (\n <LinearProgress\n classes={{\n root: classes.progress,\n colorPrimary: classes.progressPrimary,\n bar: classes.progressSecondary,\n }}\n /> // eslint-disable-line max-len\n )}\n {statusDisplay === 'Update Requested' || statusDisplay === 'Updating'\n ? 'Building'\n : 'Confirm and Build'}\n </Button>\n </div>\n <ORTypography\n component=\"span\"\n className={classes.billingTextContent}\n variant=\"subtitle1\"\n >\n <em>\n Any updates made here will also be applied to all Regions and your billing will be\n adjusted.\n </em>\n </ORTypography>\n </Grid>\n )}\n {/* The grid below is a placeholder for content in the very near future */}\n {/* <Grid item container xs={12} md={12} classes={{ item: classes.nodePanel }}>\n <ORTypography component=\"h4\" variant=\"h6\">Scale All Nodes</ORTypography>\n <ORTypography component=\"span\" className={classes.textContent} variant=\"subtitle1\">\n You can scale all of your nodes vertically by selectin new storage and memory \n sizes. This will effect all of your current nodes.\n </ORTypography>\n </Grid> */}\n </Grid>\n </div>\n );\n}\n\nconst styles = (theme) => ({\n formControl: {\n marginTop: theme.spacing(0.5),\n marginBottom: theme.spacing(1),\n },\n selectRoot: {\n color: theme.palette.secondary.main,\n fontSize: '14px',\n },\n titleContainer: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n\n [theme.breakpoints.down('sm')]: {\n flexDirection: 'column',\n },\n },\n regionTabs: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(3),\n color: theme.customColors.white,\n backgroundColor: theme.customColors.darkPurple,\n boxShadow: `0 ${theme.spacing(1)}px ${theme.spacing(0.5)}px -${theme.spacing(0.5)}px gray`,\n },\n indicator: {\n borderBottom: '2px solid white',\n },\n selectedTab: {\n borderBottom: '2px solid white',\n },\n legendContainer: {\n display: 'flex',\n justifyContent: 'space-between',\n },\n linearLegend: {\n fontSize: theme.typography.caption.fontSize,\n },\n nodeNumber: {\n position: 'absolute',\n top: '40%',\n width: '100%',\n textAlign: 'center',\n fontSize: '6rem',\n fontFamily: '\"Libre Franklin Regular\", sans-serif',\n zIndex: 10,\n },\n chartContainer: {\n height: '150px',\n border: '1px solid #979797',\n marginBottom: theme.spacing(2),\n marginTop: theme.spacing(1.5),\n\n [theme.breakpoints.down('sm')]: {\n margin: theme.spacing(2),\n },\n },\n chart: {\n height: '85%',\n width: '100%',\n borderBottom: '1px solid #979797',\n position: 'relative',\n },\n chartLegend: {\n fontFamily: '\"Libre Franklin Regular\", sans-serif',\n fontSize: '14px',\n textAlign: 'center',\n },\n usageBar: {\n borderTop: '1px solid #979797',\n width: '100%',\n position: 'absolute',\n bottom: 0,\n backgroundColor: theme.customColors.sky,\n },\n textContent: {\n marginTop: theme.spacing(0.5),\n marginBottom: theme.spacing(0.5),\n fontSize: theme.typography.caption.fontSize,\n '& strong': {\n color: theme.customColors.mediumGrey,\n },\n },\n billingTextContent: {\n marginTop: theme.spacing(0.5),\n marginBottom: theme.spacing(0.5),\n fontSize: theme.typography.caption.fontSize,\n '& em': {\n color: theme.customColors.magenta,\n },\n },\n nodeContainer: {\n margin: 0,\n flexDirection: 'column',\n\n [theme.breakpoints.up('md')]: {\n padding: 'unset',\n justifyContent: 'space-between',\n border: 'none',\n },\n },\n nodePanel: {\n alignSelf: 'flex-start',\n flexDirection: 'column',\n paddingBottom: theme.spacing(2),\n\n [theme.breakpoints.up('md')]: {\n padding: `0 ${theme.spacing(2.5)}px ${theme.spacing(2)}px 0`,\n },\n },\n linearBarRoot: {\n backgroundColor: theme.customColors.lightGrey,\n marginBottom: theme.spacing(2),\n },\n linearBar: {\n backgroundColor: theme.customColors.sky,\n },\n pageContainer: {\n padding: theme.spacing(1),\n backgroundColor: theme.customColors.white,\n border: `1px solid ${theme.customColors.lightGrey}`,\n },\n divider: {\n borderTop: `1px solid ${theme.customColors.mediumGrey}`,\n marginBottom: theme.spacing(2),\n marginRight: '-8px',\n marginLeft: '-8px',\n },\n textPanel: {\n marginBottom: theme.spacing(2),\n },\n inputLabel: {\n color: theme.customColors.black,\n },\n buttonContainer: {\n display: 'flex',\n flexDirection: 'column-reverse',\n\n [theme.breakpoints.up('md')]: {\n flexDirection: 'row',\n },\n },\n nodeActionButton: {\n padding: '6px 32px',\n margin: `${theme.spacing(1)}px 0`,\n\n [theme.breakpoints.up('md')]: {\n margin: `${theme.spacing(1)}px ${theme.spacing(1)}px ${theme.spacing(1)}px 0`,\n },\n '&:last-child': {\n minWidth: '191px',\n },\n },\n progress: {\n position: 'absolute',\n clear: 'both',\n left: 0,\n bottom: 0,\n width: '100%',\n borderBottomRightRadius: '4px',\n borderBottomLeftRadius: '4px',\n },\n progressPrimary: {\n backgroundColor: theme.customColors.khaki,\n },\n progressSecondary: {\n backgroundColor: theme.customColors.burntYellow,\n },\n});\n\nUnstyledNodesTab.propTypes = propTypes;\nUnstyledNodesTab.defaultProps = defaultProps;\n\nexport default withStyles(styles)(reduxForm({ form: 'addNodes' })(UnstyledNodesTab));\n","import { connect } from 'react-redux';\nimport { actionCreators, selectors } from 'dux/instances';\nimport NodesTab from './NodesTab';\n\nconst mapStateToProps = (state) => ({\n getInstanceSpaceUsage: selectors.getInstanceSpaceUsage(state),\n});\n\nconst mapDispatchToProps = {\n changeNodeQuantity: actionCreators.changeNodeQuantity,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(NodesTab);\n","import React from 'react';\nimport { withStyles } from '@material-ui/styles';\nimport PropTypes from 'prop-types';\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport AddRegionFormContainer from 'components/AddRegionForm/AddRegionFormContainer';\nimport InstanceItemContainer from 'components/MissionCtrl/InstancesPage/InstanceItem/InstanceItemContainer';\n\nconst propTypes = {\n getAssociatedCockroachDBInstances: PropTypes.func.isRequired,\n id: PropTypes.string.isRequired,\n classes: PropTypes.shape({}).isRequired,\n};\n\nexport function UnstyledRegionsTab({ getAssociatedCockroachDBInstances, id, classes, ...rest }) {\n const { catalog, service, metadata } = rest;\n const { multiInstanceId } = metadata;\n const associatedCockroachDBInstances = getAssociatedCockroachDBInstances(multiInstanceId, id);\n\n const maturity = (catalogProp, instanceService) =>\n catalogProp.servicesCatalog.services.find(\n (catalogService) => catalogService.name === instanceService,\n ).maturityLevel;\n\n const associatedCockroachDBInstancesItems = associatedCockroachDBInstances.map(\n (associatedCockroachDBInstance) => (\n <InstanceItemContainer\n {...associatedCockroachDBInstance}\n key={associatedCockroachDBInstance.id}\n classes={{ panel: classes.instanceItemContainer }}\n serviceMaturity={maturity(catalog, service)}\n />\n ),\n );\n\n return (\n <div className={classes.pageContainer}>\n <AddRegionFormContainer instanceId={id} metadata={metadata} {...rest} />\n <div className={classes.relatedBorder} />\n <div className={classes.relatedContentContainer}>\n <ORTypography>Related Instances</ORTypography>\n <ORTypography className={classes.relatedSectionHeader} component=\"h5\">\n These instances are related through the same unique Group ID.\n </ORTypography>\n {associatedCockroachDBInstancesItems}\n </div>\n </div>\n );\n}\n\nUnstyledRegionsTab.propTypes = propTypes;\n\nconst styles = (theme) => ({\n pageContainer: {\n backgroundColor: theme.customColors.white,\n border: `1px solid ${theme.customColors.lightGrey}`,\n },\n relatedBorder: {\n borderBottom: `1px solid ${theme.customColors.mediumGrey}`,\n width: '100%',\n marginBottom: theme.spacing(1.5),\n },\n relatedContentContainer: {\n paddingRight: theme.spacing(1),\n paddingLeft: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n },\n relatedSectionHeader: {\n fontSize: 12,\n marginTop: theme.spacing(0.5),\n marginBottom: theme.spacing(1),\n color: theme.customColors.mediumGrey,\n },\n instanceItemContainer: {\n '&:last-child': {\n marginBottom: '0 !important',\n },\n },\n});\n\nexport default withStyles(styles)(UnstyledRegionsTab);\n","import { selectors as catalogSelectors } from 'dux/catalog';\nimport { selectors as instanceSelectors } from 'dux/instances';\nimport { selectors as userSelectors } from 'dux/user';\nimport { actionCreators } from 'dux/createInstance';\nimport { connect } from 'react-redux';\nimport RegionsTab from './RegionsTab';\n\nconst mapStateToProps = (state) => ({\n catalog: catalogSelectors.getCatalogState(state),\n userRoles: userSelectors.getIdentityState(state).roles,\n getAssociatedCockroachDBInstances: instanceSelectors.getAssociatedCockroachDBInstances(state),\n});\n\nconst mapDispatchToProps = {\n createInstance: actionCreators.createInstance,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(RegionsTab);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core';\nimport Tab from '@material-ui/core/Tab';\nimport Tabs from '@material-ui/core/Tabs';\nimport StarIcon from '@material-ui/icons/Star';\nimport ConnectIcon from '@material-ui/icons/DeviceHub';\nimport FirewallIcon from '@material-ui/icons/Lock';\nimport UsersIcon from '@material-ui/icons/PersonAdd';\nimport SettingsIcon from '@material-ui/icons/Settings';\nimport DatabasesIcon from '@material-ui/icons/Storage';\nimport RegionsIcon from '@material-ui/icons/Language';\nimport BackupsIcon from '@material-ui/icons/SettingsBackupRestore';\nimport NodesIcon from '@material-ui/icons/Grain';\nimport Poll from 'components/Poll/Poll';\nimport { uiState } from 'react-redux-ui-state';\n\nimport LoadingPlaceHolder from 'components/LoadingPlaceholder/LoadingPlaceholder';\nimport ORContentHeader from 'components/ORContentHeader/ORContentHeader';\nimport ORContentArea from 'components/ORContentArea/ORContentArea';\nimport SERVICES_WITH_USERS from 'constants/servicesWithUsers';\nimport SERVICES_WITH_DATABASES from 'constants/servicesWithDatabases';\nimport InstanceDetailOverview from './Overview/Overview';\nimport InstanceConnectTab from './ConnectTab/ConnectTabContainer';\nimport InstanceUsersTab from './UsersTab/UsersTab';\nimport InstanceSettingsTab from './SettingsTab/SettingsTab';\nimport InstanceAclTab from './AclTab/AclTab';\nimport InstanceDatabasesTab from './DatabasesTab/DatabasesTab';\nimport InstanceBackupsTab from './BackupsTab/BackupsTab';\nimport InstanceNodesTab from './NodesTab/NodesTabContainer';\nimport InstanceRegionsTab from './RegionsTab/RegionsTabContainer';\n\nconst propTypes = {\n instances: PropTypes.PropTypes.shape({}).isRequired,\n classes: PropTypes.shape({}).isRequired,\n isLoading: PropTypes.bool.isRequired,\n match: PropTypes.shape({}).isRequired,\n tabSelectionValue: PropTypes.string.isRequired,\n setUiState: PropTypes.func.isRequired,\n deleteInstance: PropTypes.func.isRequired,\n history: PropTypes.shape({}).isRequired,\n getInstancePoll: PropTypes.func.isRequired,\n userRoles: PropTypes.arrayOf(PropTypes.string).isRequired,\n flags: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types\n getRedisMemoryCapacity: PropTypes.func.isRequired,\n};\n\nexport function UnstyledInstanceDetail(props) {\n const {\n flags,\n classes,\n isLoading,\n instances,\n match,\n tabSelectionValue,\n setUiState,\n deleteInstance,\n history,\n userRoles,\n getInstancePoll,\n getRedisMemoryCapacity,\n } = props;\n\n const {\n params: { instanceId },\n } = match;\n\n const changeTabSelection = (event, value) => {\n setUiState({\n tabSelectionValue: value,\n });\n };\n\n if (isLoading || !instances[instanceId]) {\n return <LoadingPlaceHolder />;\n }\n\n let currentDisplayedTab = null;\n\n const instance = instances[instanceId];\n\n const disabled = instance.statusDisplay !== 'Ready';\n\n const instanceService = instances[instanceId].service.toLowerCase();\n\n if (tabSelectionValue === 'overview') {\n currentDisplayedTab = (\n <React.Fragment>\n <Poll\n intervalInMS={15000}\n actionCreator={() => getInstancePoll(instanceId, instanceService)}\n />\n <InstanceDetailOverview\n {...instance}\n userRoles={userRoles}\n getRedisMemoryCapacity={getRedisMemoryCapacity}\n />\n </React.Fragment>\n );\n }\n if (tabSelectionValue === 'connect') {\n currentDisplayedTab = <InstanceConnectTab {...instance} />;\n } else if (tabSelectionValue === 'firewall') {\n currentDisplayedTab = <InstanceAclTab {...instance} />;\n } else if (tabSelectionValue === 'users') {\n currentDisplayedTab = <InstanceUsersTab {...instance} />;\n } else if (tabSelectionValue === 'settings') {\n currentDisplayedTab = (\n <InstanceSettingsTab\n {...instance}\n deleteInstance={deleteInstance}\n history={history}\n userRoles={userRoles}\n />\n );\n } else if (tabSelectionValue === 'databases') {\n currentDisplayedTab = <InstanceDatabasesTab {...instance} />;\n } else if (tabSelectionValue === 'backups') {\n currentDisplayedTab = <InstanceBackupsTab {...instance} />;\n } else if (tabSelectionValue === 'nodes') {\n currentDisplayedTab = (\n <React.Fragment>\n <Poll\n intervalInMS={15000}\n actionCreator={() => getInstancePoll(instanceId, instanceService)}\n />\n <InstanceNodesTab {...instance} userRoles={userRoles} />\n </React.Fragment>\n );\n } else if (tabSelectionValue === 'regions') {\n currentDisplayedTab = <InstanceRegionsTab {...instance} />;\n }\n\n return (\n <React.Fragment>\n <div className={classes.details}>\n <ORContentHeader hasDivider>{instance.name}</ORContentHeader>\n <ORContentArea>\n <div className={classes.tabsContainer}>\n <Tabs\n value={tabSelectionValue}\n onChange={changeTabSelection}\n variant=\"scrollable\"\n scrollButtons=\"auto\"\n classes={{\n root: classes.tabsRoot,\n indicator: classes.tabsIndicator,\n }}\n >\n <Tab\n value=\"overview\"\n label=\"Overview\"\n icon={<StarIcon />}\n className={classes.detailsTab}\n classes={{ selected: classes.tabSelected, labelIcon: classes.labelIcon }}\n />\n <Tab\n value=\"connect\"\n disabled={disabled}\n label=\"Connect\"\n icon={<ConnectIcon />}\n className={classes.detailsTab}\n classes={{\n selected: classes.tabSelected,\n disabled: classes.disabledTab,\n labelIcon: classes.labelIcon,\n }}\n />\n <Tab\n value=\"firewall\"\n disabled={disabled}\n label=\"FIREWALL\"\n icon={<FirewallIcon />}\n className={classes.detailsTab}\n classes={{\n root: classes.firewallTab,\n selected: classes.tabSelected,\n disabled: classes.disabledTab,\n labelIcon: classes.labelIcon,\n }}\n />\n\n {instanceService === 'cockroachdb' &&\n typeof instance.metadata.multiInstanceId !== 'undefined' && (\n <Tab\n value=\"regions\"\n disabled={disabled}\n label=\"Regions\"\n icon={<RegionsIcon />}\n className={classes.detailsTab}\n classes={{\n selected: classes.tabSelected,\n disabled: classes.disabledTab,\n labelIcon: classes.labelIcon,\n }}\n />\n )}\n\n {SERVICES_WITH_USERS.includes(instance.service) && (\n <Tab\n value=\"users\"\n disabled={disabled}\n label=\"Users\"\n icon={<UsersIcon />}\n className={classes.detailsTab}\n classes={{\n selected: classes.tabSelected,\n disabled: classes.disabledTab,\n labelIcon: classes.labelIcon,\n }}\n />\n )}\n {SERVICES_WITH_DATABASES.includes(instance.service) && (\n <Tab\n value=\"databases\"\n disabled={disabled}\n label=\"Databases\"\n icon={<DatabasesIcon />}\n className={classes.detailsTab}\n classes={{\n selected: classes.tabSelected,\n disabled: classes.disabledTab,\n labelIcon: classes.labelIcon,\n }}\n />\n )}\n <Tab\n value=\"settings\"\n label=\"Settings\"\n icon={<SettingsIcon />}\n className={classes.detailsTab}\n classes={{ selected: classes.tabSelected, labelIcon: classes.labelIcon }}\n />\n <Tab\n value=\"backups\"\n label=\"Backups\"\n icon={<BackupsIcon />}\n className={classes.detailsTab}\n classes={{ selected: classes.tabSelected, labelIcon: classes.labelIcon }}\n />\n {flags &&\n flags['nodes-tab'] && ( // eslint-disable-line react/prop-types\n <Tab\n value=\"nodes\"\n disabled={\n disabled &&\n instance.statusDisplay !== 'Update Requested' &&\n instance.statusDisplay !== 'Updating'\n }\n label=\"Nodes\"\n icon={<NodesIcon />}\n className={classes.detailsTab}\n classes={{\n selected: classes.tabSelected,\n disabled: classes.disabledTab,\n labelIcon: classes.labelIcon,\n }}\n />\n )}\n </Tabs>\n </div>\n <div className={classes.detailArea}>{currentDisplayedTab}</div>\n </ORContentArea>\n </div>\n </React.Fragment>\n );\n}\n\nUnstyledInstanceDetail.propTypes = propTypes;\n\nconst styles = (theme) => ({\n details: {\n color: theme.customColors.black,\n },\n tabsContainer: {\n display: 'flex',\n justifyContent: 'center',\n marginBottom: theme.spacing(2),\n borderBottom: `2px solid ${theme.customColors.teal}`,\n },\n detailsTab: {\n color: theme.customColors.teal,\n minWidth: 'unset',\n fontSize: '0.857rem',\n paddingBottom: 0,\n paddingRight: theme.spacing(3.5),\n paddingLeft: theme.spacing(3.5),\n fontWeight: 'bold',\n },\n firewallTab: {\n textTransform: 'none',\n },\n disabledTab: {\n color: '#6C6D6D',\n },\n noTab: {\n display: 'none',\n },\n detailArea: {\n // One day we'll be asked to add a 1px grey border here, so keeping this part for now\n borderRadius: '3px',\n },\n\n // M.UI API classes for Tabs container\n tabsRoot: {\n marginBottom: -2,\n },\n tabsIndicator: {\n backgroundColor: theme.customColors.orange,\n },\n\n // M.UI API classes for individual Tabs\n tabSelected: {\n color: theme.customColors.orange,\n },\n labelIcon: {\n minHeight: 'unset',\n },\n});\n\nexport const uiConfig = {\n name: 'tabSelectionValue',\n state: () => ({\n tabSelectionValue: 'overview',\n }),\n};\n\nexport default uiState(uiConfig)(withStyles(styles)(UnstyledInstanceDetail));\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\n\nimport { selectors as userSelectors } from 'dux/user';\nimport { actionCreators, selectors } from 'dux/instances';\nimport SERVICES_WITH_USERS from 'constants/servicesWithUsers';\nimport SERVICES_WITH_DATABASES from 'constants/servicesWithDatabases';\nimport InstanceDetail from './InstanceDetail';\n\nconst propTypes = {\n getInstance: PropTypes.func.isRequired,\n getInstances: PropTypes.func.isRequired,\n getInstanceUsers: PropTypes.func.isRequired,\n pullInstanceDatabases: PropTypes.func.isRequired,\n match: PropTypes.shape({}).isRequired,\n};\n\nclass InstanceDetailContainer extends React.Component {\n componentDidMount() {\n const {\n getInstance,\n getInstances,\n getInstanceUsers,\n pullInstanceDatabases,\n match: {\n params: { instanceId, service },\n },\n } = this.props;\n getInstance(instanceId, service.toLowerCase()).then((data) => {\n if (SERVICES_WITH_USERS.includes(service) && data.payload.statusDisplay === 'Ready') {\n getInstanceUsers(instanceId, service.toLowerCase());\n }\n if (SERVICES_WITH_DATABASES.includes(service) && data.payload.statusDisplay === 'Ready') {\n pullInstanceDatabases(instanceId, service.toLowerCase());\n }\n });\n\n /**\n * If someone bookmarks a page to an instance, the whole set of instances won't\n * be loaded in state. Without the instances in state, instances related to a\n * cockroach cluster ID cannot be displayed.\n */\n if (service.toLowerCase() === 'cockroachdb') {\n getInstances();\n }\n }\n\n render() {\n return <InstanceDetail {...this.props} />;\n }\n}\n\nfunction mapStateToProps(state) {\n return {\n ...selectors.getInstancesState(state),\n getRedisMemoryCapacity: selectors.getRedisMemoryCapacity(state),\n userRoles: userSelectors.getIdentityState(state).roles,\n flags: userSelectors.getFeatureFlagsState(state, false).flags,\n };\n}\n\nconst mapDispatchToProps = {\n getInstance: actionCreators.getInstance,\n getInstances: actionCreators.getInstances,\n getInstancePoll: actionCreators.getInstancePoll,\n deleteInstance: actionCreators.deleteInstance,\n getInstanceUsers: actionCreators.getInstanceUsers,\n resetInstanceErrorState: actionCreators.resetInstanceErrorState,\n pullInstanceDatabases: actionCreators.pullInstanceDatabases,\n};\n\nInstanceDetailContainer.propTypes = propTypes;\n\nexport default connect(mapStateToProps, mapDispatchToProps)(InstanceDetailContainer);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport { Field, reduxForm } from 'redux-form';\nimport IconButton from '@material-ui/core/IconButton';\nimport SearchIcon from '@material-ui/icons/Search';\nimport MenuItem from '@material-ui/core/MenuItem';\n\nimport WrappedTextField from 'components/WrappedTextField/WrappedTextField';\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport { required } from 'services/validationMsgs';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n handleSubmit: PropTypes.func.isRequired,\n searchOrgs: PropTypes.func.isRequired,\n sortOrgs: PropTypes.func.isRequired,\n valid: PropTypes.bool.isRequired,\n user: PropTypes.shape({\n orgSearchList: PropTypes.shape({\n list: PropTypes.arrayOf(PropTypes.shape({})),\n query: PropTypes.string,\n }),\n }).isRequired,\n handleChangePage: PropTypes.func.isRequired,\n};\n\nexport function UnstyledOrgImpersonationForm({\n classes,\n handleSubmit,\n searchOrgs,\n sortOrgs,\n valid,\n user,\n handleChangePage,\n}) {\n const { list, query } = user.orgSearchList;\n const submitHandler = (data) => {\n searchOrgs(data.search);\n handleChangePage(null, 0);\n };\n\n const wrappedIcon = (\n <IconButton\n type=\"submit\"\n disabled={!valid}\n variant=\"contained\"\n className={classes.searchButton}\n >\n <SearchIcon color=\"secondary\" className={classes.searchIcon} />\n </IconButton>\n );\n const adornmentObject = (value, position) => ({\n value,\n position,\n });\n\n const sortValues = [\n {\n value: 'companyNameAsc',\n label: 'Organization Name, A - Z',\n },\n {\n value: 'companyNameDesc',\n label: 'Organization Name, Z - A',\n },\n {\n value: 'dtCreatedDesc',\n label: 'Date Created, Newest',\n },\n {\n value: 'dtCreatedAsc',\n label: 'Date Created, Oldest',\n },\n ];\n\n const sortOptions = sortValues.map((option, index) => (\n <MenuItem key={index.toString()} value={option.value}>\n {option.label}\n </MenuItem>\n ));\n\n const searchResults =\n list.length || query ? (\n <ORTypography className={classes.searchResultsText}>\n {`${list.length || 'No'}\\u00A0Search Results for:`}\n \n <span className=\"searchResultsTextLength\">{query}</span>\n </ORTypography>\n ) : (\n <ORTypography color=\"secondary\" className={classes.searchResultsText}>\n Search for an Organization by Name, Email, or Id\n </ORTypography>\n );\n\n return (\n <div className={classes.formContainer}>\n <form className={classes.container} onSubmit={handleSubmit(submitHandler)}>\n <Field\n fullWidth\n name=\"search\"\n adornment={adornmentObject(wrappedIcon, 'end')}\n component={WrappedTextField}\n placeholder=\"Search By Name, Email, or ID\"\n validate={[required]}\n className={classes.searchField}\n />\n <Field\n fullWidth\n select\n name=\"sort\"\n disabled={!list.length}\n adornment={adornmentObject('Sort\\u00A0By:', 'start')}\n component={WrappedTextField}\n className={classes.searchField}\n onChange={(event) => sortOrgs(event.target.value)}\n >\n {sortOptions}\n </Field>\n </form>\n <div className={classes.searchResultsTextContainer}>{searchResults}</div>\n </div>\n );\n}\n\nconst styles = (theme) => ({\n container: {\n display: 'flex',\n flexFlow: 'row nowrap',\n justifyContent: 'space-between',\n\n [theme.breakpoints.down('md')]: {\n flexFlow: 'column nowrap',\n },\n },\n searchField: {\n padding: '8px',\n },\n searchButton: {\n left: theme.spacing(1.5),\n color: theme.palette.secondary,\n '&:hover': {\n backgroundColor: 'rgba(0, 0, 0, 0)',\n },\n },\n searchIcon: {\n color: theme.palette.secondary,\n },\n formContainer: {\n display: 'flex',\n flexFlow: 'column',\n },\n searchResultsText: {\n '& .searchResultsTextLength': {\n color: theme.palette.secondary.main,\n },\n [theme.breakpoints.down('sm')]: {\n display: 'flex',\n flexFlow: 'column nowrap',\n alignItems: 'center',\n },\n },\n searchResultsTextContainer: {\n display: 'flex',\n padding: '8px',\n justifyContent: 'flex-start',\n [theme.breakpoints.down('md')]: {\n justifyContent: 'center',\n },\n },\n});\n\nUnstyledOrgImpersonationForm.propTypes = propTypes;\n\nexport default withStyles(styles)(\n reduxForm({ form: 'orgImpersonation' })(UnstyledOrgImpersonationForm),\n);\n","import { connect } from 'react-redux';\n\nimport { actionCreators as userActionCreators, selectors as userSelectors } from 'dux/user';\nimport OrgImpersonationForm from './OrgImpersonationForm';\n\nconst mapStateToProps = (state) => ({\n user: userSelectors.getIdentityState(state),\n});\n\nconst mapDispatchToProps = {\n searchOrgs: userActionCreators.searchOrgs,\n sortOrgs: userActionCreators.sortOrgs,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(OrgImpersonationForm);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport { uiState } from 'react-redux-ui-state';\nimport VerifiedUser from '@material-ui/icons/VerifiedUser';\nimport TableBody from '@material-ui/core/TableBody';\nimport TableHead from '@material-ui/core/TableHead';\nimport TableRow from '@material-ui/core/TableRow';\nimport TableCell from '@material-ui/core/TableCell';\nimport IconButton from '@material-ui/core/IconButton';\nimport Icon from '@material-ui/core/Icon';\n\nimport ORTable from 'components/ORTable/ORTable';\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport OrgImpersonationForm from './OrgImpersonationForm/OrgImpersonationFormContainer';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n impersonateOrg: PropTypes.func.isRequired,\n stopOrgImpersonation: PropTypes.func.isRequired,\n getOrg: PropTypes.func.isRequired,\n user: PropTypes.shape({\n impersonatedOrganizationId: PropTypes.string,\n orgSearchList: PropTypes.shape({\n list: PropTypes.arrayOf(PropTypes.shape({})),\n }),\n }).isRequired,\n page: PropTypes.number.isRequired,\n rowsPerPage: PropTypes.number.isRequired,\n setUiState: PropTypes.func.isRequired,\n};\n\nexport function UnstyledOrgImpersonationPage({\n classes,\n impersonateOrg,\n stopOrgImpersonation,\n getOrg,\n user,\n page,\n rowsPerPage,\n setUiState,\n}) {\n function handleChangePage(event, newPage) {\n setUiState({\n page: newPage,\n });\n }\n\n const { list: orgSearchList } = user.orgSearchList;\n const orgSelected = (id) => id === user.impersonatedOrganizationId;\n const orgActionButton = (orgId) => {\n return orgSelected(orgId) ? (\n <IconButton onClick={() => stopOrgImpersonation()}>\n <Icon classes={{ root: classes.cancelButton }} fontSize=\"large\">\n face\n </Icon>\n </IconButton>\n ) : (\n <IconButton\n onClick={() => {\n impersonateOrg(orgId);\n getOrg();\n }}\n >\n <Icon classes={{ root: classes.impersonateButton }} fontSize=\"large\">\n face\n </Icon>\n </IconButton>\n );\n };\n\n const orgList =\n orgSearchList.length !== 0 &&\n orgSearchList.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map((thisOrg) => (\n <TableRow key={thisOrg.id.toString()}>\n <TableCell className={classes.orgCell}>\n <div className={classes.orgDataContainer}>\n {thisOrg.companyName}\n <br />\n {thisOrg.id}\n <br />\n {thisOrg.primaryEmail}\n <br />\n {thisOrg.phoneNumber}\n </div>\n <div className={classes.impersonateButtonContainer}>{orgActionButton(thisOrg.id)}</div>\n </TableCell>\n </TableRow>\n ));\n\n return (\n <div className={classes.orgImpersonationContainer}>\n <div className={classes.orgImpersonationArea}>\n <div className={classes.listContainer}>\n <VerifiedUser className={classes.tableIcon} />\n <ORTable\n count={orgSearchList.length}\n rowsPerPage={rowsPerPage}\n page={page}\n onChangePage={handleChangePage}\n >\n <TableHead>\n <ORTypography className={classes.tableTextContainer}>\n Organization Lookup\n </ORTypography>\n <TableRow>\n <TableCell>\n <OrgImpersonationForm handleChangePage={handleChangePage} />\n </TableCell>\n </TableRow>\n </TableHead>\n <TableBody classes={{ root: classes.tableScroll }}>{orgList}</TableBody>\n </ORTable>\n </div>\n </div>\n </div>\n );\n}\n\nUnstyledOrgImpersonationPage.propTypes = propTypes;\n\nconst styles = (theme) => ({\n orgImpersonationContainer: {\n padding: '24px',\n },\n orgImpersonationArea: {\n borderRadius: '3px',\n padding: '20px 8px',\n },\n tableTextContainer: {\n display: 'flex',\n color: theme.customColors.black,\n marginLeft: '44px',\n paddingTop: theme.spacing(1),\n width: '100%',\n },\n listContainer: {\n display: 'flex',\n flexFlow: 'column wrap',\n position: 'relative',\n alignItems: 'center',\n minHeight: '800px',\n },\n tableIcon: {\n color: theme.customColors.white,\n backgroundColor: theme.customColors.darkPurple,\n position: 'absolute',\n top: '-12px',\n left: '-10px',\n height: '45px',\n width: '45px',\n padding: '5px',\n borderRadius: '10px',\n boxShadow: '0px 5px 5px 0px rgba(216,216,216,1)',\n },\n tableScroll: {\n overflowY: 'scroll',\n maxHeight: '600px',\n display: 'flex',\n flexFlow: 'column',\n },\n impersonateButton: {\n color: theme.customColors.orange,\n },\n cancelButton: {\n color: theme.customColors.teal,\n },\n orgCell: {\n display: 'flex',\n justifyContent: 'space-between',\n flexFlow: 'row nowrap',\n },\n orgDataContainer: {\n flexFlow: 'column nowrap',\n overflowWrap: 'break-word',\n wordBreak: 'break-all',\n flexShrink: 2,\n paddingRight: theme.spacing(2),\n },\n impersonateButtonContainer: {\n display: 'flex',\n alignItems: 'center',\n },\n});\n\nexport const uiConfig = {\n name: 'orgImpersonationTable',\n state: () => ({\n page: 0,\n rowsPerPage: 10,\n }),\n};\n\nexport default uiState(uiConfig)(withStyles(styles)(UnstyledOrgImpersonationPage));\n","import { connect } from 'react-redux';\n\nimport { actionCreators as orgActionCreators } from 'dux/org';\nimport { selectors as userSelectors, actionCreators as userActionCreators } from 'dux/user';\nimport OrgImpersonationPage from './OrgImpersonationPage';\n\nconst mapStateToProps = (state) => ({\n user: userSelectors.getIdentityState(state),\n});\n\nconst mapDispatchToProps = {\n impersonateOrg: userActionCreators.impersonateOrg,\n stopOrgImpersonation: userActionCreators.stopOrgImpersonation,\n getOrg: orgActionCreators.getOrg,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(OrgImpersonationPage);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { withStyles } from '@material-ui/styles';\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport Icon from '@material-ui/core/Icon';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport Done from '@material-ui/icons/Done';\nimport Close from '@material-ui/icons/Close';\nimport Fab from '@material-ui/core/Fab';\nimport { reduxForm, Field, SubmissionError } from 'redux-form';\nimport { required, maxLength, email, isUserUniqueValidation } from 'services/validationMsgs';\nimport WrappedTextField from 'components/WrappedTextField/WrappedTextField';\nimport MorePropTypes from 'airbnb-prop-types';\nimport { RolesForInvites } from '../../../../constants/roles';\nimport BusyButton from '../../../BusyButton/BusyButton';\nimport ORTypography from '../../../ORTypography/ORTypography';\n\nconst maxLength128 = maxLength(128);\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n className: PropTypes.string,\n createUserInvite: PropTypes.func.isRequired,\n handleSubmit: PropTypes.func.isRequired,\n pristine: PropTypes.bool.isRequired,\n reset: PropTypes.func.isRequired,\n valid: PropTypes.bool.isRequired,\n error: MorePropTypes.or([MorePropTypes.explicitNull, PropTypes.string, PropTypes.shape({})]),\n};\n\nconst defaultProps = {\n error: null,\n className: null,\n};\n\nexport function userUniqueValidation(value, formValues, props) {\n return isUserUniqueValidation(value, formValues, props.users, props.invites);\n}\n\nexport function UnstyledInviteUserCardForm({\n classes,\n className,\n createUserInvite,\n handleSubmit,\n pristine,\n reset,\n valid,\n error,\n}) {\n function handleCancel() {\n reset();\n }\n\n /**\n * Appropriate throw an error with the relevant validation errors if necessary\n *\n * @param {result} value - Result of the form submission\n * @throws {error} - Throws SubmissionError if any errors were returned\n */\n\n const handleFormSubmissionReturn = (result) => {\n if (result.formErrors) {\n throw new SubmissionError(result.formErrors);\n }\n reset();\n };\n\n /**\n * Submission handler called when the form is executed. Checks\n * for valid api call.\n *\n * @param {object} data - data posted from the user invite form\n * @throws {error} - Throws SubmissionError if data is invalid.\n */\n\n const submitHandler = (data) => createUserInvite(data).then(handleFormSubmissionReturn);\n\n const errorElm = error ? (\n <ORTypography color=\"error\" className={classes.formStatus}>\n {error}\n </ORTypography>\n ) : null;\n\n return (\n <form\n name=\"myForm\"\n onSubmit={handleSubmit(submitHandler)}\n className={classnames(className, classes.inputForm)}\n >\n <Card>\n <CardHeader\n avatar={<Icon className={classes.icon}>add_circle</Icon>}\n title=\"Invite A User\"\n classes={{ action: classes.action, title: classes.title }}\n />\n <CardContent>\n <div>\n <Field\n variant=\"outlined\"\n name=\"email2invite\"\n label=\"Email\"\n placeholder=\"Email\"\n component={WrappedTextField}\n fullWidth\n validate={[maxLength128, required, email, userUniqueValidation]}\n margin=\"normal\"\n InputLabelProps={{\n shrink: true,\n }}\n />\n <Field\n variant=\"outlined\"\n select\n fullWidth\n name=\"role\"\n label=\"Role\"\n component={WrappedTextField}\n placeholder=\"Select a Role\"\n defaultValue=\"readonly user\"\n inputProps={{\n InputLabelProps: {\n shrink: true,\n className: classes.inputLabel,\n defaultValue: 'readonly user',\n },\n }}\n margin=\"normal\"\n >\n {RolesForInvites.map((option) => (\n <MenuItem key={option.value} value={option.value}>\n {option.label}\n </MenuItem>\n ))}\n </Field>\n </div>\n {errorElm}\n </CardContent>\n <div className={classes.addButtonContainer}>\n <Fab size=\"small\" classes={{ root: classes.cancelButton }} onClick={handleCancel}>\n <Close fontSize=\"large\" />\n </Fab>\n <BusyButton\n disabled={!valid || pristine}\n name=\"submit\"\n type=\"submit\"\n variant=\"fab\"\n color=\"primary\"\n size=\"small\"\n className={classes.addButton}\n >\n <Done fontSize=\"large\" />\n </BusyButton>\n </div>\n </Card>\n </form>\n );\n}\n\nUnstyledInviteUserCardForm.propTypes = propTypes;\nUnstyledInviteUserCardForm.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n inputForm: {\n marginTop: theme.spacing(1),\n },\n addButtonContainer: {\n width: '100%',\n display: 'flex',\n justifyContent: 'space-between',\n },\n addButton: {\n cursor: 'pointer',\n margin: theme.spacing(2),\n },\n action: {\n alignSelf: 'center',\n [theme.breakpoints.down('sm')]: {\n fontSize: '14px',\n },\n },\n expand: {\n transform: 'rotate(0deg)',\n marginLeft: 'auto',\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shortest,\n }),\n },\n expandOpen: {\n transform: 'rotate(180deg)',\n },\n cancelButton: {\n cursor: 'pointer',\n margin: theme.spacing(2),\n color: theme.customColors.white,\n backgroundColor: theme.customColors.teal,\n '&:hover': {\n background: theme.customColors.teal,\n },\n },\n icon: {\n fontSize: 50,\n color: '#7E3527',\n [theme.breakpoints.down('sm')]: {\n fontSize: 35,\n },\n },\n title: {\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n [theme.breakpoints.down('sm')]: {\n fontSize: '14px',\n },\n },\n});\n\nconst formConfig = {\n form: 'userinvite',\n initialValues: {\n email2invite: '',\n role: 'readonly user',\n },\n};\n\nexport default withStyles(styles)(reduxForm(formConfig)(UnstyledInviteUserCardForm));\n","import { connect } from 'react-redux';\n\nimport { actionCreators as actions } from 'dux/usersManagement';\nimport getUsersManagementState from 'dux/usersManagement/selectors';\n\nimport InviteUserCardForm from './InviteUserCardForm';\n\nconst mapStateToProps = (state) => ({\n ...getUsersManagementState(state),\n});\n\nconst mapDispatchToProps = {\n createUserInvite: actions.createUserInvite,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(InviteUserCardForm);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { withStyles } from '@material-ui/styles';\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport Icon from '@material-ui/core/Icon';\nimport { uiState } from 'react-redux-ui-state';\nimport TextField from '@material-ui/core/TextField';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport Cached from '@material-ui/icons/Cached';\nimport Fab from '@material-ui/core/Fab';\nimport BusyButton from '../../../BusyButton/BusyButton';\n\nconst propTypes = {\n // eslint-disable-next-line react/require-default-props\n className: PropTypes.string,\n classes: PropTypes.shape({}).isRequired,\n deleteUserInviteState: PropTypes.func.isRequired,\n resendUserInviteState: PropTypes.func.isRequired,\n invite: PropTypes.shape({\n id: PropTypes.string.isRequired,\n email2invite: PropTypes.string.isRequired,\n role: PropTypes.string.isRequired,\n isExpired: PropTypes.bool.isRequired,\n swappedtoken: PropTypes.bool.isRequired,\n }).isRequired,\n};\n\n// eslint-disable-next-line no-unused-vars\nconst defaultProps = {\n className: null,\n};\n\nexport function UnstyledInviteUserCard({\n classes,\n className,\n invite,\n deleteUserInviteState,\n resendUserInviteState,\n}) {\n function handleDeleteClick() {\n deleteUserInviteState(invite.id);\n }\n\n function handleResendClick() {\n const data = {\n email2invite: invite.email2invite,\n role: invite.role,\n };\n resendUserInviteState(invite.id, data);\n }\n\n function inviteColor(obj) {\n if (obj.isExpired) {\n return '#FF0000';\n }\n return '#E8AA42';\n }\n\n let tempRole = invite.role;\n if (tempRole === 'readonly user') {\n tempRole = 'Read Only';\n }\n\n return (\n <Card className={classnames(className, classes.cardContainer)}>\n <CardHeader\n avatar={\n <Icon\n style={{\n color: inviteColor(invite),\n }}\n className={classes.icon}\n >\n account_circle\n </Icon>\n }\n title={invite.email2invite}\n subheader={tempRole}\n className={classes.addUserHeader}\n classes={{\n action: classes.action,\n subheader: classes.capitalize,\n title: classes.title,\n content: classes.content,\n }}\n />\n <CardContent>\n <div>\n <TextField\n variant=\"outlined\"\n name=\"email2invite\"\n label=\"Email\"\n placeholder=\"Email\"\n fullWidth\n margin=\"normal\"\n defaultValue={invite.email2invite}\n disabled\n />\n <TextField\n variant=\"outlined\"\n fullWidth\n name=\"role\"\n label=\"Role\"\n placeholder=\"Select a Role\"\n defaultValue={invite.role}\n margin=\"normal\"\n disabled\n autoCapitalize=\"none\"\n InputProps={{\n classes: {\n input: classes.capitalize,\n },\n }}\n />\n {invite.isExpired ? (\n <div className={classes.redVerbiage}>EXPIRED</div>\n ) : (\n <div className={classes.pendingVerbiage}>Pending Sign-up</div>\n )}\n </div>\n </CardContent>\n <div className={classes.buttonContainer}>\n <Fab size=\"small\" classes={{ root: classes.cancelButton }} onClick={handleDeleteClick}>\n <Tooltip title=\"Delete invite\">\n <Icon>delete</Icon>\n </Tooltip>\n </Fab>\n <BusyButton\n // disabled={!valid || pristine}\n name=\"submit\"\n type=\"submit\"\n variant=\"fab\"\n color=\"primary\"\n size=\"small\"\n className={classes.resendButton}\n onClick={handleResendClick}\n >\n <Tooltip title=\"Resend invite\">\n <Cached fontSize=\"large\" />\n </Tooltip>\n </BusyButton>\n </div>\n </Card>\n );\n}\n\nUnstyledInviteUserCard.propTypes = propTypes;\n\nconst styles = (theme) => ({\n addUserHeader: {\n display: 'flex',\n },\n cardContainer: {\n marginTop: theme.spacing(1),\n paddingBottom: '0px',\n },\n action: {\n alignSelf: 'center',\n [theme.breakpoints.down('sm')]: {\n fontSize: '14px',\n },\n },\n expand: {\n transform: 'rotate(0deg)',\n marginLeft: 'auto',\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shortest,\n }),\n },\n expandOpen: {\n transform: 'rotate(180deg)',\n },\n capitalize: {\n textTransform: 'capitalize',\n },\n redVerbiage: {\n color: 'red',\n paddingLeft: theme.spacing(1.5),\n },\n pendingVerbiage: {\n color: theme.customColors.mediumGrey,\n paddingLeft: theme.spacing(1.5),\n },\n buttonContainer: {\n width: '100%',\n display: 'flex',\n justifyContent: 'space-between',\n lineHeight: '0.5em',\n },\n resendButton: {\n cursor: 'pointer',\n margin: theme.spacing(2),\n },\n cancelButton: {\n cursor: 'pointer',\n margin: theme.spacing(2),\n color: theme.customColors.white,\n backgroundColor: theme.customColors.red,\n },\n icon: {\n fontSize: 50,\n [theme.breakpoints.down('sm')]: {\n fontSize: 35,\n },\n },\n title: {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n [theme.breakpoints.down('sm')]: {\n fontSize: '14px',\n },\n },\n content: {\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n },\n});\n\nexport const uiConfig = {\n name: 'InviteUserCard',\n state: () => ({\n userInviteCardOpen: false,\n }),\n};\n\nexport default uiState(uiConfig)(withStyles(styles)(UnstyledInviteUserCard));\n","import { connect } from 'react-redux';\n\nimport { actionCreators as actions } from 'dux/usersManagement';\nimport getUsersManagementState from 'dux/usersManagement/selectors';\n\nimport InviteUserCard from './InviteUserCard';\n\nconst mapStateToProps = (state) => ({\n ...getUsersManagementState(state),\n});\n\nconst mapDispatchToProps = {\n deleteUserInviteState: actions.deleteUserInviteState,\n resendUserInviteState: actions.resendUserInviteState,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(InviteUserCard);\n","/**\n * Menu that is triggered from the site header and shows profile-level nav items\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\nimport Menu from '@material-ui/core/Menu';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport Switch from '@material-ui/core/Switch';\nimport DeleteIcon from '@material-ui/icons/Delete';\n// import LockIcon from '@material-ui/icons/Lock';\n\nimport roleDisabled from 'services/roleDisabled/index';\nimport { OWNER } from 'constants/roles';\nimport { lightTheme } from 'components/App/App.theme';\nimport WithSpecifiedTheme from 'components/WithSpecifiedTheme/WithSpecifiedTheme';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n handleConfirmDelete: PropTypes.func.isRequired,\n userRoles: PropTypes.arrayOf(PropTypes.string).isRequired,\n anchorEl: PropTypes.oneOfType([PropTypes.object]),\n onClose: PropTypes.func.isRequired,\n isOwner: PropTypes.bool.isRequired,\n userId: PropTypes.string.isRequired,\n userORv4ID: PropTypes.string,\n orgORv4ID: PropTypes.string,\n updateUsersState: PropTypes.func.isRequired,\n};\n\nconst defaultProps = {\n anchorEl: null,\n userORv4ID: null,\n orgORv4ID: null,\n};\n\nexport function UnstyledUserActionsMenu({\n classes,\n anchorEl,\n onClose,\n handleConfirmDelete,\n userRoles,\n isOwner,\n userId,\n userORv4ID,\n orgORv4ID,\n updateUsersState,\n}) {\n // Not sure this check is needed since only owners can see the users screen anyway\n const allowedUserRoles = [OWNER];\n const roleIsDisabled = roleDisabled(userRoles, allowedUserRoles);\n\n const canAccessDedicated = Boolean(orgORv4ID) && Boolean(userORv4ID) && orgORv4ID === userORv4ID;\n\n // disable menu in order to not show empty options, until we have another MenuItem\n return (\n <Menu\n className={classes.root}\n classes={{ list: classes.list }}\n open={!!anchorEl && !roleIsDisabled && !isOwner}\n onClose={onClose}\n anchorEl={anchorEl}\n anchorOrigin={{ horizontal: 'right', vertical: 50 }}\n disableAutoFocusItem\n getContentAnchorEl={null}\n >\n {roleIsDisabled || !orgORv4ID ? null : (\n <MenuItem className={classes.menuItem} classes={{ selected: classes.selectedLink }}>\n GRANT ACCESS TO DEDICATED\n <Switch\n className={classes.grantSwitch}\n checked={canAccessDedicated}\n onChange={() =>\n updateUsersState({ accessDedicated: !canAccessDedicated }, userId, orgORv4ID)\n }\n />\n </MenuItem>\n )}\n {/* <MenuItem\n className={classes.menuItem}\n component=\"a\"\n onClick={onClose}\n classes={{ selected: classes.selectedLink }}\n >\n REQUEST PASSWORD CHANGE\n <LockIcon className={classes.lockIcon} />\n </MenuItem> */}\n {roleIsDisabled ? null : (\n <MenuItem\n className={classes.menuItem}\n onClick={handleConfirmDelete}\n classes={{ selected: classes.selectedLink }}\n >\n DELETE USER\n <DeleteIcon className={classes.deleteIcon} />\n </MenuItem>\n )}\n </Menu>\n );\n}\n\nUnstyledUserActionsMenu.propTypes = propTypes;\nUnstyledUserActionsMenu.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n root: {\n padding: 0,\n marginLeft: -10,\n marginTop: -20,\n },\n list: {\n paddingTop: 0,\n paddingBottom: 0,\n },\n selectedLink: {\n backgroundColor: theme.palette.action.selected,\n },\n menuItem: {\n display: 'flex',\n justifyContent: 'space-between',\n },\n lockIcon: {\n color: theme.customColors.mediumGrey,\n marginLeft: theme.spacing(3),\n },\n deleteIcon: {\n color: theme.customColors.mediumGrey,\n marginLeft: theme.spacing(5),\n },\n grantSwitch: {\n marginLeft: theme.spacing(5),\n marginRight: theme.spacing(-2),\n },\n profileTextContainer: {\n display: 'flex',\n flexDirection: 'column',\n },\n email: {\n fontSize: '14px',\n color: theme.customColors.mediumGrey,\n },\n});\n\nexport default WithSpecifiedTheme(lightTheme)(withStyles(styles)(UnstyledUserActionsMenu));\n","import { connect } from 'react-redux';\n\nimport { selectors as userSelectors } from 'dux/user';\nimport { selectors as orgSelectors } from 'dux/org';\nimport { actionCreators as usersManagementActionCreators } from 'dux/usersManagement';\nimport UserActionsMenu from './UserActionsMenu';\n\nconst mapStateToProps = (state) => ({\n userRoles: userSelectors.getIdentityState(state).roles,\n orgORv4ID: orgSelectors.orgORv4IDSelector(state),\n});\n\nconst mapDispatchToProps = {\n updateUsersState: usersManagementActionCreators.updateUsersState,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(UserActionsMenu);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { withStyles } from '@material-ui/styles';\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport IconButton from '@material-ui/core/IconButton';\nimport Done from '@material-ui/icons/Done';\nimport Icon from '@material-ui/core/Icon';\nimport MoreHorizIcon from '@material-ui/icons/MoreHoriz';\nimport { uiState } from 'react-redux-ui-state';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport Checkbox from '@material-ui/core/Checkbox';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport Button from '@material-ui/core/Button';\nimport { reduxForm, Field, SubmissionError } from 'redux-form';\nimport { required, maxLength, email } from 'services/validationMsgs';\nimport WrappedTextField from 'components/WrappedTextField/WrappedTextField';\nimport MorePropTypes from 'airbnb-prop-types';\nimport Tooltip from '@material-ui/core/Tooltip';\n\nimport BusyButton from 'components/BusyButton/BusyButton';\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport UserActionsMenu from './UserActionsMenu/UserActionsMenuContainer';\nimport { RolesForInvites } from '../../../../constants/roles';\n\nconst msg = 'Contact Support to make changes';\n\nconst maxLength128 = maxLength(128);\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n className: PropTypes.string,\n updateUser: PropTypes.func.isRequired,\n deleteUser: PropTypes.func.isRequired,\n getUsers: PropTypes.func.isRequired,\n setUiState: PropTypes.func.isRequired,\n confirmDeleteOpen: PropTypes.bool.isRequired,\n menuAnchorEl: PropTypes.shape({}),\n handleSubmit: PropTypes.func.isRequired,\n actingUserId: PropTypes.string.isRequired,\n user: PropTypes.shape({\n id: PropTypes.string.isRequired,\n email: PropTypes.string.isRequired,\n roles: PropTypes.arrayOf(PropTypes.string).isRequired,\n username: PropTypes.string.isRequired,\n ssoUsername: MorePropTypes.or([MorePropTypes.explicitNull, PropTypes.string]),\n orv4id: PropTypes.string,\n }).isRequired,\n pristine: PropTypes.bool.isRequired,\n\n valid: PropTypes.bool.isRequired,\n submitting: PropTypes.bool.isRequired,\n error: MorePropTypes.or([MorePropTypes.explicitNull, PropTypes.string, PropTypes.shape({})]),\n};\n\nconst defaultProps = {\n error: null,\n menuAnchorEl: null,\n className: null,\n};\n\nexport function RenderCheckbox({ input, label }) {\n return (\n <Tooltip title={msg}>\n <FormControlLabel\n control={<Checkbox checked={input.value} onChange={input.onChange} disabled />}\n label={label}\n />\n </Tooltip>\n );\n}\n\nRenderCheckbox.propTypes = {\n input: PropTypes.shape({\n value: PropTypes.bool.isRequired,\n onChange: PropTypes.func.isRequired,\n }).isRequired,\n label: PropTypes.string.isRequired,\n};\n\nexport function UnstyledUserCardForm({\n updateUser,\n deleteUser,\n getUsers,\n classes,\n className,\n actingUserId,\n user,\n setUiState,\n menuAnchorEl,\n handleSubmit,\n pristine,\n valid,\n error,\n submitting,\n confirmDeleteOpen,\n}) {\n const handleFormSubmissionReturn = (result) => {\n if (result.error) {\n throw new SubmissionError(result.formErrors);\n }\n getUsers();\n };\n\n const openMenu = (event) => {\n setUiState({ menuAnchorEl: event.currentTarget });\n };\n\n const closeMenu = () => {\n setUiState({ menuAnchorEl: null });\n };\n\n const handleConfirmDelete = () => {\n setUiState({\n confirmDeleteOpen: !confirmDeleteOpen,\n menuAnchorEl: null,\n });\n };\n\n const handleDelete = (userId) => {\n setUiState({\n confirmDeleteOpen: false,\n });\n deleteUser(userId);\n };\n\n const handleDialogCancel = () => {\n setUiState({\n confirmDeleteOpen: false,\n });\n };\n\n const submitHandler = (data) => updateUser(data, user.id).then(handleFormSubmissionReturn);\n\n const errorElm = error ? (\n <ORTypography color=\"error\" className={classes.formStatus}>\n {error}\n </ORTypography>\n ) : null;\n\n let tempRole = user.roles[0];\n if (tempRole === 'readonly user') {\n tempRole = 'Read Only';\n }\n\n return (\n <React.Fragment>\n <Card className={classnames(className, classes.cardContainer)}>\n <CardHeader\n avatar={<Icon className={classes.icon}>account_circle</Icon>}\n action={\n user.username !== actingUserId && (\n <IconButton\n aria-label=\"More User Actions\"\n onClick={openMenu}\n classes={{ root: classes.moreIconRoot }}\n >\n <MoreHorizIcon />\n </IconButton>\n )\n }\n title={user.ssoUsername ? user.ssoUsername : user.email}\n subheader={tempRole}\n classes={{\n action: classes.action,\n subheader: classes.capitalize,\n title: classes.title,\n content: classes.content,\n }}\n />\n <CardContent>\n <div className={classes.moreContainer}>\n <UserActionsMenu\n handleConfirmDelete={handleConfirmDelete}\n anchorEl={menuAnchorEl}\n onClose={closeMenu}\n isOwner={user.username === actingUserId}\n userId={user.id}\n userORv4ID={user.orv4id}\n />\n <Dialog open={confirmDeleteOpen}>\n <DialogContent classes={{ root: classes.dialogText }}>\n Are you sure you want to delete \n {user.email}?\n </DialogContent>\n <DialogActions>\n <Button\n color=\"secondary\"\n onClick={handleDialogCancel}\n className={classes.dialogButton}\n >\n Cancel\n </Button>\n <Button\n onClick={() => handleDelete(user.id)}\n className={classes.confirmDeleteButton}\n >\n Confirm\n </Button>\n </DialogActions>\n </Dialog>\n </div>\n <form onSubmit={handleSubmit(submitHandler)}>\n <div>\n <Field\n className={classes.emailInput}\n variant=\"outlined\"\n name=\"email\"\n label=\"Email\"\n placeholder=\"Email\"\n component={WrappedTextField}\n fullWidth\n disabled\n validate={[maxLength128, required, email]}\n margin=\"normal\"\n InputLabelProps={{\n shrink: true,\n }}\n >\n {user.email}\n </Field>\n <Field\n variant=\"outlined\"\n select\n fullWidth\n name=\"role\"\n label=\"Role\"\n component={WrappedTextField}\n placeholder=\"Select a Role\"\n defaultValue={user.roles[0]}\n inputProps={{\n InputLabelProps: {\n shrink: true,\n className: classes.inputLabel,\n defaultValue: 'readonly user',\n },\n }}\n margin=\"normal\"\n >\n {RolesForInvites.map((option) => (\n <MenuItem key={option.value} value={option.value}>\n {option.label}\n </MenuItem>\n ))}\n </Field>\n <div className={classes.checkBoxContainer}>\n <Field\n variant=\"contained\"\n name=\"resetFlag\"\n component={RenderCheckbox}\n label=\"Password Reset\"\n type=\"checkbox\"\n />\n </div>\n </div>\n {errorElm}\n <div className={classes.addButtonContainer}>\n <BusyButton\n disabled={!valid || pristine}\n loading={submitting}\n name=\"submit\"\n type=\"submit\"\n variant=\"fab\"\n color=\"primary\"\n size=\"small\"\n className={classes.addButton}\n >\n <Done fontSize=\"large\" />\n </BusyButton>\n </div>\n </form>\n </CardContent>\n </Card>\n </React.Fragment>\n );\n}\n\nUnstyledUserCardForm.propTypes = propTypes;\nUnstyledUserCardForm.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n moreContainer: {\n display: 'flex',\n width: '100%',\n justifyContent: 'flex-end',\n },\n moreIconRoot: {\n padding: 0,\n marginRight: theme.spacing(1),\n },\n cardContainer: {\n marginTop: theme.spacing(1),\n },\n action: {\n alignSelf: 'flex-end',\n },\n capitalize: {\n textTransform: 'capitalize',\n },\n expand: {\n transform: 'rotate(0deg)',\n marginLeft: 'auto',\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shortest,\n }),\n },\n expandOpen: {\n transform: 'rotate(180deg)',\n },\n addButtonContainer: {\n width: '100%',\n display: 'flex',\n justifyContent: 'space-between',\n },\n addButton: {\n cursor: 'pointer',\n margin: theme.spacing(2),\n },\n cancelButton: {\n cursor: 'pointer',\n margin: theme.spacing(2),\n color: theme.customColors.white,\n backgroundColor: theme.customColors.teal,\n '&:hover': {\n background: theme.customColors.teal,\n },\n },\n confirmDeleteButton: {\n color: theme.customColors.red,\n },\n checkBoxContainer: {\n display: 'flex',\n flexDirection: 'column',\n },\n popover: {\n zIndex: 2000,\n },\n emailInput: {\n marginTop: theme.spacing(1),\n },\n icon: {\n fontSize: 50,\n color: 'teal',\n [theme.breakpoints.down('sm')]: {\n fontSize: 35,\n },\n },\n title: {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n [theme.breakpoints.down('sm')]: {\n fontSize: '14px',\n },\n },\n content: {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n },\n});\n\nexport const uiConfig = {\n state: () => ({\n userCardFormOpen: false,\n menuAnchorEl: null,\n confirmDeleteOpen: false,\n }),\n};\n\nexport default uiState(uiConfig)(\n withStyles(styles)(\n reduxForm({\n enableReinitialize: true,\n })(UnstyledUserCardForm),\n ),\n);\n","import { connect } from 'react-redux';\n\nimport { selectors } from 'dux/user';\nimport { actionCreators as actions } from 'dux/usersManagement';\nimport getUsersManagementState from 'dux/usersManagement/selectors';\n\nimport UserCardForm from './UserCardForm';\n\nconst mapStateToProps = (state) => ({\n ...getUsersManagementState(state),\n actingUserId: selectors.getIdentityState(state).id,\n});\n\nconst mapDispatchToProps = {\n updateUser: actions.updateUsersState,\n deleteUser: actions.deleteUser,\n getUsers: actions.getUsersState,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(UserCardForm);\n","/**\n * Page for profile management\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core';\nimport { uiState } from 'react-redux-ui-state';\n\nimport Poll from 'components/Poll/Poll';\nimport ORContentHeader from 'components/ORContentHeader/ORContentHeader';\nimport ORContentArea from 'components/ORContentArea/ORContentArea';\nimport InviteUserCardForm from './InviteUserCardForm/InviteUserCardFormContainer';\nimport InviteUserCard from './InviteUserCard/InviteUserCardContainer';\nimport UserCardForm from './UserCardForm/UserCardFormContainer';\nimport LoadingPlaceHolder from '../../LoadingPlaceholder/LoadingPlaceholder';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n invites: PropTypes.arrayOf(PropTypes.object).isRequired,\n users: PropTypes.arrayOf(PropTypes.object).isRequired,\n loaded: PropTypes.bool.isRequired,\n getUserInvitesState: PropTypes.func.isRequired,\n getUsersState: PropTypes.func.isRequired,\n getUsersPoll: PropTypes.func.isRequired,\n setUiState: PropTypes.func.isRequired,\n isLoadingUsers: PropTypes.bool.isRequired,\n};\n\nexport function UnstyledUsersPage({\n classes,\n invites,\n users,\n loaded,\n getUserInvitesState,\n getUsersState,\n getUsersPoll,\n setUiState,\n isLoadingUsers,\n}) {\n if (!loaded) {\n setUiState({ loaded: true });\n getUsersState();\n getUserInvitesState();\n }\n\n let spinner = null;\n\n if (isLoadingUsers) {\n spinner = <LoadingPlaceHolder />;\n }\n\n return (\n <React.Fragment>\n <Poll intervalInMS={15000} actionCreator={getUsersPoll} />\n <ORContentHeader hasDivider>Users & Permissions</ORContentHeader>\n <ORContentArea>\n <div className={classes.widgetsArea}>\n <InviteUserCardForm className={classes.cards} />\n {invites.map((invite) => (\n <InviteUserCard key={invite.email2invite} invite={invite} className={classes.cards} />\n ))}\n {users.map((user) => (\n <UserCardForm\n key={user.id}\n form={user.id} // Required for multiple forms in the same page\n user={{ ...user, role: user.roles[0] }}\n initialValues={{\n email: user.email,\n role: user.roles[0],\n deleteFlag: false,\n resetFlag: false,\n }}\n className={classes.cards}\n />\n ))}\n {spinner}\n </div>\n </ORContentArea>\n </React.Fragment>\n );\n}\n\nUnstyledUsersPage.propTypes = propTypes;\n\nconst styles = (theme) => ({\n widgetsArea: {\n display: 'flex',\n flexDirection: 'row',\n flexWrap: 'wrap',\n margin: '0px auto 8px auto',\n justifyContent: 'space-between',\n [theme.breakpoints.down('sm')]: {\n justifyContent: 'center',\n },\n },\n cards: {\n width: 'calc((100% - 16px) / 2)',\n [theme.breakpoints.down('sm')]: {\n width: '95%',\n margin: theme.spacing(1),\n },\n },\n});\n\nexport const uiConfig = {\n name: 'UsersPage',\n state: () => ({\n loaded: false,\n }),\n};\n\nexport default uiState(uiConfig)(withStyles(styles)(UnstyledUsersPage));\n","import { connect } from 'react-redux';\n\nimport getUsersManagementState from 'dux/usersManagement/selectors';\nimport { actionCreators as actions } from 'dux/usersManagement';\n\nimport UsersPage from './UsersPage';\n\nconst mapStateToProps = (state) => ({\n ...getUsersManagementState(state),\n});\n\nconst mapDispatchToProps = {\n getUserInvitesState: actions.getUserInvitesState,\n getUsersState: actions.getUsersState,\n getUsersPoll: actions.getUsersPoll,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(UsersPage);\n","/**\n * Component that contains all routes for all logged-in pages (excluding sign up)\n */\nimport React from 'react';\nimport { Switch, Route } from 'react-router-dom';\n\nimport {\n OWNER,\n OR_ADMIN,\n OR_SUPERUSER,\n OR_READONLY,\n OR_SUPERREAD,\n ADMIN,\n READONLY,\n BILLING,\n} from 'constants/roles';\nimport DashboardPageContainer from '../DashboardPage/DashboardPageContainer';\nimport InstancesPageContainer from '../InstancesPage/InstancesPageContainer';\nimport CreateInstancePageContainer from '../CreateInstancePage/CreateInstancePageContainer';\nimport CreateInstancePageContainer2 from '../CreateInstancePage2/CreateInstancePageContainer';\nimport ProfilePageContainer from '../ProfilePage/ProfilePageContainer';\nimport AuthorizedRouteContainer from '../../AuthorizedRoute/AuthorizedRouteContainer';\nimport InstancesPageRedirect from '../InstancesPageRedirect/InstancesPageRedirectContainer';\nimport InstanceDetailContainer from '../InstancesPage/InstanceDetail/InstanceDetailContainer';\nimport ErrorPageContainer from '../../ErrorPage/ErrorPageContainer';\nimport OrgImpersonationPageContainer from '../OrgImpersonationPage/OrgImpersonationPageContainer';\nimport UsersPageContainer from '../UsersPage/UsersPageContainer';\n\nfunction MissionCtrlRoutes() {\n return (\n <Switch>\n <AuthorizedRouteContainer\n exact\n path=\"/mission-ctrl/create-instance\"\n component={CreateInstancePageContainer}\n />\n <AuthorizedRouteContainer\n exact\n path=\"/mission-ctrl/create-instance2\"\n component={CreateInstancePageContainer2}\n />\n <AuthorizedRouteContainer\n exact\n path=\"/mission-ctrl/instances/:service/:instanceId\"\n roles={[OWNER, ADMIN, READONLY, BILLING, OR_ADMIN, OR_READONLY, OR_SUPERUSER, OR_SUPERREAD]}\n component={InstanceDetailContainer}\n />\n <AuthorizedRouteContainer\n exact\n path=\"/mission-ctrl/instances\"\n roles={[OWNER, ADMIN, READONLY, BILLING, OR_ADMIN, OR_READONLY, OR_SUPERUSER, OR_SUPERREAD]}\n component={InstancesPageContainer}\n />\n <AuthorizedRouteContainer\n exact\n path=\"/mission-ctrl/dashboard\"\n component={DashboardPageContainer}\n />\n <AuthorizedRouteContainer\n exact\n path=\"/mission-ctrl/profile\"\n component={ProfilePageContainer}\n />\n <AuthorizedRouteContainer\n exact\n path=\"/mission-ctrl/users\"\n roles={[OWNER, OR_ADMIN, OR_SUPERUSER]}\n component={UsersPageContainer}\n />\n <AuthorizedRouteContainer\n exact\n path=\"/mission-ctrl/org-impersonation\"\n roles={[OR_ADMIN, OR_READONLY]}\n component={OrgImpersonationPageContainer}\n />\n <AuthorizedRouteContainer exact path=\"/mission-ctrl\" component={InstancesPageRedirect} />\n <Route render={() => <ErrorPageContainer match={{ params: { statusCode: '404' } }} />} />\n </Switch>\n );\n}\n\nexport default MissionCtrlRoutes;\n","/**\n * Main wrapper for all \"logged-in\" pages, including the main nav, header and routes\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\n\nimport classnames from 'classnames';\nimport Nav from './Nav/Nav';\nimport Header from './Header/Header';\nimport Footer from './Footer/Footer';\nimport Banner from '../Banner/BannerContainer';\nimport MissionCtrlRoutes from './MissionCtrlRoutes/MissionCtrlRoutes';\nimport WithSpecifiedTheme from '../WithSpecifiedTheme/WithSpecifiedTheme';\nimport { lightTheme } from '../App/App.theme';\n\nconst propTypes = {\n classes: PropTypes.shape({\n root: PropTypes.string.isRequired,\n header: PropTypes.string.isRequired,\n nav: PropTypes.string.isRequired,\n content: PropTypes.string.isRequired,\n }).isRequired,\n open: PropTypes.bool.isRequired,\n setUiState: PropTypes.func.isRequired,\n isAuthenticated: PropTypes.func.isRequired,\n user: PropTypes.shape({\n impersonatedOrganizationId: PropTypes.string,\n }).isRequired,\n isAdmin: PropTypes.bool.isRequired,\n isORv4Admin: PropTypes.bool.isRequired,\n activeMessage: PropTypes.shape({}),\n};\n\nconst defaultProps = {\n activeMessage: null,\n};\n\nexport function UnstyledMissionCtrl({\n classes,\n open,\n setUiState,\n isAuthenticated,\n user,\n isAdmin,\n isORv4Admin,\n activeMessage,\n}) {\n let headerClass = classnames(classes.header);\n let navClass = classnames(classes.nav);\n let contentClass = classnames(classes.content);\n\n if (activeMessage) {\n headerClass = classnames(classes.header, classes.headerPlusCredBanner);\n navClass = classnames(classes.nav, classes.navPlusCredBanner);\n contentClass = classnames(classes.content, classes.contentPlusCredBanner);\n }\n\n if (user.impersonatedOrganizationId) {\n headerClass = classnames(classes.header, classes.headerPlusImpBanner);\n navClass = classnames(classes.nav, classes.navPlusImpBanner);\n contentClass = classnames(classes.content, classes.contentPlusImpBanner);\n }\n\n if (user.impersonatedOrganizationId && activeMessage) {\n headerClass = classnames(classes.header, classes.headerPlusImpCredBanner);\n navClass = classnames(classes.nav, classes.navPlusImpCredBanner);\n contentClass = classnames(classes.content, classes.contentPlusImpCredBanner);\n }\n\n const handleNavToggle = (val) => setUiState({ open: val });\n return (\n <div className={classes.missionCtrlWrapper}>\n <div className={classes.root}>\n <Banner />\n <Header\n className={headerClass}\n isOpen={open}\n handleNavToggle={handleNavToggle}\n user={user}\n isAdmin={isAdmin}\n isORv4Admin={isORv4Admin}\n />\n <Nav\n className={navClass}\n isOpen={open}\n handleNavToggle={handleNavToggle}\n isAuthenticated={isAuthenticated}\n isAdmin={isAdmin}\n />\n <div className={contentClass}>\n <MissionCtrlRoutes />\n </div>\n </div>\n <Footer />\n </div>\n );\n}\n\nUnstyledMissionCtrl.propTypes = propTypes;\nUnstyledMissionCtrl.defaultProps = defaultProps;\n\nconst appBar = 60;\nconst credBanner = 45;\nconst impBanner = 45;\n\nconst styles = (theme) => ({\n missionCtrlWrapper: {\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100vh',\n },\n root: {\n backgroundColor: theme.palette.background.default,\n display: 'flex',\n alignItems: 'stretch',\n flexGrow: 1,\n overflow: 'hidden',\n position: 'relative',\n },\n header: {\n zIndex: theme.zIndex.drawer + 1,\n height: appBar,\n top: 0,\n },\n headerPlusCredBanner: {\n top: credBanner,\n },\n headerPlusImpBanner: {\n top: impBanner,\n },\n headerPlusImpCredBanner: {\n top: impBanner + credBanner,\n },\n nav: {\n flex: '0 0 auto',\n paddingTop: appBar,\n minWidth: '220px',\n },\n navPlusCredBanner: {\n paddingTop: appBar + credBanner,\n },\n navPlusImpBanner: {\n paddingTop: appBar + impBanner,\n },\n navPlusImpCredBanner: {\n paddingTop: appBar + credBanner + impBanner,\n },\n content: {\n position: 'relative',\n flexGrow: 1,\n marginTop: appBar,\n flex: 2,\n maxWidth: '100%',\n minWidth: 0,\n padding: theme.spacing(1),\n },\n contentPlusCredBanner: {\n marginTop: appBar + credBanner,\n },\n contentPlusImpBanner: {\n marginTop: appBar + impBanner,\n },\n contentPlusImpCredBanner: {\n marginTop: appBar + credBanner + impBanner,\n },\n [theme.breakpoints.down('sm')]: {\n header: {\n zIndex: theme.zIndex.modal + 1,\n },\n nav: {\n width: 280,\n },\n logo: {\n height: 30,\n },\n },\n});\n\nexport default WithSpecifiedTheme(lightTheme)(withStyles(styles)(UnstyledMissionCtrl));\n","import { connect } from 'react-redux';\nimport { uiState } from 'react-redux-ui-state';\n\nimport MissionCtrl from './MissionCtrl';\nimport { selectors as userSelectors } from '../../dux/user';\nimport { selectors as orgSelectors } from '../../dux/org';\nimport getBannerNotificationsState from '../../dux/notifications/selectors';\n\nconst mapStateToProps = (state) => ({\n isAuthenticated: userSelectors.isAuthenticated(state),\n user: userSelectors.getIdentityState(state),\n isAdmin: userSelectors.isAdmin(state),\n isORv4Admin: userSelectors.isORv4Admin(state),\n org: orgSelectors.getOrgState(state),\n ...getBannerNotificationsState(state),\n});\n\nconst uiConfig = {\n persist: true,\n name: 'nav',\n state: () => ({\n open: false,\n }),\n};\n\nexport default uiState(uiConfig)(connect(mapStateToProps, null)(MissionCtrl));\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core';\nimport { ThemeProvider } from '@material-ui/styles';\nimport Paper from '@material-ui/core/Paper';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport Checkbox from '@material-ui/core/Checkbox';\nimport Done from '@material-ui/icons/Done';\nimport { Field, reduxForm, SubmissionError } from 'redux-form';\nimport { uiState } from 'react-redux-ui-state';\nimport jwt from 'jsonwebtoken';\n\nimport BusyButton from 'components/BusyButton/BusyButton';\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport WrappedTextField from 'components/WrappedTextField/WrappedTextField';\nimport { required, maxLength } from 'services/validationMsgs';\nimport { lightTheme } from '../App/App.theme';\n\nconst propTypes = {\n inviteTokenValidatedData: PropTypes.shape({\n newJwt: PropTypes.string,\n admin: PropTypes.string,\n invite: PropTypes.string,\n role: PropTypes.string,\n companyName: PropTypes.string,\n }).isRequired,\n acceptInvitation: PropTypes.func.isRequired,\n acceptInvitationRedirect: PropTypes.func.isRequired,\n submitting: PropTypes.bool.isRequired,\n valid: PropTypes.bool.isRequired,\n passwordLock: PropTypes.bool.isRequired,\n hasEight: PropTypes.bool.isRequired,\n hasLowercase: PropTypes.bool.isRequired,\n hasUppercase: PropTypes.bool.isRequired,\n hasNumsSpecialChars: PropTypes.bool.isRequired,\n terms: PropTypes.bool.isRequired,\n setUiState: PropTypes.func.isRequired,\n handleSubmit: PropTypes.func.isRequired,\n classes: PropTypes.shape({}).isRequired,\n};\n\nconst handleFormSubmissionReturn = (result) => {\n if (result.error) {\n throw new SubmissionError(result.formErrors);\n }\n};\n\nconst maxLength128 = maxLength(128);\n\nexport function UnstyledUserInvitationSignupPage({\n inviteTokenValidatedData,\n acceptInvitation,\n acceptInvitationRedirect,\n submitting,\n valid,\n passwordLock,\n hasEight,\n hasLowercase,\n hasUppercase,\n hasNumsSpecialChars,\n terms,\n setUiState,\n handleSubmit,\n classes,\n}) {\n const handleCheckBoxChange = () => {\n setUiState({\n terms: !terms,\n });\n };\n\n const checkLowercase = new RegExp(/[a-z]/);\n const checkUppercase = new RegExp(/[A-Z]/);\n const checkNumbers = new RegExp(/[0-9]/);\n const checkSpecialChars = new RegExp(/[!@#$%^&*(),.?\":{}|<>]/);\n\n const checkPasswordValidity = (event) => {\n const string = event.currentTarget.value;\n\n setUiState({\n hasEight: string.length >= 8,\n hasUppercase: checkUppercase.test(string),\n hasLowercase: checkLowercase.test(string),\n hasNumsSpecialChars: checkNumbers.test(string) || checkSpecialChars.test(string),\n });\n\n if (\n string.length >= 8 &&\n checkUppercase.test(string) &&\n checkLowercase.test(string) &&\n (checkNumbers.test(string) || checkSpecialChars.test(string))\n ) {\n setUiState({\n passwordLock: false,\n });\n } else {\n setUiState({\n passwordLock: true,\n });\n }\n };\n\n const { newJwt, admin, invite, role, companyName } = inviteTokenValidatedData;\n\n const decodedToken = jwt.decode(newJwt);\n const needsSignup = !decodedToken.isExistingUserWithoutOrg;\n\n const submitHandler = (data) =>\n acceptInvitation(newJwt, data, needsSignup)\n .then(handleFormSubmissionReturn)\n .then(acceptInvitationRedirect);\n\n return (\n <div className={classes.container}>\n <div className={classes.contentContainer}>\n <div className={classes.logoContainer}>\n <img\n src=\"/images/logos/or-logo-white-no-tagline.svg\"\n className={classes.logo}\n alt=\"Object Rocket\"\n />\n </div>\n <div className={classes.textBlobContainer}>\n <ORTypography align=\"center\" variant=\"h3\" className={classes.acceptText}>\n Invitation Accepted!\n </ORTypography>\n <ORTypography variant=\"h4\" className={classes.verifyText}>\n Verify Your Information\n </ORTypography>\n <ORTypography align=\"center\" className={classes.inviteText}>\n {admin}\n has invited you to join \n <br />\n {companyName}\n as a \n {role}\n .\n <br />\n <em>You will be redirected to a login screen.</em>\n </ORTypography>\n </div>\n\n <ThemeProvider theme={lightTheme}>\n <form className={classes.formContainer} onSubmit={handleSubmit(submitHandler)}>\n <Paper>\n {needsSignup && (\n <div className={classes.fieldContainer}>\n <Field\n name=\"email\"\n placeholder={invite}\n component={WrappedTextField}\n helperText=\"Don't worry, we won't spam your inbox.\"\n fullWidth\n variant=\"outlined\"\n disabled\n className={classes.field}\n />\n <Field\n name=\"firstname\"\n placeholder=\"First Name\"\n component={WrappedTextField}\n validate={[required]}\n fullWidth\n variant=\"outlined\"\n className={classes.field}\n />\n <Field\n name=\"lastname\"\n placeholder=\"Last Name\"\n component={WrappedTextField}\n validate={[required]}\n fullWidth\n variant=\"outlined\"\n className={classes.field}\n />\n <Field\n variant=\"outlined\"\n name=\"password\"\n placeholder=\"Password\"\n type=\"password\"\n component={WrappedTextField}\n validate={[maxLength128, required]}\n onChange={checkPasswordValidity}\n props={{ InputLabelProps: { shrink: true, className: classes.inputLabel } }}\n fullWidth\n className={classes.field}\n />\n <ORTypography variant=\"caption\">\n Passwords need to contain:\n <br />\n - at least 8 characters\n {hasEight && (\n <Done classes={{ root: classes.checkmarkRoot }} fontSize=\"small\" />\n )}\n <br />\n - uppercase letters\n {hasUppercase && (\n <Done classes={{ root: classes.checkmarkRoot }} fontSize=\"small\" />\n )}\n <br />\n - lowercase letters\n {hasLowercase && (\n <Done classes={{ root: classes.checkmarkRoot }} fontSize=\"small\" />\n )}\n <br />\n - numbers or special characters\n {hasNumsSpecialChars && (\n <Done classes={{ root: classes.checkmarkRoot }} fontSize=\"small\" />\n )}\n </ORTypography>\n </div>\n )}\n <div className={classes.termsCheckbox}>\n <FormControlLabel\n classes={{ root: classes.termsCheckboxControl }}\n control={<Checkbox />}\n onChange={handleCheckBoxChange}\n checked={terms}\n label=\"I agree to the Terms and Conditions\"\n />\n </div>\n </Paper>\n <div className={classes.buttonContainer}>\n <BusyButton\n size=\"large\"\n name=\"submit\"\n type=\"submit\"\n fullWidth\n loading={submitting}\n disabled={needsSignup ? !terms || !valid || passwordLock || !invite : !terms}\n variant=\"contained\"\n color=\"primary\"\n className={classes.acceptInviteButton}\n >\n <span className={classes.buttonText}>Confirm</span>\n </BusyButton>\n </div>\n </form>\n </ThemeProvider>\n </div>\n </div>\n );\n}\n\nUnstyledUserInvitationSignupPage.propTypes = propTypes;\n\nconst styles = (theme) => ({\n acceptInviteButton: {\n backgroundColor: theme.customColors.orange,\n },\n checkmarkRoot: {\n color: theme.palette.secondary.main,\n verticalAlign: 'top',\n },\n container: {\n overflow: 'hidden',\n background: 'radial-gradient(gray, #000)',\n backgroundSize: 'cover',\n height: '100%',\n },\n contentContainer: {\n position: 'absolute',\n display: 'flex',\n flexFlow: 'column nowrap',\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n },\n logoContainer: {\n margin: theme.spacing(2),\n },\n textBlobContainer: {\n display: 'flex',\n flexFlow: 'column nowrap',\n alignItems: 'center',\n justifyContent: 'space-around',\n margin: theme.spacing(3),\n },\n acceptText: {\n margin: theme.spacing(1),\n fontWeight: '500',\n },\n verifyText: {\n margin: theme.spacing(1),\n fontWeight: '500',\n },\n inviteText: {\n margin: theme.spacing(1),\n },\n formContainer: {\n display: 'flex',\n flexFlow: 'column nowrap',\n margin: theme.spacing(1),\n maxWidth: theme.spacing(75),\n },\n fieldContainer: {\n margin: theme.spacing(1),\n padding: theme.spacing(1),\n },\n field: {\n marginTop: theme.spacing(3),\n marginBottom: theme.spacing(1),\n },\n inputLabel: {\n color: theme.palette.text.primary,\n },\n termsCheckbox: {\n margin: theme.spacing(2),\n },\n termsCheckboxControl: {\n '& span': {\n fontSize: theme.spacing(1.75),\n fontWeight: '400',\n fontStyle: 'italic',\n },\n },\n buttonContainer: {\n marginTop: theme.spacing(2),\n width: '100%',\n },\n});\n\nexport const uiConfig = {\n name: 'userInviteSignup',\n state: () => ({\n passwordLock: true,\n terms: false,\n hasEight: false,\n hasLowercase: false,\n hasUppercase: false,\n hasNumsSpecialChars: false,\n }),\n};\n\nexport default uiState(uiConfig)(\n withStyles(styles)(reduxForm({ form: 'userInvite' })(UnstyledUserInvitationSignupPage)),\n);\n","import { connect } from 'react-redux';\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nimport { actionCreators } from 'dux/usersInviteSignup';\nimport getUsersInviteSignupState from 'dux/usersInviteSignup/selectors';\nimport ErrorPage from 'components/ErrorPage/ErrorPage';\nimport LoadingPlaceholder from 'components/LoadingPlaceholder/LoadingPlaceholder';\nimport UserInvitationSignup from './UserInvitationSignup';\n\nconst propTypes = {\n error: PropTypes.shape({\n status: PropTypes.number,\n response: PropTypes.shape({\n error: PropTypes.string,\n }),\n }).isRequired,\n isLoading: PropTypes.bool.isRequired,\n validateInviteToken: PropTypes.func.isRequired,\n location: PropTypes.shape({\n search: PropTypes.string,\n }).isRequired,\n};\n\nclass UserInvitationSignupContainer extends React.Component {\n componentDidMount() {\n const {\n validateInviteToken,\n location: { search },\n } = this.props;\n validateInviteToken(search.slice(search.indexOf('=') + 1));\n }\n\n render() {\n const { error, isLoading } = this.props;\n if (isLoading) {\n return <LoadingPlaceholder />;\n }\n return error ? (\n <ErrorPage errorStatusCode={`${error.status}`} error={error.response} />\n ) : (\n <UserInvitationSignup {...this.props} />\n );\n }\n}\n\nconst mapStateToProps = (state) => ({\n ...getUsersInviteSignupState(state),\n});\n\nconst mapDispatchToProps = {\n validateInviteToken: actionCreators.validateInviteToken,\n acceptInvitation: actionCreators.acceptInvitation,\n acceptInvitationRedirect: actionCreators.acceptInvitationRedirect,\n};\n\nUserInvitationSignupContainer.propTypes = propTypes;\n\nexport default connect(mapStateToProps, mapDispatchToProps)(UserInvitationSignupContainer);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Field, reduxForm, SubmissionError } from 'redux-form';\nimport { withStyles, ThemeProvider } from '@material-ui/styles';\nimport MailOutlineIcon from '@material-ui/icons/MailOutline';\nimport LockOutlinedIcon from '@material-ui/icons/LockOutlined';\nimport KeyboardArrowRightIcon from '@material-ui/icons/KeyboardArrowRight';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport Checkbox from '@material-ui/core/Checkbox';\nimport Done from '@material-ui/icons/Done';\n\nimport BusyButton from 'components/BusyButton/BusyButton';\nimport WrappedTextField from 'components/WrappedTextField/WrappedTextField';\nimport ORTypography from 'components/ORTypography/ORTypography';\nimport { required, maxLength } from 'services/validationMsgs';\nimport { lightTheme } from '../App/App.theme';\n\nconst propTypes = {\n classes: PropTypes.shape({}).isRequired,\n handleSubmit: PropTypes.func.isRequired,\n logInAWS: PropTypes.func.isRequired,\n location: PropTypes.shape({\n search: PropTypes.string,\n pathname: PropTypes.string,\n }).isRequired,\n valid: PropTypes.bool.isRequired,\n submitting: PropTypes.bool.isRequired,\n error: PropTypes.string,\n};\n\nconst defaultProps = {\n error: null,\n};\n\nconst maxLength128 = maxLength(128);\n\nexport function UnstyledAwsSignupPage({\n classes,\n handleSubmit,\n logInAWS,\n location,\n valid,\n submitting,\n error,\n}) {\n const checkLowercase = new RegExp(/[a-z]/);\n const checkUppercase = new RegExp(/[A-Z]/);\n const checkNumbers = new RegExp(/[0-9]/);\n const checkSpecialChars = new RegExp(/[!@#$%^&*(),.?\":{}|<>]/);\n\n const [hasEight, checkHasEight] = React.useState(false);\n const [hasUppercase, checkHasUppercase] = React.useState(false);\n const [hasLowercase, checkHasLowercase] = React.useState(false);\n const [hasNumsSpecialChars, checkHasNumsSpecialChars] = React.useState(false);\n const [validPassword, setValidPassword] = React.useState(false);\n\n const [terms, selectTerms] = React.useState(false);\n\n const checkPasswordValidity = (event) => {\n const string = event.currentTarget.value;\n checkHasEight(string.length >= 8);\n checkHasUppercase(checkUppercase.test(string));\n checkHasLowercase(checkLowercase.test(string));\n checkHasNumsSpecialChars(checkNumbers.test(string) || checkSpecialChars.test(string));\n\n if (\n string.length >= 8 &&\n checkUppercase.test(string) &&\n checkLowercase.test(string) &&\n (checkNumbers.test(string) || checkSpecialChars.test(string))\n ) {\n setValidPassword(true);\n } else {\n setValidPassword(false);\n }\n };\n\n const handleCheckBoxChange = () => {\n selectTerms(!terms);\n };\n\n const handleFormSubmissionReturn = (result) => {\n if (!result) return;\n throw new SubmissionError({\n _error: result.description || result.code || 'There was an error with your sign up.',\n });\n };\n\n const submitHandler = (data) => {\n const awsToken = location.search.split('=')[1];\n return logInAWS(data, awsToken).then(handleFormSubmissionReturn);\n };\n\n const errorMessageDisplay = (err) => (\n <div className={classes.errorTextHeader}>\n <span className={classes.errorText}>\n {err}\n Please contact \n <a\n href=\"https://objectrocket.zendesk.com/hc/en-us\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Support\n </a>\n </span>\n </div>\n );\n\n const wrappedIcon = (icon, source, altText) => (\n <div className={classes.fieldIcon}>{!icon ? <img src={source} alt={altText} /> : icon}</div>\n );\n\n const wrappedEmailIcon = wrappedIcon(<MailOutlineIcon color=\"secondary\" />);\n const wrappedPasswordIcon = wrappedIcon(<LockOutlinedIcon color=\"secondary\" />);\n const wrappedPersonIcon = wrappedIcon(\n false,\n 'https://app.objectrocket.cloud/images/logos/lock_person_add_24px.svg',\n 'Name',\n );\n\n const adornmentObject = (value, position) => ({\n value,\n position,\n });\n\n return (\n <div className={classes.container}>\n <div className={classes.contentContainer}>\n <div className={classes.textBlobContainer}>\n <ORTypography align=\"center\" variant=\"h3\" className={classes.welcomeText}>\n Welcome to \n <span className={classes.orangeText}>ObjectRocket</span>\n </ORTypography>\n <ORTypography align=\"center\" variant=\"h5\" className={classes.createLoginText}>\n Thank you for subscribing to ObjectRocket Datastores, please create a login to get\n started.\n </ORTypography>\n </div>\n\n <section className={classes.card}>\n <div className={classes.logo}>\n <img\n src=\"https://app.objectrocket.cloud/images/logos/or-logo.svg\"\n alt=\"ObjectRocket logo\"\n />\n </div>\n <div className={classes.formHeader}>\n <ORTypography className={classes.formHeaderText}>Sign Up</ORTypography>\n </div>\n <ThemeProvider theme={lightTheme}>\n <form className={classes.form} onSubmit={handleSubmit(submitHandler)}>\n <div className={classes.fieldContainer}>\n <Field\n fullWidth\n component={WrappedTextField}\n className={classes.field}\n variant=\"outlined\"\n placeholder=\"Email\"\n name=\"username\"\n label=\"\"\n validate={[required]}\n adornment={adornmentObject(wrappedEmailIcon, 'start')}\n />\n <Field\n fullWidth\n component={WrappedTextField}\n className={classes.field}\n variant=\"outlined\"\n placeholder=\"Password\"\n name=\"password\"\n type=\"password\"\n label=\"\"\n onChange={checkPasswordValidity}\n validate={[maxLength128, required]}\n adornment={adornmentObject(wrappedPasswordIcon, 'start')}\n />\n <Field\n fullWidth\n component={WrappedTextField}\n className={classes.field}\n variant=\"outlined\"\n placeholder=\"First Name\"\n name=\"firstname\"\n label=\"\"\n validate={[required]}\n adornment={adornmentObject(wrappedPersonIcon, 'start')}\n />\n <Field\n fullWidth\n component={WrappedTextField}\n className={classes.field}\n variant=\"outlined\"\n placeholder=\"Last Name\"\n name=\"lastname\"\n label=\"\"\n validate={[required]}\n adornment={adornmentObject(wrappedPersonIcon, 'start')}\n />\n </div>\n <ORTypography variant=\"caption\" className={classes.passwordRequirementText}>\n Passwords need to contain:\n <br />\n - at least 8 characters\n {hasEight && <Done classes={{ root: classes.checkmarkRoot }} fontSize=\"small\" />}\n <br />\n - uppercase letters\n {hasUppercase && (\n <Done classes={{ root: classes.checkmarkRoot }} fontSize=\"small\" />\n )}\n <br />\n - lowercase letters\n {hasLowercase && (\n <Done classes={{ root: classes.checkmarkRoot }} fontSize=\"small\" />\n )}\n <br />\n - numbers or special characters\n {hasNumsSpecialChars && (\n <Done classes={{ root: classes.checkmarkRoot }} fontSize=\"small\" />\n )}\n </ORTypography>\n {!submitting && error && errorMessageDisplay(error)}\n <div className={classes.checkboxContainer}>\n <FormControlLabel\n classes={{ root: classes.termsCheckboxControl }}\n control={<Checkbox />}\n onChange={handleCheckBoxChange}\n checked={terms}\n label={\n <span>\n I agree to the Objectrocket \n <a\n href=\"https://www.objectrocket.com/terms-of-service\"\n className={classes.termsLinkText}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Terms of Service\n </a>\n </span>\n }\n />\n </div>\n <BusyButton\n size=\"large\"\n name=\"submit\"\n type=\"submit\"\n fullWidth\n loading={submitting}\n disabled={!valid || !terms || !validPassword}\n className={classes.button}\n variant=\"contained\"\n color=\"primary\"\n >\n <div className={classes.buttonText}>\n Sign Up\n <KeyboardArrowRightIcon />\n </div>\n </BusyButton>\n </form>\n </ThemeProvider>\n </section>\n </div>\n </div>\n );\n}\n\nUnstyledAwsSignupPage.propTypes = propTypes;\nUnstyledAwsSignupPage.defaultProps = defaultProps;\n\nconst styles = (theme) => ({\n container: {\n overflow: 'hidden',\n background: 'radial-gradient(gray, #000)',\n backgroundSize: 'cover',\n height: '100%',\n },\n contentContainer: {\n position: 'absolute',\n display: 'flex',\n flexFlow: 'column nowrap',\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n },\n textBlobContainer: {\n display: 'flex',\n flexFlow: 'column nowrap',\n alignItems: 'center',\n justifyContent: 'space-around',\n margin: theme.spacing(2),\n },\n welcomeText: {\n margin: theme.spacing(1),\n },\n orangeText: {\n color: theme.customColors.orange,\n },\n createLoginText: {\n margin: theme.spacing(1),\n fontWeight: '500',\n },\n field: {\n minHeight: theme.spacing(9.5),\n },\n fieldContainer: {\n margin: `0px ${theme.spacing(1)}px`,\n padding: `0px ${theme.spacing(1)}px`,\n },\n form: {\n marginTop: '1rem',\n display: 'flex',\n flexDirection: 'column',\n },\n formHeader: {\n color: theme.customColors.mediumGrey,\n borderBottom: `1px solid ${theme.customColors.mediumGrey}`,\n textAlign: 'center',\n margin: `${theme.spacing(1)}px 0px`,\n paddingBottom: '8px',\n },\n card: {\n margin: 'auto',\n width: '350px',\n backgroundColor: '#fff',\n },\n checkboxContainer: {\n backgroundColor: theme.customColors.coolGrey,\n display: 'flex',\n flexFlow: 'row nowrap',\n alignItems: 'center',\n justifyContent: 'space-around',\n },\n termsCheckboxControl: {\n '& span:first-child span': {},\n '& span:last-child': {\n fontSize: theme.spacing(1.75),\n fontWeight: '400',\n color: theme.customColors.black,\n },\n },\n button: {\n '& :disabled': {\n backgroundColor: theme.customColors.mediumGrey,\n borderRadius: 'unset',\n },\n '& :not(disabled)': {\n borderRadius: 'unset ',\n },\n },\n buttonText: {\n display: 'flex',\n alignItems: 'center',\n color: theme.customColors.white,\n minHeight: theme.spacing(8),\n },\n logo: {\n padding: '1.5rem 2.5rem',\n backgroundColor: theme.customColors.coolGrey,\n },\n fieldIcon: {\n backgroundColor: theme.customColors.coolGrey,\n padding: '13px',\n marginLeft: '-13.5px',\n borderBottomLeftRadius: '3px',\n borderTopLeftRadius: '3px',\n },\n termsLinkText: {\n textDecoration: 'none',\n },\n errorTextHeader: {\n textAlign: 'center',\n },\n errorText: {\n color: theme.customColors.red,\n },\n passwordRequirementText: {\n color: theme.customColors.black,\n marginLeft: theme.spacing(2),\n marginBottom: theme.spacing(1),\n lineHeight: '26px',\n },\n checkmarkRoot: {\n color: theme.palette.secondary.main,\n verticalAlign: 'text-bottom',\n },\n});\n\nexport default withStyles(styles)(\n reduxForm({\n form: 'awsSignupForm',\n destroyOnUnmount: true,\n })(UnstyledAwsSignupPage),\n);\n","import { connect } from 'react-redux';\n\nimport AwsSignupPage from './AwsSignupPage';\nimport { actionCreators } from '../../dux/user';\n\nconst mapDispatchToProps = {\n logInAWS: actionCreators.logInAWS,\n};\n\nexport default connect(null, mapDispatchToProps)(AwsSignupPage);\n","/**\n * Page that, when visited, initiates log in\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport LoadingPlaceholder from '../LoadingPlaceholder/LoadingPlaceholder';\n\nconst propTypes = {\n logInHandler: PropTypes.func.isRequired,\n location: PropTypes.shape({\n state: PropTypes.shape({\n from: PropTypes.string,\n }),\n }),\n};\n\nconst defaultProps = {\n location: null,\n};\n\nexport default class LoginPage extends React.Component {\n componentDidMount() {\n const { location, logInHandler } = this.props;\n const verifiedLocation = location && location.state ? location.state.from : null;\n logInHandler(verifiedLocation);\n }\n\n render() {\n return <LoadingPlaceholder />;\n }\n}\n\nLoginPage.propTypes = propTypes;\nLoginPage.defaultProps = defaultProps;\n","import { connect } from 'react-redux';\n\nimport LoginPage from './LoginPage';\nimport { actionCreators } from '../../dux/user';\n\nconst mapDispatchToProps = {\n logInHandler: actionCreators.logIn,\n};\n\nexport default connect(null, mapDispatchToProps)(LoginPage);\n","/**\n * Page that, when visited, initiates log out\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nimport LoadingPlaceholder from '../LoadingPlaceholder/LoadingPlaceholder';\n\nconst propTypes = {\n logOutHandler: PropTypes.func.isRequired,\n};\n\nconst defaultProps = {};\n\nexport default class LogoutPage extends React.Component {\n componentDidMount() {\n const { logOutHandler } = this.props;\n logOutHandler();\n }\n\n render() {\n return <LoadingPlaceholder />;\n }\n}\n\nLogoutPage.propTypes = propTypes;\nLogoutPage.defaultProps = defaultProps;\n","import { connect } from 'react-redux';\n\nimport LogoutPage from './LogoutPage';\nimport { actionCreators } from '../../dux/user';\n\nconst mapDispatchToProps = {\n logOutHandler: actionCreators.logOut,\n};\n\nexport default connect(null, mapDispatchToProps)(LogoutPage);\n","/**\n * Component that passes the desired feature flag's current and previous\n * variation values into a render function passed as a prop\n */\nimport PropTypes from 'prop-types';\n\nconst propTypes = {\n flags: PropTypes.object, // eslint-disable-line react/forbid-prop-types\n flagKey: PropTypes.string.isRequired,\n defaultValue: PropTypes.any, // eslint-disable-line react/forbid-prop-types\n render: PropTypes.func.isRequired,\n};\n\nfunction FlagVariation({ flags, flagKey, defaultValue, render }) {\n const val = flags ? flags[flagKey] : null;\n let current = val && Object.prototype.hasOwnProperty.call(val, 'current') ? val.current : val;\n current =\n (current === null || current === undefined) && defaultValue !== undefined\n ? defaultValue\n : current;\n const previous =\n val && Object.prototype.hasOwnProperty.call(val, 'previous') ? val.previous : undefined;\n return render(current, previous);\n}\n\nFlagVariation.propTypes = propTypes;\n\nexport default FlagVariation;\n","import { connect } from 'react-redux';\n\nimport FlagVariation from './FlagVariation';\nimport { selectors } from '../../dux/user';\n\nconst mapStateToProps = (state) => ({\n flags: selectors.getFeatureFlagsState(state).flags,\n});\n\nexport default connect(mapStateToProps, {})(FlagVariation);\n","/**\n * Placeholder page for company details\n */\nimport React from 'react';\nimport FlagEnabledContainer from '../FlagEnabled/FlagEnabledContainer';\nimport FlagVariationContainer from '../FlagVariation/FlagVariationContainer';\n\nfunction AboutPage() {\n return (\n <div>\n <h1>About ObjectRocket</h1>\n <p>We host databases.</p>\n <FlagEnabledContainer flagKey=\"test\">\n <p>This text will be shown if the ‘test’ feature flag is enabled.</p>\n </FlagEnabledContainer>\n <FlagVariationContainer\n flagKey=\"variation-test\"\n defaultValue=\"no value\"\n render={(current) => (\n <p>\n This is a variation flag displays a string indicating if you are logged in as the e2e\n test user:\n {current}\n </p>\n )}\n />\n </div>\n );\n}\n\nexport default AboutPage;\n","/**\n * Page that, when visited, updates the session and routes user back to root.\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nimport LoadingPlaceholder from '../LoadingPlaceholder/LoadingPlaceholder';\n\nconst propTypes = {\n updateSessionHandler: PropTypes.func.isRequired,\n};\n\nconst defaultProps = {};\n\nexport default class UpdateSessionPage extends React.Component {\n componentDidMount() {\n const { updateSessionHandler } = this.props;\n updateSessionHandler('/');\n }\n\n render() {\n return <LoadingPlaceholder />;\n }\n}\n\nUpdateSessionPage.propTypes = propTypes;\nUpdateSessionPage.defaultProps = defaultProps;\n","import { connect } from 'react-redux';\n\nimport UpdateSessionPage from './UpdateSessionPage';\nimport { actionCreators } from '../../dux/user';\n\nconst mapDispatchToProps = {\n updateSessionHandler: actionCreators.updateSession,\n};\n\nexport default connect(null, mapDispatchToProps)(UpdateSessionPage);\n","/**\n * Page that receives the login token(s) via the URL and initiates the process\n * of setting the user's session\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nimport LoadingPlaceholder from '../LoadingPlaceholder/LoadingPlaceholder';\n\nconst propTypes = {\n setSessionHandler: PropTypes.func.isRequired,\n originatingURL: PropTypes.string,\n location: PropTypes.shape({\n hash: PropTypes.string,\n }).isRequired,\n};\n\nconst defaultProps = {\n originatingURL: null,\n};\n\nclass SessionLoaderPage extends React.Component {\n componentDidMount() {\n const { location, originatingURL, setSessionHandler } = this.props;\n setSessionHandler(location, originatingURL);\n }\n\n render() {\n return <LoadingPlaceholder />;\n }\n}\n\nSessionLoaderPage.propTypes = propTypes;\nSessionLoaderPage.defaultProps = defaultProps;\n\nexport default SessionLoaderPage;\n","import { connect } from 'react-redux';\n\nimport SessionLoaderPage from './SessionLoaderPage';\nimport { actionCreators, selectors } from '../../dux/user';\n\nconst mapStateToProps = (state) => ({\n originatingURL: selectors.getSessionState(state).originatingURL,\n});\n\nconst mapDispatchToProps = {\n setSessionHandler: actionCreators.setSession,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(SessionLoaderPage);\n","/**\n * Placeholder page for organization details\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/styles';\n\nconst styles = () => ({\n label: {\n verticalAlign: 'top',\n paddingRight: '3px',\n },\n});\n\nconst propTypes = {\n accessToken: PropTypes.string.isRequired,\n classes: PropTypes.shape({\n label: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nexport function UnstyledOrganizationPage({ accessToken, classes }) {\n return (\n <div>\n <h1>Organization</h1>\n <div>\n <label htmlFor=\"accessToken\" className={classes.label}>\n <textarea\n id=\"accessToken\"\n name=\"accessToken\"\n value={accessToken}\n readOnly\n rows=\"20\"\n cols=\"40\"\n />\n Access Token\n </label>\n </div>\n </div>\n );\n}\n\nUnstyledOrganizationPage.propTypes = propTypes;\n\nexport default withStyles(styles)(UnstyledOrganizationPage);\n","import { connect } from 'react-redux';\n\nimport { selectors } from '../../dux/user';\nimport OrganizationPage from './OrganizationPage';\n\nconst mapStateToProps = (state) => ({\n accessToken: selectors.getCredentialsState(state).accessToken,\n});\n\nexport default connect(mapStateToProps, {})(OrganizationPage);\n","/**\n * Page that, when visited, initiates log in\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport LoadingPlaceholder from '../LoadingPlaceholder/LoadingPlaceholder';\n\nconst propTypes = {\n logInHandler: PropTypes.func.isRequired,\n location: PropTypes.shape({\n state: PropTypes.shape({\n from: PropTypes.string,\n }),\n }),\n};\n\nconst defaultProps = {\n location: null,\n};\n\nexport default class LoginRaxSsoPage extends React.Component {\n componentDidMount() {\n const { location, logInHandler } = this.props;\n const verifiedLocation = location && location.state ? location.state.from : null;\n logInHandler(verifiedLocation);\n }\n\n render() {\n return <LoadingPlaceholder />;\n }\n}\n\nLoginRaxSsoPage.propTypes = propTypes;\nLoginRaxSsoPage.defaultProps = defaultProps;\n","import { connect } from 'react-redux';\n\nimport LoginRaxSsoPage from './LoginRaxSsoPage';\nimport { actionCreators } from '../../dux/user';\n\nconst mapDispatchToProps = {\n logInHandler: actionCreators.logInSSO,\n};\n\nexport default connect(null, mapDispatchToProps)(LoginRaxSsoPage);\n","/**\n * Component that includes all public routes in the application\n */\nimport React from 'react';\nimport { Route } from 'react-router-dom';\n\nimport UserInvitationSignupContainer from 'components/UserInvitationSignup/UserInvitationSignupContainer';\nimport AwsSignupPageContainer from 'components/AwsSignupPage/AwsSignupPageContainer';\nimport LoginPageContainer from '../../../LoginPage/LoginPageContainer';\nimport LogoutPageContainer from '../../../LogoutPage/LogoutPageContainer';\nimport AboutPage from '../../../AboutPage/AboutPage';\nimport UpdateSessionContainer from '../../../UpdateSessionPage/UpdateSessionPageContainer';\nimport SessionLoaderPageContainer from '../../../SessionLoaderPage/SessionLoaderPageContainer';\nimport OrganizationPageContainer from '../../../OrganizationPage/OrganizationPageContainer';\nimport ErrorPageContainer from '../../../ErrorPage/ErrorPageContainer';\nimport LoginRaxSsoPage from '../../../LoginRaxSsoPage/LoginRaxSsoPageContainer';\n\nfunction PublicRoutes() {\n return [\n <Route exact key=\"login\" path=\"/login\" component={LoginPageContainer} />,\n <Route exact key=\"raxsso\" path=\"/raxsso\" component={LoginRaxSsoPage} />,\n <Route exact key=\"logout\" path=\"/logout\" component={LogoutPageContainer} />,\n <Route exact key=\"updatesession\" path=\"/updatesession\" component={UpdateSessionContainer} />,\n <Route\n exact\n path=\"/session-callback\"\n key=\"sessionCallback\"\n component={SessionLoaderPageContainer}\n />,\n <Route exact path=\"/about\" component={AboutPage} key=\"about\" />,\n <Route exact key=\"organization\" path=\"/organization\" component={OrganizationPageContainer} />,\n <Route\n exact\n key=\"userInvitation\"\n path=\"/accept-invite/\"\n component={UserInvitationSignupContainer}\n />,\n <Route exact key=\"awsSignup\" path=\"/awssignup\" component={AwsSignupPageContainer} />,\n <Route exact key=\"error\" path=\"/error/:statusCode\" component={ErrorPageContainer} />,\n <Route\n exact\n key=\"error\"\n path=\"/error\"\n render={() => <ErrorPageContainer match={{ params: { statusCode: '404' } }} />}\n />,\n ];\n}\n\nexport default PublicRoutes;\n","/**\n * Component to redirect users to the sign up flow\n * */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { Redirect } from 'react-router-dom';\n\nconst propTypes = {\n location: PropTypes.shape({\n pathname: PropTypes.string,\n }).isRequired,\n};\n\nfunction SignUpRedirect({ location }) {\n return (\n <Redirect\n to={{\n pathname: '/sign-up',\n state: { from: location.pathname },\n }}\n />\n );\n}\n\nSignUpRedirect.propTypes = propTypes;\n\nexport default SignUpRedirect;\n","/**\n * Main component for managing top-level routes, including public routes\n *\n * Note: The <Switch /> will render the first route that matches\n * and effectively matches the last pathless-route (by default, the not found page)\n * if there are no other matching routes.\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { Route, Switch } from 'react-router-dom';\n\nimport SignUpContainer from 'components/SignUp/SignUpContainer';\nimport MissionCtrlContainer from '../../MissionCtrl/MissionCtrlContainer';\nimport AuthorizedRouteContainer from '../../AuthorizedRoute/AuthorizedRouteContainer';\nimport PublicRoutes from './PublicRoutes/PublicRoutes';\nimport SignUpRedirect from '../../SignUp/SignUpRedirect/SignUpRedirect';\nimport InstancesPageRedirect from '../../MissionCtrl/InstancesPageRedirect/InstancesPageRedirectContainer';\nimport ErrorPageContainer from '../../ErrorPage/ErrorPageContainer';\n\nconst propTypes = {\n isAuthenticated: PropTypes.func.isRequired,\n needsSignUpSteps: PropTypes.bool.isRequired,\n};\n\nfunction Routes({ isAuthenticated, needsSignUpSteps }) {\n const isNotSignedUp = isAuthenticated() && needsSignUpSteps;\n // If the user is signed up, add a catch-all route that redirects to the signUp\n // flow. Otherwise, add the public routes so they can be accessed.\n const additionalRoute = isNotSignedUp ? (\n <AuthorizedRouteContainer component={SignUpRedirect} />\n ) : (\n <AuthorizedRouteContainer path=\"/mission-ctrl\" component={MissionCtrlContainer} />\n );\n\n return (\n <Switch>\n {PublicRoutes()}\n <AuthorizedRouteContainer path=\"/sign-up\" component={SignUpContainer} />\n <AuthorizedRouteContainer path=\"/aws_onboarding\" component={SignUpContainer} />\n {additionalRoute}\n <Route exact path=\"/\" component={InstancesPageRedirect} />\n <Route render={() => <ErrorPageContainer match={{ params: { statusCode: '404' } }} />} />\n </Switch>\n );\n}\n\nRoutes.propTypes = propTypes;\n\nexport default Routes;\n","import { connect } from 'react-redux';\n\nimport Routes from './Routes';\nimport { selectors } from '../../../dux/user';\nimport { needsSignUpSteps } from '../../../dux/org/selectors';\n\nconst mapStateToProps = (state) => ({\n isAuthenticated: selectors.isAuthenticated(state),\n needsSignUpSteps: needsSignUpSteps(state),\n // Need to mitigate blocked updates: https://github.com/ReactTraining/react-router/blob/master/packages/react-router/docs/guides/blocked-updates.md\n location: state.router.location,\n});\n\nexport default connect(mapStateToProps, null)(Routes);\n","/**\n * Component for initializing Launch Darkly and observing user changes that\n * may require re-identifying the user\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nconst propTypes = {\n user: PropTypes.shape({\n id: PropTypes.string,\n email: PropTypes.string,\n name: PropTypes.string,\n }),\n getFlagsHandler: PropTypes.func.isRequired,\n unsubscribeHandler: PropTypes.func.isRequired,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n};\n\nconst defaultProps = {\n user: {},\n children: null,\n};\n\nclass FeatureFlags extends React.Component {\n componentDidMount() {\n const { user, getFlagsHandler } = this.props;\n getFlagsHandler(user);\n }\n\n shouldComponentUpdate(nextProps) {\n const { user, getFlagsHandler } = this.props;\n // Only test fields on user state that are relevant for feature switch\n return (\n nextProps.getFlagsHandler !== getFlagsHandler ||\n nextProps.user.id !== user.id ||\n nextProps.user.email !== user.email ||\n nextProps.user.name !== user.name\n );\n }\n\n componentDidUpdate() {\n const { user, getFlagsHandler } = this.props;\n getFlagsHandler(user);\n }\n\n componentWillUnmount() {\n const { unsubscribeHandler } = this.props;\n unsubscribeHandler();\n }\n\n render() {\n const { children } = this.props;\n return children;\n }\n}\n\nFeatureFlags.propTypes = propTypes;\nFeatureFlags.defaultProps = defaultProps;\n\nexport default FeatureFlags;\n","import { connect } from 'react-redux';\n\nimport FeatureFlags from './FeatureFlags';\nimport { actionCreators, selectors } from '../../../dux/user';\n\nconst mapStateToProps = (state) => ({\n user: selectors.getIdentityState(state),\n});\n\nconst mapDispatchToProps = {\n getFlagsHandler: actionCreators.getFeatureFlags,\n unsubscribeHandler: actionCreators.unsubscribeFromFeatureFlags,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(FeatureFlags);\n","/**\n * Component for refreshing the session on a set interval.\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport MorePropTypes from 'airbnb-prop-types';\n\nconst propTypes = {\n isAuthenticated: PropTypes.func.isRequired,\n updateSessionHandler: PropTypes.func.isRequired,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n expirationDate: MorePropTypes.or([MorePropTypes.explicitNull, PropTypes.number]).isRequired,\n startDate: MorePropTypes.or([MorePropTypes.explicitNull, PropTypes.number]).isRequired,\n};\n\nconst defaultProps = {\n children: null,\n};\n\nclass UpdateSession extends React.Component {\n static getDerivedStateFromProps(props, state) {\n const { isAuthenticated, updateSessionHandler, startDate, expirationDate } = props;\n const { running, intervalId } = state;\n let newState = state;\n if (isAuthenticated() && !running) {\n newState = UpdateSession.calculateAndSetInterval(\n startDate,\n expirationDate,\n updateSessionHandler,\n );\n } else if (!isAuthenticated() && running) {\n clearInterval(intervalId);\n newState = {\n running: false,\n intervalId: null,\n };\n }\n return newState;\n }\n\n /**\n * Calculates interval. If the interval calculated is past the expiration\n * update the session.\n *\n * @param startDate {number} - The timestamp when the token was issued (in ms).\n * @param expirationDate {number} - The timestamp when the token expires (in ms).\n * @param updateSessionHandler {func} - The handler to update the session.\n *\n * @returns {object} - New state for component.\n */\n static calculateAndSetInterval(startDate, expirationDate, updateSessionHandler) {\n const updateTime = UpdateSession.getIntervalInMilliseconds(startDate, expirationDate);\n // If the calculated refesh time is after the token expiration update the session now.\n const currentTimeInMS = new Date().getTime();\n if (currentTimeInMS + updateTime >= expirationDate) {\n updateSessionHandler();\n return {\n running: false,\n intervalId: null,\n };\n }\n return {\n running: true,\n intervalId: setInterval(updateSessionHandler, updateTime),\n };\n }\n\n /**\n * Calculates the time to refresh in milliseconds based off expiration time.\n *\n * @param sessionStart {number} - Timestamp, in milliseconds, the session was initialized.\n * @param sessionExpiration {number} - Timestamp, in milliseconds, the session will expire.\n *\n * @returns {number} - The update interval in ms.\n */\n static getIntervalInMilliseconds(sessionStart, sessionExpiration) {\n const sessionInterval = sessionExpiration - sessionStart;\n const intervalDifference = sessionInterval / 3;\n const updateIntervalInMilliSeconds = sessionInterval - intervalDifference;\n return updateIntervalInMilliSeconds;\n }\n\n constructor(props) {\n super(props);\n this.state = {\n running: false,\n intervalId: null,\n };\n }\n\n componentDidMount() {\n const { isAuthenticated, updateSessionHandler, startDate, expirationDate } = this.props;\n const { running } = this.state;\n if (isAuthenticated() && !running) {\n this.setState(\n UpdateSession.calculateAndSetInterval(startDate, expirationDate, updateSessionHandler),\n );\n }\n }\n\n componentWillUnmount() {\n const { running, intervalId } = this.state;\n if (running) {\n clearInterval(intervalId);\n this.setState({\n running: false,\n intervalId: null,\n });\n }\n }\n\n render() {\n const { children } = this.props;\n return children;\n }\n}\n\nUpdateSession.propTypes = propTypes;\nUpdateSession.defaultProps = defaultProps;\n\nexport default UpdateSession;\n","import { connect } from 'react-redux';\n\nimport UpdateSession from './UpdateSession';\nimport { selectors, actionCreators } from '../../../dux/user';\n\nconst mapStateToProps = (state) => ({\n isAuthenticated: selectors.isAuthenticated(state),\n expirationDate: selectors.getTokenExpirationDate(state),\n startDate: selectors.getTokenStartDate(state),\n});\n\nconst mapDispatchToProps = {\n updateSessionHandler: actionCreators.updateSession,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(UpdateSession);\n","/**\n * Outermost wrapper component for the application\n */\nimport { create } from 'jss';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { Router } from 'react-router-dom';\nimport expand from 'jss-expand';\nimport {\n StylesProvider,\n ThemeProvider,\n withStyles,\n jssPreset,\n createGenerateClassName,\n} from '@material-ui/styles';\nimport CssBaseline from '@material-ui/core/CssBaseline';\nimport { StripeProvider } from 'react-stripe-elements';\nimport { SnackbarProvider } from 'notistack';\nimport { ErrorBoundary } from 'react-error-boundary';\n\nimport SnackbarNotifier from 'components/SnackNotifier/SnackbarNotifierContainer';\nimport ErrorBoundaryFallback from 'components/ErrorBoundaryFallback/ErrorBoundaryFallback';\nimport { history } from '../../store';\nimport RoutesContainer from './Routes/RoutesContainer';\nimport FeatureFlagsContainer from './FeatureFlags/FeatureFlagsContainer';\nimport UpdateSessionContainer from './UpdateSession/UpdateSessionContainer';\nimport LoadingPlaceholder from '../LoadingPlaceholder/LoadingPlaceholder';\nimport { darkTheme } from './App.theme';\n\n// Configure JSS\nconst jss = create({ plugins: [...jssPreset().plugins, expand()] });\n\n// Custom Material-UI class name generator.\nconst generateClassName = createGenerateClassName();\n\nconst propTypes = {\n user: PropTypes.shape({\n id: PropTypes.string,\n }).isRequired,\n org: PropTypes.shape({\n id: PropTypes.string,\n billingSetupComplete: PropTypes.bool,\n isLoading: PropTypes.bool,\n }).isRequired,\n getOrg: PropTypes.func.isRequired, // eslint-disable-line react/no-unused-prop-types\n getServices: PropTypes.func.isRequired, // eslint-disable-line react/no-unused-prop-types\n getProviders: PropTypes.func.isRequired, // eslint-disable-line react/no-unused-prop-types\n getVersions: PropTypes.func.isRequired, // eslint-disable-line react/no-unused-prop-types\n getRegions: PropTypes.func.isRequired, // eslint-disable-line react/no-unused-prop-types\n getPlans: PropTypes.func.isRequired, // eslint-disable-line react/no-unused-prop-types\n getFlavors: PropTypes.func.isRequired, // eslint-disable-line react/no-unused-prop-types\n getAddons: PropTypes.func.isRequired, // eslint-disable-line react/no-unused-prop-types\n needsOrganization: PropTypes.bool.isRequired, // eslint-disable-line react/no-unused-prop-types\n};\n\nexport class UnstyledApp extends React.Component {\n static onUserDataLoaded(props) {\n if (!props.needsOrganization && !props.org.isLoading) {\n props.getOrg();\n }\n props.getServices();\n props.getServiceSubtypes();\n props.getProviders();\n props.getVersions();\n props.getRegions();\n props.getPlans();\n props.getFlavors();\n props.getAddons();\n }\n\n componentDidMount() {\n // Ensure user data has finished loading\n const { user } = this.props;\n if (user.id) {\n UnstyledApp.onUserDataLoaded(this.props);\n }\n }\n\n componentDidUpdate(prevProps) {\n const { user } = this.props;\n // Check if user data went from not loaded -> loaded\n if (!prevProps.user.id && user.id) {\n UnstyledApp.onUserDataLoaded(this.props);\n }\n }\n\n render() {\n const { org, classes } = this.props;\n const routes = !org.isLoading ? (\n <Router history={history}>\n <RoutesContainer />\n </Router>\n ) : (\n <LoadingPlaceholder />\n );\n return (\n <React.Fragment>\n <UpdateSessionContainer />\n <FeatureFlagsContainer />\n <StripeProvider apiKey={process.env.REACT_APP_STRIPE_KEY}>\n <StylesProvider jss={jss} generateClassName={generateClassName}>\n <ThemeProvider theme={darkTheme}>\n <ErrorBoundary FallbackComponent={ErrorBoundaryFallback}>\n <SnackbarProvider\n maxSnack={3}\n classes={{\n variantSuccess: classes.success,\n variantError: classes.error,\n }}\n anchorOrigin={{\n vertical: 'top',\n horizontal: 'center',\n }}\n >\n <SnackbarNotifier />\n <CssBaseline />\n {routes}\n </SnackbarProvider>\n </ErrorBoundary>\n </ThemeProvider>\n </StylesProvider>\n </StripeProvider>\n </React.Fragment>\n );\n }\n}\n\nUnstyledApp.propTypes = propTypes;\n\nconst styles = () => ({\n '@global': {\n html: {\n height: '100%',\n },\n body: {\n height: '100%',\n },\n '#root': {\n height: '100%',\n },\n },\n success: {\n backgroundColor: '#3C9BA0 !important',\n color: 'white !important',\n },\n error: {\n color: 'white !important',\n },\n});\n\nexport default withStyles(styles)(UnstyledApp);\n","import { connect } from 'react-redux';\n\nimport App from './App';\nimport { selectors as userSelectors } from '../../dux/user';\nimport { selectors as orgSelectors, actionCreators } from '../../dux/org';\nimport { actionCreators as catalogActionCreators } from '../../dux/catalog';\n\nconst mapStateToProps = (state) => ({\n isAuthenticated: userSelectors.isAuthenticated(state),\n needsEmailVerification: userSelectors.needsEmailVerification(state),\n needsOrganization: userSelectors.needsOrganization(state),\n needsBilling: orgSelectors.needsBilling(state),\n user: userSelectors.getIdentityState(state),\n org: orgSelectors.getOrgState(state),\n});\n\nconst mapDispatchToProps = {\n getOrg: actionCreators.getOrg,\n getServices: catalogActionCreators.getServices,\n getServiceSubtypes: catalogActionCreators.getServiceSubtypes,\n getProviders: catalogActionCreators.getProviders,\n getVersions: catalogActionCreators.getVersions,\n getRegions: catalogActionCreators.getRegions,\n getPlans: catalogActionCreators.getPlans,\n getFlavors: catalogActionCreators.getFlavors,\n getAddons: catalogActionCreators.getAddons,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(App);\n","// Polyfills for IE11; must be loaded first\nimport 'core-js/features/array/includes';\nimport 'core-js/features/string/includes';\nimport 'core-js/features/string/starts-with';\nimport 'core-js/features/object/values';\nimport 'core-js/features/object/keys';\nimport eventSource from 'event-source-polyfill'; // eslint-disable-line no-unused-vars\nimport React from 'react';\nimport { render } from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { ConnectedRouter } from 'connected-react-router';\n\nimport store, { history } from './store';\nimport AppContainer from './components/App/AppContainer';\n\nimport './index.css';\n\nconst target = document.querySelector('#root');\n\nrender(\n <Provider store={store}>\n <ConnectedRouter history={history}>\n <AppContainer />\n </ConnectedRouter>\n </Provider>,\n target,\n);\n"],"sourceRoot":""}