forked from konveyor/tackle2-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Remove redundant targets from defaults list and sort targets (konve…
…yor#1354) - Remove from "default targets" the targets already stored in the hub. - Sort all targets by `label` so they appear alphabetically in the select option (especially important because the whole is a concatenation of the default and hub targets, which is why this wasn't obvious when looking at the list from dropdown). - Use proper `name` for defaults targets. It makes them more consistent with struct of hub stored targets. Although those names (for the default targets only) seems to not be used anywhere in the UI. And easier if down the track we merge both (defaults and hub targets) in the back-end. Resolves https://issues.redhat.com/browse/MTA-1258 Signed-off-by: Gilles Dubreuil <[email protected]>
- Loading branch information
Showing
2 changed files
with
22 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,16 @@ | ||
import { APP_BRAND, BrandType } from "@app/Constants"; | ||
import { TargetLabel } from "@app/api/models"; | ||
|
||
const openTargets: TargetLabel[] = [ | ||
{ | ||
name: "konveyor.io/target=camel", | ||
label: "konveyor.io/target=camel", | ||
}, | ||
{ | ||
name: "cloud-readiness", | ||
label: "konveyor.io/target=cloud-readiness", | ||
}, | ||
{ | ||
name: "drools", | ||
label: "konveyor.io/target=drools", | ||
}, | ||
{ name: "eap", label: "konveyor.io/target=eap" }, | ||
{ name: "eap6", label: "konveyor.io/target=eap6" }, | ||
{ name: "eap7", label: "konveyor.io/target=eap7" }, | ||
{ name: "eap8", label: "konveyor.io/target=eap8" }, | ||
{ name: "eapxp", label: "konveyor.io/target=eapxp" }, | ||
{ name: "fsw", label: "konveyor.io/target=fsw" }, | ||
{ | ||
name: "fuse", | ||
label: "konveyor.io/target=fuse", | ||
}, | ||
{ name: "hibernate", label: "konveyor.io/target=hibernate" }, | ||
{ name: "hibernate-search", label: "konveyor.io/target=hibernate-search" }, | ||
{ name: "jakarta-ee", label: "konveyor.io/target=jakarta-ee" }, | ||
{ name: "java-ee", label: "konveyor.io/target=java-ee" }, | ||
{ name: "jbpm", label: "konveyor.io/target=jbpm" }, | ||
{ name: "linux", label: "konveyor.io/target=linux" }, | ||
{ name: "openjdk", label: "konveyor.io/target=openjdk" }, | ||
{ name: "openjdk11", label: "konveyor.io/target=openjdk11" }, | ||
{ name: "openjdk17", label: "konveyor.io/target=openjdk17" }, | ||
{ name: "openliberty", label: "konveyor.io/target=openliberty" }, | ||
{ name: "quarkus", label: "konveyor.io/target=quarkus" }, | ||
{ name: "resteasy", label: "konveyor.io/target=resteasy" }, | ||
{ name: "rhr", label: "konveyor.io/target=rhr" }, | ||
{ name: "azure-appservice", label: "konveyor.io/target=azure-appservice" }, | ||
export const defaultTargets: TargetLabel[] = [ | ||
{ name: "Drools", label: "konveyor.io/target=drools" }, | ||
{ name: "EAP", label: "konveyor.io/target=eap" }, | ||
{ name: "EAP 6", label: "konveyor.io/target=eap6" }, | ||
{ name: "EAP XP", label: "konveyor.io/target=eapxp" }, | ||
{ name: "FSW", label: "konveyor.io/target=fsw" }, | ||
{ name: "Fuse", label: "konveyor.io/target=fuse" }, | ||
{ name: "Hibernate", label: "konveyor.io/target=hibernate" }, | ||
{ name: "Hibernate Search", label: "konveyor.io/target=hibernate-search" }, | ||
{ name: "Java EE", label: "konveyor.io/target=java-ee" }, | ||
{ name: "jBPM", label: "konveyor.io/target=jbpm" }, | ||
{ name: "OpenJDK", label: "konveyor.io/target=openjdk" }, | ||
{ name: "RESTEasy", label: "konveyor.io/target=resteasy" }, | ||
]; | ||
|
||
const proprietaryTargets = [ | ||
{ | ||
name: "konveyor.io/target=azure-aks", | ||
label: "konveyor.io/target=azure-aks", | ||
}, | ||
]; | ||
|
||
export const defaultTargets = | ||
APP_BRAND === BrandType.Konveyor | ||
? [...openTargets, ...proprietaryTargets] | ||
: [...openTargets]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters