Skip to content

Commit

Permalink
fix: change cluster console title (eclipse-che#388)
Browse files Browse the repository at this point in the history
  • Loading branch information
akurinnoy authored Oct 27, 2021
1 parent b42f901 commit 86db046
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions packages/dashboard-backend/src/api/clusterInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import { ApplicationInfo } from '@eclipse-che/common';
import { FastifyInstance } from 'fastify';
import { baseApiPath } from '../constants/config';
import { clusterConsoleGroup, clusterConsoleIcon, clusterConsoleTitle, clusterConsoleUrl } from '../devworkspace-client/services/cluster-info';
import { CLUSTER_CONSOLE_GROUP, CLUSTER_CONSOLE_ICON, CLUSTER_CONSOLE_TITLE, CLUSTER_CONSOLE_URL } from '../devworkspace-client/services/cluster-info';
import { getSchema } from '../services/helpers';

const tags = ['clusterInfo'];
Expand All @@ -24,10 +24,10 @@ export function registerClusterInfo(server: FastifyInstance) {
`${baseApiPath}/cluster-info`,
getSchema({ tags }),
async () => ({
icon: clusterConsoleIcon,
title: clusterConsoleTitle,
url: clusterConsoleUrl,
group: clusterConsoleGroup,
icon: CLUSTER_CONSOLE_ICON,
title: CLUSTER_CONSOLE_TITLE,
url: CLUSTER_CONSOLE_URL,
group: CLUSTER_CONSOLE_GROUP,
} as ApplicationInfo)
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
* Red Hat, Inc. - initial API and implementation
*/

export const clusterConsoleUrl = process.env['OPENSHIFT_CONSOLE_URL'] || '';
export const clusterConsoleTitle = process.env['OPENSHIFT_CONSOLE_TITLE']
|| 'Openshift Console';
export const clusterConsoleIcon = process.env['OPENSHIFT_CONSOLE_ICON']
|| (clusterConsoleUrl ? clusterConsoleUrl + '/static/assets/redhat.svg' : '');
export const clusterConsoleGroup = process.env['OPENSHIFT_CONSOLE_GROUP'];
export const CLUSTER_CONSOLE_URL = process.env['OPENSHIFT_CONSOLE_URL'] || '';
export const CLUSTER_CONSOLE_TITLE = process.env['OPENSHIFT_CONSOLE_TITLE']
|| 'OpenShift console';
export const CLUSTER_CONSOLE_ICON = process.env['OPENSHIFT_CONSOLE_ICON']
|| (CLUSTER_CONSOLE_URL ? CLUSTER_CONSOLE_URL + '/static/assets/redhat.svg' : '');
export const CLUSTER_CONSOLE_GROUP = process.env['OPENSHIFT_CONSOLE_GROUP'];
4 changes: 2 additions & 2 deletions packages/dashboard-backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { registerSwagger } from './swagger';
import { helpers } from '@eclipse-che/common';
import { isLocalRun } from './local-run';
import { registerClusterInfo } from './api/clusterInfo';
import { clusterConsoleUrl } from './devworkspace-client/services/cluster-info';
import { CLUSTER_CONSOLE_URL } from './devworkspace-client/services/cluster-info';
import { registerDockerConfigApi } from './api/dockerConfigApi';

const CHE_HOST = process.env.CHE_HOST as string;
Expand Down Expand Up @@ -68,7 +68,7 @@ registerTemplateApi(server);

registerDockerConfigApi(server);

if (clusterConsoleUrl) {
if (CLUSTER_CONSOLE_URL) {
registerClusterInfo(server);
}

Expand Down

0 comments on commit 86db046

Please sign in to comment.