Skip to content

Some small UI wording changes #2326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
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
14 changes: 7 additions & 7 deletions api/internal/managers/infra/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
kyaml "sigs.k8s.io/yaml"
)

const K0sComponentName = "Runtime"
const K0sComponentName = "runtime"

func AlreadyInstalledError() error {
return fmt.Errorf(
Expand Down Expand Up @@ -80,7 +80,7 @@ func (m *infraManager) initComponentsList(license *kotsv1beta1.License, rc runti
components = append(components, types.InfraComponent{Name: addOn.Name()})
}

components = append(components, types.InfraComponent{Name: "Additional Components"})
components = append(components, types.InfraComponent{Name: "additional components"})

for _, component := range components {
if err := m.infraStore.RegisterComponent(component.Name); err != nil {
Expand Down Expand Up @@ -167,7 +167,7 @@ func (m *infraManager) installK0s(ctx context.Context, rc runtimeconfig.RuntimeC
}
}()

m.setStatusDesc(fmt.Sprintf("Installing %s", componentName))
m.setStatusDesc(fmt.Sprintf("Installing %s...", componentName))

logFn := m.logFn("k0s")

Expand Down Expand Up @@ -197,7 +197,7 @@ func (m *infraManager) installK0s(ctx context.Context, rc runtimeconfig.RuntimeC
return nil, fmt.Errorf("create kube client: %w", err)
}

m.setStatusDesc(fmt.Sprintf("Waiting for %s", componentName))
m.setStatusDesc(fmt.Sprintf("Waiting for %s...", componentName))

logFn("waiting for node to be ready")
if err := m.waitForNode(ctx, kcli); err != nil {
Expand Down Expand Up @@ -255,7 +255,7 @@ func (m *infraManager) installAddOns(ctx context.Context, kcli client.Client, mc

// if in progress, update the overall status to reflect the current component
if progress.Status.State == types.StateRunning {
m.setStatusDesc(fmt.Sprintf("%s %s", progress.Status.Description, progress.Name))
m.setStatusDesc(fmt.Sprintf("%s %s...", progress.Status.Description, progress.Name))
}

// update the status for the current component
Expand Down Expand Up @@ -332,7 +332,7 @@ func (m *infraManager) getAddonInstallOpts(license *kotsv1beta1.License, rc runt
}

func (m *infraManager) installExtensions(ctx context.Context, hcli helm.Client) (finalErr error) {
componentName := "Additional Components"
componentName := "additional components"

if err := m.setComponentStatus(componentName, types.StateRunning, "Installing"); err != nil {
return fmt.Errorf("set extensions status: %w", err)
Expand All @@ -353,7 +353,7 @@ func (m *infraManager) installExtensions(ctx context.Context, hcli helm.Client)
}
}()

m.setStatusDesc(fmt.Sprintf("Installing %s", componentName))
m.setStatusDesc(fmt.Sprintf("Installing %s...", componentName))

logFn := m.logFn("extensions")
logFn("installing extensions")
Expand Down
22 changes: 11 additions & 11 deletions cmd/installer/cli/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ func initializeInstall(ctx context.Context, flags InstallCmdFlags, rc runtimecon

func installAndStartCluster(ctx context.Context, flags InstallCmdFlags, rc runtimeconfig.RuntimeConfig, mutate func(*k0sv1beta1.ClusterConfig) error) (*k0sv1beta1.ClusterConfig, error) {
loading := spinner.Start()
loading.Infof("Installing node")
loading.Infof("Installing runtime")
logrus.Debugf("creating k0s configuration file")

eucfg, err := helpers.ParseEndUserConfig(flags.overrides)
Expand All @@ -1025,36 +1025,36 @@ func installAndStartCluster(ctx context.Context, flags InstallCmdFlags, rc runti

cfg, err := k0s.WriteK0sConfig(ctx, flags.networkInterface, flags.airgapBundle, rc.PodCIDR(), rc.ServiceCIDR(), eucfg, mutate)
if err != nil {
loading.ErrorClosef("Failed to install node")
loading.ErrorClosef("Failed to install runtime")
return nil, fmt.Errorf("create config file: %w", err)
}

logrus.Debugf("creating systemd unit files")
if err := hostutils.CreateSystemdUnitFiles(ctx, logrus.StandardLogger(), rc, false); err != nil {
loading.ErrorClosef("Failed to install node")
loading.ErrorClosef("Failed to install runtime")
return nil, fmt.Errorf("create systemd unit files: %w", err)
}

logrus.Debugf("installing k0s")
if err := k0s.Install(rc); err != nil {
loading.ErrorClosef("Failed to install node")
loading.ErrorClosef("Failed to install runtime")
return nil, fmt.Errorf("install cluster: %w", err)
}

logrus.Debugf("waiting for k0s to be ready")
if err := k0s.WaitForK0s(); err != nil {
loading.ErrorClosef("Failed to install node")
loading.ErrorClosef("Failed to install runtime")
return nil, fmt.Errorf("wait for k0s: %w", err)
}

loading.Infof("Waiting for node")
logrus.Debugf("waiting for node to be ready")
loading.Infof("Waiting for runtime")
logrus.Debugf("waiting for runtime to be ready")
if err := waitForNode(ctx); err != nil {
loading.ErrorClosef("Node failed to become ready")
return nil, fmt.Errorf("wait for node: %w", err)
loading.ErrorClosef("Runtime failed to become ready")
return nil, fmt.Errorf("wait for runtime: %w", err)
}

loading.Closef("Node is ready")
loading.Closef("Runtime is ready")
return cfg, nil
}

Expand All @@ -1070,7 +1070,7 @@ func installAddons(ctx context.Context, kcli client.Client, mcli metadata.Interf
loading = spinner.Start()
loading.Infof("Installing %s", progress.Name)
case apitypes.StateSucceeded:
loading.Closef("%s is ready", progress.Name)
loading.Closef("%s is ready", strings.ToUpper(progress.Name[:1])+progress.Name[1:])
case apitypes.StateFailed:
loading.ErrorClosef("Failed to install %s", progress.Name)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/installer/cli/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ func installAddonsForRestore(ctx context.Context, kcli client.Client, mcli metad
loading = spinner.Start()
loading.Infof("Installing %s", progress.Name)
case apitypes.StateSucceeded:
loading.Closef("%s is ready", progress.Name)
loading.Closef("%s is ready", strings.ToUpper(progress.Name[:1])+progress.Name[1:])
case apitypes.StateFailed:
loading.ErrorClosef("Failed to install %s", progress.Name)
}
Expand Down
2 changes: 1 addition & 1 deletion e2e/scripts/restore-installation-airgap.exp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ expect {
}

expect {
-timeout 300 "Disaster Recovery is ready" {}
-timeout 300 "Disaster recovery is ready" {}
timeout {
puts "\n\nFailed to wait for Disaster Recovery to be ready."
exit 1
Expand Down
2 changes: 1 addition & 1 deletion e2e/scripts/restore-installation.exp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ expect {
}

expect {
-timeout 300 "Disaster Recovery is ready" {}
-timeout 300 "Disaster recovery is ready" {}
timeout {
puts "\n\nFailed to wait for Disaster Recovery to be ready."
exit 1
Expand Down
2 changes: 1 addition & 1 deletion e2e/scripts/restore-multi-node-airgap-phase1.exp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ expect {
}

expect {
-timeout 300 "Disaster Recovery is ready" {}
-timeout 300 "Disaster recovery is ready" {}
timeout {
puts "\n\nFailed to wait for Disaster Recovery to be ready."
exit 1
Expand Down
2 changes: 1 addition & 1 deletion e2e/scripts/restore-multi-node-phase1.exp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ expect {
}

expect {
-timeout 300 "Disaster Recovery is ready" {}
-timeout 300 "Disaster recovery is ready" {}
timeout {
puts "\n\nFailed to wait for Disaster Recovery to be ready."
exit 1
Expand Down
2 changes: 1 addition & 1 deletion e2e/scripts/resume-restore.exp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ expect {
}

expect {
-timeout 300 "Disaster Recovery is ready" {}
-timeout 300 "Disaster recovery is ready" {}
timeout {
puts "\n\nFailed to wait for Disaster Recovery to be ready."
exit 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type EmbeddedClusterOperator struct {
}

func (e *EmbeddedClusterOperator) Name() string {
return "Runtime Operator"
return "runtime operator"
}

func (e *EmbeddedClusterOperator) Version() string {
Expand Down
2 changes: 1 addition & 1 deletion pkg/addons/openebs/openebs.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type OpenEBS struct {
}

func (o *OpenEBS) Name() string {
return "Storage"
return "storage"
}

func (o *OpenEBS) Version() string {
Expand Down
2 changes: 1 addition & 1 deletion pkg/addons/velero/velero.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ type Velero struct {
}

func (v *Velero) Name() string {
return "Disaster Recovery"
return "disaster recovery"
}

func (v *Velero) Version() string {
Expand Down
4 changes: 2 additions & 2 deletions web/src/components/wizard/CompletionStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useBranding } from "../../contexts/BrandingContext";
import { CheckCircle, ExternalLink } from "lucide-react";

const CompletionStep: React.FC = () => {
const { config } = useConfig();
const { config, prototypeSettings } = useConfig();
const { title } = useBranding();

return (
Expand All @@ -15,7 +15,7 @@ const CompletionStep: React.FC = () => {
<div className="flex flex-col items-center text-center py-6">
<div className="flex flex-col items-center justify-center mb-6">
<div className="w-16 h-16 rounded-full flex items-center justify-center mb-4">
<CheckCircle className="w-10 h-10" style={{ color: "blue" }} />
<CheckCircle className="w-10 h-10" style={{ color: prototypeSettings.themeColor }} />
</div>
<p className="text-gray-600 mt-2">
Visit the Admin Console to configure and install {title}
Expand Down
4 changes: 2 additions & 2 deletions web/src/components/wizard/InstallationStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const InstallationStep: React.FC<InstallationStepProps> = ({ onNext }) => {
<div className="space-y-6">
<InstallationProgress
progress={getProgress()}
currentMessage={infraStatusResponse?.status?.description || ''}
currentMessage={infraStatusResponse?.status?.state === 'Failed' ? 'Installation failed' : (infraStatusResponse?.status?.description || '')}
themeColor={themeColor}
status={infraStatusResponse?.status?.state}
/>
Expand All @@ -77,7 +77,7 @@ const InstallationStep: React.FC<InstallationStepProps> = ({ onNext }) => {
{(infraStatusResponse?.components || []).map((component, index) => (
<StatusIndicator
key={index}
title={component.name}
title={component.name.split(' ').map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(' ')}
status={component.status?.state}
themeColor={themeColor}
/>
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/wizard/SetupStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ const SetupStep: React.FC<SetupStepProps> = ({ onNext }) => {
<Card>
<div className="mb-6">
<h2 className="text-2xl font-bold text-gray-900">{text.setupTitle}</h2>
<p className="text-gray-600 mt-1">Configure the installation settings.</p>
<p className="text-gray-600 mt-1">Set up the host for this installation.</p>
</div>

{isLoading ? (
Expand Down
6 changes: 3 additions & 3 deletions web/src/components/wizard/tests/SetupStep.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe("SetupStep", () => {
// Wait for loading to complete
await screen.findByText("Loading configuration...");

await screen.findByText("Configure the installation settings.");
await screen.findByText("Set up the host for this installation.");

// Wait for the linux-setup element to appear
await screen.findByTestId("linux-setup");
Expand Down Expand Up @@ -155,7 +155,7 @@ describe("SetupStep", () => {

// Wait for loading to complete
await screen.findByText("Loading configuration...");
await screen.findByText("Configure the installation settings.");
await screen.findByText("Set up the host for this installation.");

// Wait for the linux-setup element to appear
await screen.findByTestId("linux-setup");
Expand Down Expand Up @@ -249,7 +249,7 @@ describe("SetupStep", () => {

// Wait for loading to complete
await screen.findByText("Loading configuration...");
await screen.findByText("Configure the installation settings.");
await screen.findByText("Set up the host for this installation.");

// Wait for the linux-setup element to appear
await screen.findByTestId("linux-setup");
Expand Down
Loading