mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
use import aliases for better readability
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
55759fb3b8
commit
8a7b4be0d5
@ -2,7 +2,7 @@ import { watch } from "chokidar";
|
|||||||
import { join, normalize } from "path";
|
import { join, normalize } from "path";
|
||||||
import { ExtensionDiscovery, InstalledExtension } from "../extension-discovery";
|
import { ExtensionDiscovery, InstalledExtension } from "../extension-discovery";
|
||||||
|
|
||||||
jest.mock("../../common/ipc");
|
jest.mock("@common/ipc");
|
||||||
jest.mock("fs-extra");
|
jest.mock("fs-extra");
|
||||||
jest.mock("chokidar", () => ({
|
jest.mock("chokidar", () => ({
|
||||||
watch: jest.fn()
|
watch: jest.fn()
|
||||||
|
|||||||
@ -2,12 +2,12 @@ import fs from "fs";
|
|||||||
import path from "path";
|
import path from "path";
|
||||||
import hb from "handlebars";
|
import hb from "handlebars";
|
||||||
import { observable } from "mobx";
|
import { observable } from "mobx";
|
||||||
import { ResourceApplier } from "../main/resource-applier";
|
import { ResourceApplier } from "@main/resource-applier";
|
||||||
import { Cluster } from "../main/cluster";
|
import { Cluster } from "@main/cluster";
|
||||||
import logger from "../main/logger";
|
import logger from "@main/logger";
|
||||||
import { app } from "electron";
|
import { app } from "electron";
|
||||||
import { requestMain } from "../common/ipc";
|
import { requestMain } from "@common/ipc";
|
||||||
import { clusterKubectlApplyAllHandler } from "../common/cluster-ipc";
|
import { clusterKubectlApplyAllHandler } from "@common/cluster-ipc";
|
||||||
|
|
||||||
export interface ClusterFeatureStatus {
|
export interface ClusterFeatureStatus {
|
||||||
/** feature's current version, as set by the implementation */
|
/** feature's current version, as set by the implementation */
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import { getAppVersion } from "../../common/utils";
|
import { getAppVersion } from "@common/utils";
|
||||||
import { extensionsStore } from "../extensions-store";
|
import { extensionsStore } from "../extensions-store";
|
||||||
|
|
||||||
export const version = getAppVersion();
|
export const version = getAppVersion();
|
||||||
export { isSnap, isWindows, isMac, isLinux, appName, slackUrl, issuesTrackerUrl } from "../../common/vars";
|
export { isSnap, isWindows, isMac, isLinux, appName, slackUrl, issuesTrackerUrl } from "@common/vars";
|
||||||
|
|
||||||
export function getEnabledExtensions(): string[] {
|
export function getEnabledExtensions(): string[] {
|
||||||
return extensionsStore.enabledExtensions;
|
return extensionsStore.enabledExtensions;
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
export { appEventBus } from "../../common/event-bus";
|
export { appEventBus } from "@common/event-bus";
|
||||||
export type { AppEvent } from "../../common/event-bus";
|
export type { AppEvent } from "@common/event-bus";
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
export { Singleton, openExternal } from "../../common/utils";
|
export { Singleton, openExternal } from "@common/utils";
|
||||||
export { prevDefault, stopPropagation } from "../../renderer/utils/prevDefault";
|
export { prevDefault, stopPropagation } from "@renderer/utils/prevDefault";
|
||||||
export { cssNames } from "../../renderer/utils/cssNames";
|
export { cssNames } from "@renderer/utils/cssNames";
|
||||||
|
|||||||
@ -5,9 +5,9 @@ import fs from "fs-extra";
|
|||||||
import { observable, reaction, toJS, when } from "mobx";
|
import { observable, reaction, toJS, when } from "mobx";
|
||||||
import os from "os";
|
import os from "os";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { broadcastMessage, handleRequest, requestMain, subscribeToBroadcast } from "../common/ipc";
|
import { broadcastMessage, handleRequest, requestMain, subscribeToBroadcast } from "@common/ipc";
|
||||||
import { getBundledExtensions } from "../common/utils/app-version";
|
import { getBundledExtensions } from "@common/utils/app-version";
|
||||||
import logger from "../main/logger";
|
import logger from "@main/logger";
|
||||||
import { extensionInstaller, PackageJson } from "./extension-installer";
|
import { extensionInstaller, PackageJson } from "./extension-installer";
|
||||||
import { extensionsStore } from "./extensions-store";
|
import { extensionsStore } from "./extensions-store";
|
||||||
import type { LensExtensionId, LensExtensionManifest } from "./lens-extension";
|
import type { LensExtensionId, LensExtensionManifest } from "./lens-extension";
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import AwaitLock from "await-lock";
|
|||||||
import child_process from "child_process";
|
import child_process from "child_process";
|
||||||
import fs from "fs-extra";
|
import fs from "fs-extra";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import logger from "../main/logger";
|
import logger from "@main/logger";
|
||||||
import { extensionPackagesRoot } from "./extension-loader";
|
import { extensionPackagesRoot } from "./extension-loader";
|
||||||
|
|
||||||
const logModule = "[EXTENSION-INSTALLER]";
|
const logModule = "[EXTENSION-INSTALLER]";
|
||||||
|
|||||||
@ -3,9 +3,9 @@ import { EventEmitter } from "events";
|
|||||||
import { isEqual } from "lodash";
|
import { isEqual } from "lodash";
|
||||||
import { action, computed, observable, reaction, toJS, when } from "mobx";
|
import { action, computed, observable, reaction, toJS, when } from "mobx";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { getHostedCluster } from "../common/cluster-store";
|
import { getHostedCluster } from "@common/cluster-store";
|
||||||
import { broadcastMessage, handleRequest, requestMain, subscribeToBroadcast } from "../common/ipc";
|
import { broadcastMessage, handleRequest, requestMain, subscribeToBroadcast } from "@common/ipc";
|
||||||
import logger from "../main/logger";
|
import logger from "@main/logger";
|
||||||
import type { InstalledExtension } from "./extension-discovery";
|
import type { InstalledExtension } from "./extension-discovery";
|
||||||
import { extensionsStore } from "./extensions-store";
|
import { extensionsStore } from "./extensions-store";
|
||||||
import type { LensExtension, LensExtensionConstructor, LensExtensionId } from "./lens-extension";
|
import type { LensExtension, LensExtensionConstructor, LensExtensionId } from "./lens-extension";
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { BaseStore } from "../common/base-store";
|
import { BaseStore } from "@common/base-store";
|
||||||
import * as path from "path";
|
import * as path from "path";
|
||||||
import { LensExtension } from "./lens-extension";
|
import { LensExtension } from "./lens-extension";
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { LensExtensionId } from "./lens-extension";
|
import type { LensExtensionId } from "./lens-extension";
|
||||||
import { BaseStore } from "../common/base-store";
|
import { BaseStore } from "@common/base-store";
|
||||||
import { action, computed, observable, toJS } from "mobx";
|
import { action, computed, observable, toJS } from "mobx";
|
||||||
|
|
||||||
export interface LensExtensionsStoreModel {
|
export interface LensExtensionsStoreModel {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import type { InstalledExtension } from "./extension-discovery";
|
import type { InstalledExtension } from "./extension-discovery";
|
||||||
import { action, observable, reaction } from "mobx";
|
import { action, observable, reaction } from "mobx";
|
||||||
import { filesystemProvisionerStore } from "../main/extension-filesystem";
|
import { filesystemProvisionerStore } from "@main/extension-filesystem";
|
||||||
import logger from "../main/logger";
|
import logger from "@main/logger";
|
||||||
|
|
||||||
export type LensExtensionId = string; // path to manifest (package.json)
|
export type LensExtensionId = string; // path to manifest (package.json)
|
||||||
export type LensExtensionConstructor = new (...args: ConstructorParameters<typeof LensExtension>) => LensExtension;
|
export type LensExtensionConstructor = new (...args: ConstructorParameters<typeof LensExtension>) => LensExtension;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import type { MenuRegistration } from "./registries/menu-registry";
|
import type { MenuRegistration } from "./registries/menu-registry";
|
||||||
import { LensExtension } from "./lens-extension";
|
import { LensExtension } from "./lens-extension";
|
||||||
import { WindowManager } from "../main/window-manager";
|
import { WindowManager } from "@main/window-manager";
|
||||||
import { getExtensionPageUrl } from "./registries/page-registry";
|
import { getExtensionPageUrl } from "./registries/page-registry";
|
||||||
|
|
||||||
export class LensMainExtension extends LensExtension {
|
export class LensMainExtension extends LensExtension {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { AppPreferenceRegistration, ClusterFeatureRegistration, ClusterPageMenuRegistration, KubeObjectDetailRegistration, KubeObjectMenuRegistration, KubeObjectStatusRegistration, PageMenuRegistration, PageRegistration, StatusBarRegistration, } from "./registries";
|
import type { AppPreferenceRegistration, ClusterFeatureRegistration, ClusterPageMenuRegistration, KubeObjectDetailRegistration, KubeObjectMenuRegistration, KubeObjectStatusRegistration, PageMenuRegistration, PageRegistration, StatusBarRegistration, } from "./registries";
|
||||||
import type { Cluster } from "../main/cluster";
|
import type { Cluster } from "@main/cluster";
|
||||||
import { LensExtension } from "./lens-extension";
|
import { LensExtension } from "./lens-extension";
|
||||||
import { getExtensionPageUrl } from "./registries/page-registry";
|
import { getExtensionPageUrl } from "./registries/page-registry";
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// Extensions-api -> Register page menu items
|
// Extensions-api -> Register page menu items
|
||||||
import type { IconProps } from "../../renderer/components/icon";
|
import type { IconProps } from "@renderer/components/icon";
|
||||||
import type React from "react";
|
import type React from "react";
|
||||||
import type { PageTarget, RegisteredPage } from "./page-registry";
|
import type { PageTarget, RegisteredPage } from "./page-registry";
|
||||||
import { action } from "mobx";
|
import { action } from "mobx";
|
||||||
|
|||||||
@ -4,8 +4,8 @@ import React from "react";
|
|||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { BaseRegistry } from "./base-registry";
|
import { BaseRegistry } from "./base-registry";
|
||||||
import { LensExtension, sanitizeExtensionName } from "../lens-extension";
|
import { LensExtension, sanitizeExtensionName } from "../lens-extension";
|
||||||
import { PageParam, PageParamInit } from "../../renderer/navigation/page-param";
|
import { PageParam, PageParamInit } from "@renderer/navigation/page-param";
|
||||||
import { createPageParam } from "../../renderer/navigation/helpers";
|
import { createPageParam } from "@renderer/navigation/helpers";
|
||||||
|
|
||||||
export interface PageRegistration {
|
export interface PageRegistration {
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,41 +1,41 @@
|
|||||||
// Common UI components
|
// Common UI components
|
||||||
|
|
||||||
// layouts
|
// layouts
|
||||||
export * from "../../renderer/components/layout/page-layout";
|
export * from "@renderer/components/layout/page-layout";
|
||||||
export * from "../../renderer/components/layout/wizard-layout";
|
export * from "@renderer/components/layout/wizard-layout";
|
||||||
export * from "../../renderer/components/layout/tab-layout";
|
export * from "@renderer/components/layout/tab-layout";
|
||||||
|
|
||||||
// form-controls
|
// form-controls
|
||||||
export * from "../../renderer/components/button";
|
export * from "@renderer/components/button";
|
||||||
export * from "../../renderer/components/checkbox";
|
export * from "@renderer/components/checkbox";
|
||||||
export * from "../../renderer/components/radio";
|
export * from "@renderer/components/radio";
|
||||||
export * from "../../renderer/components/select";
|
export * from "@renderer/components/select";
|
||||||
export * from "../../renderer/components/slider";
|
export * from "@renderer/components/slider";
|
||||||
export * from "../../renderer/components/input/input";
|
export * from "@renderer/components/input/input";
|
||||||
|
|
||||||
// other components
|
// other components
|
||||||
export * from "../../renderer/components/icon";
|
export * from "@renderer/components/icon";
|
||||||
export * from "../../renderer/components/tooltip";
|
export * from "@renderer/components/tooltip";
|
||||||
export * from "../../renderer/components/tabs";
|
export * from "@renderer/components/tabs";
|
||||||
export * from "../../renderer/components/table";
|
export * from "@renderer/components/table";
|
||||||
export * from "../../renderer/components/badge";
|
export * from "@renderer/components/badge";
|
||||||
export * from "../../renderer/components/drawer";
|
export * from "@renderer/components/drawer";
|
||||||
export * from "../../renderer/components/dialog";
|
export * from "@renderer/components/dialog";
|
||||||
export * from "../../renderer/components/confirm-dialog";
|
export * from "@renderer/components/confirm-dialog";
|
||||||
export * from "../../renderer/components/line-progress";
|
export * from "@renderer/components/line-progress";
|
||||||
export * from "../../renderer/components/menu";
|
export * from "@renderer/components/menu";
|
||||||
export * from "../../renderer/components/notifications";
|
export * from "@renderer/components/notifications";
|
||||||
export * from "../../renderer/components/spinner";
|
export * from "@renderer/components/spinner";
|
||||||
export * from "../../renderer/components/stepper";
|
export * from "@renderer/components/stepper";
|
||||||
export * from "../../renderer/components/wizard";
|
export * from "@renderer/components/wizard";
|
||||||
export * from "../../renderer/components/+workloads-pods/pod-details-list";
|
export * from "@renderer/components/+workloads-pods/pod-details-list";
|
||||||
export * from "../../renderer/components/+namespaces/namespace-select";
|
export * from "@renderer/components/+namespaces/namespace-select";
|
||||||
|
|
||||||
// kube helpers
|
// kube helpers
|
||||||
export * from "../../renderer/components/kube-object";
|
export * from "@renderer/components/kube-object";
|
||||||
export * from "../../renderer/components/+events/kube-event-details";
|
export * from "@renderer/components/+events/kube-event-details";
|
||||||
|
|
||||||
// specific exports
|
// specific exports
|
||||||
export * from "../../renderer/components/status-brick";
|
export * from "@renderer/components/status-brick";
|
||||||
export { terminalStore, createTerminalTab } from "../../renderer/components/dock/terminal.store";
|
export { terminalStore, createTerminalTab } from "@renderer/components/dock/terminal.store";
|
||||||
export { createPodLogsTab } from "../../renderer/components/dock/log.store";
|
export { createPodLogsTab } from "@renderer/components/dock/log.store";
|
||||||
|
|||||||
@ -1,65 +1,65 @@
|
|||||||
export { isAllowedResource } from "../../common/rbac";
|
export { isAllowedResource } from "@common/rbac";
|
||||||
export { apiManager } from "../../renderer/api/api-manager";
|
export { apiManager } from "@renderer/api/api-manager";
|
||||||
export { KubeObjectStore } from "../../renderer/kube-object.store";
|
export { KubeObjectStore } from "@renderer/kube-object.store";
|
||||||
export { KubeApi, forCluster, IKubeApiCluster } from "../../renderer/api/kube-api";
|
export { KubeApi, forCluster, IKubeApiCluster } from "@renderer/api/kube-api";
|
||||||
export { KubeObject } from "../../renderer/api/kube-object";
|
export { KubeObject } from "@renderer/api/kube-object";
|
||||||
export { Pod, podsApi, PodsApi, IPodContainer, IPodContainerStatus } from "../../renderer/api/endpoints";
|
export { Pod, podsApi, PodsApi, IPodContainer, IPodContainerStatus } from "@renderer/api/endpoints";
|
||||||
export { Node, nodesApi, NodesApi } from "../../renderer/api/endpoints";
|
export { Node, nodesApi, NodesApi } from "@renderer/api/endpoints";
|
||||||
export { Deployment, deploymentApi, DeploymentApi } from "../../renderer/api/endpoints";
|
export { Deployment, deploymentApi, DeploymentApi } from "@renderer/api/endpoints";
|
||||||
export { DaemonSet, daemonSetApi } from "../../renderer/api/endpoints";
|
export { DaemonSet, daemonSetApi } from "@renderer/api/endpoints";
|
||||||
export { StatefulSet, statefulSetApi } from "../../renderer/api/endpoints";
|
export { StatefulSet, statefulSetApi } from "@renderer/api/endpoints";
|
||||||
export { Job, jobApi } from "../../renderer/api/endpoints";
|
export { Job, jobApi } from "@renderer/api/endpoints";
|
||||||
export { CronJob, cronJobApi } from "../../renderer/api/endpoints";
|
export { CronJob, cronJobApi } from "@renderer/api/endpoints";
|
||||||
export { ConfigMap, configMapApi } from "../../renderer/api/endpoints";
|
export { ConfigMap, configMapApi } from "@renderer/api/endpoints";
|
||||||
export { Secret, secretsApi, ISecretRef } from "../../renderer/api/endpoints";
|
export { Secret, secretsApi, ISecretRef } from "@renderer/api/endpoints";
|
||||||
export { ReplicaSet, replicaSetApi } from "../../renderer/api/endpoints";
|
export { ReplicaSet, replicaSetApi } from "@renderer/api/endpoints";
|
||||||
export { ResourceQuota, resourceQuotaApi } from "../../renderer/api/endpoints";
|
export { ResourceQuota, resourceQuotaApi } from "@renderer/api/endpoints";
|
||||||
export { LimitRange, limitRangeApi } from "../../renderer/api/endpoints";
|
export { LimitRange, limitRangeApi } from "@renderer/api/endpoints";
|
||||||
export { HorizontalPodAutoscaler, hpaApi } from "../../renderer/api/endpoints";
|
export { HorizontalPodAutoscaler, hpaApi } from "@renderer/api/endpoints";
|
||||||
export { PodDisruptionBudget, pdbApi } from "../../renderer/api/endpoints";
|
export { PodDisruptionBudget, pdbApi } from "@renderer/api/endpoints";
|
||||||
export { Service, serviceApi } from "../../renderer/api/endpoints";
|
export { Service, serviceApi } from "@renderer/api/endpoints";
|
||||||
export { Endpoint, endpointApi } from "../../renderer/api/endpoints";
|
export { Endpoint, endpointApi } from "@renderer/api/endpoints";
|
||||||
export { Ingress, ingressApi, IngressApi } from "../../renderer/api/endpoints";
|
export { Ingress, ingressApi, IngressApi } from "@renderer/api/endpoints";
|
||||||
export { NetworkPolicy, networkPolicyApi } from "../../renderer/api/endpoints";
|
export { NetworkPolicy, networkPolicyApi } from "@renderer/api/endpoints";
|
||||||
export { PersistentVolume, persistentVolumeApi } from "../../renderer/api/endpoints";
|
export { PersistentVolume, persistentVolumeApi } from "@renderer/api/endpoints";
|
||||||
export { PersistentVolumeClaim, pvcApi, PersistentVolumeClaimsApi } from "../../renderer/api/endpoints";
|
export { PersistentVolumeClaim, pvcApi, PersistentVolumeClaimsApi } from "@renderer/api/endpoints";
|
||||||
export { StorageClass, storageClassApi } from "../../renderer/api/endpoints";
|
export { StorageClass, storageClassApi } from "@renderer/api/endpoints";
|
||||||
export { Namespace, namespacesApi } from "../../renderer/api/endpoints";
|
export { Namespace, namespacesApi } from "@renderer/api/endpoints";
|
||||||
export { KubeEvent, eventApi } from "../../renderer/api/endpoints";
|
export { KubeEvent, eventApi } from "@renderer/api/endpoints";
|
||||||
export { ServiceAccount, serviceAccountsApi } from "../../renderer/api/endpoints";
|
export { ServiceAccount, serviceAccountsApi } from "@renderer/api/endpoints";
|
||||||
export { Role, roleApi } from "../../renderer/api/endpoints";
|
export { Role, roleApi } from "@renderer/api/endpoints";
|
||||||
export { RoleBinding, roleBindingApi } from "../../renderer/api/endpoints";
|
export { RoleBinding, roleBindingApi } from "@renderer/api/endpoints";
|
||||||
export { ClusterRole, clusterRoleApi } from "../../renderer/api/endpoints";
|
export { ClusterRole, clusterRoleApi } from "@renderer/api/endpoints";
|
||||||
export { ClusterRoleBinding, clusterRoleBindingApi } from "../../renderer/api/endpoints";
|
export { ClusterRoleBinding, clusterRoleBindingApi } from "@renderer/api/endpoints";
|
||||||
export { CustomResourceDefinition, crdApi } from "../../renderer/api/endpoints";
|
export { CustomResourceDefinition, crdApi } from "@renderer/api/endpoints";
|
||||||
export { KubeObjectStatus, KubeObjectStatusLevel } from "./kube-object-status";
|
export { KubeObjectStatus, KubeObjectStatusLevel } from "./kube-object-status";
|
||||||
|
|
||||||
// stores
|
// stores
|
||||||
export type { EventStore } from "../../renderer/components/+events/event.store";
|
export type { EventStore } from "@renderer/components/+events/event.store";
|
||||||
export type { PodsStore } from "../../renderer/components/+workloads-pods/pods.store";
|
export type { PodsStore } from "@renderer/components/+workloads-pods/pods.store";
|
||||||
export type { NodesStore } from "../../renderer/components/+nodes/nodes.store";
|
export type { NodesStore } from "@renderer/components/+nodes/nodes.store";
|
||||||
export type { DeploymentStore } from "../../renderer/components/+workloads-deployments/deployments.store";
|
export type { DeploymentStore } from "@renderer/components/+workloads-deployments/deployments.store";
|
||||||
export type { DaemonSetStore } from "../../renderer/components/+workloads-daemonsets/daemonsets.store";
|
export type { DaemonSetStore } from "@renderer/components/+workloads-daemonsets/daemonsets.store";
|
||||||
export type { StatefulSetStore } from "../../renderer/components/+workloads-statefulsets/statefulset.store";
|
export type { StatefulSetStore } from "@renderer/components/+workloads-statefulsets/statefulset.store";
|
||||||
export type { JobStore } from "../../renderer/components/+workloads-jobs/job.store";
|
export type { JobStore } from "@renderer/components/+workloads-jobs/job.store";
|
||||||
export type { CronJobStore } from "../../renderer/components/+workloads-cronjobs/cronjob.store";
|
export type { CronJobStore } from "@renderer/components/+workloads-cronjobs/cronjob.store";
|
||||||
export type { ConfigMapsStore } from "../../renderer/components/+config-maps/config-maps.store";
|
export type { ConfigMapsStore } from "@renderer/components/+config-maps/config-maps.store";
|
||||||
export type { SecretsStore } from "../../renderer/components/+config-secrets/secrets.store";
|
export type { SecretsStore } from "@renderer/components/+config-secrets/secrets.store";
|
||||||
export type { ReplicaSetStore } from "../../renderer/components/+workloads-replicasets/replicasets.store";
|
export type { ReplicaSetStore } from "@renderer/components/+workloads-replicasets/replicasets.store";
|
||||||
export type { ResourceQuotasStore } from "../../renderer/components/+config-resource-quotas/resource-quotas.store";
|
export type { ResourceQuotasStore } from "@renderer/components/+config-resource-quotas/resource-quotas.store";
|
||||||
export type { LimitRangesStore } from "../../renderer/components/+config-limit-ranges/limit-ranges.store";
|
export type { LimitRangesStore } from "@renderer/components/+config-limit-ranges/limit-ranges.store";
|
||||||
export type { HPAStore } from "../../renderer/components/+config-autoscalers/hpa.store";
|
export type { HPAStore } from "@renderer/components/+config-autoscalers/hpa.store";
|
||||||
export type { PodDisruptionBudgetsStore } from "../../renderer/components/+config-pod-disruption-budgets/pod-disruption-budgets.store";
|
export type { PodDisruptionBudgetsStore } from "@renderer/components/+config-pod-disruption-budgets/pod-disruption-budgets.store";
|
||||||
export type { ServiceStore } from "../../renderer/components/+network-services/services.store";
|
export type { ServiceStore } from "@renderer/components/+network-services/services.store";
|
||||||
export type { EndpointStore } from "../../renderer/components/+network-endpoints/endpoints.store";
|
export type { EndpointStore } from "@renderer/components/+network-endpoints/endpoints.store";
|
||||||
export type { IngressStore } from "../../renderer/components/+network-ingresses/ingress.store";
|
export type { IngressStore } from "@renderer/components/+network-ingresses/ingress.store";
|
||||||
export type { NetworkPolicyStore } from "../../renderer/components/+network-policies/network-policy.store";
|
export type { NetworkPolicyStore } from "@renderer/components/+network-policies/network-policy.store";
|
||||||
export type { PersistentVolumesStore } from "../../renderer/components/+storage-volumes/volumes.store";
|
export type { PersistentVolumesStore } from "@renderer/components/+storage-volumes/volumes.store";
|
||||||
export type { VolumeClaimStore } from "../../renderer/components/+storage-volume-claims/volume-claim.store";
|
export type { VolumeClaimStore } from "@renderer/components/+storage-volume-claims/volume-claim.store";
|
||||||
export type { StorageClassStore } from "../../renderer/components/+storage-classes/storage-class.store";
|
export type { StorageClassStore } from "@renderer/components/+storage-classes/storage-class.store";
|
||||||
export type { NamespaceStore } from "../../renderer/components/+namespaces/namespace.store";
|
export type { NamespaceStore } from "@renderer/components/+namespaces/namespace.store";
|
||||||
export type { ServiceAccountsStore } from "../../renderer/components/+user-management-service-accounts/service-accounts.store";
|
export type { ServiceAccountsStore } from "@renderer/components/+user-management-service-accounts/service-accounts.store";
|
||||||
export type { RolesStore } from "../../renderer/components/+user-management-roles/roles.store";
|
export type { RolesStore } from "@renderer/components/+user-management-roles/roles.store";
|
||||||
export type { RoleBindingsStore } from "../../renderer/components/+user-management-roles-bindings/role-bindings.store";
|
export type { RoleBindingsStore } from "@renderer/components/+user-management-roles-bindings/role-bindings.store";
|
||||||
export type { CRDStore } from "../../renderer/components/+custom-resources/crd.store";
|
export type { CRDStore } from "@renderer/components/+custom-resources/crd.store";
|
||||||
export type { CRDResourceStore } from "../../renderer/components/+custom-resources/crd-resource.store";
|
export type { CRDResourceStore } from "@renderer/components/+custom-resources/crd-resource.store";
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
import { PageParam, PageParamInit } from "../../renderer/navigation/page-param";
|
import { PageParam, PageParamInit } from "@renderer/navigation/page-param";
|
||||||
import { navigation } from "../../renderer/navigation";
|
import { navigation } 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-object/kube-object-details";
|
||||||
export { IURLParams } from "../../common/utils/buildUrl";
|
export { IURLParams } from "@common/utils/buildUrl";
|
||||||
|
|
||||||
// exporting to extensions-api version of helper without `isSystem` flag
|
// exporting to extensions-api version of helper without `isSystem` flag
|
||||||
export function createPageParam<V = string>(init: PageParamInit<V>) {
|
export function createPageParam<V = string>(init: PageParamInit<V>) {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { themeStore } from "../../renderer/theme.store";
|
import { themeStore } from "@renderer/theme.store";
|
||||||
|
|
||||||
export function getActiveTheme() {
|
export function getActiveTheme() {
|
||||||
return themeStore.activeTheme;
|
return themeStore.activeTheme;
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
import { clusterStore as internalClusterStore, ClusterId } from "../../common/cluster-store";
|
import { clusterStore as internalClusterStore, ClusterId } from "@common/cluster-store";
|
||||||
import type { ClusterModel } from "../../common/cluster-store";
|
import type { ClusterModel } from "@common/cluster-store";
|
||||||
import { Cluster } from "../../main/cluster";
|
import { Cluster } from "@main/cluster";
|
||||||
import { Singleton } from "../core-api/utils";
|
import { Singleton } from "../core-api/utils";
|
||||||
import { ObservableMap } from "mobx";
|
import { ObservableMap } from "mobx";
|
||||||
|
|
||||||
export { Cluster } from "../../main/cluster";
|
export { Cluster } from "@main/cluster";
|
||||||
export type { ClusterModel, ClusterId } from "../../common/cluster-store";
|
export type { ClusterModel, ClusterId } from "@common/cluster-store";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store for all added clusters
|
* Store for all added clusters
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import { Singleton } from "../core-api/utils";
|
import { Singleton } from "../core-api/utils";
|
||||||
import { workspaceStore as internalWorkspaceStore, WorkspaceStore as InternalWorkspaceStore, Workspace, WorkspaceId } from "../../common/workspace-store";
|
import { workspaceStore as internalWorkspaceStore, WorkspaceStore as InternalWorkspaceStore, Workspace, WorkspaceId } from "@common/workspace-store";
|
||||||
import { ObservableMap } from "mobx";
|
import { ObservableMap } from "mobx";
|
||||||
|
|
||||||
export { Workspace } from "../../common/workspace-store";
|
export { Workspace } from "@common/workspace-store";
|
||||||
export type { WorkspaceId, WorkspaceModel } from "../../common/workspace-store";
|
export type { WorkspaceId, WorkspaceModel } from "@common/workspace-store";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stores all workspaces
|
* Stores all workspaces
|
||||||
|
|||||||
@ -24,19 +24,19 @@ jest.mock("winston", () => ({
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
||||||
jest.mock("../../common/ipc");
|
jest.mock("@common/ipc");
|
||||||
jest.mock("../context-handler");
|
jest.mock("../context-handler");
|
||||||
jest.mock("request");
|
jest.mock("request");
|
||||||
jest.mock("request-promise-native");
|
jest.mock("request-promise-native");
|
||||||
|
|
||||||
import { Console } from "console";
|
import { Console } from "console";
|
||||||
import mockFs from "mock-fs";
|
import mockFs from "mock-fs";
|
||||||
import { workspaceStore } from "../../common/workspace-store";
|
import { workspaceStore } from "@common/workspace-store";
|
||||||
import { Cluster } from "../cluster";
|
import { Cluster } from "../cluster";
|
||||||
import { ContextHandler } from "../context-handler";
|
import { ContextHandler } from "../context-handler";
|
||||||
import { getFreePort } from "../port";
|
import { getFreePort } from "../port";
|
||||||
import { V1ResourceAttributes } from "@kubernetes/client-node";
|
import { V1ResourceAttributes } from "@kubernetes/client-node";
|
||||||
import { apiResources } from "../../common/rbac";
|
import { apiResources } from "@common/rbac";
|
||||||
import request from "request-promise-native";
|
import request from "request-promise-native";
|
||||||
import { Kubectl } from "../kubectl";
|
import { Kubectl } from "../kubectl";
|
||||||
|
|
||||||
|
|||||||
@ -23,14 +23,14 @@ jest.mock("winston", () => ({
|
|||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
jest.mock("../../common/ipc");
|
jest.mock("@common/ipc");
|
||||||
jest.mock("child_process");
|
jest.mock("child_process");
|
||||||
jest.mock("tcp-port-used");
|
jest.mock("tcp-port-used");
|
||||||
|
|
||||||
import { Cluster } from "../cluster";
|
import { Cluster } from "../cluster";
|
||||||
import { KubeAuthProxy } from "../kube-auth-proxy";
|
import { KubeAuthProxy } from "../kube-auth-proxy";
|
||||||
import { getFreePort } from "../port";
|
import { getFreePort } from "../port";
|
||||||
import { broadcastMessage } from "../../common/ipc";
|
import { broadcastMessage } from "@common/ipc";
|
||||||
import { ChildProcess, spawn } from "child_process";
|
import { ChildProcess, spawn } from "child_process";
|
||||||
import { bundledKubectlPath, Kubectl } from "../kubectl";
|
import { bundledKubectlPath, Kubectl } from "../kubectl";
|
||||||
import { mock, MockProxy } from "jest-mock-extended";
|
import { mock, MockProxy } from "jest-mock-extended";
|
||||||
|
|||||||
@ -26,7 +26,7 @@ jest.mock("winston", () => ({
|
|||||||
import { KubeconfigManager } from "../kubeconfig-manager";
|
import { KubeconfigManager } from "../kubeconfig-manager";
|
||||||
import mockFs from "mock-fs";
|
import mockFs from "mock-fs";
|
||||||
import { Cluster } from "../cluster";
|
import { Cluster } from "../cluster";
|
||||||
import { workspaceStore } from "../../common/workspace-store";
|
import { workspaceStore } from "@common/workspace-store";
|
||||||
import { ContextHandler } from "../context-handler";
|
import { ContextHandler } from "../context-handler";
|
||||||
import { getFreePort } from "../port";
|
import { getFreePort } from "../port";
|
||||||
import fse from "fs-extra";
|
import fse from "fs-extra";
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { observable } from "mobx";
|
import { observable } from "mobx";
|
||||||
import { ClusterMetadata } from "../../common/cluster-store";
|
import { ClusterMetadata } from "@common/cluster-store";
|
||||||
import { Cluster } from "../cluster";
|
import { Cluster } from "../cluster";
|
||||||
import { BaseClusterDetector, ClusterDetectionResult } from "./base-cluster-detector";
|
import { BaseClusterDetector, ClusterDetectionResult } from "./base-cluster-detector";
|
||||||
import { ClusterIdDetector } from "./cluster-id-detector";
|
import { ClusterIdDetector } from "./cluster-id-detector";
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
import "../common/cluster-ipc";
|
import "@common/cluster-ipc";
|
||||||
import type http from "http";
|
import type http from "http";
|
||||||
import { ipcMain } from "electron";
|
import { ipcMain } from "electron";
|
||||||
import { autorun } from "mobx";
|
import { autorun } from "mobx";
|
||||||
import { clusterStore, getClusterIdFromHost } from "../common/cluster-store";
|
import { clusterStore, getClusterIdFromHost } from "@common/cluster-store";
|
||||||
import { Cluster } from "./cluster";
|
import { Cluster } from "./cluster";
|
||||||
import logger from "./logger";
|
import logger from "./logger";
|
||||||
import { apiKubePrefix } from "../common/vars";
|
import { apiKubePrefix } from "@common/vars";
|
||||||
import { Singleton } from "../common/utils";
|
import { Singleton } from "@common/utils";
|
||||||
|
|
||||||
export class ClusterManager extends Singleton {
|
export class ClusterManager extends Singleton {
|
||||||
constructor(public readonly port: number) {
|
constructor(public readonly port: number) {
|
||||||
|
|||||||
@ -1,17 +1,17 @@
|
|||||||
import { ipcMain } from "electron";
|
import { ipcMain } from "electron";
|
||||||
import type { ClusterId, ClusterMetadata, ClusterModel, ClusterPreferences, ClusterPrometheusPreferences } from "../common/cluster-store";
|
import type { ClusterId, ClusterMetadata, ClusterModel, ClusterPreferences, ClusterPrometheusPreferences } from "@common/cluster-store";
|
||||||
import type { IMetricsReqParams } from "../renderer/api/endpoints/metrics.api";
|
import type { IMetricsReqParams } from "@renderer/api/endpoints/metrics.api";
|
||||||
import type { WorkspaceId } from "../common/workspace-store";
|
import type { WorkspaceId } from "@common/workspace-store";
|
||||||
import { action, comparer, computed, observable, reaction, toJS, when } from "mobx";
|
import { action, comparer, computed, observable, reaction, toJS, when } from "mobx";
|
||||||
import { apiKubePrefix } from "../common/vars";
|
import { apiKubePrefix } from "@common/vars";
|
||||||
import { broadcastMessage } from "../common/ipc";
|
import { broadcastMessage } from "@common/ipc";
|
||||||
import { ContextHandler } from "./context-handler";
|
import { ContextHandler } from "./context-handler";
|
||||||
import { AuthorizationV1Api, CoreV1Api, KubeConfig, V1ResourceAttributes } from "@kubernetes/client-node";
|
import { AuthorizationV1Api, CoreV1Api, KubeConfig, V1ResourceAttributes } from "@kubernetes/client-node";
|
||||||
import { Kubectl } from "./kubectl";
|
import { Kubectl } from "./kubectl";
|
||||||
import { KubeconfigManager } from "./kubeconfig-manager";
|
import { KubeconfigManager } from "./kubeconfig-manager";
|
||||||
import { loadConfig } from "../common/kube-helpers";
|
import { loadConfig } from "@common/kube-helpers";
|
||||||
import request, { RequestPromiseOptions } from "request-promise-native";
|
import request, { RequestPromiseOptions } from "request-promise-native";
|
||||||
import { apiResources, KubeApiResource } from "../common/rbac";
|
import { apiResources, KubeApiResource } from "@common/rbac";
|
||||||
import logger from "./logger";
|
import logger from "./logger";
|
||||||
import { VersionDetector } from "./cluster-detectors/version-detector";
|
import { VersionDetector } from "./cluster-detectors/version-detector";
|
||||||
import { detectorRegistry } from "./cluster-detectors/detector-registry";
|
import { detectorRegistry } from "./cluster-detectors/detector-registry";
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
import type { PrometheusProvider, PrometheusService } from "./prometheus/provider-registry";
|
import type { PrometheusProvider, PrometheusService } from "./prometheus/provider-registry";
|
||||||
import type { ClusterPrometheusPreferences } from "../common/cluster-store";
|
import type { ClusterPrometheusPreferences } from "@common/cluster-store";
|
||||||
import type { Cluster } from "./cluster";
|
import type { Cluster } from "./cluster";
|
||||||
import type httpProxy from "http-proxy";
|
import type httpProxy from "http-proxy";
|
||||||
import url, { UrlWithStringQuery } from "url";
|
import url, { UrlWithStringQuery } from "url";
|
||||||
import { CoreV1Api } from "@kubernetes/client-node";
|
import { CoreV1Api } from "@kubernetes/client-node";
|
||||||
import { prometheusProviders } from "../common/prometheus-providers";
|
import { prometheusProviders } from "@common/prometheus-providers";
|
||||||
import logger from "./logger";
|
import logger from "./logger";
|
||||||
import { getFreePort } from "./port";
|
import { getFreePort } from "./port";
|
||||||
import { KubeAuthProxy } from "./kube-auth-proxy";
|
import { KubeAuthProxy } from "./kube-auth-proxy";
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { app } from "electron";
|
import { app } from "electron";
|
||||||
import { WindowManager } from "./window-manager";
|
import { WindowManager } from "./window-manager";
|
||||||
import { appEventBus } from "../common/event-bus";
|
import { appEventBus } from "@common/event-bus";
|
||||||
import { ClusterManager } from "./cluster-manager";
|
import { ClusterManager } from "./cluster-manager";
|
||||||
import logger from "./logger";
|
import logger from "./logger";
|
||||||
|
|
||||||
|
|||||||
@ -4,8 +4,8 @@ import { app, remote } from "electron";
|
|||||||
import fse from "fs-extra";
|
import fse from "fs-extra";
|
||||||
import { action, observable, toJS } from "mobx";
|
import { action, observable, toJS } from "mobx";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { BaseStore } from "../common/base-store";
|
import { BaseStore } from "@common/base-store";
|
||||||
import { LensExtensionId } from "../extensions/lens-extension";
|
import { LensExtensionId } from "@extensions/lens-extension";
|
||||||
|
|
||||||
interface FSProvisionModel {
|
interface FSProvisionModel {
|
||||||
extensions: Record<string, string>; // extension names to paths
|
extensions: Record<string, string>; // extension names to paths
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import packageInfo from "../../../package.json";
|
import packageInfo from "../../../package.json";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { LensBinary, LensBinaryOpts } from "../lens-binary";
|
import { LensBinary, LensBinaryOpts } from "../lens-binary";
|
||||||
import { isProduction } from "../../common/vars";
|
import { isProduction } from "@common/vars";
|
||||||
|
|
||||||
export class HelmCli extends LensBinary {
|
export class HelmCli extends LensBinary {
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import * as yaml from "js-yaml";
|
|||||||
import { promiseExec} from "../promise-exec";
|
import { promiseExec} from "../promise-exec";
|
||||||
import { helmCli } from "./helm-cli";
|
import { helmCli } from "./helm-cli";
|
||||||
import { Cluster } from "../cluster";
|
import { Cluster } from "../cluster";
|
||||||
import { toCamelCase } from "../../common/utils/camelCase";
|
import { toCamelCase } from "@common/utils/camelCase";
|
||||||
|
|
||||||
export class HelmReleaseManager {
|
export class HelmReleaseManager {
|
||||||
|
|
||||||
|
|||||||
@ -2,8 +2,8 @@ import yaml from "js-yaml";
|
|||||||
import { readFile } from "fs-extra";
|
import { readFile } from "fs-extra";
|
||||||
import { promiseExec } from "../promise-exec";
|
import { promiseExec } from "../promise-exec";
|
||||||
import { helmCli } from "./helm-cli";
|
import { helmCli } from "./helm-cli";
|
||||||
import { Singleton } from "../../common/utils/singleton";
|
import { Singleton } from "@common/utils/singleton";
|
||||||
import { customRequestPromise } from "../../common/request";
|
import { customRequestPromise } from "@common/request";
|
||||||
import orderBy from "lodash/orderBy";
|
import orderBy from "lodash/orderBy";
|
||||||
import logger from "../logger";
|
import logger from "../logger";
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
// Main process
|
// Main process
|
||||||
|
|
||||||
import "../common/system-ca";
|
import "@common/system-ca";
|
||||||
import "../common/prometheus-providers";
|
import "@common/prometheus-providers";
|
||||||
import * as Mobx from "mobx";
|
import * as Mobx from "mobx";
|
||||||
import * as LensExtensions from "../extensions/core-api";
|
import * as LensExtensions from "@extensions/core-api";
|
||||||
import { app, dialog, powerMonitor } from "electron";
|
import { app, dialog, powerMonitor } from "electron";
|
||||||
import { appName } from "../common/vars";
|
import { appName } from "@common/vars";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { LensProxy } from "./lens-proxy";
|
import { LensProxy } from "./lens-proxy";
|
||||||
import { WindowManager } from "./window-manager";
|
import { WindowManager } from "./window-manager";
|
||||||
@ -14,16 +14,16 @@ import { AppUpdater } from "./app-updater";
|
|||||||
import { shellSync } from "./shell-sync";
|
import { shellSync } from "./shell-sync";
|
||||||
import { getFreePort } from "./port";
|
import { getFreePort } from "./port";
|
||||||
import { mangleProxyEnv } from "./proxy-env";
|
import { mangleProxyEnv } from "./proxy-env";
|
||||||
import { registerFileProtocol } from "../common/register-protocol";
|
import { registerFileProtocol } from "@common/register-protocol";
|
||||||
import logger from "./logger";
|
import logger from "./logger";
|
||||||
import { clusterStore } from "../common/cluster-store";
|
import { clusterStore } from "@common/cluster-store";
|
||||||
import { userStore } from "../common/user-store";
|
import { userStore } from "@common/user-store";
|
||||||
import { workspaceStore } from "../common/workspace-store";
|
import { workspaceStore } from "@common/workspace-store";
|
||||||
import { appEventBus } from "../common/event-bus";
|
import { appEventBus } from "@common/event-bus";
|
||||||
import { extensionLoader } from "../extensions/extension-loader";
|
import { extensionLoader } from "@extensions/extension-loader";
|
||||||
import { extensionsStore } from "../extensions/extensions-store";
|
import { extensionsStore } from "@extensions/extensions-store";
|
||||||
import { InstalledExtension, extensionDiscovery } from "../extensions/extension-discovery";
|
import { InstalledExtension, extensionDiscovery } from "@extensions/extension-discovery";
|
||||||
import type { LensExtensionId } from "../extensions/lens-extension";
|
import type { LensExtensionId } from "@extensions/lens-extension";
|
||||||
import { installDeveloperTools } from "./developer-tools";
|
import { installDeveloperTools } from "./developer-tools";
|
||||||
import { filesystemProvisionerStore } from "./extension-filesystem";
|
import { filesystemProvisionerStore } from "./extension-filesystem";
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { ChildProcess, spawn } from "child_process";
|
import { ChildProcess, spawn } from "child_process";
|
||||||
import { waitUntilUsed } from "tcp-port-used";
|
import { waitUntilUsed } from "tcp-port-used";
|
||||||
import { broadcastMessage } from "../common/ipc";
|
import { broadcastMessage } from "@common/ipc";
|
||||||
import type { Cluster } from "./cluster";
|
import type { Cluster } from "./cluster";
|
||||||
import { Kubectl } from "./kubectl";
|
import { Kubectl } from "./kubectl";
|
||||||
import logger from "./logger";
|
import logger from "./logger";
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import type { ContextHandler } from "./context-handler";
|
|||||||
import { app } from "electron";
|
import { app } from "electron";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import fs from "fs-extra";
|
import fs from "fs-extra";
|
||||||
import { dumpConfigYaml, loadConfig } from "../common/kube-helpers";
|
import { dumpConfigYaml, loadConfig } from "@common/kube-helpers";
|
||||||
import logger from "./logger";
|
import logger from "./logger";
|
||||||
|
|
||||||
export class KubeconfigManager {
|
export class KubeconfigManager {
|
||||||
|
|||||||
@ -6,10 +6,10 @@ import logger from "./logger";
|
|||||||
import { ensureDir, pathExists } from "fs-extra";
|
import { ensureDir, pathExists } from "fs-extra";
|
||||||
import * as lockFile from "proper-lockfile";
|
import * as lockFile from "proper-lockfile";
|
||||||
import { helmCli } from "./helm/helm-cli";
|
import { helmCli } from "./helm/helm-cli";
|
||||||
import { userStore } from "../common/user-store";
|
import { userStore } from "@common/user-store";
|
||||||
import { customRequest } from "../common/request";
|
import { customRequest } from "@common/request";
|
||||||
import { getBundledKubectlVersion } from "../common/utils/app-version";
|
import { getBundledKubectlVersion } from "@common/utils/app-version";
|
||||||
import { isDevelopment, isWindows, isTestEnv } from "../common/vars";
|
import { isDevelopment, isWindows, isTestEnv } from "@common/vars";
|
||||||
|
|
||||||
const bundledVersion = getBundledKubectlVersion();
|
const bundledVersion = getBundledKubectlVersion();
|
||||||
const kubectlMap: Map<string, string> = new Map([
|
const kubectlMap: Map<string, string> = new Map([
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import packageInfo from "../../package.json";
|
import packageInfo from "../../package.json";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { Kubectl } from "../../src/main/kubectl";
|
import { Kubectl } from "../../src/main/kubectl";
|
||||||
import { isWindows } from "../common/vars";
|
import { isWindows } from "@common/vars";
|
||||||
|
|
||||||
jest.mock("../common/user-store");
|
jest.mock("@common/user-store");
|
||||||
|
|
||||||
describe("kubectlVersion", () => {
|
describe("kubectlVersion", () => {
|
||||||
it("returns bundled version if exactly same version used", async () => {
|
it("returns bundled version if exactly same version used", async () => {
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import fs from "fs";
|
|||||||
import request from "request";
|
import request from "request";
|
||||||
import { ensureDir, pathExists } from "fs-extra";
|
import { ensureDir, pathExists } from "fs-extra";
|
||||||
import * as tar from "tar";
|
import * as tar from "tar";
|
||||||
import { isWindows } from "../common/vars";
|
import { isWindows } from "@common/vars";
|
||||||
import winston from "winston";
|
import winston from "winston";
|
||||||
|
|
||||||
export type LensBinaryOpts = {
|
export type LensBinaryOpts = {
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import spdy from "spdy";
|
|||||||
import httpProxy from "http-proxy";
|
import httpProxy from "http-proxy";
|
||||||
import url from "url";
|
import url from "url";
|
||||||
import * as WebSocket from "ws";
|
import * as WebSocket from "ws";
|
||||||
import { apiPrefix, apiKubePrefix } from "../common/vars";
|
import { apiPrefix, apiKubePrefix } from "@common/vars";
|
||||||
import { openShell } from "./node-shell-session";
|
import { openShell } from "./node-shell-session";
|
||||||
import { Router } from "./router";
|
import { Router } from "./router";
|
||||||
import { ClusterManager } from "./cluster-manager";
|
import { ClusterManager } from "./cluster-manager";
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { app, remote } from "electron";
|
import { app, remote } from "electron";
|
||||||
import winston from "winston";
|
import winston from "winston";
|
||||||
import { isDebugging } from "../common/vars";
|
import { isDebugging } from "@common/vars";
|
||||||
|
|
||||||
const logLevel = process.env.LOG_LEVEL ? process.env.LOG_LEVEL : isDebugging ? "debug" : "info";
|
const logLevel = process.env.LOG_LEVEL ? process.env.LOG_LEVEL : isDebugging ? "debug" : "info";
|
||||||
const consoleOptions: winston.transports.ConsoleTransportOptions = {
|
const consoleOptions: winston.transports.ConsoleTransportOptions = {
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
import { app, BrowserWindow, dialog, ipcMain, IpcMainEvent, Menu, MenuItem, MenuItemConstructorOptions, webContents, shell } from "electron";
|
import { app, BrowserWindow, dialog, ipcMain, IpcMainEvent, Menu, MenuItem, MenuItemConstructorOptions, webContents, shell } from "electron";
|
||||||
import { autorun } from "mobx";
|
import { autorun } from "mobx";
|
||||||
import { WindowManager } from "./window-manager";
|
import { WindowManager } from "./window-manager";
|
||||||
import { appName, isMac, isWindows, isTestEnv, docsUrl, supportUrl } from "../common/vars";
|
import { appName, isMac, isWindows, isTestEnv, docsUrl, supportUrl } from "@common/vars";
|
||||||
import { addClusterURL } from "../renderer/components/+add-cluster/add-cluster.route";
|
import { addClusterURL } from "@renderer/components/+add-cluster/add-cluster.route";
|
||||||
import { preferencesURL } from "../renderer/components/+preferences/preferences.route";
|
import { preferencesURL } from "@renderer/components/+preferences/preferences.route";
|
||||||
import { whatsNewURL } from "../renderer/components/+whats-new/whats-new.route";
|
import { whatsNewURL } from "@renderer/components/+whats-new/whats-new.route";
|
||||||
import { clusterSettingsURL } from "../renderer/components/+cluster-settings/cluster-settings.route";
|
import { clusterSettingsURL } from "@renderer/components/+cluster-settings/cluster-settings.route";
|
||||||
import { extensionsURL } from "../renderer/components/+extensions/extensions.route";
|
import { extensionsURL } from "@renderer/components/+extensions/extensions.route";
|
||||||
import { menuRegistry } from "../extensions/registries/menu-registry";
|
import { menuRegistry } from "@extensions/registries/menu-registry";
|
||||||
import logger from "./logger";
|
import logger from "./logger";
|
||||||
import { exitApp } from "./exit-app";
|
import { exitApp } from "./exit-app";
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import * as k8s from "@kubernetes/client-node";
|
|||||||
import { KubeConfig } from "@kubernetes/client-node";
|
import { KubeConfig } from "@kubernetes/client-node";
|
||||||
import { Cluster } from "./cluster";
|
import { Cluster } from "./cluster";
|
||||||
import logger from "./logger";
|
import logger from "./logger";
|
||||||
import { appEventBus } from "../common/event-bus";
|
import { appEventBus } from "@common/event-bus";
|
||||||
|
|
||||||
export class NodeShellSession extends ShellSession {
|
export class NodeShellSession extends ShellSession {
|
||||||
protected nodeName: string;
|
protected nodeName: string;
|
||||||
|
|||||||
@ -6,8 +6,8 @@ import * as yaml from "js-yaml";
|
|||||||
import path from "path";
|
import path from "path";
|
||||||
import * as tempy from "tempy";
|
import * as tempy from "tempy";
|
||||||
import logger from "./logger";
|
import logger from "./logger";
|
||||||
import { appEventBus } from "../common/event-bus";
|
import { appEventBus } from "@common/event-bus";
|
||||||
import { cloneJsonObject } from "../common/utils";
|
import { cloneJsonObject } from "@common/utils";
|
||||||
|
|
||||||
export class ResourceApplier {
|
export class ResourceApplier {
|
||||||
constructor(protected cluster: Cluster) {
|
constructor(protected cluster: Cluster) {
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import http from "http";
|
|||||||
import path from "path";
|
import path from "path";
|
||||||
import { readFile } from "fs-extra";
|
import { readFile } from "fs-extra";
|
||||||
import { Cluster } from "./cluster";
|
import { Cluster } from "./cluster";
|
||||||
import { apiPrefix, appName, publicPath, isDevelopment, webpackDevServerPort } from "../common/vars";
|
import { apiPrefix, appName, publicPath, isDevelopment, webpackDevServerPort } from "@common/vars";
|
||||||
import { helmRoute, kubeconfigRoute, metricsRoute, portForwardRoute, resourceApplierRoute, watchRoute } from "./routes";
|
import { helmRoute, kubeconfigRoute, metricsRoute, portForwardRoute, resourceApplierRoute, watchRoute } from "./routes";
|
||||||
import logger from "./logger";
|
import logger from "./logger";
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import _ from "lodash";
|
|||||||
import { LensApiRequest } from "../router";
|
import { LensApiRequest } from "../router";
|
||||||
import { LensApi } from "../lens-api";
|
import { LensApi } from "../lens-api";
|
||||||
import { Cluster, ClusterMetadataKey } from "../cluster";
|
import { Cluster, ClusterMetadataKey } from "../cluster";
|
||||||
import { ClusterPrometheusMetadata } from "../../common/cluster-store";
|
import { ClusterPrometheusMetadata } from "@common/cluster-store";
|
||||||
import logger from "../logger";
|
import logger from "../logger";
|
||||||
|
|
||||||
export type IMetricsQuery = string | string[] | {
|
export type IMetricsQuery = string | string[] | {
|
||||||
|
|||||||
@ -6,11 +6,11 @@ import shellEnv from "shell-env";
|
|||||||
import { app } from "electron";
|
import { app } from "electron";
|
||||||
import { Kubectl } from "./kubectl";
|
import { Kubectl } from "./kubectl";
|
||||||
import { Cluster } from "./cluster";
|
import { Cluster } from "./cluster";
|
||||||
import { ClusterPreferences } from "../common/cluster-store";
|
import { ClusterPreferences } from "@common/cluster-store";
|
||||||
import { helmCli } from "./helm/helm-cli";
|
import { helmCli } from "./helm/helm-cli";
|
||||||
import { isWindows } from "../common/vars";
|
import { isWindows } from "@common/vars";
|
||||||
import { appEventBus } from "../common/event-bus";
|
import { appEventBus } from "@common/event-bus";
|
||||||
import { userStore } from "../common/user-store";
|
import { userStore } from "@common/user-store";
|
||||||
|
|
||||||
export class ShellSession extends EventEmitter {
|
export class ShellSession extends EventEmitter {
|
||||||
static shellEnvs: Map<string, any> = new Map();
|
static shellEnvs: Map<string, any> = new Map();
|
||||||
|
|||||||
@ -5,12 +5,12 @@ import { autorun } from "mobx";
|
|||||||
import { showAbout } from "./menu";
|
import { showAbout } from "./menu";
|
||||||
import { AppUpdater } from "./app-updater";
|
import { AppUpdater } from "./app-updater";
|
||||||
import { WindowManager } from "./window-manager";
|
import { WindowManager } from "./window-manager";
|
||||||
import { clusterStore } from "../common/cluster-store";
|
import { clusterStore } from "@common/cluster-store";
|
||||||
import { workspaceStore } from "../common/workspace-store";
|
import { workspaceStore } from "@common/workspace-store";
|
||||||
import { preferencesURL } from "../renderer/components/+preferences/preferences.route";
|
import { preferencesURL } from "@renderer/components/+preferences/preferences.route";
|
||||||
import { clusterViewURL } from "../renderer/components/cluster-manager/cluster-view.route";
|
import { clusterViewURL } from "@renderer/components/cluster-manager/cluster-view.route";
|
||||||
import logger from "./logger";
|
import logger from "./logger";
|
||||||
import { isDevelopment, isWindows } from "../common/vars";
|
import { isDevelopment, isWindows } from "@common/vars";
|
||||||
import { exitApp } from "./exit-app";
|
import { exitApp } from "./exit-app";
|
||||||
|
|
||||||
// note: instance of Tray should be saved somewhere, otherwise it disappears
|
// note: instance of Tray should be saved somewhere, otherwise it disappears
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
import type { ClusterId } from "../common/cluster-store";
|
import type { ClusterId } from "@common/cluster-store";
|
||||||
import { observable } from "mobx";
|
import { observable } from "mobx";
|
||||||
import { app, BrowserWindow, dialog, shell, webContents } from "electron";
|
import { app, BrowserWindow, dialog, shell, webContents } from "electron";
|
||||||
import windowStateKeeper from "electron-window-state";
|
import windowStateKeeper from "electron-window-state";
|
||||||
import { appEventBus } from "../common/event-bus";
|
import { appEventBus } from "@common/event-bus";
|
||||||
import { subscribeToBroadcast } from "../common/ipc";
|
import { subscribeToBroadcast } from "@common/ipc";
|
||||||
import { initMenu } from "./menu";
|
import { initMenu } from "./menu";
|
||||||
import { initTray } from "./tray";
|
import { initTray } from "./tray";
|
||||||
import { Singleton } from "../common/utils";
|
import { Singleton } from "@common/utils";
|
||||||
import { ClusterFrameInfo, clusterFrameMap } from "../common/cluster-frames";
|
import { ClusterFrameInfo, clusterFrameMap } from "@common/cluster-frames";
|
||||||
|
|
||||||
export class WindowManager extends Singleton {
|
export class WindowManager extends Singleton {
|
||||||
protected mainWindow: BrowserWindow;
|
protected mainWindow: BrowserWindow;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import { apiBase } from "../index";
|
import { apiBase } from "../index";
|
||||||
import type { IMetricsQuery } from "../../../main/routes/metrics-route";
|
import type { IMetricsQuery } from "@main/routes/metrics-route";
|
||||||
|
|
||||||
export interface IMetrics {
|
export interface IMetrics {
|
||||||
status: string;
|
status: string;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { JsonApi, JsonApiErrorParsed } from "./json-api";
|
import { JsonApi, JsonApiErrorParsed } from "./json-api";
|
||||||
import { KubeJsonApi } from "./kube-json-api";
|
import { KubeJsonApi } from "./kube-json-api";
|
||||||
import { Notifications } from "../components/notifications";
|
import { Notifications } from "../components/notifications";
|
||||||
import { apiKubePrefix, apiPrefix, isDevelopment } from "../../common/vars";
|
import { apiKubePrefix, apiPrefix, isDevelopment } from "@common/vars";
|
||||||
|
|
||||||
export const apiBase = new JsonApi({
|
export const apiBase = new JsonApi({
|
||||||
apiBase: apiPrefix,
|
apiBase: apiPrefix,
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// Base http-service / json-api class
|
// Base http-service / json-api class
|
||||||
|
|
||||||
import { stringify } from "querystring";
|
import { stringify } from "querystring";
|
||||||
import { EventEmitter } from "../../common/event-emitter";
|
import { EventEmitter } from "@common/event-emitter";
|
||||||
import { cancelableFetch } from "../utils/cancelableFetch";
|
import { cancelableFetch } from "../utils/cancelableFetch";
|
||||||
|
|
||||||
export interface JsonApiData {
|
export interface JsonApiData {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// Parse kube-api path and get api-version, group, etc.
|
// Parse kube-api path and get api-version, group, etc.
|
||||||
|
|
||||||
import type { KubeObject } from "./kube-object";
|
import type { KubeObject } from "./kube-object";
|
||||||
import { splitArray } from "../../common/utils";
|
import { splitArray } from "@common/utils";
|
||||||
import { apiManager } from "./api-manager";
|
import { apiManager } from "./api-manager";
|
||||||
|
|
||||||
export interface IKubeObjectRef {
|
export interface IKubeObjectRef {
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
import merge from "lodash/merge";
|
import merge from "lodash/merge";
|
||||||
import { stringify } from "querystring";
|
import { stringify } from "querystring";
|
||||||
import { apiKubePrefix, isDevelopment, isTestEnv } from "../../common/vars";
|
import { apiKubePrefix, isDevelopment, isTestEnv } from "@common/vars";
|
||||||
import logger from "../../main/logger";
|
import logger from "@main/logger";
|
||||||
import { apiManager } from "./api-manager";
|
import { apiManager } from "./api-manager";
|
||||||
import { apiKube } from "./index";
|
import { apiKube } from "./index";
|
||||||
import { createKubeApiURL, parseKubeApi } from "./kube-api-parse";
|
import { createKubeApiURL, parseKubeApi } from "./kube-api-parse";
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
export { kubeObjectDetailRegistry } from "../../extensions/registries/kube-object-detail-registry";
|
export { kubeObjectDetailRegistry } from "@extensions/registries/kube-object-detail-registry";
|
||||||
|
|||||||
@ -7,8 +7,8 @@ import { KubeJsonApiData } from "./kube-json-api";
|
|||||||
import type { KubeObjectStore } from "../kube-object.store";
|
import type { KubeObjectStore } from "../kube-object.store";
|
||||||
import { ensureObjectSelfLink, KubeApi } from "./kube-api";
|
import { ensureObjectSelfLink, KubeApi } from "./kube-api";
|
||||||
import { apiManager } from "./api-manager";
|
import { apiManager } from "./api-manager";
|
||||||
import { apiPrefix, isDevelopment } from "../../common/vars";
|
import { apiPrefix, isDevelopment } from "@common/vars";
|
||||||
import { getHostedCluster } from "../../common/cluster-store";
|
import { getHostedCluster } from "@common/cluster-store";
|
||||||
|
|
||||||
export interface IKubeWatchEvent<T = any> {
|
export interface IKubeWatchEvent<T = any> {
|
||||||
type: "ADDED" | "MODIFIED" | "DELETED";
|
type: "ADDED" | "MODIFIED" | "DELETED";
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { stringify } from "querystring";
|
|||||||
import { autobind, base64, EventEmitter } from "../utils";
|
import { autobind, base64, EventEmitter } from "../utils";
|
||||||
import { WebSocketApi } from "./websocket-api";
|
import { WebSocketApi } from "./websocket-api";
|
||||||
import isEqual from "lodash/isEqual";
|
import isEqual from "lodash/isEqual";
|
||||||
import { isDevelopment } from "../../common/vars";
|
import { isDevelopment } from "@common/vars";
|
||||||
|
|
||||||
export enum TerminalChannels {
|
export enum TerminalChannels {
|
||||||
STDIN = 0,
|
STDIN = 0,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { observable } from "mobx";
|
import { observable } from "mobx";
|
||||||
import { EventEmitter } from "../../common/event-emitter";
|
import { EventEmitter } from "@common/event-emitter";
|
||||||
|
|
||||||
interface IParams {
|
interface IParams {
|
||||||
url?: string; // connection url, starts with ws:// or wss://
|
url?: string; // connection url, starts with ws:// or wss://
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { RouteProps } from "react-router";
|
import type { RouteProps } from "react-router";
|
||||||
import { buildURL } from "../../../common/utils/buildUrl";
|
import { buildURL } from "@common/utils/buildUrl";
|
||||||
|
|
||||||
export const addClusterRoute: RouteProps = {
|
export const addClusterRoute: RouteProps = {
|
||||||
path: "/add-cluster"
|
path: "/add-cluster"
|
||||||
|
|||||||
@ -10,20 +10,20 @@ import { DropFileInput, Input } from "../input";
|
|||||||
import { AceEditor } from "../ace-editor";
|
import { AceEditor } from "../ace-editor";
|
||||||
import { Button } from "../button";
|
import { Button } from "../button";
|
||||||
import { Icon } from "../icon";
|
import { Icon } from "../icon";
|
||||||
import { kubeConfigDefaultPath, loadConfig, splitConfig, validateConfig, validateKubeConfig } from "../../../common/kube-helpers";
|
import { kubeConfigDefaultPath, loadConfig, splitConfig, validateConfig, validateKubeConfig } from "@common/kube-helpers";
|
||||||
import { ClusterModel, ClusterStore, clusterStore } from "../../../common/cluster-store";
|
import { ClusterModel, ClusterStore, clusterStore } from "@common/cluster-store";
|
||||||
import { workspaceStore } from "../../../common/workspace-store";
|
import { workspaceStore } from "@common/workspace-store";
|
||||||
import { v4 as uuid } from "uuid";
|
import { v4 as uuid } from "uuid";
|
||||||
import { navigate } from "../../navigation";
|
import { navigate } from "../../navigation";
|
||||||
import { userStore } from "../../../common/user-store";
|
import { userStore } from "@common/user-store";
|
||||||
import { clusterViewURL } from "../cluster-manager/cluster-view.route";
|
import { clusterViewURL } from "../cluster-manager/cluster-view.route";
|
||||||
import { cssNames } from "../../utils";
|
import { cssNames } from "../../utils";
|
||||||
import { Notifications } from "../notifications";
|
import { Notifications } from "../notifications";
|
||||||
import { Tab, Tabs } from "../tabs";
|
import { Tab, Tabs } from "../tabs";
|
||||||
import { ExecValidationNotFoundError } from "../../../common/custom-errors";
|
import { ExecValidationNotFoundError } from "@common/custom-errors";
|
||||||
import { appEventBus } from "../../../common/event-bus";
|
import { appEventBus } from "@common/event-bus";
|
||||||
import { PageLayout } from "../layout/page-layout";
|
import { PageLayout } from "../layout/page-layout";
|
||||||
import { docsUrl } from "../../../common/vars";
|
import { docsUrl } from "@common/vars";
|
||||||
|
|
||||||
enum KubeConfigSourceTab {
|
enum KubeConfigSourceTab {
|
||||||
FILE = "file",
|
FILE = "file",
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { RouteProps } from "react-router";
|
import type { RouteProps } from "react-router";
|
||||||
import { buildURL } from "../../../common/utils/buildUrl";
|
import { buildURL } from "@common/utils/buildUrl";
|
||||||
import { appsRoute } from "../+apps/apps.route";
|
import { appsRoute } from "../+apps/apps.route";
|
||||||
|
|
||||||
export const helmChartsRoute: RouteProps = {
|
export const helmChartsRoute: RouteProps = {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { RouteProps } from "react-router";
|
import type { RouteProps } from "react-router";
|
||||||
import { buildURL } from "../../../common/utils/buildUrl";
|
import { buildURL } from "@common/utils/buildUrl";
|
||||||
import { appsRoute } from "../+apps/apps.route";
|
import { appsRoute } from "../+apps/apps.route";
|
||||||
|
|
||||||
export const releaseRoute: RouteProps = {
|
export const releaseRoute: RouteProps = {
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import { HelmRelease, helmReleasesApi, IReleaseCreatePayload, IReleaseUpdatePayl
|
|||||||
import { ItemStore } from "../../item.store";
|
import { ItemStore } from "../../item.store";
|
||||||
import { Secret } from "../../api/endpoints";
|
import { Secret } from "../../api/endpoints";
|
||||||
import { secretsStore } from "../+config-secrets/secrets.store";
|
import { secretsStore } from "../+config-secrets/secrets.store";
|
||||||
import { getHostedCluster } from "../../../common/cluster-store";
|
import { getHostedCluster } from "@common/cluster-store";
|
||||||
|
|
||||||
@autobind()
|
@autobind()
|
||||||
export class ReleaseStore extends ItemStore<HelmRelease> {
|
export class ReleaseStore extends ItemStore<HelmRelease> {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { RouteProps } from "react-router";
|
import type { RouteProps } from "react-router";
|
||||||
import { buildURL } from "../../../common/utils/buildUrl";
|
import { buildURL } from "@common/utils/buildUrl";
|
||||||
|
|
||||||
export const appsRoute: RouteProps = {
|
export const appsRoute: RouteProps = {
|
||||||
path: "/apps",
|
path: "/apps",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import type { IClusterViewRouteParams } from "../cluster-manager/cluster-view.route";
|
import type { IClusterViewRouteParams } from "../cluster-manager/cluster-view.route";
|
||||||
import type { RouteProps } from "react-router";
|
import type { RouteProps } from "react-router";
|
||||||
import { buildURL } from "../../../common/utils/buildUrl";
|
import { buildURL } from "@common/utils/buildUrl";
|
||||||
|
|
||||||
export interface IClusterSettingsRouteParams extends IClusterViewRouteParams {
|
export interface IClusterSettingsRouteParams extends IClusterViewRouteParams {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,13 +8,13 @@ import { Features } from "./features";
|
|||||||
import { Removal } from "./removal";
|
import { Removal } from "./removal";
|
||||||
import { Status } from "./status";
|
import { Status } from "./status";
|
||||||
import { General } from "./general";
|
import { General } from "./general";
|
||||||
import { Cluster } from "../../../main/cluster";
|
import { Cluster } from "@main/cluster";
|
||||||
import { ClusterIcon } from "../cluster-icon";
|
import { ClusterIcon } from "../cluster-icon";
|
||||||
import { IClusterSettingsRouteParams } from "./cluster-settings.route";
|
import { IClusterSettingsRouteParams } from "./cluster-settings.route";
|
||||||
import { clusterStore } from "../../../common/cluster-store";
|
import { clusterStore } from "@common/cluster-store";
|
||||||
import { PageLayout } from "../layout/page-layout";
|
import { PageLayout } from "../layout/page-layout";
|
||||||
import { requestMain } from "../../../common/ipc";
|
import { requestMain } from "@common/ipc";
|
||||||
import { clusterActivateHandler, clusterRefreshHandler } from "../../../common/cluster-ipc";
|
import { clusterActivateHandler, clusterRefreshHandler } from "@common/cluster-ipc";
|
||||||
|
|
||||||
interface Props extends RouteComponentProps<IClusterSettingsRouteParams> {
|
interface Props extends RouteComponentProps<IClusterSettingsRouteParams> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { Cluster } from "../../../main/cluster";
|
import { Cluster } from "@main/cluster";
|
||||||
import { InstallFeature } from "./components/install-feature";
|
import { InstallFeature } from "./components/install-feature";
|
||||||
import { SubTitle } from "../layout/sub-title";
|
import { SubTitle } from "../layout/sub-title";
|
||||||
import { clusterFeatureRegistry } from "../../../extensions/registries/cluster-feature-registry";
|
import { clusterFeatureRegistry } from "@extensions/registries/cluster-feature-registry";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
cluster: Cluster;
|
cluster: Cluster;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { Cluster } from "../../../main/cluster";
|
import { Cluster } from "@main/cluster";
|
||||||
import { ClusterNameSetting } from "./components/cluster-name-setting";
|
import { ClusterNameSetting } from "./components/cluster-name-setting";
|
||||||
import { ClusterWorkspaceSetting } from "./components/cluster-workspace-setting";
|
import { ClusterWorkspaceSetting } from "./components/cluster-workspace-setting";
|
||||||
import { ClusterIconSetting } from "./components/cluster-icon-setting";
|
import { ClusterIconSetting } from "./components/cluster-icon-setting";
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { Cluster } from "../../../main/cluster";
|
import { Cluster } from "@main/cluster";
|
||||||
import { RemoveClusterButton } from "./components/remove-cluster-button";
|
import { RemoveClusterButton } from "./components/remove-cluster-button";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { Cluster } from "../../../main/cluster";
|
import { Cluster } from "@main/cluster";
|
||||||
import { SubTitle } from "../layout/sub-title";
|
import { SubTitle } from "../layout/sub-title";
|
||||||
import { Table, TableCell, TableRow } from "../table";
|
import { Table, TableCell, TableRow } from "../table";
|
||||||
import { autobind } from "../../utils";
|
import { autobind } from "../../utils";
|
||||||
|
|||||||
@ -7,8 +7,8 @@ import { disposeOnUnmount, observer } from "mobx-react";
|
|||||||
import { eventStore } from "../+events/event.store";
|
import { eventStore } from "../+events/event.store";
|
||||||
import { nodesStore } from "../+nodes/nodes.store";
|
import { nodesStore } from "../+nodes/nodes.store";
|
||||||
import { podsStore } from "../+workloads-pods/pods.store";
|
import { podsStore } from "../+workloads-pods/pods.store";
|
||||||
import { getHostedCluster } from "../../../common/cluster-store";
|
import { getHostedCluster } from "@common/cluster-store";
|
||||||
import { isAllowedResource } from "../../../common/rbac";
|
import { isAllowedResource } from "@common/rbac";
|
||||||
import { KubeObjectStore } from "../../kube-object.store";
|
import { KubeObjectStore } from "../../kube-object.store";
|
||||||
import { interval } from "../../utils";
|
import { interval } from "../../utils";
|
||||||
import { TabLayout } from "../layout/tab-layout";
|
import { TabLayout } from "../layout/tab-layout";
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { RouteProps } from "react-router";
|
import type { RouteProps } from "react-router";
|
||||||
import { buildURL } from "../../../common/utils/buildUrl";
|
import { buildURL } from "@common/utils/buildUrl";
|
||||||
|
|
||||||
export const clusterRoute: RouteProps = {
|
export const clusterRoute: RouteProps = {
|
||||||
path: "/cluster"
|
path: "/cluster"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { RouteProps } from "react-router";
|
import type { RouteProps } from "react-router";
|
||||||
import { buildURL } from "../../../common/utils/buildUrl";
|
import { buildURL } from "@common/utils/buildUrl";
|
||||||
|
|
||||||
export const hpaRoute: RouteProps = {
|
export const hpaRoute: RouteProps = {
|
||||||
path: "/hpa"
|
path: "/hpa"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { RouteProps } from "react-router";
|
import type { RouteProps } from "react-router";
|
||||||
import { buildURL } from "../../../common/utils/buildUrl";
|
import { buildURL } from "@common/utils/buildUrl";
|
||||||
|
|
||||||
export const limitRangesRoute: RouteProps = {
|
export const limitRangesRoute: RouteProps = {
|
||||||
path: "/limitranges"
|
path: "/limitranges"
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { autobind } from "../../../common/utils/autobind";
|
import { autobind } from "@common/utils/autobind";
|
||||||
import { KubeObjectStore } from "../../kube-object.store";
|
import { KubeObjectStore } from "../../kube-object.store";
|
||||||
import { apiManager } from "../../api/api-manager";
|
import { apiManager } from "../../api/api-manager";
|
||||||
import { LimitRange, limitRangeApi } from "../../api/endpoints/limit-range.api";
|
import { LimitRange, limitRangeApi } from "../../api/endpoints/limit-range.api";
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { RouteProps } from "react-router";
|
import type { RouteProps } from "react-router";
|
||||||
import { buildURL } from "../../../common/utils/buildUrl";
|
import { buildURL } from "@common/utils/buildUrl";
|
||||||
|
|
||||||
export const configMapsRoute: RouteProps = {
|
export const configMapsRoute: RouteProps = {
|
||||||
path: "/configmaps"
|
path: "/configmaps"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { RouteProps } from "react-router";
|
import type { RouteProps } from "react-router";
|
||||||
import { buildURL } from "../../../common/utils/buildUrl";
|
import { buildURL } from "@common/utils/buildUrl";
|
||||||
|
|
||||||
export const pdbRoute: RouteProps = {
|
export const pdbRoute: RouteProps = {
|
||||||
path: "/poddisruptionbudgets"
|
path: "/poddisruptionbudgets"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { RouteProps } from "react-router";
|
import type { RouteProps } from "react-router";
|
||||||
import { buildURL } from "../../../common/utils/buildUrl";
|
import { buildURL } from "@common/utils/buildUrl";
|
||||||
|
|
||||||
export const resourceQuotaRoute: RouteProps = {
|
export const resourceQuotaRoute: RouteProps = {
|
||||||
path: "/resourcequotas"
|
path: "/resourcequotas"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { RouteProps } from "react-router";
|
import type { RouteProps } from "react-router";
|
||||||
import { buildURL } from "../../../common/utils/buildUrl";
|
import { buildURL } from "@common/utils/buildUrl";
|
||||||
|
|
||||||
export const secretsRoute: RouteProps = {
|
export const secretsRoute: RouteProps = {
|
||||||
path: "/secrets"
|
path: "/secrets"
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { RouteProps } from "react-router";
|
import { RouteProps } from "react-router";
|
||||||
import { Config } from "./config";
|
import { Config } from "./config";
|
||||||
import { IURLParams } from "../../../common/utils/buildUrl";
|
import { IURLParams } from "@common/utils/buildUrl";
|
||||||
import { configMapsURL } from "../+config-maps/config-maps.route";
|
import { configMapsURL } from "../+config-maps/config-maps.route";
|
||||||
|
|
||||||
export const configRoute: RouteProps = {
|
export const configRoute: RouteProps = {
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import { namespaceUrlParam } from "../+namespaces/namespace.store";
|
|||||||
import { resourceQuotaRoute, ResourceQuotas, resourceQuotaURL } from "../+config-resource-quotas";
|
import { resourceQuotaRoute, ResourceQuotas, resourceQuotaURL } from "../+config-resource-quotas";
|
||||||
import { pdbRoute, pdbURL, PodDisruptionBudgets } from "../+config-pod-disruption-budgets";
|
import { pdbRoute, pdbURL, PodDisruptionBudgets } from "../+config-pod-disruption-budgets";
|
||||||
import { HorizontalPodAutoscalers, hpaRoute, hpaURL } from "../+config-autoscalers";
|
import { HorizontalPodAutoscalers, hpaRoute, hpaURL } from "../+config-autoscalers";
|
||||||
import { isAllowedResource } from "../../../common/rbac";
|
import { isAllowedResource } from "@common/rbac";
|
||||||
import { LimitRanges, limitRangesRoute, limitRangeURL } from "../+config-limit-ranges";
|
import { LimitRanges, limitRangesRoute, limitRangeURL } from "../+config-limit-ranges";
|
||||||
|
|
||||||
@observer
|
@observer
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { RouteProps } from "react-router";
|
import type { RouteProps } from "react-router";
|
||||||
import { buildURL } from "../../../common/utils/buildUrl";
|
import { buildURL } from "@common/utils/buildUrl";
|
||||||
|
|
||||||
export const crdRoute: RouteProps = {
|
export const crdRoute: RouteProps = {
|
||||||
path: "/crd"
|
path: "/crd"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { RouteProps } from "react-router";
|
import type { RouteProps } from "react-router";
|
||||||
import { buildURL } from "../../../common/utils/buildUrl";
|
import { buildURL } from "@common/utils/buildUrl";
|
||||||
|
|
||||||
export const eventRoute: RouteProps = {
|
export const eventRoute: RouteProps = {
|
||||||
path: "/events"
|
path: "/events"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { RouteProps } from "react-router";
|
import { RouteProps } from "react-router";
|
||||||
import { buildURL } from "../../../common/utils/buildUrl";
|
import { buildURL } from "@common/utils/buildUrl";
|
||||||
|
|
||||||
export const extensionsRoute: RouteProps = {
|
export const extensionsRoute: RouteProps = {
|
||||||
path: "/extensions"
|
path: "/extensions"
|
||||||
|
|||||||
@ -5,12 +5,12 @@ import { disposeOnUnmount, observer } from "mobx-react";
|
|||||||
import os from "os";
|
import os from "os";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { downloadFile, extractTar, listTarEntries, readFileFromTar } from "../../../common/utils";
|
import { downloadFile, extractTar, listTarEntries, readFileFromTar } from "@common/utils";
|
||||||
import { docsUrl } from "../../../common/vars";
|
import { docsUrl } from "@common/vars";
|
||||||
import { extensionDiscovery, InstalledExtension, manifestFilename } from "../../../extensions/extension-discovery";
|
import { extensionDiscovery, InstalledExtension, manifestFilename } from "@extensions/extension-discovery";
|
||||||
import { extensionLoader } from "../../../extensions/extension-loader";
|
import { extensionLoader } from "@extensions/extension-loader";
|
||||||
import { extensionDisplayName, LensExtensionManifest, sanitizeExtensionName } from "../../../extensions/lens-extension";
|
import { extensionDisplayName, LensExtensionManifest, sanitizeExtensionName } from "@extensions/lens-extension";
|
||||||
import logger from "../../../main/logger";
|
import logger from "@main/logger";
|
||||||
import { prevDefault } from "../../utils";
|
import { prevDefault } from "../../utils";
|
||||||
import { Button } from "../button";
|
import { Button } from "../button";
|
||||||
import { ConfirmDialog } from "../confirm-dialog";
|
import { ConfirmDialog } from "../confirm-dialog";
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { RouteProps } from "react-router";
|
import type { RouteProps } from "react-router";
|
||||||
import { buildURL } from "../../../common/utils/buildUrl";
|
import { buildURL } from "@common/utils/buildUrl";
|
||||||
|
|
||||||
export const landingRoute: RouteProps = {
|
export const landingRoute: RouteProps = {
|
||||||
path: "/landing"
|
path: "/landing"
|
||||||
|
|||||||
@ -2,8 +2,8 @@ import "./landing-page.scss";
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { observable } from "mobx";
|
import { observable } from "mobx";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { clusterStore } from "../../../common/cluster-store";
|
import { clusterStore } from "@common/cluster-store";
|
||||||
import { workspaceStore } from "../../../common/workspace-store";
|
import { workspaceStore } from "@common/workspace-store";
|
||||||
|
|
||||||
@observer
|
@observer
|
||||||
export class LandingPage extends React.Component {
|
export class LandingPage extends React.Component {
|
||||||
|
|||||||
@ -4,8 +4,8 @@ import { KubeObjectStore } from "../../kube-object.store";
|
|||||||
import { Namespace, namespacesApi } from "../../api/endpoints";
|
import { Namespace, namespacesApi } from "../../api/endpoints";
|
||||||
import { createPageParam } from "../../navigation";
|
import { createPageParam } from "../../navigation";
|
||||||
import { apiManager } from "../../api/api-manager";
|
import { apiManager } from "../../api/api-manager";
|
||||||
import { isAllowedResource } from "../../../common/rbac";
|
import { isAllowedResource } from "@common/rbac";
|
||||||
import { getHostedCluster } from "../../../common/cluster-store";
|
import { getHostedCluster } from "@common/cluster-store";
|
||||||
|
|
||||||
const storage = createStorage<string[]>("context_namespaces", []);
|
const storage = createStorage<string[]>("context_namespaces", []);
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { RouteProps } from "react-router";
|
import type { RouteProps } from "react-router";
|
||||||
import { buildURL } from "../../../common/utils/buildUrl";
|
import { buildURL } from "@common/utils/buildUrl";
|
||||||
|
|
||||||
export const namespacesRoute: RouteProps = {
|
export const namespacesRoute: RouteProps = {
|
||||||
path: "/namespaces"
|
path: "/namespaces"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { RouteProps } from "react-router";
|
import type { RouteProps } from "react-router";
|
||||||
import { buildURL } from "../../../common/utils/buildUrl";
|
import { buildURL } from "@common/utils/buildUrl";
|
||||||
|
|
||||||
export const endpointRoute: RouteProps = {
|
export const endpointRoute: RouteProps = {
|
||||||
path: "/endpoints"
|
path: "/endpoints"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { RouteProps } from "react-router";
|
import type { RouteProps } from "react-router";
|
||||||
import { buildURL } from "../../../common/utils/buildUrl";
|
import { buildURL } from "@common/utils/buildUrl";
|
||||||
|
|
||||||
export const ingressRoute: RouteProps = {
|
export const ingressRoute: RouteProps = {
|
||||||
path: "/ingresses"
|
path: "/ingresses"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { RouteProps } from "react-router";
|
import type { RouteProps } from "react-router";
|
||||||
import { buildURL } from "../../../common/utils/buildUrl";
|
import { buildURL } from "@common/utils/buildUrl";
|
||||||
|
|
||||||
export const networkPoliciesRoute: RouteProps = {
|
export const networkPoliciesRoute: RouteProps = {
|
||||||
path: "/network-policies"
|
path: "/network-policies"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { RouteProps } from "react-router";
|
import type { RouteProps } from "react-router";
|
||||||
import { buildURL } from "../../../common/utils/buildUrl";
|
import { buildURL } from "@common/utils/buildUrl";
|
||||||
|
|
||||||
export const servicesRoute: RouteProps = {
|
export const servicesRoute: RouteProps = {
|
||||||
path: "/services"
|
path: "/services"
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { RouteProps } from "react-router";
|
import { RouteProps } from "react-router";
|
||||||
import { Network } from "./network";
|
import { Network } from "./network";
|
||||||
import { servicesURL } from "../+network-services";
|
import { servicesURL } from "../+network-services";
|
||||||
import { IURLParams } from "../../../common/utils/buildUrl";
|
import { IURLParams } from "@common/utils/buildUrl";
|
||||||
|
|
||||||
export const networkRoute: RouteProps = {
|
export const networkRoute: RouteProps = {
|
||||||
get path() {
|
get path() {
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import { endpointRoute, Endpoints, endpointURL } from "../+network-endpoints";
|
|||||||
import { Ingresses, ingressRoute, ingressURL } from "../+network-ingresses";
|
import { Ingresses, ingressRoute, ingressURL } from "../+network-ingresses";
|
||||||
import { NetworkPolicies, networkPoliciesRoute, networkPoliciesURL } from "../+network-policies";
|
import { NetworkPolicies, networkPoliciesRoute, networkPoliciesURL } from "../+network-policies";
|
||||||
import { namespaceUrlParam } from "../+namespaces/namespace.store";
|
import { namespaceUrlParam } from "../+namespaces/namespace.store";
|
||||||
import { isAllowedResource } from "../../../common/rbac";
|
import { isAllowedResource } from "@common/rbac";
|
||||||
|
|
||||||
@observer
|
@observer
|
||||||
export class Network extends React.Component {
|
export class Network extends React.Component {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { RouteProps } from "react-router";
|
import type { RouteProps } from "react-router";
|
||||||
import { buildURL } from "../../../common/utils/buildUrl";
|
import { buildURL } from "@common/utils/buildUrl";
|
||||||
|
|
||||||
export const nodesRoute: RouteProps = {
|
export const nodesRoute: RouteProps = {
|
||||||
path: "/nodes"
|
path: "/nodes"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { RouteProps } from "react-router";
|
import type { RouteProps } from "react-router";
|
||||||
import { buildURL } from "../../../common/utils/buildUrl";
|
import { buildURL } from "@common/utils/buildUrl";
|
||||||
|
|
||||||
export const podSecurityPoliciesRoute: RouteProps = {
|
export const podSecurityPoliciesRoute: RouteProps = {
|
||||||
path: "/pod-security-policies"
|
path: "/pod-security-policies"
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import { systemName, isUrl, isPath } from "../input/input_validators";
|
|||||||
import { SubTitle } from "../layout/sub-title";
|
import { SubTitle } from "../layout/sub-title";
|
||||||
import { Icon } from "../icon";
|
import { Icon } from "../icon";
|
||||||
import { Notifications } from "../notifications";
|
import { Notifications } from "../notifications";
|
||||||
import { HelmRepo, repoManager } from "../../../main/helm/helm-repo-manager";
|
import { HelmRepo, repoManager } from "@main/helm/helm-repo-manager";
|
||||||
|
|
||||||
interface Props extends Partial<DialogProps> {
|
interface Props extends Partial<DialogProps> {
|
||||||
onAddRepo: Function
|
onAddRepo: Function
|
||||||
|
|||||||
@ -2,9 +2,9 @@ import React, { useState } from "react";
|
|||||||
import { Checkbox } from "../checkbox";
|
import { Checkbox } from "../checkbox";
|
||||||
import { Input, InputValidators } from "../input";
|
import { Input, InputValidators } from "../input";
|
||||||
import { SubTitle } from "../layout/sub-title";
|
import { SubTitle } from "../layout/sub-title";
|
||||||
import { UserPreferences, userStore } from "../../../common/user-store";
|
import { UserPreferences, userStore } from "@common/user-store";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { bundledKubectlPath } from "../../../main/kubectl";
|
import { bundledKubectlPath } from "@main/kubectl";
|
||||||
import { SelectOption, Select } from "../select";
|
import { SelectOption, Select } from "../select";
|
||||||
|
|
||||||
export const KubectlBinaries = observer(({ preferences }: { preferences: UserPreferences }) => {
|
export const KubectlBinaries = observer(({ preferences }: { preferences: UserPreferences }) => {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { RouteProps } from "react-router";
|
import type { RouteProps } from "react-router";
|
||||||
import { buildURL } from "../../../common/utils/buildUrl";
|
import { buildURL } from "@common/utils/buildUrl";
|
||||||
|
|
||||||
export const preferencesRoute: RouteProps = {
|
export const preferencesRoute: RouteProps = {
|
||||||
path: "/preferences"
|
path: "/preferences"
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user