mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Enable consistent-type-imports eslint rule (#5205)
This commit is contained in:
1 parent
93a8d0f157
commit
1a29759bff
402 files changed
+991
-503
No files matched your search
@@ -9,7 +9,8 @@ import { fireEvent } from "@testing-library/react";
|
||||
import type { IToleration } from "../../../../common/k8s-api/workload-kube-object";
|
||||
import { PodTolerations } from "../pod-tolerations";
|
||||
import { getDiForUnitTesting } from "../../../getDiForUnitTesting";
|
||||
import { DiRender, renderFor } from "../../test-utils/renderFor";
|
||||
import type { DiRender } from "../../test-utils/renderFor";
|
||||
import { renderFor } from "../../test-utils/renderFor";
|
||||
import directoryForLensLocalStorageInjectable from "../../../../common/directory-for-lens-local-storage/directory-for-lens-local-storage.injectable";
|
||||
|
||||
jest.mock("electron", () => ({
|
||||
|
||||
@@ -9,7 +9,8 @@ import type { IPodMetrics } from "../../../common/k8s-api/endpoints";
|
||||
import { BarChart, cpuOptions, memoryOptions } from "../chart";
|
||||
import { isMetricsEmpty, normalizeMetrics } from "../../../common/k8s-api/endpoints/metrics.api";
|
||||
import { NoMetrics } from "../resource-metrics/no-metrics";
|
||||
import { IResourceMetricsValue, ResourceMetricsContext } from "../resource-metrics";
|
||||
import type { IResourceMetricsValue } from "../resource-metrics";
|
||||
import { ResourceMetricsContext } from "../resource-metrics";
|
||||
import { ThemeStore } from "../../theme.store";
|
||||
import { mapValues } from "lodash";
|
||||
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
import React from "react";
|
||||
import { secretsApi } from "../../../../../../common/k8s-api/endpoints";
|
||||
import { DrawerItem } from "../../../../drawer";
|
||||
import { LocalRef, VolumeVariantComponent } from "../variant-helpers";
|
||||
import type { VolumeVariantComponent } from "../variant-helpers";
|
||||
import { LocalRef } from "../variant-helpers";
|
||||
|
||||
export const CephFs: VolumeVariantComponent<"cephfs"> = (
|
||||
({ pod, variant: { monitors, path = "/", user = "admin", secretFile = "/etc/ceph/user.secret", secretRef, readOnly }}) => (
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
import React from "react";
|
||||
import { configMapApi } from "../../../../../../common/k8s-api/endpoints";
|
||||
import { LocalRef, VolumeVariantComponent } from "../variant-helpers";
|
||||
import type { VolumeVariantComponent } from "../variant-helpers";
|
||||
import { LocalRef } from "../variant-helpers";
|
||||
|
||||
export const ConfigMap: VolumeVariantComponent<"configMap"> = (
|
||||
({ pod, variant: { name }}) => (
|
||||
|
||||
+2
-1
@@ -6,7 +6,8 @@
|
||||
import React from "react";
|
||||
import { secretsApi } from "../../../../../../common/k8s-api/endpoints";
|
||||
import { DrawerItem } from "../../../../drawer";
|
||||
import { LocalRef, VolumeVariantComponent } from "../variant-helpers";
|
||||
import type { VolumeVariantComponent } from "../variant-helpers";
|
||||
import { LocalRef } from "../variant-helpers";
|
||||
|
||||
export const ContainerStorageInterface: VolumeVariantComponent<"csi"> = ({
|
||||
pod,
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
import React from "react";
|
||||
import { secretsApi } from "../../../../../../common/k8s-api/endpoints";
|
||||
import { DrawerItem } from "../../../../drawer";
|
||||
import { LocalRef, VolumeVariantComponent } from "../variant-helpers";
|
||||
import type { VolumeVariantComponent } from "../variant-helpers";
|
||||
import { LocalRef } from "../variant-helpers";
|
||||
|
||||
export const FlexVolume: VolumeVariantComponent<"flexVolume"> = (
|
||||
({ pod, variant: { driver, fsType, secretRef, readOnly = false, options }}) => (
|
||||
|
||||
+2
-1
@@ -5,7 +5,8 @@
|
||||
|
||||
import React from "react";
|
||||
import { pvcApi } from "../../../../../../common/k8s-api/endpoints";
|
||||
import { LocalRef, VolumeVariantComponent } from "../variant-helpers";
|
||||
import type { VolumeVariantComponent } from "../variant-helpers";
|
||||
import { LocalRef } from "../variant-helpers";
|
||||
|
||||
export const PersistentVolumeClaim: VolumeVariantComponent<"persistentVolumeClaim"> = (
|
||||
({ pod, variant: { claimName }}) => (
|
||||
|
||||
+2
-1
@@ -6,7 +6,8 @@
|
||||
import React from "react";
|
||||
import { secretsApi } from "../../../../../../common/k8s-api/endpoints";
|
||||
import { DrawerItem } from "../../../../drawer";
|
||||
import { LocalRef, VolumeVariantComponent } from "../variant-helpers";
|
||||
import type { VolumeVariantComponent } from "../variant-helpers";
|
||||
import { LocalRef } from "../variant-helpers";
|
||||
|
||||
export const RadosBlockDevice: VolumeVariantComponent<"rbd"> = (
|
||||
({ pod, variant: { monitors, image, fsType = "ext4", pool = "rbd", user = "admin", keyring = "/etc/ceph/keyright", secretRef, readOnly = false }}) => (
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
import React from "react";
|
||||
import { secretsApi } from "../../../../../../common/k8s-api/endpoints";
|
||||
import { DrawerItem } from "../../../../drawer";
|
||||
import { LocalRef, VolumeVariantComponent } from "../variant-helpers";
|
||||
import type { VolumeVariantComponent } from "../variant-helpers";
|
||||
import { LocalRef } from "../variant-helpers";
|
||||
|
||||
export const ScaleIo: VolumeVariantComponent<"scaleIO"> = (
|
||||
({ pod, variant: { gateway, system, secretRef, sslEnabled = false, protectionDomain, storagePool, storageMode = "ThinProvisioned", volumeName, fsType = "xfs", readOnly = false }}) => (
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
import React from "react";
|
||||
import { secretsApi } from "../../../../../../common/k8s-api/endpoints";
|
||||
import { DrawerItem } from "../../../../drawer";
|
||||
import { LocalRef, VolumeVariantComponent } from "../variant-helpers";
|
||||
import type { VolumeVariantComponent } from "../variant-helpers";
|
||||
import { LocalRef } from "../variant-helpers";
|
||||
|
||||
export const Secret: VolumeVariantComponent<"secret"> = (
|
||||
({ pod, variant: { secretName, items = [], defaultMode = 0o644, optional = false }}) => (
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
import React from "react";
|
||||
import { secretsApi } from "../../../../../../common/k8s-api/endpoints";
|
||||
import { DrawerItem } from "../../../../drawer";
|
||||
import { LocalRef, VolumeVariantComponent } from "../variant-helpers";
|
||||
import type { VolumeVariantComponent } from "../variant-helpers";
|
||||
import { LocalRef } from "../variant-helpers";
|
||||
|
||||
export const StorageOs: VolumeVariantComponent<"storageos"> = (
|
||||
({ pod, variant: { volumeName, volumeNamespace, fsType = "ext4", readOnly = false, secretRef }}) => (
|
||||
|
||||
@@ -8,7 +8,8 @@ import { observer } from "mobx-react";
|
||||
import React, { useContext } from "react";
|
||||
import { isMetricsEmpty, normalizeMetrics } from "../../../common/k8s-api/endpoints/metrics.api";
|
||||
import { BarChart, cpuOptions, memoryOptions } from "../chart";
|
||||
import { IResourceMetricsValue, ResourceMetricsContext } from "../resource-metrics";
|
||||
import type { IResourceMetricsValue } from "../resource-metrics";
|
||||
import { ResourceMetricsContext } from "../resource-metrics";
|
||||
import { NoMetrics } from "../resource-metrics/no-metrics";
|
||||
|
||||
import type { WorkloadKubeObject } from "../../../common/k8s-api/workload-kube-object";
|
||||
|
||||
@@ -12,8 +12,8 @@ import { action, makeObservable, observable, reaction } from "mobx";
|
||||
import { cssNames } from "../../utils";
|
||||
import { Notifications } from "../notifications";
|
||||
import { Button } from "../button";
|
||||
import type { ForwardedPort } from "../../port-forward";
|
||||
import { openPortForward, PortForwardStore, predictProtocol } from "../../port-forward";
|
||||
import type { ForwardedPort, PortForwardStore } from "../../port-forward";
|
||||
import { openPortForward, predictProtocol } from "../../port-forward";
|
||||
import { Spinner } from "../spinner";
|
||||
import { withInjectables } from "@ogre-tools/injectable-react";
|
||||
import portForwardStoreInjectable from "../../port-forward/port-forward-store/port-forward-store.injectable";
|
||||
|
||||
@@ -9,7 +9,8 @@ import React, { useEffect, useState } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { reaction } from "mobx";
|
||||
import { observer } from "mobx-react";
|
||||
import { Pod, Secret, secretsApi } from "../../../common/k8s-api/endpoints";
|
||||
import type { Pod, Secret } from "../../../common/k8s-api/endpoints";
|
||||
import { secretsApi } from "../../../common/k8s-api/endpoints";
|
||||
import { getDetailsUrl } from "../kube-detail-params";
|
||||
|
||||
export interface PodDetailsSecretsProps {
|
||||
|
||||
@@ -7,7 +7,8 @@ import countBy from "lodash/countBy";
|
||||
import { observable, makeObservable } from "mobx";
|
||||
import { KubeObjectStore } from "../../../common/k8s-api/kube-object.store";
|
||||
import { autoBind, cpuUnitsToNumber, unitsToBytes } from "../../utils";
|
||||
import { Pod, PodMetrics, podMetricsApi, podsApi } from "../../../common/k8s-api/endpoints";
|
||||
import type { Pod, PodMetrics } from "../../../common/k8s-api/endpoints";
|
||||
import { podMetricsApi, podsApi } from "../../../common/k8s-api/endpoints";
|
||||
import { apiManager } from "../../../common/k8s-api/api-manager";
|
||||
import type { WorkloadKubeObject } from "../../../common/k8s-api/workload-kube-object";
|
||||
|
||||
|
||||
@@ -11,7 +11,8 @@ import { Link } from "react-router-dom";
|
||||
import { podsStore } from "./pods.store";
|
||||
import { eventStore } from "../+events/event.store";
|
||||
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||
import { nodesApi, Pod } from "../../../common/k8s-api/endpoints";
|
||||
import type { Pod } from "../../../common/k8s-api/endpoints";
|
||||
import { nodesApi } from "../../../common/k8s-api/endpoints";
|
||||
import { StatusBrick } from "../status-brick";
|
||||
import { cssNames, getConvertedParts, stopPropagation } from "../../utils";
|
||||
import toPairs from "lodash/toPairs";
|
||||
|
||||
Reference in new issue
Block a user