From 894abee081665644f189c94b3d9eb898a3b962a8 Mon Sep 17 00:00:00 2001 From: Paul Sarando Date: Tue, 17 Dec 2024 18:34:47 -0700 Subject: [PATCH 1/2] CORE-2025 Add Data Limits dashboard announcement --- public/static/locales/en/dashboard.json | 2 + src/components/dashboard/constants.js | 1 + .../dashboard/dashboardItem/Announcement.js | 64 +++++++++++++++++++ src/components/dashboard/index.js | 2 + 4 files changed, 69 insertions(+) create mode 100644 src/components/dashboard/dashboardItem/Announcement.js diff --git a/public/static/locales/en/dashboard.json b/public/static/locales/en/dashboard.json index 40012a2af..c58bcecd7 100644 --- a/public/static/locales/en/dashboard.json +++ b/public/static/locales/en/dashboard.json @@ -21,6 +21,7 @@ "dataConsumptionError": "Unable to get data storage info.", "dataConsumptionTimestamp": "{{distance}} ago.", "dataOverageNote": "Need more resources? There's a form for that!", + "dataStorageLimits": "Data Storage Limits", "detailsAction": "Show Details", "dismiss": "Dismiss", "editedBy": "Edited by", @@ -54,6 +55,7 @@ "popularFeaturedApps": "Featured Apps", "publicApps": "Public Apps", "publishedBy": "Published by", + "quotaEnforceAnnouncement": "CyVerse will begin enforcing data storage limits on March 1, 2025. Please see the announcement for more details.", "quotaLimit": "{{limit}} (Limit)", "recentAnalyses": "Recent Analyses", "recentlyAddedApps": "Recently Added Apps", diff --git a/src/components/dashboard/constants.js b/src/components/dashboard/constants.js index 08f9eeea8..2728e44e1 100644 --- a/src/components/dashboard/constants.js +++ b/src/components/dashboard/constants.js @@ -46,3 +46,4 @@ export const XS_NUM_COLUMNS = 1; export const XS_PIXELS = 0; export const FEATURE_MATRIX_URL = "https://cyverse.org/subscribe"; +export const QUOTA_ENFORCE_URL = "https://cyverse.org/quota-enforce"; diff --git a/src/components/dashboard/dashboardItem/Announcement.js b/src/components/dashboard/dashboardItem/Announcement.js new file mode 100644 index 000000000..71c6bffe7 --- /dev/null +++ b/src/components/dashboard/dashboardItem/Announcement.js @@ -0,0 +1,64 @@ +/** + * A dashboard item for displaying important announcements. + * + * @author psarando + */ +import React from "react"; + +import { useTranslation, Trans } from "i18n"; + +import { QUOTA_ENFORCE_URL } from "../constants"; +import ExternalLink from "components/utils/ExternalLink"; + +import { + Card, + CardHeader, + CardContent, + Typography, + useTheme, +} from "@mui/material"; + +import AnnounceIcon from "@mui/icons-material/Warning"; + +export default function Announcement() { + const theme = useTheme(); + const { t } = useTranslation("dashboard"); + + return ( + + + } + title={ + + {t("dataStorageLimits")} + + } + style={{ + backgroundColor: theme.palette.secondary.main, + color: theme.palette.secondary.contrastText, + }} + /> + + + , + }} + /> + + + + ); +} diff --git a/src/components/dashboard/index.js b/src/components/dashboard/index.js index 6e1a29de8..90fb720df 100644 --- a/src/components/dashboard/index.js +++ b/src/components/dashboard/index.js @@ -49,6 +49,7 @@ import { useSavePreferences } from "serviceFacades/users"; import withErrorAnnouncer from "components/error/withErrorAnnouncer"; import { useUserProfile } from "contexts/userProfile"; +import Announcement from "./dashboardItem/Announcement"; import Banner from "./dashboardItem/Banner"; import Tour from "./dashboardItem/Tour"; import TerminateAnalysisDialog from "components/analyses/TerminateAnalysisDialog"; @@ -311,6 +312,7 @@ const Dashboard = (props) => { mutatePreferences({ preferences: updatedPref }); }} />, + , Date: Wed, 18 Dec 2024 15:14:49 -0700 Subject: [PATCH 2/2] CORE-2025 Update Data Enforcement announcement text based on feedback --- public/static/locales/en/dashboard.json | 2 +- src/components/dashboard/dashboardItem/Announcement.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/public/static/locales/en/dashboard.json b/public/static/locales/en/dashboard.json index c58bcecd7..2076a6041 100644 --- a/public/static/locales/en/dashboard.json +++ b/public/static/locales/en/dashboard.json @@ -55,7 +55,7 @@ "popularFeaturedApps": "Featured Apps", "publicApps": "Public Apps", "publishedBy": "Published by", - "quotaEnforceAnnouncement": "CyVerse will begin enforcing data storage limits on March 1, 2025. Please see the announcement for more details.", + "quotaEnforceAnnouncement": "Starting March 1, 2025, we will begin to enforce data storage quotas on all Basic (free) and paid subscription accounts. More information and FAQ here.", "quotaLimit": "{{limit}} (Limit)", "recentAnalyses": "Recent Analyses", "recentlyAddedApps": "Recently Added Apps", diff --git a/src/components/dashboard/dashboardItem/Announcement.js b/src/components/dashboard/dashboardItem/Announcement.js index 71c6bffe7..14e962f90 100644 --- a/src/components/dashboard/dashboardItem/Announcement.js +++ b/src/components/dashboard/dashboardItem/Announcement.js @@ -54,6 +54,7 @@ export default function Announcement() { t={t} i18nKey="quotaEnforceAnnouncement" components={{ + b: , infoLink: , }} />