mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Signed-off-by: Roman <ixrock@gmail.com> Co-authored-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
35 lines
1011 B
TypeScript
35 lines
1011 B
TypeScript
import React from "react";
|
|
import { observer } from "mobx-react";
|
|
import { Trans } from "@lingui/macro";
|
|
import { TabLayout, TabLayoutRoute } from "../layout/tab-layout";
|
|
import { HelmCharts, helmChartsRoute, helmChartsURL } from "../+apps-helm-charts";
|
|
import { HelmReleases, releaseRoute, releaseURL } from "../+apps-releases";
|
|
import { namespaceStore } from "../+namespaces/namespace.store";
|
|
|
|
@observer
|
|
export class Apps extends React.Component {
|
|
static get tabRoutes(): TabLayoutRoute[] {
|
|
const query = namespaceStore.getContextParams();
|
|
return [
|
|
{
|
|
title: <Trans>Charts</Trans>,
|
|
component: HelmCharts,
|
|
url: helmChartsURL(),
|
|
routePath: helmChartsRoute.path.toString(),
|
|
},
|
|
{
|
|
title: <Trans>Releases</Trans>,
|
|
component: HelmReleases,
|
|
url: releaseURL({ query }),
|
|
routePath: releaseRoute.path.toString(),
|
|
},
|
|
]
|
|
}
|
|
|
|
render() {
|
|
return (
|
|
<TabLayout className="Apps" tabs={Apps.tabRoutes}/>
|
|
)
|
|
}
|
|
}
|