mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Enforce some naming conventions (#4813)
This commit is contained in:
1 parent
dc6615f98f
commit
0b32775d40
197 files changed
+630
-634
No files matched your search
+3
-3
@@ -11,15 +11,15 @@ import { EditableList } from "../../editable-list";
|
||||
import { observable, makeObservable } from "mobx";
|
||||
import { systemName } from "../../input/input_validators";
|
||||
|
||||
interface Props {
|
||||
export interface ClusterAccessibleNamespacesProps {
|
||||
cluster: Cluster;
|
||||
}
|
||||
|
||||
@observer
|
||||
export class ClusterAccessibleNamespaces extends React.Component<Props> {
|
||||
export class ClusterAccessibleNamespaces extends React.Component<ClusterAccessibleNamespacesProps> {
|
||||
@observable namespaces = new Set(this.props.cluster.accessibleNamespaces);
|
||||
|
||||
constructor(props: Props) {
|
||||
constructor(props: ClusterAccessibleNamespacesProps) {
|
||||
super(props);
|
||||
makeObservable(this);
|
||||
}
|
||||
|
||||
@@ -18,13 +18,13 @@ enum GeneralInputStatus {
|
||||
ERROR = "error",
|
||||
}
|
||||
|
||||
interface Props {
|
||||
export interface ClusterIconSettingProps {
|
||||
cluster: Cluster;
|
||||
entity: KubernetesCluster;
|
||||
}
|
||||
|
||||
@observer
|
||||
export class ClusterIconSetting extends React.Component<Props> {
|
||||
export class ClusterIconSetting extends React.Component<ClusterIconSettingProps> {
|
||||
@observable status = GeneralInputStatus.CLEAN;
|
||||
@observable errorText?: string;
|
||||
|
||||
|
||||
@@ -11,12 +11,12 @@ import { boundMethod } from "../../../../common/utils";
|
||||
import { shell } from "electron";
|
||||
import { Notice } from "../../+extensions/notice";
|
||||
|
||||
interface Props {
|
||||
export interface ClusterKubeconfigProps {
|
||||
cluster: Cluster;
|
||||
}
|
||||
|
||||
@observer
|
||||
export class ClusterKubeconfig extends React.Component<Props> {
|
||||
export class ClusterKubeconfig extends React.Component<ClusterKubeconfigProps> {
|
||||
|
||||
@boundMethod
|
||||
openKubeconfig() {
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ import type { Stats } from "fs";
|
||||
import logger from "../../../../common/logger";
|
||||
import { lowerFirst } from "lodash";
|
||||
|
||||
interface Props {
|
||||
export interface ClusterLocalTerminalSettingProps {
|
||||
cluster: Cluster;
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ async function validateDirectory(dir: string): Promise<string | false> {
|
||||
}
|
||||
}
|
||||
|
||||
export const ClusterLocalTerminalSetting = observer(({ cluster }: Props) => {
|
||||
export const ClusterLocalTerminalSetting = observer(({ cluster }: ClusterLocalTerminalSettingProps) => {
|
||||
if (!cluster) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -13,15 +13,15 @@ import type { Cluster } from "../../../../common/cluster/cluster";
|
||||
import { observable, reaction, makeObservable } from "mobx";
|
||||
import { ClusterMetricsResourceType } from "../../../../common/cluster-types";
|
||||
|
||||
interface Props {
|
||||
export interface ClusterMetricsSettingProps {
|
||||
cluster: Cluster;
|
||||
}
|
||||
|
||||
@observer
|
||||
export class ClusterMetricsSetting extends React.Component<Props> {
|
||||
export class ClusterMetricsSetting extends React.Component<ClusterMetricsSettingProps> {
|
||||
@observable hiddenMetrics = observable.set<string>();
|
||||
|
||||
constructor(props: Props) {
|
||||
constructor(props: ClusterMetricsSettingProps) {
|
||||
super(props);
|
||||
makeObservable(this);
|
||||
}
|
||||
|
||||
@@ -12,16 +12,16 @@ import { SubTitle } from "../../layout/sub-title";
|
||||
import { isRequired } from "../../input/input_validators";
|
||||
import type { KubernetesCluster } from "../../../../common/catalog-entities";
|
||||
|
||||
interface Props {
|
||||
export interface ClusterNameSettingProps {
|
||||
cluster: Cluster;
|
||||
entity: KubernetesCluster;
|
||||
}
|
||||
|
||||
@observer
|
||||
export class ClusterNameSetting extends React.Component<Props> {
|
||||
export class ClusterNameSetting extends React.Component<ClusterNameSettingProps> {
|
||||
@observable name = "";
|
||||
|
||||
constructor(props: Props) {
|
||||
constructor(props: ClusterNameSettingProps) {
|
||||
super(props);
|
||||
makeObservable(this);
|
||||
}
|
||||
|
||||
@@ -12,16 +12,16 @@ import { observer } from "mobx-react";
|
||||
import { Icon } from "../../icon/icon";
|
||||
import { initialNodeShellImage } from "../../../../common/cluster-types";
|
||||
|
||||
interface Props {
|
||||
export interface ClusterNodeShellSettingProps {
|
||||
cluster: Cluster;
|
||||
}
|
||||
|
||||
@observer
|
||||
export class ClusterNodeShellSetting extends React.Component<Props> {
|
||||
export class ClusterNodeShellSetting extends React.Component<ClusterNodeShellSettingProps> {
|
||||
@observable nodeShellImage = this.props.cluster.preferences?.nodeShellImage || "";
|
||||
@observable imagePullSecret = this.props.cluster.preferences?.imagePullSecret || "";
|
||||
|
||||
constructor(props: Props) {
|
||||
constructor(props: ClusterNodeShellSettingProps) {
|
||||
super(props);
|
||||
makeObservable(this);
|
||||
}
|
||||
|
||||
@@ -14,12 +14,12 @@ import { productName } from "../../../../common/vars";
|
||||
import { MetricProviderInfo, metricsApi } from "../../../../common/k8s-api/endpoints/metrics.api";
|
||||
import { Spinner } from "../../spinner";
|
||||
|
||||
interface Props {
|
||||
export interface ClusterPrometheusSettingProps {
|
||||
cluster: Cluster;
|
||||
}
|
||||
|
||||
@observer
|
||||
export class ClusterPrometheusSetting extends React.Component<Props> {
|
||||
export class ClusterPrometheusSetting extends React.Component<ClusterPrometheusSettingProps> {
|
||||
@observable path = "";
|
||||
@observable provider = "";
|
||||
@observable loading = true;
|
||||
@@ -32,7 +32,7 @@ export class ClusterPrometheusSetting extends React.Component<Props> {
|
||||
];
|
||||
}
|
||||
|
||||
constructor(props: Props) {
|
||||
constructor(props: ClusterPrometheusSettingProps) {
|
||||
super(props);
|
||||
makeObservable(this);
|
||||
}
|
||||
|
||||
@@ -10,15 +10,15 @@ import type { Cluster } from "../../../../common/cluster/cluster";
|
||||
import { Input, InputValidators } from "../../input";
|
||||
import { SubTitle } from "../../layout/sub-title";
|
||||
|
||||
interface Props {
|
||||
export interface ClusterProxySettingProps {
|
||||
cluster: Cluster;
|
||||
}
|
||||
|
||||
@observer
|
||||
export class ClusterProxySetting extends React.Component<Props> {
|
||||
export class ClusterProxySetting extends React.Component<ClusterProxySettingProps> {
|
||||
@observable proxy = "";
|
||||
|
||||
constructor(props: Props) {
|
||||
constructor(props: ClusterProxySettingProps) {
|
||||
super(props);
|
||||
makeObservable(this);
|
||||
}
|
||||
|
||||
@@ -11,15 +11,15 @@ import { Badge } from "../../badge/badge";
|
||||
import { Icon } from "../../icon/icon";
|
||||
import { Notice } from "../../+extensions/notice";
|
||||
|
||||
interface Props {
|
||||
export interface ShowMetricsSettingProps {
|
||||
cluster: Cluster;
|
||||
}
|
||||
|
||||
@observer
|
||||
export class ShowMetricsSetting extends React.Component<Props> {
|
||||
export class ShowMetricsSetting extends React.Component<ShowMetricsSettingProps> {
|
||||
@observable hiddenMetrics = observable.set<string>();
|
||||
|
||||
constructor(props: Props) {
|
||||
constructor(props: ShowMetricsSettingProps) {
|
||||
super(props);
|
||||
makeObservable(this);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user