mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Split KubeObject related components into seperate folders (#3533)
This commit is contained in:
parent
3fe8014f11
commit
fb74859f66
@ -62,7 +62,11 @@ export * from "../../renderer/components/chart/bar-chart";
|
|||||||
export * from "../../renderer/components/chart/pie-chart";
|
export * from "../../renderer/components/chart/pie-chart";
|
||||||
|
|
||||||
// kube helpers
|
// kube helpers
|
||||||
export * from "../../renderer/components/kube-object";
|
export * from "../../renderer/components/kube-detail-params";
|
||||||
|
export * from "../../renderer/components/kube-object-details";
|
||||||
|
export * from "../../renderer/components/kube-object-list-layout";
|
||||||
|
export * from "../../renderer/components/kube-object-menu";
|
||||||
|
export * from "../../renderer/components/kube-object-meta";
|
||||||
export * from "../../renderer/components/+events/kube-event-details";
|
export * from "../../renderer/components/+events/kube-event-details";
|
||||||
|
|
||||||
// specific exports
|
// specific exports
|
||||||
|
|||||||
@ -23,7 +23,7 @@ import { navigation, PageParam, PageParamInit } from "../../renderer/navigation"
|
|||||||
|
|
||||||
export type { PageParamInit, PageParam } from "../../renderer/navigation/page-param";
|
export type { PageParamInit, PageParam } from "../../renderer/navigation/page-param";
|
||||||
export { navigate, isActiveRoute } from "../../renderer/navigation/helpers";
|
export { navigate, isActiveRoute } from "../../renderer/navigation/helpers";
|
||||||
export { hideDetails, showDetails, getDetailsUrl } from "../../renderer/components/kube-object/kube-object-details";
|
export { hideDetails, showDetails, getDetailsUrl } from "../../renderer/components/kube-detail-params";
|
||||||
export type { URLParams } from "../../common/utils/buildUrl";
|
export type { URLParams } from "../../common/utils/buildUrl";
|
||||||
|
|
||||||
export function createPageParam<V>(init: PageParamInit<V>) {
|
export function createPageParam<V>(init: PageParamInit<V>) {
|
||||||
|
|||||||
@ -45,7 +45,7 @@ import { apiManager } from "../../api/api-manager";
|
|||||||
import { SubTitle } from "../layout/sub-title";
|
import { SubTitle } from "../layout/sub-title";
|
||||||
import { secretsStore } from "../+config-secrets/secrets.store";
|
import { secretsStore } from "../+config-secrets/secrets.store";
|
||||||
import { Secret } from "../../api/endpoints";
|
import { Secret } from "../../api/endpoints";
|
||||||
import { getDetailsUrl } from "../kube-object";
|
import { getDetailsUrl } from "../kube-detail-params";
|
||||||
import { Checkbox } from "../checkbox";
|
import { Checkbox } from "../checkbox";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@ -45,7 +45,7 @@ export class HelmReleaseMenu extends React.Component<Props> {
|
|||||||
const { release, hideDetails } = this.props;
|
const { release, hideDetails } = this.props;
|
||||||
|
|
||||||
createUpgradeChartTab(release);
|
createUpgradeChartTab(release);
|
||||||
hideDetails && hideDetails();
|
hideDetails?.();
|
||||||
}
|
}
|
||||||
|
|
||||||
@boundMethod
|
@boundMethod
|
||||||
|
|||||||
@ -34,7 +34,7 @@ import type { ItemObject } from "../../item.store";
|
|||||||
import { Spinner } from "../spinner";
|
import { Spinner } from "../spinner";
|
||||||
import { ThemeStore } from "../../theme.store";
|
import { ThemeStore } from "../../theme.store";
|
||||||
import { lookupApiLink } from "../../api/kube-api";
|
import { lookupApiLink } from "../../api/kube-api";
|
||||||
import { kubeSelectedUrlParam, showDetails } from "../kube-object";
|
import { kubeSelectedUrlParam, showDetails } from "../kube-detail-params";
|
||||||
import { kubeWatchApi } from "../../api/kube-watch-api";
|
import { kubeWatchApi } from "../../api/kube-watch-api";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@ -26,12 +26,13 @@ import { observer } from "mobx-react";
|
|||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { DrawerItem, DrawerTitle } from "../drawer";
|
import { DrawerItem, DrawerTitle } from "../drawer";
|
||||||
import { Badge } from "../badge";
|
import { Badge } from "../badge";
|
||||||
import { KubeObjectDetailsProps, getDetailsUrl } from "../kube-object";
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
import { cssNames } from "../../utils";
|
import { cssNames } from "../../utils";
|
||||||
import { HorizontalPodAutoscaler, HpaMetricType, IHpaMetric } from "../../api/endpoints/hpa.api";
|
import { HorizontalPodAutoscaler, HpaMetricType, IHpaMetric } from "../../api/endpoints/hpa.api";
|
||||||
import { Table, TableCell, TableHead, TableRow } from "../table";
|
import { Table, TableCell, TableHead, TableRow } from "../table";
|
||||||
import { lookupApiLink } from "../../api/kube-api";
|
import { lookupApiLink } from "../../api/kube-api";
|
||||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
|
import { getDetailsUrl } from "../kube-detail-params";
|
||||||
|
|
||||||
export interface HpaDetailsProps extends KubeObjectDetailsProps<HorizontalPodAutoscaler> {
|
export interface HpaDetailsProps extends KubeObjectDetailsProps<HorizontalPodAutoscaler> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,7 +24,7 @@ import "./hpa.scss";
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import type { RouteComponentProps } from "react-router";
|
import type { RouteComponentProps } from "react-router";
|
||||||
import { KubeObjectListLayout } from "../kube-object";
|
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||||
import type { HorizontalPodAutoscaler } from "../../api/endpoints/hpa.api";
|
import type { HorizontalPodAutoscaler } from "../../api/endpoints/hpa.api";
|
||||||
import { hpaStore } from "./hpa.store";
|
import { hpaStore } from "./hpa.store";
|
||||||
import { Badge } from "../badge";
|
import { Badge } from "../badge";
|
||||||
|
|||||||
@ -23,9 +23,9 @@ import "./limit-range-details.scss";
|
|||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import type { KubeObjectDetailsProps } from "../kube-object";
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
import { LimitPart, LimitRange, LimitRangeItem, Resource } from "../../api/endpoints/limit-range.api";
|
import { LimitPart, LimitRange, LimitRangeItem, Resource } from "../../api/endpoints/limit-range.api";
|
||||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
import { DrawerItem } from "../drawer/drawer-item";
|
import { DrawerItem } from "../drawer/drawer-item";
|
||||||
import { Badge } from "../badge";
|
import { Badge } from "../badge";
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ import "./limit-ranges.scss";
|
|||||||
|
|
||||||
import type { RouteComponentProps } from "react-router";
|
import type { RouteComponentProps } from "react-router";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { KubeObjectListLayout } from "../kube-object/kube-object-list-layout";
|
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||||
import { limitRangeStore } from "./limit-ranges.store";
|
import { limitRangeStore } from "./limit-ranges.store";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||||
|
|||||||
@ -29,9 +29,9 @@ import { Notifications } from "../notifications";
|
|||||||
import { Input } from "../input";
|
import { Input } from "../input";
|
||||||
import { Button } from "../button";
|
import { Button } from "../button";
|
||||||
import { configMapsStore } from "./config-maps.store";
|
import { configMapsStore } from "./config-maps.store";
|
||||||
import type { KubeObjectDetailsProps } from "../kube-object";
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
import type { ConfigMap } from "../../api/endpoints";
|
import type { ConfigMap } from "../../api/endpoints";
|
||||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
|
|
||||||
interface Props extends KubeObjectDetailsProps<ConfigMap> {
|
interface Props extends KubeObjectDetailsProps<ConfigMap> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,7 +25,7 @@ import React from "react";
|
|||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import type { RouteComponentProps } from "react-router";
|
import type { RouteComponentProps } from "react-router";
|
||||||
import { configMapsStore } from "./config-maps.store";
|
import { configMapsStore } from "./config-maps.store";
|
||||||
import { KubeObjectListLayout } from "../kube-object";
|
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||||
import type { ConfigMapsRouteParams } from "../../../common/routes";
|
import type { ConfigMapsRouteParams } from "../../../common/routes";
|
||||||
|
|
||||||
|
|||||||
@ -25,9 +25,9 @@ import React from "react";
|
|||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { DrawerItem } from "../drawer";
|
import { DrawerItem } from "../drawer";
|
||||||
import { Badge } from "../badge";
|
import { Badge } from "../badge";
|
||||||
import type { KubeObjectDetailsProps } from "../kube-object";
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
import type { PodDisruptionBudget } from "../../api/endpoints";
|
import type { PodDisruptionBudget } from "../../api/endpoints";
|
||||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
|
|
||||||
interface Props extends KubeObjectDetailsProps<PodDisruptionBudget> {
|
interface Props extends KubeObjectDetailsProps<PodDisruptionBudget> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,8 +25,9 @@ import * as React from "react";
|
|||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { podDisruptionBudgetsStore } from "./pod-disruption-budgets.store";
|
import { podDisruptionBudgetsStore } from "./pod-disruption-budgets.store";
|
||||||
import type { PodDisruptionBudget } from "../../api/endpoints/poddisruptionbudget.api";
|
import type { PodDisruptionBudget } from "../../api/endpoints/poddisruptionbudget.api";
|
||||||
import { KubeObjectDetailsProps, KubeObjectListLayout } from "../kube-object";
|
|
||||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||||
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
|
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||||
|
|
||||||
enum columnId {
|
enum columnId {
|
||||||
name = "name",
|
name = "name",
|
||||||
|
|||||||
@ -25,11 +25,11 @@ import kebabCase from "lodash/kebabCase";
|
|||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { DrawerItem, DrawerTitle } from "../drawer";
|
import { DrawerItem, DrawerTitle } from "../drawer";
|
||||||
import { cpuUnitsToNumber, cssNames, unitsToBytes, metricUnitsToNumber } from "../../utils";
|
import { cpuUnitsToNumber, cssNames, unitsToBytes, metricUnitsToNumber } from "../../utils";
|
||||||
import type { KubeObjectDetailsProps } from "../kube-object";
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
import type { ResourceQuota } from "../../api/endpoints/resource-quota.api";
|
import type { ResourceQuota } from "../../api/endpoints/resource-quota.api";
|
||||||
import { LineProgress } from "../line-progress";
|
import { LineProgress } from "../line-progress";
|
||||||
import { Table, TableCell, TableHead, TableRow } from "../table";
|
import { Table, TableCell, TableHead, TableRow } from "../table";
|
||||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
|
|
||||||
interface Props extends KubeObjectDetailsProps<ResourceQuota> {
|
interface Props extends KubeObjectDetailsProps<ResourceQuota> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,7 +24,7 @@ import "./resource-quotas.scss";
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import type { RouteComponentProps } from "react-router";
|
import type { RouteComponentProps } from "react-router";
|
||||||
import { KubeObjectListLayout } from "../kube-object";
|
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||||
import { AddQuotaDialog } from "./add-quota-dialog";
|
import { AddQuotaDialog } from "./add-quota-dialog";
|
||||||
import { resourceQuotaStore } from "./resource-quotas.store";
|
import { resourceQuotaStore } from "./resource-quotas.store";
|
||||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||||
|
|||||||
@ -37,7 +37,7 @@ import type { KubeObjectMetadata } from "../../api/kube-object";
|
|||||||
import { base64 } from "../../utils";
|
import { base64 } from "../../utils";
|
||||||
import { Notifications } from "../notifications";
|
import { Notifications } from "../notifications";
|
||||||
import upperFirst from "lodash/upperFirst";
|
import upperFirst from "lodash/upperFirst";
|
||||||
import { showDetails } from "../kube-object";
|
import { showDetails } from "../kube-detail-params";
|
||||||
|
|
||||||
interface Props extends Partial<DialogProps> {
|
interface Props extends Partial<DialogProps> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,9 +32,9 @@ import { Notifications } from "../notifications";
|
|||||||
import { base64 } from "../../utils";
|
import { base64 } from "../../utils";
|
||||||
import { Icon } from "../icon";
|
import { Icon } from "../icon";
|
||||||
import { secretsStore } from "./secrets.store";
|
import { secretsStore } from "./secrets.store";
|
||||||
import type { KubeObjectDetailsProps } from "../kube-object";
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
import type { Secret } from "../../api/endpoints";
|
import type { Secret } from "../../api/endpoints";
|
||||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
|
|
||||||
interface Props extends KubeObjectDetailsProps<Secret> {
|
interface Props extends KubeObjectDetailsProps<Secret> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,7 +25,7 @@ import React from "react";
|
|||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import type { RouteComponentProps } from "react-router";
|
import type { RouteComponentProps } from "react-router";
|
||||||
import { AddSecretDialog } from "./add-secret-dialog";
|
import { AddSecretDialog } from "./add-secret-dialog";
|
||||||
import { KubeObjectListLayout } from "../kube-object";
|
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||||
import { Badge } from "../badge";
|
import { Badge } from "../badge";
|
||||||
import { secretsStore } from "./secrets.store";
|
import { secretsStore } from "./secrets.store";
|
||||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||||
|
|||||||
@ -28,10 +28,10 @@ import type { CustomResourceDefinition } from "../../api/endpoints/crd.api";
|
|||||||
import { AceEditor } from "../ace-editor";
|
import { AceEditor } from "../ace-editor";
|
||||||
import { Badge } from "../badge";
|
import { Badge } from "../badge";
|
||||||
import { DrawerItem, DrawerTitle } from "../drawer";
|
import { DrawerItem, DrawerTitle } from "../drawer";
|
||||||
import type { KubeObjectDetailsProps } from "../kube-object";
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
import { Table, TableCell, TableHead, TableRow } from "../table";
|
import { Table, TableCell, TableHead, TableRow } from "../table";
|
||||||
import { Input } from "../input";
|
import { Input } from "../input";
|
||||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
|
|
||||||
interface Props extends KubeObjectDetailsProps<CustomResourceDefinition> {
|
interface Props extends KubeObjectDetailsProps<CustomResourceDefinition> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,7 +26,7 @@ import { computed, makeObservable } from "mobx";
|
|||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { stopPropagation } from "../../utils";
|
import { stopPropagation } from "../../utils";
|
||||||
import { KubeObjectListLayout } from "../kube-object";
|
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||||
import { crdStore } from "./crd.store";
|
import { crdStore } from "./crd.store";
|
||||||
import type { CustomResourceDefinition } from "../../api/endpoints/crd.api";
|
import type { CustomResourceDefinition } from "../../api/endpoints/crd.api";
|
||||||
import { Select, SelectOption } from "../select";
|
import { Select, SelectOption } from "../select";
|
||||||
@ -116,7 +116,7 @@ export class CrdList extends React.Component {
|
|||||||
controlShouldRenderValue={false}
|
controlShouldRenderValue={false}
|
||||||
formatOptionLabel={({ value: group }: SelectOption) => {
|
formatOptionLabel={({ value: group }: SelectOption) => {
|
||||||
const isSelected = selectedGroups.includes(group);
|
const isSelected = selectedGroups.includes(group);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex gaps align-center">
|
<div className="flex gaps align-center">
|
||||||
<Icon small material="folder"/>
|
<Icon small material="folder"/>
|
||||||
|
|||||||
@ -27,8 +27,8 @@ import { observer } from "mobx-react";
|
|||||||
import { cssNames } from "../../utils";
|
import { cssNames } from "../../utils";
|
||||||
import { Badge } from "../badge";
|
import { Badge } from "../badge";
|
||||||
import { DrawerItem } from "../drawer";
|
import { DrawerItem } from "../drawer";
|
||||||
import type { KubeObjectDetailsProps } from "../kube-object";
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
import { Input } from "../input";
|
import { Input } from "../input";
|
||||||
import type { AdditionalPrinterColumnsV1, CustomResourceDefinition } from "../../api/endpoints/crd.api";
|
import type { AdditionalPrinterColumnsV1, CustomResourceDefinition } from "../../api/endpoints/crd.api";
|
||||||
import { parseJsonPath } from "../../utils/jsonPath";
|
import { parseJsonPath } from "../../utils/jsonPath";
|
||||||
|
|||||||
@ -25,7 +25,7 @@ import React from "react";
|
|||||||
import jsonPath from "jsonpath";
|
import jsonPath from "jsonpath";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import type { RouteComponentProps } from "react-router";
|
import type { RouteComponentProps } from "react-router";
|
||||||
import { KubeObjectListLayout } from "../kube-object";
|
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||||
import type { KubeObject } from "../../api/kube-object";
|
import type { KubeObject } from "../../api/kube-object";
|
||||||
import { computed, makeObservable } from "mobx";
|
import { computed, makeObservable } from "mobx";
|
||||||
import { crdStore } from "./crd.store";
|
import { crdStore } from "./crd.store";
|
||||||
|
|||||||
@ -26,12 +26,13 @@ import kebabCase from "lodash/kebabCase";
|
|||||||
import { DrawerItem, DrawerTitle } from "../drawer";
|
import { DrawerItem, DrawerTitle } from "../drawer";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { KubeObjectDetailsProps, getDetailsUrl } from "../kube-object";
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
import type { KubeEvent } from "../../api/endpoints/events.api";
|
import type { KubeEvent } from "../../api/endpoints/events.api";
|
||||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
import { Table, TableCell, TableHead, TableRow } from "../table";
|
import { Table, TableCell, TableHead, TableRow } from "../table";
|
||||||
import { lookupApiLink } from "../../api/kube-api";
|
import { lookupApiLink } from "../../api/kube-api";
|
||||||
import { LocaleDate } from "../locale-date";
|
import { LocaleDate } from "../locale-date";
|
||||||
|
import { getDetailsUrl } from "../kube-detail-params";
|
||||||
|
|
||||||
interface Props extends KubeObjectDetailsProps<KubeEvent> {
|
interface Props extends KubeObjectDetailsProps<KubeEvent> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,7 +27,7 @@ import { observer } from "mobx-react";
|
|||||||
import { orderBy } from "lodash";
|
import { orderBy } from "lodash";
|
||||||
import { TabLayout } from "../layout/tab-layout";
|
import { TabLayout } from "../layout/tab-layout";
|
||||||
import { EventStore, eventStore } from "./event.store";
|
import { EventStore, eventStore } from "./event.store";
|
||||||
import { getDetailsUrl, KubeObjectListLayout, KubeObjectListLayoutProps } from "../kube-object";
|
import { KubeObjectListLayout, KubeObjectListLayoutProps } from "../kube-object-list-layout";
|
||||||
import type { KubeEvent } from "../../api/endpoints/events.api";
|
import type { KubeEvent } from "../../api/endpoints/events.api";
|
||||||
import type { TableSortCallbacks, TableSortParams } from "../table";
|
import type { TableSortCallbacks, TableSortParams } from "../table";
|
||||||
import type { HeaderCustomizer } from "../item-object-list";
|
import type { HeaderCustomizer } from "../item-object-list";
|
||||||
@ -37,6 +37,7 @@ import { cssNames, IClassName, stopPropagation } from "../../utils";
|
|||||||
import { Icon } from "../icon";
|
import { Icon } from "../icon";
|
||||||
import { lookupApiLink } from "../../api/kube-api";
|
import { lookupApiLink } from "../../api/kube-api";
|
||||||
import { eventsURL } from "../../../common/routes";
|
import { eventsURL } from "../../../common/routes";
|
||||||
|
import { getDetailsUrl } from "../kube-detail-params";
|
||||||
|
|
||||||
enum columnId {
|
enum columnId {
|
||||||
message = "message",
|
message = "message",
|
||||||
@ -133,7 +134,7 @@ export class Events extends React.Component<Props> {
|
|||||||
tooltip={`Limited to ${store.limit}`}
|
tooltip={`Limited to ${store.limit}`}
|
||||||
/>
|
/>
|
||||||
</>,
|
</>,
|
||||||
title,
|
title,
|
||||||
...headerPlaceholders
|
...headerPlaceholders
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@ -27,16 +27,17 @@ import { disposeOnUnmount, observer } from "mobx-react";
|
|||||||
import { DrawerItem } from "../drawer";
|
import { DrawerItem } from "../drawer";
|
||||||
import { boundMethod, cssNames } from "../../utils";
|
import { boundMethod, cssNames } from "../../utils";
|
||||||
import { getMetricsForNamespace, IPodMetrics, Namespace } from "../../api/endpoints";
|
import { getMetricsForNamespace, IPodMetrics, Namespace } from "../../api/endpoints";
|
||||||
import { getDetailsUrl, KubeObjectDetailsProps } from "../kube-object";
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { Spinner } from "../spinner";
|
import { Spinner } from "../spinner";
|
||||||
import { resourceQuotaStore } from "../+config-resource-quotas/resource-quotas.store";
|
import { resourceQuotaStore } from "../+config-resource-quotas/resource-quotas.store";
|
||||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
import { limitRangeStore } from "../+config-limit-ranges/limit-ranges.store";
|
import { limitRangeStore } from "../+config-limit-ranges/limit-ranges.store";
|
||||||
import { ResourceMetrics } from "../resource-metrics";
|
import { ResourceMetrics } from "../resource-metrics";
|
||||||
import { PodCharts, podMetricTabs } from "../+workloads-pods/pod-charts";
|
import { PodCharts, podMetricTabs } from "../+workloads-pods/pod-charts";
|
||||||
import { ClusterMetricsResourceType } from "../../../common/cluster-types";
|
import { ClusterMetricsResourceType } from "../../../common/cluster-types";
|
||||||
import { getActiveClusterEntity } from "../../api/catalog-entity-registry";
|
import { getActiveClusterEntity } from "../../api/catalog-entity-registry";
|
||||||
|
import { getDetailsUrl } from "../kube-detail-params";
|
||||||
|
|
||||||
interface Props extends KubeObjectDetailsProps<Namespace> {
|
interface Props extends KubeObjectDetailsProps<Namespace> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,7 +27,7 @@ import { AddNamespaceDialog } from "./add-namespace-dialog";
|
|||||||
import { TabLayout } from "../layout/tab-layout";
|
import { TabLayout } from "../layout/tab-layout";
|
||||||
import { Badge } from "../badge";
|
import { Badge } from "../badge";
|
||||||
import type { RouteComponentProps } from "react-router";
|
import type { RouteComponentProps } from "react-router";
|
||||||
import { KubeObjectListLayout } from "../kube-object";
|
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||||
import { namespaceStore } from "./namespace.store";
|
import { namespaceStore } from "./namespace.store";
|
||||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||||
import type { NamespacesRouteParams } from "../../../common/routes";
|
import type { NamespacesRouteParams } from "../../../common/routes";
|
||||||
|
|||||||
@ -24,9 +24,9 @@ import "./endpoint-details.scss";
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { DrawerTitle } from "../drawer";
|
import { DrawerTitle } from "../drawer";
|
||||||
import type { KubeObjectDetailsProps } from "../kube-object";
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
import type { Endpoint } from "../../api/endpoints";
|
import type { Endpoint } from "../../api/endpoints";
|
||||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
import { EndpointSubsetList } from "./endpoint-subset-list";
|
import { EndpointSubsetList } from "./endpoint-subset-list";
|
||||||
|
|
||||||
interface Props extends KubeObjectDetailsProps<Endpoint> {
|
interface Props extends KubeObjectDetailsProps<Endpoint> {
|
||||||
|
|||||||
@ -28,7 +28,7 @@ import { Table, TableCell, TableHead, TableRow } from "../table";
|
|||||||
import { boundMethod } from "../../utils";
|
import { boundMethod } from "../../utils";
|
||||||
import { lookupApiLink } from "../../api/kube-api";
|
import { lookupApiLink } from "../../api/kube-api";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { getDetailsUrl } from "../kube-object";
|
import { getDetailsUrl } from "../kube-detail-params";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
subset: EndpointSubset;
|
subset: EndpointSubset;
|
||||||
|
|||||||
@ -25,7 +25,7 @@ import React from "react";
|
|||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import type { RouteComponentProps } from "react-router-dom";
|
import type { RouteComponentProps } from "react-router-dom";
|
||||||
import { endpointStore } from "./endpoints.store";
|
import { endpointStore } from "./endpoints.store";
|
||||||
import { KubeObjectListLayout } from "../kube-object";
|
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||||
import type { EndpointRouteParams } from "../../../common/routes";
|
import type { EndpointRouteParams } from "../../../common/routes";
|
||||||
|
|
||||||
|
|||||||
@ -28,9 +28,9 @@ import { DrawerItem, DrawerTitle } from "../drawer";
|
|||||||
import type { ILoadBalancerIngress, Ingress } from "../../api/endpoints";
|
import type { ILoadBalancerIngress, Ingress } from "../../api/endpoints";
|
||||||
import { Table, TableCell, TableHead, TableRow } from "../table";
|
import { Table, TableCell, TableHead, TableRow } from "../table";
|
||||||
import { ResourceMetrics } from "../resource-metrics";
|
import { ResourceMetrics } from "../resource-metrics";
|
||||||
import type { KubeObjectDetailsProps } from "../kube-object";
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
import { IngressCharts } from "./ingress-charts";
|
import { IngressCharts } from "./ingress-charts";
|
||||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
import { getBackendServiceNamePort, getMetricsForIngress, IIngressMetrics } from "../../api/endpoints/ingress.api";
|
import { getBackendServiceNamePort, getMetricsForIngress, IIngressMetrics } from "../../api/endpoints/ingress.api";
|
||||||
import { getActiveClusterEntity } from "../../api/catalog-entity-registry";
|
import { getActiveClusterEntity } from "../../api/catalog-entity-registry";
|
||||||
import { ClusterMetricsResourceType } from "../../../common/cluster-types";
|
import { ClusterMetricsResourceType } from "../../../common/cluster-types";
|
||||||
|
|||||||
@ -25,7 +25,7 @@ import React from "react";
|
|||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import type { RouteComponentProps } from "react-router-dom";
|
import type { RouteComponentProps } from "react-router-dom";
|
||||||
import { ingressStore } from "./ingress.store";
|
import { ingressStore } from "./ingress.store";
|
||||||
import { KubeObjectListLayout } from "../kube-object";
|
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||||
import type { IngressRouteParams } from "../../../common/routes";
|
import type { IngressRouteParams } from "../../../common/routes";
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@ import "./network-policies.scss";
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import type { RouteComponentProps } from "react-router-dom";
|
import type { RouteComponentProps } from "react-router-dom";
|
||||||
import { KubeObjectListLayout } from "../kube-object";
|
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||||
import { networkPolicyStore } from "./network-policy.store";
|
import { networkPolicyStore } from "./network-policy.store";
|
||||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||||
import type { NetworkPoliciesRouteParams } from "../../../common/routes";
|
import type { NetworkPoliciesRouteParams } from "../../../common/routes";
|
||||||
|
|||||||
@ -28,8 +28,8 @@ import type { IPolicyEgress, IPolicyIngress, IPolicyIpBlock, IPolicySelector, Ne
|
|||||||
import { Badge } from "../badge";
|
import { Badge } from "../badge";
|
||||||
import { SubTitle } from "../layout/sub-title";
|
import { SubTitle } from "../layout/sub-title";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import type { KubeObjectDetailsProps } from "../kube-object";
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
|
|
||||||
interface Props extends KubeObjectDetailsProps<NetworkPolicy> {
|
interface Props extends KubeObjectDetailsProps<NetworkPolicy> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,7 +26,7 @@ import { Table, TableHead, TableCell, TableRow } from "../table";
|
|||||||
import { prevDefault } from "../../utils";
|
import { prevDefault } from "../../utils";
|
||||||
import { endpointStore } from "../+network-endpoints/endpoints.store";
|
import { endpointStore } from "../+network-endpoints/endpoints.store";
|
||||||
import { Spinner } from "../spinner";
|
import { Spinner } from "../spinner";
|
||||||
import { showDetails } from "../kube-object";
|
import { showDetails } from "../kube-detail-params";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
endpoint: KubeObject;
|
endpoint: KubeObject;
|
||||||
|
|||||||
@ -25,9 +25,9 @@ import React from "react";
|
|||||||
import { disposeOnUnmount, observer } from "mobx-react";
|
import { disposeOnUnmount, observer } from "mobx-react";
|
||||||
import { DrawerItem, DrawerTitle } from "../drawer";
|
import { DrawerItem, DrawerTitle } from "../drawer";
|
||||||
import { Badge } from "../badge";
|
import { Badge } from "../badge";
|
||||||
import type { KubeObjectDetailsProps } from "../kube-object";
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
import type { Service } from "../../api/endpoints";
|
import type { Service } from "../../api/endpoints";
|
||||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
import { ServicePortComponent } from "./service-port-component";
|
import { ServicePortComponent } from "./service-port-component";
|
||||||
import { endpointStore } from "../+network-endpoints/endpoints.store";
|
import { endpointStore } from "../+network-endpoints/endpoints.store";
|
||||||
import { ServiceDetailsEndpoint } from "./service-details-endpoint";
|
import { ServiceDetailsEndpoint } from "./service-details-endpoint";
|
||||||
|
|||||||
@ -24,7 +24,7 @@ import "./services.scss";
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import type { RouteComponentProps } from "react-router";
|
import type { RouteComponentProps } from "react-router";
|
||||||
import { KubeObjectListLayout } from "../kube-object";
|
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||||
import { Badge } from "../badge";
|
import { Badge } from "../badge";
|
||||||
import { serviceStore } from "./services.store";
|
import { serviceStore } from "./services.store";
|
||||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||||
|
|||||||
@ -29,12 +29,12 @@ import { DrawerItem, DrawerItemLabels } from "../drawer";
|
|||||||
import { Badge } from "../badge";
|
import { Badge } from "../badge";
|
||||||
import { ResourceMetrics } from "../resource-metrics";
|
import { ResourceMetrics } from "../resource-metrics";
|
||||||
import { podsStore } from "../+workloads-pods/pods.store";
|
import { podsStore } from "../+workloads-pods/pods.store";
|
||||||
import type { KubeObjectDetailsProps } from "../kube-object";
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
import { getMetricsByNodeNames, IClusterMetrics, Node } from "../../api/endpoints";
|
import { getMetricsByNodeNames, IClusterMetrics, Node } from "../../api/endpoints";
|
||||||
import { NodeCharts } from "./node-charts";
|
import { NodeCharts } from "./node-charts";
|
||||||
import { makeObservable, observable, reaction } from "mobx";
|
import { makeObservable, observable, reaction } from "mobx";
|
||||||
import { PodDetailsList } from "../+workloads-pods/pod-details-list";
|
import { PodDetailsList } from "../+workloads-pods/pod-details-list";
|
||||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
import { getActiveClusterEntity } from "../../api/catalog-entity-registry";
|
import { getActiveClusterEntity } from "../../api/catalog-entity-registry";
|
||||||
import { ClusterMetricsResourceType } from "../../../common/cluster-types";
|
import { ClusterMetricsResourceType } from "../../../common/cluster-types";
|
||||||
import { NodeDetailsResources } from "./node-details-resources";
|
import { NodeDetailsResources } from "./node-details-resources";
|
||||||
|
|||||||
@ -27,7 +27,7 @@ import { cssNames, interval } from "../../utils";
|
|||||||
import { TabLayout } from "../layout/tab-layout";
|
import { TabLayout } from "../layout/tab-layout";
|
||||||
import { nodesStore } from "./nodes.store";
|
import { nodesStore } from "./nodes.store";
|
||||||
import { podsStore } from "../+workloads-pods/pods.store";
|
import { podsStore } from "../+workloads-pods/pods.store";
|
||||||
import { KubeObjectListLayout } from "../kube-object";
|
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||||
import { getMetricsForAllNodes, INodeMetrics, Node } from "../../api/endpoints/nodes.api";
|
import { getMetricsForAllNodes, INodeMetrics, Node } from "../../api/endpoints/nodes.api";
|
||||||
import { LineProgress } from "../line-progress";
|
import { LineProgress } from "../line-progress";
|
||||||
import { bytesToUnits } from "../../utils/convertMemory";
|
import { bytesToUnits } from "../../utils/convertMemory";
|
||||||
|
|||||||
@ -23,7 +23,7 @@ import "./pod-security-policies.scss";
|
|||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { KubeObjectListLayout } from "../kube-object";
|
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||||
import { podSecurityPoliciesStore } from "./pod-security-policies.store";
|
import { podSecurityPoliciesStore } from "./pod-security-policies.store";
|
||||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||||
|
|
||||||
|
|||||||
@ -24,11 +24,11 @@ import "./pod-security-policy-details.scss";
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { DrawerItem, DrawerTitle } from "../drawer";
|
import { DrawerItem, DrawerTitle } from "../drawer";
|
||||||
import type { KubeObjectDetailsProps } from "../kube-object";
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
import type { PodSecurityPolicy } from "../../api/endpoints";
|
import type { PodSecurityPolicy } from "../../api/endpoints";
|
||||||
import { Badge } from "../badge";
|
import { Badge } from "../badge";
|
||||||
import { Table, TableCell, TableHead, TableRow } from "../table";
|
import { Table, TableCell, TableHead, TableRow } from "../table";
|
||||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
|
|
||||||
interface Props extends KubeObjectDetailsProps<PodSecurityPolicy> {
|
interface Props extends KubeObjectDetailsProps<PodSecurityPolicy> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,9 +26,9 @@ import startCase from "lodash/startCase";
|
|||||||
import { DrawerItem, DrawerTitle } from "../drawer";
|
import { DrawerItem, DrawerTitle } from "../drawer";
|
||||||
import { Badge } from "../badge";
|
import { Badge } from "../badge";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import type { KubeObjectDetailsProps } from "../kube-object";
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
import type { StorageClass } from "../../api/endpoints";
|
import type { StorageClass } from "../../api/endpoints";
|
||||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
import { storageClassStore } from "./storage-class.store";
|
import { storageClassStore } from "./storage-class.store";
|
||||||
import { VolumeDetailsList } from "../+storage-volumes/volume-details-list";
|
import { VolumeDetailsList } from "../+storage-volumes/volume-details-list";
|
||||||
import { volumesStore } from "../+storage-volumes/volumes.store";
|
import { volumesStore } from "../+storage-volumes/volumes.store";
|
||||||
|
|||||||
@ -24,7 +24,7 @@ import "./storage-classes.scss";
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import type { RouteComponentProps } from "react-router-dom";
|
import type { RouteComponentProps } from "react-router-dom";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { KubeObjectListLayout } from "../kube-object";
|
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||||
import { storageClassStore } from "./storage-class.store";
|
import { storageClassStore } from "./storage-class.store";
|
||||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||||
import type { StorageClassesRouteParams } from "../../../common/routes";
|
import type { StorageClassesRouteParams } from "../../../common/routes";
|
||||||
|
|||||||
@ -30,10 +30,12 @@ import { podsStore } from "../+workloads-pods/pods.store";
|
|||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { ResourceMetrics } from "../resource-metrics";
|
import { ResourceMetrics } from "../resource-metrics";
|
||||||
import { VolumeClaimDiskChart } from "./volume-claim-disk-chart";
|
import { VolumeClaimDiskChart } from "./volume-claim-disk-chart";
|
||||||
import { getDetailsUrl, KubeObjectDetailsProps, KubeObjectMeta } from "../kube-object";
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
import { getMetricsForPvc, IPvcMetrics, PersistentVolumeClaim } from "../../api/endpoints";
|
import { getMetricsForPvc, IPvcMetrics, PersistentVolumeClaim } from "../../api/endpoints";
|
||||||
import { getActiveClusterEntity } from "../../api/catalog-entity-registry";
|
import { getActiveClusterEntity } from "../../api/catalog-entity-registry";
|
||||||
import { ClusterMetricsResourceType } from "../../../common/cluster-types";
|
import { ClusterMetricsResourceType } from "../../../common/cluster-types";
|
||||||
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
|
import { getDetailsUrl } from "../kube-detail-params";
|
||||||
|
|
||||||
interface Props extends KubeObjectDetailsProps<PersistentVolumeClaim> {
|
interface Props extends KubeObjectDetailsProps<PersistentVolumeClaim> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,12 +26,13 @@ import { observer } from "mobx-react";
|
|||||||
import { Link, RouteComponentProps } from "react-router-dom";
|
import { Link, RouteComponentProps } from "react-router-dom";
|
||||||
import { volumeClaimStore } from "./volume-claim.store";
|
import { volumeClaimStore } from "./volume-claim.store";
|
||||||
import { podsStore } from "../+workloads-pods/pods.store";
|
import { podsStore } from "../+workloads-pods/pods.store";
|
||||||
import { getDetailsUrl, KubeObjectListLayout } from "../kube-object";
|
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||||
import { unitsToBytes } from "../../utils/convertMemory";
|
import { unitsToBytes } from "../../utils/convertMemory";
|
||||||
import { stopPropagation } from "../../utils";
|
import { stopPropagation } from "../../utils";
|
||||||
import { storageClassApi } from "../../api/endpoints";
|
import { storageClassApi } from "../../api/endpoints";
|
||||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||||
import type { VolumeClaimsRouteParams } from "../../../common/routes";
|
import type { VolumeClaimsRouteParams } from "../../../common/routes";
|
||||||
|
import { getDetailsUrl } from "../kube-detail-params";
|
||||||
|
|
||||||
enum columnId {
|
enum columnId {
|
||||||
name = "name",
|
name = "name",
|
||||||
|
|||||||
@ -27,7 +27,7 @@ import type { PersistentVolume } from "../../api/endpoints/persistent-volume.api
|
|||||||
import { boundMethod } from "../../../common/utils/autobind";
|
import { boundMethod } from "../../../common/utils/autobind";
|
||||||
import { TableRow } from "../table/table-row";
|
import { TableRow } from "../table/table-row";
|
||||||
import { cssNames, prevDefault } from "../../utils";
|
import { cssNames, prevDefault } from "../../utils";
|
||||||
import { showDetails } from "../kube-object/kube-object-details";
|
import { showDetails } from "../kube-detail-params";
|
||||||
import { TableCell } from "../table/table-cell";
|
import { TableCell } from "../table/table-cell";
|
||||||
import { Spinner } from "../spinner/spinner";
|
import { Spinner } from "../spinner/spinner";
|
||||||
import { DrawerTitle } from "../drawer/drawer-title";
|
import { DrawerTitle } from "../drawer/drawer-title";
|
||||||
|
|||||||
@ -28,8 +28,9 @@ import { observer } from "mobx-react";
|
|||||||
import { DrawerItem, DrawerTitle } from "../drawer";
|
import { DrawerItem, DrawerTitle } from "../drawer";
|
||||||
import { Badge } from "../badge";
|
import { Badge } from "../badge";
|
||||||
import { PersistentVolume, pvcApi } from "../../api/endpoints";
|
import { PersistentVolume, pvcApi } from "../../api/endpoints";
|
||||||
import { getDetailsUrl, KubeObjectDetailsProps } from "../kube-object";
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
|
import { getDetailsUrl } from "../kube-detail-params";
|
||||||
|
|
||||||
interface Props extends KubeObjectDetailsProps<PersistentVolume> {
|
interface Props extends KubeObjectDetailsProps<PersistentVolume> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,7 +24,8 @@ import "./volumes.scss";
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { Link, RouteComponentProps } from "react-router-dom";
|
import { Link, RouteComponentProps } from "react-router-dom";
|
||||||
import { getDetailsUrl, KubeObjectListLayout } from "../kube-object";
|
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||||
|
import { getDetailsUrl } from "../kube-detail-params";
|
||||||
import { stopPropagation } from "../../utils";
|
import { stopPropagation } from "../../utils";
|
||||||
import { volumesStore } from "./volumes.store";
|
import { volumesStore } from "./volumes.store";
|
||||||
import { pvcApi, storageClassApi } from "../../api/endpoints";
|
import { pvcApi, storageClassApi } from "../../api/endpoints";
|
||||||
|
|||||||
@ -30,8 +30,8 @@ import { autoBind, ObservableHashSet, prevDefault } from "../../../utils";
|
|||||||
import { AddRemoveButtons } from "../../add-remove-buttons";
|
import { AddRemoveButtons } from "../../add-remove-buttons";
|
||||||
import { ConfirmDialog } from "../../confirm-dialog";
|
import { ConfirmDialog } from "../../confirm-dialog";
|
||||||
import { DrawerTitle } from "../../drawer";
|
import { DrawerTitle } from "../../drawer";
|
||||||
import type { KubeObjectDetailsProps } from "../../kube-object";
|
import type { KubeObjectDetailsProps } from "../../kube-object-details";
|
||||||
import { KubeObjectMeta } from "../../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../../kube-object-meta";
|
||||||
import { Table, TableCell, TableHead, TableRow } from "../../table";
|
import { Table, TableCell, TableHead, TableRow } from "../../table";
|
||||||
import { ClusterRoleBindingDialog } from "./dialog";
|
import { ClusterRoleBindingDialog } from "./dialog";
|
||||||
import { clusterRoleBindingsStore } from "./store";
|
import { clusterRoleBindingsStore } from "./store";
|
||||||
|
|||||||
@ -30,7 +30,7 @@ import { ClusterRole, ClusterRoleBinding, ClusterRoleBindingSubject, ServiceAcco
|
|||||||
import { Dialog, DialogProps } from "../../dialog";
|
import { Dialog, DialogProps } from "../../dialog";
|
||||||
import { EditableList } from "../../editable-list";
|
import { EditableList } from "../../editable-list";
|
||||||
import { Icon } from "../../icon";
|
import { Icon } from "../../icon";
|
||||||
import { showDetails } from "../../kube-object";
|
import { showDetails } from "../../kube-detail-params";
|
||||||
import { SubTitle } from "../../layout/sub-title";
|
import { SubTitle } from "../../layout/sub-title";
|
||||||
import { Notifications } from "../../notifications";
|
import { Notifications } from "../../notifications";
|
||||||
import { Select, SelectOption } from "../../select";
|
import { Select, SelectOption } from "../../select";
|
||||||
@ -202,13 +202,13 @@ export class ClusterRoleBindingDialog extends React.Component<Props> {
|
|||||||
if (!this.selectedRoleRef || this.bindingName === this.selectedRoleRef.getName()) {
|
if (!this.selectedRoleRef || this.bindingName === this.selectedRoleRef.getName()) {
|
||||||
this.bindingName = value.getName();
|
this.bindingName = value.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.selectedRoleRef = value;
|
this.selectedRoleRef = value;
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SubTitle title="Binding Name" />
|
<SubTitle title="Binding Name" />
|
||||||
<Input
|
<Input
|
||||||
placeholder="Name of ClusterRoleBinding ..."
|
placeholder="Name of ClusterRoleBinding ..."
|
||||||
disabled={this.isEditing}
|
disabled={this.isEditing}
|
||||||
value={this.bindingName}
|
value={this.bindingName}
|
||||||
|
|||||||
@ -24,7 +24,7 @@ import "./view.scss";
|
|||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import type { RouteComponentProps } from "react-router";
|
import type { RouteComponentProps } from "react-router";
|
||||||
import { KubeObjectListLayout } from "../../kube-object";
|
import { KubeObjectListLayout } from "../../kube-object-list-layout";
|
||||||
import { KubeObjectStatusIcon } from "../../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../../kube-object-status-icon";
|
||||||
import { ClusterRoleBindingDialog } from "./dialog";
|
import { ClusterRoleBindingDialog } from "./dialog";
|
||||||
import { clusterRoleBindingsStore } from "./store";
|
import { clusterRoleBindingsStore } from "./store";
|
||||||
|
|||||||
@ -26,7 +26,7 @@ import React from "react";
|
|||||||
|
|
||||||
import { Dialog, DialogProps } from "../../dialog";
|
import { Dialog, DialogProps } from "../../dialog";
|
||||||
import { Input } from "../../input";
|
import { Input } from "../../input";
|
||||||
import { showDetails } from "../../kube-object";
|
import { showDetails } from "../../kube-detail-params";
|
||||||
import { SubTitle } from "../../layout/sub-title";
|
import { SubTitle } from "../../layout/sub-title";
|
||||||
import { Notifications } from "../../notifications";
|
import { Notifications } from "../../notifications";
|
||||||
import { Wizard, WizardStep } from "../../wizard";
|
import { Wizard, WizardStep } from "../../wizard";
|
||||||
|
|||||||
@ -25,8 +25,8 @@ import { observer } from "mobx-react";
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
import { DrawerTitle } from "../../drawer";
|
import { DrawerTitle } from "../../drawer";
|
||||||
import type { KubeObjectDetailsProps } from "../../kube-object";
|
import type { KubeObjectDetailsProps } from "../../kube-object-details";
|
||||||
import { KubeObjectMeta } from "../../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../../kube-object-meta";
|
||||||
import type { ClusterRole } from "../../../api/endpoints";
|
import type { ClusterRole } from "../../../api/endpoints";
|
||||||
|
|
||||||
interface Props extends KubeObjectDetailsProps<ClusterRole> {
|
interface Props extends KubeObjectDetailsProps<ClusterRole> {
|
||||||
|
|||||||
@ -24,7 +24,7 @@ import "./view.scss";
|
|||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import type { RouteComponentProps } from "react-router";
|
import type { RouteComponentProps } from "react-router";
|
||||||
import { KubeObjectListLayout } from "../../kube-object";
|
import { KubeObjectListLayout } from "../../kube-object-list-layout";
|
||||||
import { KubeObjectStatusIcon } from "../../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../../kube-object-status-icon";
|
||||||
import { AddClusterRoleDialog } from "./add-dialog";
|
import { AddClusterRoleDialog } from "./add-dialog";
|
||||||
import { clusterRolesStore } from "./store";
|
import { clusterRolesStore } from "./store";
|
||||||
|
|||||||
@ -29,8 +29,8 @@ import { prevDefault, boundMethod } from "../../../utils";
|
|||||||
import { AddRemoveButtons } from "../../add-remove-buttons";
|
import { AddRemoveButtons } from "../../add-remove-buttons";
|
||||||
import { ConfirmDialog } from "../../confirm-dialog";
|
import { ConfirmDialog } from "../../confirm-dialog";
|
||||||
import { DrawerTitle } from "../../drawer";
|
import { DrawerTitle } from "../../drawer";
|
||||||
import type { KubeObjectDetailsProps } from "../../kube-object";
|
import type { KubeObjectDetailsProps } from "../../kube-object-details";
|
||||||
import { KubeObjectMeta } from "../../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../../kube-object-meta";
|
||||||
import { Table, TableCell, TableHead, TableRow } from "../../table";
|
import { Table, TableCell, TableHead, TableRow } from "../../table";
|
||||||
import { RoleBindingDialog } from "./dialog";
|
import { RoleBindingDialog } from "./dialog";
|
||||||
import { roleBindingsStore } from "./store";
|
import { roleBindingsStore } from "./store";
|
||||||
|
|||||||
@ -32,7 +32,7 @@ import { ClusterRole, Role, roleApi, RoleBinding, RoleBindingSubject, ServiceAcc
|
|||||||
import { Dialog, DialogProps } from "../../dialog";
|
import { Dialog, DialogProps } from "../../dialog";
|
||||||
import { EditableList } from "../../editable-list";
|
import { EditableList } from "../../editable-list";
|
||||||
import { Icon } from "../../icon";
|
import { Icon } from "../../icon";
|
||||||
import { showDetails } from "../../kube-object";
|
import { showDetails } from "../../kube-detail-params";
|
||||||
import { SubTitle } from "../../layout/sub-title";
|
import { SubTitle } from "../../layout/sub-title";
|
||||||
import { Notifications } from "../../notifications";
|
import { Notifications } from "../../notifications";
|
||||||
import { Select, SelectOption } from "../../select";
|
import { Select, SelectOption } from "../../select";
|
||||||
|
|||||||
@ -23,7 +23,7 @@ import "./view.scss";
|
|||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import type { RouteComponentProps } from "react-router";
|
import type { RouteComponentProps } from "react-router";
|
||||||
import { KubeObjectListLayout } from "../../kube-object";
|
import { KubeObjectListLayout } from "../../kube-object-list-layout";
|
||||||
import { KubeObjectStatusIcon } from "../../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../../kube-object-status-icon";
|
||||||
import { RoleBindingDialog } from "./dialog";
|
import { RoleBindingDialog } from "./dialog";
|
||||||
import { roleBindingsStore } from "./store";
|
import { roleBindingsStore } from "./store";
|
||||||
|
|||||||
@ -28,7 +28,7 @@ import { observer } from "mobx-react";
|
|||||||
import { NamespaceSelect } from "../../+namespaces/namespace-select";
|
import { NamespaceSelect } from "../../+namespaces/namespace-select";
|
||||||
import { Dialog, DialogProps } from "../../dialog";
|
import { Dialog, DialogProps } from "../../dialog";
|
||||||
import { Input } from "../../input";
|
import { Input } from "../../input";
|
||||||
import { showDetails } from "../../kube-object";
|
import { showDetails } from "../../kube-detail-params";
|
||||||
import { SubTitle } from "../../layout/sub-title";
|
import { SubTitle } from "../../layout/sub-title";
|
||||||
import { Notifications } from "../../notifications";
|
import { Notifications } from "../../notifications";
|
||||||
import { Wizard, WizardStep } from "../../wizard";
|
import { Wizard, WizardStep } from "../../wizard";
|
||||||
@ -40,7 +40,7 @@ interface Props extends Partial<DialogProps> {
|
|||||||
@observer
|
@observer
|
||||||
export class AddRoleDialog extends React.Component<Props> {
|
export class AddRoleDialog extends React.Component<Props> {
|
||||||
static isOpen = observable.box(false);
|
static isOpen = observable.box(false);
|
||||||
|
|
||||||
@observable roleName = "";
|
@observable roleName = "";
|
||||||
@observable namespace = "";
|
@observable namespace = "";
|
||||||
|
|
||||||
|
|||||||
@ -26,8 +26,8 @@ import React from "react";
|
|||||||
|
|
||||||
import type { Role } from "../../../api/endpoints";
|
import type { Role } from "../../../api/endpoints";
|
||||||
import { DrawerTitle } from "../../drawer";
|
import { DrawerTitle } from "../../drawer";
|
||||||
import type { KubeObjectDetailsProps } from "../../kube-object";
|
import type { KubeObjectDetailsProps } from "../../kube-object-details";
|
||||||
import { KubeObjectMeta } from "../../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../../kube-object-meta";
|
||||||
|
|
||||||
interface Props extends KubeObjectDetailsProps<Role> {
|
interface Props extends KubeObjectDetailsProps<Role> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,7 +24,7 @@ import "./view.scss";
|
|||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import type { RouteComponentProps } from "react-router";
|
import type { RouteComponentProps } from "react-router";
|
||||||
import { KubeObjectListLayout } from "../../kube-object";
|
import { KubeObjectListLayout } from "../../kube-object-list-layout";
|
||||||
import { KubeObjectStatusIcon } from "../../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../../kube-object-status-icon";
|
||||||
import { AddRoleDialog } from "./add-dialog";
|
import { AddRoleDialog } from "./add-dialog";
|
||||||
import { rolesStore } from "./store";
|
import { rolesStore } from "./store";
|
||||||
|
|||||||
@ -29,7 +29,7 @@ import { NamespaceSelect } from "../../+namespaces/namespace-select";
|
|||||||
import { Dialog, DialogProps } from "../../dialog";
|
import { Dialog, DialogProps } from "../../dialog";
|
||||||
import { Input } from "../../input";
|
import { Input } from "../../input";
|
||||||
import { systemName } from "../../input/input_validators";
|
import { systemName } from "../../input/input_validators";
|
||||||
import { showDetails } from "../../kube-object";
|
import { showDetails } from "../../kube-detail-params";
|
||||||
import { SubTitle } from "../../layout/sub-title";
|
import { SubTitle } from "../../layout/sub-title";
|
||||||
import { Notifications } from "../../notifications";
|
import { Notifications } from "../../notifications";
|
||||||
import { Wizard, WizardStep } from "../../wizard";
|
import { Wizard, WizardStep } from "../../wizard";
|
||||||
|
|||||||
@ -30,10 +30,11 @@ import { secretsStore } from "../../+config-secrets/secrets.store";
|
|||||||
import { Secret, ServiceAccount } from "../../../api/endpoints";
|
import { Secret, ServiceAccount } from "../../../api/endpoints";
|
||||||
import { DrawerItem, DrawerTitle } from "../../drawer";
|
import { DrawerItem, DrawerTitle } from "../../drawer";
|
||||||
import { Icon } from "../../icon";
|
import { Icon } from "../../icon";
|
||||||
import { getDetailsUrl, KubeObjectDetailsProps } from "../../kube-object";
|
import type { KubeObjectDetailsProps } from "../../kube-object-details";
|
||||||
import { KubeObjectMeta } from "../../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../../kube-object-meta";
|
||||||
import { Spinner } from "../../spinner";
|
import { Spinner } from "../../spinner";
|
||||||
import { ServiceAccountsSecret } from "./secret";
|
import { ServiceAccountsSecret } from "./secret";
|
||||||
|
import { getDetailsUrl } from "../../kube-detail-params";
|
||||||
|
|
||||||
interface Props extends KubeObjectDetailsProps<ServiceAccount> {
|
interface Props extends KubeObjectDetailsProps<ServiceAccount> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,9 +26,9 @@ import React from "react";
|
|||||||
import type { RouteComponentProps } from "react-router";
|
import type { RouteComponentProps } from "react-router";
|
||||||
import type { ServiceAccount } from "../../../api/endpoints/service-accounts.api";
|
import type { ServiceAccount } from "../../../api/endpoints/service-accounts.api";
|
||||||
import { Icon } from "../../icon";
|
import { Icon } from "../../icon";
|
||||||
import { KubeObjectListLayout } from "../../kube-object";
|
import { KubeObjectListLayout } from "../../kube-object-list-layout";
|
||||||
import { KubeObjectStatusIcon } from "../../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../../kube-object-status-icon";
|
||||||
import type { KubeObjectMenuProps } from "../../kube-object/kube-object-menu";
|
import type { KubeObjectMenuProps } from "../../kube-object-menu";
|
||||||
import { openServiceAccountKubeConfig } from "../../kubeconfig-dialog";
|
import { openServiceAccountKubeConfig } from "../../kubeconfig-dialog";
|
||||||
import { MenuItem } from "../../menu";
|
import { MenuItem } from "../../menu";
|
||||||
import { CreateServiceAccountDialog } from "./create-dialog";
|
import { CreateServiceAccountDialog } from "./create-dialog";
|
||||||
|
|||||||
@ -29,9 +29,10 @@ import { Badge } from "../badge/badge";
|
|||||||
import { jobStore } from "../+workloads-jobs/job.store";
|
import { jobStore } from "../+workloads-jobs/job.store";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { cronJobStore } from "./cronjob.store";
|
import { cronJobStore } from "./cronjob.store";
|
||||||
import { getDetailsUrl, KubeObjectDetailsProps } from "../kube-object";
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
import type { CronJob, Job } from "../../api/endpoints";
|
import type { CronJob, Job } from "../../api/endpoints";
|
||||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
|
import { getDetailsUrl } from "../kube-detail-params";
|
||||||
|
|
||||||
interface Props extends KubeObjectDetailsProps<CronJob> {
|
interface Props extends KubeObjectDetailsProps<CronJob> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,8 +30,8 @@ import { Icon } from "../icon";
|
|||||||
import { cronJobStore } from "./cronjob.store";
|
import { cronJobStore } from "./cronjob.store";
|
||||||
import { jobStore } from "../+workloads-jobs/job.store";
|
import { jobStore } from "../+workloads-jobs/job.store";
|
||||||
import { eventStore } from "../+events/event.store";
|
import { eventStore } from "../+events/event.store";
|
||||||
import type { KubeObjectMenuProps } from "../kube-object/kube-object-menu";
|
import type { KubeObjectMenuProps } from "../kube-object-menu";
|
||||||
import { KubeObjectListLayout } from "../kube-object";
|
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||||
import { CronJobTriggerDialog } from "./cronjob-trigger-dialog";
|
import { CronJobTriggerDialog } from "./cronjob-trigger-dialog";
|
||||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||||
import { ConfirmDialog } from "../confirm-dialog/confirm-dialog";
|
import { ConfirmDialog } from "../confirm-dialog/confirm-dialog";
|
||||||
|
|||||||
@ -30,13 +30,13 @@ import { PodDetailsTolerations } from "../+workloads-pods/pod-details-toleration
|
|||||||
import { PodDetailsAffinities } from "../+workloads-pods/pod-details-affinities";
|
import { PodDetailsAffinities } from "../+workloads-pods/pod-details-affinities";
|
||||||
import { daemonSetStore } from "./daemonsets.store";
|
import { daemonSetStore } from "./daemonsets.store";
|
||||||
import { podsStore } from "../+workloads-pods/pods.store";
|
import { podsStore } from "../+workloads-pods/pods.store";
|
||||||
import type { KubeObjectDetailsProps } from "../kube-object";
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
import { DaemonSet, getMetricsForDaemonSets, IPodMetrics } from "../../api/endpoints";
|
import { DaemonSet, getMetricsForDaemonSets, IPodMetrics } from "../../api/endpoints";
|
||||||
import { ResourceMetrics, ResourceMetricsText } from "../resource-metrics";
|
import { ResourceMetrics, ResourceMetricsText } from "../resource-metrics";
|
||||||
import { PodCharts, podMetricTabs } from "../+workloads-pods/pod-charts";
|
import { PodCharts, podMetricTabs } from "../+workloads-pods/pod-charts";
|
||||||
import { makeObservable, observable, reaction } from "mobx";
|
import { makeObservable, observable, reaction } from "mobx";
|
||||||
import { PodDetailsList } from "../+workloads-pods/pod-details-list";
|
import { PodDetailsList } from "../+workloads-pods/pod-details-list";
|
||||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
import { getActiveClusterEntity } from "../../api/catalog-entity-registry";
|
import { getActiveClusterEntity } from "../../api/catalog-entity-registry";
|
||||||
import { ClusterMetricsResourceType } from "../../../common/cluster-types";
|
import { ClusterMetricsResourceType } from "../../../common/cluster-types";
|
||||||
import { boundMethod } from "../../utils";
|
import { boundMethod } from "../../utils";
|
||||||
|
|||||||
@ -29,7 +29,7 @@ import { eventStore } from "../+events/event.store";
|
|||||||
import { daemonSetStore } from "./daemonsets.store";
|
import { daemonSetStore } from "./daemonsets.store";
|
||||||
import { podsStore } from "../+workloads-pods/pods.store";
|
import { podsStore } from "../+workloads-pods/pods.store";
|
||||||
import { nodesStore } from "../+nodes/nodes.store";
|
import { nodesStore } from "../+nodes/nodes.store";
|
||||||
import { KubeObjectListLayout } from "../kube-object";
|
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||||
import { Badge } from "../badge";
|
import { Badge } from "../badge";
|
||||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||||
import type { DaemonSetsRouteParams } from "../../../common/routes";
|
import type { DaemonSetsRouteParams } from "../../../common/routes";
|
||||||
|
|||||||
@ -30,13 +30,13 @@ import { Deployment, getMetricsForDeployments, IPodMetrics } from "../../api/end
|
|||||||
import { PodDetailsTolerations } from "../+workloads-pods/pod-details-tolerations";
|
import { PodDetailsTolerations } from "../+workloads-pods/pod-details-tolerations";
|
||||||
import { PodDetailsAffinities } from "../+workloads-pods/pod-details-affinities";
|
import { PodDetailsAffinities } from "../+workloads-pods/pod-details-affinities";
|
||||||
import { podsStore } from "../+workloads-pods/pods.store";
|
import { podsStore } from "../+workloads-pods/pods.store";
|
||||||
import type { KubeObjectDetailsProps } from "../kube-object";
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
import { ResourceMetrics, ResourceMetricsText } from "../resource-metrics";
|
import { ResourceMetrics, ResourceMetricsText } from "../resource-metrics";
|
||||||
import { deploymentStore } from "./deployments.store";
|
import { deploymentStore } from "./deployments.store";
|
||||||
import { PodCharts, podMetricTabs } from "../+workloads-pods/pod-charts";
|
import { PodCharts, podMetricTabs } from "../+workloads-pods/pod-charts";
|
||||||
import { makeObservable, observable, reaction } from "mobx";
|
import { makeObservable, observable, reaction } from "mobx";
|
||||||
import { PodDetailsList } from "../+workloads-pods/pod-details-list";
|
import { PodDetailsList } from "../+workloads-pods/pod-details-list";
|
||||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
import { replicaSetStore } from "../+workloads-replicasets/replicasets.store";
|
import { replicaSetStore } from "../+workloads-replicasets/replicasets.store";
|
||||||
import { DeploymentReplicaSets } from "./deployment-replicasets";
|
import { DeploymentReplicaSets } from "./deployment-replicasets";
|
||||||
import { getActiveClusterEntity } from "../../api/catalog-entity-registry";
|
import { getActiveClusterEntity } from "../../api/catalog-entity-registry";
|
||||||
|
|||||||
@ -24,14 +24,14 @@ import "./deployment-replicasets.scss";
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import type { ReplicaSet } from "../../api/endpoints";
|
import type { ReplicaSet } from "../../api/endpoints";
|
||||||
import { KubeObjectMenu, KubeObjectMenuProps } from "../kube-object/kube-object-menu";
|
import { KubeObjectMenu, KubeObjectMenuProps } from "../kube-object-menu";
|
||||||
import { Spinner } from "../spinner";
|
import { Spinner } from "../spinner";
|
||||||
import { prevDefault, stopPropagation } from "../../utils";
|
import { prevDefault, stopPropagation } from "../../utils";
|
||||||
import { DrawerTitle } from "../drawer";
|
import { DrawerTitle } from "../drawer";
|
||||||
import { Table, TableCell, TableHead, TableRow } from "../table";
|
import { Table, TableCell, TableHead, TableRow } from "../table";
|
||||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||||
import { replicaSetStore } from "../+workloads-replicasets/replicasets.store";
|
import { replicaSetStore } from "../+workloads-replicasets/replicasets.store";
|
||||||
import { showDetails } from "../kube-object";
|
import { showDetails } from "../kube-detail-params";
|
||||||
|
|
||||||
|
|
||||||
enum sortBy {
|
enum sortBy {
|
||||||
|
|||||||
@ -25,7 +25,7 @@ import React from "react";
|
|||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import type { RouteComponentProps } from "react-router";
|
import type { RouteComponentProps } from "react-router";
|
||||||
import { Deployment, deploymentApi } from "../../api/endpoints";
|
import { Deployment, deploymentApi } from "../../api/endpoints";
|
||||||
import type { KubeObjectMenuProps } from "../kube-object/kube-object-menu";
|
import type { KubeObjectMenuProps } from "../kube-object-menu";
|
||||||
import { MenuItem } from "../menu";
|
import { MenuItem } from "../menu";
|
||||||
import { Icon } from "../icon";
|
import { Icon } from "../icon";
|
||||||
import { DeploymentScaleDialog } from "./deployment-scale-dialog";
|
import { DeploymentScaleDialog } from "./deployment-scale-dialog";
|
||||||
@ -35,7 +35,7 @@ import { replicaSetStore } from "../+workloads-replicasets/replicasets.store";
|
|||||||
import { podsStore } from "../+workloads-pods/pods.store";
|
import { podsStore } from "../+workloads-pods/pods.store";
|
||||||
import { nodesStore } from "../+nodes/nodes.store";
|
import { nodesStore } from "../+nodes/nodes.store";
|
||||||
import { eventStore } from "../+events/event.store";
|
import { eventStore } from "../+events/event.store";
|
||||||
import { KubeObjectListLayout } from "../kube-object";
|
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||||
import { cssNames } from "../../utils";
|
import { cssNames } from "../../utils";
|
||||||
import kebabCase from "lodash/kebabCase";
|
import kebabCase from "lodash/kebabCase";
|
||||||
import orderBy from "lodash/orderBy";
|
import orderBy from "lodash/orderBy";
|
||||||
|
|||||||
@ -32,17 +32,18 @@ import { PodDetailsTolerations } from "../+workloads-pods/pod-details-toleration
|
|||||||
import { PodDetailsAffinities } from "../+workloads-pods/pod-details-affinities";
|
import { PodDetailsAffinities } from "../+workloads-pods/pod-details-affinities";
|
||||||
import { podsStore } from "../+workloads-pods/pods.store";
|
import { podsStore } from "../+workloads-pods/pods.store";
|
||||||
import { jobStore } from "./job.store";
|
import { jobStore } from "./job.store";
|
||||||
import { getDetailsUrl, KubeObjectDetailsProps } from "../kube-object";
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
import { getMetricsForJobs, IPodMetrics, Job } from "../../api/endpoints";
|
import { getMetricsForJobs, IPodMetrics, Job } from "../../api/endpoints";
|
||||||
import { PodDetailsList } from "../+workloads-pods/pod-details-list";
|
import { PodDetailsList } from "../+workloads-pods/pod-details-list";
|
||||||
import { lookupApiLink } from "../../api/kube-api";
|
import { lookupApiLink } from "../../api/kube-api";
|
||||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
import { makeObservable, observable } from "mobx";
|
import { makeObservable, observable } from "mobx";
|
||||||
import { podMetricTabs, PodCharts } from "../+workloads-pods/pod-charts";
|
import { podMetricTabs, PodCharts } from "../+workloads-pods/pod-charts";
|
||||||
import { ClusterMetricsResourceType } from "../../../common/cluster-types";
|
import { ClusterMetricsResourceType } from "../../../common/cluster-types";
|
||||||
import { getActiveClusterEntity } from "../../api/catalog-entity-registry";
|
import { getActiveClusterEntity } from "../../api/catalog-entity-registry";
|
||||||
import { ResourceMetrics } from "../resource-metrics";
|
import { ResourceMetrics } from "../resource-metrics";
|
||||||
import { boundMethod } from "autobind-decorator";
|
import { boundMethod } from "autobind-decorator";
|
||||||
|
import { getDetailsUrl } from "../kube-detail-params";
|
||||||
|
|
||||||
interface Props extends KubeObjectDetailsProps<Job> {
|
interface Props extends KubeObjectDetailsProps<Job> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,7 +27,7 @@ import type { RouteComponentProps } from "react-router";
|
|||||||
import { podsStore } from "../+workloads-pods/pods.store";
|
import { podsStore } from "../+workloads-pods/pods.store";
|
||||||
import { jobStore } from "./job.store";
|
import { jobStore } from "./job.store";
|
||||||
import { eventStore } from "../+events/event.store";
|
import { eventStore } from "../+events/event.store";
|
||||||
import { KubeObjectListLayout } from "../kube-object";
|
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||||
import kebabCase from "lodash/kebabCase";
|
import kebabCase from "lodash/kebabCase";
|
||||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||||
import type { JobsRouteParams } from "../../../common/routes";
|
import type { JobsRouteParams } from "../../../common/routes";
|
||||||
|
|||||||
@ -34,7 +34,7 @@ import { Table, TableCell, TableHead, TableRow } from "../table";
|
|||||||
import { Spinner } from "../spinner";
|
import { Spinner } from "../spinner";
|
||||||
import { DrawerTitle } from "../drawer";
|
import { DrawerTitle } from "../drawer";
|
||||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||||
import { showDetails } from "../kube-object";
|
import { showDetails } from "../kube-detail-params";
|
||||||
|
|
||||||
enum sortBy {
|
enum sortBy {
|
||||||
name = "name",
|
name = "name",
|
||||||
|
|||||||
@ -26,7 +26,7 @@ import { Link } from "react-router-dom";
|
|||||||
import { autorun, observable, makeObservable } from "mobx";
|
import { autorun, observable, makeObservable } from "mobx";
|
||||||
import { disposeOnUnmount, observer } from "mobx-react";
|
import { disposeOnUnmount, observer } from "mobx-react";
|
||||||
import { Pod, Secret, secretsApi } from "../../api/endpoints";
|
import { Pod, Secret, secretsApi } from "../../api/endpoints";
|
||||||
import { getDetailsUrl } from "../kube-object";
|
import { getDetailsUrl } from "../kube-detail-params";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
pod: Pod;
|
pod: Pod;
|
||||||
|
|||||||
@ -36,12 +36,13 @@ import { PodDetailsTolerations } from "./pod-details-tolerations";
|
|||||||
import { Icon } from "../icon";
|
import { Icon } from "../icon";
|
||||||
import { PodDetailsSecrets } from "./pod-details-secrets";
|
import { PodDetailsSecrets } from "./pod-details-secrets";
|
||||||
import { ResourceMetrics } from "../resource-metrics";
|
import { ResourceMetrics } from "../resource-metrics";
|
||||||
import { getDetailsUrl, KubeObjectDetailsProps } from "../kube-object";
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
import { getItemMetrics } from "../../api/endpoints/metrics.api";
|
import { getItemMetrics } from "../../api/endpoints/metrics.api";
|
||||||
import { PodCharts, podMetricTabs } from "./pod-charts";
|
import { PodCharts, podMetricTabs } from "./pod-charts";
|
||||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
import { getActiveClusterEntity } from "../../api/catalog-entity-registry";
|
import { getActiveClusterEntity } from "../../api/catalog-entity-registry";
|
||||||
import { ClusterMetricsResourceType } from "../../../common/cluster-types";
|
import { ClusterMetricsResourceType } from "../../../common/cluster-types";
|
||||||
|
import { getDetailsUrl } from "../kube-detail-params";
|
||||||
|
|
||||||
interface Props extends KubeObjectDetailsProps<Pod> {
|
interface Props extends KubeObjectDetailsProps<Pod> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,7 +28,7 @@ import { podsStore } from "./pods.store";
|
|||||||
import type { RouteComponentProps } from "react-router";
|
import type { RouteComponentProps } from "react-router";
|
||||||
import { volumeClaimStore } from "../+storage-volume-claims/volume-claim.store";
|
import { volumeClaimStore } from "../+storage-volume-claims/volume-claim.store";
|
||||||
import { eventStore } from "../+events/event.store";
|
import { eventStore } from "../+events/event.store";
|
||||||
import { getDetailsUrl, KubeObjectListLayout } from "../kube-object";
|
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||||
import { nodesApi, Pod } from "../../api/endpoints";
|
import { nodesApi, Pod } from "../../api/endpoints";
|
||||||
import { StatusBrick } from "../status-brick";
|
import { StatusBrick } from "../status-brick";
|
||||||
import { cssNames, stopPropagation } from "../../utils";
|
import { cssNames, stopPropagation } from "../../utils";
|
||||||
@ -39,6 +39,7 @@ import { lookupApiLink } from "../../api/kube-api";
|
|||||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||||
import { Badge } from "../badge";
|
import { Badge } from "../badge";
|
||||||
import type { PodsRouteParams } from "../../../common/routes";
|
import type { PodsRouteParams } from "../../../common/routes";
|
||||||
|
import { getDetailsUrl } from "../kube-detail-params";
|
||||||
|
|
||||||
enum columnId {
|
enum columnId {
|
||||||
name = "name",
|
name = "name",
|
||||||
|
|||||||
@ -30,12 +30,12 @@ import { PodDetailsTolerations } from "../+workloads-pods/pod-details-toleration
|
|||||||
import { PodDetailsAffinities } from "../+workloads-pods/pod-details-affinities";
|
import { PodDetailsAffinities } from "../+workloads-pods/pod-details-affinities";
|
||||||
import { disposeOnUnmount, observer } from "mobx-react";
|
import { disposeOnUnmount, observer } from "mobx-react";
|
||||||
import { podsStore } from "../+workloads-pods/pods.store";
|
import { podsStore } from "../+workloads-pods/pods.store";
|
||||||
import type { KubeObjectDetailsProps } from "../kube-object";
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
import { getMetricsForReplicaSets, IPodMetrics, ReplicaSet } from "../../api/endpoints";
|
import { getMetricsForReplicaSets, IPodMetrics, ReplicaSet } from "../../api/endpoints";
|
||||||
import { ResourceMetrics, ResourceMetricsText } from "../resource-metrics";
|
import { ResourceMetrics, ResourceMetricsText } from "../resource-metrics";
|
||||||
import { PodCharts, podMetricTabs } from "../+workloads-pods/pod-charts";
|
import { PodCharts, podMetricTabs } from "../+workloads-pods/pod-charts";
|
||||||
import { PodDetailsList } from "../+workloads-pods/pod-details-list";
|
import { PodDetailsList } from "../+workloads-pods/pod-details-list";
|
||||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
import { getActiveClusterEntity } from "../../api/catalog-entity-registry";
|
import { getActiveClusterEntity } from "../../api/catalog-entity-registry";
|
||||||
import { ClusterMetricsResourceType } from "../../../common/cluster-types";
|
import { ClusterMetricsResourceType } from "../../../common/cluster-types";
|
||||||
import { boundMethod } from "../../utils";
|
import { boundMethod } from "../../utils";
|
||||||
|
|||||||
@ -24,11 +24,11 @@ import "./replicasets.scss";
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import type { ReplicaSet } from "../../api/endpoints";
|
import type { ReplicaSet } from "../../api/endpoints";
|
||||||
import type { KubeObjectMenuProps } from "../kube-object/kube-object-menu";
|
import type { KubeObjectMenuProps } from "../kube-object-menu";
|
||||||
import { replicaSetStore } from "./replicasets.store";
|
import { replicaSetStore } from "./replicasets.store";
|
||||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||||
import type { RouteComponentProps } from "react-router";
|
import type { RouteComponentProps } from "react-router";
|
||||||
import { KubeObjectListLayout } from "../kube-object/kube-object-list-layout";
|
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||||
import { MenuItem } from "../menu/menu";
|
import { MenuItem } from "../menu/menu";
|
||||||
import { Icon } from "../icon/icon";
|
import { Icon } from "../icon/icon";
|
||||||
import { ReplicaSetScaleDialog } from "./replicaset-scale-dialog";
|
import { ReplicaSetScaleDialog } from "./replicaset-scale-dialog";
|
||||||
|
|||||||
@ -31,12 +31,12 @@ import { PodDetailsTolerations } from "../+workloads-pods/pod-details-toleration
|
|||||||
import { PodDetailsAffinities } from "../+workloads-pods/pod-details-affinities";
|
import { PodDetailsAffinities } from "../+workloads-pods/pod-details-affinities";
|
||||||
import { podsStore } from "../+workloads-pods/pods.store";
|
import { podsStore } from "../+workloads-pods/pods.store";
|
||||||
import { statefulSetStore } from "./statefulset.store";
|
import { statefulSetStore } from "./statefulset.store";
|
||||||
import type { KubeObjectDetailsProps } from "../kube-object";
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||||
import { getMetricsForStatefulSets, IPodMetrics, StatefulSet } from "../../api/endpoints";
|
import { getMetricsForStatefulSets, IPodMetrics, StatefulSet } from "../../api/endpoints";
|
||||||
import { ResourceMetrics, ResourceMetricsText } from "../resource-metrics";
|
import { ResourceMetrics, ResourceMetricsText } from "../resource-metrics";
|
||||||
import { PodCharts, podMetricTabs } from "../+workloads-pods/pod-charts";
|
import { PodCharts, podMetricTabs } from "../+workloads-pods/pod-charts";
|
||||||
import { PodDetailsList } from "../+workloads-pods/pod-details-list";
|
import { PodDetailsList } from "../+workloads-pods/pod-details-list";
|
||||||
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
import { getActiveClusterEntity } from "../../api/catalog-entity-registry";
|
import { getActiveClusterEntity } from "../../api/catalog-entity-registry";
|
||||||
import { ClusterMetricsResourceType } from "../../../common/cluster-types";
|
import { ClusterMetricsResourceType } from "../../../common/cluster-types";
|
||||||
import { boundMethod } from "../../utils";
|
import { boundMethod } from "../../utils";
|
||||||
|
|||||||
@ -29,8 +29,8 @@ import { podsStore } from "../+workloads-pods/pods.store";
|
|||||||
import { statefulSetStore } from "./statefulset.store";
|
import { statefulSetStore } from "./statefulset.store";
|
||||||
import { nodesStore } from "../+nodes/nodes.store";
|
import { nodesStore } from "../+nodes/nodes.store";
|
||||||
import { eventStore } from "../+events/event.store";
|
import { eventStore } from "../+events/event.store";
|
||||||
import type { KubeObjectMenuProps } from "../kube-object/kube-object-menu";
|
import type { KubeObjectMenuProps } from "../kube-object-menu";
|
||||||
import { KubeObjectListLayout } from "../kube-object";
|
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||||
import { StatefulSetScaleDialog } from "./statefulset-scale-dialog";
|
import { StatefulSetScaleDialog } from "./statefulset-scale-dialog";
|
||||||
import { MenuItem } from "../menu/menu";
|
import { MenuItem } from "../menu/menu";
|
||||||
|
|||||||
@ -55,7 +55,7 @@ import { TabLayout, TabLayoutRoute } from "./layout/tab-layout";
|
|||||||
import { ErrorBoundary } from "./error-boundary";
|
import { ErrorBoundary } from "./error-boundary";
|
||||||
import { MainLayout } from "./layout/main-layout";
|
import { MainLayout } from "./layout/main-layout";
|
||||||
import { Notifications } from "./notifications";
|
import { Notifications } from "./notifications";
|
||||||
import { KubeObjectDetails } from "./kube-object";
|
import { KubeObjectDetails } from "./kube-object-details";
|
||||||
import { KubeConfigDialog } from "./kubeconfig-dialog";
|
import { KubeConfigDialog } from "./kubeconfig-dialog";
|
||||||
import { Terminal } from "./dock/terminal";
|
import { Terminal } from "./dock/terminal";
|
||||||
import { namespaceStore } from "./+namespaces/namespace.store";
|
import { namespaceStore } from "./+namespaces/namespace.store";
|
||||||
|
|||||||
22
src/renderer/components/kube-detail-params/index.ts
Normal file
22
src/renderer/components/kube-detail-params/index.ts
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) 2021 OpenLens Authors
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
|
* the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
* subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export * from "./params";
|
||||||
67
src/renderer/components/kube-detail-params/params.ts
Normal file
67
src/renderer/components/kube-detail-params/params.ts
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) 2021 OpenLens Authors
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
|
* the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
* subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
import { createPageParam, navigation } from "../../navigation";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to store `object.selfLink` to show more info about resource in the details panel.
|
||||||
|
*/
|
||||||
|
export const kubeDetailsUrlParam = createPageParam({
|
||||||
|
name: "kube-details",
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to highlight last active/selected table row with the resource.
|
||||||
|
*
|
||||||
|
* @example
|
||||||
|
* If we go to "Nodes (page) -> Node (details) -> Pod (details)",
|
||||||
|
* last clicked Node should be "active" while Pod details are shown).
|
||||||
|
*/
|
||||||
|
export const kubeSelectedUrlParam = createPageParam({
|
||||||
|
name: "kube-selected",
|
||||||
|
get defaultValue() {
|
||||||
|
return kubeDetailsUrlParam.get();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
export function showDetails(selfLink = "", resetSelected = true) {
|
||||||
|
const detailsUrl = getDetailsUrl(selfLink, resetSelected);
|
||||||
|
|
||||||
|
navigation.merge({ search: detailsUrl });
|
||||||
|
}
|
||||||
|
|
||||||
|
export function hideDetails() {
|
||||||
|
showDetails();
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getDetailsUrl(selfLink: string, resetSelected = false, mergeGlobals = true) {
|
||||||
|
console.debug("getDetailsUrl", { selfLink, resetSelected, mergeGlobals });
|
||||||
|
const params = new URLSearchParams(mergeGlobals ? navigation.searchParams : "");
|
||||||
|
|
||||||
|
params.set(kubeDetailsUrlParam.name, selfLink);
|
||||||
|
|
||||||
|
if (resetSelected) {
|
||||||
|
params.delete(kubeSelectedUrlParam.name);
|
||||||
|
} else {
|
||||||
|
params.set(kubeSelectedUrlParam.name, kubeSelectedUrlParam.get());
|
||||||
|
}
|
||||||
|
|
||||||
|
return `?${params}`;
|
||||||
|
}
|
||||||
22
src/renderer/components/kube-object-details/index.ts
Normal file
22
src/renderer/components/kube-object-details/index.ts
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) 2021 OpenLens Authors
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
|
* the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
* subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export * from "./kube-object-details";
|
||||||
@ -24,63 +24,18 @@ import "./kube-object-details.scss";
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { disposeOnUnmount, observer } from "mobx-react";
|
import { disposeOnUnmount, observer } from "mobx-react";
|
||||||
import { computed, observable, reaction, makeObservable } from "mobx";
|
import { computed, observable, reaction, makeObservable } from "mobx";
|
||||||
import { createPageParam, navigation } from "../../navigation";
|
|
||||||
import { Drawer } from "../drawer";
|
import { Drawer } from "../drawer";
|
||||||
import type { KubeObject } from "../../api/kube-object";
|
import type { KubeObject } from "../../api/kube-object";
|
||||||
import { Spinner } from "../spinner";
|
import { Spinner } from "../spinner";
|
||||||
import { apiManager } from "../../api/api-manager";
|
import { apiManager } from "../../api/api-manager";
|
||||||
import { crdStore } from "../+custom-resources/crd.store";
|
import { crdStore } from "../+custom-resources/crd.store";
|
||||||
import { KubeObjectMenu } from "./kube-object-menu";
|
import { KubeObjectMenu } from "../kube-object-menu";
|
||||||
import { KubeObjectDetailRegistry } from "../../api/kube-object-detail-registry";
|
import { KubeObjectDetailRegistry } from "../../api/kube-object-detail-registry";
|
||||||
import logger from "../../../main/logger";
|
import logger from "../../../main/logger";
|
||||||
import { CrdResourceDetails } from "../+custom-resources";
|
import { CrdResourceDetails } from "../+custom-resources";
|
||||||
import { KubeObjectMeta } from "./kube-object-meta";
|
import { KubeObjectMeta } from "../kube-object-meta";
|
||||||
|
import { hideDetails, kubeDetailsUrlParam } from "../kube-detail-params";
|
||||||
|
|
||||||
/**
|
|
||||||
* Used to store `object.selfLink` to show more info about resource in the details panel.
|
|
||||||
*/
|
|
||||||
export const kubeDetailsUrlParam = createPageParam({
|
|
||||||
name: "kube-details",
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Used to highlight last active/selected table row with the resource.
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* If we go to "Nodes (page) -> Node (details) -> Pod (details)",
|
|
||||||
* last clicked Node should be "active" while Pod details are shown).
|
|
||||||
*/
|
|
||||||
export const kubeSelectedUrlParam = createPageParam({
|
|
||||||
name: "kube-selected",
|
|
||||||
get defaultValue() {
|
|
||||||
return kubeDetailsUrlParam.get();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
export function showDetails(selfLink = "", resetSelected = true) {
|
|
||||||
const detailsUrl = getDetailsUrl(selfLink, resetSelected);
|
|
||||||
|
|
||||||
navigation.merge({ search: detailsUrl });
|
|
||||||
}
|
|
||||||
|
|
||||||
export function hideDetails() {
|
|
||||||
showDetails();
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getDetailsUrl(selfLink: string, resetSelected = false, mergeGlobals = true) {
|
|
||||||
logger.debug("getDetailsUrl", { selfLink, resetSelected, mergeGlobals });
|
|
||||||
const params = new URLSearchParams(mergeGlobals ? navigation.searchParams : "");
|
|
||||||
|
|
||||||
params.set(kubeDetailsUrlParam.name, selfLink);
|
|
||||||
|
|
||||||
if (resetSelected) {
|
|
||||||
params.delete(kubeSelectedUrlParam.name);
|
|
||||||
} else {
|
|
||||||
params.set(kubeSelectedUrlParam.name, kubeSelectedUrlParam.get());
|
|
||||||
}
|
|
||||||
|
|
||||||
return `?${params}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface KubeObjectDetailsProps<T extends KubeObject = KubeObject> {
|
export interface KubeObjectDetailsProps<T extends KubeObject = KubeObject> {
|
||||||
className?: string;
|
className?: string;
|
||||||
@ -19,7 +19,4 @@
|
|||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export * from "./kube-object-details";
|
|
||||||
export * from "./kube-object-list-layout";
|
export * from "./kube-object-list-layout";
|
||||||
export * from "./kube-object-menu";
|
|
||||||
export * from "./kube-object-meta";
|
|
||||||
@ -24,14 +24,14 @@ import { computed, makeObservable } from "mobx";
|
|||||||
import { disposeOnUnmount, observer } from "mobx-react";
|
import { disposeOnUnmount, observer } from "mobx-react";
|
||||||
import { cssNames } from "../../utils";
|
import { cssNames } from "../../utils";
|
||||||
import type { KubeObject } from "../../api/kube-object";
|
import type { KubeObject } from "../../api/kube-object";
|
||||||
import { ItemListLayout, ItemListLayoutProps } from "../item-object-list/item-list-layout";
|
import { ItemListLayout, ItemListLayoutProps } from "../item-object-list";
|
||||||
import type { KubeObjectStore } from "../../kube-object.store";
|
import type { KubeObjectStore } from "../../kube-object.store";
|
||||||
import { KubeObjectMenu } from "./kube-object-menu";
|
import { KubeObjectMenu } from "../kube-object-menu";
|
||||||
import { kubeSelectedUrlParam, showDetails } from "./kube-object-details";
|
|
||||||
import { kubeWatchApi } from "../../api/kube-watch-api";
|
import { kubeWatchApi } from "../../api/kube-watch-api";
|
||||||
import { clusterContext } from "../context";
|
import { clusterContext } from "../context";
|
||||||
import { NamespaceSelectFilter } from "../+namespaces/namespace-select-filter";
|
import { NamespaceSelectFilter } from "../+namespaces/namespace-select-filter";
|
||||||
import { ResourceKindMap, ResourceNames } from "../../utils/rbac";
|
import { ResourceKindMap, ResourceNames } from "../../utils/rbac";
|
||||||
|
import { kubeSelectedUrlParam, showDetails } from "../kube-detail-params";
|
||||||
|
|
||||||
export interface KubeObjectListLayoutProps<K extends KubeObject> extends ItemListLayoutProps<K> {
|
export interface KubeObjectListLayoutProps<K extends KubeObject> extends ItemListLayoutProps<K> {
|
||||||
store: KubeObjectStore<K>;
|
store: KubeObjectStore<K>;
|
||||||
22
src/renderer/components/kube-object-menu/index.ts
Normal file
22
src/renderer/components/kube-object-menu/index.ts
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) 2021 OpenLens Authors
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
|
* the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
* subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export * from "./kube-object-menu";
|
||||||
@ -24,7 +24,7 @@ import { boundMethod, cssNames } from "../../utils";
|
|||||||
import type { KubeObject } from "../../api/kube-object";
|
import type { KubeObject } from "../../api/kube-object";
|
||||||
import { editResourceTab } from "../dock/edit-resource.store";
|
import { editResourceTab } from "../dock/edit-resource.store";
|
||||||
import { MenuActions, MenuActionsProps } from "../menu/menu-actions";
|
import { MenuActions, MenuActionsProps } from "../menu/menu-actions";
|
||||||
import { hideDetails } from "./kube-object-details";
|
import { hideDetails } from "../kube-detail-params";
|
||||||
import { apiManager } from "../../api/api-manager";
|
import { apiManager } from "../../api/api-manager";
|
||||||
import { KubeObjectMenuRegistry } from "../../../extensions/registries/kube-object-menu-registry";
|
import { KubeObjectMenuRegistry } from "../../../extensions/registries/kube-object-menu-registry";
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ export class KubeObjectMenu<T extends KubeObject> extends React.Component<KubeOb
|
|||||||
|
|
||||||
getMenuItems(): React.ReactChild[] {
|
getMenuItems(): React.ReactChild[] {
|
||||||
const { object, toolbar } = this.props;
|
const { object, toolbar } = this.props;
|
||||||
|
|
||||||
if (!object) {
|
if (!object) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
22
src/renderer/components/kube-object-meta/index.ts
Normal file
22
src/renderer/components/kube-object-meta/index.ts
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) 2021 OpenLens Authors
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
|
* the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
* subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export * from "./kube-object-meta";
|
||||||
@ -26,7 +26,7 @@ import { lookupApiLink } from "../../api/kube-api";
|
|||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||||
import { LocaleDate } from "../locale-date";
|
import { LocaleDate } from "../locale-date";
|
||||||
import { getDetailsUrl } from "./kube-object-details";
|
import { getDetailsUrl } from "../kube-detail-params";
|
||||||
|
|
||||||
export interface KubeObjectMetaProps {
|
export interface KubeObjectMetaProps {
|
||||||
object: KubeObject;
|
object: KubeObject;
|
||||||
@ -52,7 +52,7 @@ import { JobDetails } from "../components/+workloads-jobs";
|
|||||||
import { PodDetails } from "../components/+workloads-pods";
|
import { PodDetails } from "../components/+workloads-pods";
|
||||||
import { ReplicaSetDetails } from "../components/+workloads-replicasets";
|
import { ReplicaSetDetails } from "../components/+workloads-replicasets";
|
||||||
import { StatefulSetDetails } from "../components/+workloads-statefulsets";
|
import { StatefulSetDetails } from "../components/+workloads-statefulsets";
|
||||||
import type { KubeObjectDetailsProps } from "../components/kube-object";
|
import type { KubeObjectDetailsProps } from "../components/kube-object-details";
|
||||||
|
|
||||||
export function intiKubeObjectDetailRegistry() {
|
export function intiKubeObjectDetailRegistry() {
|
||||||
KubeObjectDetailRegistry.getInstance()
|
KubeObjectDetailRegistry.getInstance()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user