UNPKG

@openshift-assisted/ui-lib

Version:

React component library for the Assisted Installer UI

24 lines 1.84 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CimStorageMissingAlert = void 0; const tslib_1 = require("tslib"); const React = tslib_1.__importStar(require("react")); const react_router_dom_v5_compat_1 = require("react-router-dom-v5-compat"); const react_core_1 = require("@patternfly/react-core"); const external_link_alt_icon_1 = require("@patternfly/react-icons/dist/js/icons/external-link-alt-icon"); const use_translation_wrapper_1 = require("../../../../common/hooks/use-translation-wrapper"); const CimStorageMissingAlert = ({ docStorageUrl, storageOperatorUrl }) => { const { t } = (0, use_translation_wrapper_1.useTranslation)(); const navigate = (0, react_router_dom_v5_compat_1.useNavigate)(); const contentWorkaround = (React.createElement(React.Fragment, null, t('ai:Learn more about storage class'), "\u00A0\u00A0", React.createElement(external_link_alt_icon_1.ExternalLinkAltIcon, null))); const actionLinks = [ React.createElement(react_core_1.AlertActionLink, { key: "install-storage-operator", onClick: () => navigate(storageOperatorUrl) }, t('ai:Install storage operator')), React.createElement(react_core_1.AlertActionLink, { key: "storage-class", onClick: () => window.open(docStorageUrl, '_blank') }, contentWorkaround), ]; return (React.createElement(react_core_1.Alert, { title: t('ai:Must have a storage class'), variant: react_core_1.AlertVariant.warning, isInline: true, actionLinks: actionLinks }, t("ai:You'll first need to have a storage operator in order to create the storage class. If you don't have one installed, we recommend OpenShift Data Foundation operator, but you may use any."))); }; exports.CimStorageMissingAlert = CimStorageMissingAlert; //# sourceMappingURL=CimStorageMissingAlert.js.map