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
1 change: 0 additions & 1 deletion apps/ocp-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
"@patternfly/react-icons": "^6.4.0",
"@patternfly/react-styles": "^6.4.0",
"@patternfly/react-table": "^6.4.0",
"@patternfly/react-topology": "^6.4.0",
"@types/react-redux": "^7.1.33",
"formik": "^2.4.9",
"fuzzysearch": "^1.0.3",
Expand Down
1 change: 0 additions & 1 deletion apps/standalone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"@patternfly/react-icons": "^6.4.0",
"@patternfly/react-styles": "^6.4.0",
"@patternfly/react-table": "^6.4.0",
"@patternfly/react-topology": "^6.4.0",
"formik": "^2.4.5",
"fuzzysearch": "^1.0.3",
"i18next": "^21.8.14",
Expand Down
27 changes: 16 additions & 11 deletions libs/i18n/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
"Search by name": "Search by name",
"Update": "Update",
"Version": "Version",
"Review": "Review",
"Review and deploy": "Review and deploy",
"Version must be selected": "Version must be selected",
"Application name is required": "Application name is required",
"Application with the same name already exists.": "Application with the same name already exists.",
Expand All @@ -234,21 +234,26 @@
"Review update specifications": "Review update specifications",
"Review deployment specifications": "Review deployment specifications",
"Update specifications": "Update specifications",
"Installation specifications": "Installation specifications",
"Deployment specifications": "Deployment specifications",
"Channel": "Channel",
"Failed to update": "Failed to update",
"Failed to deploy": "Failed to deploy",
"Configuration is not valid": "Configuration is not valid",
"The current version is deprecated": "The current version is deprecated",
"The selected version is deprecated": "The selected version is deprecated",
"Other available paths": "Other available paths",
"+ More": "+ More",
"Version {{version}}": "Version {{version}}",
"{{version}} (current)": "{{version}} (current)",
"{{currentChannel}} channel": "{{currentChannel}} channel",
"Version update": "Version update",
"Current channel": "Current channel",
"Target channel": "Target channel",
"The current version is available in the channels listed in the dropdown below": "The current version is available in the channels listed in the dropdown below",
"Current version": "Current version",
"Target version": "Target version",
"Up to date": "Up to date",
"{{ channel }} channel": "{{ channel }} channel",
"Deployment specifications": "Deployment specifications",
"Show readme": "Show readme",
"No version update will be performed": "No version update will be performed",
"This version is deprecated": "This version is deprecated",
"Update available": "Update available",
"Version: {{version}}, Channel: {{channel}}": "Version: {{version}}, Channel: {{channel}}",
"Loading installed software": "Loading installed software",
Expand All @@ -266,7 +271,7 @@
"Fleet must be selected": "Fleet must be selected",
"Failed to find requested version {{version}}": "Failed to find requested version {{version}}",
"Loading catalog item": "Loading catalog item",
"Install {{name}}": "Install {{name}}",
"Deploy {{name}}": "Deploy {{name}}",
"Application name": "Application name",
"Application name must be unique.": "Application name must be unique.",
"Configure via:": "Configure via:",
Expand Down Expand Up @@ -303,8 +308,6 @@
"Cloud native": "Cloud native",
"Deployment target": "Deployment target",
"No items": "No items",
"Show readme": "Show readme",
"This version is deprecated": "This version is deprecated",
"You do not have permissions to list fleets": "You do not have permissions to list fleets",
"You do not have permissions to edit fleets": "You do not have permissions to edit fleets",
"No fleet is available": "No fleet is available",
Expand All @@ -313,9 +316,10 @@
"No device is available": "No device is available",
"Loading targets": "Loading targets",
"Existing Fleet": "Existing Fleet",
"Install to all devices in a fleet": "Install to all devices in a fleet",
"Deploy to all devices in a fleet": "Deploy to all devices in a fleet",
"Existing Device": "Existing Device",
"Install to a single fleetless device": "Install to a single fleetless device",
"Deploy to a single fleetless device": "Deploy to a single fleetless device",
"This Operating system does not contain any additional formats besides bootc": "This Operating system does not contain any additional formats besides bootc",
"New Device": "New Device",
"Provision a brand new, unenrolled device": "Provision a brand new, unenrolled device",
"Update configuration successful": "Update configuration successful",
Expand Down Expand Up @@ -750,6 +754,7 @@
"Resourcesync is not accessible": "Resourcesync is not accessible",
"Resourcesync new commit detected": "Resourcesync new commit detected",
"Resource": "Resource",
"Review": "Review",
"Review and create": "Review and create",
"Edit fleet": "Edit fleet",
"Create fleet": "Create fleet",
Expand Down
1 change: 0 additions & 1 deletion libs/ui-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
"@patternfly/react-icons": "^6.4.0",
"@patternfly/react-styles": "^6.4.0",
"@patternfly/react-table": "^6.4.0",
"@patternfly/react-topology": "^6.4.0",
"i18next": "21.8.14 - 23.x",
"monaco-editor": "^0.51.0",
"react": "17.0.1 - 18.x",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ApplicationProviderSpec } from '@flightctl/types';
import semver from 'semver';

import { useTranslation } from '../../../hooks/useTranslation';
import { applyInitialConfig, getInitialAppConfig } from '../InstallWizard/utils';
import { getInitialAppConfig } from '../InstallWizard/utils';
import AppConfigStep, { isAppConfigStepValid } from '../InstallWizard/steps/AppConfigStep';
import FlightCtlWizardFooter from '../../common/FlightCtlWizardFooter';
import { useSubmitCatalogForm } from '../useSubmitCatalogForm';
Expand Down Expand Up @@ -39,7 +39,6 @@ type WizardContentProps = {
catalogItem: CatalogItem;
error: string | undefined;
schemaErrors: RJSFValidationError[] | undefined;
currentLabels: Record<string, string> | undefined;
setError: (err: string | undefined) => void;
};

Expand All @@ -49,13 +48,12 @@ const WizardContent: React.FC<WizardContentProps> = ({
catalogItem,
error,
schemaErrors,
currentLabels,
setError,
}) => {
const { t } = useTranslation();
const [currentStep, setCurrentStep] = React.useState<WizardStepType>();

const { values, errors, setFieldValue } = useFormikContext<AppUpdateFormik>();
const { values, errors } = useFormikContext<AppUpdateFormik>();

const isVersionStepValid = !!values.version;
const isConfigStepValid = isAppConfigStepValid(values, errors);
Expand All @@ -81,21 +79,17 @@ const WizardContent: React.FC<WizardContentProps> = ({
>
<WizardStep name={t('Version')} id={versionStepId}>
{(!currentStep || currentStep?.id === versionStepId) && (
<UpdateStep
catalogItem={catalogItem}
currentVersion={currentVersion}
isEdit={!!appSpec}
onVersionChange={(version: string) => {
const appConfig = getInitialAppConfig(catalogItem, version, appSpec, currentLabels);
applyInitialConfig(setFieldValue, appConfig);
}}
/>
<UpdateStep catalogItem={catalogItem} currentVersion={currentVersion} isEdit={!!appSpec} />
)}
</WizardStep>
<WizardStep name={t('Configuration')} id={configStepId} isDisabled={!isVersionStepValid}>
{currentStep?.id === configStepId && <AppConfigStep isEdit={!!appSpec} />}
</WizardStep>
<WizardStep name={t('Review')} id={reviewStepId} isDisabled={!isVersionStepValid || !isConfigStepValid}>
<WizardStep
name={t('Review and deploy')}
id={reviewStepId}
isDisabled={!isVersionStepValid || !isConfigStepValid}
>
{currentStep?.id === reviewStepId && (
<ReviewStep error={error} schemaErrors={schemaErrors} isEdit={!!appSpec} />
)}
Expand Down Expand Up @@ -178,7 +172,6 @@ const EditAppWizard: React.FC<EditAppWizardProps> = ({
catalogItem={catalogItem}
error={error}
schemaErrors={schemaErrors}
currentLabels={currentLabels}
setError={setError}
/>
</Formik>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const WizardContent: React.FC<WizardContentProps> = ({ currentVersion, catalogIt
<UpdateStep catalogItem={catalogItem} currentVersion={currentVersion} isEdit={isEdit} />
)}
</WizardStep>
<WizardStep name={t('Review')} id={reviewStepId} isDisabled={!isVersionStepValid}>
<WizardStep name={t('Review and deploy')} id={reviewStepId} isDisabled={!isVersionStepValid}>
{currentStep?.id === reviewStepId && <ReviewStep error={error} isEdit={isEdit} />}
</WizardStep>
</Wizard>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const ReviewStep = ({ error, schemaErrors, isEdit }: ReviewStepProps) => {
</StackItem>
<StackItem>
<Card>
<CardTitle>{isEdit ? t('Update specifications') : t('Installation specifications')}</CardTitle>
<CardTitle>{isEdit ? t('Update specifications') : t('Deployment specifications')}</CardTitle>
<CardBody>
<DescriptionList>
<DescriptionListGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,138 @@
.fctl-update-graph .pf-topology-content {
background-color: unset;
height: 400px;
}
.fctl-channel {
align-items: center;
display: flex;
}

.fctl-channel-line {
align-items: center;
display: flex;
height: 30px;
justify-content: center;
position: relative;
min-width: 50px;
width: 100%;
}

.fctl-channel-line::before {
background-color: var(--pf-t--global--border--color--default);
content: '';
height: 4px;
position: absolute;
width: 100%;
}

.fctl-channel-line:last-child::after {
background: transparent;
border: 8px solid transparent;
border-left-color: var(--pf-t--global--border--color--default);
border-width: 8px 12px;
content: '';
position: absolute;
right: -15px;
}

.fctl-channel-more-versions {
background: var(--pf-t--global--background--color--primary--default) !important;
border: 1px solid !important;
border-radius: 15px !important;
display: inline-block !important;
font-size: 11px !important;
font-weight: bold !important;
justify-content: center;
padding: var(--pf-t--global--spacer--xs) var(--pf-t--global--spacer--sm) !important;
position: absolute !important;
}

.fctl-channel-more-versions::after {
display: none;
}

.fctl-channel-more-versions:hover,
.fctl-channel-more-versions:focus {
background: var(--pf-t--global--color--brand--default) !important;
border-color: var(--pf-t--global--color--brand--default) !important;
color: var(--pf-t--global--background--color--primary--default) !important;
}

.fctl-channel-more-versions:focus {
outline: 0 !important;
}

.fctl-channel-name {
padding: 0 10px 0 20px;
min-width: 150px;
white-space: nowrap;
color: inherit;
padding-top: 20px;
}

.fctl-channel-path {
display: flex;
list-style: none;
margin: 0;
padding: 0;
position: relative;
width: 100%;
margin-top: 20px;
}

.fctl-channel-path .fctl-channel-line::before {
background-color: var(--pf-t--global--color--brand--default);
}

.fctl-channel-path .fctl-channel-line:last-child::after {
border-left-color: var(--pf-t--global--color--brand--default);
}

.fctl-channel-version {
display: flex;
flex-direction: column;
height: 35px;
justify-content: flex-end;
line-height: 1;
padding: 0 5px;
position: absolute;
text-align: center;
top: -35px;
overflow-wrap: anywhere;
word-break: normal;
}

.fctl-channel-version-dot {
background: var(--pf-t--global--color--brand--default) !important;
border-radius: 18px !important;
height: 18px !important;
padding: 0 !important;
position: absolute;
min-width: auto;
width: 18px !important;
z-index: 2;
}

.fctl-channel-version-dot::after {
background: var(--pf-t--global--background--color--primary--default) !important;
border: 2px solid var(--pf-t--global--background--color--primary--default) !important;
border-radius: 12px !important;
bottom: 2px !important;
content: '';
left: 2px !important;
position: absolute;
right: 2px !important;
top: 2px !important;
}

.fctl-channel-version-dot--current::after {
background: transparent !important;
}

.fctl-channel-version-dot--selected::after {
display: none;
}

.fctl-channel-version-dot--selected svg {
fill: var(--pf-t--global--background--color--primary--default);
position: relative;
z-index: 1;
width: 100%;
height: 100%;
}
Loading