diff --git a/ui_src/package.json b/ui_src/package.json index 43acbb645..d19779e5e 100644 --- a/ui_src/package.json +++ b/ui_src/package.json @@ -46,6 +46,7 @@ "reaflow": "5.0.6", "recharts": "^2.1.16", "rehype-raw": "^7.0.0", + "rehype-slug": "^6.0.0", "remark-gfm": "^3.0.1", "sass": "^1.49.0", "util": "^0.12.5", diff --git a/ui_src/src/components/sideBar/index.js b/ui_src/src/components/sideBar/index.js index 101a4bb2b..4cf58861c 100644 --- a/ui_src/src/components/sideBar/index.js +++ b/ui_src/src/components/sideBar/index.js @@ -195,11 +195,12 @@ function SideBar() { addUserModalFlip(false); }; - const MenuItem = ({ icon, activeIcon, name, route, onClick, onMouseEnter, onMouseLeave }) => { + const MenuItem = ({ icon, activeIcon, name, route, onClick, onMouseEnter, onMouseLeave, badge }) => { return (
{state.route === route ? activeIcon : hoveredItem === route ? activeIcon : icon}

{name}

+ {badge && }
); }; @@ -459,6 +460,7 @@ function SideBar() { onMouseEnter={() => setHoveredItem('functions')} onMouseLeave={() => setHoveredItem('')} route="functions" + badge={'Alpha'} /> } diff --git a/ui_src/src/components/sideBar/style.scss b/ui_src/src/components/sideBar/style.scss index 02f29dfa9..0fd5a2f2a 100644 --- a/ui_src/src/components/sideBar/style.scss +++ b/ui_src/src/components/sideBar/style.scss @@ -150,6 +150,16 @@ .align-items-center { display: flex; } + .badge { + color: #f5f5f5; + border-radius: 32px; + padding: 1px 10px; + margin-top: 2px; + font-size: 8px; + font-family: 'InterSemiBold'; + background: var(--purple); + cursor: pointer; + } } .menu-content { diff --git a/ui_src/src/components/tag/style.scss b/ui_src/src/components/tag/style.scss index cf93b7876..ee6445d69 100644 --- a/ui_src/src/components/tag/style.scss +++ b/ui_src/src/components/tag/style.scss @@ -13,6 +13,7 @@ line-height: 14px; overflow: hidden; text-overflow: ellipsis; + white-space: nowrap; } .close { display: flex; diff --git a/ui_src/src/const/globalConst.js b/ui_src/src/const/globalConst.js index f8cac055b..dda72a66e 100644 --- a/ui_src/src/const/globalConst.js +++ b/ui_src/src/const/globalConst.js @@ -72,7 +72,7 @@ export const planType = { ENTERPRISE: 'plan-cloud-enterprise', BUSINESS: 'plan-cloud-business', GROWTH: 'plan-cloud-growth-buckets', - FREE: 'plan-cloud-free', + FREE: 'plan-cloud-free' }; export const githubUrls = { @@ -82,9 +82,9 @@ export const githubUrls = { MEMPHIS_GIT_SSH: 'git@github.com:memphisdev/onboarding-app.git' }, functions: { - DOWNLOAD_URL: 'https://github.com/memphisdev/memphis-dev-functions/archive/refs/heads/master.zip', - MEMPHIS_GIT_HTTPS: 'https://github.com/memphisdev/memphis-dev-functions.git', - MEMPHIS_GIT_SSH: 'git@github.com:memphisdev/memphis-dev-functions.git' + DOWNLOAD_URL: 'https://github.com/memphisdev/function-templates/archive/refs/heads/master.zip', + MEMPHIS_GIT_HTTPS: 'https://github.com/memphisdev/function-templates.git', + MEMPHIS_GIT_SSH: 'git@github.com:memphisdev/function-templates.git' } }; diff --git a/ui_src/src/domain/functions/components/functionBox/index.js b/ui_src/src/domain/functions/components/functionBox/index.js index b13a671f0..7e449e13d 100644 --- a/ui_src/src/domain/functions/components/functionBox/index.js +++ b/ui_src/src/domain/functions/components/functionBox/index.js @@ -37,6 +37,7 @@ import { ApiEndpoints } from '../../../../const/apiEndpoints'; import { httpRequest } from '../../../../services/http'; import AttachFunctionModal from '../attachFunctionModal'; import CloudModal from '../../../../components/cloudModal'; +import TestMockEvent from '../../components/testFunctionModal/components/testMockEvent'; import { Context } from '../../../../hooks/store'; function FunctionBox({ funcDetails, integrated, isTagsOn = true, onClick = null, onApply, doneUninstall, startInstallation, funcIndex, referredFunction }) { @@ -49,6 +50,7 @@ function FunctionBox({ funcDetails, integrated, isTagsOn = true, onClick = null, const [cloudModal, setCloudModal] = useState(false); const [loader, setLoader] = useState(false); const [openUpgradeModal, setOpenUpgradeModal] = useState(false); + const [isTestFunctionModalOpen, setIsTestFunctionModalOpen] = useState(false); useEffect(() => { const url = window.location.href; @@ -191,6 +193,19 @@ function FunctionBox({ funcDetails, integrated, isTagsOn = true, onClick = null, )} + {isCloud() && functionDetails?.installed && ( +