From 4087276928a59119733b06787230c7d81ddf472f Mon Sep 17 00:00:00 2001 From: Daniel Campbell Date: Tue, 19 Nov 2024 15:50:26 -0800 Subject: [PATCH] chore(ui): remove MQTT EOL announcement and related code --- .../ClickThroughAnnouncementHandler.tsx | 20 +-- .../ClickThroughAnnouncementOverlay.tsx | 21 +-- .../announcements/MqttEolAnnouncement.tsx | 151 ------------------ 3 files changed, 11 insertions(+), 181 deletions(-) delete mode 100644 src/me/components/announcements/MqttEolAnnouncement.tsx diff --git a/src/homepageExperience/ClickThroughAnnouncementHandler.tsx b/src/homepageExperience/ClickThroughAnnouncementHandler.tsx index 550d41e3ac..797d49b315 100644 --- a/src/homepageExperience/ClickThroughAnnouncementHandler.tsx +++ b/src/homepageExperience/ClickThroughAnnouncementHandler.tsx @@ -5,16 +5,16 @@ import {useLocalStorageState} from 'use-local-storage-state' // 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', + None = 'none', } enum AnnouncementState { Dismissed = 'dismissed', Display = 'display', + Disabled = 'disabled', } export const ClickThroughAnnouncementHandler: FC = () => { @@ -46,6 +46,10 @@ export const ClickThroughAnnouncementHandler: FC = () => { } const handleDisplayAnnouncement = (announcementID: string): void => { + if (announcementID === AnnouncementID.None) { + return null + } + initAnnouncement(announcementID) if (announcementState[announcementID] === AnnouncementState.Display) { @@ -61,16 +65,8 @@ export const ClickThroughAnnouncementHandler: FC = () => { } useEffect(() => { - // MQTT Audience: Cloud users with MQTT feature flag enabled - const isMqttAudience = isFlagEnabled('subscriptionsUI') - - // Sequentially display announcements in order of priority - if ( - isMqttAudience && - announcementState[AnnouncementID.MqttEol] !== AnnouncementState.Dismissed - ) { - handleDisplayAnnouncement(AnnouncementID.MqttEol) - } + // 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 a0d80e5d0a..d942269825 100644 --- a/src/me/components/ClickThroughAnnouncementOverlay.tsx +++ b/src/me/components/ClickThroughAnnouncementOverlay.tsx @@ -4,7 +4,6 @@ import {useSelector} from 'react-redux' // Components import {Overlay} from '@influxdata/clockface' -import {MqttEolAnnouncement} from 'src/me/components/announcements/MqttEolAnnouncement' // Utils import {event} from 'src/cloud/utils/reporting' @@ -19,31 +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 handleAcknowledgeClick = () => { - event(`${announcementID}.acknowledge.clicked`) - onClose() - } - const announcementContents = (): JSX.Element => { switch (announcementID) { - 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 - - . - - - -
- -