@openshift-assisted/ui-lib
Version:
React component library for the Assisted Installer UI
20 lines • 1.72 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const react_core_1 = require("@patternfly/react-core");
const BMCForm_1 = tslib_1.__importDefault(require("../Agent/BMCForm"));
const use_translation_wrapper_1 = require("../../../common/hooks/use-translation-wrapper");
const EnvironmentErrors_1 = require("../InfraEnv/EnvironmentErrors");
const ProvisioningConfigErrorAlert_1 = tslib_1.__importDefault(require("./ProvisioningConfigErrorAlert"));
const AddBmcHostModal = ({ isOpen, onClose, infraEnv, onCreateBMH, usedHostnames, docVersion, provisioningConfigError, }) => {
var _a, _b;
const hasDHCP = ((_b = (_a = infraEnv.metadata) === null || _a === void 0 ? void 0 : _a.labels) === null || _b === void 0 ? void 0 : _b.networkType) !== 'static';
const { t } = (0, use_translation_wrapper_1.useTranslation)();
return (React.createElement(react_core_1.Modal, { "aria-label": t('ai:Add BMC host dialog'), title: t('ai:Add host using Baseboard Management Controller (BMC)'), isOpen: isOpen, onClose: onClose, variant: react_core_1.ModalVariant.medium, hasNoBodyWrapper: true, id: "add-host-modal" },
React.createElement(EnvironmentErrors_1.EnvironmentErrors, { infraEnv: infraEnv, docVersion: docVersion, inModal: true },
React.createElement(ProvisioningConfigErrorAlert_1.default, { error: provisioningConfigError }),
React.createElement(BMCForm_1.default, { onCreateBMH: onCreateBMH, onClose: onClose, hasDHCP: hasDHCP, infraEnv: infraEnv, usedHostnames: usedHostnames }))));
};
exports.default = AddBmcHostModal;
//# sourceMappingURL=AddBmcHostModal.js.map