mirror of https://github.com/portainer/portainer
refactor(kubernetes): move react codebase [EE-3349] (#7953)
parent
2868da296a
commit
77c29ff87e
|
@ -1,7 +1,7 @@
|
|||
import { KubernetesService, KubernetesServicePort, KubernetesServiceTypes } from 'Kubernetes/models/service/models';
|
||||
import { KubernetesApplicationPublishingTypes } from 'Kubernetes/models/application/models/constants';
|
||||
import { getServices } from 'Kubernetes/react/views/networks/services/service';
|
||||
import { KubernetesService, KubernetesServicePort, KubernetesServiceTypes } from '@/kubernetes/models/service/models';
|
||||
import { KubernetesApplicationPublishingTypes } from '@/kubernetes/models/application/models/constants';
|
||||
import { notifyError } from '@/portainer/services/notifications';
|
||||
import { getServices } from '@/react/kubernetes/networks/services/service';
|
||||
|
||||
export default class KubeServicesViewController {
|
||||
/* @ngInject */
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import angular from 'angular';
|
||||
|
||||
import { r2a } from '@/react-tools/react2angular';
|
||||
import { IngressesDatatableView } from '@/kubernetes/react/views/networks/ingresses/IngressDatatable';
|
||||
import { CreateIngressView } from '@/kubernetes/react/views/networks/ingresses/CreateIngressView';
|
||||
import { withCurrentUser } from '@/react-tools/withCurrentUser';
|
||||
import { withReactQuery } from '@/react-tools/withReactQuery';
|
||||
import { withUIRouter } from '@/react-tools/withUIRouter';
|
||||
import { IngressesDatatableView } from '@/react/kubernetes/ingresses/IngressDatatable';
|
||||
import { CreateIngressView } from '@/react/kubernetes/ingresses/CreateIngressView';
|
||||
|
||||
export const viewsModule = angular
|
||||
.module('portainer.kubernetes.react.views', [])
|
||||
|
|
|
@ -32,7 +32,7 @@ import KubernetesApplicationHelper from 'Kubernetes/helpers/application/index';
|
|||
import KubernetesVolumeHelper from 'Kubernetes/helpers/volumeHelper';
|
||||
import KubernetesNamespaceHelper from 'Kubernetes/helpers/namespaceHelper';
|
||||
import { KubernetesNodeHelper } from 'Kubernetes/node/helper';
|
||||
import { updateIngress, getIngresses } from '@/kubernetes/react/views/networks/ingresses/service';
|
||||
import { updateIngress, getIngresses } from '@/react/kubernetes/ingresses/service';
|
||||
import { confirmUpdateAppIngress } from '@/portainer/services/modal.service/prompt';
|
||||
|
||||
class KubernetesCreateApplicationController {
|
||||
|
|
|
@ -3,7 +3,7 @@ import clsx from 'clsx';
|
|||
import { useState } from 'react';
|
||||
import { DialogOverlay } from '@reach/dialog';
|
||||
|
||||
import * as kcService from '@/kubernetes/services/kubeconfig.service';
|
||||
import { downloadKubeconfigFile } from '@/react/kubernetes/services/kubeconfig.service';
|
||||
import * as notifications from '@/portainer/services/notifications';
|
||||
import { EnvironmentType } from '@/react/portainer/environments/types';
|
||||
import { usePaginationLimitState } from '@/portainer/hooks/usePaginationLimitState';
|
||||
|
@ -144,9 +144,7 @@ export function KubeconfigPrompt({
|
|||
return;
|
||||
}
|
||||
try {
|
||||
await kcService.downloadKubeconfigFile(
|
||||
Object.keys(selection).map(Number)
|
||||
);
|
||||
await downloadKubeconfigFile(Object.keys(selection).map(Number));
|
||||
onClose();
|
||||
} catch (e) {
|
||||
notifications.error('Failed downloading kubeconfig file', e as Error);
|
||||
|
|
|
@ -3,7 +3,7 @@ import { EnvironmentId } from '@/react/portainer/environments/types';
|
|||
import {
|
||||
KubernetesApiListResponse,
|
||||
V1IngressClass,
|
||||
} from '@/react/kubernetes/services/kubernetes/types';
|
||||
} from '@/react/kubernetes/services/types';
|
||||
|
||||
export async function getAllIngressClasses(environmentId: EnvironmentId) {
|
||||
try {
|
||||
|
|
|
@ -5,8 +5,7 @@ import { v4 as uuidv4 } from 'uuid';
|
|||
import { useEnvironmentId } from '@/portainer/hooks/useEnvironmentId';
|
||||
import { useConfigurations } from '@/react/kubernetes/configs/queries';
|
||||
import { useNamespaces } from '@/react/kubernetes/namespaces/queries';
|
||||
import { Annotation } from '@/kubernetes/react/views/networks/ingresses/components/annotations/types';
|
||||
import { useServices } from '@/kubernetes/react/views/networks/services/queries';
|
||||
import { useServices } from '@/react/kubernetes/networks/services/queries';
|
||||
import { notifySuccess } from '@/portainer/services/notifications';
|
||||
|
||||
import { Link } from '@@/Link';
|
||||
|
@ -22,6 +21,7 @@ import {
|
|||
useIngressControllers,
|
||||
} from '../queries';
|
||||
|
||||
import { Annotation } from './Annotations/types';
|
||||
import { Rule, Path, Host } from './types';
|
||||
import { IngressForm } from './IngressForm';
|
||||
import {
|
|
@ -1,8 +1,6 @@
|
|||
import { ChangeEvent, ReactNode } from 'react';
|
||||
import { Plus, RefreshCw, Trash2 } from 'react-feather';
|
||||
|
||||
import { Annotations } from '@/kubernetes/react/views/networks/ingresses/components/annotations';
|
||||
|
||||
import { Link } from '@@/Link';
|
||||
import { Icon } from '@@/Icon';
|
||||
import { Select, Option } from '@@/form-components/Input/Select';
|
||||
|
@ -11,6 +9,7 @@ import { Widget, WidgetBody, WidgetTitle } from '@@/Widget';
|
|||
import { Tooltip } from '@@/Tip/Tooltip';
|
||||
import { Button } from '@@/buttons';
|
||||
|
||||
import { Annotations } from './Annotations';
|
||||
import { Rule, ServicePorts } from './types';
|
||||
|
||||
import '../style.css';
|
|
@ -1,7 +1,7 @@
|
|||
import { Annotation } from '@/kubernetes/react/views/networks/ingresses/components/annotations/types';
|
||||
|
||||
import { Option } from '@@/form-components/Input/Select';
|
||||
|
||||
import { Annotation } from './Annotations/types';
|
||||
|
||||
export interface Path {
|
||||
Key: string;
|
||||
Route: string;
|
|
@ -1,10 +1,10 @@
|
|||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
import { Annotation } from '@/kubernetes/react/views/networks/ingresses/components/annotations/types';
|
||||
import { SupportedIngControllerTypes } from '@/react/kubernetes/cluster/ingressClass/types';
|
||||
|
||||
import { TLS, Ingress } from '../types';
|
||||
|
||||
import { Annotation } from './Annotations/types';
|
||||
import { Host, Rule } from './types';
|
||||
|
||||
const ignoreAnnotationsForEdit = [
|
|
@ -6,8 +6,7 @@ import {
|
|||
withError,
|
||||
withInvalidate,
|
||||
} from '@/react-tools/react-query';
|
||||
|
||||
import { getServices } from '../services/service';
|
||||
import { getServices } from '@/react/kubernetes/networks/services/service';
|
||||
|
||||
import {
|
||||
getIngresses,
|
|
@ -2,7 +2,8 @@ import { useQuery } from 'react-query';
|
|||
|
||||
import { EnvironmentId } from '@/react/portainer/environments/types';
|
||||
import { error as notifyError } from '@/portainer/services/notifications';
|
||||
import { getIngresses } from '@/kubernetes/react/views/networks/ingresses/service';
|
||||
|
||||
import { getIngresses } from '../ingresses/service';
|
||||
|
||||
import { getNamespaces, getNamespace } from './service';
|
||||
import { Namespaces } from './types';
|
||||
|
|
Loading…
Reference in New Issue