-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
frontend: add support for gateway-api
- Loading branch information
Showing
17 changed files
with
859 additions
and
0 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { useTranslation } from 'react-i18next'; | ||
import { useParams } from 'react-router-dom'; | ||
import GatewayClass, { KubeGatewayClass } from '../../lib/k8s/gatewayClass'; | ||
import { ConditionsTable, DetailsGrid } from '../common/Resource'; | ||
import SectionBox from '../common/SectionBox'; | ||
|
||
export default function GatewayClassDetails() { | ||
const { name } = useParams<{ name: string }>(); | ||
const { t } = useTranslation(['glossary', 'translation']); | ||
|
||
return ( | ||
<DetailsGrid | ||
resourceType={GatewayClass} | ||
name={name} | ||
withEvents | ||
extraInfo={gatewayClass => | ||
gatewayClass && [ | ||
{ | ||
name: t('Controller Name'), | ||
value: gatewayClass.controllerName, | ||
}, | ||
] | ||
} | ||
extraSections={(item: KubeGatewayClass) => | ||
item && [ | ||
{ | ||
id: 'headlamp.gatewayclass-conditions', | ||
section: ( | ||
<SectionBox title={t('translation|Conditions')}> | ||
<ConditionsTable resource={item.jsonData} showLastUpdate={false} /> | ||
</SectionBox> | ||
), | ||
}, | ||
] | ||
} | ||
/> | ||
); | ||
} |
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,26 @@ | ||
import { useTranslation } from 'react-i18next'; | ||
import GatewayClass from '../../lib/k8s/gatewayClass'; | ||
import ResourceListView from '../common/Resource/ResourceListView'; | ||
|
||
export default function GatewayClassList() { | ||
const { t } = useTranslation('glossary'); | ||
|
||
return ( | ||
<ResourceListView | ||
title={t('Gateway Classes')} | ||
headerProps={{ | ||
noNamespaceFilter: true, | ||
}} | ||
resourceClass={GatewayClass} | ||
columns={[ | ||
'name', | ||
{ | ||
id: 'controllerName', | ||
label: t('Controller'), | ||
getValue: (GatewayClass: GatewayClass) => GatewayClass.spec?.controllerName, | ||
}, | ||
'age', | ||
]} | ||
/> | ||
); | ||
} |
Oops, something went wrong.