@@ -24,18 +24,15 @@ import CloudUpgradeButton from 'src/shared/components/CloudUpgradeButton'
2424
2525// Utils
2626import { getOrg } from 'src/organizations/selectors'
27- import {
28- shouldGetCredit250Experience ,
29- shouldShowUpgradeButton ,
30- } from 'src/me/selectors'
27+ import { shouldGetCredit250Experience } from 'src/me/selectors'
3128import { event } from 'src/cloud/utils/reporting'
3229import { checkRequiredFields } from 'src/writeData/subscriptions/utils/form'
33- import { isFlagEnabled } from 'src/shared/utils/featureFlag'
3430import {
3531 getDataLayerIdentity ,
3632 getExperimentVariantId ,
3733} from 'src/cloud/utils/experiments'
3834import { AppSettingContext } from 'src/shared/contexts/app'
35+ import { isFlagEnabled } from 'src/shared/utils/featureFlag'
3936
4037// Constants
4138import { CREDIT_250_EXPERIMENT_ID } from 'src/shared/constants'
@@ -52,20 +49,18 @@ interface Props {
5249 updateForm : ( any ) => void
5350 saveForm : ( any ) => void
5451 onFocus ?: ( any ) => void
52+ showUpgradeButton : boolean
5553}
5654
5755const BrokerForm : FC < Props > = ( {
5856 formContent,
5957 updateForm,
6058 saveForm,
6159 onFocus,
60+ showUpgradeButton,
6261} ) => {
6362 const history = useHistory ( )
6463 const org = useSelector ( getOrg )
65- // enabled for PAYG accounts and specific free accounts where a flag is enabled
66- const showUpgradeButton =
67- useSelector ( shouldShowUpgradeButton ) &&
68- ! isFlagEnabled ( 'enableFreeSubscriptions' )
6964 const isCredit250ExperienceActive = useSelector ( shouldGetCredit250Experience )
7065 const requiredFields = checkRequiredFields ( formContent )
7166 const { navbarMode} = useContext ( AppSettingContext )
@@ -108,7 +103,6 @@ const BrokerForm: FC<Props> = ({
108103 />
109104 { showUpgradeButton ? (
110105 < CloudUpgradeButton
111- className = "create-broker-form__upgrade-button"
112106 metric = { ( ) => {
113107 const experimentVariantId = getExperimentVariantId (
114108 CREDIT_250_EXPERIMENT_ID
@@ -164,9 +158,17 @@ const BrokerForm: FC<Props> = ({
164158 weight = { FontWeight . Regular }
165159 className = "create-broker-form__text"
166160 >
167- { showUpgradeButton
168- ? 'Upgrade Now to create a new connection to collect data from an MQTT broker and parse messages into metrics.'
169- : 'Create a new connection to collect data from an MQTT broker and parse messages into metrics.' }
161+ { showUpgradeButton ? (
162+ < p >
163+ < strong className = "create-broker-form__upgrade-text" >
164+ Upgrade Now
165+ </ strong > { ' ' }
166+ to create a new connection to collect data from an MQTT broker
167+ and parse messages into metrics.
168+ </ p >
169+ ) : (
170+ 'Create a new connection to collect data from an MQTT broker and parse messages into metrics.'
171+ ) }
170172 </ Heading >
171173 < p className = "create-broker-form__text" >
172174 See our{ ' ' }
@@ -190,7 +192,7 @@ const BrokerForm: FC<Props> = ({
190192 updateForm = { updateForm }
191193 formContent = { formContent }
192194 className = "create"
193- edit = { true }
195+ edit = { showUpgradeButton ? false : true }
194196 />
195197 </ Overlay . Body >
196198 < div className = "create-broker-form__line" > </ div >
0 commit comments