Skip to content

Commit

Permalink
[WINDUP-3319] - Web UI - Transformation Targets (#786)
Browse files Browse the repository at this point in the history
* Remove icons and change texts

* Remove default icon from Transformation path
  • Loading branch information
carlosthe19916 committed Apr 1, 2022
1 parent bc5c674 commit 22187d1
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 43 deletions.
Expand Up @@ -3,13 +3,13 @@ import { Gallery, GalleryItem } from "@patternfly/react-core";

import { SelectCard } from "../select-card/select-card";

import jbossLogo from "images/jboss.svg";
import openshiftLogo from "images/openshift.svg";
import linuxLogo from "images/linux.svg";
import openjdkLogo from "images/openjdk.svg";
import camelLogo from "images/camel.svg";
import quarkusLogo from "images/quarkus.svg";
import rhRuntimesLogo from "images/rh-runtimes.svg";
// import jbossLogo from "images/jboss.svg";
// import openshiftLogo from "images/openshift.svg";
// import linuxLogo from "images/linux.svg";
// import openjdkLogo from "images/openjdk.svg";
// import camelLogo from "images/camel.svg";
// import quarkusLogo from "images/quarkus.svg";
// import rhRuntimesLogo from "images/rh-runtimes.svg";

interface TransformationPathOption {
label: string;
Expand All @@ -27,63 +27,84 @@ interface MultipleOptions {

const options: TransformationPathOption[] = [
{
label: "Application server migration to",
label: "Application server migration to EAP 7",
description:
"Upgrade to the latest Release of JBoss EAP or migrate your applications to JBoss EAP from competitors' Enterprise Application Server (e.g. Oracle WebLogic Server).",
options: [
{
label: "JBoss EAP 6",
value: "eap6",
default: false,
},
{
label: "JBoss EAP 7",
value: "eap7",
default: true,
},
],
iconSrc: jbossLogo,
"Upgrade to the latest Release of JBoss EAP or migrate your applications to JBoss EAP from competitors' Enterprise Application server (e.g.Oracle Weblogic Server).",
// options: [
// {
// label: "JBoss EAP 6",
// value: "eap6",
// default: false,
// },
// {
// label: "JBoss EAP 7",
// value: "eap7",
// default: true,
// },
// ],
options: "eap7",
// iconSrc: jbossLogo,
},
{
label: "Containerization",
description:
"A comprehensive set of cloud and container readiness rules to assess applications for suitability for deployment on OpenShift Container Platform.",
options: "cloud-readiness",
iconSrc: openshiftLogo,
// iconSrc: openshiftLogo,
},
{
label: "Linux",
label: "Quarkus",
description:
"Ensure there are no Microsoft Windows paths hard coded into your applications.",
options: "linux",
iconSrc: linuxLogo,
"Rules to support the migration of Spring Boot applications to Quarkus. The rules also identify other, non-Spring Boot, technologies embedded within applications for which there are equivalent Quarkus extensions.",
options: "quarkus",
// iconSrc: quarkusLogo,
},
{
label: "OpenJDK",
label: "OracleJDK to OpenJDK",
description: "Rules to support the migration to OpenJDK from OracleJDK.",
options: "openjdk",
iconSrc: openjdkLogo,
// iconSrc: openjdkLogo,
},
{
label: "Camel",
label: "OpenJDK 11",
description: "Rules to support the migration to OpenJDK 11 from OpenJDK 8.",
options: "openjdk11",
// iconSrc: openjdkLogo,
},
{
label: "Linux",
description:
"A comprehensive set of rules for migration from Apache Camel 2 to Apache Camel 3.",
options: "camel",
iconSrc: camelLogo,
"Ensure that there are no Microsoft Windows paths hard coded and no Dynamic-Link Library (DLL) into your applications.",
options: "linux",
// iconSrc: linuxLogo,
},
{
label: "Quarkus",
label: "Jakarta EE 9",
description:
"Rules to support the migration of Spring Boot applications to Quarkus.",
options: "quarkus",
iconSrc: quarkusLogo,
"A collection of rules to support migrating applications from Java EE 8 to Jakarta EE 9. The rules cover project dependencies, package renaming, updating XML Schema namespaces, the renaming of application configuration properties and bootstrapping files.",
options: "jakarta-ee",
// iconSrc: linuxLogo,
},
{
label: "Spring Boot on Red Hat Runtimes",
description:
"A set of rules for assessing the compatibility of applications against the versions of Spring Boot libraries supported by Red Hat Runtimes.",
"A set of rules for assessing the compatibility of applications against versions of Spring Boot libraries suported by Red Hat Runtimes.",
options: "rhr",
iconSrc: rhRuntimesLogo,
// iconSrc: rhRuntimesLogo,
},
{
label: "Open Liberty",
description:
"A comprehensive set of rules for migrating traditional WebSphere applications to Open Liberty.",
options: "openliberty",
// iconSrc: rhRuntimesLogo,
},
{
label: "Camel",
description:
"Rules for the migration from Apache Camel 2 to Apache Camel 3.",
options: "camel",
// iconSrc: camelLogo,
},
];

Expand Down
Expand Up @@ -12,7 +12,6 @@ import {
SelectOptionObject,
EmptyStateBody,
} from "@patternfly/react-core";
import { CubesIcon } from "@patternfly/react-icons";

import "./select-card.scss";
import { useState } from "react";
Expand Down Expand Up @@ -72,8 +71,8 @@ export const SelectCard: React.FC<SelectCardProps> = ({
onChange(true, selection as any);
};

const getImage = (): React.ComponentType<any> => {
let result: React.ComponentType<any> = CubesIcon;
const getImage = (): React.ComponentType<any> | undefined => {
let result: React.ComponentType<any> | undefined = undefined;
if (icon) {
result = icon;
} else if (iconSrc) {
Expand All @@ -97,7 +96,7 @@ export const SelectCard: React.FC<SelectCardProps> = ({
variant={EmptyStateVariant.small}
className="select-card__component__empty-state"
>
<EmptyStateIcon icon={getImage()} />
{getImage() && <EmptyStateIcon icon={getImage()} />}
<Title headingLevel="h4" size="md">
{label}
</Title>
Expand Down

0 comments on commit 22187d1

Please sign in to comment.