-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* migrated graph to ui5 * bump deployment * bump deployment * adjusted ClusterOverview * moved cluster metadata from pageheader to panel * cluster can now be deleted from the cluster overview * code cleanup * css clean up & responsiveness * fix tests * fix cluster validation test * changed panel to card * changed delete to disconnect * adjustments
- Loading branch information
Showing
28 changed files
with
993 additions
and
456 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
88 changes: 88 additions & 0 deletions
88
src/components/Clusters/views/ClusterOverview/ClusterDetails.js
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 |
---|---|---|
@@ -0,0 +1,88 @@ | ||
import { spacing } from '@ui5/webcomponents-react-base'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { Card, CardHeader, Title } from '@ui5/webcomponents-react'; | ||
import { ClusterStorageType } from '../ClusterStorageType'; | ||
import { useGetGardenerProvider } from './useGetGardenerProvider'; | ||
import { useGetVersions } from './useGetVersions'; | ||
import { useFeature } from 'hooks/useFeature'; | ||
import { DynamicPageComponent } from 'shared/components/DynamicPageComponent/DynamicPageComponent'; | ||
|
||
const GardenerProvider = () => { | ||
const { t } = useTranslation(); | ||
const showGardenerMetadata = useFeature('SHOW_GARDENER_METADATA')?.isEnabled; | ||
|
||
const provider = useGetGardenerProvider({ | ||
skip: !showGardenerMetadata, | ||
}); | ||
|
||
if (!showGardenerMetadata) return null; | ||
if (!provider) return null; | ||
|
||
return ( | ||
<DynamicPageComponent.Column title={t('gardener.headers.provider') + ':'}> | ||
<p className="gardener-provider">{provider}</p> | ||
</DynamicPageComponent.Column> | ||
); | ||
}; | ||
|
||
export default function ClusterDetails({ currentCluster }) { | ||
const { t } = useTranslation(); | ||
const { loading, kymaVersion, k8sVersion } = useGetVersions(); | ||
const config = currentCluster?.config; | ||
|
||
return ( | ||
<> | ||
<Title | ||
level="H4" | ||
style={{ | ||
...spacing.sapUiMediumMarginBegin, | ||
...spacing.sapUiMediumMarginTop, | ||
...spacing.sapUiSmallMarginBottom, | ||
}} | ||
> | ||
{t('cluster-overview.headers.cluster-details')} | ||
</Title> | ||
<div | ||
className="cluster-overview__details-wrapper" | ||
style={spacing.sapUiSmallMarginBeginEnd} | ||
> | ||
<Card | ||
header={ | ||
<CardHeader titleText={t('cluster-overview.headers.metadata')} /> | ||
} | ||
> | ||
<div | ||
className="cluster-overview__details-grid" | ||
style={spacing.sapUiSmallMargin} | ||
> | ||
{!loading && k8sVersion && ( | ||
<DynamicPageComponent.Column | ||
title={t('clusters.overview.kubernetes-version') + ':'} | ||
> | ||
{k8sVersion} | ||
</DynamicPageComponent.Column> | ||
)} | ||
{!loading && kymaVersion && ( | ||
<DynamicPageComponent.Column | ||
title={t('clusters.overview.kyma-version') + ':'} | ||
> | ||
{kymaVersion} | ||
</DynamicPageComponent.Column> | ||
)} | ||
<DynamicPageComponent.Column | ||
title={t('clusters.storage.title') + ':'} | ||
> | ||
<ClusterStorageType clusterConfig={config} /> | ||
</DynamicPageComponent.Column> | ||
<DynamicPageComponent.Column | ||
title={t('clusters.common.api-server-address') + ':'} | ||
> | ||
{currentCluster?.currentContext?.cluster?.cluster?.server} | ||
</DynamicPageComponent.Column> | ||
<GardenerProvider /> | ||
</div> | ||
</Card> | ||
</div> | ||
</> | ||
); | ||
} |
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
30 changes: 0 additions & 30 deletions
30
src/components/Clusters/views/ClusterOverview/ClusterNodes/ClusterNodes.scss
This file was deleted.
Oops, something went wrong.
66 changes: 0 additions & 66 deletions
66
src/components/Clusters/views/ClusterOverview/ClusterNodes/ClusterStats.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.