mirror of https://github.com/portainer/portainer
refactor(app): move react components to react codebase [EE-3179] (#6971)
parent
212400c283
commit
18252ab854
|
@ -31,7 +31,12 @@ rules:
|
||||||
[
|
[
|
||||||
'error',
|
'error',
|
||||||
{
|
{
|
||||||
pathGroups: [{ pattern: '@/**', group: 'internal' }, { pattern: '{Kubernetes,Portainer,Agent,Azure,Docker}/**', group: 'internal' }],
|
pathGroups:
|
||||||
|
[
|
||||||
|
{ pattern: '@@/**', group: 'internal', position: 'after' },
|
||||||
|
{ pattern: '@/**', group: 'internal' },
|
||||||
|
{ pattern: '{Kubernetes,Portainer,Agent,Azure,Docker}/**', group: 'internal' },
|
||||||
|
],
|
||||||
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
|
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
|
||||||
pathGroupsExcludedImportTypes: ['internal'],
|
pathGroupsExcludedImportTypes: ['internal'],
|
||||||
},
|
},
|
||||||
|
@ -41,6 +46,7 @@ settings:
|
||||||
'import/resolver':
|
'import/resolver':
|
||||||
alias:
|
alias:
|
||||||
map:
|
map:
|
||||||
|
- ['@@', './app/react/components']
|
||||||
- ['@', './app']
|
- ['@', './app']
|
||||||
extensions: ['.js', '.ts', '.tsx']
|
extensions: ['.js', '.ts', '.tsx']
|
||||||
|
|
||||||
|
@ -68,7 +74,14 @@ overrides:
|
||||||
version: 'detect'
|
version: 'detect'
|
||||||
rules:
|
rules:
|
||||||
import/order:
|
import/order:
|
||||||
['error', { pathGroups: [{ pattern: '@/**', group: 'internal' }], groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'], 'newlines-between': 'always' }]
|
[
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
pathGroups: [{ pattern: '@@/**', group: 'internal', position: 'after' }, { pattern: '@/**', group: 'internal' }],
|
||||||
|
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
|
||||||
|
'newlines-between': 'always',
|
||||||
|
},
|
||||||
|
]
|
||||||
func-style: [error, 'declaration']
|
func-style: [error, 'declaration']
|
||||||
import/prefer-default-export: off
|
import/prefer-default-export: off
|
||||||
no-use-before-define: ['error', { functions: false }]
|
no-use-before-define: ['error', { functions: false }]
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
import { Field, Form, Formik } from 'formik';
|
import { Field, Form, Formik } from 'formik';
|
||||||
import { useCurrentStateAndParams, useRouter } from '@uirouter/react';
|
import { useCurrentStateAndParams, useRouter } from '@uirouter/react';
|
||||||
|
|
||||||
import { FormControl } from '@/portainer/components/form-components/FormControl';
|
|
||||||
import { Input, Select } from '@/portainer/components/form-components/Input';
|
|
||||||
import { FormSectionTitle } from '@/portainer/components/form-components/FormSectionTitle';
|
|
||||||
import { LoadingButton } from '@/portainer/components/Button/LoadingButton';
|
|
||||||
import { InputListError } from '@/portainer/components/form-components/InputList/InputList';
|
|
||||||
import { ContainerInstanceFormValues } from '@/azure/types';
|
import { ContainerInstanceFormValues } from '@/azure/types';
|
||||||
import * as notifications from '@/portainer/services/notifications';
|
import * as notifications from '@/portainer/services/notifications';
|
||||||
import { useUser } from '@/portainer/hooks/useUser';
|
import { useUser } from '@/portainer/hooks/useUser';
|
||||||
import { AccessControlForm } from '@/portainer/access-control/AccessControlForm';
|
import { AccessControlForm } from '@/portainer/access-control/AccessControlForm';
|
||||||
|
|
||||||
|
import { FormControl } from '@@/form-components/FormControl';
|
||||||
|
import { Input, Select } from '@@/form-components/Input';
|
||||||
|
import { FormSectionTitle } from '@@/form-components/FormSectionTitle';
|
||||||
|
import { LoadingButton } from '@@/buttons/LoadingButton';
|
||||||
|
import { InputListError } from '@@/form-components/InputList/InputList';
|
||||||
|
|
||||||
import { validationSchema } from './CreateContainerInstanceForm.validation';
|
import { validationSchema } from './CreateContainerInstanceForm.validation';
|
||||||
import { PortMapping, PortsMappingField } from './PortsMappingField';
|
import { PortMapping, PortsMappingField } from './PortsMappingField';
|
||||||
import { useLoadFormState } from './useLoadFormState';
|
import { useLoadFormState } from './useLoadFormState';
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import { ButtonSelector } from '@/portainer/components/form-components/ButtonSelector/ButtonSelector';
|
import { ButtonSelector } from '@@/form-components/ButtonSelector/ButtonSelector';
|
||||||
import { FormError } from '@/portainer/components/form-components/FormError';
|
import { FormError } from '@@/form-components/FormError';
|
||||||
import { InputGroup } from '@/portainer/components/form-components/InputGroup';
|
import { InputGroup } from '@@/form-components/InputGroup';
|
||||||
import { InputList } from '@/portainer/components/form-components/InputList';
|
import { InputList } from '@@/form-components/InputList';
|
||||||
import {
|
import {
|
||||||
InputListError,
|
InputListError,
|
||||||
ItemProps,
|
ItemProps,
|
||||||
} from '@/portainer/components/form-components/InputList/InputList';
|
} from '@@/form-components/InputList/InputList';
|
||||||
|
|
||||||
import styles from './PortsMappingField.module.css';
|
import styles from './PortsMappingField.module.css';
|
||||||
|
|
||||||
|
|
|
@ -4,13 +4,14 @@ import { useEffect } from 'react';
|
||||||
import * as notifications from '@/portainer/services/notifications';
|
import * as notifications from '@/portainer/services/notifications';
|
||||||
import PortainerError from '@/portainer/error';
|
import PortainerError from '@/portainer/error';
|
||||||
import { EnvironmentId } from '@/portainer/environments/types';
|
import { EnvironmentId } from '@/portainer/environments/types';
|
||||||
import { Option } from '@/portainer/components/form-components/Input/Select';
|
|
||||||
import { getResourceGroups } from '@/azure/services/resource-groups.service';
|
import { getResourceGroups } from '@/azure/services/resource-groups.service';
|
||||||
import { getSubscriptions } from '@/azure/services/subscription.service';
|
import { getSubscriptions } from '@/azure/services/subscription.service';
|
||||||
import { getContainerInstanceProvider } from '@/azure/services/provider.service';
|
import { getContainerInstanceProvider } from '@/azure/services/provider.service';
|
||||||
import { ContainerInstanceFormValues, Subscription } from '@/azure/types';
|
import { ContainerInstanceFormValues, Subscription } from '@/azure/types';
|
||||||
import { parseAccessControlFormData } from '@/portainer/access-control/utils';
|
import { parseAccessControlFormData } from '@/portainer/access-control/utils';
|
||||||
|
|
||||||
|
import { Option } from '@@/form-components/Input/Select';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getSubscriptionLocations,
|
getSubscriptionLocations,
|
||||||
getSubscriptionResourceGroups,
|
getSubscriptionResourceGroups,
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import { PageHeader } from '@/portainer/components/PageHeader';
|
|
||||||
import { Widget, WidgetBody } from '@/portainer/components/widget';
|
|
||||||
import { r2a } from '@/react-tools/react2angular';
|
import { r2a } from '@/react-tools/react2angular';
|
||||||
|
|
||||||
|
import { PageHeader } from '@@/PageHeader';
|
||||||
|
import { Widget, WidgetBody } from '@@/Widget';
|
||||||
|
|
||||||
import { CreateContainerInstanceForm } from './CreateContainerInstanceForm';
|
import { CreateContainerInstanceForm } from './CreateContainerInstanceForm';
|
||||||
|
|
||||||
export function CreateContainerInstanceView() {
|
export function CreateContainerInstanceView() {
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
|
|
||||||
import { useEnvironmentId } from '@/portainer/hooks/useEnvironmentId';
|
import { useEnvironmentId } from '@/portainer/hooks/useEnvironmentId';
|
||||||
import { PageHeader } from '@/portainer/components/PageHeader';
|
|
||||||
import { DashboardItem } from '@/portainer/components/Dashboard/DashboardItem';
|
|
||||||
import { error as notifyError } from '@/portainer/services/notifications';
|
import { error as notifyError } from '@/portainer/services/notifications';
|
||||||
import PortainerError from '@/portainer/error';
|
import PortainerError from '@/portainer/error';
|
||||||
import { r2a } from '@/react-tools/react2angular';
|
import { r2a } from '@/react-tools/react2angular';
|
||||||
|
|
||||||
|
import { DashboardItem } from '@@/DashboardItem';
|
||||||
|
import { PageHeader } from '@@/PageHeader';
|
||||||
|
|
||||||
import { useResourceGroups, useSubscriptions } from '../queries';
|
import { useResourceGroups, useSubscriptions } from '../queries';
|
||||||
|
|
||||||
export function DashboardView() {
|
export function DashboardView() {
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
|
|
||||||
import { Authorized } from '@/portainer/hooks/useUser';
|
import { Authorized } from '@/portainer/hooks/useUser';
|
||||||
import { Link } from '@/portainer/components/Link';
|
|
||||||
import { react2angular } from '@/react-tools/react2angular';
|
import { react2angular } from '@/react-tools/react2angular';
|
||||||
import { DockerContainerStatus } from '@/docker/containers/types';
|
import { DockerContainerStatus } from '@/docker/containers/types';
|
||||||
|
|
||||||
|
import { Link } from '@@/Link';
|
||||||
|
|
||||||
import styles from './ContainerQuickActions.module.css';
|
import styles from './ContainerQuickActions.module.css';
|
||||||
|
|
||||||
interface QuickActionsState {
|
interface QuickActionsState {
|
||||||
|
|
|
@ -9,11 +9,18 @@ import {
|
||||||
} from 'react-table';
|
} from 'react-table';
|
||||||
import { useRowSelectColumn } from '@lineup-lite/hooks';
|
import { useRowSelectColumn } from '@lineup-lite/hooks';
|
||||||
|
|
||||||
import { PaginationControls } from '@/portainer/components/pagination-controls';
|
import { useDebounce } from '@/portainer/hooks/useDebounce';
|
||||||
|
import type {
|
||||||
|
ContainersTableSettings,
|
||||||
|
DockerContainer,
|
||||||
|
} from '@/docker/containers/types';
|
||||||
|
import { useEnvironment } from '@/portainer/environments/useEnvironment';
|
||||||
|
|
||||||
|
import { PaginationControls } from '@@/PaginationControls';
|
||||||
import {
|
import {
|
||||||
QuickActionsSettings,
|
QuickActionsSettings,
|
||||||
buildAction,
|
buildAction,
|
||||||
} from '@/portainer/components/datatables/components/QuickActionsSettings';
|
} from '@@/datatables/QuickActionsSettings';
|
||||||
import {
|
import {
|
||||||
Table,
|
Table,
|
||||||
TableActions,
|
TableActions,
|
||||||
|
@ -23,25 +30,16 @@ import {
|
||||||
TableSettingsMenu,
|
TableSettingsMenu,
|
||||||
TableTitle,
|
TableTitle,
|
||||||
TableTitleActions,
|
TableTitleActions,
|
||||||
} from '@/portainer/components/datatables/components';
|
} from '@@/datatables';
|
||||||
import { multiple } from '@/portainer/components/datatables/components/filter-types';
|
import { multiple } from '@@/datatables/filter-types';
|
||||||
import { useTableSettings } from '@/portainer/components/datatables/components/useTableSettings';
|
import { useTableSettings } from '@@/datatables/useTableSettings';
|
||||||
import { ColumnVisibilityMenu } from '@/portainer/components/datatables/components/ColumnVisibilityMenu';
|
import { ColumnVisibilityMenu } from '@@/datatables/ColumnVisibilityMenu';
|
||||||
import { useRepeater } from '@/portainer/components/datatables/components/useRepeater';
|
import { useRepeater } from '@@/datatables/useRepeater';
|
||||||
import { useDebounce } from '@/portainer/hooks/useDebounce';
|
import { SearchBar, useSearchBarState } from '@@/datatables/SearchBar';
|
||||||
import {
|
import { useRowSelect } from '@@/datatables/useRowSelect';
|
||||||
SearchBar,
|
import { Checkbox } from '@@/form-components/Checkbox';
|
||||||
useSearchBarState,
|
import { TableFooter } from '@@/datatables/TableFooter';
|
||||||
} from '@/portainer/components/datatables/components/SearchBar';
|
import { SelectedRowsCount } from '@@/datatables/SelectedRowsCount';
|
||||||
import type {
|
|
||||||
ContainersTableSettings,
|
|
||||||
DockerContainer,
|
|
||||||
} from '@/docker/containers/types';
|
|
||||||
import { useEnvironment } from '@/portainer/environments/useEnvironment';
|
|
||||||
import { useRowSelect } from '@/portainer/components/datatables/components/useRowSelect';
|
|
||||||
import { Checkbox } from '@/portainer/components/form-components/Checkbox';
|
|
||||||
import { TableFooter } from '@/portainer/components/datatables/components/TableFooter';
|
|
||||||
import { SelectedRowsCount } from '@/portainer/components/datatables/components/SelectedRowsCount';
|
|
||||||
|
|
||||||
import { ContainersDatatableActions } from './ContainersDatatableActions';
|
import { ContainersDatatableActions } from './ContainersDatatableActions';
|
||||||
import { ContainersDatatableSettings } from './ContainersDatatableSettings';
|
import { ContainersDatatableSettings } from './ContainersDatatableSettings';
|
||||||
|
|
|
@ -2,7 +2,6 @@ import { useRouter } from '@uirouter/react';
|
||||||
|
|
||||||
import * as notifications from '@/portainer/services/notifications';
|
import * as notifications from '@/portainer/services/notifications';
|
||||||
import { useAuthorizations, Authorized } from '@/portainer/hooks/useUser';
|
import { useAuthorizations, Authorized } from '@/portainer/hooks/useUser';
|
||||||
import { Link } from '@/portainer/components/Link';
|
|
||||||
import { confirmContainerDeletion } from '@/portainer/services/modal.service/prompt';
|
import { confirmContainerDeletion } from '@/portainer/services/modal.service/prompt';
|
||||||
import { setPortainerAgentTargetHeader } from '@/portainer/services/http-request.helper';
|
import { setPortainerAgentTargetHeader } from '@/portainer/services/http-request.helper';
|
||||||
import type { ContainerId, DockerContainer } from '@/docker/containers/types';
|
import type { ContainerId, DockerContainer } from '@/docker/containers/types';
|
||||||
|
@ -16,7 +15,9 @@ import {
|
||||||
stopContainer,
|
stopContainer,
|
||||||
} from '@/docker/containers/containers.service';
|
} from '@/docker/containers/containers.service';
|
||||||
import type { EnvironmentId } from '@/portainer/environments/types';
|
import type { EnvironmentId } from '@/portainer/environments/types';
|
||||||
import { ButtonGroup, Button } from '@/portainer/components/Button';
|
|
||||||
|
import { Link } from '@@/Link';
|
||||||
|
import { ButtonGroup, Button } from '@@/buttons';
|
||||||
|
|
||||||
type ContainerServiceAction = (
|
type ContainerServiceAction = (
|
||||||
endpointId: EnvironmentId,
|
endpointId: EnvironmentId,
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
import { react2angular } from '@/react-tools/react2angular';
|
import { react2angular } from '@/react-tools/react2angular';
|
||||||
import { EnvironmentProvider } from '@/portainer/environments/useEnvironment';
|
import { EnvironmentProvider } from '@/portainer/environments/useEnvironment';
|
||||||
import { TableSettingsProvider } from '@/portainer/components/datatables/components/useTableSettings';
|
|
||||||
import type { Environment } from '@/portainer/environments/types';
|
import type { Environment } from '@/portainer/environments/types';
|
||||||
|
|
||||||
|
import { TableSettingsProvider } from '@@/datatables/useTableSettings';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ContainersDatatable,
|
ContainersDatatable,
|
||||||
ContainerTableProps,
|
ContainerTableProps,
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
import { TableSettingsMenuAutoRefresh } from '@/portainer/components/datatables/components/TableSettingsMenuAutoRefresh';
|
|
||||||
import { useTableSettings } from '@/portainer/components/datatables/components/useTableSettings';
|
|
||||||
import { Checkbox } from '@/portainer/components/form-components/Checkbox';
|
|
||||||
import type { ContainersTableSettings } from '@/docker/containers/types';
|
import type { ContainersTableSettings } from '@/docker/containers/types';
|
||||||
|
|
||||||
|
import { TableSettingsMenuAutoRefresh } from '@@/datatables/TableSettingsMenuAutoRefresh';
|
||||||
|
import { useTableSettings } from '@@/datatables/useTableSettings';
|
||||||
|
import { Checkbox } from '@@/form-components/Checkbox';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
isRefreshVisible: boolean;
|
isRefreshVisible: boolean;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,12 +3,13 @@ import _ from 'lodash';
|
||||||
import { useSref } from '@uirouter/react';
|
import { useSref } from '@uirouter/react';
|
||||||
|
|
||||||
import { useEnvironment } from '@/portainer/environments/useEnvironment';
|
import { useEnvironment } from '@/portainer/environments/useEnvironment';
|
||||||
import { useTableSettings } from '@/portainer/components/datatables/components/useTableSettings';
|
|
||||||
import type {
|
import type {
|
||||||
ContainersTableSettings,
|
ContainersTableSettings,
|
||||||
DockerContainer,
|
DockerContainer,
|
||||||
} from '@/docker/containers/types';
|
} from '@/docker/containers/types';
|
||||||
|
|
||||||
|
import { useTableSettings } from '@@/datatables/useTableSettings';
|
||||||
|
|
||||||
export const name: Column<DockerContainer> = {
|
export const name: Column<DockerContainer> = {
|
||||||
Header: 'Name',
|
Header: 'Name',
|
||||||
accessor: (row) => {
|
accessor: (row) => {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import { CellProps, Column } from 'react-table';
|
import { CellProps, Column } from 'react-table';
|
||||||
|
|
||||||
import { useTableSettings } from '@/portainer/components/datatables/components/useTableSettings';
|
|
||||||
import { useEnvironment } from '@/portainer/environments/useEnvironment';
|
import { useEnvironment } from '@/portainer/environments/useEnvironment';
|
||||||
import { useAuthorizations } from '@/portainer/hooks/useUser';
|
import { useAuthorizations } from '@/portainer/hooks/useUser';
|
||||||
import { ContainerQuickActions } from '@/docker/components/container-quick-actions/ContainerQuickActions';
|
import { ContainerQuickActions } from '@/docker/components/container-quick-actions/ContainerQuickActions';
|
||||||
|
@ -10,6 +9,8 @@ import type {
|
||||||
} from '@/docker/containers/types';
|
} from '@/docker/containers/types';
|
||||||
import { EnvironmentStatus } from '@/portainer/environments/types';
|
import { EnvironmentStatus } from '@/portainer/environments/types';
|
||||||
|
|
||||||
|
import { useTableSettings } from '@@/datatables/useTableSettings';
|
||||||
|
|
||||||
export const quickActions: Column<DockerContainer> = {
|
export const quickActions: Column<DockerContainer> = {
|
||||||
Header: 'Quick Actions',
|
Header: 'Quick Actions',
|
||||||
id: 'actions',
|
id: 'actions',
|
||||||
|
|
|
@ -2,12 +2,13 @@ import { Column } from 'react-table';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
|
||||||
import { DefaultFilter } from '@/portainer/components/datatables/components/Filter';
|
|
||||||
import type {
|
import type {
|
||||||
DockerContainer,
|
DockerContainer,
|
||||||
DockerContainerStatus,
|
DockerContainerStatus,
|
||||||
} from '@/docker/containers/types';
|
} from '@/docker/containers/types';
|
||||||
|
|
||||||
|
import { DefaultFilter } from '@@/datatables/Filter';
|
||||||
|
|
||||||
export const state: Column<DockerContainer> = {
|
export const state: Column<DockerContainer> = {
|
||||||
Header: 'State',
|
Header: 'State',
|
||||||
accessor: 'Status',
|
accessor: 'Status',
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
import { ResourceControlViewModel } from '@/portainer/access-control/models/ResourceControlViewModel';
|
import { ResourceControlViewModel } from '@/portainer/access-control/models/ResourceControlViewModel';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
PaginationTableSettings,
|
PaginationTableSettings,
|
||||||
RefreshableTableSettings,
|
RefreshableTableSettings,
|
||||||
SettableColumnsTableSettings,
|
SettableColumnsTableSettings,
|
||||||
SettableQuickActionsTableSettings,
|
SettableQuickActionsTableSettings,
|
||||||
SortableTableSettings,
|
SortableTableSettings,
|
||||||
} from '@/portainer/components/datatables/types';
|
} from '@@/datatables/types';
|
||||||
|
|
||||||
export type DockerContainerStatus =
|
export type DockerContainerStatus =
|
||||||
| 'paused'
|
| 'paused'
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import { Widget, WidgetBody, WidgetTitle } from '@/portainer/components/widget';
|
|
||||||
import { DetailsTable } from '@/portainer/components/DetailsTable';
|
|
||||||
import { Button } from '@/portainer/components/Button';
|
|
||||||
import { Authorized } from '@/portainer/hooks/useUser';
|
import { Authorized } from '@/portainer/hooks/useUser';
|
||||||
import { EnvironmentId } from '@/portainer/environments/types';
|
import { EnvironmentId } from '@/portainer/environments/types';
|
||||||
import { Link } from '@/portainer/components/Link';
|
|
||||||
|
import { Widget, WidgetBody, WidgetTitle } from '@@/Widget';
|
||||||
|
import { DetailsTable } from '@@/DetailsTable';
|
||||||
|
import { Button } from '@@/buttons';
|
||||||
|
import { Link } from '@@/Link';
|
||||||
|
|
||||||
import { NetworkContainer, NetworkId } from '../types';
|
import { NetworkContainer, NetworkId } from '../types';
|
||||||
import { useDisconnectContainer } from '../queries';
|
import { useDisconnectContainer } from '../queries';
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
import { Fragment } from 'react';
|
import { Fragment } from 'react';
|
||||||
import DockerNetworkHelper from 'Docker/helpers/networkHelper';
|
import DockerNetworkHelper from 'Docker/helpers/networkHelper';
|
||||||
|
|
||||||
import { Widget, WidgetBody, WidgetTitle } from '@/portainer/components/widget';
|
|
||||||
import { DetailsTable } from '@/portainer/components/DetailsTable';
|
|
||||||
import { Button } from '@/portainer/components/Button';
|
|
||||||
import { Authorized } from '@/portainer/hooks/useUser';
|
import { Authorized } from '@/portainer/hooks/useUser';
|
||||||
|
|
||||||
|
import { Widget, WidgetBody, WidgetTitle } from '@@/Widget';
|
||||||
|
import { DetailsTable } from '@@/DetailsTable';
|
||||||
|
import { Button } from '@@/buttons';
|
||||||
|
|
||||||
import { isSystemNetwork } from '../network.helper';
|
import { isSystemNetwork } from '../network.helper';
|
||||||
import { DockerNetwork, IPConfig } from '../types';
|
import { DockerNetwork, IPConfig } from '../types';
|
||||||
|
|
||||||
|
|
|
@ -4,12 +4,13 @@ import { useQueryClient } from 'react-query';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
|
||||||
import { useEnvironmentId } from '@/portainer/hooks/useEnvironmentId';
|
import { useEnvironmentId } from '@/portainer/hooks/useEnvironmentId';
|
||||||
import { PageHeader } from '@/portainer/components/PageHeader';
|
|
||||||
import { confirmDeletionAsync } from '@/portainer/services/modal.service/confirm';
|
import { confirmDeletionAsync } from '@/portainer/services/modal.service/confirm';
|
||||||
import { AccessControlPanel } from '@/portainer/access-control/AccessControlPanel/AccessControlPanel';
|
import { AccessControlPanel } from '@/portainer/access-control/AccessControlPanel/AccessControlPanel';
|
||||||
import { ResourceControlType } from '@/portainer/access-control/types';
|
import { ResourceControlType } from '@/portainer/access-control/types';
|
||||||
import { DockerContainer } from '@/docker/containers/types';
|
import { DockerContainer } from '@/docker/containers/types';
|
||||||
|
|
||||||
|
import { PageHeader } from '@@/PageHeader';
|
||||||
|
|
||||||
import { useNetwork, useDeleteNetwork } from '../queries';
|
import { useNetwork, useDeleteNetwork } from '../queries';
|
||||||
import { isSystemNetwork } from '../network.helper';
|
import { isSystemNetwork } from '../network.helper';
|
||||||
import { useContainers } from '../../containers/queries';
|
import { useContainers } from '../../containers/queries';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Widget, WidgetBody, WidgetTitle } from '@/portainer/components/widget';
|
import { Widget, WidgetBody, WidgetTitle } from '@@/Widget';
|
||||||
import { DetailsTable } from '@/portainer/components/DetailsTable';
|
import { DetailsTable } from '@@/DetailsTable';
|
||||||
|
|
||||||
import { NetworkOptions } from '../types';
|
import { NetworkOptions } from '../types';
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,14 @@
|
||||||
import { usePagination, useTable } from 'react-table';
|
import { usePagination, useTable } from 'react-table';
|
||||||
|
|
||||||
import {
|
|
||||||
Table,
|
|
||||||
TableContainer,
|
|
||||||
TableHeaderRow,
|
|
||||||
TableRow,
|
|
||||||
} from '@/portainer/components/datatables/components';
|
|
||||||
import { InnerDatatable } from '@/portainer/components/datatables/components/InnerDatatable';
|
|
||||||
import { Device } from '@/portainer/hostmanagement/open-amt/model';
|
import { Device } from '@/portainer/hostmanagement/open-amt/model';
|
||||||
import { useAMTDevices } from '@/edge/EdgeDevices/EdgeDevicesView/AMTDevicesDatatable/useAMTDevices';
|
import { useAMTDevices } from '@/edge/EdgeDevices/EdgeDevicesView/AMTDevicesDatatable/useAMTDevices';
|
||||||
import { RowProvider } from '@/edge/EdgeDevices/EdgeDevicesView/AMTDevicesDatatable/columns/RowContext';
|
import { RowProvider } from '@/edge/EdgeDevices/EdgeDevicesView/AMTDevicesDatatable/columns/RowContext';
|
||||||
import { EnvironmentId } from '@/portainer/environments/types';
|
import { EnvironmentId } from '@/portainer/environments/types';
|
||||||
import PortainerError from '@/portainer/error';
|
import PortainerError from '@/portainer/error';
|
||||||
|
|
||||||
|
import { InnerDatatable } from '@@/datatables/InnerDatatable';
|
||||||
|
import { Table, TableContainer, TableHeaderRow, TableRow } from '@@/datatables';
|
||||||
|
|
||||||
import { useColumns } from './columns';
|
import { useColumns } from './columns';
|
||||||
|
|
||||||
export interface AMTDevicesTableProps {
|
export interface AMTDevicesTableProps {
|
||||||
|
|
|
@ -4,11 +4,12 @@ import { MenuItem, MenuLink } from '@reach/menu-button';
|
||||||
import { useQueryClient } from 'react-query';
|
import { useQueryClient } from 'react-query';
|
||||||
|
|
||||||
import { Device } from '@/portainer/hostmanagement/open-amt/model';
|
import { Device } from '@/portainer/hostmanagement/open-amt/model';
|
||||||
import { ActionsMenu } from '@/portainer/components/datatables/components/ActionsMenu';
|
|
||||||
import { confirmAsync } from '@/portainer/services/modal.service/confirm';
|
import { confirmAsync } from '@/portainer/services/modal.service/confirm';
|
||||||
import { executeDeviceAction } from '@/portainer/hostmanagement/open-amt/open-amt.service';
|
import { executeDeviceAction } from '@/portainer/hostmanagement/open-amt/open-amt.service';
|
||||||
import * as notifications from '@/portainer/services/notifications';
|
import * as notifications from '@/portainer/services/notifications';
|
||||||
import { ActionsMenuTitle } from '@/portainer/components/datatables/components/ActionsMenuTitle';
|
|
||||||
|
import { ActionsMenu } from '@@/datatables/ActionsMenu';
|
||||||
|
import { ActionsMenuTitle } from '@@/datatables/ActionsMenuTitle';
|
||||||
|
|
||||||
import { useRowContext } from './RowContext';
|
import { useRowContext } from './RowContext';
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,10 @@ import { useRowSelectColumn } from '@lineup-lite/hooks';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
|
||||||
import { Environment } from '@/portainer/environments/types';
|
import { Environment } from '@/portainer/environments/types';
|
||||||
import { PaginationControls } from '@/portainer/components/pagination-controls';
|
import { AMTDevicesDatatable } from '@/edge/EdgeDevices/EdgeDevicesView/AMTDevicesDatatable/AMTDevicesDatatable';
|
||||||
|
import { EnvironmentGroup } from '@/portainer/environment-groups/types';
|
||||||
|
|
||||||
|
import { PaginationControls } from '@@/PaginationControls';
|
||||||
import {
|
import {
|
||||||
Table,
|
Table,
|
||||||
TableActions,
|
TableActions,
|
||||||
|
@ -13,17 +16,15 @@ import {
|
||||||
TableSettingsMenu,
|
TableSettingsMenu,
|
||||||
TableTitle,
|
TableTitle,
|
||||||
TableTitleActions,
|
TableTitleActions,
|
||||||
} from '@/portainer/components/datatables/components';
|
} from '@@/datatables';
|
||||||
import { multiple } from '@/portainer/components/datatables/components/filter-types';
|
import { multiple } from '@@/datatables/filter-types';
|
||||||
import { useTableSettings } from '@/portainer/components/datatables/components/useTableSettings';
|
import { useTableSettings } from '@@/datatables/useTableSettings';
|
||||||
import { ColumnVisibilityMenu } from '@/portainer/components/datatables/components/ColumnVisibilityMenu';
|
import { ColumnVisibilityMenu } from '@@/datatables/ColumnVisibilityMenu';
|
||||||
import { SearchBar } from '@/portainer/components/datatables/components/SearchBar';
|
import { SearchBar } from '@@/datatables/SearchBar';
|
||||||
import { useRowSelect } from '@/portainer/components/datatables/components/useRowSelect';
|
import { useRowSelect } from '@@/datatables/useRowSelect';
|
||||||
import { TableFooter } from '@/portainer/components/datatables/components/TableFooter';
|
import { TableFooter } from '@@/datatables/TableFooter';
|
||||||
import { SelectedRowsCount } from '@/portainer/components/datatables/components/SelectedRowsCount';
|
import { SelectedRowsCount } from '@@/datatables/SelectedRowsCount';
|
||||||
import { AMTDevicesDatatable } from '@/edge/EdgeDevices/EdgeDevicesView/AMTDevicesDatatable/AMTDevicesDatatable';
|
import { TextTip } from '@@/Tip/TextTip';
|
||||||
import { TextTip } from '@/portainer/components/Tip/TextTip';
|
|
||||||
import { EnvironmentGroup } from '@/portainer/environment-groups/types';
|
|
||||||
|
|
||||||
import { EdgeDevicesDatatableActions } from './EdgeDevicesDatatableActions';
|
import { EdgeDevicesDatatableActions } from './EdgeDevicesDatatableActions';
|
||||||
import { EdgeDevicesDatatableSettings } from './EdgeDevicesDatatableSettings';
|
import { EdgeDevicesDatatableSettings } from './EdgeDevicesDatatableSettings';
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
import { useRouter } from '@uirouter/react';
|
import { useRouter } from '@uirouter/react';
|
||||||
|
|
||||||
import type { Environment } from '@/portainer/environments/types';
|
import type { Environment } from '@/portainer/environments/types';
|
||||||
import { Button } from '@/portainer/components/Button';
|
|
||||||
import { confirmAsync } from '@/portainer/services/modal.service/confirm';
|
import { confirmAsync } from '@/portainer/services/modal.service/confirm';
|
||||||
import { promptAsync } from '@/portainer/services/modal.service/prompt';
|
import { promptAsync } from '@/portainer/services/modal.service/prompt';
|
||||||
import * as notifications from '@/portainer/services/notifications';
|
import * as notifications from '@/portainer/services/notifications';
|
||||||
import { activateDevice } from '@/portainer/hostmanagement/open-amt/open-amt.service';
|
import { activateDevice } from '@/portainer/hostmanagement/open-amt/open-amt.service';
|
||||||
import { deleteEndpoint } from '@/portainer/environments/environment.service';
|
import { deleteEndpoint } from '@/portainer/environments/environment.service';
|
||||||
import { Link } from '@/portainer/components/Link';
|
|
||||||
|
import { Button } from '@@/buttons';
|
||||||
|
import { Link } from '@@/Link';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
selectedItems: Environment[];
|
selectedItems: Environment[];
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
|
||||||
|
import { useEnvironmentList } from '@/portainer/environments/queries/useEnvironmentList';
|
||||||
|
import { Environment } from '@/portainer/environments/types';
|
||||||
|
import { useDebounce } from '@/portainer/hooks/useDebounce';
|
||||||
|
|
||||||
|
import { useSearchBarState } from '@@/datatables/SearchBar';
|
||||||
import {
|
import {
|
||||||
TableSettingsProvider,
|
TableSettingsProvider,
|
||||||
useTableSettings,
|
useTableSettings,
|
||||||
} from '@/portainer/components/datatables/components/useTableSettings';
|
} from '@@/datatables/useTableSettings';
|
||||||
import { useEnvironmentList } from '@/portainer/environments/queries/useEnvironmentList';
|
|
||||||
import { Environment } from '@/portainer/environments/types';
|
|
||||||
import { useSearchBarState } from '@/portainer/components/datatables/components/SearchBar';
|
|
||||||
import { useDebounce } from '@/portainer/hooks/useDebounce';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
EdgeDevicesDatatable,
|
EdgeDevicesDatatable,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { TableSettingsMenuAutoRefresh } from '@/portainer/components/datatables/components/TableSettingsMenuAutoRefresh';
|
import { TableSettingsMenuAutoRefresh } from '@@/datatables/TableSettingsMenuAutoRefresh';
|
||||||
import { useTableSettings } from '@/portainer/components/datatables/components/useTableSettings';
|
import { useTableSettings } from '@@/datatables/useTableSettings';
|
||||||
|
|
||||||
import { EdgeDeviceTableSettings } from './types';
|
import { EdgeDeviceTableSettings } from './types';
|
||||||
|
|
||||||
|
|
|
@ -3,11 +3,12 @@ import { MenuItem, MenuLink } from '@reach/menu-button';
|
||||||
import { useRouter, useSref } from '@uirouter/react';
|
import { useRouter, useSref } from '@uirouter/react';
|
||||||
|
|
||||||
import { Environment } from '@/portainer/environments/types';
|
import { Environment } from '@/portainer/environments/types';
|
||||||
import { ActionsMenu } from '@/portainer/components/datatables/components/ActionsMenu';
|
|
||||||
import { snapshotEndpoint } from '@/portainer/environments/environment.service';
|
import { snapshotEndpoint } from '@/portainer/environments/environment.service';
|
||||||
import * as notifications from '@/portainer/services/notifications';
|
import * as notifications from '@/portainer/services/notifications';
|
||||||
import { getRoute } from '@/portainer/environments/utils';
|
import { getRoute } from '@/portainer/environments/utils';
|
||||||
|
|
||||||
|
import { ActionsMenu } from '@@/datatables/ActionsMenu';
|
||||||
|
|
||||||
export const actions: Column<Environment> = {
|
export const actions: Column<Environment> = {
|
||||||
Header: 'Actions',
|
Header: 'Actions',
|
||||||
accessor: () => 'actions',
|
accessor: () => 'actions',
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import { Column } from 'react-table';
|
import { Column } from 'react-table';
|
||||||
|
|
||||||
import { Environment } from '@/portainer/environments/types';
|
import { Environment } from '@/portainer/environments/types';
|
||||||
import { DefaultFilter } from '@/portainer/components/datatables/components/Filter';
|
|
||||||
|
import { DefaultFilter } from '@@/datatables/Filter';
|
||||||
|
|
||||||
import { useRowContext } from './RowContext';
|
import { useRowContext } from './RowContext';
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
import { CellProps, Column } from 'react-table';
|
import { CellProps, Column } from 'react-table';
|
||||||
|
|
||||||
import { Environment } from '@/portainer/environments/types';
|
import { Environment } from '@/portainer/environments/types';
|
||||||
import { Link } from '@/portainer/components/Link';
|
|
||||||
import { ExpandingCell } from '@/portainer/components/datatables/components/ExpandingCell';
|
import { Link } from '@@/Link';
|
||||||
|
import { ExpandingCell } from '@@/datatables/ExpandingCell';
|
||||||
|
|
||||||
import { useRowContext } from './RowContext';
|
import { useRowContext } from './RowContext';
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ import {
|
||||||
RefreshableTableSettings,
|
RefreshableTableSettings,
|
||||||
SettableColumnsTableSettings,
|
SettableColumnsTableSettings,
|
||||||
SortableTableSettings,
|
SortableTableSettings,
|
||||||
} from '@/portainer/components/datatables/types';
|
} from '@@/datatables/types';
|
||||||
|
|
||||||
export interface Pagination {
|
export interface Pagination {
|
||||||
pageLimit: number;
|
pageLimit: number;
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
|
||||||
import { PageHeader } from '@/portainer/components/PageHeader';
|
|
||||||
import { useSettings } from '@/portainer/settings/queries';
|
import { useSettings } from '@/portainer/settings/queries';
|
||||||
import { useGroups } from '@/portainer/environment-groups/queries';
|
import { useGroups } from '@/portainer/environment-groups/queries';
|
||||||
import { r2a } from '@/react-tools/react2angular';
|
import { r2a } from '@/react-tools/react2angular';
|
||||||
import { ViewLoading } from '@/portainer/components/ViewLoading';
|
|
||||||
|
import { PageHeader } from '@@/PageHeader';
|
||||||
|
import { ViewLoading } from '@@/ViewLoading';
|
||||||
|
|
||||||
import { EdgeDevicesDatatableContainer } from './EdgeDevicesDatatable/EdgeDevicesDatatableContainer';
|
import { EdgeDevicesDatatableContainer } from './EdgeDevicesDatatable/EdgeDevicesDatatableContainer';
|
||||||
|
|
||||||
|
|
|
@ -8,18 +8,16 @@ import {
|
||||||
} from 'react-table';
|
} from 'react-table';
|
||||||
import { useRowSelectColumn } from '@lineup-lite/hooks';
|
import { useRowSelectColumn } from '@lineup-lite/hooks';
|
||||||
|
|
||||||
import { Button } from '@/portainer/components/Button';
|
|
||||||
import { Table } from '@/portainer/components/datatables/components';
|
|
||||||
import {
|
|
||||||
SearchBar,
|
|
||||||
useSearchBarState,
|
|
||||||
} from '@/portainer/components/datatables/components/SearchBar';
|
|
||||||
import { SelectedRowsCount } from '@/portainer/components/datatables/components/SelectedRowsCount';
|
|
||||||
import { PaginationControls } from '@/portainer/components/pagination-controls';
|
|
||||||
import { Environment } from '@/portainer/environments/types';
|
import { Environment } from '@/portainer/environments/types';
|
||||||
import { useTableSettings } from '@/portainer/components/datatables/components/useTableSettings';
|
|
||||||
import { notifySuccess } from '@/portainer/services/notifications';
|
import { notifySuccess } from '@/portainer/services/notifications';
|
||||||
|
|
||||||
|
import { Button } from '@@/buttons';
|
||||||
|
import { Table } from '@@/datatables';
|
||||||
|
import { SearchBar, useSearchBarState } from '@@/datatables/SearchBar';
|
||||||
|
import { SelectedRowsCount } from '@@/datatables/SelectedRowsCount';
|
||||||
|
import { PaginationControls } from '@@/PaginationControls';
|
||||||
|
import { useTableSettings } from '@@/datatables/useTableSettings';
|
||||||
|
|
||||||
import { useAssociateDeviceMutation } from '../queries';
|
import { useAssociateDeviceMutation } from '../queries';
|
||||||
|
|
||||||
import { TableSettings } from './types';
|
import { TableSettings } from './types';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import {
|
import {
|
||||||
PaginationTableSettings,
|
PaginationTableSettings,
|
||||||
SortableTableSettings,
|
SortableTableSettings,
|
||||||
} from '@/portainer/components/datatables/types';
|
} from '@@/datatables/types';
|
||||||
|
|
||||||
export interface TableSettings
|
export interface TableSettings
|
||||||
extends SortableTableSettings,
|
extends SortableTableSettings,
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import { useRouter } from '@uirouter/react';
|
import { useRouter } from '@uirouter/react';
|
||||||
|
|
||||||
import { TableSettingsProvider } from '@/portainer/components/datatables/components/useTableSettings';
|
|
||||||
import { PageHeader } from '@/portainer/components/PageHeader';
|
|
||||||
import { useEnvironmentList } from '@/portainer/environments/queries/useEnvironmentList';
|
import { useEnvironmentList } from '@/portainer/environments/queries/useEnvironmentList';
|
||||||
import { r2a } from '@/react-tools/react2angular';
|
import { r2a } from '@/react-tools/react2angular';
|
||||||
|
|
||||||
|
import { TableSettingsProvider } from '@@/datatables/useTableSettings';
|
||||||
|
import { PageHeader } from '@@/PageHeader';
|
||||||
|
|
||||||
import { DataTable } from './Datatable/Datatable';
|
import { DataTable } from './Datatable/Datatable';
|
||||||
import { TableSettings } from './Datatable/types';
|
import { TableSettings } from './Datatable/types';
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
import { FormControl } from '@/portainer/components/form-components/FormControl';
|
|
||||||
import { Select } from '@/portainer/components/form-components/Input';
|
|
||||||
import { useSettings } from '@/portainer/settings/queries';
|
import { useSettings } from '@/portainer/settings/queries';
|
||||||
import { r2a } from '@/react-tools/react2angular';
|
import { r2a } from '@/react-tools/react2angular';
|
||||||
|
|
||||||
|
import { FormControl } from '@@/form-components/FormControl';
|
||||||
|
import { Select } from '@@/form-components/Input';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
value: number;
|
value: number;
|
||||||
onChange(value: number): void;
|
onChange(value: number): void;
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import { FormikErrors } from 'formik';
|
import { FormikErrors } from 'formik';
|
||||||
|
|
||||||
import { useUser } from '@/portainer/hooks/useUser';
|
import { useUser } from '@/portainer/hooks/useUser';
|
||||||
import { FormSectionTitle } from '@/portainer/components/form-components/FormSectionTitle';
|
|
||||||
import { SwitchField } from '@/portainer/components/form-components/SwitchField';
|
|
||||||
import { EditDetails } from '@/portainer/access-control/EditDetails/EditDetails';
|
import { EditDetails } from '@/portainer/access-control/EditDetails/EditDetails';
|
||||||
|
|
||||||
|
import { FormSectionTitle } from '@@/form-components/FormSectionTitle';
|
||||||
|
import { SwitchField } from '@@/form-components/SwitchField';
|
||||||
|
|
||||||
import { ResourceControlOwnership, AccessControlFormData } from '../types';
|
import { ResourceControlOwnership, AccessControlFormData } from '../types';
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
import { useReducer } from 'react';
|
import { useReducer } from 'react';
|
||||||
|
|
||||||
import { Button } from '@/portainer/components/Button';
|
|
||||||
import { Widget, WidgetBody, WidgetTitle } from '@/portainer/components/widget';
|
|
||||||
import { useUser } from '@/portainer/hooks/useUser';
|
import { useUser } from '@/portainer/hooks/useUser';
|
||||||
import { r2a } from '@/react-tools/react2angular';
|
import { r2a } from '@/react-tools/react2angular';
|
||||||
import { TeamMembership, Role } from '@/portainer/teams/types';
|
import { TeamMembership, Role } from '@/portainer/teams/types';
|
||||||
import { useUserMembership } from '@/portainer/users/queries';
|
import { useUserMembership } from '@/portainer/users/queries';
|
||||||
|
|
||||||
|
import { Widget, WidgetBody, WidgetTitle } from '@@/Widget';
|
||||||
|
import { Button } from '@@/buttons';
|
||||||
|
|
||||||
import { ResourceControlType, ResourceId } from '../types';
|
import { ResourceControlType, ResourceId } from '../types';
|
||||||
import { ResourceControlViewModel } from '../models/ResourceControlViewModel';
|
import { ResourceControlViewModel } from '../models/ResourceControlViewModel';
|
||||||
|
|
||||||
|
|
|
@ -3,13 +3,14 @@ import { PropsWithChildren } from 'react';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
|
||||||
import { ownershipIcon, truncate } from '@/portainer/filters/filters';
|
import { ownershipIcon, truncate } from '@/portainer/filters/filters';
|
||||||
import { Tooltip } from '@/portainer/components/Tip/Tooltip';
|
|
||||||
import { Link } from '@/portainer/components/Link';
|
|
||||||
import { UserId } from '@/portainer/users/types';
|
import { UserId } from '@/portainer/users/types';
|
||||||
import { TeamId } from '@/portainer/teams/types';
|
import { TeamId } from '@/portainer/teams/types';
|
||||||
import { useTeams } from '@/portainer/teams/queries';
|
import { useTeams } from '@/portainer/teams/queries';
|
||||||
import { useUsers } from '@/portainer/users/queries';
|
import { useUsers } from '@/portainer/users/queries';
|
||||||
|
|
||||||
|
import { Link } from '@@/Link';
|
||||||
|
import { Tooltip } from '@@/Tip/Tooltip';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ResourceControlOwnership,
|
ResourceControlOwnership,
|
||||||
ResourceControlType,
|
ResourceControlType,
|
||||||
|
|
|
@ -4,11 +4,12 @@ import { useMutation } from 'react-query';
|
||||||
import { object } from 'yup';
|
import { object } from 'yup';
|
||||||
|
|
||||||
import { useUser } from '@/portainer/hooks/useUser';
|
import { useUser } from '@/portainer/hooks/useUser';
|
||||||
import { Button } from '@/portainer/components/Button';
|
|
||||||
import { LoadingButton } from '@/portainer/components/Button/LoadingButton';
|
|
||||||
import { confirmAsync } from '@/portainer/services/modal.service/confirm';
|
import { confirmAsync } from '@/portainer/services/modal.service/confirm';
|
||||||
import { notifySuccess } from '@/portainer/services/notifications';
|
import { notifySuccess } from '@/portainer/services/notifications';
|
||||||
|
|
||||||
|
import { Button } from '@@/buttons';
|
||||||
|
import { LoadingButton } from '@@/buttons/LoadingButton';
|
||||||
|
|
||||||
import { EditDetails } from '../EditDetails';
|
import { EditDetails } from '../EditDetails';
|
||||||
import { parseAccessControlFormData } from '../utils';
|
import { parseAccessControlFormData } from '../utils';
|
||||||
import { validationSchema } from '../AccessControlForm/AccessControlForm.validation';
|
import { validationSchema } from '../AccessControlForm/AccessControlForm.validation';
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
import { FormikErrors } from 'formik';
|
import { FormikErrors } from 'formik';
|
||||||
|
|
||||||
import { BoxSelector } from '@/portainer/components/BoxSelector';
|
|
||||||
import { useUser } from '@/portainer/hooks/useUser';
|
import { useUser } from '@/portainer/hooks/useUser';
|
||||||
import { FormError } from '@/portainer/components/form-components/FormError';
|
|
||||||
|
import { BoxSelector } from '@@/BoxSelector';
|
||||||
|
import { FormError } from '@@/form-components/FormError';
|
||||||
|
|
||||||
import { ResourceControlOwnership, AccessControlFormData } from '../types';
|
import { ResourceControlOwnership, AccessControlFormData } from '../types';
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
import { TeamsSelector } from '@/portainer/components/TeamsSelector';
|
|
||||||
import { FormControl } from '@/portainer/components/form-components/FormControl';
|
|
||||||
import { Link } from '@/portainer/components/Link';
|
|
||||||
import { Team } from '@/portainer/teams/types';
|
import { Team } from '@/portainer/teams/types';
|
||||||
|
|
||||||
|
import { TeamsSelector } from '@@/TeamsSelector';
|
||||||
|
import { FormControl } from '@@/form-components/FormControl';
|
||||||
|
import { Link } from '@@/Link';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
name: string;
|
name: string;
|
||||||
teams: Team[];
|
teams: Team[];
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
import { UsersSelector } from '@/portainer/components/UsersSelector';
|
|
||||||
import { FormControl } from '@/portainer/components/form-components/FormControl';
|
|
||||||
import { Link } from '@/portainer/components/Link';
|
|
||||||
import { User } from '@/portainer/users/types';
|
import { User } from '@/portainer/users/types';
|
||||||
|
|
||||||
|
import { UsersSelector } from '@@/UsersSelector';
|
||||||
|
import { FormControl } from '@@/form-components/FormControl';
|
||||||
|
import { Link } from '@@/Link';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
name: string;
|
name: string;
|
||||||
users: User[];
|
users: User[];
|
||||||
|
|
|
@ -2,10 +2,11 @@ import _ from 'lodash';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
import { buildOption } from '@/portainer/components/BoxSelector';
|
import { buildOption } from '@/portainer/components/BoxSelector';
|
||||||
import { BoxSelectorOption } from '@/portainer/components/BoxSelector/types';
|
|
||||||
import { ownershipIcon } from '@/portainer/filters/filters';
|
import { ownershipIcon } from '@/portainer/filters/filters';
|
||||||
import { Team } from '@/portainer/teams/types';
|
import { Team } from '@/portainer/teams/types';
|
||||||
|
|
||||||
|
import { BoxSelectorOption } from '@@/BoxSelector/types';
|
||||||
|
|
||||||
import { ResourceControlOwnership } from '../types';
|
import { ResourceControlOwnership } from '../types';
|
||||||
|
|
||||||
const publicOption: BoxSelectorOption<ResourceControlOwnership> = {
|
const publicOption: BoxSelectorOption<ResourceControlOwnership> = {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { FeatureId } from '@/portainer/feature-flags/enums';
|
import { FeatureId } from '@/portainer/feature-flags/enums';
|
||||||
|
|
||||||
import { getFeatureDetails } from './utils';
|
import { getFeatureDetails } from '@@/BEFeatureIndicator/utils';
|
||||||
|
|
||||||
export default class BeIndicatorController {
|
export default class BeIndicatorController {
|
||||||
limitedToBE?: boolean;
|
limitedToBE?: boolean;
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
import controller from './BEFeatureIndicator.controller';
|
import controller from './BEFeatureIndicator.controller';
|
||||||
|
|
||||||
import './BEFeatureIndicator.css';
|
export const beFeatureIndicator = {
|
||||||
|
|
||||||
export const beFeatureIndicatorAngular = {
|
|
||||||
templateUrl: './BEFeatureIndicator.html',
|
templateUrl: './BEFeatureIndicator.html',
|
||||||
controller,
|
controller,
|
||||||
bindings: {
|
bindings: {
|
||||||
|
@ -10,5 +8,3 @@ export const beFeatureIndicatorAngular = {
|
||||||
},
|
},
|
||||||
transclude: true,
|
transclude: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
export { BEFeatureIndicator } from './BEFeatureIndicator';
|
|
||||||
|
|
|
@ -2,12 +2,11 @@ import angular from 'angular';
|
||||||
|
|
||||||
import { react2angular } from '@/react-tools/react2angular';
|
import { react2angular } from '@/react-tools/react2angular';
|
||||||
|
|
||||||
import { BoxSelector, buildOption } from './BoxSelector';
|
import { BoxSelector } from '@@/BoxSelector';
|
||||||
|
|
||||||
import { BoxSelectorAngular } from './BoxSelectorAngular';
|
import { BoxSelectorAngular } from './BoxSelectorAngular';
|
||||||
|
|
||||||
export { type BoxSelectorOption } from './types';
|
export { buildOption } from './utils';
|
||||||
|
|
||||||
export { BoxSelector, buildOption };
|
|
||||||
const BoxSelectorReact = react2angular(BoxSelector, [
|
const BoxSelectorReact = react2angular(BoxSelector, [
|
||||||
'value',
|
'value',
|
||||||
'onChange',
|
'onChange',
|
||||||
|
@ -15,7 +14,7 @@ const BoxSelectorReact = react2angular(BoxSelector, [
|
||||||
'radioName',
|
'radioName',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
export default angular
|
export const boxSelectorModule = angular
|
||||||
.module('app.portainer.component.box-selector', [])
|
.module('app.portainer.component.box-selector', [])
|
||||||
.component('boxSelectorReact', BoxSelectorReact)
|
.component('boxSelectorReact', BoxSelectorReact)
|
||||||
.component('boxSelector', BoxSelectorAngular).name;
|
.component('boxSelector', BoxSelectorAngular).name;
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
import { FeatureId } from '@/portainer/feature-flags/enums';
|
||||||
|
|
||||||
|
import { BoxSelectorOption } from '@@/BoxSelector/types';
|
||||||
|
|
||||||
|
export function buildOption<T extends number | string>(
|
||||||
|
id: string,
|
||||||
|
icon: string,
|
||||||
|
label: string,
|
||||||
|
description: string,
|
||||||
|
value: T,
|
||||||
|
feature?: FeatureId
|
||||||
|
): BoxSelectorOption<T> {
|
||||||
|
return { id, icon, label, description, value, feature };
|
||||||
|
}
|
|
@ -1,5 +0,0 @@
|
||||||
import { Button } from './Button';
|
|
||||||
import { AddButton } from './AddButton';
|
|
||||||
import { ButtonGroup } from './ButtonGroup';
|
|
||||||
|
|
||||||
export { Button, AddButton, ButtonGroup };
|
|
|
@ -1,3 +1 @@
|
||||||
export { InformationPanel } from './InformationPanel';
|
|
||||||
|
|
||||||
export { InformationPanelAngular } from './InformationPanelAngular';
|
export { InformationPanelAngular } from './InformationPanelAngular';
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
export const Header = {
|
||||||
|
transclude: true,
|
||||||
|
templateUrl: './HeaderContainer.html',
|
||||||
|
};
|
|
@ -0,0 +1,8 @@
|
||||||
|
import controller from './HeaderContent.controller';
|
||||||
|
|
||||||
|
export const HeaderContent = {
|
||||||
|
requires: '^rdHeader',
|
||||||
|
transclude: true,
|
||||||
|
templateUrl: './HeaderContent.html',
|
||||||
|
controller,
|
||||||
|
};
|
|
@ -0,0 +1,11 @@
|
||||||
|
import controller from './HeaderTitle.controller';
|
||||||
|
|
||||||
|
export const HeaderTitle = {
|
||||||
|
requires: '^rdHeader',
|
||||||
|
bindings: {
|
||||||
|
titleText: '@',
|
||||||
|
},
|
||||||
|
transclude: true,
|
||||||
|
templateUrl: './HeaderTitle.html',
|
||||||
|
controller,
|
||||||
|
};
|
|
@ -1,16 +1,12 @@
|
||||||
import angular from 'angular';
|
import angular from 'angular';
|
||||||
|
|
||||||
import { Breadcrumbs } from './Breadcrumbs';
|
import { Header } from './HeaderContainer';
|
||||||
import { PageHeader } from './PageHeader';
|
import { HeaderContent } from './HeaderContent';
|
||||||
import { HeaderContainer, HeaderAngular } from './HeaderContainer';
|
import { HeaderTitle } from './HeaderTitle';
|
||||||
import { HeaderContent, HeaderContentAngular } from './HeaderContent';
|
|
||||||
import { HeaderTitle, HeaderTitleAngular } from './HeaderTitle';
|
|
||||||
|
|
||||||
export { PageHeader, Breadcrumbs, HeaderContainer, HeaderContent, HeaderTitle };
|
|
||||||
|
|
||||||
export const pageHeaderModule = angular
|
export const pageHeaderModule = angular
|
||||||
.module('portainer.app.components.header', [])
|
.module('portainer.app.components.header', [])
|
||||||
|
|
||||||
.component('rdHeader', HeaderAngular)
|
.component('rdHeader', Header)
|
||||||
.component('rdHeaderContent', HeaderContentAngular)
|
.component('rdHeaderContent', HeaderContent)
|
||||||
.component('rdHeaderTitle', HeaderTitleAngular).name;
|
.component('rdHeaderTitle', HeaderTitle).name;
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
.red-bg {
|
|
||||||
background: red;
|
|
||||||
}
|
|
|
@ -1,24 +0,0 @@
|
||||||
import { UIRouter, pushStateLocationPlugin } from '@uirouter/react';
|
|
||||||
import { Meta } from '@storybook/react';
|
|
||||||
|
|
||||||
import { ReactExample } from './ReactExample';
|
|
||||||
|
|
||||||
const meta: Meta = {
|
|
||||||
title: 'ReactExample',
|
|
||||||
component: ReactExample,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default meta;
|
|
||||||
export { Example };
|
|
||||||
|
|
||||||
interface Props {
|
|
||||||
text: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
function Example({ text }: Props) {
|
|
||||||
return (
|
|
||||||
<UIRouter plugins={[pushStateLocationPlugin]}>
|
|
||||||
<ReactExample text={text} />
|
|
||||||
</UIRouter>
|
|
||||||
);
|
|
||||||
}
|
|
|
@ -1,59 +0,0 @@
|
||||||
import { useSref } from '@uirouter/react';
|
|
||||||
import { Trans, useTranslation } from 'react-i18next';
|
|
||||||
|
|
||||||
import i18n from '@/i18n';
|
|
||||||
import { react2angular } from '@/react-tools/react2angular';
|
|
||||||
|
|
||||||
import { Link } from './Link';
|
|
||||||
import styles from './ReactExample.module.css';
|
|
||||||
|
|
||||||
export interface ReactExampleProps {
|
|
||||||
/**
|
|
||||||
* Example text to displayed in the component.
|
|
||||||
*/
|
|
||||||
text: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const lngs = {
|
|
||||||
en: { nativeName: 'English' },
|
|
||||||
de: { nativeName: 'Deutsch' },
|
|
||||||
he: { nativeName: 'Hebrew' },
|
|
||||||
};
|
|
||||||
|
|
||||||
export function ReactExample({ text }: ReactExampleProps) {
|
|
||||||
const route = 'portainer.registries';
|
|
||||||
const { onClick, href } = useSref(route);
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<div className={styles.redBg}>{text}</div>
|
|
||||||
<div>
|
|
||||||
<a href={href} onClick={onClick}>
|
|
||||||
{t('Registries useSref')}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<Link to={route}>
|
|
||||||
<Trans>
|
|
||||||
Registries <strong>Link</strong>
|
|
||||||
</Trans>
|
|
||||||
</Link>
|
|
||||||
</div>
|
|
||||||
{Object.entries(lngs).map(([lng, lngConfig]) => (
|
|
||||||
<button
|
|
||||||
key={lng}
|
|
||||||
style={{
|
|
||||||
fontWeight: i18n.resolvedLanguage === lng ? 'bold' : 'normal',
|
|
||||||
}}
|
|
||||||
type="submit"
|
|
||||||
onClick={() => i18n.changeLanguage(lng)}
|
|
||||||
>
|
|
||||||
{lngConfig.nativeName}
|
|
||||||
</button>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const ReactExampleAngular = react2angular(ReactExample, ['text']);
|
|
|
@ -1,4 +1 @@
|
||||||
import { Tooltip } from './Tooltip';
|
export { TooltipAngular } from './TooltipAngular';
|
||||||
import { TooltipAngular } from './TooltipAngular';
|
|
||||||
|
|
||||||
export { Tooltip, TooltipAngular };
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
export { ViewLoading, ViewLoadingAngular } from './ViewLoading';
|
|
|
@ -1,2 +0,0 @@
|
||||||
export { FileUploadField, FileUploadFieldAngular } from './FileUploadField';
|
|
||||||
export { FileUploadForm } from './FileUploadForm';
|
|
|
@ -1 +0,0 @@
|
||||||
export { SwitchField, SwitchFieldAngular } from './SwitchField';
|
|
|
@ -3,13 +3,4 @@ import angular from 'angular';
|
||||||
import { webEditorForm } from './web-editor-form';
|
import { webEditorForm } from './web-editor-form';
|
||||||
import { fileUploadForm } from './file-upload-form';
|
import { fileUploadForm } from './file-upload-form';
|
||||||
|
|
||||||
import { SwitchFieldAngular } from './SwitchField';
|
export default angular.module('portainer.app.components.form', []).component('webEditorForm', webEditorForm).component('fileUploadForm', fileUploadForm).name;
|
||||||
|
|
||||||
import { FileUploadFieldAngular } from './FileUpload';
|
|
||||||
|
|
||||||
export default angular
|
|
||||||
.module('portainer.app.components.form', [])
|
|
||||||
.component('webEditorForm', webEditorForm)
|
|
||||||
.component('fileUploadForm', fileUploadForm)
|
|
||||||
.component('fileUploadField', FileUploadFieldAngular)
|
|
||||||
.component('porSwitchField', SwitchFieldAngular).name;
|
|
||||||
|
|
|
@ -1,28 +1,20 @@
|
||||||
import angular from 'angular';
|
import angular from 'angular';
|
||||||
|
|
||||||
import { CreateAccessTokenAngular } from '../views/account/CreateAccessToken';
|
import formComponentsModule from './form-components';
|
||||||
|
|
||||||
import sidebarModule from './sidebar';
|
import sidebarModule from './sidebar';
|
||||||
import gitFormModule from './forms/git-form';
|
import gitFormModule from './forms/git-form';
|
||||||
import porAccessManagementModule from './accessManagement';
|
import porAccessManagementModule from './accessManagement';
|
||||||
import formComponentsModule from './form-components';
|
|
||||||
import widgetModule from './widget';
|
import widgetModule from './widget';
|
||||||
import boxSelectorModule from './BoxSelector';
|
import { boxSelectorModule } from './BoxSelector';
|
||||||
import { pageHeaderModule } from './PageHeader';
|
import { pageHeaderModule } from './PageHeader';
|
||||||
|
|
||||||
import { ReactExampleAngular } from './ReactExample';
|
|
||||||
import { TooltipAngular } from './Tip/Tooltip';
|
import { TooltipAngular } from './Tip/Tooltip';
|
||||||
import { beFeatureIndicatorAngular } from './BEFeatureIndicator';
|
import { beFeatureIndicator } from './BEFeatureIndicator';
|
||||||
import { InformationPanelAngular } from './InformationPanel';
|
import { InformationPanelAngular } from './InformationPanel';
|
||||||
import { PasswordCheckHintAngular } from './PasswordCheckHint';
|
|
||||||
import { ViewLoadingAngular } from './ViewLoading';
|
|
||||||
|
|
||||||
export default angular
|
export default angular
|
||||||
.module('portainer.app.components', [pageHeaderModule, boxSelectorModule, widgetModule, sidebarModule, gitFormModule, porAccessManagementModule, formComponentsModule])
|
.module('portainer.app.components', [pageHeaderModule, boxSelectorModule, widgetModule, sidebarModule, gitFormModule, porAccessManagementModule, formComponentsModule])
|
||||||
.component('informationPanel', InformationPanelAngular)
|
.component('informationPanel', InformationPanelAngular)
|
||||||
.component('viewLoading', ViewLoadingAngular)
|
|
||||||
.component('portainerTooltip', TooltipAngular)
|
.component('portainerTooltip', TooltipAngular)
|
||||||
.component('reactExample', ReactExampleAngular)
|
.component('beFeatureIndicator', beFeatureIndicator).name;
|
||||||
.component('beFeatureIndicator', beFeatureIndicatorAngular)
|
|
||||||
.component('passwordCheckHint', PasswordCheckHintAngular)
|
|
||||||
.component('createAccessToken', CreateAccessTokenAngular).name;
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { PropsWithChildren } from 'react';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import { UISrefActive } from '@uirouter/react';
|
import { UISrefActive } from '@uirouter/react';
|
||||||
|
|
||||||
import { Link } from '@/portainer/components/Link';
|
import { Link } from '@@/Link';
|
||||||
|
|
||||||
import '../sidebar.css';
|
import '../sidebar.css';
|
||||||
import styles from './SidebarMenuItem.module.css';
|
import styles from './SidebarMenuItem.module.css';
|
||||||
|
|
|
@ -1,18 +1,14 @@
|
||||||
import angular from 'angular';
|
import angular from 'angular';
|
||||||
|
|
||||||
import { LoadingAngular } from './Loading';
|
import { rdWidgetBody } from './rd-widget-body';
|
||||||
import { rdWidget, Widget } from './Widget';
|
import { rdWidget } from './rd-widget';
|
||||||
import { rdWidgetBody, WidgetBody } from './WidgetBody';
|
import { rdWidgetCustomHeader } from './rd-widget-custom-header';
|
||||||
import { rdWidgetCustomHeader } from './WidgetCustomHeader';
|
import { rdWidgetFooter } from './rd-widget-footer';
|
||||||
import { rdWidgetFooter, WidgetFooter } from './WidgetFooter';
|
import { rdWidgetTaskbar } from './rd-widget-taskbar';
|
||||||
import { rdWidgetTitle, WidgetTitle } from './WidgetTitle';
|
import { rdWidgetTitle } from './rd-widget-title';
|
||||||
import { rdWidgetTaskbar, WidgetTaskbar } from './WidgetTaskbar';
|
|
||||||
|
|
||||||
export { Widget, WidgetBody, WidgetFooter, WidgetTitle, WidgetTaskbar };
|
|
||||||
|
|
||||||
export default angular
|
export default angular
|
||||||
.module('portainer.shared.components.widget', [])
|
.module('portainer.app.components.widget', [])
|
||||||
.component('rdLoading', LoadingAngular)
|
|
||||||
.component('rdWidget', rdWidget)
|
.component('rdWidget', rdWidget)
|
||||||
.component('rdWidgetBody', rdWidgetBody)
|
.component('rdWidgetBody', rdWidgetBody)
|
||||||
.component('rdWidgetCustomHeader', rdWidgetCustomHeader)
|
.component('rdWidgetCustomHeader', rdWidgetCustomHeader)
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
export const rdWidgetBody = {
|
||||||
|
requires: '^rdWidget',
|
||||||
|
bindings: {
|
||||||
|
loading: '@?',
|
||||||
|
classes: '@?',
|
||||||
|
},
|
||||||
|
transclude: true,
|
||||||
|
template: `
|
||||||
|
<div class="widget-body" ng-class="$ctrl.classes">
|
||||||
|
<rd-loading ng-show="$ctrl.loading"></rd-loading>
|
||||||
|
<div ng-hide="$ctrl.loading" class="widget-content" ng-transclude></div>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
};
|
|
@ -0,0 +1,7 @@
|
||||||
|
export const rdWidgetFooter = {
|
||||||
|
requires: '^rdWidget',
|
||||||
|
transclude: true,
|
||||||
|
template: `
|
||||||
|
<div class="widget-footer" ng-transclude></div>
|
||||||
|
`,
|
||||||
|
};
|
|
@ -0,0 +1,14 @@
|
||||||
|
export const rdWidgetTaskbar = {
|
||||||
|
requires: '^rdWidget',
|
||||||
|
bindings: {
|
||||||
|
classes: '@?',
|
||||||
|
},
|
||||||
|
transclude: true,
|
||||||
|
template: `
|
||||||
|
<div class="widget-header">
|
||||||
|
<div class="row">
|
||||||
|
<div ng-class="$ctrl.classes" ng-transclude></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
};
|
|
@ -0,0 +1,22 @@
|
||||||
|
export const rdWidgetTitle = {
|
||||||
|
requires: '^rdWidget',
|
||||||
|
bindings: {
|
||||||
|
titleText: '@',
|
||||||
|
icon: '@',
|
||||||
|
classes: '@?',
|
||||||
|
},
|
||||||
|
transclude: {
|
||||||
|
title: '?headerTitle',
|
||||||
|
},
|
||||||
|
template: `
|
||||||
|
<div class="widget-header">
|
||||||
|
<div class="row">
|
||||||
|
<span ng-class="$ctrl.classes" class="pull-left">
|
||||||
|
<i class="fa" ng-class="$ctrl.icon"></i>
|
||||||
|
<span ng-transclude="title">{{ $ctrl.titleText }}</span>
|
||||||
|
</span>
|
||||||
|
<span ng-class="$ctrl.classes" class="pull-right" ng-transclude></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
};
|
|
@ -0,0 +1,4 @@
|
||||||
|
export const rdWidget = {
|
||||||
|
transclude: true,
|
||||||
|
template: `<div class="widget" ng-transclude></div>`,
|
||||||
|
};
|
|
@ -2,11 +2,12 @@ import { useQuery } from 'react-query';
|
||||||
|
|
||||||
import { error as notifyError } from '@/portainer/services/notifications';
|
import { error as notifyError } from '@/portainer/services/notifications';
|
||||||
|
|
||||||
import { InformationPanel } from '../components/InformationPanel';
|
import { InformationPanel } from '@@/InformationPanel';
|
||||||
import { TextTip } from '../components/Tip/TextTip';
|
import { TextTip } from '@@/Tip/TextTip';
|
||||||
|
import { Link } from '@@/Link';
|
||||||
|
|
||||||
import { getBackupStatus } from '../services/api/backup.service';
|
import { getBackupStatus } from '../services/api/backup.service';
|
||||||
import { isoDate } from '../filters/filters';
|
import { isoDate } from '../filters/filters';
|
||||||
import { Link } from '../components/Link';
|
|
||||||
|
|
||||||
export function BackupFailedPanel() {
|
export function BackupFailedPanel() {
|
||||||
const { status, isLoading } = useBackupStatus();
|
const { status, isLoading } = useBackupStatus();
|
||||||
|
|
|
@ -13,11 +13,12 @@ import {
|
||||||
isEdgeEnvironment,
|
isEdgeEnvironment,
|
||||||
} from '@/portainer/environments/utils';
|
} from '@/portainer/environments/utils';
|
||||||
import type { TagId } from '@/portainer/tags/types';
|
import type { TagId } from '@/portainer/tags/types';
|
||||||
import { Button } from '@/portainer/components/Button';
|
|
||||||
import { Link } from '@/portainer/components/Link';
|
|
||||||
import { useIsAdmin } from '@/portainer/hooks/useUser';
|
import { useIsAdmin } from '@/portainer/hooks/useUser';
|
||||||
import { useTags } from '@/portainer/tags/queries';
|
import { useTags } from '@/portainer/tags/queries';
|
||||||
|
|
||||||
|
import { Button } from '@@/buttons';
|
||||||
|
import { Link } from '@@/Link';
|
||||||
|
|
||||||
import { EnvironmentIcon } from './EnvironmentIcon';
|
import { EnvironmentIcon } from './EnvironmentIcon';
|
||||||
import { EdgeIndicator } from './EdgeIndicator';
|
import { EdgeIndicator } from './EdgeIndicator';
|
||||||
import { EnvironmentStats } from './EnvironmentStats';
|
import { EnvironmentStats } from './EnvironmentStats';
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { ReactNode, useEffect, useState } from 'react';
|
import { ReactNode, useEffect, useState } from 'react';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
|
|
||||||
import { PaginationControls } from '@/portainer/components/pagination-controls';
|
|
||||||
import { usePaginationLimitState } from '@/portainer/hooks/usePaginationLimitState';
|
import { usePaginationLimitState } from '@/portainer/hooks/usePaginationLimitState';
|
||||||
import {
|
import {
|
||||||
Environment,
|
Environment,
|
||||||
|
@ -9,23 +8,11 @@ import {
|
||||||
EnvironmentStatus,
|
EnvironmentStatus,
|
||||||
} from '@/portainer/environments/types';
|
} from '@/portainer/environments/types';
|
||||||
import { EnvironmentGroupId } from '@/portainer/environment-groups/types';
|
import { EnvironmentGroupId } from '@/portainer/environment-groups/types';
|
||||||
import { Button } from '@/portainer/components/Button';
|
|
||||||
import { useIsAdmin } from '@/portainer/hooks/useUser';
|
import { useIsAdmin } from '@/portainer/hooks/useUser';
|
||||||
import {
|
|
||||||
FilterSearchBar,
|
|
||||||
useSearchBarState,
|
|
||||||
} from '@/portainer/components/datatables/components/FilterSearchBar';
|
|
||||||
import { SortbySelector } from '@/portainer/components/datatables/components/SortbySelector';
|
|
||||||
import {
|
import {
|
||||||
HomepageFilter,
|
HomepageFilter,
|
||||||
useHomePageFilter,
|
useHomePageFilter,
|
||||||
} from '@/portainer/home/HomepageFilter';
|
} from '@/portainer/home/HomepageFilter';
|
||||||
import {
|
|
||||||
TableActions,
|
|
||||||
TableContainer,
|
|
||||||
TableTitle,
|
|
||||||
} from '@/portainer/components/datatables/components';
|
|
||||||
import { TableFooter } from '@/portainer/components/datatables/components/TableFooter';
|
|
||||||
import { useDebounce } from '@/portainer/hooks/useDebounce';
|
import { useDebounce } from '@/portainer/hooks/useDebounce';
|
||||||
import {
|
import {
|
||||||
refetchIfAnyOffline,
|
refetchIfAnyOffline,
|
||||||
|
@ -35,6 +22,16 @@ import { useGroups } from '@/portainer/environment-groups/queries';
|
||||||
import { useTags } from '@/portainer/tags/queries';
|
import { useTags } from '@/portainer/tags/queries';
|
||||||
import { Filter } from '@/portainer/home/types';
|
import { Filter } from '@/portainer/home/types';
|
||||||
|
|
||||||
|
import { TableFooter } from '@@/datatables/TableFooter';
|
||||||
|
import { TableActions, TableContainer, TableTitle } from '@@/datatables';
|
||||||
|
import { SortbySelector } from '@@/datatables/SortbySelector';
|
||||||
|
import {
|
||||||
|
FilterSearchBar,
|
||||||
|
useSearchBarState,
|
||||||
|
} from '@@/datatables/FilterSearchBar';
|
||||||
|
import { Button } from '@@/buttons';
|
||||||
|
import { PaginationControls } from '@@/PaginationControls';
|
||||||
|
|
||||||
import { EnvironmentItem } from './EnvironmentItem';
|
import { EnvironmentItem } from './EnvironmentItem';
|
||||||
import { KubeconfigButton } from './KubeconfigButton';
|
import { KubeconfigButton } from './KubeconfigButton';
|
||||||
import styles from './EnvironmentList.module.css';
|
import styles from './EnvironmentList.module.css';
|
||||||
|
|
|
@ -4,7 +4,8 @@ import { Environment } from '@/portainer/environments/types';
|
||||||
import { EnvironmentsQueryParams } from '@/portainer/environments/environment.service/index';
|
import { EnvironmentsQueryParams } from '@/portainer/environments/environment.service/index';
|
||||||
import { isKubernetesEnvironment } from '@/portainer/environments/utils';
|
import { isKubernetesEnvironment } from '@/portainer/environments/utils';
|
||||||
import { trackEvent } from '@/angulartics.matomo/analytics-services';
|
import { trackEvent } from '@/angulartics.matomo/analytics-services';
|
||||||
import { Button } from '@/portainer/components/Button';
|
|
||||||
|
import { Button } from '@@/buttons';
|
||||||
|
|
||||||
import { KubeconfigPrompt } from './KubeconfigPrompt';
|
import { KubeconfigPrompt } from './KubeconfigPrompt';
|
||||||
import '@reach/dialog/styles.css';
|
import '@reach/dialog/styles.css';
|
||||||
|
|
|
@ -4,14 +4,15 @@ import { DialogOverlay } from '@reach/dialog';
|
||||||
|
|
||||||
import * as kcService from '@/kubernetes/services/kubeconfig.service';
|
import * as kcService from '@/kubernetes/services/kubeconfig.service';
|
||||||
import * as notifications from '@/portainer/services/notifications';
|
import * as notifications from '@/portainer/services/notifications';
|
||||||
import { Button } from '@/portainer/components/Button';
|
|
||||||
import { Checkbox } from '@/portainer/components/form-components/Checkbox';
|
|
||||||
import { EnvironmentType } from '@/portainer/environments/types';
|
import { EnvironmentType } from '@/portainer/environments/types';
|
||||||
import { EnvironmentsQueryParams } from '@/portainer/environments/environment.service/index';
|
import { EnvironmentsQueryParams } from '@/portainer/environments/environment.service/index';
|
||||||
import { PaginationControls } from '@/portainer/components/pagination-controls';
|
|
||||||
import { usePaginationLimitState } from '@/portainer/hooks/usePaginationLimitState';
|
import { usePaginationLimitState } from '@/portainer/hooks/usePaginationLimitState';
|
||||||
import { useEnvironmentList } from '@/portainer/environments/queries/useEnvironmentList';
|
import { useEnvironmentList } from '@/portainer/environments/queries/useEnvironmentList';
|
||||||
|
|
||||||
|
import { PaginationControls } from '@@/PaginationControls';
|
||||||
|
import { Checkbox } from '@@/form-components/Checkbox';
|
||||||
|
import { Button } from '@@/buttons';
|
||||||
|
|
||||||
import { useSelection } from './KubeconfigSelection';
|
import { useSelection } from './KubeconfigSelection';
|
||||||
import styles from './KubeconfigPrompt.module.css';
|
import styles from './KubeconfigPrompt.module.css';
|
||||||
import '@reach/dialog/styles.css';
|
import '@reach/dialog/styles.css';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { InformationPanel } from '@/portainer/components/InformationPanel';
|
import { InformationPanel } from '@@/InformationPanel';
|
||||||
import { Link } from '@/portainer/components/Link';
|
import { Link } from '@@/Link';
|
||||||
import { TextTip } from '@/portainer/components/Tip/TextTip';
|
import { TextTip } from '@@/Tip/TextTip';
|
||||||
|
|
||||||
export function NoEnvironmentsInfoPanel({ isAdmin }: { isAdmin: boolean }) {
|
export function NoEnvironmentsInfoPanel({ isAdmin }: { isAdmin: boolean }) {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -3,7 +3,8 @@ import { useState } from 'react';
|
||||||
|
|
||||||
import { r2a } from '@/react-tools/react2angular';
|
import { r2a } from '@/react-tools/react2angular';
|
||||||
|
|
||||||
import { PageHeader } from '../components/PageHeader';
|
import { PageHeader } from '@@/PageHeader';
|
||||||
|
|
||||||
import * as notifications from '../services/notifications';
|
import * as notifications from '../services/notifications';
|
||||||
import { Environment } from '../environments/types';
|
import { Environment } from '../environments/types';
|
||||||
import { snapshotEndpoints } from '../environments/environment.service';
|
import { snapshotEndpoints } from '../environments/environment.service';
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import { components, OptionProps } from 'react-select';
|
import { components, OptionProps } from 'react-select';
|
||||||
|
|
||||||
import { useLocalStorage } from '@/portainer/hooks/useLocalStorage';
|
import { useLocalStorage } from '@/portainer/hooks/useLocalStorage';
|
||||||
import { Select } from '@/portainer/components/form-components/ReactSelect';
|
|
||||||
import { Filter } from '@/portainer/home/types';
|
import { Filter } from '@/portainer/home/types';
|
||||||
|
|
||||||
|
import { Select } from '@@/form-components/ReactSelect';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
filterOptions: Filter[];
|
filterOptions: Filter[];
|
||||||
onChange: (filterOptions: Filter[]) => void;
|
onChange: (filterOptions: Filter[]) => void;
|
||||||
|
|
|
@ -2,8 +2,9 @@ import { useQuery } from 'react-query';
|
||||||
|
|
||||||
import { error as notifyError } from '@/portainer/services/notifications';
|
import { error as notifyError } from '@/portainer/services/notifications';
|
||||||
|
|
||||||
import { InformationPanel } from '../components/InformationPanel';
|
import { InformationPanel } from '@@/InformationPanel';
|
||||||
import { TextTip } from '../components/Tip/TextTip';
|
import { TextTip } from '@@/Tip/TextTip';
|
||||||
|
|
||||||
import { LicenseType } from '../license-management/types';
|
import { LicenseType } from '../license-management/types';
|
||||||
import { useLicenseInfo } from '../license-management/use-license.service';
|
import { useLicenseInfo } from '../license-management/use-license.service';
|
||||||
import { getNodesCount } from '../services/api/status.service';
|
import { getNodesCount } from '../services/api/status.service';
|
||||||
|
|
|
@ -3,7 +3,7 @@ import _ from 'lodash';
|
||||||
|
|
||||||
import { useUIState } from '@/portainer/hooks/UIStateProvider';
|
import { useUIState } from '@/portainer/hooks/UIStateProvider';
|
||||||
|
|
||||||
import { InformationPanel } from '../components/InformationPanel/InformationPanel';
|
import { InformationPanel } from '@@/InformationPanel';
|
||||||
|
|
||||||
import { getMotd } from './home.service';
|
import { getMotd } from './home.service';
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
import { r2a } from '@/react-tools/react2angular';
|
||||||
|
|
||||||
|
import { FileUploadField } from '@@/form-components/FileUpload';
|
||||||
|
|
||||||
|
export const fileUploadField = r2a(FileUploadField, [
|
||||||
|
'onChange',
|
||||||
|
'value',
|
||||||
|
'title',
|
||||||
|
'required',
|
||||||
|
'accept',
|
||||||
|
'inputId',
|
||||||
|
]);
|
|
@ -1,8 +1,14 @@
|
||||||
import angular from 'angular';
|
import angular from 'angular';
|
||||||
|
|
||||||
import { r2a } from '@/react-tools/react2angular';
|
import { r2a } from '@/react-tools/react2angular';
|
||||||
import { TagSelector } from '@/react/components/TagSelector';
|
|
||||||
|
|
||||||
|
import { TagSelector } from '@@/TagSelector';
|
||||||
|
import { Loading } from '@@/Widget/Loading';
|
||||||
|
import { PasswordCheckHint } from '@@/PasswordCheckHint';
|
||||||
|
import { ViewLoading } from '@@/ViewLoading';
|
||||||
|
|
||||||
|
import { fileUploadField } from './file-upload-field';
|
||||||
|
import { switchField } from './switch-field';
|
||||||
import { customTemplatesModule } from './custom-templates';
|
import { customTemplatesModule } from './custom-templates';
|
||||||
|
|
||||||
export const componentsModule = angular
|
export const componentsModule = angular
|
||||||
|
@ -10,4 +16,12 @@ export const componentsModule = angular
|
||||||
.component(
|
.component(
|
||||||
'tagSelector',
|
'tagSelector',
|
||||||
r2a(TagSelector, ['allowCreate', 'onChange', 'value'])
|
r2a(TagSelector, ['allowCreate', 'onChange', 'value'])
|
||||||
).name;
|
)
|
||||||
|
.component('fileUploadField', fileUploadField)
|
||||||
|
.component('porSwitchField', switchField)
|
||||||
|
.component(
|
||||||
|
'passwordCheckHint',
|
||||||
|
r2a(PasswordCheckHint, ['forceChangePassword', 'passwordValid'])
|
||||||
|
)
|
||||||
|
.component('rdLoading', r2a(Loading, []))
|
||||||
|
.component('viewLoading', r2a(ViewLoading, ['message'])).name;
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
import { r2a } from '@/react-tools/react2angular';
|
||||||
|
|
||||||
|
import { SwitchField } from '@@/form-components/SwitchField';
|
||||||
|
|
||||||
|
export const switchField = r2a(SwitchField, [
|
||||||
|
'tooltip',
|
||||||
|
'checked',
|
||||||
|
'label',
|
||||||
|
'name',
|
||||||
|
'labelClass',
|
||||||
|
'dataCy',
|
||||||
|
'disabled',
|
||||||
|
'onChange',
|
||||||
|
'featureId',
|
||||||
|
]);
|
|
@ -1,7 +1,13 @@
|
||||||
import angular from 'angular';
|
import angular from 'angular';
|
||||||
|
|
||||||
|
import { r2a } from '@/react-tools/react2angular';
|
||||||
|
import { CreateAccessToken } from '@/react/portainer/account/CreateAccessTokenView';
|
||||||
|
|
||||||
import { wizardModule } from './wizard';
|
import { wizardModule } from './wizard';
|
||||||
|
|
||||||
export const viewsModule = angular.module('portainer.app.react.views', [
|
export const viewsModule = angular
|
||||||
wizardModule,
|
.module('portainer.app.react.views', [wizardModule])
|
||||||
]).name;
|
.component(
|
||||||
|
'createAccessToken',
|
||||||
|
r2a(CreateAccessToken, ['onSubmit', 'onError'])
|
||||||
|
).name;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import sanitize from 'sanitize-html';
|
import sanitize from 'sanitize-html';
|
||||||
import bootbox from 'bootbox';
|
import bootbox from 'bootbox';
|
||||||
import '@/portainer/components/BoxSelector/BoxSelectorItem.css';
|
import '@@/BoxSelector/BoxSelectorItem.css';
|
||||||
|
|
||||||
import { applyBoxCSS, ButtonsOptions, confirmButtons } from './utils';
|
import { applyBoxCSS, ButtonsOptions, confirmButtons } from './utils';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { LoadingButton } from '@/portainer/components/Button/LoadingButton';
|
import { LoadingButton } from '@@/buttons/LoadingButton';
|
||||||
import { FormSectionTitle } from '@/portainer/components/form-components/FormSectionTitle';
|
import { FormSectionTitle } from '@@/form-components/FormSectionTitle';
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
onSubmit(): void;
|
onSubmit(): void;
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import { FormSectionTitle } from '@/portainer/components/form-components/FormSectionTitle';
|
|
||||||
import { react2angular } from '@/react-tools/react2angular';
|
import { react2angular } from '@/react-tools/react2angular';
|
||||||
import { confirm } from '@/portainer/services/modal.service/confirm';
|
import { confirm } from '@/portainer/services/modal.service/confirm';
|
||||||
|
|
||||||
|
import { FormSectionTitle } from '@@/form-components/FormSectionTitle';
|
||||||
|
|
||||||
import { SaveAuthSettingsButton } from '../components/SaveAuthSettingsButton';
|
import { SaveAuthSettingsButton } from '../components/SaveAuthSettingsButton';
|
||||||
import { Settings } from '../../types';
|
import { Settings } from '../../types';
|
||||||
|
|
||||||
|
|
|
@ -2,14 +2,15 @@ import { Field, Form, Formik } from 'formik';
|
||||||
import * as yup from 'yup';
|
import * as yup from 'yup';
|
||||||
import { useCallback, useEffect } from 'react';
|
import { useCallback, useEffect } from 'react';
|
||||||
|
|
||||||
import { LoadingButton } from '@/portainer/components/Button/LoadingButton';
|
|
||||||
import { FormControl } from '@/portainer/components/form-components/FormControl';
|
|
||||||
import { FormSectionTitle } from '@/portainer/components/form-components/FormSectionTitle';
|
|
||||||
import { Input } from '@/portainer/components/form-components/Input';
|
|
||||||
import { baseHref } from '@/portainer/helpers/pathHelper';
|
import { baseHref } from '@/portainer/helpers/pathHelper';
|
||||||
import { notifySuccess } from '@/portainer/services/notifications';
|
import { notifySuccess } from '@/portainer/services/notifications';
|
||||||
import { useUpdateSettingsMutation } from '@/portainer/settings/queries';
|
import { useUpdateSettingsMutation } from '@/portainer/settings/queries';
|
||||||
|
|
||||||
|
import { LoadingButton } from '@@/buttons/LoadingButton';
|
||||||
|
import { FormControl } from '@@/form-components/FormControl';
|
||||||
|
import { FormSectionTitle } from '@@/form-components/FormSectionTitle';
|
||||||
|
import { Input } from '@@/form-components/Input';
|
||||||
|
|
||||||
import { Settings } from '../types';
|
import { Settings } from '../types';
|
||||||
|
|
||||||
import { EnabledWaitingRoomSwitch } from './EnableWaitingRoomSwitch';
|
import { EnabledWaitingRoomSwitch } from './EnableWaitingRoomSwitch';
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
import { useMutation } from 'react-query';
|
import { useMutation } from 'react-query';
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
|
|
||||||
import { Widget, WidgetBody, WidgetTitle } from '@/portainer/components/widget';
|
|
||||||
import { generateKey } from '@/portainer/environments/environment.service/edge';
|
import { generateKey } from '@/portainer/environments/environment.service/edge';
|
||||||
import { useSettings } from '@/portainer/settings/queries';
|
import { useSettings } from '@/portainer/settings/queries';
|
||||||
import { EdgeScriptForm } from '@/react/edge/components/EdgeScriptForm';
|
import { EdgeScriptForm } from '@/react/edge/components/EdgeScriptForm';
|
||||||
import { commandsTabs } from '@/react/edge/components/EdgeScriptForm/scripts';
|
import { commandsTabs } from '@/react/edge/components/EdgeScriptForm/scripts';
|
||||||
|
|
||||||
|
import { Widget, WidgetBody, WidgetTitle } from '@@/Widget';
|
||||||
|
|
||||||
import { AutoEnvCreationSettingsForm } from './AutoEnvCreationSettingsForm';
|
import { AutoEnvCreationSettingsForm } from './AutoEnvCreationSettingsForm';
|
||||||
|
|
||||||
const commands = {
|
const commands = {
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import { useField } from 'formik';
|
import { useField } from 'formik';
|
||||||
|
|
||||||
import { FormControl } from '@/portainer/components/form-components/FormControl';
|
|
||||||
import { Switch } from '@/portainer/components/form-components/SwitchField/Switch';
|
|
||||||
import { confirmAsync } from '@/portainer/services/modal.service/confirm';
|
import { confirmAsync } from '@/portainer/services/modal.service/confirm';
|
||||||
|
|
||||||
|
import { FormControl } from '@@/form-components/FormControl';
|
||||||
|
import { Switch } from '@@/form-components/SwitchField/Switch';
|
||||||
|
|
||||||
export function EnabledWaitingRoomSwitch() {
|
export function EnabledWaitingRoomSwitch() {
|
||||||
const [inputProps, meta, helpers] = useField<boolean>('TrustOnFirstConnect');
|
const [inputProps, meta, helpers] = useField<boolean>('TrustOnFirstConnect');
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
import { Formik, Form } from 'formik';
|
import { Formik, Form } from 'formik';
|
||||||
|
|
||||||
import { Switch } from '@/portainer/components/form-components/SwitchField/Switch';
|
|
||||||
import { FormControl } from '@/portainer/components/form-components/FormControl';
|
|
||||||
import { Widget, WidgetBody, WidgetTitle } from '@/portainer/components/widget';
|
|
||||||
import { LoadingButton } from '@/portainer/components/Button/LoadingButton';
|
|
||||||
import { TextTip } from '@/portainer/components/Tip/TextTip';
|
|
||||||
import { EdgeCheckinIntervalField } from '@/edge/components/EdgeCheckInIntervalField';
|
import { EdgeCheckinIntervalField } from '@/edge/components/EdgeCheckInIntervalField';
|
||||||
import { FormSectionTitle } from '@/portainer/components/form-components/FormSectionTitle';
|
|
||||||
|
import { Switch } from '@@/form-components/SwitchField/Switch';
|
||||||
|
import { FormControl } from '@@/form-components/FormControl';
|
||||||
|
import { Widget, WidgetBody, WidgetTitle } from '@@/Widget';
|
||||||
|
import { LoadingButton } from '@@/buttons/LoadingButton';
|
||||||
|
import { TextTip } from '@@/Tip/TextTip';
|
||||||
|
import { FormSectionTitle } from '@@/form-components/FormSectionTitle';
|
||||||
|
|
||||||
import { Settings } from '../types';
|
import { Settings } from '../types';
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
import { useTable, usePagination, useSortBy } from 'react-table';
|
import { useTable, usePagination, useSortBy } from 'react-table';
|
||||||
import { useRowSelectColumn } from '@lineup-lite/hooks';
|
import { useRowSelectColumn } from '@lineup-lite/hooks';
|
||||||
import { FDOProfilesDatatableActions } from 'Portainer/settings/edge-compute/FDOProfilesDatatable/FDOProfilesDatatableActions';
|
import { FDOProfilesDatatableActions } from 'Portainer/settings/edge-compute/FDOProfilesDatatable/FDOProfilesDatatableActions';
|
||||||
import { SelectedRowsCount } from 'Portainer/components/datatables/components/SelectedRowsCount';
|
|
||||||
import { PaginationControls } from 'Portainer/components/pagination-controls';
|
|
||||||
import { TableFooter } from 'Portainer/components/datatables/components/TableFooter';
|
|
||||||
import { useTableSettings } from 'Portainer/components/datatables/components/useTableSettings';
|
|
||||||
import { useRowSelect } from 'Portainer/components/datatables/components/useRowSelect';
|
|
||||||
|
|
||||||
import { Profile } from '@/portainer/hostmanagement/fdo/model';
|
import { Profile } from '@/portainer/hostmanagement/fdo/model';
|
||||||
import PortainerError from '@/portainer/error';
|
import PortainerError from '@/portainer/error';
|
||||||
|
|
||||||
|
import { PaginationControls } from '@@/PaginationControls';
|
||||||
|
import { SelectedRowsCount } from '@@/datatables/SelectedRowsCount';
|
||||||
|
import { TableFooter } from '@@/datatables/TableFooter';
|
||||||
|
import { useTableSettings } from '@@/datatables/useTableSettings';
|
||||||
|
import { useRowSelect } from '@@/datatables/useRowSelect';
|
||||||
import {
|
import {
|
||||||
Table,
|
Table,
|
||||||
TableActions,
|
TableActions,
|
||||||
|
@ -16,11 +17,11 @@ import {
|
||||||
TableHeaderRow,
|
TableHeaderRow,
|
||||||
TableRow,
|
TableRow,
|
||||||
TableTitle,
|
TableTitle,
|
||||||
} from '@/portainer/components/datatables/components';
|
} from '@@/datatables';
|
||||||
import {
|
import {
|
||||||
PaginationTableSettings,
|
PaginationTableSettings,
|
||||||
SortableTableSettings,
|
SortableTableSettings,
|
||||||
} from '@/portainer/components/datatables/types';
|
} from '@@/datatables/types';
|
||||||
|
|
||||||
import { useFDOProfiles } from './useFDOProfiles';
|
import { useFDOProfiles } from './useFDOProfiles';
|
||||||
import { useColumns } from './columns';
|
import { useColumns } from './columns';
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
import { useQueryClient } from 'react-query';
|
import { useQueryClient } from 'react-query';
|
||||||
import { useRouter } from '@uirouter/react';
|
import { useRouter } from '@uirouter/react';
|
||||||
|
|
||||||
import { Button } from '@/portainer/components/Button';
|
|
||||||
import { Profile } from '@/portainer/hostmanagement/fdo/model';
|
import { Profile } from '@/portainer/hostmanagement/fdo/model';
|
||||||
import { Link } from '@/portainer/components/Link';
|
|
||||||
import { confirmAsync } from '@/portainer/services/modal.service/confirm';
|
import { confirmAsync } from '@/portainer/services/modal.service/confirm';
|
||||||
import * as notifications from '@/portainer/services/notifications';
|
import * as notifications from '@/portainer/services/notifications';
|
||||||
import {
|
import {
|
||||||
|
@ -11,6 +9,9 @@ import {
|
||||||
duplicateProfile,
|
duplicateProfile,
|
||||||
} from '@/portainer/hostmanagement/fdo/fdo.service';
|
} from '@/portainer/hostmanagement/fdo/fdo.service';
|
||||||
|
|
||||||
|
import { Link } from '@@/Link';
|
||||||
|
import { Button } from '@@/buttons';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
isFDOEnabled: boolean;
|
isFDOEnabled: boolean;
|
||||||
selectedItems: Profile[];
|
selectedItems: Profile[];
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { TableSettingsProvider } from '@/portainer/components/datatables/components/useTableSettings';
|
import { TableSettingsProvider } from '@@/datatables/useTableSettings';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
FDOProfilesDatatable,
|
FDOProfilesDatatable,
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { Formik, Field, Form } from 'formik';
|
import { Formik, Field, Form } from 'formik';
|
||||||
|
|
||||||
import { Switch } from '@/portainer/components/form-components/SwitchField/Switch';
|
|
||||||
import { FormControl } from '@/portainer/components/form-components/FormControl';
|
|
||||||
import { FormSectionTitle } from '@/portainer/components/form-components/FormSectionTitle';
|
|
||||||
import { Widget, WidgetBody, WidgetTitle } from '@/portainer/components/widget';
|
|
||||||
import { LoadingButton } from '@/portainer/components/Button/LoadingButton';
|
|
||||||
import { TextTip } from '@/portainer/components/Tip/TextTip';
|
|
||||||
import { Input } from '@/portainer/components/form-components/Input';
|
|
||||||
import { FDOConfiguration } from '@/portainer/hostmanagement/fdo/model';
|
import { FDOConfiguration } from '@/portainer/hostmanagement/fdo/model';
|
||||||
import { FDOProfilesDatatableContainer } from '@/portainer/settings/edge-compute/FDOProfilesDatatable/FDOProfilesDatatableContainer';
|
import { FDOProfilesDatatableContainer } from '@/portainer/settings/edge-compute/FDOProfilesDatatable/FDOProfilesDatatableContainer';
|
||||||
|
|
||||||
|
import { Switch } from '@@/form-components/SwitchField/Switch';
|
||||||
|
import { FormControl } from '@@/form-components/FormControl';
|
||||||
|
import { FormSectionTitle } from '@@/form-components/FormSectionTitle';
|
||||||
|
import { Widget, WidgetBody, WidgetTitle } from '@@/Widget';
|
||||||
|
import { LoadingButton } from '@@/buttons/LoadingButton';
|
||||||
|
import { TextTip } from '@@/Tip/TextTip';
|
||||||
|
import { Input } from '@@/form-components/Input';
|
||||||
|
|
||||||
import styles from './SettingsFDO.module.css';
|
import styles from './SettingsFDO.module.css';
|
||||||
import { validationSchema } from './SettingsFDO.validation';
|
import { validationSchema } from './SettingsFDO.validation';
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { Formik, Field, Form } from 'formik';
|
import { Formik, Field, Form } from 'formik';
|
||||||
|
|
||||||
import { Switch } from '@/portainer/components/form-components/SwitchField/Switch';
|
|
||||||
import { FormControl } from '@/portainer/components/form-components/FormControl';
|
|
||||||
import { Widget, WidgetBody, WidgetTitle } from '@/portainer/components/widget';
|
|
||||||
import { LoadingButton } from '@/portainer/components/Button/LoadingButton';
|
|
||||||
import { TextTip } from '@/portainer/components/Tip/TextTip';
|
|
||||||
import { Input } from '@/portainer/components/form-components/Input';
|
|
||||||
import { FileUploadField } from '@/portainer/components/form-components/FileUpload';
|
|
||||||
import { OpenAMTConfiguration } from '@/portainer/hostmanagement/open-amt/model';
|
import { OpenAMTConfiguration } from '@/portainer/hostmanagement/open-amt/model';
|
||||||
|
|
||||||
|
import { Switch } from '@@/form-components/SwitchField/Switch';
|
||||||
|
import { FormControl } from '@@/form-components/FormControl';
|
||||||
|
import { Widget, WidgetBody, WidgetTitle } from '@@/Widget';
|
||||||
|
import { LoadingButton } from '@@/buttons/LoadingButton';
|
||||||
|
import { TextTip } from '@@/Tip/TextTip';
|
||||||
|
import { Input } from '@@/form-components/Input';
|
||||||
|
import { FileUploadField } from '@@/form-components/FileUpload';
|
||||||
|
|
||||||
import { validationSchema } from './SettingsOpenAMT.validation';
|
import { validationSchema } from './SettingsOpenAMT.validation';
|
||||||
|
|
||||||
export interface Settings {
|
export interface Settings {
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
import { Formik, Field, Form } from 'formik';
|
import { Formik, Field, Form } from 'formik';
|
||||||
|
|
||||||
import { FormControl } from '@/portainer/components/form-components/FormControl';
|
|
||||||
import { Widget, WidgetBody, WidgetTitle } from '@/portainer/components/widget';
|
|
||||||
import { UserViewModel } from '@/portainer/models/user';
|
import { UserViewModel } from '@/portainer/models/user';
|
||||||
import { TeamViewModel } from '@/portainer/models/team';
|
import { TeamViewModel } from '@/portainer/models/team';
|
||||||
import { Input } from '@/portainer/components/form-components/Input';
|
|
||||||
import { UsersSelector } from '@/portainer/components/UsersSelector';
|
import { FormControl } from '@@/form-components/FormControl';
|
||||||
import { LoadingButton } from '@/portainer/components/Button/LoadingButton';
|
import { Widget, WidgetBody, WidgetTitle } from '@@/Widget';
|
||||||
|
import { Input } from '@@/form-components/Input';
|
||||||
|
import { UsersSelector } from '@@/UsersSelector';
|
||||||
|
import { LoadingButton } from '@@/buttons/LoadingButton';
|
||||||
|
|
||||||
import { validationSchema } from './CreateTeamForm.validation';
|
import { validationSchema } from './CreateTeamForm.validation';
|
||||||
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
import { react2angular } from '@/react-tools/react2angular';
|
|
||||||
|
|
||||||
import { CreateAccessToken } from './CreateAccessToken';
|
|
||||||
|
|
||||||
const CreateAccessTokenAngular = react2angular(CreateAccessToken, [
|
|
||||||
'onSubmit',
|
|
||||||
'onError',
|
|
||||||
]);
|
|
||||||
export { CreateAccessToken, CreateAccessTokenAngular };
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue