Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion libs/locales/lib/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@
"ai:Check the proxy settings and verify that the assisted installer service is connected to a network. You can use <code>nmcli</code> to get additional information about your network configuration.": "Check the proxy settings and verify that the assisted installer service is connected to a network. You can use <code>nmcli</code> to get additional information about your network configuration.",
"ai:Check your VM reboot configuration": "Check your VM reboot configuration.",
"ai:Choose a namespace from your existing host inventory in order to select hosts for your node pools. The namespace will be composed of 1 or more infrastructure environments. After the cluster is created, a host will become a worker node.": "Select a namespace from your existing host inventory in order to select hosts for your node pools. The namespace will contain 1 or more infrastructure environments. After the cluster is created, a host becomes a worker node.",
"ai:Cisco Intersight URL": "Cisco Intersight URL",
"ai:Cisco Intersight URL is required": "Cisco Intersight URL is required",
"ai:Cisco Intersight URL must be a valid URL starting with \"http://\" or \"https://\"": "Cisco Intersight URL must be a valid URL starting with \"http://\" or \"https://\"",
"ai:Clear": "Clear",
"ai:Clear all filters": "Clear all filters",
"ai:Clear filters": "Clear filters",
Expand Down Expand Up @@ -204,8 +207,10 @@
"ai:Configuration is hanging for a long time.": "Configuration is hanging for a long time.",
"ai:Configuration may take a few minutes.": "Configuration might take a few minutes.",
"ai:Configure": "Configure",
"ai:Configure a custom URL to add hosts from Cisco Intersight on disconnected environments.": "Configure a custom URL to add hosts from Cisco Intersight on disconnected environments.",
"ai:Configure advanced networking properties (e.g. CIDR ranges).": "Configure advanced networking properties (for example, CIDR ranges).",
"ai:Configure cluster-wide trusted certificates": "Configure cluster-wide trusted certificates",
"ai:Configure custom URL for Cisco Intersight": "Configure custom URL for Cisco Intersight",
"ai:Configure environment": "Configure environment",
"ai:Configure host inventory settings": "Configure host inventory settings",
"ai:Configure load balancer on Amazon Web Services for me.": "Configure load balancer on Amazon Web Services for me.",
Expand Down Expand Up @@ -353,7 +358,6 @@
"ai:Failed to save configuration": "Failed to save configuration",
"ai:Failed to save host selection.": "Failed to save host selection.",
"ai:Failed to update host": "Failed to update host",
"ai:Failed to update the AgentServiceConfig": "Failed to update the AgentServiceConfig",
"ai:Failed validations:": "Failed validations:",
"ai:Failing infrastructure environment": "Failing infrastructure environment",
"ai:Fence Agents Remediation requirements": "Fence Agents Remediation requirements",
Expand Down Expand Up @@ -696,6 +700,7 @@
"ai:Provide an endpoint for users, both human and machine, to interact with and configure the platform. If needed, contact your IT manager for more information. {{vipHelperSuffix}}": "Provide an endpoint for users, both human and machine, to interact with and configure the platform. If needed, contact your IT manager for more information. {{vipHelperSuffix}}",
"ai:Provide an SSH key to be able to connect to the hosts for debugging purposes during the discovery process": "Provide an SSH key to be able to connect to the hosts for debugging purposes during the discovery process",
"ai:Provide as many labels as you can to narrow the list to relevant hosts only.": "Provide as many labels as you can to narrow the list to relevant hosts.",
"ai:Provide the complete URL, including the protocol and parameters.": "Provide the complete URL, including the protocol and parameters.",
"ai:Provided cluster configuration is not valid": "Provided cluster configuration is not valid",
"ai:Provisioned": "Provisioned",
"ai:Provisioning": "Provisioning",
Expand Down
19 changes: 18 additions & 1 deletion libs/ui-lib/lib/cim/components/modals/AddHostModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
import { EnvironmentErrors } from '../InfraEnv/EnvironmentErrors';
import { InfraEnvK8sResource } from '../../types';
import DownloadIpxeScript from '../../../common/components/clusterConfiguration/DownloadIpxeScript';
import { useAgentServiceConfig } from '../../hooks';

type AddHostModalStepType = 'config' | 'download';

Expand All @@ -27,12 +28,24 @@ const AddHostModal: React.FC<AddHostModalProps> = ({
docVersion,
isIPXE,
}) => {
const { t } = useTranslation();
const hasDHCP = infraEnv.metadata?.labels?.networkType !== 'static';
const sshPublicKey = infraEnv.spec?.sshAuthorizedKey || agentClusterInstall?.spec?.sshPublicKey;
const { httpProxy, httpsProxy, noProxy } = infraEnv.spec?.proxy || {};
const imageType = infraEnv.spec?.imageType || 'minimal-iso';
const [dialogType, setDialogType] = React.useState<AddHostModalStepType>('config');
const { t } = useTranslation();

const [ciscoUrl, setCiscoUrl] = React.useState<string>();
const [agentServiceConfig, loaded, error] = useAgentServiceConfig({ name: 'agent' });

React.useEffect(() => {
if (loaded && !error) {
if (agentServiceConfig && agentServiceConfig.metadata?.annotations?.['ciscoIntersightURL']) {
setCiscoUrl(agentServiceConfig.metadata?.annotations?.['ciscoIntersightURL']);
}
}
}, [agentServiceConfig, error, loaded]);

const handleIsoConfigSubmit = async (
values: DiscoveryImageFormValues,
formikActions: FormikHelpers<DiscoveryImageFormValues>,
Expand Down Expand Up @@ -92,6 +105,7 @@ const AddHostModal: React.FC<AddHostModalProps> = ({
onReset={agentClusterInstall ? () => setDialogType('config') : undefined}
hasDHCP={hasDHCP}
docVersion={docVersion}
ciscoUrl={ciscoUrl}
/>
)}
</>
Expand All @@ -107,12 +121,14 @@ const GeneratingIsoDownload = ({
onReset,
hasDHCP,
docVersion,
ciscoUrl,
}: {
infraEnv: InfraEnvK8sResource;
onClose: VoidFunction;
onReset?: VoidFunction;
hasDHCP: boolean;
docVersion: string;
ciscoUrl?: string;
}) => {
const { t } = useTranslation();
return infraEnv.status?.isoDownloadURL ? (
Expand All @@ -122,6 +138,7 @@ const GeneratingIsoDownload = ({
onReset={onReset}
hasDHCP={hasDHCP}
docVersion={docVersion}
ciscoUrl={ciscoUrl}
/>
) : (
<EmptyState>
Expand Down

This file was deleted.

Loading
Loading