diff --git a/plugins/gitops-profiles/src/components/ClusterList/ClusterList.tsx b/plugins/gitops-profiles/src/components/ClusterList/ClusterList.tsx index 0bdad1c8ab..8e5aa15aa9 100644 --- a/plugins/gitops-profiles/src/components/ClusterList/ClusterList.tsx +++ b/plugins/gitops-profiles/src/components/ClusterList/ClusterList.tsx @@ -28,16 +28,21 @@ import { } from '@backstage/core'; import ClusterTable from '../ClusterTable/ClusterTable'; -import { Button, Typography } from '@material-ui/core'; +import { Button } from '@material-ui/core'; import { useAsync, useLocalStorage } from 'react-use'; import { gitOpsApiRef, ListClusterStatusesResponse } from '../../api'; +import { Alert } from '@material-ui/lab'; const ClusterList: FC<{}> = () => { const [loginInfo] = useLocalStorage<{ token: string; username: string; name: string; - }>('githubLoginDetails'); + }>('githubLoginDetails', { + token: '', + username: '', + name: 'Guest', + }); const api = useApi(gitOpsApiRef); @@ -59,9 +64,19 @@ const ClusterList: FC<{}> = () => { } else if (error) { content = ( - - Failed to load cluster, {String(error)} - +
+ + Error encountered while fetching list of GitOps-managed cluster.{' '} + {error.toString()} + + + Please make sure that you start GitOps-API backend on localhost port + 3008 before using this plugin. + + + If you're Guest, please login via GitHub first. + +
); } else {