diff --git a/src/homepageExperience/ClickThroughAnnouncementHandler.tsx b/src/homepageExperience/ClickThroughAnnouncementHandler.tsx index 95b252f248..7b66309dcf 100644 --- a/src/homepageExperience/ClickThroughAnnouncementHandler.tsx +++ b/src/homepageExperience/ClickThroughAnnouncementHandler.tsx @@ -1,19 +1,14 @@ // Libraries import {FC, useEffect} from 'react' -import {useSelector, useDispatch} from 'react-redux' +import {useDispatch} from 'react-redux' import {useLocalStorageState} from 'use-local-storage-state' -// Selectors -import {selectCurrentIdentity} from 'src/identity/selectors' - // Utils import {showOverlay, dismissOverlay} from 'src/overlays/actions/overlays' -import {isFlagEnabled} from 'src/shared/utils/featureFlag' import {event} from 'src/cloud/utils/reporting' export enum AnnouncementID { - MqttEol = 'mqttEolClickThroughAnnouncement', - PriceIncrease = 'pricingClickThroughAnnouncement', + None = 'none', } enum AnnouncementState { @@ -23,7 +18,6 @@ enum AnnouncementState { export const ClickThroughAnnouncementHandler: FC = () => { const dispatch = useDispatch() - const {account} = useSelector(selectCurrentIdentity) const [announcementState, setAnnouncementState] = useLocalStorageState( 'clickThroughAnnouncement', @@ -51,6 +45,10 @@ export const ClickThroughAnnouncementHandler: FC = () => { } const handleDisplayAnnouncement = (announcementID: string): void => { + if (announcementID === AnnouncementID.None) { + return null + } + initAnnouncement(announcementID) if (announcementState[announcementID] === AnnouncementState.Display) { @@ -66,27 +64,8 @@ export const ClickThroughAnnouncementHandler: FC = () => { } useEffect(() => { - // MQTT Audience: Cloud users with MQTT feature flag enabled - const isMqttAudience = isFlagEnabled('subscriptionsUI') - - // PAYG Pricing Increase Audience: Pay As You Go & Direct Signups - const isPaygAccount = account.type === 'pay_as_you_go' - const isDirectSignup = account.billingProvider === 'zuora' - const isPriceIncreaseAudience = isPaygAccount && isDirectSignup - - // Sequentially display announcements in order of priority - if ( - isMqttAudience && - announcementState[AnnouncementID.MqttEol] !== AnnouncementState.Dismissed - ) { - handleDisplayAnnouncement(AnnouncementID.MqttEol) - } else if ( - isPriceIncreaseAudience && - announcementState[AnnouncementID.PriceIncrease] !== - AnnouncementState.Dismissed - ) { - handleDisplayAnnouncement(AnnouncementID.PriceIncrease) - } + // Sequentially display announcements in order of priority (use AnnouncementID.None to disable) + handleDisplayAnnouncement(AnnouncementID.None) }, [announcementState]) return null diff --git a/src/me/components/ClickThroughAnnouncementOverlay.tsx b/src/me/components/ClickThroughAnnouncementOverlay.tsx index e564a28791..d942269825 100644 --- a/src/me/components/ClickThroughAnnouncementOverlay.tsx +++ b/src/me/components/ClickThroughAnnouncementOverlay.tsx @@ -4,8 +4,6 @@ import {useSelector} from 'react-redux' // Components import {Overlay} from '@influxdata/clockface' -import {PaygPriceIncreaseAnnouncement} from 'src/me/components/announcements/PaygPriceIncreaseAnnouncement' -import {MqttEolAnnouncement} from 'src/me/components/announcements/MqttEolAnnouncement' // Utils import {event} from 'src/cloud/utils/reporting' @@ -20,43 +18,17 @@ interface ClickThroughAnnouncementOverlayProps { export const ClickThroughAnnouncementOverlay: FC< ClickThroughAnnouncementOverlayProps -> = ({onClose}) => { +> = () => { const {announcementID} = useSelector(getOverlayParams) useEffect(() => { event(`${announcementID}.displayed`) }, []) - const handleDetailsClick = () => { - event(`${announcementID}.details.clicked`) - } - - const handleContactUsClick = () => { - event(`${announcementID}.contactUs.clicked`) - } - - const handleAcknowledgeClick = () => { - event(`${announcementID}.acknowledge.clicked`) - onClose() - } - const announcementContents = (): JSX.Element => { switch (announcementID) { - case AnnouncementID.PriceIncrease: - return ( - - ) - case AnnouncementID.MqttEol: - return ( - - ) + case AnnouncementID.None: + return null default: return null } diff --git a/src/me/components/announcements/MqttEolAnnouncement.tsx b/src/me/components/announcements/MqttEolAnnouncement.tsx deleted file mode 100644 index eeedd7b67f..0000000000 --- a/src/me/components/announcements/MqttEolAnnouncement.tsx +++ /dev/null @@ -1,151 +0,0 @@ -// Libraries -import React, {FC} from 'react' - -// Components -import {Accordion, Overlay, Button, ComponentColor} from '@influxdata/clockface' -import {SafeBlankLink} from 'src/utils/SafeBlankLink' - -interface MqttEolAnnouncementProps { - handleAcknowledgeClick: () => void - handleDetailsClick: () => void -} - -export const MqttEolAnnouncement: FC = ({ - handleAcknowledgeClick, - handleDetailsClick, -}) => { - return ( - <> - - -

- The Native Collector - MQTT feature is being deprecated and will stop - functioning on April 30, 2024. -

-

- Please refer to the FAQ below for more details and guidance on - alternate solutions currently available. -

- - - - Q: What is the Native Collector - MQTT Feature? - - - - - A: The Native Collector - MQTT feature was - introduced in InfluxDB Cloud in 2022 as a way to ingest data - directly from MQTT sources into InfluxDB Cloud. This feature has - been removed and is no longer available to new customers or - existing customers who have not been using it. It was only - available to a limited number of existing customers who were - actively using it. - - - - - - - Q: Why is this feature being EOLed? - - - - - A: The adoption of this feature was lower than - anticipated given most customers continued to use Telegraf, - InfluxData's data collection agent, which provides more features - for MQTT ingestion than this feature did. After a thorough - assessment, we determined that our customers can have a similar - - and superior - experience with the MQTT Consumer Telegraf Input - Plugin. - - - - - - - Q: What alternatives are available in light of - this EOL announcement? - - - - - A: We recommend using the MQTT Consumer Telegraf - Input Plugin as an alternative to the Native Collector - MQTT - feature. It's free to use and is available for download{' '} - - here - - . Telegraf is InfluxData's very popular open source data - collection agent with 300+ plugins, including MQTT. - - - - - - - Q: What are the expected next steps? - - - - - A: The Native Collector - MQTT feature will - continue to work and function until{' '} - April 30th, 2024. We will not be doing any new - product development or enhancements to the feature in the - meantime. After the EOL date, it will be decommissioned and any - MQTT subscriptions that you have made will no longer receive and - ingest data into InfluxDB. - - - - - - - Q: Will I lose any data already ingested? - - - - - A: No, already ingested data will not be affected - by this change. - - - - - - - Q: Where can I get more information on using - Telegraf as a replacement for Native Collector - MQTT? - - - - - A: You can obtain more information about using - Telegraf with MQTT and download the MQTT Consumer Telegraf Input - Plugin{' '} - - here - - . - - - -
- -