Skip to content

Commit

Permalink
Merge pull request #12889 from rhamilto/OCPBUGS-14716
Browse files Browse the repository at this point in the history
OCPBUGS-14716: add ROSA branding option
  • Loading branch information
openshift-merge-robot committed Jun 16, 2023
2 parents 358dfba + f783d87 commit ca38136
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/bridge/main.go
Expand Up @@ -110,7 +110,7 @@ func main() {
fKubectlClientSecretFile := fs.String("kubectl-client-secret-file", "", "File containing the OAuth2 client_secret of kubectl.")
fK8sPublicEndpoint := fs.String("k8s-public-endpoint", "", "Endpoint to use when rendering kubeconfigs for clients. Useful for when bridge uses an internal endpoint clients can't access for communicating with the API server.")

fBranding := fs.String("branding", "okd", "Console branding for the masthead logo and title. One of okd, openshift, ocp, online, dedicated, or azure. Defaults to okd.")
fBranding := fs.String("branding", "okd", "Console branding for the masthead logo and title. One of okd, openshift, ocp, online, dedicated, azure, or rosa. Defaults to okd.")
fCustomProductName := fs.String("custom-product-name", "", "Custom product name for console branding.")
fCustomLogoFile := fs.String("custom-logo-file", "", "Custom product image for console branding.")
fStatuspageID := fs.String("statuspage-id", "", "Unique ID assigned by statuspage.io page that provides status info.")
Expand Down Expand Up @@ -216,8 +216,9 @@ func main() {
case "online":
case "dedicated":
case "azure":
case "rosa":
default:
bridge.FlagFatalf("branding", "value must be one of okd, openshift, ocp, online, dedicated, or azure")
bridge.FlagFatalf("branding", "value must be one of okd, openshift, ocp, online, dedicated, azure, or rosa")
}

if *fCustomLogoFile != "" {
Expand Down
5 changes: 5 additions & 0 deletions frontend/public/components/masthead.jsx
Expand Up @@ -17,6 +17,7 @@ import okdLogoImg from '../imgs/okd-logo.svg';
import openshiftLogoImg from '../imgs/openshift-logo.svg';
import onlineLogoImg from '../imgs/openshift-online-logo.svg';
import dedicatedLogoImg from '../imgs/openshift-dedicated-logo.svg';
import rosaLogoImg from '../imgs/openshift-service-on-aws-logo.svg';

export const getBrandingDetails = () => {
let logoImg, productName;
Expand All @@ -42,6 +43,10 @@ export const getBrandingDetails = () => {
logoImg = openshiftLogoImg;
productName = 'Azure Red Hat OpenShift';
break;
case 'rosa':
logoImg = rosaLogoImg;
productName = 'Red Hat OpenShift Service on AWS';
break;
default:
logoImg = okdLogoImg;
productName = 'OKD';
Expand Down
1 change: 1 addition & 0 deletions frontend/public/imgs/openshift-service-on-aws-logo.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions frontend/public/index.html
Expand Up @@ -33,6 +33,10 @@
<title>Azure Red Hat OpenShift</title>
<meta name="application-name" content="Azure Red Hat OpenShift">
[[ end ]]
[[ if eq .Branding "rosa" ]]
<title>Red Hat OpenShift Service on AWS</title>
<meta name="application-name" content="Red Hat OpenShift Service on AWS">
[[ end ]]

[[ if eq .Branding "okd" ]]
<link rel="shortcut icon" href="<%= require('./imgs/okd-favicon.png') %>">
Expand Down
3 changes: 3 additions & 0 deletions frontend/public/module/k8s/cluster-settings.ts
Expand Up @@ -273,6 +273,9 @@ export const getReportBugLink = (
case 'azure':
productName = 'Azure Red Hat OpenShift';
break;
case 'rosa':
productName = 'Red Hat OpenShift Service on AWS';
break;
default:
productName = 'OKD';
}
Expand Down

0 comments on commit ca38136

Please sign in to comment.